feat: Working on cli client and tests
Some checks failed
CI / Run Tests (push) Failing after 3m7s

This commit is contained in:
2024-11-17 22:23:44 -05:00
parent 6472d3cd1e
commit ce18c44363
12 changed files with 287 additions and 73 deletions

View File

@@ -13,11 +13,11 @@ extension Application {
static let configuration: CommandConfiguration = .init(
commandName: "debug",
abstract: "Debug the environment variables."
abstract: "Debug the environment variables and command line arguments."
)
@OptionGroup
var shared: SharedOptions
var options: SharedOptions
@Flag(
name: [.customLong("show-password")],
@@ -31,7 +31,7 @@ extension Application {
print("--------------------------")
print("Running debug command...")
if let envFile = shared.envFile {
if let envFile = options.envFile {
print("Reading env file: \(envFile)")
print("--------------------------")
} else {
@@ -41,12 +41,12 @@ extension Application {
print("Loading EnvVars")
print("--------------------------")
let envVars = try await client.makeEnvVars(shared.envVarsRequest(logger: logger))
let envVars = try await client.makeEnvVars(options.envVarsRequest(logger: logger))
printEnvVars(envVars: envVars, showPassword: showPassword)
print("--------------------------")
if let logLevel = shared.logLevel, let level = logLevel() {
print("Log Level option: \(level)")
if let logLevel = options.logLevel {
print("Log Level option: \(logLevel)")
print("--------------------------")
} else {
print("Log Level option: nil")