From 996a6819e35d0b06071fc491ee0c4fd5cfec43f7 Mon Sep 17 00:00:00 2001 From: Morris Richman <81453549+Mcrich23@users.noreply.github.com> Date: Thu, 18 Sep 2025 17:49:48 -0700 Subject: [PATCH] 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. --- Package.swift | 4 ++-- Sources/{ExecutableCLI => CLI}/Executable.swift | 0 Sources/{CLI => ContainerCommands}/Application.swift | 0 Sources/{CLI => ContainerCommands}/BuildCommand.swift | 0 Sources/{CLI => ContainerCommands}/Builder/Builder.swift | 0 .../Builder/BuilderDelete.swift | 0 .../{CLI => ContainerCommands}/Builder/BuilderStart.swift | 0 .../Builder/BuilderStatus.swift | 0 .../{CLI => ContainerCommands}/Builder/BuilderStop.swift | 0 Sources/{CLI => ContainerCommands}/Codable+JSON.swift | 0 .../Container/ContainerCreate.swift | 0 .../Container/ContainerDelete.swift | 0 .../Container/ContainerExec.swift | 0 .../Container/ContainerInspect.swift | 0 .../Container/ContainerKill.swift | 0 .../Container/ContainerList.swift | 0 .../Container/ContainerLogs.swift | 0 .../Container/ContainerStart.swift | 0 .../Container/ContainerStop.swift | 0 .../Container/ContainersCommand.swift | 0 .../Container/ProcessUtils.swift | 0 Sources/{CLI => ContainerCommands}/DefaultCommand.swift | 0 .../{CLI => ContainerCommands}/Image/ImageCommand.swift | 0 .../{CLI => ContainerCommands}/Image/ImageInspect.swift | 0 Sources/{CLI => ContainerCommands}/Image/ImageList.swift | 0 Sources/{CLI => ContainerCommands}/Image/ImageLoad.swift | 0 Sources/{CLI => ContainerCommands}/Image/ImagePrune.swift | 0 Sources/{CLI => ContainerCommands}/Image/ImagePull.swift | 0 Sources/{CLI => ContainerCommands}/Image/ImagePush.swift | 0 .../{CLI => ContainerCommands}/Image/ImageRemove.swift | 0 Sources/{CLI => ContainerCommands}/Image/ImageSave.swift | 0 Sources/{CLI => ContainerCommands}/Image/ImageTag.swift | 0 .../Network/NetworkCommand.swift | 0 .../Network/NetworkCreate.swift | 0 .../Network/NetworkDelete.swift | 0 .../Network/NetworkInspect.swift | 0 .../{CLI => ContainerCommands}/Network/NetworkList.swift | 0 Sources/{CLI => ContainerCommands}/Registry/Login.swift | 0 Sources/{CLI => ContainerCommands}/Registry/Logout.swift | 0 .../Registry/RegistryCommand.swift | 0 Sources/{CLI => ContainerCommands}/RunCommand.swift | 0 .../{CLI => ContainerCommands}/System/DNS/DNSCreate.swift | 0 .../{CLI => ContainerCommands}/System/DNS/DNSDelete.swift | 0 .../{CLI => ContainerCommands}/System/DNS/DNSList.swift | 0 .../System/Kernel/KernelSet.swift | 0 .../System/Property/PropertyClear.swift | 8 +++++--- .../System/Property/PropertyGet.swift | 8 +++++--- .../System/Property/PropertyList.swift | 8 +++++--- .../System/Property/PropertySet.swift | 8 +++++--- .../{CLI => ContainerCommands}/System/SystemCommand.swift | 0 Sources/{CLI => ContainerCommands}/System/SystemDNS.swift | 0 .../{CLI => ContainerCommands}/System/SystemKernel.swift | 0 .../{CLI => ContainerCommands}/System/SystemLogs.swift | 0 .../System/SystemProperty.swift | 0 .../{CLI => ContainerCommands}/System/SystemStart.swift | 0 .../{CLI => ContainerCommands}/System/SystemStatus.swift | 0 .../{CLI => ContainerCommands}/System/SystemStop.swift | 0 .../{CLI => ContainerCommands}/Volume/VolumeCommand.swift | 0 .../{CLI => ContainerCommands}/Volume/VolumeCreate.swift | 0 .../{CLI => ContainerCommands}/Volume/VolumeDelete.swift | 0 .../{CLI => ContainerCommands}/Volume/VolumeInspect.swift | 0 .../{CLI => ContainerCommands}/Volume/VolumeList.swift | 0 62 files changed, 22 insertions(+), 14 deletions(-) rename Sources/{ExecutableCLI => CLI}/Executable.swift (100%) rename Sources/{CLI => ContainerCommands}/Application.swift (100%) rename Sources/{CLI => ContainerCommands}/BuildCommand.swift (100%) rename Sources/{CLI => ContainerCommands}/Builder/Builder.swift (100%) rename Sources/{CLI => ContainerCommands}/Builder/BuilderDelete.swift (100%) rename Sources/{CLI => ContainerCommands}/Builder/BuilderStart.swift (100%) rename Sources/{CLI => ContainerCommands}/Builder/BuilderStatus.swift (100%) rename Sources/{CLI => ContainerCommands}/Builder/BuilderStop.swift (100%) rename Sources/{CLI => ContainerCommands}/Codable+JSON.swift (100%) rename Sources/{CLI => ContainerCommands}/Container/ContainerCreate.swift (100%) rename Sources/{CLI => ContainerCommands}/Container/ContainerDelete.swift (100%) rename Sources/{CLI => ContainerCommands}/Container/ContainerExec.swift (100%) rename Sources/{CLI => ContainerCommands}/Container/ContainerInspect.swift (100%) rename Sources/{CLI => ContainerCommands}/Container/ContainerKill.swift (100%) rename Sources/{CLI => ContainerCommands}/Container/ContainerList.swift (100%) rename Sources/{CLI => ContainerCommands}/Container/ContainerLogs.swift (100%) rename Sources/{CLI => ContainerCommands}/Container/ContainerStart.swift (100%) rename Sources/{CLI => ContainerCommands}/Container/ContainerStop.swift (100%) rename Sources/{CLI => ContainerCommands}/Container/ContainersCommand.swift (100%) rename Sources/{CLI => ContainerCommands}/Container/ProcessUtils.swift (100%) rename Sources/{CLI => ContainerCommands}/DefaultCommand.swift (100%) rename Sources/{CLI => ContainerCommands}/Image/ImageCommand.swift (100%) rename Sources/{CLI => ContainerCommands}/Image/ImageInspect.swift (100%) rename Sources/{CLI => ContainerCommands}/Image/ImageList.swift (100%) rename Sources/{CLI => ContainerCommands}/Image/ImageLoad.swift (100%) rename Sources/{CLI => ContainerCommands}/Image/ImagePrune.swift (100%) rename Sources/{CLI => ContainerCommands}/Image/ImagePull.swift (100%) rename Sources/{CLI => ContainerCommands}/Image/ImagePush.swift (100%) rename Sources/{CLI => ContainerCommands}/Image/ImageRemove.swift (100%) rename Sources/{CLI => ContainerCommands}/Image/ImageSave.swift (100%) rename Sources/{CLI => ContainerCommands}/Image/ImageTag.swift (100%) rename Sources/{CLI => ContainerCommands}/Network/NetworkCommand.swift (100%) rename Sources/{CLI => ContainerCommands}/Network/NetworkCreate.swift (100%) rename Sources/{CLI => ContainerCommands}/Network/NetworkDelete.swift (100%) rename Sources/{CLI => ContainerCommands}/Network/NetworkInspect.swift (100%) rename Sources/{CLI => ContainerCommands}/Network/NetworkList.swift (100%) rename Sources/{CLI => ContainerCommands}/Registry/Login.swift (100%) rename Sources/{CLI => ContainerCommands}/Registry/Logout.swift (100%) rename Sources/{CLI => ContainerCommands}/Registry/RegistryCommand.swift (100%) rename Sources/{CLI => ContainerCommands}/RunCommand.swift (100%) rename Sources/{CLI => ContainerCommands}/System/DNS/DNSCreate.swift (100%) rename Sources/{CLI => ContainerCommands}/System/DNS/DNSDelete.swift (100%) rename Sources/{CLI => ContainerCommands}/System/DNS/DNSList.swift (100%) rename Sources/{CLI => ContainerCommands}/System/Kernel/KernelSet.swift (100%) rename Sources/{CLI => ContainerCommands}/System/Property/PropertyClear.swift (88%) rename Sources/{CLI => ContainerCommands}/System/Property/PropertyGet.swift (89%) rename Sources/{CLI => ContainerCommands}/System/Property/PropertyList.swift (93%) rename Sources/{CLI => ContainerCommands}/System/Property/PropertySet.swift (94%) rename Sources/{CLI => ContainerCommands}/System/SystemCommand.swift (100%) rename Sources/{CLI => ContainerCommands}/System/SystemDNS.swift (100%) rename Sources/{CLI => ContainerCommands}/System/SystemKernel.swift (100%) rename Sources/{CLI => ContainerCommands}/System/SystemLogs.swift (100%) rename Sources/{CLI => ContainerCommands}/System/SystemProperty.swift (100%) rename Sources/{CLI => ContainerCommands}/System/SystemStart.swift (100%) rename Sources/{CLI => ContainerCommands}/System/SystemStatus.swift (100%) rename Sources/{CLI => ContainerCommands}/System/SystemStop.swift (100%) rename Sources/{CLI => ContainerCommands}/Volume/VolumeCommand.swift (100%) rename Sources/{CLI => ContainerCommands}/Volume/VolumeCreate.swift (100%) rename Sources/{CLI => ContainerCommands}/Volume/VolumeDelete.swift (100%) rename Sources/{CLI => ContainerCommands}/Volume/VolumeInspect.swift (100%) rename Sources/{CLI => ContainerCommands}/Volume/VolumeList.swift (100%) diff --git a/Package.swift b/Package.swift index ae5b989a..098be1cf 100644 --- a/Package.swift +++ b/Package.swift @@ -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", diff --git a/Sources/ExecutableCLI/Executable.swift b/Sources/CLI/Executable.swift similarity index 100% rename from Sources/ExecutableCLI/Executable.swift rename to Sources/CLI/Executable.swift diff --git a/Sources/CLI/Application.swift b/Sources/ContainerCommands/Application.swift similarity index 100% rename from Sources/CLI/Application.swift rename to Sources/ContainerCommands/Application.swift diff --git a/Sources/CLI/BuildCommand.swift b/Sources/ContainerCommands/BuildCommand.swift similarity index 100% rename from Sources/CLI/BuildCommand.swift rename to Sources/ContainerCommands/BuildCommand.swift diff --git a/Sources/CLI/Builder/Builder.swift b/Sources/ContainerCommands/Builder/Builder.swift similarity index 100% rename from Sources/CLI/Builder/Builder.swift rename to Sources/ContainerCommands/Builder/Builder.swift diff --git a/Sources/CLI/Builder/BuilderDelete.swift b/Sources/ContainerCommands/Builder/BuilderDelete.swift similarity index 100% rename from Sources/CLI/Builder/BuilderDelete.swift rename to Sources/ContainerCommands/Builder/BuilderDelete.swift diff --git a/Sources/CLI/Builder/BuilderStart.swift b/Sources/ContainerCommands/Builder/BuilderStart.swift similarity index 100% rename from Sources/CLI/Builder/BuilderStart.swift rename to Sources/ContainerCommands/Builder/BuilderStart.swift diff --git a/Sources/CLI/Builder/BuilderStatus.swift b/Sources/ContainerCommands/Builder/BuilderStatus.swift similarity index 100% rename from Sources/CLI/Builder/BuilderStatus.swift rename to Sources/ContainerCommands/Builder/BuilderStatus.swift diff --git a/Sources/CLI/Builder/BuilderStop.swift b/Sources/ContainerCommands/Builder/BuilderStop.swift similarity index 100% rename from Sources/CLI/Builder/BuilderStop.swift rename to Sources/ContainerCommands/Builder/BuilderStop.swift diff --git a/Sources/CLI/Codable+JSON.swift b/Sources/ContainerCommands/Codable+JSON.swift similarity index 100% rename from Sources/CLI/Codable+JSON.swift rename to Sources/ContainerCommands/Codable+JSON.swift diff --git a/Sources/CLI/Container/ContainerCreate.swift b/Sources/ContainerCommands/Container/ContainerCreate.swift similarity index 100% rename from Sources/CLI/Container/ContainerCreate.swift rename to Sources/ContainerCommands/Container/ContainerCreate.swift diff --git a/Sources/CLI/Container/ContainerDelete.swift b/Sources/ContainerCommands/Container/ContainerDelete.swift similarity index 100% rename from Sources/CLI/Container/ContainerDelete.swift rename to Sources/ContainerCommands/Container/ContainerDelete.swift diff --git a/Sources/CLI/Container/ContainerExec.swift b/Sources/ContainerCommands/Container/ContainerExec.swift similarity index 100% rename from Sources/CLI/Container/ContainerExec.swift rename to Sources/ContainerCommands/Container/ContainerExec.swift diff --git a/Sources/CLI/Container/ContainerInspect.swift b/Sources/ContainerCommands/Container/ContainerInspect.swift similarity index 100% rename from Sources/CLI/Container/ContainerInspect.swift rename to Sources/ContainerCommands/Container/ContainerInspect.swift diff --git a/Sources/CLI/Container/ContainerKill.swift b/Sources/ContainerCommands/Container/ContainerKill.swift similarity index 100% rename from Sources/CLI/Container/ContainerKill.swift rename to Sources/ContainerCommands/Container/ContainerKill.swift diff --git a/Sources/CLI/Container/ContainerList.swift b/Sources/ContainerCommands/Container/ContainerList.swift similarity index 100% rename from Sources/CLI/Container/ContainerList.swift rename to Sources/ContainerCommands/Container/ContainerList.swift diff --git a/Sources/CLI/Container/ContainerLogs.swift b/Sources/ContainerCommands/Container/ContainerLogs.swift similarity index 100% rename from Sources/CLI/Container/ContainerLogs.swift rename to Sources/ContainerCommands/Container/ContainerLogs.swift diff --git a/Sources/CLI/Container/ContainerStart.swift b/Sources/ContainerCommands/Container/ContainerStart.swift similarity index 100% rename from Sources/CLI/Container/ContainerStart.swift rename to Sources/ContainerCommands/Container/ContainerStart.swift diff --git a/Sources/CLI/Container/ContainerStop.swift b/Sources/ContainerCommands/Container/ContainerStop.swift similarity index 100% rename from Sources/CLI/Container/ContainerStop.swift rename to Sources/ContainerCommands/Container/ContainerStop.swift diff --git a/Sources/CLI/Container/ContainersCommand.swift b/Sources/ContainerCommands/Container/ContainersCommand.swift similarity index 100% rename from Sources/CLI/Container/ContainersCommand.swift rename to Sources/ContainerCommands/Container/ContainersCommand.swift diff --git a/Sources/CLI/Container/ProcessUtils.swift b/Sources/ContainerCommands/Container/ProcessUtils.swift similarity index 100% rename from Sources/CLI/Container/ProcessUtils.swift rename to Sources/ContainerCommands/Container/ProcessUtils.swift diff --git a/Sources/CLI/DefaultCommand.swift b/Sources/ContainerCommands/DefaultCommand.swift similarity index 100% rename from Sources/CLI/DefaultCommand.swift rename to Sources/ContainerCommands/DefaultCommand.swift diff --git a/Sources/CLI/Image/ImageCommand.swift b/Sources/ContainerCommands/Image/ImageCommand.swift similarity index 100% rename from Sources/CLI/Image/ImageCommand.swift rename to Sources/ContainerCommands/Image/ImageCommand.swift diff --git a/Sources/CLI/Image/ImageInspect.swift b/Sources/ContainerCommands/Image/ImageInspect.swift similarity index 100% rename from Sources/CLI/Image/ImageInspect.swift rename to Sources/ContainerCommands/Image/ImageInspect.swift diff --git a/Sources/CLI/Image/ImageList.swift b/Sources/ContainerCommands/Image/ImageList.swift similarity index 100% rename from Sources/CLI/Image/ImageList.swift rename to Sources/ContainerCommands/Image/ImageList.swift diff --git a/Sources/CLI/Image/ImageLoad.swift b/Sources/ContainerCommands/Image/ImageLoad.swift similarity index 100% rename from Sources/CLI/Image/ImageLoad.swift rename to Sources/ContainerCommands/Image/ImageLoad.swift diff --git a/Sources/CLI/Image/ImagePrune.swift b/Sources/ContainerCommands/Image/ImagePrune.swift similarity index 100% rename from Sources/CLI/Image/ImagePrune.swift rename to Sources/ContainerCommands/Image/ImagePrune.swift diff --git a/Sources/CLI/Image/ImagePull.swift b/Sources/ContainerCommands/Image/ImagePull.swift similarity index 100% rename from Sources/CLI/Image/ImagePull.swift rename to Sources/ContainerCommands/Image/ImagePull.swift diff --git a/Sources/CLI/Image/ImagePush.swift b/Sources/ContainerCommands/Image/ImagePush.swift similarity index 100% rename from Sources/CLI/Image/ImagePush.swift rename to Sources/ContainerCommands/Image/ImagePush.swift diff --git a/Sources/CLI/Image/ImageRemove.swift b/Sources/ContainerCommands/Image/ImageRemove.swift similarity index 100% rename from Sources/CLI/Image/ImageRemove.swift rename to Sources/ContainerCommands/Image/ImageRemove.swift diff --git a/Sources/CLI/Image/ImageSave.swift b/Sources/ContainerCommands/Image/ImageSave.swift similarity index 100% rename from Sources/CLI/Image/ImageSave.swift rename to Sources/ContainerCommands/Image/ImageSave.swift diff --git a/Sources/CLI/Image/ImageTag.swift b/Sources/ContainerCommands/Image/ImageTag.swift similarity index 100% rename from Sources/CLI/Image/ImageTag.swift rename to Sources/ContainerCommands/Image/ImageTag.swift diff --git a/Sources/CLI/Network/NetworkCommand.swift b/Sources/ContainerCommands/Network/NetworkCommand.swift similarity index 100% rename from Sources/CLI/Network/NetworkCommand.swift rename to Sources/ContainerCommands/Network/NetworkCommand.swift diff --git a/Sources/CLI/Network/NetworkCreate.swift b/Sources/ContainerCommands/Network/NetworkCreate.swift similarity index 100% rename from Sources/CLI/Network/NetworkCreate.swift rename to Sources/ContainerCommands/Network/NetworkCreate.swift diff --git a/Sources/CLI/Network/NetworkDelete.swift b/Sources/ContainerCommands/Network/NetworkDelete.swift similarity index 100% rename from Sources/CLI/Network/NetworkDelete.swift rename to Sources/ContainerCommands/Network/NetworkDelete.swift diff --git a/Sources/CLI/Network/NetworkInspect.swift b/Sources/ContainerCommands/Network/NetworkInspect.swift similarity index 100% rename from Sources/CLI/Network/NetworkInspect.swift rename to Sources/ContainerCommands/Network/NetworkInspect.swift diff --git a/Sources/CLI/Network/NetworkList.swift b/Sources/ContainerCommands/Network/NetworkList.swift similarity index 100% rename from Sources/CLI/Network/NetworkList.swift rename to Sources/ContainerCommands/Network/NetworkList.swift diff --git a/Sources/CLI/Registry/Login.swift b/Sources/ContainerCommands/Registry/Login.swift similarity index 100% rename from Sources/CLI/Registry/Login.swift rename to Sources/ContainerCommands/Registry/Login.swift diff --git a/Sources/CLI/Registry/Logout.swift b/Sources/ContainerCommands/Registry/Logout.swift similarity index 100% rename from Sources/CLI/Registry/Logout.swift rename to Sources/ContainerCommands/Registry/Logout.swift diff --git a/Sources/CLI/Registry/RegistryCommand.swift b/Sources/ContainerCommands/Registry/RegistryCommand.swift similarity index 100% rename from Sources/CLI/Registry/RegistryCommand.swift rename to Sources/ContainerCommands/Registry/RegistryCommand.swift diff --git a/Sources/CLI/RunCommand.swift b/Sources/ContainerCommands/RunCommand.swift similarity index 100% rename from Sources/CLI/RunCommand.swift rename to Sources/ContainerCommands/RunCommand.swift diff --git a/Sources/CLI/System/DNS/DNSCreate.swift b/Sources/ContainerCommands/System/DNS/DNSCreate.swift similarity index 100% rename from Sources/CLI/System/DNS/DNSCreate.swift rename to Sources/ContainerCommands/System/DNS/DNSCreate.swift diff --git a/Sources/CLI/System/DNS/DNSDelete.swift b/Sources/ContainerCommands/System/DNS/DNSDelete.swift similarity index 100% rename from Sources/CLI/System/DNS/DNSDelete.swift rename to Sources/ContainerCommands/System/DNS/DNSDelete.swift diff --git a/Sources/CLI/System/DNS/DNSList.swift b/Sources/ContainerCommands/System/DNS/DNSList.swift similarity index 100% rename from Sources/CLI/System/DNS/DNSList.swift rename to Sources/ContainerCommands/System/DNS/DNSList.swift diff --git a/Sources/CLI/System/Kernel/KernelSet.swift b/Sources/ContainerCommands/System/Kernel/KernelSet.swift similarity index 100% rename from Sources/CLI/System/Kernel/KernelSet.swift rename to Sources/ContainerCommands/System/Kernel/KernelSet.swift diff --git a/Sources/CLI/System/Property/PropertyClear.swift b/Sources/ContainerCommands/System/Property/PropertyClear.swift similarity index 88% rename from Sources/CLI/System/Property/PropertyClear.swift rename to Sources/ContainerCommands/System/Property/PropertyClear.swift index dff042f3..6c69e378 100644 --- a/Sources/CLI/System/Property/PropertyClear.swift +++ b/Sources/ContainerCommands/System/Property/PropertyClear.swift @@ -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)") } diff --git a/Sources/CLI/System/Property/PropertyGet.swift b/Sources/ContainerCommands/System/Property/PropertyGet.swift similarity index 89% rename from Sources/CLI/System/Property/PropertyGet.swift rename to Sources/ContainerCommands/System/Property/PropertyGet.swift index a5bf7c15..909f2cd4 100644 --- a/Sources/CLI/System/Property/PropertyGet.swift +++ b/Sources/ContainerCommands/System/Property/PropertyGet.swift @@ -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 diff --git a/Sources/CLI/System/Property/PropertyList.swift b/Sources/ContainerCommands/System/Property/PropertyList.swift similarity index 93% rename from Sources/CLI/System/Property/PropertyList.swift rename to Sources/ContainerCommands/System/Property/PropertyList.swift index 2d834c6c..312d109f 100644 --- a/Sources/CLI/System/Property/PropertyList.swift +++ b/Sources/ContainerCommands/System/Property/PropertyList.swift @@ -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) } diff --git a/Sources/CLI/System/Property/PropertySet.swift b/Sources/ContainerCommands/System/Property/PropertySet.swift similarity index 94% rename from Sources/CLI/System/Property/PropertySet.swift rename to Sources/ContainerCommands/System/Property/PropertySet.swift index 4c3deefa..490de221 100644 --- a/Sources/CLI/System/Property/PropertySet.swift +++ b/Sources/ContainerCommands/System/Property/PropertySet.swift @@ -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)") } diff --git a/Sources/CLI/System/SystemCommand.swift b/Sources/ContainerCommands/System/SystemCommand.swift similarity index 100% rename from Sources/CLI/System/SystemCommand.swift rename to Sources/ContainerCommands/System/SystemCommand.swift diff --git a/Sources/CLI/System/SystemDNS.swift b/Sources/ContainerCommands/System/SystemDNS.swift similarity index 100% rename from Sources/CLI/System/SystemDNS.swift rename to Sources/ContainerCommands/System/SystemDNS.swift diff --git a/Sources/CLI/System/SystemKernel.swift b/Sources/ContainerCommands/System/SystemKernel.swift similarity index 100% rename from Sources/CLI/System/SystemKernel.swift rename to Sources/ContainerCommands/System/SystemKernel.swift diff --git a/Sources/CLI/System/SystemLogs.swift b/Sources/ContainerCommands/System/SystemLogs.swift similarity index 100% rename from Sources/CLI/System/SystemLogs.swift rename to Sources/ContainerCommands/System/SystemLogs.swift diff --git a/Sources/CLI/System/SystemProperty.swift b/Sources/ContainerCommands/System/SystemProperty.swift similarity index 100% rename from Sources/CLI/System/SystemProperty.swift rename to Sources/ContainerCommands/System/SystemProperty.swift diff --git a/Sources/CLI/System/SystemStart.swift b/Sources/ContainerCommands/System/SystemStart.swift similarity index 100% rename from Sources/CLI/System/SystemStart.swift rename to Sources/ContainerCommands/System/SystemStart.swift diff --git a/Sources/CLI/System/SystemStatus.swift b/Sources/ContainerCommands/System/SystemStatus.swift similarity index 100% rename from Sources/CLI/System/SystemStatus.swift rename to Sources/ContainerCommands/System/SystemStatus.swift diff --git a/Sources/CLI/System/SystemStop.swift b/Sources/ContainerCommands/System/SystemStop.swift similarity index 100% rename from Sources/CLI/System/SystemStop.swift rename to Sources/ContainerCommands/System/SystemStop.swift diff --git a/Sources/CLI/Volume/VolumeCommand.swift b/Sources/ContainerCommands/Volume/VolumeCommand.swift similarity index 100% rename from Sources/CLI/Volume/VolumeCommand.swift rename to Sources/ContainerCommands/Volume/VolumeCommand.swift diff --git a/Sources/CLI/Volume/VolumeCreate.swift b/Sources/ContainerCommands/Volume/VolumeCreate.swift similarity index 100% rename from Sources/CLI/Volume/VolumeCreate.swift rename to Sources/ContainerCommands/Volume/VolumeCreate.swift diff --git a/Sources/CLI/Volume/VolumeDelete.swift b/Sources/ContainerCommands/Volume/VolumeDelete.swift similarity index 100% rename from Sources/CLI/Volume/VolumeDelete.swift rename to Sources/ContainerCommands/Volume/VolumeDelete.swift diff --git a/Sources/CLI/Volume/VolumeInspect.swift b/Sources/ContainerCommands/Volume/VolumeInspect.swift similarity index 100% rename from Sources/CLI/Volume/VolumeInspect.swift rename to Sources/ContainerCommands/Volume/VolumeInspect.swift diff --git a/Sources/CLI/Volume/VolumeList.swift b/Sources/ContainerCommands/Volume/VolumeList.swift similarity index 100% rename from Sources/CLI/Volume/VolumeList.swift rename to Sources/ContainerCommands/Volume/VolumeList.swift