Rename CLI and ExecutableCLI folders (#635)

## Motivation and Context
This is an extension of #603 to cleanup the folder structure and have it
match with the new library and target names.
This commit is contained in:
Morris Richman
2025-09-18 17:49:48 -07:00
committed by GitHub
parent dd6bdc20cf
commit 996a6819e3
62 changed files with 22 additions and 14 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ let package = Package(
"ContainerClient",
"ContainerCommands",
],
path: "Sources/ExecutableCLI"
path: "Sources/CLI"
),
.target(
name: "ContainerCommands",
@@ -90,7 +90,7 @@ let package = Package(
"ContainerVersion",
"TerminalProgress",
],
path: "Sources/CLI"
path: "Sources/ContainerCommands"
),
.executableTarget(
name: "container-apiserver",
@@ -21,8 +21,10 @@ import ContainerizationError
import Foundation
extension Application {
struct PropertyClear: AsyncParsableCommand {
static let configuration = CommandConfiguration(
public struct PropertyClear: AsyncParsableCommand {
public init() {}
public static let configuration = CommandConfiguration(
commandName: "clear",
abstract: "Clear a property value"
)
@@ -33,7 +35,7 @@ extension Application {
@Argument(help: "the property ID")
var id: String
func run() async throws {
public func run() async throws {
guard let key = DefaultsStore.Keys(rawValue: id) else {
throw ContainerizationError(.invalidArgument, message: "invalid property ID: \(id)")
}
@@ -21,8 +21,10 @@ import ContainerizationError
import Foundation
extension Application {
struct PropertyGet: AsyncParsableCommand {
static let configuration = CommandConfiguration(
public struct PropertyGet: AsyncParsableCommand {
public init() {}
public static let configuration = CommandConfiguration(
commandName: "get",
abstract: "Retrieve a property value"
)
@@ -33,7 +35,7 @@ extension Application {
@Argument(help: "the property ID")
var id: String
func run() async throws {
public func run() async throws {
let value = DefaultsStore.allValues()
.filter { id == $0.id }
.first
@@ -20,8 +20,10 @@ import ContainerPersistence
import Foundation
extension Application {
struct PropertyList: AsyncParsableCommand {
static let configuration = CommandConfiguration(
public struct PropertyList: AsyncParsableCommand {
public init() {}
public static let configuration = CommandConfiguration(
commandName: "list",
abstract: "List system properties",
aliases: ["ls"]
@@ -36,7 +38,7 @@ extension Application {
@OptionGroup
var global: Flags.Global
func run() async throws {
public func run() async throws {
let vals = DefaultsStore.allValues()
try printValues(vals, format: format)
}
@@ -23,8 +23,10 @@ import ContainerizationOCI
import Foundation
extension Application {
struct PropertySet: AsyncParsableCommand {
static let configuration = CommandConfiguration(
public struct PropertySet: AsyncParsableCommand {
public init() {}
public static let configuration = CommandConfiguration(
commandName: "set",
abstract: "Set a property value"
)
@@ -38,7 +40,7 @@ extension Application {
@Argument(help: "the property value")
var value: String
func run() async throws {
public func run() async throws {
guard let key = DefaultsStore.Keys(rawValue: id) else {
throw ContainerizationError(.invalidArgument, message: "invalid property ID: \(id)")
}