@runa-ai/runa-cli 0.5.72 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-V66FAQXB.js +1719 -0
- package/dist/cache-N7WNPEYF.js +111 -0
- package/dist/check-LOMVIRHX.js +12 -0
- package/dist/chunk-2APB25TT.js +442 -0
- package/dist/chunk-3FDQW524.js +544 -0
- package/dist/chunk-3WDV32GA.js +33 -0
- package/dist/chunk-5FT3F36G.js +59 -0
- package/dist/chunk-5NKWR4FF.js +254 -0
- package/dist/chunk-644FVGIQ.js +194 -0
- package/dist/chunk-6AALH2ED.js +121 -0
- package/dist/chunk-6FAU4IGR.js +63 -0
- package/dist/chunk-6Y3LAUGL.js +35 -0
- package/dist/chunk-7B5C6U2K.js +274 -0
- package/dist/chunk-AAIE4F2U.js +140 -0
- package/dist/chunk-AIP6MR42.js +12 -0
- package/dist/chunk-CCKG5R4Y.js +59 -0
- package/dist/chunk-DRSUEMAK.js +123 -0
- package/dist/chunk-FHG3ILE4.js +2011 -0
- package/dist/chunk-H2AHNI75.js +31 -0
- package/dist/chunk-HD74F6W2.js +460 -0
- package/dist/chunk-HKUWEGUX.js +36 -0
- package/dist/chunk-IBVVGH6X.js +33 -0
- package/dist/chunk-II7VYQEM.js +179 -0
- package/dist/chunk-JMJP4A47.js +204 -0
- package/dist/chunk-JQXOVCOP.js +574 -0
- package/dist/chunk-KE6QJBZG.js +41 -0
- package/dist/chunk-KWX3JHCY.js +85 -0
- package/dist/chunk-MXRWBNIY.js +74 -0
- package/dist/chunk-NPSRD26F.js +149 -0
- package/dist/chunk-QDF7QXBL.js +67 -0
- package/dist/chunk-QM53IQHM.js +209 -0
- package/dist/chunk-RZLYEO4U.js +219 -0
- package/dist/chunk-SGJG3BKD.js +351 -0
- package/dist/chunk-TYIAD6SB.js +74 -0
- package/dist/chunk-UWWSAPDR.js +31 -0
- package/dist/chunk-VM3IWOT5.js +458 -0
- package/dist/chunk-VRXHCR5K.js +42 -0
- package/dist/chunk-WJXC4MVY.js +75 -0
- package/dist/chunk-XDCHRVE3.js +215 -0
- package/dist/chunk-Z4Z5DNW4.js +1196 -0
- package/dist/chunk-ZZOXM6Q4.js +8 -0
- package/dist/ci-ZWRVWNFX.js +9298 -0
- package/dist/cli/contract-output.d.ts +1 -0
- package/dist/cli/index.d.ts +7 -1
- package/dist/cli/requested-command.d.ts +8 -0
- package/dist/cli-2JNBJUBB.js +704 -0
- package/dist/commands/build/actors/db-sync.d.ts +2 -0
- package/dist/commands/build/actors/static-checks.d.ts +7 -6
- package/dist/commands/build/actors/validate.d.ts +2 -0
- package/dist/commands/build/contract.d.ts +30 -30
- package/dist/commands/build/machine-dry-run.d.ts +3 -0
- package/dist/commands/build/machine-e2e-meta.d.ts +120 -0
- package/dist/commands/build/machine.d.ts +22 -22
- package/dist/commands/build/types.d.ts +2 -4
- package/dist/commands/check/commands/check.d.ts +8 -3
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts +9 -6
- package/dist/commands/ci/machine/actors/db/schema-canonical-diff.d.ts +55 -0
- package/dist/commands/ci/machine/actors/db/schema-stats.d.ts +11 -0
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +9 -1
- package/dist/commands/ci/machine/contract.d.ts +26 -26
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts +1 -5
- package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts +5 -0
- package/dist/commands/ci/machine/formatters/sections/index.d.ts +2 -2
- package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts +3 -3
- package/dist/commands/ci/machine/machine-execution-helpers.d.ts +40 -0
- package/dist/commands/ci/machine/machine-state-helpers.d.ts +14 -0
- package/dist/commands/ci/machine/machine.d.ts +12 -12
- package/dist/commands/ci/machine/types.d.ts +2 -5
- package/dist/commands/ci/utils/ci-summary.d.ts +15 -15
- package/dist/commands/ci/utils/execa-helpers.d.ts +2 -0
- package/dist/commands/db/apply/actors/idempotent-actors.d.ts +34 -0
- package/dist/commands/db/apply/actors/lock-actors.d.ts +16 -0
- package/dist/commands/db/apply/actors/pg-schema-diff-actors.d.ts +31 -0
- package/dist/commands/db/apply/actors/seed-actors.d.ts +11 -0
- package/dist/commands/db/apply/actors/shared.d.ts +9 -0
- package/dist/commands/db/apply/actors.d.ts +16 -65
- package/dist/commands/db/apply/contract.d.ts +8 -1
- package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts +3 -4
- package/dist/commands/db/apply/helpers/data-integrity-verifier.d.ts +37 -0
- package/dist/commands/db/apply/helpers/fresh-db-handler.d.ts +34 -0
- package/dist/commands/db/apply/helpers/hazard-handler.d.ts +60 -0
- package/dist/commands/db/apply/helpers/idempotent-object-registry.d.ts +96 -0
- package/dist/commands/db/apply/helpers/idempotent-transaction.d.ts +20 -0
- package/dist/commands/db/apply/helpers/index.d.ts +6 -0
- package/dist/commands/db/apply/helpers/partition-validator.d.ts +2 -15
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts +18 -162
- package/dist/commands/db/apply/helpers/pg-schema-diff-patterns.d.ts +55 -0
- package/dist/commands/db/apply/helpers/pg-schema-diff-version.d.ts +50 -0
- package/dist/commands/db/apply/helpers/plan-validator.d.ts +4 -10
- package/dist/commands/db/apply/helpers/rbac-password-manager.d.ts +34 -0
- package/dist/commands/db/apply/helpers/retry-logic.d.ts +16 -2
- package/dist/commands/db/apply/helpers/shadow-db-manager.d.ts +1 -1
- package/dist/commands/db/apply/helpers/sql-utils.d.ts +26 -0
- package/dist/commands/db/apply/machine.d.ts +52 -1
- package/dist/commands/db/commands/db-apply.d.ts +18 -0
- package/dist/commands/db/commands/db-sync/boundary-classifier.d.ts +21 -0
- package/dist/commands/db/commands/db-sync/error-classifier.d.ts +9 -0
- package/dist/commands/db/commands/db-sync/plan-hazard-analyzer.d.ts +13 -0
- package/dist/commands/db/commands/db-sync/risk-reporter.d.ts +19 -0
- package/dist/commands/db/commands/db-sync/sql-parser.d.ts +25 -0
- package/dist/commands/db/commands/db-sync/types.d.ts +47 -0
- package/dist/commands/db/commands/db-sync.d.ts +14 -0
- package/dist/commands/db/sync/contract.d.ts +6 -2
- package/dist/commands/db/sync/machine.d.ts +2 -1
- package/dist/commands/db/types.d.ts +2 -0
- package/dist/commands/db/utils/boundary-policy/rule-compiler.d.ts +11 -0
- package/dist/commands/db/utils/boundary-policy/types.d.ts +105 -0
- package/dist/commands/db/utils/boundary-policy/validation.d.ts +20 -0
- package/dist/commands/db/utils/boundary-policy-runtime.d.ts +28 -0
- package/dist/commands/db/utils/boundary-policy.d.ts +5 -0
- package/dist/commands/db/utils/idempotent-risk-context.d.ts +29 -0
- package/dist/commands/db/utils/preflight-check.d.ts +14 -0
- package/dist/commands/db/utils/preflight-checks/domain-naming-checks.d.ts +106 -0
- package/dist/commands/db/utils/preflight-checks/orphan-checks.d.ts +36 -0
- package/dist/commands/db/utils/preflight-checks/schema-risk-checks.d.ts +22 -0
- package/dist/commands/db/utils/preflight-checks/supabase-checks.d.ts +55 -0
- package/dist/commands/db/utils/risk-detector-loader.d.ts +8 -0
- package/dist/commands/db/utils/schema-precheck-budget.d.ts +17 -0
- package/dist/commands/db/utils/sql-boundary-parser.d.ts +12 -0
- package/dist/commands/db/utils/sql-file-collector.d.ts +8 -0
- package/dist/commands/db/utils/sql-filename-parser.d.ts +20 -0
- package/dist/commands/db/utils/sql-table-extractor-ast.d.ts +19 -0
- package/dist/commands/db/utils/sql-table-extractor-regex.d.ts +50 -0
- package/dist/commands/db/utils/sql-table-extractor-rls.d.ts +13 -0
- package/dist/commands/db/utils/sql-table-extractor.d.ts +79 -1
- package/dist/commands/db/utils/table-registry-introspection.d.ts +68 -0
- package/dist/commands/db/utils/table-registry.d.ts +3 -38
- package/dist/commands/dev/actors/app-lifecycle.d.ts +18 -0
- package/dist/commands/dev/actors/index.d.ts +12 -2
- package/dist/commands/dev/actors/process-check.d.ts +12 -0
- package/dist/commands/dev/actors/shared.d.ts +15 -0
- package/dist/commands/dev/actors/tables-manifest.d.ts +16 -0
- package/dist/commands/dev/contract.d.ts +3 -3
- package/dist/commands/dev/guards.d.ts +24 -0
- package/dist/commands/dev/machine.d.ts +27 -32
- package/dist/commands/dev/types.d.ts +2 -0
- package/dist/commands/doctor.d.ts +9 -0
- package/dist/commands/env/commands/env-pull/auth.d.ts +13 -0
- package/dist/commands/env/commands/env-pull/dotenv-files.d.ts +14 -0
- package/dist/commands/env/commands/env-pull/security.d.ts +12 -0
- package/dist/commands/env/commands/env-pull/service.d.ts +8 -0
- package/dist/commands/env/commands/env-pull/shared.d.ts +79 -0
- package/dist/commands/env/commands/setup/types.d.ts +1 -1
- package/dist/commands/env/constants/local-supabase.d.ts +2 -0
- package/dist/commands/inject-test-attrs/defaults.d.ts +9 -0
- package/dist/commands/template-check/contract.d.ts +6 -6
- package/dist/commands/template-check/machine.d.ts +2 -2
- package/dist/commands/template-check/types.d.ts +0 -4
- package/dist/commands/template-check/utils/diff-analyzer.d.ts +0 -4
- package/dist/commands/utils/machine-state-logging.d.ts +20 -0
- package/dist/commands/utils/repo-root.d.ts +2 -0
- package/dist/config/env.d.ts +4 -4
- package/dist/config-loader-GT3HAQ7U.js +7 -0
- package/dist/db-XULCILOU.js +14137 -0
- package/dist/dev-5YXNPTCJ.js +992 -0
- package/dist/doctor-MZLOA53G.js +44 -0
- package/dist/env-HMMRSYCI.js +7 -0
- package/dist/env-SS66PZ4B.js +2623 -0
- package/dist/env-files-2UIUYLLR.js +8 -0
- package/dist/error-handler-HEXBRNVV.js +460 -0
- package/dist/hotfix-YA3DGLOM.js +1477 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +48 -42995
- package/dist/init-ZIL6LRFO.js +631 -0
- package/dist/inject-test-attrs-P44BVTQS.js +23 -0
- package/dist/internal/machines/snapshot-helpers.d.ts +6 -0
- package/dist/lib/sql-comment-utils.d.ts +25 -0
- package/dist/license-OB7GVJQ2.js +468 -0
- package/dist/link-VSNDVZZD.js +59 -0
- package/dist/manifest-TMFLESHW.js +19 -0
- package/dist/prepare-32DOVHTE.js +250 -0
- package/dist/risk-detector-4U6ZJ2G5.js +6 -0
- package/dist/risk-detector-core-TK4OAI3N.js +166 -0
- package/dist/risk-detector-plpgsql-HWKS4OLR.js +1886 -0
- package/dist/sdk-XK6HQU7S.js +348 -0
- package/dist/services-7VK5KZTO.js +177 -0
- package/dist/session-SFW5QSXZ.js +142 -0
- package/dist/signal-handler-DO3OANW5.js +6 -0
- package/dist/status-UTKS63AB.js +94 -0
- package/dist/telemetry-P56UBLZ2.js +93 -0
- package/dist/template-check-3P4HZXVY.js +1944 -0
- package/dist/test-V4KQL574.js +650 -0
- package/dist/test-gen-FS4CEY3P.js +88 -0
- package/dist/ui-RJAMCWUI.js +331 -0
- package/dist/upgrade-NUK3ZBCL.js +637 -0
- package/dist/utils/config-loader.d.ts +0 -3
- package/dist/validate-CAAW4Y44.js +54 -0
- package/dist/validators/risk-detector-content-risks.d.ts +13 -0
- package/dist/validators/risk-detector-core.d.ts +25 -0
- package/dist/validators/risk-detector-patterns.d.ts +15 -0
- package/dist/validators/risk-detector-plpgsql-expression-resolver.d.ts +22 -0
- package/dist/validators/risk-detector-plpgsql-parser.d.ts +5 -0
- package/dist/validators/risk-detector-plpgsql-tokenizer.d.ts +18 -0
- package/dist/validators/risk-detector-plpgsql.d.ts +9 -0
- package/dist/validators/risk-detector-text-utils.d.ts +6 -0
- package/dist/validators/risk-detector-types.d.ts +16 -0
- package/dist/validators/risk-detector.d.ts +7 -26
- package/dist/vuln-check-2W7N5TA2.js +121 -0
- package/dist/vuln-checker-IQJ56RUV.js +3223 -0
- package/dist/watch-PNTKZYFB.js +911 -0
- package/dist/workflow-H75N4BXX.js +897 -0
- package/package.json +5 -2
- package/dist/cli/contract-mode.d.ts.map +0 -1
- package/dist/cli/contract-output.d.ts.map +0 -1
- package/dist/cli/early-flags.d.ts.map +0 -1
- package/dist/cli/error-handler.d.ts.map +0 -1
- package/dist/cli/exec.d.ts.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/json-output.d.ts.map +0 -1
- package/dist/cli/non-interactive.d.ts.map +0 -1
- package/dist/cli/output-format.d.ts.map +0 -1
- package/dist/cli/signal-handler.d.ts.map +0 -1
- package/dist/commands/build/actors/build.d.ts.map +0 -1
- package/dist/commands/build/actors/clean.d.ts.map +0 -1
- package/dist/commands/build/actors/db-sync.d.ts.map +0 -1
- package/dist/commands/build/actors/index.d.ts.map +0 -1
- package/dist/commands/build/actors/manifest.d.ts.map +0 -1
- package/dist/commands/build/actors/setup.d.ts.map +0 -1
- package/dist/commands/build/actors/static-checks.d.ts.map +0 -1
- package/dist/commands/build/actors/validate.d.ts.map +0 -1
- package/dist/commands/build/commands/build.d.ts.map +0 -1
- package/dist/commands/build/contract.d.ts.map +0 -1
- package/dist/commands/build/guards.d.ts.map +0 -1
- package/dist/commands/build/index.d.ts.map +0 -1
- package/dist/commands/build/machine.d.ts.map +0 -1
- package/dist/commands/build/types.d.ts.map +0 -1
- package/dist/commands/cache.d.ts.map +0 -1
- package/dist/commands/check/commands/check.d.ts.map +0 -1
- package/dist/commands/check/index.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-checks.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-layer-content.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-pr-capabilities.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-apply.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-github.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-types.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-utils.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-workflow.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-resolvers.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-static.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-supabase-local.d.ts.map +0 -1
- package/dist/commands/ci/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/app-build.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/app-start.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/build-and-playwright.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/playwright-install.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/static-checks.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/apply-seeds.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/pgtap-install.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/production-preview.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/pull-production.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/reset.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/schema-stats.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/setup-roles.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/github.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/summary.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/local.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/pr-common.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/pr-local.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/capabilities.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/run-layers.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/ci-local.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/ci-pr.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/machine-runner.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/runtime-env.d.ts.map +0 -1
- package/dist/commands/ci/machine/contract.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/github-comment-types.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/github-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/progress-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/summary.d.ts.map +0 -1
- package/dist/commands/ci/machine/guards.d.ts.map +0 -1
- package/dist/commands/ci/machine/helpers.d.ts.map +0 -1
- package/dist/commands/ci/machine/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/machine.d.ts.map +0 -1
- package/dist/commands/ci/machine/types.d.ts.map +0 -1
- package/dist/commands/ci/utils/ai-report.d.ts.map +0 -1
- package/dist/commands/ci/utils/app-process.d.ts.map +0 -1
- package/dist/commands/ci/utils/app-runtime.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-config.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-env-schema.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-logging.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-summary.d.ts.map +0 -1
- package/dist/commands/ci/utils/config-readers.d.ts.map +0 -1
- package/dist/commands/ci/utils/db-url-utils.d.ts.map +0 -1
- package/dist/commands/ci/utils/e2e-auth-setup.d.ts.map +0 -1
- package/dist/commands/ci/utils/env-security.d.ts.map +0 -1
- package/dist/commands/ci/utils/execa-helpers.d.ts.map +0 -1
- package/dist/commands/ci/utils/exit-code-computation.d.ts.map +0 -1
- package/dist/commands/ci/utils/github-api.d.ts.map +0 -1
- package/dist/commands/ci/utils/github.d.ts.map +0 -1
- package/dist/commands/ci/utils/index.d.ts.map +0 -1
- package/dist/commands/ci/utils/pgtap-installer.d.ts.map +0 -1
- package/dist/commands/ci/utils/rls-verification.d.ts.map +0 -1
- package/dist/commands/ci/utils/schema-operations.d.ts.map +0 -1
- package/dist/commands/ci/utils/seed-operations.d.ts.map +0 -1
- package/dist/commands/ci/utils/test-parallel.d.ts.map +0 -1
- package/dist/commands/ci/utils/timestamp-invariants.d.ts.map +0 -1
- package/dist/commands/ci/utils/workflow-idempotency.d.ts.map +0 -1
- package/dist/commands/db/apply/actors.d.ts.map +0 -1
- package/dist/commands/db/apply/contract.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/advisory-lock.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/index.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-acl-cleaner.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-prefilter.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-validator.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/plan-validator.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/retry-logic.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/shadow-db-manager.d.ts.map +0 -1
- package/dist/commands/db/apply/index.d.ts.map +0 -1
- package/dist/commands/db/apply/machine.d.ts.map +0 -1
- package/dist/commands/db/commands/db-apply.d.ts.map +0 -1
- package/dist/commands/db/commands/db-audit.d.ts.map +0 -1
- package/dist/commands/db/commands/db-backup.d.ts.map +0 -1
- package/dist/commands/db/commands/db-cleanup.d.ts.map +0 -1
- package/dist/commands/db/commands/db-derive-role-passwords.d.ts.map +0 -1
- package/dist/commands/db/commands/db-derive-urls.d.ts.map +0 -1
- package/dist/commands/db/commands/db-diagram.d.ts.map +0 -1
- package/dist/commands/db/commands/db-drizzle.d.ts.map +0 -1
- package/dist/commands/db/commands/db-extension.d.ts.map +0 -1
- package/dist/commands/db/commands/db-generate-password.d.ts.map +0 -1
- package/dist/commands/db/commands/db-lifecycle.d.ts.map +0 -1
- package/dist/commands/db/commands/db-rollback.d.ts.map +0 -1
- package/dist/commands/db/commands/db-schema.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed-metadata.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed-verify.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed.d.ts.map +0 -1
- package/dist/commands/db/commands/db-snapshot.d.ts.map +0 -1
- package/dist/commands/db/commands/db-stack.d.ts.map +0 -1
- package/dist/commands/db/commands/db-stats.d.ts.map +0 -1
- package/dist/commands/db/commands/db-sync.d.ts.map +0 -1
- package/dist/commands/db/commands/db-test.d.ts.map +0 -1
- package/dist/commands/db/constants.d.ts.map +0 -1
- package/dist/commands/db/extension-registry.d.ts.map +0 -1
- package/dist/commands/db/index.d.ts.map +0 -1
- package/dist/commands/db/preflight/actors.d.ts.map +0 -1
- package/dist/commands/db/preflight/contract.d.ts.map +0 -1
- package/dist/commands/db/preflight/index.d.ts.map +0 -1
- package/dist/commands/db/sync/actors.d.ts.map +0 -1
- package/dist/commands/db/sync/contract.d.ts.map +0 -1
- package/dist/commands/db/sync/index.d.ts.map +0 -1
- package/dist/commands/db/sync/machine.d.ts.map +0 -1
- package/dist/commands/db/types.d.ts.map +0 -1
- package/dist/commands/db/utils/db-target.d.ts.map +0 -1
- package/dist/commands/db/utils/db-url-builder.d.ts.map +0 -1
- package/dist/commands/db/utils/error-handlers.d.ts.map +0 -1
- package/dist/commands/db/utils/import-impact-analyzer.d.ts.map +0 -1
- package/dist/commands/db/utils/preflight-check.d.ts.map +0 -1
- package/dist/commands/db/utils/psql.d.ts.map +0 -1
- package/dist/commands/db/utils/schema-detector.d.ts.map +0 -1
- package/dist/commands/db/utils/schema-sync.d.ts.map +0 -1
- package/dist/commands/db/utils/script-runner.d.ts.map +0 -1
- package/dist/commands/db/utils/seed-manager.d.ts.map +0 -1
- package/dist/commands/db/utils/semantic-mapper.d.ts.map +0 -1
- package/dist/commands/db/utils/sql-table-extractor.d.ts.map +0 -1
- package/dist/commands/db/utils/stack-detector.d.ts.map +0 -1
- package/dist/commands/db/utils/table-registry.d.ts.map +0 -1
- package/dist/commands/db/utils/table-source-classifier.d.ts.map +0 -1
- package/dist/commands/dev/actors/index.d.ts.map +0 -1
- package/dist/commands/dev/commands/dev.d.ts.map +0 -1
- package/dist/commands/dev/contract.d.ts.map +0 -1
- package/dist/commands/dev/guards.d.ts.map +0 -1
- package/dist/commands/dev/helpers/stale-process-detector.d.ts.map +0 -1
- package/dist/commands/dev/machine.d.ts.map +0 -1
- package/dist/commands/dev/types.d.ts.map +0 -1
- package/dist/commands/env/commands/env-check.d.ts.map +0 -1
- package/dist/commands/env/commands/env-encrypt.d.ts.map +0 -1
- package/dist/commands/env/commands/env-pull.d.ts.map +0 -1
- package/dist/commands/env/commands/env-setup.d.ts.map +0 -1
- package/dist/commands/env/commands/env-sync.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/action.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/auth.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/file-export.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/github-api.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/helpers.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/index.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/parsers.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/prompts.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/supabase-api.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/types.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/vercel-api.d.ts.map +0 -1
- package/dist/commands/env/constants/local-supabase.d.ts.map +0 -1
- package/dist/commands/env/index.d.ts.map +0 -1
- package/dist/commands/hotfix/actors.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-complete.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-create.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-deploy.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-status.d.ts.map +0 -1
- package/dist/commands/hotfix/contract.d.ts.map +0 -1
- package/dist/commands/hotfix/index.d.ts.map +0 -1
- package/dist/commands/hotfix/machine.d.ts.map +0 -1
- package/dist/commands/hotfix/metadata.d.ts.map +0 -1
- package/dist/commands/hotfix/utils/hotfix-machine-helper.d.ts.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/action.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/commands/inject-test-attrs.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/contract.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/detection-diagnostics.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/formatter.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/index.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/manifest-generator.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/processor-utils.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/processor.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/types.d.ts.map +0 -1
- package/dist/commands/link.d.ts.map +0 -1
- package/dist/commands/manifest/index.d.ts.map +0 -1
- package/dist/commands/prepare/commands/prepare.d.ts.map +0 -1
- package/dist/commands/prepare/index.d.ts.map +0 -1
- package/dist/commands/sdk/commands/publish.d.ts.map +0 -1
- package/dist/commands/sdk/index.d.ts.map +0 -1
- package/dist/commands/services/index.d.ts.map +0 -1
- package/dist/commands/session/index.d.ts.map +0 -1
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/commands/template-check/actors/compare.d.ts.map +0 -1
- package/dist/commands/template-check/actors/discover.d.ts.map +0 -1
- package/dist/commands/template-check/actors/index.d.ts.map +0 -1
- package/dist/commands/template-check/actors/report.d.ts.map +0 -1
- package/dist/commands/template-check/commands/template-check.d.ts.map +0 -1
- package/dist/commands/template-check/config.d.ts.map +0 -1
- package/dist/commands/template-check/contract.d.ts.map +0 -1
- package/dist/commands/template-check/index.d.ts.map +0 -1
- package/dist/commands/template-check/machine.d.ts.map +0 -1
- package/dist/commands/template-check/types.d.ts.map +0 -1
- package/dist/commands/template-check/utils/diff-analyzer.d.ts.map +0 -1
- package/dist/commands/template-check/utils/normalizer.d.ts.map +0 -1
- package/dist/commands/template-check/utils/path-mapping.d.ts.map +0 -1
- package/dist/commands/test/commands/test-db.d.ts.map +0 -1
- package/dist/commands/test/commands/test-e2e.d.ts.map +0 -1
- package/dist/commands/test/commands/test-fast.d.ts.map +0 -1
- package/dist/commands/test/commands/test-integration.d.ts.map +0 -1
- package/dist/commands/test/commands/test-layer.d.ts.map +0 -1
- package/dist/commands/test/commands/test-owasp-generate.d.ts.map +0 -1
- package/dist/commands/test/commands/test-service.d.ts.map +0 -1
- package/dist/commands/test/commands/test-static.d.ts.map +0 -1
- package/dist/commands/test/commands/test.d.ts.map +0 -1
- package/dist/commands/test/index.d.ts.map +0 -1
- package/dist/commands/test-gen.d.ts.map +0 -1
- package/dist/commands/ui.d.ts.map +0 -1
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/validate.d.ts.map +0 -1
- package/dist/commands/vuln-check.d.ts.map +0 -1
- package/dist/commands/watch.d.ts.map +0 -1
- package/dist/commands/workflow/commands/deploy-production.d.ts.map +0 -1
- package/dist/commands/workflow/commands/final-status.d.ts.map +0 -1
- package/dist/commands/workflow/commands/log.d.ts.map +0 -1
- package/dist/commands/workflow/commands/notify.d.ts.map +0 -1
- package/dist/commands/workflow/commands/paths.d.ts.map +0 -1
- package/dist/commands/workflow/commands/sync.d.ts.map +0 -1
- package/dist/commands/workflow/commands/validate.d.ts.map +0 -1
- package/dist/commands/workflow/commands/verify-credentials.d.ts.map +0 -1
- package/dist/commands/workflow/index.d.ts.map +0 -1
- package/dist/commands/workflow/types.d.ts.map +0 -1
- package/dist/config/env-files.d.ts.map +0 -1
- package/dist/config/env.d.ts.map +0 -1
- package/dist/constants/versions.d.ts.map +0 -1
- package/dist/contracts/envelope.d.ts.map +0 -1
- package/dist/errors/catalog.d.ts.map +0 -1
- package/dist/errors/exit-codes.d.ts.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/incremental/affected-tests.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/internal/machines/index.d.ts.map +0 -1
- package/dist/internal/machines/machine-runner.d.ts.map +0 -1
- package/dist/internal/machines/snapshot-helpers.d.ts.map +0 -1
- package/dist/internal/machines/types.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/dependency-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/rls-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/secret-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/typescript-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/config/loader.d.ts.map +0 -1
- package/dist/internal/vuln-checker/constants.d.ts.map +0 -1
- package/dist/internal/vuln-checker/ignore/matcher.d.ts.map +0 -1
- package/dist/internal/vuln-checker/index.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/console-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/json-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/markdown-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/sarif-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/security/path-validation.d.ts.map +0 -1
- package/dist/internal/vuln-checker/types.d.ts.map +0 -1
- package/dist/notifiers/desktop-notifier.d.ts.map +0 -1
- package/dist/ui/components/db-panel.d.ts.map +0 -1
- package/dist/ui/components/status-bar.d.ts.map +0 -1
- package/dist/ui/components/test-panel.d.ts.map +0 -1
- package/dist/ui/dashboard.d.ts.map +0 -1
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/utils/config-loader.d.ts.map +0 -1
- package/dist/utils/config-updater.d.ts.map +0 -1
- package/dist/utils/diagnostics.d.ts.map +0 -1
- package/dist/utils/dotenvx.d.ts.map +0 -1
- package/dist/utils/env-local-bridge.d.ts.map +0 -1
- package/dist/utils/execution-plan.d.ts.map +0 -1
- package/dist/utils/github-output-security.d.ts.map +0 -1
- package/dist/utils/help-system.d.ts.map +0 -1
- package/dist/utils/license/admin-auth.d.ts.map +0 -1
- package/dist/utils/license/allowlist-checker.d.ts.map +0 -1
- package/dist/utils/license/ci-detector.d.ts.map +0 -1
- package/dist/utils/license/index.d.ts.map +0 -1
- package/dist/utils/license/owner-resolver.d.ts.map +0 -1
- package/dist/utils/license/types.d.ts.map +0 -1
- package/dist/utils/license/validate-owner.d.ts.map +0 -1
- package/dist/utils/path-security.d.ts.map +0 -1
- package/dist/utils/port-allocator.d.ts.map +0 -1
- package/dist/utils/secure-exec.d.ts.map +0 -1
- package/dist/utils/template-fetcher.d.ts.map +0 -1
- package/dist/utils/type-guards.d.ts.map +0 -1
- package/dist/utils/vercel-project.d.ts.map +0 -1
- package/dist/utils/workspace-detector.d.ts.map +0 -1
- package/dist/validators/risk-detector.d.ts.map +0 -1
- package/dist/validators/schema-validator.d.ts.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/dist/watchers/schema-watcher.d.ts.map +0 -1
- package/dist/watchers/test-watcher.d.ts.map +0 -1
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { enableNonInteractiveMode } from './chunk-6Y3LAUGL.js';
|
|
4
|
+
import { getRequestedCommandNameFromArgv } from './chunk-UWWSAPDR.js';
|
|
5
|
+
import { CLI_VERSION, HAS_ADMIN_COMMAND } from './chunk-AIP6MR42.js';
|
|
6
|
+
import { emitDefaultSuccessIfNeeded } from './chunk-WJXC4MVY.js';
|
|
7
|
+
import { parseOutputFormat, setOutputFormat, getOutputFormatFromEnv } from './chunk-HKUWEGUX.js';
|
|
8
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
9
|
+
import { CLIError } from '@runa-ai/runa/cli-runtime';
|
|
10
|
+
import { Command } from 'commander';
|
|
11
|
+
|
|
12
|
+
createRequire(import.meta.url);
|
|
13
|
+
|
|
14
|
+
// src/cli/index.ts
|
|
15
|
+
init_esm_shims();
|
|
16
|
+
|
|
17
|
+
// src/cli/contract-mode.ts
|
|
18
|
+
init_esm_shims();
|
|
19
|
+
function formatConsoleArgs(args) {
|
|
20
|
+
return args.map((a) => {
|
|
21
|
+
if (typeof a === "string") return a;
|
|
22
|
+
try {
|
|
23
|
+
return JSON.stringify(a);
|
|
24
|
+
} catch {
|
|
25
|
+
return String(a);
|
|
26
|
+
}
|
|
27
|
+
}).join(" ");
|
|
28
|
+
}
|
|
29
|
+
var isPatched = false;
|
|
30
|
+
function enableContractModeIO() {
|
|
31
|
+
const format = getOutputFormatFromEnv();
|
|
32
|
+
if (format !== "json") return;
|
|
33
|
+
if (isPatched) return;
|
|
34
|
+
isPatched = true;
|
|
35
|
+
console.log = (...args) => {
|
|
36
|
+
process.stderr.write(`${formatConsoleArgs(args)}
|
|
37
|
+
`);
|
|
38
|
+
};
|
|
39
|
+
console.info = (...args) => {
|
|
40
|
+
process.stderr.write(`${formatConsoleArgs(args)}
|
|
41
|
+
`);
|
|
42
|
+
};
|
|
43
|
+
console.warn = (...args) => {
|
|
44
|
+
process.stderr.write(`${formatConsoleArgs(args)}
|
|
45
|
+
`);
|
|
46
|
+
};
|
|
47
|
+
console.error = (...args) => {
|
|
48
|
+
process.stderr.write(`${formatConsoleArgs(args)}
|
|
49
|
+
`);
|
|
50
|
+
};
|
|
51
|
+
const originalStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
52
|
+
const originalStderrWrite = process.stderr.write.bind(process.stderr);
|
|
53
|
+
process.stdout.write = ((chunk, encoding, cb) => {
|
|
54
|
+
if (process.env.RUNA_JSON_EMITTING === "true") {
|
|
55
|
+
return originalStdoutWrite(chunk, encoding, cb);
|
|
56
|
+
}
|
|
57
|
+
return originalStderrWrite(chunk, encoding, cb);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// src/cli/early-flags.ts
|
|
62
|
+
init_esm_shims();
|
|
63
|
+
function parseEarlyFlags(argv) {
|
|
64
|
+
let format = getOutputFormatFromEnv();
|
|
65
|
+
let forceNonInteractive = false;
|
|
66
|
+
if (argv.includes("--json")) {
|
|
67
|
+
format = "json";
|
|
68
|
+
}
|
|
69
|
+
for (let i = 0; i < argv.length; i++) {
|
|
70
|
+
const token = argv[i];
|
|
71
|
+
if (token === "--non-interactive") {
|
|
72
|
+
forceNonInteractive = true;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (token === "--format") {
|
|
76
|
+
const value = argv[i + 1];
|
|
77
|
+
if (!value) {
|
|
78
|
+
throw new CLIError(
|
|
79
|
+
"Missing value for --format. Allowed: text, json",
|
|
80
|
+
"INVALID_OUTPUT_FORMAT",
|
|
81
|
+
["Use: --format text", "Use: --format json"],
|
|
82
|
+
void 0,
|
|
83
|
+
2
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
format = parseOutputFormat(value);
|
|
87
|
+
i++;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (token.startsWith("--format=")) {
|
|
91
|
+
const value = token.slice("--format=".length);
|
|
92
|
+
format = parseOutputFormat(value);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (argv.includes("--json")) {
|
|
96
|
+
format = "json";
|
|
97
|
+
}
|
|
98
|
+
return { format, forceNonInteractive };
|
|
99
|
+
}
|
|
100
|
+
function applyEarlyGlobalFlags(argv) {
|
|
101
|
+
try {
|
|
102
|
+
const { format, forceNonInteractive } = parseEarlyFlags(argv);
|
|
103
|
+
setOutputFormat(format);
|
|
104
|
+
if (process.env.CI === "true" || forceNonInteractive) {
|
|
105
|
+
enableNonInteractiveMode();
|
|
106
|
+
}
|
|
107
|
+
enableContractModeIO();
|
|
108
|
+
} catch (error) {
|
|
109
|
+
if (error instanceof CLIError && error.code === "INVALID_OUTPUT_FORMAT") {
|
|
110
|
+
setOutputFormat("json");
|
|
111
|
+
enableContractModeIO();
|
|
112
|
+
}
|
|
113
|
+
throw error;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// src/cli/index.ts
|
|
118
|
+
function pickCommands(commands) {
|
|
119
|
+
return commands.filter((command) => {
|
|
120
|
+
if (!(command instanceof Command)) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function normalizeRequestedCommandName(value) {
|
|
127
|
+
if (!value) return null;
|
|
128
|
+
const trimmed = value.trim();
|
|
129
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
130
|
+
}
|
|
131
|
+
function isRequestedCommand(requested, commands) {
|
|
132
|
+
if (!requested) return false;
|
|
133
|
+
return commands.includes(requested);
|
|
134
|
+
}
|
|
135
|
+
function isSessionCommand(requested) {
|
|
136
|
+
return requested?.startsWith("session:") ?? false;
|
|
137
|
+
}
|
|
138
|
+
function isTestCommand(requested) {
|
|
139
|
+
if (!requested) return false;
|
|
140
|
+
if (requested === "test" || requested === "manifest" || requested === "inject-test-attrs") {
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
return requested.startsWith("test:") || requested.startsWith("db:test:");
|
|
144
|
+
}
|
|
145
|
+
async function registerProjectLifecycleCommands(program, requested, loadAllCommands) {
|
|
146
|
+
if (!loadAllCommands && requested) {
|
|
147
|
+
if (requested === "init") {
|
|
148
|
+
const { initCommand: initCommand2 } = await import('./init-ZIL6LRFO.js');
|
|
149
|
+
program.addCommand(initCommand2);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (requested === "prepare") {
|
|
153
|
+
const { prepareCommand: prepareCommand2 } = await import('./prepare-32DOVHTE.js');
|
|
154
|
+
program.addCommand(prepareCommand2);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (requested === "upgrade") {
|
|
158
|
+
const { upgradeCommand: upgradeCommand2 } = await import('./upgrade-NUK3ZBCL.js');
|
|
159
|
+
program.addCommand(upgradeCommand2);
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (requested === "validate") {
|
|
163
|
+
const { validateCommand: validateCommand2 } = await import('./validate-CAAW4Y44.js');
|
|
164
|
+
program.addCommand(validateCommand2);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (requested === "build") {
|
|
168
|
+
const { buildCommand: buildCommand2 } = await import('./build-V66FAQXB.js');
|
|
169
|
+
program.addCommand(buildCommand2);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (requested === "dev") {
|
|
173
|
+
const { devCommand: devCommand2 } = await import('./dev-5YXNPTCJ.js');
|
|
174
|
+
program.addCommand(devCommand2);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const [
|
|
179
|
+
{ initCommand },
|
|
180
|
+
{ prepareCommand },
|
|
181
|
+
{ upgradeCommand },
|
|
182
|
+
{ validateCommand },
|
|
183
|
+
{ buildCommand },
|
|
184
|
+
{ devCommand }
|
|
185
|
+
] = await Promise.all([
|
|
186
|
+
import('./init-ZIL6LRFO.js'),
|
|
187
|
+
import('./prepare-32DOVHTE.js'),
|
|
188
|
+
import('./upgrade-NUK3ZBCL.js'),
|
|
189
|
+
import('./validate-CAAW4Y44.js'),
|
|
190
|
+
import('./build-V66FAQXB.js'),
|
|
191
|
+
import('./dev-5YXNPTCJ.js')
|
|
192
|
+
]);
|
|
193
|
+
program.addCommand(initCommand);
|
|
194
|
+
program.addCommand(prepareCommand);
|
|
195
|
+
program.addCommand(upgradeCommand);
|
|
196
|
+
program.addCommand(validateCommand);
|
|
197
|
+
program.addCommand(buildCommand);
|
|
198
|
+
program.addCommand(devCommand);
|
|
199
|
+
}
|
|
200
|
+
var TEST_GENERATION_COMMANDS = /* @__PURE__ */ new Set([
|
|
201
|
+
"db:test:update-golden",
|
|
202
|
+
"test:api:gen",
|
|
203
|
+
"test:component:gen",
|
|
204
|
+
"test:e2e:generate",
|
|
205
|
+
"test:e2e:scaffold",
|
|
206
|
+
"test:security:generate",
|
|
207
|
+
"test:unit:generate"
|
|
208
|
+
]);
|
|
209
|
+
async function addSingleTestCommand(program, requested) {
|
|
210
|
+
if (requested === "manifest") {
|
|
211
|
+
const { manifestCommand } = await import('./manifest-TMFLESHW.js');
|
|
212
|
+
program.addCommand(manifestCommand);
|
|
213
|
+
return true;
|
|
214
|
+
}
|
|
215
|
+
if (requested === "inject-test-attrs") {
|
|
216
|
+
const { injectTestAttrsCommand } = await import('./inject-test-attrs-P44BVTQS.js');
|
|
217
|
+
program.addCommand(injectTestAttrsCommand);
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
if (!TEST_GENERATION_COMMANDS.has(requested)) return false;
|
|
221
|
+
const testGenModule = await import('./test-gen-FS4CEY3P.js');
|
|
222
|
+
const commandMap = {
|
|
223
|
+
"db:test:update-golden": testGenModule.dbTestUpdateGoldenCommand,
|
|
224
|
+
"test:api:gen": testGenModule.testApiGenerateCommand,
|
|
225
|
+
"test:component:gen": testGenModule.testComponentGenerateCommand,
|
|
226
|
+
"test:e2e:generate": testGenModule.testE2EGenerateCommand,
|
|
227
|
+
"test:e2e:scaffold": testGenModule.testE2EScaffoldCommand,
|
|
228
|
+
"test:security:generate": testGenModule.testSecurityGenerateCommand,
|
|
229
|
+
"test:unit:generate": testGenModule.testUnitGenerateCommand
|
|
230
|
+
};
|
|
231
|
+
const command = commandMap[requested];
|
|
232
|
+
if (!command) return false;
|
|
233
|
+
program.addCommand(command);
|
|
234
|
+
return true;
|
|
235
|
+
}
|
|
236
|
+
async function registerFocusedTestCommand(program, requested) {
|
|
237
|
+
const testModule = await import('./test-V4KQL574.js');
|
|
238
|
+
const {
|
|
239
|
+
testCommand,
|
|
240
|
+
testDbCommand,
|
|
241
|
+
testE2ECommand,
|
|
242
|
+
testApiCommand,
|
|
243
|
+
testBrowserCommand,
|
|
244
|
+
testFastCommand,
|
|
245
|
+
testIntegrationCommand,
|
|
246
|
+
testLayer0Command,
|
|
247
|
+
testLayer1Command,
|
|
248
|
+
testLayer2Command,
|
|
249
|
+
testLayer3Command,
|
|
250
|
+
testLayer4Command,
|
|
251
|
+
// Note: Layer 5 Flow E2E was merged into Layer 1 XState Unit Tests
|
|
252
|
+
testLintCommand,
|
|
253
|
+
testLogicCommand,
|
|
254
|
+
testOWASPGenerateCommand,
|
|
255
|
+
testSchemaCommand,
|
|
256
|
+
testServiceCommand,
|
|
257
|
+
testStaticCommand
|
|
258
|
+
} = testModule;
|
|
259
|
+
const candidates = pickCommands([
|
|
260
|
+
testCommand,
|
|
261
|
+
testDbCommand,
|
|
262
|
+
testE2ECommand,
|
|
263
|
+
testFastCommand,
|
|
264
|
+
testLintCommand,
|
|
265
|
+
testLogicCommand,
|
|
266
|
+
testSchemaCommand,
|
|
267
|
+
testApiCommand,
|
|
268
|
+
testBrowserCommand,
|
|
269
|
+
testLayer0Command,
|
|
270
|
+
testLayer1Command,
|
|
271
|
+
testLayer2Command,
|
|
272
|
+
testLayer3Command,
|
|
273
|
+
testLayer4Command,
|
|
274
|
+
testStaticCommand,
|
|
275
|
+
testServiceCommand,
|
|
276
|
+
testIntegrationCommand,
|
|
277
|
+
testOWASPGenerateCommand
|
|
278
|
+
]);
|
|
279
|
+
const matched = candidates.find((command) => command.name() === requested);
|
|
280
|
+
if (matched) {
|
|
281
|
+
program.addCommand(matched);
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
if (!requested.startsWith("test:") && requested !== "test") {
|
|
285
|
+
return false;
|
|
286
|
+
}
|
|
287
|
+
for (const command of candidates) {
|
|
288
|
+
program.addCommand(command);
|
|
289
|
+
}
|
|
290
|
+
return true;
|
|
291
|
+
}
|
|
292
|
+
async function registerAllTestCommands(program) {
|
|
293
|
+
const [testModule, testGenModule, injectModule, manifestModule] = await Promise.all([
|
|
294
|
+
import('./test-V4KQL574.js'),
|
|
295
|
+
import('./test-gen-FS4CEY3P.js'),
|
|
296
|
+
import('./inject-test-attrs-P44BVTQS.js'),
|
|
297
|
+
import('./manifest-TMFLESHW.js')
|
|
298
|
+
]);
|
|
299
|
+
const { injectTestAttrsCommand } = injectModule;
|
|
300
|
+
const { manifestCommand } = manifestModule;
|
|
301
|
+
const {
|
|
302
|
+
testCommand,
|
|
303
|
+
testApiCommand,
|
|
304
|
+
testBrowserCommand,
|
|
305
|
+
testDbCommand,
|
|
306
|
+
testE2ECommand,
|
|
307
|
+
testFastCommand,
|
|
308
|
+
testIntegrationCommand,
|
|
309
|
+
testLayer0Command,
|
|
310
|
+
testLayer1Command,
|
|
311
|
+
testLayer2Command,
|
|
312
|
+
testLayer3Command,
|
|
313
|
+
testLayer4Command,
|
|
314
|
+
testLintCommand,
|
|
315
|
+
testLogicCommand,
|
|
316
|
+
testOWASPGenerateCommand,
|
|
317
|
+
testSchemaCommand,
|
|
318
|
+
testServiceCommand,
|
|
319
|
+
testStaticCommand
|
|
320
|
+
} = testModule;
|
|
321
|
+
const {
|
|
322
|
+
dbTestUpdateGoldenCommand,
|
|
323
|
+
testApiGenerateCommand,
|
|
324
|
+
testComponentGenerateCommand,
|
|
325
|
+
testE2EGenerateCommand,
|
|
326
|
+
testE2EScaffoldCommand,
|
|
327
|
+
testSecurityGenerateCommand,
|
|
328
|
+
testUnitGenerateCommand
|
|
329
|
+
} = testGenModule;
|
|
330
|
+
const allCommands = pickCommands([
|
|
331
|
+
testFastCommand,
|
|
332
|
+
testDbCommand,
|
|
333
|
+
testE2ECommand,
|
|
334
|
+
testLintCommand,
|
|
335
|
+
testLogicCommand,
|
|
336
|
+
testSchemaCommand,
|
|
337
|
+
testApiCommand,
|
|
338
|
+
testBrowserCommand,
|
|
339
|
+
testLayer0Command,
|
|
340
|
+
testLayer1Command,
|
|
341
|
+
testLayer2Command,
|
|
342
|
+
testLayer3Command,
|
|
343
|
+
testLayer4Command,
|
|
344
|
+
testStaticCommand,
|
|
345
|
+
testServiceCommand,
|
|
346
|
+
testIntegrationCommand,
|
|
347
|
+
testUnitGenerateCommand,
|
|
348
|
+
testE2EGenerateCommand,
|
|
349
|
+
testSecurityGenerateCommand,
|
|
350
|
+
testOWASPGenerateCommand,
|
|
351
|
+
testApiGenerateCommand,
|
|
352
|
+
testComponentGenerateCommand,
|
|
353
|
+
dbTestUpdateGoldenCommand,
|
|
354
|
+
testE2EScaffoldCommand,
|
|
355
|
+
testCommand,
|
|
356
|
+
injectTestAttrsCommand,
|
|
357
|
+
manifestCommand
|
|
358
|
+
]);
|
|
359
|
+
for (const command of allCommands) {
|
|
360
|
+
program.addCommand(command);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
async function registerTestCommands(program, requested, loadAllCommands) {
|
|
364
|
+
if (!loadAllCommands && requested) {
|
|
365
|
+
const addedSingle = await addSingleTestCommand(program, requested);
|
|
366
|
+
if (addedSingle) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
if (requested === "test" || requested.startsWith("test:")) {
|
|
370
|
+
const addedFocused = await registerFocusedTestCommand(program, requested);
|
|
371
|
+
if (addedFocused) {
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
if (loadAllCommands) {
|
|
379
|
+
await registerAllTestCommands(program);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
if (!requested || isTestCommand(requested)) {
|
|
383
|
+
const commandToLoad = requested ?? "test";
|
|
384
|
+
await registerFocusedTestCommand(program, commandToLoad);
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
await registerAllTestCommands(program);
|
|
388
|
+
}
|
|
389
|
+
async function registerStatusCheckAndUtilityCommands(program, requested, loadAllCommands) {
|
|
390
|
+
if (!loadAllCommands && requested) {
|
|
391
|
+
if (requested === "status") {
|
|
392
|
+
const { statusCommand: statusCommand2 } = await import('./status-UTKS63AB.js');
|
|
393
|
+
program.addCommand(statusCommand2);
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
if (requested === "check") {
|
|
397
|
+
const { checkCommand: checkCommand2 } = await import('./check-LOMVIRHX.js');
|
|
398
|
+
program.addCommand(checkCommand2.name("check"));
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
if (requested === "doctor") {
|
|
402
|
+
const { doctorCommand: doctorCommand2 } = await import('./doctor-MZLOA53G.js');
|
|
403
|
+
program.addCommand(doctorCommand2);
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
if (requested === "cache") {
|
|
407
|
+
const { cacheCommand: cacheCommand2 } = await import('./cache-N7WNPEYF.js');
|
|
408
|
+
program.addCommand(cacheCommand2);
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
if (requested === "telemetry") {
|
|
412
|
+
const { telemetryCommand: telemetryCommand2 } = await import('./telemetry-P56UBLZ2.js');
|
|
413
|
+
program.addCommand(telemetryCommand2);
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
if (requested === "link" || requested === "unlink") {
|
|
417
|
+
const { linkCommand: linkCommand2, unlinkCommand: unlinkCommand2 } = await import('./link-VSNDVZZD.js');
|
|
418
|
+
program.addCommand(linkCommand2);
|
|
419
|
+
program.addCommand(unlinkCommand2);
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
const [
|
|
424
|
+
{ statusCommand },
|
|
425
|
+
{ checkCommand },
|
|
426
|
+
{ doctorCommand },
|
|
427
|
+
{ cacheCommand },
|
|
428
|
+
{ telemetryCommand },
|
|
429
|
+
{ linkCommand, unlinkCommand }
|
|
430
|
+
] = await Promise.all([
|
|
431
|
+
import('./status-UTKS63AB.js'),
|
|
432
|
+
import('./check-LOMVIRHX.js'),
|
|
433
|
+
import('./doctor-MZLOA53G.js'),
|
|
434
|
+
import('./cache-N7WNPEYF.js'),
|
|
435
|
+
import('./telemetry-P56UBLZ2.js'),
|
|
436
|
+
import('./link-VSNDVZZD.js')
|
|
437
|
+
]);
|
|
438
|
+
program.addCommand(statusCommand);
|
|
439
|
+
program.addCommand(checkCommand.name("check"));
|
|
440
|
+
program.addCommand(doctorCommand);
|
|
441
|
+
program.addCommand(cacheCommand);
|
|
442
|
+
program.addCommand(telemetryCommand);
|
|
443
|
+
program.addCommand(linkCommand);
|
|
444
|
+
program.addCommand(unlinkCommand);
|
|
445
|
+
}
|
|
446
|
+
async function registerCiCommand(program) {
|
|
447
|
+
const { ciCommand } = await import('./ci-ZWRVWNFX.js');
|
|
448
|
+
program.addCommand(ciCommand);
|
|
449
|
+
}
|
|
450
|
+
async function registerDbCommand(program) {
|
|
451
|
+
const { dbCommand } = await import('./db-XULCILOU.js');
|
|
452
|
+
program.addCommand(dbCommand);
|
|
453
|
+
}
|
|
454
|
+
async function registerServicesCommand(program) {
|
|
455
|
+
const { servicesCommand } = await import('./services-7VK5KZTO.js');
|
|
456
|
+
program.addCommand(servicesCommand);
|
|
457
|
+
}
|
|
458
|
+
async function registerEnvCommand(program) {
|
|
459
|
+
const { envCommand } = await import('./env-SS66PZ4B.js');
|
|
460
|
+
program.addCommand(envCommand);
|
|
461
|
+
}
|
|
462
|
+
async function registerHotfixCommand(program) {
|
|
463
|
+
const { hotfixCommand } = await import('./hotfix-YA3DGLOM.js');
|
|
464
|
+
program.addCommand(hotfixCommand);
|
|
465
|
+
}
|
|
466
|
+
async function registerSdkCommand(program) {
|
|
467
|
+
const { sdkCommand } = await import('./sdk-XK6HQU7S.js');
|
|
468
|
+
program.addCommand(sdkCommand);
|
|
469
|
+
}
|
|
470
|
+
async function registerUiCommand(program) {
|
|
471
|
+
const { uiCommand } = await import('./ui-RJAMCWUI.js');
|
|
472
|
+
program.addCommand(uiCommand);
|
|
473
|
+
}
|
|
474
|
+
async function registerWatchCommand(program) {
|
|
475
|
+
const { watchCommand } = await import('./watch-PNTKZYFB.js');
|
|
476
|
+
program.addCommand(watchCommand);
|
|
477
|
+
}
|
|
478
|
+
async function registerWorkflowCommand(program) {
|
|
479
|
+
const { workflowCommand } = await import('./workflow-H75N4BXX.js');
|
|
480
|
+
program.addCommand(workflowCommand);
|
|
481
|
+
}
|
|
482
|
+
async function registerVulnCheckCommand(program) {
|
|
483
|
+
const { vulnCheckCommand } = await import('./vuln-check-2W7N5TA2.js');
|
|
484
|
+
program.addCommand(vulnCheckCommand);
|
|
485
|
+
}
|
|
486
|
+
async function registerTemplateCheckCommand(program) {
|
|
487
|
+
const { templateCheckCommand } = await import('./template-check-3P4HZXVY.js');
|
|
488
|
+
program.addCommand(templateCheckCommand);
|
|
489
|
+
}
|
|
490
|
+
async function registerSessionCommands(program) {
|
|
491
|
+
const { sessionCommands } = await import('./session-SFW5QSXZ.js');
|
|
492
|
+
for (const cmd of sessionCommands) {
|
|
493
|
+
program.addCommand(cmd);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
var COMMAND_GROUPS = [
|
|
497
|
+
{
|
|
498
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["init", "prepare", "upgrade", "validate", "build", "dev"]),
|
|
499
|
+
register: registerProjectLifecycleCommands
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
shouldRegister: isTestCommand,
|
|
503
|
+
register: registerTestCommands
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
shouldRegister: (requested) => isRequestedCommand(requested, [
|
|
507
|
+
"status",
|
|
508
|
+
"check",
|
|
509
|
+
"doctor",
|
|
510
|
+
"cache",
|
|
511
|
+
"telemetry",
|
|
512
|
+
"link",
|
|
513
|
+
"unlink"
|
|
514
|
+
]),
|
|
515
|
+
register: registerStatusCheckAndUtilityCommands
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["ci"]),
|
|
519
|
+
register: registerCiCommand
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["db"]),
|
|
523
|
+
register: registerDbCommand
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["services"]),
|
|
527
|
+
register: registerServicesCommand
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["env"]),
|
|
531
|
+
register: registerEnvCommand
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["hotfix"]),
|
|
535
|
+
register: registerHotfixCommand
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["sdk"]),
|
|
539
|
+
register: registerSdkCommand
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["ui"]),
|
|
543
|
+
register: registerUiCommand
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["watch"]),
|
|
547
|
+
register: registerWatchCommand
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["workflow"]),
|
|
551
|
+
register: registerWorkflowCommand
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["vuln-check"]),
|
|
555
|
+
register: registerVulnCheckCommand
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
shouldRegister: (requested) => isRequestedCommand(requested, ["template-check"]),
|
|
559
|
+
register: registerTemplateCheckCommand
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
shouldRegister: isSessionCommand,
|
|
563
|
+
register: registerSessionCommands
|
|
564
|
+
}
|
|
565
|
+
];
|
|
566
|
+
function shouldLoadAllCommands(requested, loadAllCommands) {
|
|
567
|
+
if (loadAllCommands === true || requested === null) {
|
|
568
|
+
return true;
|
|
569
|
+
}
|
|
570
|
+
return !COMMAND_GROUPS.some((group) => group.shouldRegister(requested));
|
|
571
|
+
}
|
|
572
|
+
async function registerSelectedCommands(program, options) {
|
|
573
|
+
const requested = normalizeRequestedCommandName(options.requestedCommandName);
|
|
574
|
+
const shouldLoadAll = shouldLoadAllCommands(requested, options.loadAllCommands);
|
|
575
|
+
for (const group of COMMAND_GROUPS) {
|
|
576
|
+
if (shouldLoadAll || group.shouldRegister(requested)) {
|
|
577
|
+
await group.register(program, requested, shouldLoadAll);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
var RUNTIME_BOOTSTRAP_OPTIONAL_COMMANDS = /* @__PURE__ */ new Set([
|
|
582
|
+
"cache",
|
|
583
|
+
"check",
|
|
584
|
+
"doctor",
|
|
585
|
+
"inject-test-attrs",
|
|
586
|
+
"link",
|
|
587
|
+
"manifest",
|
|
588
|
+
"status",
|
|
589
|
+
"telemetry",
|
|
590
|
+
"unlink"
|
|
591
|
+
]);
|
|
592
|
+
function shouldRunRuntimeBootstrap(argv) {
|
|
593
|
+
const requested = getRequestedCommandNameFromArgv(argv);
|
|
594
|
+
if (!requested) return true;
|
|
595
|
+
if (!COMMAND_GROUPS.some((group) => group.shouldRegister(requested))) {
|
|
596
|
+
return false;
|
|
597
|
+
}
|
|
598
|
+
if (RUNTIME_BOOTSTRAP_OPTIONAL_COMMANDS.has(requested)) {
|
|
599
|
+
return false;
|
|
600
|
+
}
|
|
601
|
+
if (requested.startsWith("session:")) {
|
|
602
|
+
return false;
|
|
603
|
+
}
|
|
604
|
+
return true;
|
|
605
|
+
}
|
|
606
|
+
function resolveGlobalOptions(thisCommand) {
|
|
607
|
+
let formatRaw;
|
|
608
|
+
let hasJsonFlag = false;
|
|
609
|
+
let hasNonInteractiveFlag = false;
|
|
610
|
+
let cur = thisCommand;
|
|
611
|
+
while (cur) {
|
|
612
|
+
const opts = cur.opts?.();
|
|
613
|
+
const value = opts?.format;
|
|
614
|
+
if (value !== void 0) {
|
|
615
|
+
formatRaw = value;
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
if (opts?.json === true) hasJsonFlag = true;
|
|
619
|
+
if (opts?.nonInteractive === true) hasNonInteractiveFlag = true;
|
|
620
|
+
cur = cur.parent ?? null;
|
|
621
|
+
}
|
|
622
|
+
return { formatRaw, hasJsonFlag, hasNonInteractiveFlag };
|
|
623
|
+
}
|
|
624
|
+
async function tryLoadAdminCommand() {
|
|
625
|
+
if (!HAS_ADMIN_COMMAND) {
|
|
626
|
+
return null;
|
|
627
|
+
}
|
|
628
|
+
try {
|
|
629
|
+
const adminUrl = new URL("./admin.js", import.meta.url);
|
|
630
|
+
const mod = await import(adminUrl.href);
|
|
631
|
+
return mod.adminCommand;
|
|
632
|
+
} catch {
|
|
633
|
+
return null;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
async function createProgram(options = {}) {
|
|
637
|
+
const program = new Command();
|
|
638
|
+
program.name("runa").description("runa CLI - DevOps complement features for pj-repos").version(CLI_VERSION, "-v, --version", "Output the version number");
|
|
639
|
+
program.exitOverride((err) => {
|
|
640
|
+
const code = err.code;
|
|
641
|
+
const exitCode = err.exitCode;
|
|
642
|
+
if (code === "commander.help" || (code === "commander.helpDisplayed" || code === "commander.version") && (exitCode ?? 0) === 0) {
|
|
643
|
+
process.exit(0);
|
|
644
|
+
}
|
|
645
|
+
throw new CLIError(
|
|
646
|
+
err.message,
|
|
647
|
+
code ?? "COMMANDER_ERROR",
|
|
648
|
+
["Run with --help for usage", "If this is unexpected, run: runa check"],
|
|
649
|
+
err,
|
|
650
|
+
exitCode ?? 1
|
|
651
|
+
);
|
|
652
|
+
});
|
|
653
|
+
program.option("--format <format>", "Output format: text | json", "text");
|
|
654
|
+
program.option("--json", "Alias of --format json");
|
|
655
|
+
program.option("--non-interactive", "Force non-interactive mode (CI-safe)");
|
|
656
|
+
program.hook("preAction", (thisCommand) => {
|
|
657
|
+
if (process.env.RUNA_OUTPUT_FORMAT === "json" || process.env.RUNA_OUTPUT_FORMAT === "text") {
|
|
658
|
+
if (process.env.CI === "true") {
|
|
659
|
+
enableNonInteractiveMode();
|
|
660
|
+
}
|
|
661
|
+
enableContractModeIO();
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
664
|
+
const { formatRaw, hasJsonFlag, hasNonInteractiveFlag } = resolveGlobalOptions(thisCommand);
|
|
665
|
+
const format = hasJsonFlag ? "json" : parseOutputFormat(formatRaw ?? "text");
|
|
666
|
+
setOutputFormat(format);
|
|
667
|
+
if (process.env.CI === "true" || hasNonInteractiveFlag) {
|
|
668
|
+
enableNonInteractiveMode();
|
|
669
|
+
}
|
|
670
|
+
enableContractModeIO();
|
|
671
|
+
});
|
|
672
|
+
program.hook("postAction", (thisCommand) => {
|
|
673
|
+
emitDefaultSuccessIfNeeded(thisCommand);
|
|
674
|
+
});
|
|
675
|
+
await registerSelectedCommands(program, options);
|
|
676
|
+
const requested = normalizeRequestedCommandName(options.requestedCommandName);
|
|
677
|
+
const shouldRegisterAdmin = options.loadAllCommands === true || requested === null || requested === "admin";
|
|
678
|
+
if (shouldRegisterAdmin) {
|
|
679
|
+
const adminCommand = await tryLoadAdminCommand();
|
|
680
|
+
if (adminCommand) {
|
|
681
|
+
program.addCommand(adminCommand);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
return program;
|
|
685
|
+
}
|
|
686
|
+
async function executeProgram(program) {
|
|
687
|
+
const argv = process.argv.slice(2);
|
|
688
|
+
applyEarlyGlobalFlags(argv);
|
|
689
|
+
const isHelpOrVersion = argv.includes("--help") || argv.includes("-h") || argv.includes("--version") || argv.includes("-V");
|
|
690
|
+
if (!isHelpOrVersion && shouldRunRuntimeBootstrap(argv)) {
|
|
691
|
+
const [{ loadEnvFiles }, { enforceLicenseInCI }] = await Promise.all([
|
|
692
|
+
import('./env-files-2UIUYLLR.js'),
|
|
693
|
+
import('./license-OB7GVJQ2.js')
|
|
694
|
+
]);
|
|
695
|
+
loadEnvFiles({
|
|
696
|
+
silent: true
|
|
697
|
+
});
|
|
698
|
+
await enforceLicenseInCI();
|
|
699
|
+
await import('./env-HMMRSYCI.js');
|
|
700
|
+
}
|
|
701
|
+
await program.parseAsync(process.argv);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
export { createProgram, executeProgram };
|
|
@@ -13,6 +13,8 @@ export interface DbSyncInput {
|
|
|
13
13
|
repoRoot: string;
|
|
14
14
|
tmpDir: string;
|
|
15
15
|
env?: NodeJS.ProcessEnv;
|
|
16
|
+
/** Pre-computed by setup phase. When false, skip sync without re-checking. */
|
|
17
|
+
supabaseRunning?: boolean;
|
|
16
18
|
}
|
|
17
19
|
export interface DbSyncOutput {
|
|
18
20
|
passed: boolean;
|