Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ let package = Package(
"ContainerClient",
"ContainerCommands",
],
path: "Sources/ExecutableCLI"
path: "Sources/CLI"
),
.target(
name: "ContainerCommands",
Expand All @@ -90,7 +90,7 @@ let package = Package(
"ContainerVersion",
"TerminalProgress",
],
path: "Sources/CLI"
path: "Sources/ContainerCommands"
),
.executableTarget(
name: "container-apiserver",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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)")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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)")
}
Expand Down