@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,85 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { env } from './chunk-NPSRD26F.js';
|
|
4
|
+
import { redactSecrets } from './chunk-II7VYQEM.js';
|
|
5
|
+
import { init_local_supabase, buildLocalDatabaseUrl } from './chunk-VM3IWOT5.js';
|
|
6
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
7
|
+
import { CLIError } from '@runa-ai/runa';
|
|
8
|
+
|
|
9
|
+
createRequire(import.meta.url);
|
|
10
|
+
|
|
11
|
+
// src/commands/db/utils/db-target.ts
|
|
12
|
+
init_esm_shims();
|
|
13
|
+
init_local_supabase();
|
|
14
|
+
function getLocalDatabaseUrl() {
|
|
15
|
+
return buildLocalDatabaseUrl(process.cwd());
|
|
16
|
+
}
|
|
17
|
+
function isLocalHostname(hostname) {
|
|
18
|
+
return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname === "host.docker.internal";
|
|
19
|
+
}
|
|
20
|
+
function isLocalDatabaseUrl(url) {
|
|
21
|
+
try {
|
|
22
|
+
const parsed = new URL(url);
|
|
23
|
+
return isLocalHostname(parsed.hostname);
|
|
24
|
+
} catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function resolveDatabaseUrl(environment) {
|
|
29
|
+
switch (environment) {
|
|
30
|
+
case "local": {
|
|
31
|
+
const url = process.env.DATABASE_URL_ADMIN || getLocalDatabaseUrl();
|
|
32
|
+
if (!isLocalDatabaseUrl(url)) {
|
|
33
|
+
throw new CLIError("Local database URL appears to be a remote URL", "LOCAL_DB_URL_REMOTE", [
|
|
34
|
+
"Local operations should use the local Supabase instance",
|
|
35
|
+
// SECURITY (Issue #513): Redact credentials from database URL in error message
|
|
36
|
+
`Current URL: ${redactSecrets(url)}`,
|
|
37
|
+
"If you need to connect to a remote DB, use --env preview or --env production"
|
|
38
|
+
]);
|
|
39
|
+
}
|
|
40
|
+
return url;
|
|
41
|
+
}
|
|
42
|
+
case "preview": {
|
|
43
|
+
const url = process.env.DATABASE_URL_ADMIN || env.DATABASE_URL || process.env.DATABASE_URL;
|
|
44
|
+
if (!url) {
|
|
45
|
+
throw new CLIError("Preview database URL not found", "PREVIEW_DB_URL_NOT_FOUND", [
|
|
46
|
+
"Set DATABASE_URL_ADMIN environment variable (for DDL/migrations)",
|
|
47
|
+
"Or set DATABASE_URL as fallback"
|
|
48
|
+
]);
|
|
49
|
+
}
|
|
50
|
+
return url;
|
|
51
|
+
}
|
|
52
|
+
case "main":
|
|
53
|
+
case "production": {
|
|
54
|
+
const url = process.env.GH_DATABASE_URL_ADMIN || process.env.DATABASE_URL_ADMIN || process.env.GH_DATABASE_URL || env.DATABASE_URL || process.env.DATABASE_URL;
|
|
55
|
+
if (!url) {
|
|
56
|
+
throw new CLIError("Production database URL not found", "PRODUCTION_DB_URL_NOT_FOUND", [
|
|
57
|
+
"Set DATABASE_URL_ADMIN environment variable (for DDL/migrations)",
|
|
58
|
+
"Or set GH_DATABASE_URL_ADMIN (CI) / DATABASE_URL as fallback"
|
|
59
|
+
]);
|
|
60
|
+
}
|
|
61
|
+
if (isLocalDatabaseUrl(url)) {
|
|
62
|
+
throw new CLIError(
|
|
63
|
+
"Production database URL points to localhost",
|
|
64
|
+
"PRODUCTION_DB_URL_IS_LOCAL",
|
|
65
|
+
[
|
|
66
|
+
"Use --env local for local Supabase operations",
|
|
67
|
+
"Production operations require a remote database URL",
|
|
68
|
+
"Set DATABASE_URL_ADMIN or GH_DATABASE_URL_ADMIN to the production database URL"
|
|
69
|
+
]
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return url;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function tryResolveDatabaseUrl(environment) {
|
|
77
|
+
try {
|
|
78
|
+
return resolveDatabaseUrl(environment);
|
|
79
|
+
} catch (error) {
|
|
80
|
+
if (error instanceof CLIError) return void 0;
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { resolveDatabaseUrl, tryResolveDatabaseUrl };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
4
|
+
import { execa } from 'execa';
|
|
5
|
+
|
|
6
|
+
createRequire(import.meta.url);
|
|
7
|
+
|
|
8
|
+
// src/utils/vercel-project.ts
|
|
9
|
+
init_esm_shims();
|
|
10
|
+
async function getVercelProjectInfo() {
|
|
11
|
+
try {
|
|
12
|
+
const result = await execa("vercel", ["project", "inspect"], {
|
|
13
|
+
reject: false,
|
|
14
|
+
timeout: 3e4
|
|
15
|
+
// 30 seconds timeout
|
|
16
|
+
});
|
|
17
|
+
if (result.exitCode !== 0) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const output = result.stdout || result.stderr;
|
|
21
|
+
return parseVercelInspectOutput(output);
|
|
22
|
+
} catch {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function parseVercelInspectOutput(output) {
|
|
27
|
+
const lines = output.split("\n");
|
|
28
|
+
const info = {
|
|
29
|
+
id: "",
|
|
30
|
+
name: "",
|
|
31
|
+
owner: "",
|
|
32
|
+
rootDirectory: null,
|
|
33
|
+
nodeVersion: null,
|
|
34
|
+
frameworkPreset: null
|
|
35
|
+
};
|
|
36
|
+
for (const line of lines) {
|
|
37
|
+
const trimmed = line.trim();
|
|
38
|
+
const match = trimmed.match(/^(\S+(?:\s+\S+)*)\s{2,}(.+)$/);
|
|
39
|
+
if (!match) continue;
|
|
40
|
+
const [, key, value] = match;
|
|
41
|
+
const normalizedKey = key.toLowerCase().replace(/\s+/g, "");
|
|
42
|
+
switch (normalizedKey) {
|
|
43
|
+
case "id":
|
|
44
|
+
info.id = value;
|
|
45
|
+
break;
|
|
46
|
+
case "name":
|
|
47
|
+
info.name = value;
|
|
48
|
+
break;
|
|
49
|
+
case "owner":
|
|
50
|
+
info.owner = value;
|
|
51
|
+
break;
|
|
52
|
+
case "rootdirectory":
|
|
53
|
+
info.rootDirectory = value;
|
|
54
|
+
break;
|
|
55
|
+
case "node.jsversion":
|
|
56
|
+
case "nodejsversion":
|
|
57
|
+
info.nodeVersion = value;
|
|
58
|
+
break;
|
|
59
|
+
case "frameworkpreset":
|
|
60
|
+
info.frameworkPreset = value;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (!info.id || !info.name) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
return info;
|
|
68
|
+
}
|
|
69
|
+
async function getVercelRootDirectory() {
|
|
70
|
+
const info = await getVercelProjectInfo();
|
|
71
|
+
return info?.rootDirectory ?? null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { getVercelRootDirectory };
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { init_constants, constants_exports } from './chunk-VM3IWOT5.js';
|
|
4
|
+
import { init_esm_shims, __toCommonJS } from './chunk-VRXHCR5K.js';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
|
|
7
|
+
createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// src/config/env.ts
|
|
10
|
+
init_esm_shims();
|
|
11
|
+
function safeOptionalUrl() {
|
|
12
|
+
return z.string().optional().transform((val) => {
|
|
13
|
+
if (!val) return void 0;
|
|
14
|
+
try {
|
|
15
|
+
new URL(val);
|
|
16
|
+
return val;
|
|
17
|
+
} catch {
|
|
18
|
+
return void 0;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
var envSchema = z.object({
|
|
23
|
+
// Core environment
|
|
24
|
+
NODE_ENV: z.enum(["development", "production", "test"]).default("development"),
|
|
25
|
+
CI: z.string().optional().transform((val) => val === "true"),
|
|
26
|
+
DEBUG: z.string().optional().transform((val) => val === "true"),
|
|
27
|
+
// Database
|
|
28
|
+
// Note: POSTGRES_PORT is now optional - use getDatabaseUrl() which detects port dynamically
|
|
29
|
+
DATABASE_URL: safeOptionalUrl(),
|
|
30
|
+
POSTGRES_PASSWORD: z.string().optional(),
|
|
31
|
+
POSTGRES_USER: z.string().default("postgres"),
|
|
32
|
+
POSTGRES_DB: z.string().default("postgres"),
|
|
33
|
+
POSTGRES_HOST: z.string().default("127.0.0.1"),
|
|
34
|
+
POSTGRES_PORT: z.string().optional(),
|
|
35
|
+
// Supabase
|
|
36
|
+
SUPABASE_URL: safeOptionalUrl(),
|
|
37
|
+
SUPABASE_ANON_KEY: z.string().optional(),
|
|
38
|
+
SUPABASE_SERVICE_ROLE_KEY: z.string().optional(),
|
|
39
|
+
SUPABASE_ACCESS_TOKEN: z.string().optional(),
|
|
40
|
+
SUPABASE_PROJECT_REF: z.string().optional(),
|
|
41
|
+
NEXT_PUBLIC_SUPABASE_URL: safeOptionalUrl(),
|
|
42
|
+
// GitHub
|
|
43
|
+
GITHUB_TOKEN: z.string().optional(),
|
|
44
|
+
GITHUB_APP_ID: z.string().optional(),
|
|
45
|
+
GITHUB_APP_PRIVATE_KEY: z.string().optional(),
|
|
46
|
+
GITHUB_INSTALLATION_ID: z.string().optional(),
|
|
47
|
+
// Vercel
|
|
48
|
+
VERCEL_TOKEN: z.string().optional(),
|
|
49
|
+
VERCEL_PROJECT_ID: z.string().optional(),
|
|
50
|
+
VERCEL_ORG_ID: z.string().optional(),
|
|
51
|
+
// Testing
|
|
52
|
+
BASE_URL: safeOptionalUrl(),
|
|
53
|
+
SKIP_SERVER: z.string().optional().transform((val) => val === "true"),
|
|
54
|
+
// Logging
|
|
55
|
+
LOG_LEVEL: z.enum(["debug", "info", "warn", "error"]).default("info"),
|
|
56
|
+
RUNA_LOG_JSON: z.string().optional().transform((val) => val === "true")
|
|
57
|
+
});
|
|
58
|
+
function loadEnv() {
|
|
59
|
+
const result = envSchema.safeParse(process.env);
|
|
60
|
+
if (!result.success) {
|
|
61
|
+
const errors = result.error.issues.map(
|
|
62
|
+
(issue) => ` - ${issue.path.map((p) => String(p)).join(".")}: ${issue.message}`
|
|
63
|
+
);
|
|
64
|
+
throw new Error(
|
|
65
|
+
`Invalid environment configuration:
|
|
66
|
+
|
|
67
|
+
${errors.join("\n")}
|
|
68
|
+
|
|
69
|
+
Please check your .env file or environment variables.`
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return result.data;
|
|
73
|
+
}
|
|
74
|
+
var env = loadEnv();
|
|
75
|
+
function hasEnv(...keys) {
|
|
76
|
+
return keys.every((key) => {
|
|
77
|
+
const value = env[key];
|
|
78
|
+
return value !== void 0 && value !== "";
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function getDatabaseUrl() {
|
|
82
|
+
if (env.DATABASE_URL) {
|
|
83
|
+
return env.DATABASE_URL;
|
|
84
|
+
}
|
|
85
|
+
const { POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_HOST, POSTGRES_PORT, POSTGRES_DB } = env;
|
|
86
|
+
if (!POSTGRES_PASSWORD) {
|
|
87
|
+
throw new Error(
|
|
88
|
+
"Database credentials not configured. Set DATABASE_URL or POSTGRES_PASSWORD environment variable."
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
let port = POSTGRES_PORT;
|
|
92
|
+
if (!port) {
|
|
93
|
+
const { detectSupabasePorts } = (init_constants(), __toCommonJS(constants_exports));
|
|
94
|
+
port = String(detectSupabasePorts().db);
|
|
95
|
+
}
|
|
96
|
+
return `postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${port}/${POSTGRES_DB}`;
|
|
97
|
+
}
|
|
98
|
+
function isCI() {
|
|
99
|
+
return env.CI === true;
|
|
100
|
+
}
|
|
101
|
+
function isDebug() {
|
|
102
|
+
return env.DEBUG === true || env.LOG_LEVEL === "debug";
|
|
103
|
+
}
|
|
104
|
+
var SENSITIVE_KEYS = [
|
|
105
|
+
"DATABASE_URL",
|
|
106
|
+
// Contains password in connection string
|
|
107
|
+
"POSTGRES_PASSWORD",
|
|
108
|
+
"SUPABASE_SERVICE_ROLE_KEY",
|
|
109
|
+
"SUPABASE_ACCESS_TOKEN",
|
|
110
|
+
"SUPABASE_ANON_KEY",
|
|
111
|
+
"GITHUB_TOKEN",
|
|
112
|
+
"GITHUB_APP_PRIVATE_KEY",
|
|
113
|
+
"VERCEL_TOKEN"
|
|
114
|
+
];
|
|
115
|
+
var SENSITIVE_VALUE_PATTERNS = [
|
|
116
|
+
// Database URLs with passwords
|
|
117
|
+
/postgresql:\/\/[^:]+:[^@]+@/i,
|
|
118
|
+
/postgres:\/\/[^:]+:[^@]+@/i,
|
|
119
|
+
/mysql:\/\/[^:]+:[^@]+@/i,
|
|
120
|
+
// JWT tokens
|
|
121
|
+
/^eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,
|
|
122
|
+
// GitHub tokens
|
|
123
|
+
/^gh[pousr]_[A-Za-z0-9_]+$/,
|
|
124
|
+
// API keys with common prefixes
|
|
125
|
+
/^sk[_-](?:live|test|proj)[_-]/i,
|
|
126
|
+
// AWS keys
|
|
127
|
+
/^AKIA[A-Z0-9]{16}$/
|
|
128
|
+
];
|
|
129
|
+
function looksLikeSecret(value) {
|
|
130
|
+
return SENSITIVE_VALUE_PATTERNS.some((pattern) => pattern.test(value));
|
|
131
|
+
}
|
|
132
|
+
function sanitizeEnv(envVars) {
|
|
133
|
+
const sanitized = { ...envVars };
|
|
134
|
+
for (const [key, value] of Object.entries(sanitized)) {
|
|
135
|
+
if (typeof value !== "string" || value === "") {
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
if (SENSITIVE_KEYS.includes(key)) {
|
|
139
|
+
sanitized[key] = "***";
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if (looksLikeSecret(value)) {
|
|
143
|
+
sanitized[key] = "***";
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return sanitized;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export { env, getDatabaseUrl, hasEnv, isCI, isDebug, sanitizeEnv };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
4
|
+
import { CLIError } from '@runa-ai/runa';
|
|
5
|
+
import { createActor } from 'xstate';
|
|
6
|
+
|
|
7
|
+
createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// src/internal/machines/machine-runner.ts
|
|
10
|
+
init_esm_shims();
|
|
11
|
+
function getOutputOrThrow(snapshot) {
|
|
12
|
+
const s = snapshot;
|
|
13
|
+
if (s.output === void 0) {
|
|
14
|
+
throw new CLIError("Machine completed without output", "MACHINE_NO_OUTPUT", [
|
|
15
|
+
"Ensure the machine defines an `output:` function."
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
return s.output;
|
|
19
|
+
}
|
|
20
|
+
async function runMachine(params) {
|
|
21
|
+
const timeoutMs = params.timeoutMs ?? 10 * 60 * 1e3;
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
const actor = createActor(params.machine, { input: params.input });
|
|
24
|
+
const timer = setTimeout(() => {
|
|
25
|
+
try {
|
|
26
|
+
actor.stop?.();
|
|
27
|
+
} catch {
|
|
28
|
+
}
|
|
29
|
+
reject(
|
|
30
|
+
new CLIError("Machine execution timed out", "MACHINE_TIMEOUT", [
|
|
31
|
+
`Timeout: ${timeoutMs}ms`,
|
|
32
|
+
"Consider increasing timeoutMs for long-running operations."
|
|
33
|
+
])
|
|
34
|
+
);
|
|
35
|
+
}, timeoutMs);
|
|
36
|
+
const sub = actor.subscribe((snapshot) => {
|
|
37
|
+
try {
|
|
38
|
+
params.onSnapshot?.(snapshot);
|
|
39
|
+
const stateName = params.helpers.getStateName(snapshot);
|
|
40
|
+
params.onTransition?.(stateName);
|
|
41
|
+
if (params.helpers.isComplete(snapshot)) {
|
|
42
|
+
clearTimeout(timer);
|
|
43
|
+
sub.unsubscribe();
|
|
44
|
+
const out = getOutputOrThrow(snapshot);
|
|
45
|
+
resolve(out);
|
|
46
|
+
}
|
|
47
|
+
} catch (err) {
|
|
48
|
+
clearTimeout(timer);
|
|
49
|
+
sub.unsubscribe();
|
|
50
|
+
reject(err);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
try {
|
|
54
|
+
actor.start();
|
|
55
|
+
actor.send({ type: "START" });
|
|
56
|
+
} catch (err) {
|
|
57
|
+
clearTimeout(timer);
|
|
58
|
+
sub.unsubscribe();
|
|
59
|
+
reject(err);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// src/internal/machines/index.ts
|
|
65
|
+
init_esm_shims();
|
|
66
|
+
|
|
67
|
+
export { runMachine };
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { loadEnvFiles } from './chunk-644FVGIQ.js';
|
|
4
|
+
import { emitJsonSuccess } from './chunk-KE6QJBZG.js';
|
|
5
|
+
import { getOutputFormatFromEnv } from './chunk-HKUWEGUX.js';
|
|
6
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
7
|
+
import { CLIError, createCLILogger } from '@runa-ai/runa/cli-runtime';
|
|
8
|
+
import { runChecks, RunCheckOutputSchema } from '@runa-ai/runa/check';
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
import { Command } from 'commander';
|
|
11
|
+
|
|
12
|
+
createRequire(import.meta.url);
|
|
13
|
+
|
|
14
|
+
// src/commands/check/commands/check.ts
|
|
15
|
+
init_esm_shims();
|
|
16
|
+
function getStatusIcon(status, required) {
|
|
17
|
+
switch (status) {
|
|
18
|
+
case "ok":
|
|
19
|
+
return chalk.green("\u2713");
|
|
20
|
+
case "skipped":
|
|
21
|
+
return chalk.dim("\u25CB");
|
|
22
|
+
case "warning":
|
|
23
|
+
return chalk.yellow("\u26A0");
|
|
24
|
+
case "missing":
|
|
25
|
+
case "invalid":
|
|
26
|
+
case "not_running":
|
|
27
|
+
return required ? chalk.red("\u2717") : chalk.yellow("\u26A0");
|
|
28
|
+
default:
|
|
29
|
+
return chalk.dim("?");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function getStatusColor(status, required) {
|
|
33
|
+
switch (status) {
|
|
34
|
+
case "ok":
|
|
35
|
+
return chalk.green;
|
|
36
|
+
case "skipped":
|
|
37
|
+
return chalk.dim;
|
|
38
|
+
case "warning":
|
|
39
|
+
return chalk.yellow;
|
|
40
|
+
case "missing":
|
|
41
|
+
case "invalid":
|
|
42
|
+
case "not_running":
|
|
43
|
+
return required ? chalk.red : chalk.yellow;
|
|
44
|
+
default:
|
|
45
|
+
return chalk.dim;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function renderCheckDetails(logger, details, verbose) {
|
|
49
|
+
if (details.error) {
|
|
50
|
+
logger.info(chalk.red(` \u2514\u2500 Error: ${details.error}`));
|
|
51
|
+
}
|
|
52
|
+
if (details.issue) {
|
|
53
|
+
logger.info(chalk.yellow(` \u2514\u2500 Issue: ${details.issue}`));
|
|
54
|
+
}
|
|
55
|
+
if (details.expected && details.actual) {
|
|
56
|
+
logger.info(chalk.dim(` \u2514\u2500 Expected: ${details.expected}`));
|
|
57
|
+
logger.info(chalk.dim(` \u2514\u2500 Actual: ${details.actual}`));
|
|
58
|
+
}
|
|
59
|
+
if (details.hint) {
|
|
60
|
+
logger.info(chalk.cyan(` \u2514\u2500 Hint: ${details.hint}`));
|
|
61
|
+
}
|
|
62
|
+
if (verbose && details.path) {
|
|
63
|
+
logger.info(chalk.dim(` \u2514\u2500 Path: ${details.path}`));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function renderFixHint(logger, fix) {
|
|
67
|
+
if (fix.command) {
|
|
68
|
+
logger.info(chalk.dim(` \u2514\u2500 Fix: ${fix.command}`));
|
|
69
|
+
} else if (fix.manual) {
|
|
70
|
+
logger.info(chalk.dim(` \u2514\u2500 Manual: ${fix.manual}`));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function renderCheckResult(logger, check, verbose) {
|
|
74
|
+
const icon = getStatusIcon(check.status, check.required);
|
|
75
|
+
const color = getStatusColor(check.status, check.required);
|
|
76
|
+
const nameWidth = 30;
|
|
77
|
+
const name = check.name.padEnd(nameWidth);
|
|
78
|
+
const message = color(check.message);
|
|
79
|
+
logger.info(` ${icon} ${name} ${message}`);
|
|
80
|
+
const isFailed = check.status !== "ok" && check.status !== "skipped";
|
|
81
|
+
const showDetails = isFailed || verbose;
|
|
82
|
+
if (showDetails && check.details) {
|
|
83
|
+
renderCheckDetails(logger, check.details, verbose);
|
|
84
|
+
}
|
|
85
|
+
if ((isFailed || verbose) && check.fix) {
|
|
86
|
+
renderFixHint(logger, check.fix);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function renderCategory(logger, category, verbose) {
|
|
90
|
+
if (category.checks.length === 0) return;
|
|
91
|
+
logger.info("");
|
|
92
|
+
logger.info(chalk.bold(`\u2501\u2501\u2501 ${category.label} \u2501\u2501\u2501`));
|
|
93
|
+
for (const check of category.checks) {
|
|
94
|
+
renderCheckResult(logger, check, verbose);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function renderSummary(logger, output, fix) {
|
|
98
|
+
logger.info("");
|
|
99
|
+
logger.info(chalk.bold("\u2501\u2501\u2501 Summary \u2501\u2501\u2501"));
|
|
100
|
+
const { summary } = output;
|
|
101
|
+
const parts = [];
|
|
102
|
+
if (summary.passed > 0) {
|
|
103
|
+
parts.push(chalk.green(`${summary.passed} passed`));
|
|
104
|
+
}
|
|
105
|
+
if (summary.critical > 0) {
|
|
106
|
+
parts.push(chalk.red(`${summary.critical} critical`));
|
|
107
|
+
}
|
|
108
|
+
if (summary.warning > 0) {
|
|
109
|
+
parts.push(chalk.yellow(`${summary.warning} warnings`));
|
|
110
|
+
}
|
|
111
|
+
if (summary.skipped > 0) {
|
|
112
|
+
parts.push(chalk.dim(`${summary.skipped} skipped`));
|
|
113
|
+
}
|
|
114
|
+
if (fix && summary.fixed > 0) {
|
|
115
|
+
parts.push(chalk.cyan(`${summary.fixed} fixed`));
|
|
116
|
+
}
|
|
117
|
+
logger.info(` ${parts.join(" | ")}`);
|
|
118
|
+
if (summary.fixable > 0 && !fix) {
|
|
119
|
+
logger.info("");
|
|
120
|
+
logger.info(
|
|
121
|
+
chalk.yellow(` ${summary.fixable} issue(s) can be auto-fixed. Run: runa check --fix`)
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function renderNextActions(logger, output) {
|
|
126
|
+
if (output.nextActions.length === 0) return;
|
|
127
|
+
logger.info("");
|
|
128
|
+
logger.info(chalk.bold("\u2501\u2501\u2501 Next Actions \u2501\u2501\u2501"));
|
|
129
|
+
const topActions = output.nextActions.slice(0, 5);
|
|
130
|
+
for (const action of topActions) {
|
|
131
|
+
const prefix = action.manual ? chalk.yellow(" Manual:") : chalk.cyan(" Run:");
|
|
132
|
+
const cmd = action.command || action.action;
|
|
133
|
+
logger.info(`${prefix} ${cmd}`);
|
|
134
|
+
}
|
|
135
|
+
if (output.nextActions.length > 5) {
|
|
136
|
+
logger.info(chalk.dim(` ... and ${output.nextActions.length - 5} more`));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function renderFinalStatus(logger, output) {
|
|
140
|
+
logger.info("");
|
|
141
|
+
if (output.exitCode === 1) {
|
|
142
|
+
logger.error("Critical issues found. Please fix before proceeding.");
|
|
143
|
+
} else if (output.summary.warning > 0) {
|
|
144
|
+
logger.warn("Checks passed with warnings. Operations should work.");
|
|
145
|
+
} else {
|
|
146
|
+
logger.success("All checks passed! Ready for operations.");
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
async function runCheckCommand(options, runOptions) {
|
|
150
|
+
const logger = createCLILogger(runOptions.loggerName);
|
|
151
|
+
const isJsonMode = getOutputFormatFromEnv() === "json";
|
|
152
|
+
loadEnvFiles({ runaEnv: "local", silent: true });
|
|
153
|
+
if (isJsonMode && options.fix) {
|
|
154
|
+
throw new CLIError(
|
|
155
|
+
"--fix is not allowed in --json mode (non-interactive)",
|
|
156
|
+
"NON_INTERACTIVE_REQUIRED",
|
|
157
|
+
["Run without --json to use --fix", "Or apply fixes manually based on JSON output"]
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
const output = await runChecks({
|
|
161
|
+
targetDir: options.cwd || process.cwd(),
|
|
162
|
+
scope: options.scope || "all",
|
|
163
|
+
fix: options.fix || false,
|
|
164
|
+
dryRun: options.dryRun || false,
|
|
165
|
+
verbose: options.verbose || false
|
|
166
|
+
});
|
|
167
|
+
if (isJsonMode) {
|
|
168
|
+
emitJsonSuccess(runOptions.command, RunCheckOutputSchema, output);
|
|
169
|
+
process.exit(output.exitCode);
|
|
170
|
+
}
|
|
171
|
+
if (runOptions.deprecationNotice) {
|
|
172
|
+
logger.warn(runOptions.deprecationNotice);
|
|
173
|
+
}
|
|
174
|
+
logger.section(`Project Health Check (scope: ${options.scope || "all"})`);
|
|
175
|
+
for (const category of output.categories) {
|
|
176
|
+
renderCategory(logger, category, options.verbose || false);
|
|
177
|
+
}
|
|
178
|
+
renderSummary(logger, output, options.fix || false);
|
|
179
|
+
if (!output.success) {
|
|
180
|
+
renderNextActions(logger, output);
|
|
181
|
+
}
|
|
182
|
+
renderFinalStatus(logger, output);
|
|
183
|
+
process.exitCode = output.exitCode;
|
|
184
|
+
}
|
|
185
|
+
var checkCommand = new Command("run").description("Check project configuration and dependencies").option(
|
|
186
|
+
"-s, --scope <scope>",
|
|
187
|
+
"Check scope: all | build | ci | deploy | testing | layer1 | layer2 | layer3 | layer4",
|
|
188
|
+
"all"
|
|
189
|
+
).option("--fix", "Attempt to auto-fix issues").option("-v, --verbose", "Show detailed output with fix hints").option("--dry-run", "Show what would be checked without running").option("--cwd <path>", "Working directory (default: current directory)").action(async (options, command) => {
|
|
190
|
+
try {
|
|
191
|
+
await runCheckCommand(options, {
|
|
192
|
+
command,
|
|
193
|
+
loggerName: "check"
|
|
194
|
+
});
|
|
195
|
+
} catch (error) {
|
|
196
|
+
if (error instanceof CLIError) {
|
|
197
|
+
throw error;
|
|
198
|
+
}
|
|
199
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
200
|
+
throw new CLIError(
|
|
201
|
+
`Project check failed: ${err.message}`,
|
|
202
|
+
"CHECK_ERROR",
|
|
203
|
+
["Check error details above", "Verify environment setup", "Try: runa check --verbose"],
|
|
204
|
+
err
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
export { checkCommand, runCheckCommand };
|