feat: Working on moving commands to cli-client

This commit is contained in:
2024-12-12 07:46:26 -05:00
parent 8302ede99e
commit ce6eb3ec2f
13 changed files with 134 additions and 199 deletions

View File

@@ -1,4 +1,6 @@
import ArgumentParser
import CliClient
import Dependencies
struct DecryptCommand: AsyncParsableCommand {
@@ -17,15 +19,23 @@ struct DecryptCommand: AsyncParsableCommand {
)
var output: String?
// FIX:
mutating func run() async throws {
@Dependency(\.cliClient) var cliClient
var args = ["decrypt"]
if let output {
args.append(contentsOf: ["--output", output])
}
try await runVault(
commandName: Self.commandName,
options: options,
args
try await cliClient.runVaultCommand(
options.vaultOptions(arguments: args, configuration: nil)
)
// try await runVault(
// commandName: Self.commandName,
// options: options,
// args
// )
}
}