@runa-ai/runa-cli 0.5.72 → 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 +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/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 -42995
- 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
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Pattern: Pure functions - input → formatted string
|
|
6
6
|
*/
|
|
7
7
|
import type { LayerResult } from '../../types.js';
|
|
8
|
+
import type { GitHubEnv } from '../github-comment-types.js';
|
|
8
9
|
import { BLOCKING_LAYERS } from '../github-comment-types.js';
|
|
9
10
|
/**
|
|
10
11
|
* Format duration in human-readable format.
|
|
@@ -54,6 +55,10 @@ export { BLOCKING_LAYERS };
|
|
|
54
55
|
* Returns true if layers 0-3 are all 'passed' or 'skipped'.
|
|
55
56
|
*/
|
|
56
57
|
export declare function checkBlockingLayersPassed(layerResults: Record<number, LayerResult>): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Get GitHub environment from process.env.
|
|
60
|
+
*/
|
|
61
|
+
export declare function getGitHubEnv(): GitHubEnv;
|
|
57
62
|
/**
|
|
58
63
|
* Format skipped layers section for PR comment.
|
|
59
64
|
*
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Purpose: Export all section generators for GitHub PR comments
|
|
5
5
|
*/
|
|
6
|
-
export { generateCommentBody
|
|
7
|
-
export { BLOCKING_LAYERS, checkBlockingLayersPassed, formatDuration, formatGitDiffDetails, formatLayerResults, formatSingleLayer, formatSqlDetails, getStatusIcon, } from './format-helpers.js';
|
|
6
|
+
export { generateCommentBody } from './final-comment.js';
|
|
7
|
+
export { BLOCKING_LAYERS, checkBlockingLayersPassed, formatDuration, formatGitDiffDetails, formatLayerResults, formatSingleLayer, formatSqlDetails, getGitHubEnv, getStatusIcon, } from './format-helpers.js';
|
|
8
8
|
export { generateProgressCommentBody } from './progress-comment.js';
|
|
9
9
|
export { formatSchemaMatrix } from './schema-matrix.js';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { InstallPgTapInput } from './actors/db/pgtap-install.js';
|
|
2
|
+
import type { SetupRolesInput } from './actors/db/setup-roles.js';
|
|
3
|
+
import type { RunLayersInput, RunLayersOutput } from './actors/test/run-layers.js';
|
|
4
|
+
import type { CiContext, LayerResult } from './types.js';
|
|
5
|
+
export declare function createInstallPgTapInput(context: CiContext): InstallPgTapInput;
|
|
6
|
+
export declare function createSetupRolesInput(context: CiContext): SetupRolesInput;
|
|
7
|
+
export declare function mergeSetupRolesSupabase(context: CiContext, appDatabaseUrl?: string): {
|
|
8
|
+
appDatabaseUrl: string | undefined;
|
|
9
|
+
supabaseUrl: string;
|
|
10
|
+
anonKey: string;
|
|
11
|
+
databaseUrlRaw: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function createStaticChecksInput(context: CiContext): {
|
|
14
|
+
repoRoot: string;
|
|
15
|
+
tmpDir: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function createBuildAndPlaywrightInput(context: CiContext): {
|
|
18
|
+
repoRoot: string;
|
|
19
|
+
tmpDir: string;
|
|
20
|
+
env: Record<string, string>;
|
|
21
|
+
isCI: boolean;
|
|
22
|
+
skipPlaywright: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare function createAppStartInput(context: CiContext): {
|
|
25
|
+
repoRoot: string;
|
|
26
|
+
tmpDir: string;
|
|
27
|
+
appDir: string;
|
|
28
|
+
port: number;
|
|
29
|
+
env: Record<string, string>;
|
|
30
|
+
};
|
|
31
|
+
export declare function createCapabilitiesInput(context: CiContext): {
|
|
32
|
+
repoRoot: string;
|
|
33
|
+
tmpDir: string;
|
|
34
|
+
databaseUrlApp: string;
|
|
35
|
+
baseUrl: string;
|
|
36
|
+
selectedLayers: number[];
|
|
37
|
+
};
|
|
38
|
+
export declare function createRunCoreTestsInput(context: CiContext): RunLayersInput;
|
|
39
|
+
export declare function deriveCoreLayerResults(output: RunLayersOutput): Record<number, LayerResult>;
|
|
40
|
+
//# sourceMappingURL=machine-execution-helpers.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LayerContentResult } from '../commands/ci-layer-content.js';
|
|
2
|
+
import type { UpsertCommentInput } from './actors/finalize/github.js';
|
|
3
|
+
import type { WriteSummaryInput } from './actors/finalize/summary.js';
|
|
4
|
+
import type { RunLayersInput } from './actors/test/run-layers.js';
|
|
5
|
+
import type { CiContext } from './types.js';
|
|
6
|
+
export declare const CI_COMMENT_MARKER = "<!-- runa-ci-report -->";
|
|
7
|
+
export declare function filterRunnableLayers(selectedLayers: number[], layerContent: LayerContentResult | null | undefined): number[];
|
|
8
|
+
export declare function extractLayerSkipReasons(layerContent: LayerContentResult | null | undefined): Record<number, string>;
|
|
9
|
+
export declare function createInitialCommentRequest(context: CiContext): UpsertCommentInput;
|
|
10
|
+
export declare function createIntermediateCommentRequest(context: CiContext): UpsertCommentInput;
|
|
11
|
+
export declare function createFinalCommentRequest(context: CiContext): UpsertCommentInput;
|
|
12
|
+
export declare function createWriteSummaryRequest(context: CiContext): WriteSummaryInput;
|
|
13
|
+
export declare function createE2ERunLayersInput(context: CiContext): RunLayersInput;
|
|
14
|
+
//# sourceMappingURL=machine-state-helpers.d.ts.map
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
import { type SnapshotFrom } from 'xstate';
|
|
47
47
|
import type { CiContext, CiEvent } from './types.js';
|
|
48
48
|
export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent, {
|
|
49
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").StaticChecksOutput, import("./index.js").StaticChecksInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").CapabilitiesOutput, import("./index.js").CapabilitiesInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").AppStartOutput, import("./index.js").AppStartInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").
|
|
49
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").StaticChecksOutput, import("./index.js").StaticChecksInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").CapabilitiesOutput, import("./index.js").CapabilitiesInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").AppStartOutput, import("./index.js").AppStartInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").PlaywrightInstallOutput, import("./index.js").PlaywrightInstallInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").SyncSchemaOutput, import("./index.js").SyncSchemaInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").ApplySeedsOutput, import("./index.js").ApplySeedsInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").ProductionPreviewOutput, import("./index.js").ProductionPreviewInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/setup/local.js").LocalSetupOutput, import("./actors/setup/local.js").LocalSetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/setup/pr-local.js").PrLocalSetupOutput, import("./actors/setup/pr-local.js").PrLocalSetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").ResetDbOutput, import("./index.js").ResetDbInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").PullProductionOutput, import("./index.js").PullProductionInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").CollectSchemaStatsOutput, import("./index.js").CollectSchemaStatsInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").SetupRolesOutput, import("./index.js").SetupRolesInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").InstallPgTapOutput, import("./index.js").InstallPgTapInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").AppBuildOutput, import("./index.js").AppBuildInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").BuildAndPlaywrightOutput, import("./index.js").BuildAndPlaywrightInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").RunLayersOutput, import("./index.js").RunLayersInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").WriteSummaryOutput, import("./index.js").WriteSummaryInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").UpsertCommentOutput, import("./index.js").UpsertCommentInput, import("xstate").EventObject>> | undefined;
|
|
50
50
|
}, {
|
|
51
51
|
src: "staticChecks";
|
|
52
52
|
logic: import("xstate").PromiseActorLogic<import("./index.js").StaticChecksOutput, import("./index.js").StaticChecksInput, import("xstate").EventObject>;
|
|
@@ -59,6 +59,10 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
59
59
|
src: "appStart";
|
|
60
60
|
logic: import("xstate").PromiseActorLogic<import("./index.js").AppStartOutput, import("./index.js").AppStartInput, import("xstate").EventObject>;
|
|
61
61
|
id: string | undefined;
|
|
62
|
+
} | {
|
|
63
|
+
src: "playwrightInstall";
|
|
64
|
+
logic: import("xstate").PromiseActorLogic<import("./index.js").PlaywrightInstallOutput, import("./index.js").PlaywrightInstallInput, import("xstate").EventObject>;
|
|
65
|
+
id: string | undefined;
|
|
62
66
|
} | {
|
|
63
67
|
src: "syncSchema";
|
|
64
68
|
logic: import("xstate").PromiseActorLogic<import("./index.js").SyncSchemaOutput, import("./index.js").SyncSchemaInput, import("xstate").EventObject>;
|
|
@@ -71,10 +75,6 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
71
75
|
src: "productionPreview";
|
|
72
76
|
logic: import("xstate").PromiseActorLogic<import("./index.js").ProductionPreviewOutput, import("./index.js").ProductionPreviewInput, import("xstate").EventObject>;
|
|
73
77
|
id: string | undefined;
|
|
74
|
-
} | {
|
|
75
|
-
src: "playwrightInstall";
|
|
76
|
-
logic: import("xstate").PromiseActorLogic<import("./index.js").PlaywrightInstallOutput, import("./index.js").PlaywrightInstallInput, import("xstate").EventObject>;
|
|
77
|
-
id: string | undefined;
|
|
78
78
|
} | {
|
|
79
79
|
src: "localSetup";
|
|
80
80
|
logic: import("xstate").PromiseActorLogic<import("./actors/setup/local.js").LocalSetupOutput, import("./actors/setup/local.js").LocalSetupInput, import("xstate").EventObject>;
|
|
@@ -168,14 +168,14 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
168
168
|
} | {
|
|
169
169
|
type: "allTestsPassed";
|
|
170
170
|
params: unknown;
|
|
171
|
-
}, never, "
|
|
171
|
+
}, never, "done" | "failed" | "staticChecks" | "idle" | "capabilities" | "appStart" | "syncSchema" | "applySeeds" | "productionPreview" | "pullProduction" | "collectSchemaStats" | "setupRoles" | "installPgTap" | "buildAndPlaywright" | "initialComment" | "dbReset" | "decidePath" | "runCoreTests" | "coreTestsFailed" | "coreTestsComplete" | {
|
|
172
172
|
setup: "local" | "resolving" | "prLocal" | "complete";
|
|
173
173
|
} | {
|
|
174
174
|
finalize: "writeSummary" | "complete" | "postComment";
|
|
175
175
|
} | {
|
|
176
176
|
e2ePhase: {
|
|
177
177
|
intermediateComment: "done" | "checking" | "posting";
|
|
178
|
-
e2eTests: "
|
|
178
|
+
e2eTests: "done" | "running";
|
|
179
179
|
};
|
|
180
180
|
}, string, {
|
|
181
181
|
[x: string]: unknown;
|
|
@@ -204,7 +204,7 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
204
204
|
output?: "json" | "human" | undefined;
|
|
205
205
|
config?: string | undefined;
|
|
206
206
|
phase?: "all" | "test" | undefined;
|
|
207
|
-
dbMode?: "
|
|
207
|
+
dbMode?: "auto" | "local" | undefined;
|
|
208
208
|
branchName?: string | undefined;
|
|
209
209
|
skipStaticChecks?: boolean | undefined;
|
|
210
210
|
skipBuild?: boolean | undefined;
|
|
@@ -217,16 +217,16 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
217
217
|
layers?: number[] | undefined;
|
|
218
218
|
}, {
|
|
219
219
|
mode: "ci-local" | "ci-pr-local";
|
|
220
|
-
status: "
|
|
220
|
+
status: "success" | "timeout" | "failure" | "cancelled";
|
|
221
221
|
repoKind: "unknown" | "monorepo" | "pj-repo";
|
|
222
222
|
steps: Record<string, {
|
|
223
|
-
status: "timeout" | "
|
|
223
|
+
status: "timeout" | "skipped" | "failed" | "passed";
|
|
224
224
|
exitCode?: number | undefined;
|
|
225
225
|
logPath?: string | undefined;
|
|
226
226
|
error?: string | undefined;
|
|
227
227
|
}>;
|
|
228
228
|
layers: Record<number, {
|
|
229
|
-
status: "
|
|
229
|
+
status: "killed" | "timeout" | "skipped" | "failed" | "passed";
|
|
230
230
|
exitCode: number;
|
|
231
231
|
passed?: number | undefined;
|
|
232
232
|
total?: number | undefined;
|
|
@@ -234,7 +234,7 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
234
234
|
flaky?: number | undefined;
|
|
235
235
|
logPath?: string | undefined;
|
|
236
236
|
description?: string | undefined;
|
|
237
|
-
level?: "
|
|
237
|
+
level?: "warning" | "blocking" | "reportOnly" | undefined;
|
|
238
238
|
}>;
|
|
239
239
|
durationMs: number;
|
|
240
240
|
exitCode: 0 | 1 | 2;
|
|
@@ -221,11 +221,6 @@ export declare function createInitialContext(input: CiInput): CiContext;
|
|
|
221
221
|
* Create output from context.
|
|
222
222
|
*/
|
|
223
223
|
export declare function createOutput(context: CiContext): CiOutput;
|
|
224
|
-
/**
|
|
225
|
-
* Extract error message from unknown error value.
|
|
226
|
-
* Generic helper for try-catch blocks in actors.
|
|
227
|
-
*/
|
|
228
|
-
export declare function getErrorMessage(error: unknown): string;
|
|
229
224
|
/**
|
|
230
225
|
* Extract error message from XState onError event.
|
|
231
226
|
* Used in onError handlers throughout the machine.
|
|
@@ -7,25 +7,25 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
export declare const CiLayerStatusSchema: z.ZodEnum<{
|
|
10
|
+
killed: "killed";
|
|
10
11
|
timeout: "timeout";
|
|
11
|
-
passed: "passed";
|
|
12
|
-
failed: "failed";
|
|
13
12
|
skipped: "skipped";
|
|
14
|
-
|
|
13
|
+
failed: "failed";
|
|
14
|
+
passed: "passed";
|
|
15
15
|
}>;
|
|
16
16
|
export type CiLayerStatus = z.output<typeof CiLayerStatusSchema>;
|
|
17
17
|
export declare const LayerBlockingLevelSchema: z.ZodEnum<{
|
|
18
|
-
blocking: "blocking";
|
|
19
18
|
warning: "warning";
|
|
19
|
+
blocking: "blocking";
|
|
20
20
|
reportOnly: "reportOnly";
|
|
21
21
|
}>;
|
|
22
22
|
export type LayerBlockingLevel = z.output<typeof LayerBlockingLevelSchema>;
|
|
23
23
|
export declare const CiStepStatusSchema: z.ZodEnum<{
|
|
24
|
+
killed: "killed";
|
|
24
25
|
timeout: "timeout";
|
|
25
|
-
passed: "passed";
|
|
26
|
-
failed: "failed";
|
|
27
26
|
skipped: "skipped";
|
|
28
|
-
|
|
27
|
+
failed: "failed";
|
|
28
|
+
passed: "passed";
|
|
29
29
|
}>;
|
|
30
30
|
export type CiStepStatus = z.output<typeof CiStepStatusSchema>;
|
|
31
31
|
export declare const CiSummarySchema: z.ZodObject<{
|
|
@@ -39,8 +39,8 @@ export declare const CiSummarySchema: z.ZodObject<{
|
|
|
39
39
|
"ci prod-apply": "ci prod-apply";
|
|
40
40
|
}>;
|
|
41
41
|
status: z.ZodEnum<{
|
|
42
|
-
timeout: "timeout";
|
|
43
42
|
success: "success";
|
|
43
|
+
timeout: "timeout";
|
|
44
44
|
failure: "failure";
|
|
45
45
|
cancelled: "cancelled";
|
|
46
46
|
}>;
|
|
@@ -55,22 +55,22 @@ export declare const CiSummarySchema: z.ZodObject<{
|
|
|
55
55
|
detected: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
56
56
|
steps: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
57
57
|
status: z.ZodEnum<{
|
|
58
|
+
killed: "killed";
|
|
58
59
|
timeout: "timeout";
|
|
59
|
-
passed: "passed";
|
|
60
|
-
failed: "failed";
|
|
61
60
|
skipped: "skipped";
|
|
62
|
-
|
|
61
|
+
failed: "failed";
|
|
62
|
+
passed: "passed";
|
|
63
63
|
}>;
|
|
64
64
|
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
65
65
|
logPath: z.ZodOptional<z.ZodString>;
|
|
66
66
|
}, z.core.$strict>>>;
|
|
67
67
|
layers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
68
68
|
status: z.ZodEnum<{
|
|
69
|
+
killed: "killed";
|
|
69
70
|
timeout: "timeout";
|
|
70
|
-
passed: "passed";
|
|
71
|
-
failed: "failed";
|
|
72
71
|
skipped: "skipped";
|
|
73
|
-
|
|
72
|
+
failed: "failed";
|
|
73
|
+
passed: "passed";
|
|
74
74
|
}>;
|
|
75
75
|
exitCode: z.ZodNumber;
|
|
76
76
|
logPath: z.ZodOptional<z.ZodString>;
|
|
@@ -78,8 +78,8 @@ export declare const CiSummarySchema: z.ZodObject<{
|
|
|
78
78
|
passed: z.ZodOptional<z.ZodNumber>;
|
|
79
79
|
total: z.ZodOptional<z.ZodNumber>;
|
|
80
80
|
level: z.ZodOptional<z.ZodEnum<{
|
|
81
|
-
blocking: "blocking";
|
|
82
81
|
warning: "warning";
|
|
82
|
+
blocking: "blocking";
|
|
83
83
|
reportOnly: "reportOnly";
|
|
84
84
|
}>>;
|
|
85
85
|
}, z.core.$strict>>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { DbApplyInput } from '../contract.js';
|
|
2
|
+
import { type ApplyResult } from './shared.js';
|
|
3
|
+
/**
|
|
4
|
+
* Classify whether a psql error is deferrable (missing dependency) or not.
|
|
5
|
+
* Non-deferrable errors (syntax, permission) fail immediately in 1st pass.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isDeferrableError(stderr: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Apply idempotent schemas (extensions, RBAC, cleanup) and set role passwords.
|
|
10
|
+
*
|
|
11
|
+
* @param pass - 'pre' = 1st pass (graceful skip on error), 'post' = 2nd pass (strict)
|
|
12
|
+
*/
|
|
13
|
+
export declare const applyIdempotentSchemas: import("xstate").PromiseActorLogic<ApplyResult, {
|
|
14
|
+
input: DbApplyInput;
|
|
15
|
+
targetDir: string;
|
|
16
|
+
pass: "pre" | "post";
|
|
17
|
+
}, import("xstate").EventObject>;
|
|
18
|
+
export interface IdempotentPreviewResult {
|
|
19
|
+
files: string[];
|
|
20
|
+
riskSummary: {
|
|
21
|
+
high: number;
|
|
22
|
+
medium: number;
|
|
23
|
+
low: number;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Preview idempotent schema files and their risks in check mode.
|
|
28
|
+
* Does NOT apply anything — only lists files and runs risk detection.
|
|
29
|
+
*/
|
|
30
|
+
export declare const previewIdempotentSchemas: import("xstate").PromiseActorLogic<IdempotentPreviewResult, {
|
|
31
|
+
input: DbApplyInput;
|
|
32
|
+
targetDir: string;
|
|
33
|
+
}, import("xstate").EventObject>;
|
|
34
|
+
//# sourceMappingURL=idempotent-actors.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DbApplyInput } from '../contract.js';
|
|
2
|
+
/**
|
|
3
|
+
* Acquire advisory lock to protect the entire migration lifecycle.
|
|
4
|
+
*/
|
|
5
|
+
export declare const acquireLock: import("xstate").PromiseActorLogic<{
|
|
6
|
+
acquired: boolean;
|
|
7
|
+
}, {
|
|
8
|
+
input: DbApplyInput;
|
|
9
|
+
}, import("xstate").EventObject>;
|
|
10
|
+
/**
|
|
11
|
+
* Release advisory lock after the migration lifecycle completes.
|
|
12
|
+
*/
|
|
13
|
+
export declare const releaseLock: import("xstate").PromiseActorLogic<void, {
|
|
14
|
+
input: DbApplyInput;
|
|
15
|
+
}, import("xstate").EventObject>;
|
|
16
|
+
//# sourceMappingURL=lock-actors.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DbApplyInput } from '../contract.js';
|
|
2
|
+
import { type PgSchemaDiffResult } from '../helpers/fresh-db-handler.js';
|
|
3
|
+
export type { PgSchemaDiffResult } from '../helpers/fresh-db-handler.js';
|
|
4
|
+
/**
|
|
5
|
+
* Apply schema changes using pg-schema-diff (or direct psql for fresh DB).
|
|
6
|
+
*
|
|
7
|
+
* Extension Support:
|
|
8
|
+
* If pgSchemaDiff.shadowDbExtensions is configured in runa.config.ts,
|
|
9
|
+
* creates a shadow database with those extensions installed for type resolution.
|
|
10
|
+
* This enables pg-schema-diff to recognize extension-defined types like
|
|
11
|
+
* PostGIS geometry or pgvector vector.
|
|
12
|
+
*
|
|
13
|
+
* @see https://github.com/stripe/pg-schema-diff/pull/194
|
|
14
|
+
*/
|
|
15
|
+
export declare const applyPgSchemaDiff: import("xstate").PromiseActorLogic<PgSchemaDiffResult, {
|
|
16
|
+
input: DbApplyInput;
|
|
17
|
+
targetDir: string;
|
|
18
|
+
}, import("xstate").EventObject>;
|
|
19
|
+
/**
|
|
20
|
+
* Validate that expected partitions (from idempotent/*.sql) exist in the database.
|
|
21
|
+
*
|
|
22
|
+
* Non-blocking: failures are logged as warnings, never cause the pipeline to fail.
|
|
23
|
+
* This runs after the 2nd idempotent pass so all partitions should exist.
|
|
24
|
+
*/
|
|
25
|
+
export declare const validatePartitions: import("xstate").PromiseActorLogic<{
|
|
26
|
+
warnings: string[];
|
|
27
|
+
}, {
|
|
28
|
+
input: DbApplyInput;
|
|
29
|
+
targetDir: string;
|
|
30
|
+
}, import("xstate").EventObject>;
|
|
31
|
+
//# sourceMappingURL=pg-schema-diff-actors.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DbApplyInput } from '../contract.js';
|
|
2
|
+
/**
|
|
3
|
+
* Apply seeds.
|
|
4
|
+
*/
|
|
5
|
+
export declare const applySeeds: import("xstate").PromiseActorLogic<{
|
|
6
|
+
applied: boolean;
|
|
7
|
+
}, {
|
|
8
|
+
input: DbApplyInput;
|
|
9
|
+
targetDir: string;
|
|
10
|
+
}, import("xstate").EventObject>;
|
|
11
|
+
//# sourceMappingURL=seed-actors.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DbApplyInput } from '../contract.js';
|
|
2
|
+
export declare const logger: import("@runa-ai/runa").CLILogger;
|
|
3
|
+
export interface ApplyResult {
|
|
4
|
+
filesApplied: number;
|
|
5
|
+
filesSkipped: number;
|
|
6
|
+
rolePasswordsSet: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function getDbUrl(input: DbApplyInput): string;
|
|
9
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1,70 +1,21 @@
|
|
|
1
|
-
import type { DbApplyInput } from './contract.js';
|
|
2
|
-
export interface ApplyResult {
|
|
3
|
-
filesApplied: number;
|
|
4
|
-
filesSkipped: number;
|
|
5
|
-
rolePasswordsSet: number;
|
|
6
|
-
}
|
|
7
|
-
export interface PgSchemaDiffResult {
|
|
8
|
-
sql: string;
|
|
9
|
-
hazards: string[];
|
|
10
|
-
applied: boolean;
|
|
11
|
-
/** Number of retry attempts made (for metrics) */
|
|
12
|
-
retryAttempts?: number;
|
|
13
|
-
/** Total time spent waiting between retries (ms) */
|
|
14
|
-
retryWaitMs?: number;
|
|
15
|
-
/** Number of pre-apply data compatibility violations detected */
|
|
16
|
-
dataViolations?: number;
|
|
17
|
-
/** Warning when SSOT enforcement had issues (schemas applied but cleanup incomplete) */
|
|
18
|
-
ssotWarning?: string;
|
|
19
|
-
}
|
|
20
1
|
/**
|
|
21
|
-
*
|
|
2
|
+
* AI HINT: db apply Actors (Barrel Re-export)
|
|
22
3
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* 2. Set passwords for drizzle_app/drizzle_service if env vars present
|
|
4
|
+
* Purpose: Re-export all actors from split modules for backward compatibility.
|
|
5
|
+
* Consumers use `import * as actors from './actors.js'` (namespace import).
|
|
26
6
|
*
|
|
27
|
-
*
|
|
7
|
+
* Split modules:
|
|
8
|
+
* - actors/shared.ts: Shared utilities (logger, ApplyResult, helpers)
|
|
9
|
+
* - actors/lock-actors.ts: Advisory lock actors (acquireLock, releaseLock)
|
|
10
|
+
* - actors/idempotent-actors.ts: Idempotent schema actors + isDeferrableError
|
|
11
|
+
* - actors/pg-schema-diff-actors.ts: pg-schema-diff actors + partition validation
|
|
12
|
+
* - actors/seed-actors.ts: Seed application actor
|
|
28
13
|
*/
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*
|
|
37
|
-
* Extension Support:
|
|
38
|
-
* If pgSchemaDiff.shadowDbExtensions is configured in runa.config.ts,
|
|
39
|
-
* creates a shadow database with those extensions installed for type resolution.
|
|
40
|
-
* This enables pg-schema-diff to recognize extension-defined types like
|
|
41
|
-
* PostGIS geometry or pgvector vector.
|
|
42
|
-
*
|
|
43
|
-
* @see https://github.com/stripe/pg-schema-diff/pull/194
|
|
44
|
-
*/
|
|
45
|
-
export declare const applyPgSchemaDiff: import("xstate").PromiseActorLogic<PgSchemaDiffResult, {
|
|
46
|
-
input: DbApplyInput;
|
|
47
|
-
targetDir: string;
|
|
48
|
-
}, import("xstate").EventObject>;
|
|
49
|
-
/**
|
|
50
|
-
* Validate that expected partitions (from idempotent/*.sql) exist in the database.
|
|
51
|
-
*
|
|
52
|
-
* Non-blocking: failures are logged as warnings, never cause the pipeline to fail.
|
|
53
|
-
* This runs after the 2nd idempotent pass so all partitions should exist.
|
|
54
|
-
*/
|
|
55
|
-
export declare const validatePartitions: import("xstate").PromiseActorLogic<{
|
|
56
|
-
warnings: string[];
|
|
57
|
-
}, {
|
|
58
|
-
input: DbApplyInput;
|
|
59
|
-
targetDir: string;
|
|
60
|
-
}, import("xstate").EventObject>;
|
|
61
|
-
/**
|
|
62
|
-
* Apply seeds.
|
|
63
|
-
*/
|
|
64
|
-
export declare const applySeeds: import("xstate").PromiseActorLogic<{
|
|
65
|
-
applied: boolean;
|
|
66
|
-
}, {
|
|
67
|
-
input: DbApplyInput;
|
|
68
|
-
targetDir: string;
|
|
69
|
-
}, import("xstate").EventObject>;
|
|
14
|
+
export type { ApplyResult } from './actors/shared.js';
|
|
15
|
+
export { acquireLock, releaseLock } from './actors/lock-actors.js';
|
|
16
|
+
export { isDeferrableError, applyIdempotentSchemas, previewIdempotentSchemas, } from './actors/idempotent-actors.js';
|
|
17
|
+
export type { IdempotentPreviewResult } from './actors/idempotent-actors.js';
|
|
18
|
+
export { applyPgSchemaDiff, validatePartitions, } from './actors/pg-schema-diff-actors.js';
|
|
19
|
+
export type { PgSchemaDiffResult } from './actors/pg-schema-diff-actors.js';
|
|
20
|
+
export { applySeeds } from './actors/seed-actors.js';
|
|
70
21
|
//# sourceMappingURL=actors.d.ts.map
|
|
@@ -49,10 +49,17 @@ export declare const DbApplyOutputSchema: z.ZodObject<{
|
|
|
49
49
|
seedsApplied: z.ZodBoolean;
|
|
50
50
|
error: z.ZodOptional<z.ZodString>;
|
|
51
51
|
planSql: z.ZodOptional<z.ZodString>;
|
|
52
|
+
filteredPlanSql: z.ZodOptional<z.ZodString>;
|
|
52
53
|
checkOnly: z.ZodOptional<z.ZodBoolean>;
|
|
53
54
|
dataViolations: z.ZodOptional<z.ZodNumber>;
|
|
54
55
|
ssotWarning: z.ZodOptional<z.ZodString>;
|
|
55
56
|
partitionWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
57
|
+
idempotentFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
58
|
+
idempotentRisks: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
high: z.ZodNumber;
|
|
60
|
+
medium: z.ZodNumber;
|
|
61
|
+
low: z.ZodNumber;
|
|
62
|
+
}, z.core.$strip>>;
|
|
56
63
|
metrics: z.ZodOptional<z.ZodObject<{
|
|
57
64
|
totalMs: z.ZodNumber;
|
|
58
65
|
idempotentMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -60,6 +67,6 @@ export declare const DbApplyOutputSchema: z.ZodObject<{
|
|
|
60
67
|
seedMs: z.ZodOptional<z.ZodNumber>;
|
|
61
68
|
retryAttempts: z.ZodOptional<z.ZodNumber>;
|
|
62
69
|
}, z.core.$strip>>;
|
|
63
|
-
}, z.core.$
|
|
70
|
+
}, z.core.$strict>;
|
|
64
71
|
export type DbApplyOutput = z.infer<typeof DbApplyOutputSchema>;
|
|
65
72
|
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Performance: All queries use LIMIT 100000 subquery cap + 10s timeout.
|
|
14
14
|
*/
|
|
15
15
|
import type { ValidatedPlan } from './plan-validator.js';
|
|
16
|
-
export type DataViolationType = 'not_null' | 'type_cast' | 'check_constraint' | 'unique_constraint';
|
|
16
|
+
export type DataViolationType = 'not_null' | 'type_cast' | 'check_constraint' | 'unique_constraint' | 'query_error' | 'timeout';
|
|
17
17
|
export interface DataViolation {
|
|
18
18
|
statementIndex: number;
|
|
19
19
|
sql: string;
|
|
@@ -30,6 +30,8 @@ export interface DataCompatibilityResult {
|
|
|
30
30
|
checkedStatements: number;
|
|
31
31
|
skippedStatements: number;
|
|
32
32
|
errors: string[];
|
|
33
|
+
/** Number of validation queries that failed (query errors + timeouts) */
|
|
34
|
+
queryErrorCount: number;
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
37
|
* Parse SET NOT NULL from ALTER TABLE statement.
|
|
@@ -101,8 +103,5 @@ export declare function checkDataCompatibility(dbUrl: string, plan: ValidatedPla
|
|
|
101
103
|
verbose?: boolean;
|
|
102
104
|
timeout?: number;
|
|
103
105
|
}): DataCompatibilityResult;
|
|
104
|
-
/**
|
|
105
|
-
* Display data compatibility results to the user.
|
|
106
|
-
*/
|
|
107
106
|
export declare function displayDataCompatibilityResults(result: DataCompatibilityResult, verbose: boolean): void;
|
|
108
107
|
//# sourceMappingURL=data-compatibility-checker.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Data Integrity Verifier
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Pre/post-apply data integrity checks for schema migrations.
|
|
5
|
+
* Detects unexpected data loss by comparing row count estimates before and after apply.
|
|
6
|
+
*
|
|
7
|
+
* Layers:
|
|
8
|
+
* 1. Pre-apply backup (production only) — pg_dump idempotent-managed tables
|
|
9
|
+
* 2. Pre-apply row estimate capture (pg_class.reltuples)
|
|
10
|
+
* 3. Post-apply row estimate comparison
|
|
11
|
+
* - Full loss (N→0): CRITICAL error (unless --allow-data-loss)
|
|
12
|
+
* - >50% reduction: WARNING log
|
|
13
|
+
*
|
|
14
|
+
* Safety: Non-fatal backup failures log warnings but never block apply.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Backup idempotent-managed table data before applying schema changes.
|
|
18
|
+
* Non-fatal: backup failure logs a warning but does NOT block apply.
|
|
19
|
+
* Only runs for production deployments.
|
|
20
|
+
*/
|
|
21
|
+
export declare function backupIdempotentTables(dbUrl: string, protectedTables: string[], verbose: boolean): {
|
|
22
|
+
backupPath: string | null;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Get estimated row counts for all app tables using pg_class.reltuples.
|
|
26
|
+
* Fast (no sequential scan) and sufficient for integrity checks.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getTableRowEstimates(dbUrl: string, schemasDir: string, verbose: boolean): Map<string, number>;
|
|
29
|
+
/**
|
|
30
|
+
* Verify data integrity after schema apply.
|
|
31
|
+
* Compares pre-apply and post-apply row estimates.
|
|
32
|
+
*
|
|
33
|
+
* - Full data loss (N→0 where N>0): CRITICAL error (throws)
|
|
34
|
+
* - >50% reduction: WARNING log (informational)
|
|
35
|
+
*/
|
|
36
|
+
export declare function verifyDataIntegrity(dbUrl: string, schemasDir: string, preApplyCounts: Map<string, number>, verbose: boolean, allowDataLoss?: boolean): void;
|
|
37
|
+
//# sourceMappingURL=data-integrity-verifier.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Fresh DB Detection and Direct Schema Application
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Detect if a database is fresh (no app tables) and apply schemas directly
|
|
5
|
+
* via psql instead of pg-schema-diff for faster initial setup.
|
|
6
|
+
*
|
|
7
|
+
* Flow:
|
|
8
|
+
* 1. checkFreshDb() — detect if DB has app tables (whitelist/fallback strategies)
|
|
9
|
+
* 2. handleFreshDbCase() — if fresh, apply declarative/*.sql directly + SSOT cleanup
|
|
10
|
+
*
|
|
11
|
+
* Safety: Fail-safe — if all detection fails, assumes existing DB (uses pg-schema-diff).
|
|
12
|
+
*/
|
|
13
|
+
import type { DbApplyInput } from '../contract.js';
|
|
14
|
+
export interface PgSchemaDiffResult {
|
|
15
|
+
sql: string;
|
|
16
|
+
hazards: string[];
|
|
17
|
+
applied: boolean;
|
|
18
|
+
filteredPlanSql?: string;
|
|
19
|
+
retryAttempts?: number;
|
|
20
|
+
retryWaitMs?: number;
|
|
21
|
+
dataViolations?: number;
|
|
22
|
+
ssotWarning?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Check if DB has app tables.
|
|
26
|
+
* Returns true if existing DB (has tables), false if fresh DB.
|
|
27
|
+
*/
|
|
28
|
+
export declare function hasAppTables(dbUrl: string, schemasDir?: string, customSql?: string, verbose?: boolean): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Handle fresh DB case - apply schemas directly, then use pg-schema-diff for SSOT cleanup.
|
|
31
|
+
* Returns null if the DB is NOT fresh (existing DB — caller should use pg-schema-diff).
|
|
32
|
+
*/
|
|
33
|
+
export declare function handleFreshDbCase(input: DbApplyInput, dbUrl: string, targetDir: string, pgSchemaDiffDir?: string): PgSchemaDiffResult | null;
|
|
34
|
+
//# sourceMappingURL=fresh-db-handler.d.ts.map
|