mirror of
https://github.com/apple/container.git
synced 2026-08-29 03:46:39 +00:00
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:
+2
-2
@@ -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",
|
||||
|
||||
+5
-3
@@ -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)")
|
||||
}
|
||||
+5
-3
@@ -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
|
||||
+5
-3
@@ -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)
|
||||
}
|
||||
+5
-3
@@ -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)")
|
||||
}
|
||||
Reference in New Issue
Block a user