@runa-ai/runa-cli 0.5.71 → 0.6.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-BXUJKYHC.js +1730 -0
- package/dist/cache-H63JKFYH.js +112 -0
- package/dist/check-6AB5NGWK.js +207 -0
- package/dist/chunk-22CS6EMA.js +31 -0
- package/dist/chunk-3FDQW524.js +544 -0
- package/dist/chunk-5NKWR4FF.js +254 -0
- package/dist/chunk-6AALH2ED.js +121 -0
- package/dist/chunk-6Y3LAUGL.js +35 -0
- package/dist/chunk-7QV7U6NI.js +62 -0
- package/dist/chunk-AAIE4F2U.js +140 -0
- package/dist/chunk-CCKG5R4Y.js +59 -0
- package/dist/chunk-CE3DEYFT.js +480 -0
- package/dist/chunk-DRSUEMAK.js +123 -0
- package/dist/chunk-GOGRLQNP.js +12 -0
- package/dist/chunk-HD74F6W2.js +460 -0
- package/dist/chunk-HKUWEGUX.js +36 -0
- package/dist/chunk-HPYJPB5Y.js +408 -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-JT5SUTWE.js +9 -0
- package/dist/chunk-KWX3JHCY.js +85 -0
- package/dist/chunk-M47WJJVS.js +71 -0
- package/dist/chunk-MNPMZERI.js +194 -0
- package/dist/chunk-MXRWBNIY.js +74 -0
- package/dist/chunk-NPSRD26F.js +149 -0
- package/dist/chunk-P7U52PBY.js +1149 -0
- package/dist/chunk-QDF7QXBL.js +67 -0
- package/dist/chunk-RRGQCUKT.js +48 -0
- package/dist/chunk-RZLYEO4U.js +219 -0
- package/dist/chunk-TYIAD6SB.js +74 -0
- package/dist/chunk-UU55OH7P.js +42 -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-XJBQINSA.js +351 -0
- package/dist/chunk-ZZOXM6Q4.js +8 -0
- package/dist/ci-V3PIG2GI.js +8322 -0
- package/dist/cli/index.d.ts +7 -1
- package/dist/cli/requested-command.d.ts +8 -0
- package/dist/cli-GFRZCJQR.js +661 -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/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/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/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 +0 -5
- package/dist/commands/ci/utils/ci-summary.d.ts +15 -15
- package/dist/commands/ci/utils/execa-helpers.d.ts +1 -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 +7 -1
- 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 +30 -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/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 +7 -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/contract.d.ts +2 -2
- package/dist/commands/dev/machine.d.ts +7 -31
- 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/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/config/env.d.ts +4 -4
- package/dist/config-loader-GT3HAQ7U.js +7 -0
- package/dist/db-HR7CREX2.js +15913 -0
- package/dist/dev-A7RW6XQV.js +873 -0
- package/dist/env-B47Z4747.js +2624 -0
- package/dist/env-HMMRSYCI.js +7 -0
- package/dist/env-files-K2C7O7L5.js +8 -0
- package/dist/error-handler-4EYSDOSE.js +460 -0
- package/dist/hotfix-CULKKMGS.js +1477 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +48 -42912
- package/dist/init-ELK5QCWR.js +632 -0
- package/dist/inject-test-attrs-Y5UD5P7Q.js +36 -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-C43JRZWY.js +60 -0
- package/dist/manifest-2NOQ2IMK.js +32 -0
- package/dist/prepare-32DOVHTE.js +250 -0
- package/dist/risk-detector-BXUY2WKS.js +6 -0
- package/dist/risk-detector-core-O7I7SPR7.js +166 -0
- package/dist/risk-detector-plpgsql-SGMVKYJP.js +1856 -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-IJ4ZWHMX.js +95 -0
- package/dist/telemetry-FN7V727Y.js +94 -0
- package/dist/template-check-PNG5NQ5H.js +1933 -0
- package/dist/test-QYXE5UVW.js +626 -0
- package/dist/test-gen-QPWOIEHU.js +89 -0
- package/dist/ui-RJAMCWUI.js +331 -0
- package/dist/upgrade-3SLWVNAC.js +625 -0
- package/dist/utils/config-loader.d.ts +0 -3
- package/dist/validate-SM4PXPS7.js +55 -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-TYQNEFS7.js +122 -0
- package/dist/vuln-checker-2QXGN5YT.js +2950 -0
- package/dist/watch-UCDVOQAH.js +911 -0
- package/dist/workflow-ZB5Q2PFY.js +898 -0
- package/package.json +4 -1
- 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,408 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { init_constants, detectSupabasePorts } from './chunk-VM3IWOT5.js';
|
|
4
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
5
|
+
import { execSync, spawnSync } from 'child_process';
|
|
6
|
+
import { existsSync, statSync, readFileSync } from 'fs';
|
|
7
|
+
import path, { join } from 'path';
|
|
8
|
+
import { fromPromise } from 'xstate';
|
|
9
|
+
|
|
10
|
+
createRequire(import.meta.url);
|
|
11
|
+
|
|
12
|
+
// src/commands/build/actors/setup.ts
|
|
13
|
+
init_esm_shims();
|
|
14
|
+
init_constants();
|
|
15
|
+
function needsDepsInstall(repoRoot) {
|
|
16
|
+
const nodeModulesPath = join(repoRoot, "node_modules");
|
|
17
|
+
join(repoRoot, "package.json");
|
|
18
|
+
const lockfilePath = join(repoRoot, "pnpm-lock.yaml");
|
|
19
|
+
if (!existsSync(nodeModulesPath)) {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
if (existsSync(lockfilePath)) {
|
|
23
|
+
try {
|
|
24
|
+
const nodeModulesStat = statSync(nodeModulesPath);
|
|
25
|
+
const lockfileStat = statSync(lockfilePath);
|
|
26
|
+
if (lockfileStat.mtimeMs > nodeModulesStat.mtimeMs) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
} catch {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
function extractPortFromDbUrl(dbUrl) {
|
|
36
|
+
const match = dbUrl.match(/:(\d+)\//);
|
|
37
|
+
if (!match?.[1]) return void 0;
|
|
38
|
+
const port = Number.parseInt(match[1], 10);
|
|
39
|
+
return Number.isFinite(port) && port > 0 ? port : void 0;
|
|
40
|
+
}
|
|
41
|
+
function parseSupabaseStatusDbPort(rawStatus) {
|
|
42
|
+
try {
|
|
43
|
+
const parsed = JSON.parse(rawStatus);
|
|
44
|
+
const dbUrl = (typeof parsed["DB URL"] === "string" ? parsed["DB URL"] : void 0) ?? (typeof parsed.db_url === "string" ? parsed.db_url : void 0);
|
|
45
|
+
if (dbUrl) {
|
|
46
|
+
const port = extractPortFromDbUrl(dbUrl);
|
|
47
|
+
if (port !== void 0) return port;
|
|
48
|
+
}
|
|
49
|
+
} catch {
|
|
50
|
+
}
|
|
51
|
+
const dbUrlLine = rawStatus.match(/DB URL:\s*([^\s]+)/i);
|
|
52
|
+
if (dbUrlLine?.[1]) {
|
|
53
|
+
const port = extractPortFromDbUrl(dbUrlLine[1]);
|
|
54
|
+
if (port !== void 0) return port;
|
|
55
|
+
}
|
|
56
|
+
const genericDbUrl = rawStatus.match(/postgres(?:ql)?:\/\/[^\s]+/i);
|
|
57
|
+
if (genericDbUrl?.[0]) {
|
|
58
|
+
return extractPortFromDbUrl(genericDbUrl[0]);
|
|
59
|
+
}
|
|
60
|
+
return void 0;
|
|
61
|
+
}
|
|
62
|
+
function detectRunningSupabaseDbPort(repoRoot) {
|
|
63
|
+
const statusCommands = [["status", "--output", "json"], ["status"]];
|
|
64
|
+
for (const args of statusCommands) {
|
|
65
|
+
try {
|
|
66
|
+
const result = spawnSync("supabase", args, {
|
|
67
|
+
cwd: repoRoot,
|
|
68
|
+
encoding: "utf-8",
|
|
69
|
+
timeout: 1e4
|
|
70
|
+
});
|
|
71
|
+
if (result.status !== 0 || !result.stdout) {
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const port = parseSupabaseStatusDbPort(result.stdout);
|
|
75
|
+
if (port !== void 0) {
|
|
76
|
+
return port;
|
|
77
|
+
}
|
|
78
|
+
} catch {
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return void 0;
|
|
82
|
+
}
|
|
83
|
+
function extractSupabaseProjectFromContainerName(containerName) {
|
|
84
|
+
const match = containerName.match(/^supabase_db_(.+)$/);
|
|
85
|
+
return match?.[1];
|
|
86
|
+
}
|
|
87
|
+
function findSupabaseProjectUsingPort(actualDbPort) {
|
|
88
|
+
try {
|
|
89
|
+
const dockerResult = spawnSync(
|
|
90
|
+
"docker",
|
|
91
|
+
["ps", "--filter", "name=supabase_db", "--format", "{{.Names}} {{.Ports}}"],
|
|
92
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
93
|
+
);
|
|
94
|
+
if (dockerResult.status !== 0 || !dockerResult.stdout?.trim()) {
|
|
95
|
+
return void 0;
|
|
96
|
+
}
|
|
97
|
+
const lines = dockerResult.stdout.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0);
|
|
98
|
+
for (const line of lines) {
|
|
99
|
+
const [name, ports = ""] = line.split(" ");
|
|
100
|
+
if (!name || !ports.includes(`:${actualDbPort}->`)) continue;
|
|
101
|
+
return extractSupabaseProjectFromContainerName(name);
|
|
102
|
+
}
|
|
103
|
+
for (const line of lines) {
|
|
104
|
+
const [name] = line.split(" ");
|
|
105
|
+
if (!name) continue;
|
|
106
|
+
const project = extractSupabaseProjectFromContainerName(name);
|
|
107
|
+
if (project) return project;
|
|
108
|
+
}
|
|
109
|
+
} catch {
|
|
110
|
+
}
|
|
111
|
+
return void 0;
|
|
112
|
+
}
|
|
113
|
+
function checkSupabaseStatus(repoRoot) {
|
|
114
|
+
const supabaseConfigPath = join(repoRoot, "supabase", "config.toml");
|
|
115
|
+
const configured = existsSync(supabaseConfigPath);
|
|
116
|
+
if (!configured) {
|
|
117
|
+
return { configured: false, running: false, portInUse: false };
|
|
118
|
+
}
|
|
119
|
+
const ports = detectSupabasePorts(repoRoot);
|
|
120
|
+
const actualDbPort = ports.db;
|
|
121
|
+
const reportedPort = detectRunningSupabaseDbPort(repoRoot);
|
|
122
|
+
if (reportedPort === actualDbPort) {
|
|
123
|
+
return { configured, running: true, portInUse: false, actualPort: actualDbPort };
|
|
124
|
+
}
|
|
125
|
+
try {
|
|
126
|
+
const result = spawnSync("lsof", ["-i", `:${actualDbPort}`, "-t"], {
|
|
127
|
+
encoding: "utf-8",
|
|
128
|
+
timeout: 5e3
|
|
129
|
+
});
|
|
130
|
+
if (result.status === 0 && result.stdout?.trim()) {
|
|
131
|
+
const conflictingProject = findSupabaseProjectUsingPort(actualDbPort);
|
|
132
|
+
return {
|
|
133
|
+
configured,
|
|
134
|
+
running: false,
|
|
135
|
+
portInUse: true,
|
|
136
|
+
conflictingProject,
|
|
137
|
+
actualPort: actualDbPort
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
} catch {
|
|
141
|
+
}
|
|
142
|
+
return { configured, running: false, portInUse: false, actualPort: actualDbPort };
|
|
143
|
+
}
|
|
144
|
+
function checkEnvFiles(repoRoot) {
|
|
145
|
+
const envFiles = [".env.development", ".env.preview", ".env.production"];
|
|
146
|
+
const missing = [];
|
|
147
|
+
for (const file of envFiles) {
|
|
148
|
+
if (!existsSync(join(repoRoot, file))) {
|
|
149
|
+
missing.push(file);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return missing;
|
|
153
|
+
}
|
|
154
|
+
var depsInstallActor = fromPromise(
|
|
155
|
+
async ({ input }) => {
|
|
156
|
+
const startTime = Date.now();
|
|
157
|
+
const needed = needsDepsInstall(input.repoRoot);
|
|
158
|
+
if (!needed) {
|
|
159
|
+
return {
|
|
160
|
+
needed: false,
|
|
161
|
+
installed: false,
|
|
162
|
+
durationMs: Date.now() - startTime
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
console.log(" \u26A0\uFE0F Dependencies outdated, running pnpm install...");
|
|
166
|
+
try {
|
|
167
|
+
execSync("pnpm install --frozen-lockfile", {
|
|
168
|
+
cwd: input.repoRoot,
|
|
169
|
+
stdio: input.verbose ? "inherit" : "pipe",
|
|
170
|
+
timeout: 3e5
|
|
171
|
+
// 5 minutes
|
|
172
|
+
});
|
|
173
|
+
return {
|
|
174
|
+
needed: true,
|
|
175
|
+
installed: true,
|
|
176
|
+
durationMs: Date.now() - startTime
|
|
177
|
+
};
|
|
178
|
+
} catch (_error) {
|
|
179
|
+
try {
|
|
180
|
+
execSync("pnpm install", {
|
|
181
|
+
cwd: input.repoRoot,
|
|
182
|
+
stdio: input.verbose ? "inherit" : "pipe",
|
|
183
|
+
timeout: 3e5
|
|
184
|
+
});
|
|
185
|
+
return {
|
|
186
|
+
needed: true,
|
|
187
|
+
installed: true,
|
|
188
|
+
durationMs: Date.now() - startTime
|
|
189
|
+
};
|
|
190
|
+
} catch (installError) {
|
|
191
|
+
return {
|
|
192
|
+
needed: true,
|
|
193
|
+
installed: false,
|
|
194
|
+
durationMs: Date.now() - startTime,
|
|
195
|
+
error: installError instanceof Error ? installError.message : "pnpm install failed"
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
var envCheckActor = fromPromise(
|
|
202
|
+
async ({ input }) => {
|
|
203
|
+
const missingFiles = checkEnvFiles(input.repoRoot);
|
|
204
|
+
if (missingFiles.length === 0) {
|
|
205
|
+
return {
|
|
206
|
+
configured: true,
|
|
207
|
+
missingFiles: []
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
const hasKeys = existsSync(join(input.repoRoot, ".env.keys"));
|
|
211
|
+
if (missingFiles.length > 0) {
|
|
212
|
+
const warning = hasKeys ? `Missing ${missingFiles.join(", ")}. Run 'runa env encrypt' to regenerate.` : `Missing ${missingFiles.join(", ")}. Run 'runa env pull' to configure.`;
|
|
213
|
+
console.log(` \u26A0\uFE0F ${warning}`);
|
|
214
|
+
return {
|
|
215
|
+
configured: false,
|
|
216
|
+
missingFiles,
|
|
217
|
+
warning
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
return {
|
|
221
|
+
configured: true,
|
|
222
|
+
missingFiles: []
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
var supabaseStartActor = fromPromise(
|
|
227
|
+
async ({ input }) => {
|
|
228
|
+
const { configured, running, portInUse, conflictingProject, actualPort } = checkSupabaseStatus(
|
|
229
|
+
input.repoRoot
|
|
230
|
+
);
|
|
231
|
+
if (!configured) {
|
|
232
|
+
return {
|
|
233
|
+
needed: false,
|
|
234
|
+
started: false,
|
|
235
|
+
alreadyRunning: false
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
if (running) {
|
|
239
|
+
return {
|
|
240
|
+
needed: true,
|
|
241
|
+
started: false,
|
|
242
|
+
alreadyRunning: true
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
if (portInUse) {
|
|
246
|
+
const portInfo = actualPort ? ` (port ${actualPort})` : "";
|
|
247
|
+
const warning = conflictingProject ? `Port${portInfo} in use by project '${conflictingProject}'. Run 'supabase stop --project-id ${conflictingProject}' first, or use --skip-db.` : `Port${portInfo} is already in use by another process. Stop the process or use --skip-db.`;
|
|
248
|
+
console.log(` \u26A0\uFE0F ${warning}`);
|
|
249
|
+
return {
|
|
250
|
+
needed: true,
|
|
251
|
+
started: false,
|
|
252
|
+
alreadyRunning: false,
|
|
253
|
+
warning
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
console.log(" \u26A0\uFE0F Supabase not running, starting...");
|
|
257
|
+
try {
|
|
258
|
+
execSync("supabase start", {
|
|
259
|
+
cwd: input.repoRoot,
|
|
260
|
+
stdio: input.verbose ? "inherit" : "pipe",
|
|
261
|
+
timeout: 12e4
|
|
262
|
+
// 2 minutes
|
|
263
|
+
});
|
|
264
|
+
return {
|
|
265
|
+
needed: true,
|
|
266
|
+
started: true,
|
|
267
|
+
alreadyRunning: false
|
|
268
|
+
};
|
|
269
|
+
} catch (error) {
|
|
270
|
+
const errorMsg = error instanceof Error ? error.message : "unknown error";
|
|
271
|
+
const portMatch = errorMsg.match(/supabase stop --project-id ([^\s]+)/);
|
|
272
|
+
if (portMatch) {
|
|
273
|
+
const project = portMatch[1];
|
|
274
|
+
const warning2 = `Port conflict with project '${project}'. Run 'supabase stop --project-id ${project}' first, or use --skip-db.`;
|
|
275
|
+
console.log(` \u26A0\uFE0F ${warning2}`);
|
|
276
|
+
return {
|
|
277
|
+
needed: true,
|
|
278
|
+
started: false,
|
|
279
|
+
alreadyRunning: false,
|
|
280
|
+
warning: warning2
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
const warning = `Supabase start failed. Run 'supabase start' manually.`;
|
|
284
|
+
console.log(` \u26A0\uFE0F ${warning}`);
|
|
285
|
+
return {
|
|
286
|
+
needed: true,
|
|
287
|
+
started: false,
|
|
288
|
+
alreadyRunning: false,
|
|
289
|
+
warning
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
);
|
|
294
|
+
|
|
295
|
+
// src/commands/build/guards.ts
|
|
296
|
+
init_esm_shims();
|
|
297
|
+
function shouldClean({ context }) {
|
|
298
|
+
return context.input.clean || context.input.fresh;
|
|
299
|
+
}
|
|
300
|
+
function shouldFresh({ context }) {
|
|
301
|
+
return context.input.fresh;
|
|
302
|
+
}
|
|
303
|
+
function shouldSkipForOnly({ context }, phase) {
|
|
304
|
+
const { only } = context.input;
|
|
305
|
+
if (!only || only.length === 0) return false;
|
|
306
|
+
return !only.includes(phase);
|
|
307
|
+
}
|
|
308
|
+
function shouldSkipTypes({ context }) {
|
|
309
|
+
return shouldSkipForOnly({ context }, "types");
|
|
310
|
+
}
|
|
311
|
+
function shouldSkipLint({ context }) {
|
|
312
|
+
return shouldSkipForOnly({ context }, "lint");
|
|
313
|
+
}
|
|
314
|
+
function shouldSkipBuild({ context }) {
|
|
315
|
+
return shouldSkipForOnly({ context }, "build");
|
|
316
|
+
}
|
|
317
|
+
function shouldSkipStaticAnalysis({ context }) {
|
|
318
|
+
return shouldSkipTypes({ context }) && shouldSkipLint({ context });
|
|
319
|
+
}
|
|
320
|
+
function shouldSkipDb({ context }) {
|
|
321
|
+
return context.input.skipDb || !context.hasDatabase || shouldSkipForOnly({ context }, "db");
|
|
322
|
+
}
|
|
323
|
+
function shouldSkipManifest({ context }) {
|
|
324
|
+
return context.input.skipManifest || !context.hasManifestTask || shouldSkipForOnly({ context }, "manifest");
|
|
325
|
+
}
|
|
326
|
+
function isDryRun({ context }) {
|
|
327
|
+
return context.input.check;
|
|
328
|
+
}
|
|
329
|
+
function shouldSkipSetup({ context }) {
|
|
330
|
+
return context.input.noSetup;
|
|
331
|
+
}
|
|
332
|
+
function isE2EMode({ context }) {
|
|
333
|
+
return context.input.e2e;
|
|
334
|
+
}
|
|
335
|
+
function detectDatabase(repoRoot) {
|
|
336
|
+
const configPath = path.join(repoRoot, "runa.config.ts");
|
|
337
|
+
if (!existsSync(configPath)) {
|
|
338
|
+
const jsConfigPath = path.join(repoRoot, "runa.config.js");
|
|
339
|
+
if (!existsSync(jsConfigPath)) {
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
const supabaseDir = path.join(repoRoot, "supabase");
|
|
344
|
+
if (existsSync(supabaseDir)) {
|
|
345
|
+
return true;
|
|
346
|
+
}
|
|
347
|
+
const databasePkg = path.join(repoRoot, "packages", "database");
|
|
348
|
+
if (existsSync(databasePkg)) {
|
|
349
|
+
return true;
|
|
350
|
+
}
|
|
351
|
+
return false;
|
|
352
|
+
}
|
|
353
|
+
function detectManifestTask(repoRoot) {
|
|
354
|
+
const runaConfigPath = path.join(repoRoot, "runa.config.ts");
|
|
355
|
+
if (existsSync(runaConfigPath)) {
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
const rootPkgPath = path.join(repoRoot, "package.json");
|
|
359
|
+
if (hasXStateDependency(rootPkgPath)) {
|
|
360
|
+
return true;
|
|
361
|
+
}
|
|
362
|
+
const appDirs = ["apps/web", "apps/app", "apps/dashboard", "app"];
|
|
363
|
+
for (const appDir of appDirs) {
|
|
364
|
+
const appPkgPath = path.join(repoRoot, appDir, "package.json");
|
|
365
|
+
if (hasXStateDependency(appPkgPath)) {
|
|
366
|
+
return true;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
return false;
|
|
370
|
+
}
|
|
371
|
+
function hasXStateDependency(pkgPath) {
|
|
372
|
+
if (!existsSync(pkgPath)) {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
try {
|
|
376
|
+
const content = readFileSync(pkgPath, "utf-8");
|
|
377
|
+
const pkg = JSON.parse(content);
|
|
378
|
+
const allDeps = {
|
|
379
|
+
...pkg.dependencies ?? {},
|
|
380
|
+
...pkg.devDependencies ?? {}
|
|
381
|
+
};
|
|
382
|
+
return Boolean(
|
|
383
|
+
allDeps.xstate || allDeps["@xstate/react"] || allDeps["@runa-ai/runa-xstate-test-plugin"] || allDeps["@runa-ai/runa"]
|
|
384
|
+
// SDK includes XState support
|
|
385
|
+
);
|
|
386
|
+
} catch {
|
|
387
|
+
return false;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
function detectTurbo(repoRoot) {
|
|
391
|
+
const turboJsonPath = path.join(repoRoot, "turbo.json");
|
|
392
|
+
return existsSync(turboJsonPath);
|
|
393
|
+
}
|
|
394
|
+
var guards = {
|
|
395
|
+
shouldClean,
|
|
396
|
+
shouldFresh,
|
|
397
|
+
shouldSkipTypes,
|
|
398
|
+
shouldSkipLint,
|
|
399
|
+
shouldSkipBuild,
|
|
400
|
+
shouldSkipStaticAnalysis,
|
|
401
|
+
shouldSkipDb,
|
|
402
|
+
shouldSkipManifest,
|
|
403
|
+
shouldSkipSetup,
|
|
404
|
+
isDryRun,
|
|
405
|
+
isE2EMode
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
export { checkSupabaseStatus, depsInstallActor, detectDatabase, detectManifestTask, detectTurbo, envCheckActor, guards, supabaseStartActor };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
4
|
+
|
|
5
|
+
createRequire(import.meta.url);
|
|
6
|
+
|
|
7
|
+
// src/internal/machines/snapshot-helpers.ts
|
|
8
|
+
init_esm_shims();
|
|
9
|
+
function getSnapshotStateName(snapshot) {
|
|
10
|
+
if (typeof snapshot.value === "string") {
|
|
11
|
+
return snapshot.value;
|
|
12
|
+
}
|
|
13
|
+
if (!snapshot.value || typeof snapshot.value !== "object") {
|
|
14
|
+
return "unknown";
|
|
15
|
+
}
|
|
16
|
+
const entries = Object.entries(snapshot.value);
|
|
17
|
+
if (entries.length === 0) {
|
|
18
|
+
return "unknown";
|
|
19
|
+
}
|
|
20
|
+
const [parent, child] = entries[0];
|
|
21
|
+
if (typeof child === "string") {
|
|
22
|
+
return `${parent}.${child}`;
|
|
23
|
+
}
|
|
24
|
+
return parent;
|
|
25
|
+
}
|
|
26
|
+
function isSnapshotComplete(snapshot) {
|
|
27
|
+
return snapshot.status === "done";
|
|
28
|
+
}
|
|
29
|
+
function getErrorMessage(error) {
|
|
30
|
+
return error instanceof Error ? error.message : String(error);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { getErrorMessage, getSnapshotStateName, isSnapshotComplete };
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
4
|
+
|
|
5
|
+
createRequire(import.meta.url);
|
|
6
|
+
|
|
7
|
+
// src/commands/ci/utils/env-security.ts
|
|
8
|
+
init_esm_shims();
|
|
9
|
+
var SENSITIVE_ENV_PATTERNS = [
|
|
10
|
+
// Database credentials
|
|
11
|
+
/^DATABASE_URL$/i,
|
|
12
|
+
/^DRIZZLE_.*URL$/i,
|
|
13
|
+
/^.*_DATABASE_URL$/i,
|
|
14
|
+
/^PGPASSWORD$/i,
|
|
15
|
+
// Supabase
|
|
16
|
+
/^SUPABASE_.*KEY$/i,
|
|
17
|
+
/^SUPABASE_.*TOKEN$/i,
|
|
18
|
+
/^SUPABASE_.*SECRET$/i,
|
|
19
|
+
/^SUPABASE_ACCESS_TOKEN$/i,
|
|
20
|
+
// GitHub
|
|
21
|
+
/^GITHUB_TOKEN$/i,
|
|
22
|
+
/^GH_TOKEN$/i,
|
|
23
|
+
/^GITHUB_PAT$/i,
|
|
24
|
+
// Generic secrets
|
|
25
|
+
/^.*_SECRET$/i,
|
|
26
|
+
/^.*_PASSWORD$/i,
|
|
27
|
+
/^.*_TOKEN$/i,
|
|
28
|
+
/^.*_API_KEY$/i,
|
|
29
|
+
/^.*_PRIVATE_KEY$/i,
|
|
30
|
+
/^.*_CREDENTIALS$/i,
|
|
31
|
+
// Encryption keys
|
|
32
|
+
/^DOTENV_PRIVATE_KEY.*$/i,
|
|
33
|
+
/^ENCRYPTION_KEY$/i,
|
|
34
|
+
// Cloud providers
|
|
35
|
+
/^AWS_SECRET_ACCESS_KEY$/i,
|
|
36
|
+
/^AZURE_.*_KEY$/i,
|
|
37
|
+
/^GCP_.*_KEY$/i,
|
|
38
|
+
// CI-specific secrets
|
|
39
|
+
/^RUNA_APP_API_TOKEN$/i,
|
|
40
|
+
/^VERCEL_TOKEN$/i
|
|
41
|
+
];
|
|
42
|
+
var SAFE_ENV_PASSTHROUGH = [
|
|
43
|
+
// Standard shell environment
|
|
44
|
+
"PATH",
|
|
45
|
+
"HOME",
|
|
46
|
+
"USER",
|
|
47
|
+
"SHELL",
|
|
48
|
+
"LANG",
|
|
49
|
+
"LC_ALL",
|
|
50
|
+
"LC_CTYPE",
|
|
51
|
+
"TERM",
|
|
52
|
+
"TMPDIR",
|
|
53
|
+
"TZ",
|
|
54
|
+
// Node.js
|
|
55
|
+
"NODE_ENV",
|
|
56
|
+
"NODE_PATH",
|
|
57
|
+
"NODE_OPTIONS",
|
|
58
|
+
"npm_config_registry",
|
|
59
|
+
// CI environment (non-sensitive)
|
|
60
|
+
"CI",
|
|
61
|
+
"GITHUB_ACTIONS",
|
|
62
|
+
"GITHUB_WORKFLOW",
|
|
63
|
+
"GITHUB_RUN_ID",
|
|
64
|
+
"GITHUB_RUN_NUMBER",
|
|
65
|
+
"GITHUB_JOB",
|
|
66
|
+
"GITHUB_ACTION",
|
|
67
|
+
"GITHUB_EVENT_NAME",
|
|
68
|
+
"GITHUB_EVENT_PATH",
|
|
69
|
+
"GITHUB_WORKSPACE",
|
|
70
|
+
"GITHUB_SHA",
|
|
71
|
+
"GITHUB_REF",
|
|
72
|
+
"GITHUB_REF_NAME",
|
|
73
|
+
"GITHUB_HEAD_REF",
|
|
74
|
+
"GITHUB_BASE_REF",
|
|
75
|
+
"GITHUB_ACTOR",
|
|
76
|
+
"GITHUB_REPOSITORY",
|
|
77
|
+
"GITHUB_REPOSITORY_OWNER",
|
|
78
|
+
"GITHUB_OUTPUT",
|
|
79
|
+
"GITHUB_STEP_SUMMARY",
|
|
80
|
+
"GITHUB_ENV",
|
|
81
|
+
"RUNNER_OS",
|
|
82
|
+
"RUNNER_ARCH",
|
|
83
|
+
"RUNNER_NAME",
|
|
84
|
+
"RUNNER_TOOL_CACHE",
|
|
85
|
+
"RUNNER_TEMP",
|
|
86
|
+
// Vercel (non-sensitive)
|
|
87
|
+
"VERCEL",
|
|
88
|
+
"VERCEL_ENV",
|
|
89
|
+
"VERCEL_URL",
|
|
90
|
+
"VERCEL_GIT_COMMIT_SHA",
|
|
91
|
+
"VERCEL_GIT_COMMIT_REF",
|
|
92
|
+
// Supabase (non-sensitive)
|
|
93
|
+
"NEXT_PUBLIC_SUPABASE_URL",
|
|
94
|
+
// runa debug/config (non-sensitive)
|
|
95
|
+
"RUNA_DEBUG",
|
|
96
|
+
"RUNA_SKIP_SCHEMA_RISK",
|
|
97
|
+
// dotenvx (non-sensitive)
|
|
98
|
+
"DOTENVX_QUIET"
|
|
99
|
+
];
|
|
100
|
+
function isSensitiveEnvVar(name) {
|
|
101
|
+
return SENSITIVE_ENV_PATTERNS.some((pattern) => pattern.test(name));
|
|
102
|
+
}
|
|
103
|
+
function getSafeEnv(additionalSafe = [], requiredSecrets = []) {
|
|
104
|
+
const result = {};
|
|
105
|
+
const allowedNames = /* @__PURE__ */ new Set([...SAFE_ENV_PASSTHROUGH, ...additionalSafe]);
|
|
106
|
+
for (const name of allowedNames) {
|
|
107
|
+
if (process.env[name] !== void 0) {
|
|
108
|
+
result[name] = process.env[name];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
for (const name of requiredSecrets) {
|
|
112
|
+
if (process.env[name] !== void 0) {
|
|
113
|
+
result[name] = process.env[name];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
118
|
+
function getFilteredEnv() {
|
|
119
|
+
const result = {};
|
|
120
|
+
for (const [name, value] of Object.entries(process.env)) {
|
|
121
|
+
if (!isSensitiveEnvVar(name)) {
|
|
122
|
+
result[name] = value;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return result;
|
|
126
|
+
}
|
|
127
|
+
var SECRET_VALUE_PATTERNS = [
|
|
128
|
+
// PostgreSQL URLs with passwords
|
|
129
|
+
{
|
|
130
|
+
pattern: /postgresql:\/\/([^/:@]+):([^@]+)@/gi,
|
|
131
|
+
replacement: "postgresql://$1:***@"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
pattern: /postgres:\/\/([^/:@]+):([^@]+)@/gi,
|
|
135
|
+
replacement: "postgres://$1:***@"
|
|
136
|
+
},
|
|
137
|
+
// Generic URL with credentials
|
|
138
|
+
{
|
|
139
|
+
pattern: /https?:\/\/([^/:@]+):([^@]+)@/gi,
|
|
140
|
+
replacement: "https://$1:***@"
|
|
141
|
+
},
|
|
142
|
+
// Supabase keys (long base64-like strings)
|
|
143
|
+
{
|
|
144
|
+
pattern: /eyJ[A-Za-z0-9_-]{100,}/g,
|
|
145
|
+
replacement: "[SUPABASE_KEY_REDACTED]"
|
|
146
|
+
},
|
|
147
|
+
// GitHub tokens
|
|
148
|
+
{
|
|
149
|
+
pattern: /gh[ps]_[A-Za-z0-9_]{36,}/g,
|
|
150
|
+
replacement: "[GITHUB_TOKEN_REDACTED]"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
pattern: /github_pat_[A-Za-z0-9_]{36,}/g,
|
|
154
|
+
replacement: "[GITHUB_PAT_REDACTED]"
|
|
155
|
+
},
|
|
156
|
+
// Generic API keys (32+ char alphanumeric)
|
|
157
|
+
{
|
|
158
|
+
pattern: /[A-Za-z0-9_-]{40,}/g,
|
|
159
|
+
replacement: (match) => {
|
|
160
|
+
if (/[a-z]/.test(match) && /[A-Z0-9_]/.test(match)) {
|
|
161
|
+
return `[KEY_REDACTED:${match.length}chars]`;
|
|
162
|
+
}
|
|
163
|
+
return match;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
];
|
|
167
|
+
function redactSecrets(input) {
|
|
168
|
+
let result = input;
|
|
169
|
+
for (const { pattern, replacement } of SECRET_VALUE_PATTERNS) {
|
|
170
|
+
if (typeof replacement === "function") {
|
|
171
|
+
result = result.replace(pattern, replacement);
|
|
172
|
+
} else {
|
|
173
|
+
result = result.replace(pattern, replacement);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return result;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export { getFilteredEnv, getSafeEnv, redactSecrets };
|