provisioning/reflection/handlers/validate-ops-contract.nu
2026-05-12 02:40:14 +01:00

26 lines
808 B
Text

#!/usr/bin/env nu
use lib/runner.nu [run-reflection-mode, print-summary-and-exit]
def main [
--workspace: string,
--nats-url: string = "nats://127.0.0.1:4222",
--nats-creds-path: string = "",
--provisioning-root: string = "",
]: nothing -> nothing {
if ($workspace | is-empty) {
error make { msg: "--workspace is required" }
}
let root = if not ($provisioning_root | is-empty) {
$provisioning_root
} else {
$env | get -o PROVISIONING_ROOT | default ($env.FILE_PWD | path join ".." | path expand)
}
let results = run-reflection-mode $"($root)/reflection/modes/validate-ops-contract.ncl" {
workspace: $workspace,
nats_url: $nats_url,
nats_creds_path: $nats_creds_path,
} $root
print-summary-and-exit $results
}