feat: Moves logging setup and generate-json for the create command to cli-client module.
This commit is contained in:
@@ -29,7 +29,8 @@ struct DecryptCommand: AsyncParsableCommand {
|
||||
}
|
||||
|
||||
try await cliClient.runVaultCommand(
|
||||
options.vaultOptions(arguments: args, configuration: nil)
|
||||
options.vaultOptions(arguments: args, configuration: nil),
|
||||
logging: options.loggingOptions(commandName: Self.commandName)
|
||||
)
|
||||
|
||||
// try await runVault(
|
||||
|
||||
@@ -28,7 +28,8 @@ struct EncryptCommand: AsyncParsableCommand {
|
||||
args.append(contentsOf: ["--output", output])
|
||||
}
|
||||
try await cliClient.runVaultCommand(
|
||||
options.vaultOptions(arguments: args, configuration: nil)
|
||||
options.vaultOptions(arguments: args, configuration: nil),
|
||||
logging: options.loggingOptions(commandName: Self.commandName)
|
||||
)
|
||||
|
||||
// try await runVault(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import ArgumentParser
|
||||
import CliClient
|
||||
|
||||
// Holds the common options for vault commands, as they all share the
|
||||
// same structure.
|
||||
@@ -29,3 +30,9 @@ struct VaultOptions: ParsableArguments {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension VaultOptions {
|
||||
func loggingOptions(commandName: String) -> CliClient.LoggingOptions {
|
||||
globals.loggingOptions(commandName: commandName)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user