@runa-ai/runa-cli 0.5.72 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-V66FAQXB.js +1719 -0
- package/dist/cache-N7WNPEYF.js +111 -0
- package/dist/check-LOMVIRHX.js +12 -0
- package/dist/chunk-2APB25TT.js +442 -0
- package/dist/chunk-3FDQW524.js +544 -0
- package/dist/chunk-3WDV32GA.js +33 -0
- package/dist/chunk-5FT3F36G.js +59 -0
- package/dist/chunk-5NKWR4FF.js +254 -0
- package/dist/chunk-644FVGIQ.js +194 -0
- package/dist/chunk-6AALH2ED.js +121 -0
- package/dist/chunk-6FAU4IGR.js +63 -0
- package/dist/chunk-6Y3LAUGL.js +35 -0
- package/dist/chunk-7B5C6U2K.js +274 -0
- package/dist/chunk-AAIE4F2U.js +140 -0
- package/dist/chunk-AIP6MR42.js +12 -0
- package/dist/chunk-CCKG5R4Y.js +59 -0
- package/dist/chunk-DRSUEMAK.js +123 -0
- package/dist/chunk-FHG3ILE4.js +2011 -0
- package/dist/chunk-H2AHNI75.js +31 -0
- package/dist/chunk-HD74F6W2.js +460 -0
- package/dist/chunk-HKUWEGUX.js +36 -0
- package/dist/chunk-IBVVGH6X.js +33 -0
- package/dist/chunk-II7VYQEM.js +179 -0
- package/dist/chunk-JMJP4A47.js +204 -0
- package/dist/chunk-JQXOVCOP.js +574 -0
- package/dist/chunk-KE6QJBZG.js +41 -0
- package/dist/chunk-KWX3JHCY.js +85 -0
- package/dist/chunk-MXRWBNIY.js +74 -0
- package/dist/chunk-NPSRD26F.js +149 -0
- package/dist/chunk-QDF7QXBL.js +67 -0
- package/dist/chunk-QM53IQHM.js +209 -0
- package/dist/chunk-RZLYEO4U.js +219 -0
- package/dist/chunk-SGJG3BKD.js +351 -0
- package/dist/chunk-TYIAD6SB.js +74 -0
- package/dist/chunk-UWWSAPDR.js +31 -0
- package/dist/chunk-VM3IWOT5.js +458 -0
- package/dist/chunk-VRXHCR5K.js +42 -0
- package/dist/chunk-WJXC4MVY.js +75 -0
- package/dist/chunk-XDCHRVE3.js +215 -0
- package/dist/chunk-Z4Z5DNW4.js +1196 -0
- package/dist/chunk-ZZOXM6Q4.js +8 -0
- package/dist/ci-ZWRVWNFX.js +9298 -0
- package/dist/cli/contract-output.d.ts +1 -0
- package/dist/cli/index.d.ts +7 -1
- package/dist/cli/requested-command.d.ts +8 -0
- package/dist/cli-2JNBJUBB.js +704 -0
- package/dist/commands/build/actors/db-sync.d.ts +2 -0
- package/dist/commands/build/actors/static-checks.d.ts +7 -6
- package/dist/commands/build/actors/validate.d.ts +2 -0
- package/dist/commands/build/contract.d.ts +30 -30
- package/dist/commands/build/machine-dry-run.d.ts +3 -0
- package/dist/commands/build/machine-e2e-meta.d.ts +120 -0
- package/dist/commands/build/machine.d.ts +22 -22
- package/dist/commands/build/types.d.ts +2 -4
- package/dist/commands/check/commands/check.d.ts +8 -3
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts +9 -6
- package/dist/commands/ci/machine/actors/db/schema-canonical-diff.d.ts +55 -0
- package/dist/commands/ci/machine/actors/db/schema-stats.d.ts +11 -0
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +9 -1
- package/dist/commands/ci/machine/contract.d.ts +26 -26
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts +1 -5
- package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts +5 -0
- package/dist/commands/ci/machine/formatters/sections/index.d.ts +2 -2
- package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts +3 -3
- package/dist/commands/ci/machine/machine-execution-helpers.d.ts +40 -0
- package/dist/commands/ci/machine/machine-state-helpers.d.ts +14 -0
- package/dist/commands/ci/machine/machine.d.ts +12 -12
- package/dist/commands/ci/machine/types.d.ts +2 -5
- package/dist/commands/ci/utils/ci-summary.d.ts +15 -15
- package/dist/commands/ci/utils/execa-helpers.d.ts +2 -0
- package/dist/commands/db/apply/actors/idempotent-actors.d.ts +34 -0
- package/dist/commands/db/apply/actors/lock-actors.d.ts +16 -0
- package/dist/commands/db/apply/actors/pg-schema-diff-actors.d.ts +31 -0
- package/dist/commands/db/apply/actors/seed-actors.d.ts +11 -0
- package/dist/commands/db/apply/actors/shared.d.ts +9 -0
- package/dist/commands/db/apply/actors.d.ts +16 -65
- package/dist/commands/db/apply/contract.d.ts +8 -1
- package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts +3 -4
- package/dist/commands/db/apply/helpers/data-integrity-verifier.d.ts +37 -0
- package/dist/commands/db/apply/helpers/fresh-db-handler.d.ts +34 -0
- package/dist/commands/db/apply/helpers/hazard-handler.d.ts +60 -0
- package/dist/commands/db/apply/helpers/idempotent-object-registry.d.ts +96 -0
- package/dist/commands/db/apply/helpers/idempotent-transaction.d.ts +20 -0
- package/dist/commands/db/apply/helpers/index.d.ts +6 -0
- package/dist/commands/db/apply/helpers/partition-validator.d.ts +2 -15
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts +18 -162
- package/dist/commands/db/apply/helpers/pg-schema-diff-patterns.d.ts +55 -0
- package/dist/commands/db/apply/helpers/pg-schema-diff-version.d.ts +50 -0
- package/dist/commands/db/apply/helpers/plan-validator.d.ts +4 -10
- package/dist/commands/db/apply/helpers/rbac-password-manager.d.ts +34 -0
- package/dist/commands/db/apply/helpers/retry-logic.d.ts +16 -2
- package/dist/commands/db/apply/helpers/shadow-db-manager.d.ts +1 -1
- package/dist/commands/db/apply/helpers/sql-utils.d.ts +26 -0
- package/dist/commands/db/apply/machine.d.ts +52 -1
- package/dist/commands/db/commands/db-apply.d.ts +18 -0
- package/dist/commands/db/commands/db-sync/boundary-classifier.d.ts +21 -0
- package/dist/commands/db/commands/db-sync/error-classifier.d.ts +9 -0
- package/dist/commands/db/commands/db-sync/plan-hazard-analyzer.d.ts +13 -0
- package/dist/commands/db/commands/db-sync/risk-reporter.d.ts +19 -0
- package/dist/commands/db/commands/db-sync/sql-parser.d.ts +25 -0
- package/dist/commands/db/commands/db-sync/types.d.ts +47 -0
- package/dist/commands/db/commands/db-sync.d.ts +14 -0
- package/dist/commands/db/sync/contract.d.ts +6 -2
- package/dist/commands/db/sync/machine.d.ts +2 -1
- package/dist/commands/db/types.d.ts +2 -0
- package/dist/commands/db/utils/boundary-policy/rule-compiler.d.ts +11 -0
- package/dist/commands/db/utils/boundary-policy/types.d.ts +105 -0
- package/dist/commands/db/utils/boundary-policy/validation.d.ts +20 -0
- package/dist/commands/db/utils/boundary-policy-runtime.d.ts +28 -0
- package/dist/commands/db/utils/boundary-policy.d.ts +5 -0
- package/dist/commands/db/utils/idempotent-risk-context.d.ts +29 -0
- package/dist/commands/db/utils/preflight-check.d.ts +14 -0
- package/dist/commands/db/utils/preflight-checks/domain-naming-checks.d.ts +106 -0
- package/dist/commands/db/utils/preflight-checks/orphan-checks.d.ts +36 -0
- package/dist/commands/db/utils/preflight-checks/schema-risk-checks.d.ts +22 -0
- package/dist/commands/db/utils/preflight-checks/supabase-checks.d.ts +55 -0
- package/dist/commands/db/utils/risk-detector-loader.d.ts +8 -0
- package/dist/commands/db/utils/schema-precheck-budget.d.ts +17 -0
- package/dist/commands/db/utils/sql-boundary-parser.d.ts +12 -0
- package/dist/commands/db/utils/sql-file-collector.d.ts +8 -0
- package/dist/commands/db/utils/sql-filename-parser.d.ts +20 -0
- package/dist/commands/db/utils/sql-table-extractor-ast.d.ts +19 -0
- package/dist/commands/db/utils/sql-table-extractor-regex.d.ts +50 -0
- package/dist/commands/db/utils/sql-table-extractor-rls.d.ts +13 -0
- package/dist/commands/db/utils/sql-table-extractor.d.ts +79 -1
- package/dist/commands/db/utils/table-registry-introspection.d.ts +68 -0
- package/dist/commands/db/utils/table-registry.d.ts +3 -38
- package/dist/commands/dev/actors/app-lifecycle.d.ts +18 -0
- package/dist/commands/dev/actors/index.d.ts +12 -2
- package/dist/commands/dev/actors/process-check.d.ts +12 -0
- package/dist/commands/dev/actors/shared.d.ts +15 -0
- package/dist/commands/dev/actors/tables-manifest.d.ts +16 -0
- package/dist/commands/dev/contract.d.ts +3 -3
- package/dist/commands/dev/guards.d.ts +24 -0
- package/dist/commands/dev/machine.d.ts +27 -32
- package/dist/commands/dev/types.d.ts +2 -0
- package/dist/commands/doctor.d.ts +9 -0
- package/dist/commands/env/commands/env-pull/auth.d.ts +13 -0
- package/dist/commands/env/commands/env-pull/dotenv-files.d.ts +14 -0
- package/dist/commands/env/commands/env-pull/security.d.ts +12 -0
- package/dist/commands/env/commands/env-pull/service.d.ts +8 -0
- package/dist/commands/env/commands/env-pull/shared.d.ts +79 -0
- package/dist/commands/env/commands/setup/types.d.ts +1 -1
- package/dist/commands/env/constants/local-supabase.d.ts +2 -0
- package/dist/commands/inject-test-attrs/defaults.d.ts +9 -0
- package/dist/commands/template-check/contract.d.ts +6 -6
- package/dist/commands/template-check/machine.d.ts +2 -2
- package/dist/commands/template-check/types.d.ts +0 -4
- package/dist/commands/template-check/utils/diff-analyzer.d.ts +0 -4
- package/dist/commands/utils/machine-state-logging.d.ts +20 -0
- package/dist/commands/utils/repo-root.d.ts +2 -0
- package/dist/config/env.d.ts +4 -4
- package/dist/config-loader-GT3HAQ7U.js +7 -0
- package/dist/db-XULCILOU.js +14137 -0
- package/dist/dev-5YXNPTCJ.js +992 -0
- package/dist/doctor-MZLOA53G.js +44 -0
- package/dist/env-HMMRSYCI.js +7 -0
- package/dist/env-SS66PZ4B.js +2623 -0
- package/dist/env-files-2UIUYLLR.js +8 -0
- package/dist/error-handler-HEXBRNVV.js +460 -0
- package/dist/hotfix-YA3DGLOM.js +1477 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +48 -42995
- package/dist/init-ZIL6LRFO.js +631 -0
- package/dist/inject-test-attrs-P44BVTQS.js +23 -0
- package/dist/internal/machines/snapshot-helpers.d.ts +6 -0
- package/dist/lib/sql-comment-utils.d.ts +25 -0
- package/dist/license-OB7GVJQ2.js +468 -0
- package/dist/link-VSNDVZZD.js +59 -0
- package/dist/manifest-TMFLESHW.js +19 -0
- package/dist/prepare-32DOVHTE.js +250 -0
- package/dist/risk-detector-4U6ZJ2G5.js +6 -0
- package/dist/risk-detector-core-TK4OAI3N.js +166 -0
- package/dist/risk-detector-plpgsql-HWKS4OLR.js +1886 -0
- package/dist/sdk-XK6HQU7S.js +348 -0
- package/dist/services-7VK5KZTO.js +177 -0
- package/dist/session-SFW5QSXZ.js +142 -0
- package/dist/signal-handler-DO3OANW5.js +6 -0
- package/dist/status-UTKS63AB.js +94 -0
- package/dist/telemetry-P56UBLZ2.js +93 -0
- package/dist/template-check-3P4HZXVY.js +1944 -0
- package/dist/test-V4KQL574.js +650 -0
- package/dist/test-gen-FS4CEY3P.js +88 -0
- package/dist/ui-RJAMCWUI.js +331 -0
- package/dist/upgrade-NUK3ZBCL.js +637 -0
- package/dist/utils/config-loader.d.ts +0 -3
- package/dist/validate-CAAW4Y44.js +54 -0
- package/dist/validators/risk-detector-content-risks.d.ts +13 -0
- package/dist/validators/risk-detector-core.d.ts +25 -0
- package/dist/validators/risk-detector-patterns.d.ts +15 -0
- package/dist/validators/risk-detector-plpgsql-expression-resolver.d.ts +22 -0
- package/dist/validators/risk-detector-plpgsql-parser.d.ts +5 -0
- package/dist/validators/risk-detector-plpgsql-tokenizer.d.ts +18 -0
- package/dist/validators/risk-detector-plpgsql.d.ts +9 -0
- package/dist/validators/risk-detector-text-utils.d.ts +6 -0
- package/dist/validators/risk-detector-types.d.ts +16 -0
- package/dist/validators/risk-detector.d.ts +7 -26
- package/dist/vuln-check-2W7N5TA2.js +121 -0
- package/dist/vuln-checker-IQJ56RUV.js +3223 -0
- package/dist/watch-PNTKZYFB.js +911 -0
- package/dist/workflow-H75N4BXX.js +897 -0
- package/package.json +5 -2
- package/dist/cli/contract-mode.d.ts.map +0 -1
- package/dist/cli/contract-output.d.ts.map +0 -1
- package/dist/cli/early-flags.d.ts.map +0 -1
- package/dist/cli/error-handler.d.ts.map +0 -1
- package/dist/cli/exec.d.ts.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/json-output.d.ts.map +0 -1
- package/dist/cli/non-interactive.d.ts.map +0 -1
- package/dist/cli/output-format.d.ts.map +0 -1
- package/dist/cli/signal-handler.d.ts.map +0 -1
- package/dist/commands/build/actors/build.d.ts.map +0 -1
- package/dist/commands/build/actors/clean.d.ts.map +0 -1
- package/dist/commands/build/actors/db-sync.d.ts.map +0 -1
- package/dist/commands/build/actors/index.d.ts.map +0 -1
- package/dist/commands/build/actors/manifest.d.ts.map +0 -1
- package/dist/commands/build/actors/setup.d.ts.map +0 -1
- package/dist/commands/build/actors/static-checks.d.ts.map +0 -1
- package/dist/commands/build/actors/validate.d.ts.map +0 -1
- package/dist/commands/build/commands/build.d.ts.map +0 -1
- package/dist/commands/build/contract.d.ts.map +0 -1
- package/dist/commands/build/guards.d.ts.map +0 -1
- package/dist/commands/build/index.d.ts.map +0 -1
- package/dist/commands/build/machine.d.ts.map +0 -1
- package/dist/commands/build/types.d.ts.map +0 -1
- package/dist/commands/cache.d.ts.map +0 -1
- package/dist/commands/check/commands/check.d.ts.map +0 -1
- package/dist/commands/check/index.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-checks.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-layer-content.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-pr-capabilities.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-apply.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-github.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-types.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-utils.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-workflow.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-resolvers.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-static.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-supabase-local.d.ts.map +0 -1
- package/dist/commands/ci/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/app-build.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/app-start.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/build-and-playwright.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/playwright-install.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/static-checks.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/apply-seeds.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/pgtap-install.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/production-preview.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/pull-production.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/reset.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/schema-stats.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/setup-roles.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/github.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/summary.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/local.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/pr-common.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/pr-local.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/capabilities.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/run-layers.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/ci-local.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/ci-pr.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/machine-runner.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/runtime-env.d.ts.map +0 -1
- package/dist/commands/ci/machine/contract.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/github-comment-types.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/github-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/progress-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/summary.d.ts.map +0 -1
- package/dist/commands/ci/machine/guards.d.ts.map +0 -1
- package/dist/commands/ci/machine/helpers.d.ts.map +0 -1
- package/dist/commands/ci/machine/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/machine.d.ts.map +0 -1
- package/dist/commands/ci/machine/types.d.ts.map +0 -1
- package/dist/commands/ci/utils/ai-report.d.ts.map +0 -1
- package/dist/commands/ci/utils/app-process.d.ts.map +0 -1
- package/dist/commands/ci/utils/app-runtime.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-config.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-env-schema.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-logging.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-summary.d.ts.map +0 -1
- package/dist/commands/ci/utils/config-readers.d.ts.map +0 -1
- package/dist/commands/ci/utils/db-url-utils.d.ts.map +0 -1
- package/dist/commands/ci/utils/e2e-auth-setup.d.ts.map +0 -1
- package/dist/commands/ci/utils/env-security.d.ts.map +0 -1
- package/dist/commands/ci/utils/execa-helpers.d.ts.map +0 -1
- package/dist/commands/ci/utils/exit-code-computation.d.ts.map +0 -1
- package/dist/commands/ci/utils/github-api.d.ts.map +0 -1
- package/dist/commands/ci/utils/github.d.ts.map +0 -1
- package/dist/commands/ci/utils/index.d.ts.map +0 -1
- package/dist/commands/ci/utils/pgtap-installer.d.ts.map +0 -1
- package/dist/commands/ci/utils/rls-verification.d.ts.map +0 -1
- package/dist/commands/ci/utils/schema-operations.d.ts.map +0 -1
- package/dist/commands/ci/utils/seed-operations.d.ts.map +0 -1
- package/dist/commands/ci/utils/test-parallel.d.ts.map +0 -1
- package/dist/commands/ci/utils/timestamp-invariants.d.ts.map +0 -1
- package/dist/commands/ci/utils/workflow-idempotency.d.ts.map +0 -1
- package/dist/commands/db/apply/actors.d.ts.map +0 -1
- package/dist/commands/db/apply/contract.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/advisory-lock.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/index.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-acl-cleaner.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-prefilter.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-validator.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/plan-validator.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/retry-logic.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/shadow-db-manager.d.ts.map +0 -1
- package/dist/commands/db/apply/index.d.ts.map +0 -1
- package/dist/commands/db/apply/machine.d.ts.map +0 -1
- package/dist/commands/db/commands/db-apply.d.ts.map +0 -1
- package/dist/commands/db/commands/db-audit.d.ts.map +0 -1
- package/dist/commands/db/commands/db-backup.d.ts.map +0 -1
- package/dist/commands/db/commands/db-cleanup.d.ts.map +0 -1
- package/dist/commands/db/commands/db-derive-role-passwords.d.ts.map +0 -1
- package/dist/commands/db/commands/db-derive-urls.d.ts.map +0 -1
- package/dist/commands/db/commands/db-diagram.d.ts.map +0 -1
- package/dist/commands/db/commands/db-drizzle.d.ts.map +0 -1
- package/dist/commands/db/commands/db-extension.d.ts.map +0 -1
- package/dist/commands/db/commands/db-generate-password.d.ts.map +0 -1
- package/dist/commands/db/commands/db-lifecycle.d.ts.map +0 -1
- package/dist/commands/db/commands/db-rollback.d.ts.map +0 -1
- package/dist/commands/db/commands/db-schema.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed-metadata.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed-verify.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed.d.ts.map +0 -1
- package/dist/commands/db/commands/db-snapshot.d.ts.map +0 -1
- package/dist/commands/db/commands/db-stack.d.ts.map +0 -1
- package/dist/commands/db/commands/db-stats.d.ts.map +0 -1
- package/dist/commands/db/commands/db-sync.d.ts.map +0 -1
- package/dist/commands/db/commands/db-test.d.ts.map +0 -1
- package/dist/commands/db/constants.d.ts.map +0 -1
- package/dist/commands/db/extension-registry.d.ts.map +0 -1
- package/dist/commands/db/index.d.ts.map +0 -1
- package/dist/commands/db/preflight/actors.d.ts.map +0 -1
- package/dist/commands/db/preflight/contract.d.ts.map +0 -1
- package/dist/commands/db/preflight/index.d.ts.map +0 -1
- package/dist/commands/db/sync/actors.d.ts.map +0 -1
- package/dist/commands/db/sync/contract.d.ts.map +0 -1
- package/dist/commands/db/sync/index.d.ts.map +0 -1
- package/dist/commands/db/sync/machine.d.ts.map +0 -1
- package/dist/commands/db/types.d.ts.map +0 -1
- package/dist/commands/db/utils/db-target.d.ts.map +0 -1
- package/dist/commands/db/utils/db-url-builder.d.ts.map +0 -1
- package/dist/commands/db/utils/error-handlers.d.ts.map +0 -1
- package/dist/commands/db/utils/import-impact-analyzer.d.ts.map +0 -1
- package/dist/commands/db/utils/preflight-check.d.ts.map +0 -1
- package/dist/commands/db/utils/psql.d.ts.map +0 -1
- package/dist/commands/db/utils/schema-detector.d.ts.map +0 -1
- package/dist/commands/db/utils/schema-sync.d.ts.map +0 -1
- package/dist/commands/db/utils/script-runner.d.ts.map +0 -1
- package/dist/commands/db/utils/seed-manager.d.ts.map +0 -1
- package/dist/commands/db/utils/semantic-mapper.d.ts.map +0 -1
- package/dist/commands/db/utils/sql-table-extractor.d.ts.map +0 -1
- package/dist/commands/db/utils/stack-detector.d.ts.map +0 -1
- package/dist/commands/db/utils/table-registry.d.ts.map +0 -1
- package/dist/commands/db/utils/table-source-classifier.d.ts.map +0 -1
- package/dist/commands/dev/actors/index.d.ts.map +0 -1
- package/dist/commands/dev/commands/dev.d.ts.map +0 -1
- package/dist/commands/dev/contract.d.ts.map +0 -1
- package/dist/commands/dev/guards.d.ts.map +0 -1
- package/dist/commands/dev/helpers/stale-process-detector.d.ts.map +0 -1
- package/dist/commands/dev/machine.d.ts.map +0 -1
- package/dist/commands/dev/types.d.ts.map +0 -1
- package/dist/commands/env/commands/env-check.d.ts.map +0 -1
- package/dist/commands/env/commands/env-encrypt.d.ts.map +0 -1
- package/dist/commands/env/commands/env-pull.d.ts.map +0 -1
- package/dist/commands/env/commands/env-setup.d.ts.map +0 -1
- package/dist/commands/env/commands/env-sync.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/action.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/auth.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/file-export.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/github-api.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/helpers.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/index.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/parsers.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/prompts.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/supabase-api.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/types.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/vercel-api.d.ts.map +0 -1
- package/dist/commands/env/constants/local-supabase.d.ts.map +0 -1
- package/dist/commands/env/index.d.ts.map +0 -1
- package/dist/commands/hotfix/actors.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-complete.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-create.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-deploy.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-status.d.ts.map +0 -1
- package/dist/commands/hotfix/contract.d.ts.map +0 -1
- package/dist/commands/hotfix/index.d.ts.map +0 -1
- package/dist/commands/hotfix/machine.d.ts.map +0 -1
- package/dist/commands/hotfix/metadata.d.ts.map +0 -1
- package/dist/commands/hotfix/utils/hotfix-machine-helper.d.ts.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/action.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/commands/inject-test-attrs.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/contract.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/detection-diagnostics.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/formatter.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/index.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/manifest-generator.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/processor-utils.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/processor.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/types.d.ts.map +0 -1
- package/dist/commands/link.d.ts.map +0 -1
- package/dist/commands/manifest/index.d.ts.map +0 -1
- package/dist/commands/prepare/commands/prepare.d.ts.map +0 -1
- package/dist/commands/prepare/index.d.ts.map +0 -1
- package/dist/commands/sdk/commands/publish.d.ts.map +0 -1
- package/dist/commands/sdk/index.d.ts.map +0 -1
- package/dist/commands/services/index.d.ts.map +0 -1
- package/dist/commands/session/index.d.ts.map +0 -1
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/commands/template-check/actors/compare.d.ts.map +0 -1
- package/dist/commands/template-check/actors/discover.d.ts.map +0 -1
- package/dist/commands/template-check/actors/index.d.ts.map +0 -1
- package/dist/commands/template-check/actors/report.d.ts.map +0 -1
- package/dist/commands/template-check/commands/template-check.d.ts.map +0 -1
- package/dist/commands/template-check/config.d.ts.map +0 -1
- package/dist/commands/template-check/contract.d.ts.map +0 -1
- package/dist/commands/template-check/index.d.ts.map +0 -1
- package/dist/commands/template-check/machine.d.ts.map +0 -1
- package/dist/commands/template-check/types.d.ts.map +0 -1
- package/dist/commands/template-check/utils/diff-analyzer.d.ts.map +0 -1
- package/dist/commands/template-check/utils/normalizer.d.ts.map +0 -1
- package/dist/commands/template-check/utils/path-mapping.d.ts.map +0 -1
- package/dist/commands/test/commands/test-db.d.ts.map +0 -1
- package/dist/commands/test/commands/test-e2e.d.ts.map +0 -1
- package/dist/commands/test/commands/test-fast.d.ts.map +0 -1
- package/dist/commands/test/commands/test-integration.d.ts.map +0 -1
- package/dist/commands/test/commands/test-layer.d.ts.map +0 -1
- package/dist/commands/test/commands/test-owasp-generate.d.ts.map +0 -1
- package/dist/commands/test/commands/test-service.d.ts.map +0 -1
- package/dist/commands/test/commands/test-static.d.ts.map +0 -1
- package/dist/commands/test/commands/test.d.ts.map +0 -1
- package/dist/commands/test/index.d.ts.map +0 -1
- package/dist/commands/test-gen.d.ts.map +0 -1
- package/dist/commands/ui.d.ts.map +0 -1
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/validate.d.ts.map +0 -1
- package/dist/commands/vuln-check.d.ts.map +0 -1
- package/dist/commands/watch.d.ts.map +0 -1
- package/dist/commands/workflow/commands/deploy-production.d.ts.map +0 -1
- package/dist/commands/workflow/commands/final-status.d.ts.map +0 -1
- package/dist/commands/workflow/commands/log.d.ts.map +0 -1
- package/dist/commands/workflow/commands/notify.d.ts.map +0 -1
- package/dist/commands/workflow/commands/paths.d.ts.map +0 -1
- package/dist/commands/workflow/commands/sync.d.ts.map +0 -1
- package/dist/commands/workflow/commands/validate.d.ts.map +0 -1
- package/dist/commands/workflow/commands/verify-credentials.d.ts.map +0 -1
- package/dist/commands/workflow/index.d.ts.map +0 -1
- package/dist/commands/workflow/types.d.ts.map +0 -1
- package/dist/config/env-files.d.ts.map +0 -1
- package/dist/config/env.d.ts.map +0 -1
- package/dist/constants/versions.d.ts.map +0 -1
- package/dist/contracts/envelope.d.ts.map +0 -1
- package/dist/errors/catalog.d.ts.map +0 -1
- package/dist/errors/exit-codes.d.ts.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/incremental/affected-tests.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/internal/machines/index.d.ts.map +0 -1
- package/dist/internal/machines/machine-runner.d.ts.map +0 -1
- package/dist/internal/machines/snapshot-helpers.d.ts.map +0 -1
- package/dist/internal/machines/types.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/dependency-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/rls-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/secret-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/typescript-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/config/loader.d.ts.map +0 -1
- package/dist/internal/vuln-checker/constants.d.ts.map +0 -1
- package/dist/internal/vuln-checker/ignore/matcher.d.ts.map +0 -1
- package/dist/internal/vuln-checker/index.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/console-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/json-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/markdown-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/sarif-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/security/path-validation.d.ts.map +0 -1
- package/dist/internal/vuln-checker/types.d.ts.map +0 -1
- package/dist/notifiers/desktop-notifier.d.ts.map +0 -1
- package/dist/ui/components/db-panel.d.ts.map +0 -1
- package/dist/ui/components/status-bar.d.ts.map +0 -1
- package/dist/ui/components/test-panel.d.ts.map +0 -1
- package/dist/ui/dashboard.d.ts.map +0 -1
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/utils/config-loader.d.ts.map +0 -1
- package/dist/utils/config-updater.d.ts.map +0 -1
- package/dist/utils/diagnostics.d.ts.map +0 -1
- package/dist/utils/dotenvx.d.ts.map +0 -1
- package/dist/utils/env-local-bridge.d.ts.map +0 -1
- package/dist/utils/execution-plan.d.ts.map +0 -1
- package/dist/utils/github-output-security.d.ts.map +0 -1
- package/dist/utils/help-system.d.ts.map +0 -1
- package/dist/utils/license/admin-auth.d.ts.map +0 -1
- package/dist/utils/license/allowlist-checker.d.ts.map +0 -1
- package/dist/utils/license/ci-detector.d.ts.map +0 -1
- package/dist/utils/license/index.d.ts.map +0 -1
- package/dist/utils/license/owner-resolver.d.ts.map +0 -1
- package/dist/utils/license/types.d.ts.map +0 -1
- package/dist/utils/license/validate-owner.d.ts.map +0 -1
- package/dist/utils/path-security.d.ts.map +0 -1
- package/dist/utils/port-allocator.d.ts.map +0 -1
- package/dist/utils/secure-exec.d.ts.map +0 -1
- package/dist/utils/template-fetcher.d.ts.map +0 -1
- package/dist/utils/type-guards.d.ts.map +0 -1
- package/dist/utils/vercel-project.d.ts.map +0 -1
- package/dist/utils/workspace-detector.d.ts.map +0 -1
- package/dist/validators/risk-detector.d.ts.map +0 -1
- package/dist/validators/schema-validator.d.ts.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/dist/watchers/schema-watcher.d.ts.map +0 -1
- package/dist/watchers/test-watcher.d.ts.map +0 -1
|
@@ -16,11 +16,82 @@
|
|
|
16
16
|
* Architecture:
|
|
17
17
|
* - Primary: libpg-query AST parsing (accurate, handles edge cases)
|
|
18
18
|
* - Fallback: Regex parsing (for pj-repos without libpg-query)
|
|
19
|
+
* - Split modules: regex, rls, ast (see sql-table-extractor-*.ts)
|
|
19
20
|
*
|
|
20
21
|
* Note: This is a lightweight parser for manifest generation.
|
|
21
22
|
* For full SQL parsing, use pg_catalog queries (see introspectColumns).
|
|
22
23
|
*/
|
|
23
|
-
import type { TableEntry } from '@runa-ai/runa/manifests';
|
|
24
|
+
import type { ForeignKeyDefinition, TableEntry } from '@runa-ai/runa/manifests';
|
|
25
|
+
type SqlParserUtils = Awaited<ReturnType<typeof import('@runa-ai/runa/ast').loadSqlParserUtils>>;
|
|
26
|
+
/**
|
|
27
|
+
* Get SQL parser utilities (requires AST to be available)
|
|
28
|
+
*/
|
|
29
|
+
export declare function getSqlParserUtils(): Promise<SqlParserUtils | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Regex patterns for SQL parsing (used as fallback when libpg-query unavailable)
|
|
32
|
+
*/
|
|
33
|
+
export declare const SQL_IDENTIFIER = "(?:\"(?:[^\"]|\"\")*\"|[a-zA-Z_][a-zA-Z0-9_]*)";
|
|
34
|
+
export declare const TABLE_REFERENCE = "(?:\"(?:[^\"]|\"\")*\"|[a-zA-Z_][a-zA-Z0-9_]*)(?:\\s*\\.\\s*(?:\"(?:[^\"]|\"\")*\"|[a-zA-Z_][a-zA-Z0-9_]*))?";
|
|
35
|
+
export declare const SQL_PATTERNS: {
|
|
36
|
+
readonly createTable: RegExp;
|
|
37
|
+
readonly primaryKey: RegExp;
|
|
38
|
+
readonly foreignKey: RegExp;
|
|
39
|
+
readonly createIndex: RegExp;
|
|
40
|
+
readonly enableRls: RegExp;
|
|
41
|
+
};
|
|
42
|
+
export interface ParsedTable {
|
|
43
|
+
schema: string;
|
|
44
|
+
name: string;
|
|
45
|
+
lineNumber: number;
|
|
46
|
+
tableBody: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ParseContext {
|
|
49
|
+
filePath: string;
|
|
50
|
+
content: string;
|
|
51
|
+
lines: string[];
|
|
52
|
+
}
|
|
53
|
+
export declare function splitTopLevelSqlStatements(content: string): string[];
|
|
54
|
+
export declare function splitTopLevelCsv(content: string): string[];
|
|
55
|
+
/**
|
|
56
|
+
* Convert snake_case to camelCase
|
|
57
|
+
*/
|
|
58
|
+
export declare function snakeToCamel(str: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* Get line number from character position
|
|
61
|
+
*/
|
|
62
|
+
export declare function getLineNumber(content: string, position: number): number;
|
|
63
|
+
/**
|
|
64
|
+
* Extract table body (content between parentheses)
|
|
65
|
+
*/
|
|
66
|
+
export declare function extractTableBody(content: string, startPos: number): string;
|
|
67
|
+
/**
|
|
68
|
+
* Normalize PostgreSQL data type
|
|
69
|
+
*/
|
|
70
|
+
export declare function normalizeType(type: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* Unquote PostgreSQL identifier and unescape doubled quotes.
|
|
73
|
+
*/
|
|
74
|
+
export declare function unquoteIdentifier(identifier: string): string;
|
|
75
|
+
export declare function parseTableReference(ref: string): {
|
|
76
|
+
schema: string;
|
|
77
|
+
name: string;
|
|
78
|
+
} | null;
|
|
79
|
+
/**
|
|
80
|
+
* Strip SQL comments while preserving quoted text and line structure.
|
|
81
|
+
*/
|
|
82
|
+
/**
|
|
83
|
+
* Parse index column names from raw SQL fragment
|
|
84
|
+
*
|
|
85
|
+
* Handles:
|
|
86
|
+
* - Quoted identifiers: "timestamp" → timestamp
|
|
87
|
+
* - Sort directions: created_at DESC → created_at
|
|
88
|
+
* - Mixed: "user_id" ASC, "created_at" DESC → [user_id, created_at]
|
|
89
|
+
*/
|
|
90
|
+
export declare function parseIndexColumns(rawColumns: string): string[];
|
|
91
|
+
/**
|
|
92
|
+
* Normalize ON DELETE/UPDATE action
|
|
93
|
+
*/
|
|
94
|
+
export declare function normalizeOnAction(action: string | undefined): ForeignKeyDefinition['onDelete'];
|
|
24
95
|
export interface ExtractOptions {
|
|
25
96
|
/** Include column definitions */
|
|
26
97
|
includeColumns?: boolean;
|
|
@@ -31,6 +102,12 @@ export interface ExtractOptions {
|
|
|
31
102
|
/** Include RLS policies */
|
|
32
103
|
includeRlsPolicies?: boolean;
|
|
33
104
|
}
|
|
105
|
+
export interface ResolvedOptions {
|
|
106
|
+
includeColumns: boolean;
|
|
107
|
+
includeForeignKeys: boolean;
|
|
108
|
+
includeIndexes: boolean;
|
|
109
|
+
includeRlsPolicies: boolean;
|
|
110
|
+
}
|
|
34
111
|
/**
|
|
35
112
|
* Extract table definitions from SQL files
|
|
36
113
|
*
|
|
@@ -53,4 +130,5 @@ export declare function extractTablesFromSqlDir(sqlDir: string, options?: Extrac
|
|
|
53
130
|
* Uses libpg-query AST parsing when available, falls back to regex parsing.
|
|
54
131
|
*/
|
|
55
132
|
export declare function extractTablesFromSqlFile(filePath: string, options?: ExtractOptions): Promise<TableEntry[]>;
|
|
133
|
+
export {};
|
|
56
134
|
//# sourceMappingURL=sql-table-extractor.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Table Registry - DB Introspection Module
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Database introspection logic for table registry manifest generation
|
|
5
|
+
* Pattern: DB Introspection PRIMARY, SQL regex FALLBACK
|
|
6
|
+
*
|
|
7
|
+
* Extracted from table-registry.ts to reduce file size.
|
|
8
|
+
* Contains:
|
|
9
|
+
* - SQL injection prevention helpers (validatePgIdentifier, buildSafeSchemaInClause)
|
|
10
|
+
* - introspectTablesFromDb (PRIMARY source via PostgreSQL system catalogs)
|
|
11
|
+
* - Lookup map builders (FK, index, RLS, check constraints, triggers, PK)
|
|
12
|
+
* - convertIntrospectionToTableEntries
|
|
13
|
+
* - crossCheckWithDrizzle (Drizzle validation)
|
|
14
|
+
* - introspectColumns (enriched column info from DB)
|
|
15
|
+
*
|
|
16
|
+
* @see table-registry.ts - Main manifest generation and load/save
|
|
17
|
+
*/
|
|
18
|
+
import type { TableEntry } from '@runa-ai/runa/manifests';
|
|
19
|
+
/**
|
|
20
|
+
* SECURITY (Issue #535): Build safe SQL IN clause for schema names.
|
|
21
|
+
*
|
|
22
|
+
* Each schema name is:
|
|
23
|
+
* 1. Validated to be a safe PostgreSQL identifier
|
|
24
|
+
* 2. Escaped as a string literal (defense-in-depth)
|
|
25
|
+
*
|
|
26
|
+
* @param schemas - Array of schema names to include
|
|
27
|
+
* @returns SQL fragment like "'public','accounts'" (without parentheses)
|
|
28
|
+
* @throws Error if any schema name is invalid
|
|
29
|
+
*/
|
|
30
|
+
export declare function buildSafeSchemaInClause(schemas: string[]): string;
|
|
31
|
+
/**
|
|
32
|
+
* Introspect tables from database using PostgreSQL system catalogs
|
|
33
|
+
*
|
|
34
|
+
* This is the PRIMARY source for table metadata (when database is available).
|
|
35
|
+
* PostgreSQL system catalogs are 100% accurate because PostgreSQL itself
|
|
36
|
+
* parsed and stored the schema information.
|
|
37
|
+
*
|
|
38
|
+
* @param databaseUrl - PostgreSQL connection string
|
|
39
|
+
* @param schemas - Schema names to include (default: auto-detect non-system schemas)
|
|
40
|
+
* @returns TableEntry[] with accurate metadata from database
|
|
41
|
+
* @throws Error if database connection or introspection fails
|
|
42
|
+
*/
|
|
43
|
+
export declare function introspectTablesFromDb(databaseUrl: string, schemas?: string[]): Promise<TableEntry[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Cross-check SQL tables with Drizzle schema
|
|
46
|
+
*
|
|
47
|
+
* Uses dynamic import to load Drizzle schema and verify table names match.
|
|
48
|
+
* Returns discrepancies if any.
|
|
49
|
+
*
|
|
50
|
+
* Note: This is for validation only. SQL is the SSOT.
|
|
51
|
+
*/
|
|
52
|
+
export declare function crossCheckWithDrizzle(sqlTables: TableEntry[], drizzleSchemaPath: string): Promise<{
|
|
53
|
+
matched: TableEntry[];
|
|
54
|
+
sqlOnly: TableEntry[];
|
|
55
|
+
drizzleOnly: string[];
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Introspect column information from database
|
|
59
|
+
*
|
|
60
|
+
* Zero Hardcode: All info from pg_catalog
|
|
61
|
+
* This enriches SQL-extracted data with runtime database metadata.
|
|
62
|
+
*
|
|
63
|
+
* @param databaseUrl - PostgreSQL connection string
|
|
64
|
+
* @param tables - Tables to introspect
|
|
65
|
+
* @returns Tables with enriched column information
|
|
66
|
+
*/
|
|
67
|
+
export declare function introspectColumns(databaseUrl: string, tables: TableEntry[]): Promise<TableEntry[]>;
|
|
68
|
+
//# sourceMappingURL=table-registry-introspection.d.ts.map
|
|
@@ -20,46 +20,10 @@
|
|
|
20
20
|
* @see packages/sdk/src/core/manifests/types.ts - TablesManifest type definition
|
|
21
21
|
* @see packages/sdk/src/test/generator/introspectors/db-introspector.ts - DB introspection
|
|
22
22
|
* @see packages/cli/src/commands/db/utils/sql-table-extractor.ts - SQL parser (fallback)
|
|
23
|
+
* @see table-registry-introspection.ts - DB introspection logic (extracted)
|
|
23
24
|
*/
|
|
24
|
-
import type {
|
|
25
|
+
import type { TablesManifest } from '@runa-ai/runa/manifests';
|
|
25
26
|
import { type MappingOptions } from './semantic-mapper.js';
|
|
26
|
-
/**
|
|
27
|
-
* Introspect tables from database using PostgreSQL system catalogs
|
|
28
|
-
*
|
|
29
|
-
* This is the PRIMARY source for table metadata (when database is available).
|
|
30
|
-
* PostgreSQL system catalogs are 100% accurate because PostgreSQL itself
|
|
31
|
-
* parsed and stored the schema information.
|
|
32
|
-
*
|
|
33
|
-
* @param databaseUrl - PostgreSQL connection string
|
|
34
|
-
* @param schemas - Schema names to include (default: auto-detect non-system schemas)
|
|
35
|
-
* @returns TableEntry[] with accurate metadata from database
|
|
36
|
-
* @throws Error if database connection or introspection fails
|
|
37
|
-
*/
|
|
38
|
-
export declare function introspectTablesFromDb(databaseUrl: string, schemas?: string[]): Promise<TableEntry[]>;
|
|
39
|
-
/**
|
|
40
|
-
* Cross-check SQL tables with Drizzle schema
|
|
41
|
-
*
|
|
42
|
-
* Uses dynamic import to load Drizzle schema and verify table names match.
|
|
43
|
-
* Returns discrepancies if any.
|
|
44
|
-
*
|
|
45
|
-
* Note: This is for validation only. SQL is the SSOT.
|
|
46
|
-
*/
|
|
47
|
-
export declare function crossCheckWithDrizzle(sqlTables: TableEntry[], drizzleSchemaPath: string): Promise<{
|
|
48
|
-
matched: TableEntry[];
|
|
49
|
-
sqlOnly: TableEntry[];
|
|
50
|
-
drizzleOnly: string[];
|
|
51
|
-
}>;
|
|
52
|
-
/**
|
|
53
|
-
* Introspect column information from database
|
|
54
|
-
*
|
|
55
|
-
* Zero Hardcode: All info from pg_catalog
|
|
56
|
-
* This enriches SQL-extracted data with runtime database metadata.
|
|
57
|
-
*
|
|
58
|
-
* @param databaseUrl - PostgreSQL connection string
|
|
59
|
-
* @param tables - Tables to introspect
|
|
60
|
-
* @returns Tables with enriched column information
|
|
61
|
-
*/
|
|
62
|
-
export declare function introspectColumns(databaseUrl: string, tables: TableEntry[]): Promise<TableEntry[]>;
|
|
63
27
|
export interface GenerateManifestOptions {
|
|
64
28
|
/** SQL directory (default: supabase/schemas/declarative) */
|
|
65
29
|
sqlDir?: string;
|
|
@@ -113,4 +77,5 @@ export declare function loadTablesManifest(projectRoot: string): TablesManifest
|
|
|
113
77
|
export type { TableEntry, TablesManifest } from '@runa-ai/runa/manifests';
|
|
114
78
|
export { applyMappingToTables, generateMapping, generateSemanticName, type MappingOptions, type MappingResult, snakeToCamel, snakeToPascal, validateCompleteness, validateMapping, } from './semantic-mapper.js';
|
|
115
79
|
export { extractTablesFromSqlDir, extractTablesFromSqlFile } from './sql-table-extractor.js';
|
|
80
|
+
export { crossCheckWithDrizzle, introspectColumns, introspectTablesFromDb, } from './table-registry-introspection.js';
|
|
116
81
|
//# sourceMappingURL=table-registry.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface AppStartInput {
|
|
2
|
+
repoRoot: string;
|
|
3
|
+
appDir: string;
|
|
4
|
+
port: number;
|
|
5
|
+
tmpDir: string;
|
|
6
|
+
stream: boolean;
|
|
7
|
+
bundler?: 'turbopack' | 'webpack';
|
|
8
|
+
}
|
|
9
|
+
export interface AppStartOutput {
|
|
10
|
+
pid: number;
|
|
11
|
+
cleanupStreams: () => void;
|
|
12
|
+
}
|
|
13
|
+
export interface ShutdownInput {
|
|
14
|
+
pid: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const appStartActor: import("xstate").PromiseActorLogic<AppStartOutput, AppStartInput, import("xstate").EventObject>;
|
|
17
|
+
export declare const shutdownActor: import("xstate").PromiseActorLogic<void, ShutdownInput, import("xstate").EventObject>;
|
|
18
|
+
//# sourceMappingURL=app-lifecycle.d.ts.map
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AI HINT: Dev Command Actors
|
|
3
3
|
*
|
|
4
|
-
* Purpose: Re-export actors
|
|
5
|
-
* Pattern: Actor reuse for dev workflow
|
|
4
|
+
* Purpose: Re-export all actors for the dev workflow
|
|
6
5
|
*
|
|
7
6
|
* Actors:
|
|
8
7
|
* - depsInstallActor: Check/install dependencies
|
|
9
8
|
* - envCheckActor: Check environment variables
|
|
10
9
|
* - supabaseStartActor: Start Supabase local
|
|
10
|
+
* - tablesManifestActor: Refresh tables.json from local Supabase
|
|
11
|
+
* - processCheckActor: Check for existing processes and port availability
|
|
11
12
|
* - appStartActor: Start Next.js dev server
|
|
13
|
+
* - shutdownActor: Gracefully shut down dev server
|
|
12
14
|
*/
|
|
13
15
|
export { depsInstallActor, envCheckActor, supabaseStartActor, } from '../../build/actors/setup.js';
|
|
16
|
+
export { manifestActor } from '../../build/actors/manifest.js';
|
|
17
|
+
export type { ManifestInput, ManifestOutput } from '../../build/actors/manifest.js';
|
|
18
|
+
export { tablesManifestActor } from './tables-manifest.js';
|
|
19
|
+
export type { TablesManifestInput, TablesManifestOutput } from './tables-manifest.js';
|
|
20
|
+
export { processCheckActor } from './process-check.js';
|
|
21
|
+
export type { ProcessCheckInput, ProcessCheckOutput } from './process-check.js';
|
|
22
|
+
export { appStartActor, shutdownActor } from './app-lifecycle.js';
|
|
23
|
+
export type { AppStartInput, AppStartOutput, ShutdownInput } from './app-lifecycle.js';
|
|
14
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ProcessCheckInput {
|
|
2
|
+
repoRoot: string;
|
|
3
|
+
tmpDir: string;
|
|
4
|
+
port: number;
|
|
5
|
+
replace: boolean;
|
|
6
|
+
skipApp: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ProcessCheckOutput {
|
|
9
|
+
staleProcessRecovered: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const processCheckActor: import("xstate").PromiseActorLogic<ProcessCheckOutput, ProcessCheckInput, import("xstate").EventObject>;
|
|
12
|
+
//# sourceMappingURL=process-check.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for dev actors.
|
|
3
|
+
*/
|
|
4
|
+
/** Minimal logger for process management (used by terminateAppProcessByPid) */
|
|
5
|
+
export declare const consoleLogger: {
|
|
6
|
+
info: {
|
|
7
|
+
(...data: any[]): void;
|
|
8
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
9
|
+
};
|
|
10
|
+
warn: {
|
|
11
|
+
(...data: any[]): void;
|
|
12
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Tables Manifest Refresh Actor
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Refresh .runa/manifests/tables.json from the local Supabase database
|
|
5
|
+
* Pattern: Lightweight introspection refresh for `runa dev`
|
|
6
|
+
*/
|
|
7
|
+
export interface TablesManifestInput {
|
|
8
|
+
repoRoot: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TablesManifestOutput {
|
|
11
|
+
passed: boolean;
|
|
12
|
+
durationMs: number;
|
|
13
|
+
error?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const tablesManifestActor: import("xstate").PromiseActorLogic<TablesManifestOutput, TablesManifestInput, import("xstate").EventObject>;
|
|
16
|
+
//# sourceMappingURL=tables-manifest.d.ts.map
|
|
@@ -22,8 +22,8 @@ export declare const DevInputSchema: z.ZodObject<{
|
|
|
22
22
|
targetDir: z.ZodOptional<z.ZodString>;
|
|
23
23
|
replace: z.ZodDefault<z.ZodBoolean>;
|
|
24
24
|
bundler: z.ZodOptional<z.ZodEnum<{
|
|
25
|
-
turbopack: "turbopack";
|
|
26
25
|
webpack: "webpack";
|
|
26
|
+
turbopack: "turbopack";
|
|
27
27
|
}>>;
|
|
28
28
|
}, z.core.$strict>;
|
|
29
29
|
export type DevInput = z.infer<typeof DevInputSchema>;
|
|
@@ -31,11 +31,11 @@ export type DevInput = z.infer<typeof DevInputSchema>;
|
|
|
31
31
|
* Status of a dev phase.
|
|
32
32
|
*/
|
|
33
33
|
export declare const DevPhaseStatusSchema: z.ZodEnum<{
|
|
34
|
-
|
|
34
|
+
skipped: "skipped";
|
|
35
35
|
failed: "failed";
|
|
36
36
|
pending: "pending";
|
|
37
37
|
running: "running";
|
|
38
|
-
|
|
38
|
+
passed: "passed";
|
|
39
39
|
}>;
|
|
40
40
|
export type DevPhaseStatus = z.infer<typeof DevPhaseStatusSchema>;
|
|
41
41
|
/**
|
|
@@ -18,9 +18,33 @@ export declare function shouldSkipDb({ context }: GuardParams): boolean;
|
|
|
18
18
|
* Skipped when --skip-app is specified.
|
|
19
19
|
*/
|
|
20
20
|
export declare function shouldSkipApp({ context }: GuardParams): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Check if manifest generation should be skipped.
|
|
23
|
+
* Skipped when app startup is disabled or manifest generation is not applicable.
|
|
24
|
+
*/
|
|
25
|
+
export declare function shouldSkipManifest({ context }: GuardParams): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Check if tables manifest refresh should be skipped.
|
|
28
|
+
* Skipped when app startup is disabled, DB setup is disabled, or Supabase is unavailable.
|
|
29
|
+
*/
|
|
30
|
+
export declare function shouldSkipTablesManifest({ context }: GuardParams): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Check if an actor phase reported a failed result.
|
|
33
|
+
*/
|
|
34
|
+
export declare function phaseFailed({ event, }: {
|
|
35
|
+
event: {
|
|
36
|
+
output?: {
|
|
37
|
+
passed?: boolean;
|
|
38
|
+
};
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
};
|
|
41
|
+
}): boolean;
|
|
21
42
|
export declare const guards: {
|
|
22
43
|
shouldSkipDb: typeof shouldSkipDb;
|
|
23
44
|
shouldSkipApp: typeof shouldSkipApp;
|
|
45
|
+
shouldSkipManifest: typeof shouldSkipManifest;
|
|
46
|
+
shouldSkipTablesManifest: typeof shouldSkipTablesManifest;
|
|
47
|
+
phaseFailed: typeof phaseFailed;
|
|
24
48
|
};
|
|
25
49
|
export {};
|
|
26
50
|
//# sourceMappingURL=guards.d.ts.map
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* State Flow:
|
|
13
13
|
* idle → START → processCheck → setup{depsInstall → envCheck → supabaseStart}
|
|
14
|
-
* → appStart → running → (STOP) → shutdown → done
|
|
14
|
+
* → tablesManifest → manifest → appStart → running → (STOP) → shutdown → done
|
|
15
15
|
* Any error → failed
|
|
16
16
|
*
|
|
17
17
|
* E2E Test Mapping (CLI observable behavior):
|
|
@@ -24,32 +24,8 @@
|
|
|
24
24
|
* - failed → expect(exitCode).toBe(1)
|
|
25
25
|
*/
|
|
26
26
|
import { type SnapshotFrom } from 'xstate';
|
|
27
|
+
import type { ProcessCheckOutput } from './actors/index.js';
|
|
27
28
|
import type { DevContext, DevInput } from './types.js';
|
|
28
|
-
interface ProcessCheckInput {
|
|
29
|
-
repoRoot: string;
|
|
30
|
-
tmpDir: string;
|
|
31
|
-
port: number;
|
|
32
|
-
replace: boolean;
|
|
33
|
-
skipApp: boolean;
|
|
34
|
-
}
|
|
35
|
-
interface ProcessCheckOutput {
|
|
36
|
-
staleProcessRecovered: boolean;
|
|
37
|
-
}
|
|
38
|
-
interface AppStartInput {
|
|
39
|
-
repoRoot: string;
|
|
40
|
-
appDir: string;
|
|
41
|
-
port: number;
|
|
42
|
-
tmpDir: string;
|
|
43
|
-
stream: boolean;
|
|
44
|
-
bundler?: 'turbopack' | 'webpack';
|
|
45
|
-
}
|
|
46
|
-
interface AppStartOutput {
|
|
47
|
-
pid: number;
|
|
48
|
-
cleanupStreams: () => void;
|
|
49
|
-
}
|
|
50
|
-
interface ShutdownInput {
|
|
51
|
-
pid: number;
|
|
52
|
-
}
|
|
53
29
|
interface DevMachineInput {
|
|
54
30
|
input?: Partial<DevInput>;
|
|
55
31
|
repoRoot?: string;
|
|
@@ -62,8 +38,12 @@ export declare const devMachine: import("xstate").StateMachine<DevContext, {
|
|
|
62
38
|
type: "error.platform";
|
|
63
39
|
error: Error;
|
|
64
40
|
}, {
|
|
65
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").DepsInstallOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").EnvCheckOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").SupabaseStartOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<ProcessCheckOutput, ProcessCheckInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<AppStartOutput, AppStartInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, ShutdownInput, import("xstate").EventObject>> | undefined;
|
|
41
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/index.js").ManifestOutput, import("./actors/index.js").ManifestInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").DepsInstallOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").EnvCheckOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").SupabaseStartOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<ProcessCheckOutput, import("./actors/process-check.js").ProcessCheckInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/app-lifecycle.js").AppStartOutput, import("./actors/app-lifecycle.js").AppStartInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, import("./actors/app-lifecycle.js").ShutdownInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/tables-manifest.js").TablesManifestOutput, import("./actors/tables-manifest.js").TablesManifestInput, import("xstate").EventObject>> | undefined;
|
|
66
42
|
}, {
|
|
43
|
+
src: "manifest";
|
|
44
|
+
logic: import("xstate").PromiseActorLogic<import("./actors/index.js").ManifestOutput, import("./actors/index.js").ManifestInput, import("xstate").EventObject>;
|
|
45
|
+
id: string | undefined;
|
|
46
|
+
} | {
|
|
67
47
|
src: "depsInstall";
|
|
68
48
|
logic: import("xstate").PromiseActorLogic<import("../build/actors/setup.js").DepsInstallOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>;
|
|
69
49
|
id: string | undefined;
|
|
@@ -77,24 +57,37 @@ export declare const devMachine: import("xstate").StateMachine<DevContext, {
|
|
|
77
57
|
id: string | undefined;
|
|
78
58
|
} | {
|
|
79
59
|
src: "processCheck";
|
|
80
|
-
logic: import("xstate").PromiseActorLogic<ProcessCheckOutput, ProcessCheckInput, import("xstate").EventObject>;
|
|
60
|
+
logic: import("xstate").PromiseActorLogic<ProcessCheckOutput, import("./actors/process-check.js").ProcessCheckInput, import("xstate").EventObject>;
|
|
81
61
|
id: string | undefined;
|
|
82
62
|
} | {
|
|
83
63
|
src: "appStart";
|
|
84
|
-
logic: import("xstate").PromiseActorLogic<AppStartOutput, AppStartInput, import("xstate").EventObject>;
|
|
64
|
+
logic: import("xstate").PromiseActorLogic<import("./actors/app-lifecycle.js").AppStartOutput, import("./actors/app-lifecycle.js").AppStartInput, import("xstate").EventObject>;
|
|
85
65
|
id: string | undefined;
|
|
86
66
|
} | {
|
|
87
67
|
src: "shutdown";
|
|
88
|
-
logic: import("xstate").PromiseActorLogic<void, ShutdownInput, import("xstate").EventObject>;
|
|
68
|
+
logic: import("xstate").PromiseActorLogic<void, import("./actors/app-lifecycle.js").ShutdownInput, import("xstate").EventObject>;
|
|
69
|
+
id: string | undefined;
|
|
70
|
+
} | {
|
|
71
|
+
src: "tablesManifest";
|
|
72
|
+
logic: import("xstate").PromiseActorLogic<import("./actors/tables-manifest.js").TablesManifestOutput, import("./actors/tables-manifest.js").TablesManifestInput, import("xstate").EventObject>;
|
|
89
73
|
id: string | undefined;
|
|
90
74
|
}, never, {
|
|
91
75
|
type: "shouldSkipDb";
|
|
92
76
|
params: unknown;
|
|
77
|
+
} | {
|
|
78
|
+
type: "shouldSkipManifest";
|
|
79
|
+
params: unknown;
|
|
93
80
|
} | {
|
|
94
81
|
type: "shouldSkipApp";
|
|
95
82
|
params: unknown;
|
|
96
|
-
}
|
|
97
|
-
|
|
83
|
+
} | {
|
|
84
|
+
type: "shouldSkipTablesManifest";
|
|
85
|
+
params: unknown;
|
|
86
|
+
} | {
|
|
87
|
+
type: "phaseFailed";
|
|
88
|
+
params: unknown;
|
|
89
|
+
}, never, "done" | "failed" | "manifest" | "running" | "idle" | "processCheck" | "appStart" | "shutdown" | "tablesManifest" | {
|
|
90
|
+
setup: "done" | "depsInstall" | "envCheck" | "supabaseStart";
|
|
98
91
|
}, string, DevMachineInput, {
|
|
99
92
|
success: boolean;
|
|
100
93
|
exitCode: 0 | 1;
|
|
@@ -114,6 +107,8 @@ export declare const devMachine: import("xstate").StateMachine<DevContext, {
|
|
|
114
107
|
readonly done: {};
|
|
115
108
|
};
|
|
116
109
|
};
|
|
110
|
+
readonly tablesManifest: {};
|
|
111
|
+
readonly manifest: {};
|
|
117
112
|
readonly appStart: {};
|
|
118
113
|
readonly running: {};
|
|
119
114
|
readonly shutdown: {};
|
|
@@ -20,6 +20,8 @@ export interface DevContext {
|
|
|
20
20
|
tmpDir: string;
|
|
21
21
|
/** Whether Supabase is configured */
|
|
22
22
|
hasDatabase: boolean;
|
|
23
|
+
/** Whether manifest generation is applicable */
|
|
24
|
+
hasManifestTask: boolean;
|
|
23
25
|
/** App process PID (when running) */
|
|
24
26
|
appPid: number | null;
|
|
25
27
|
/** Whether Supabase was started */
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: env pull auth helpers
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Resolve Vercel auth and CLI prerequisites.
|
|
5
|
+
*/
|
|
6
|
+
import { execDotenvx } from '../../../../utils/dotenvx.js';
|
|
7
|
+
import type { EnvPullLogger, EnvPullOptions, VercelAuth } from './shared.js';
|
|
8
|
+
export declare function resolveVercelAuth(workDir: string, options: EnvPullOptions, logger: EnvPullLogger): VercelAuth;
|
|
9
|
+
export declare function buildVercelCmdEnv(auth: VercelAuth): NodeJS.ProcessEnv;
|
|
10
|
+
export declare function ensureVercelCli(): Promise<void>;
|
|
11
|
+
export declare function ensureDotenvxCli(): Promise<void>;
|
|
12
|
+
export { execDotenvx };
|
|
13
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: env pull file helpers
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Manage .env files, local bootstrap replacement, and encryption keys.
|
|
5
|
+
*/
|
|
6
|
+
import type { EnvPullLogger, LocalBootstrapReport, VercelEnvironment } from './shared.js';
|
|
7
|
+
export declare function missingLocalBootstrapReport(): LocalBootstrapReport;
|
|
8
|
+
export declare function formatEnvValue(value: string): string;
|
|
9
|
+
export declare function getOutputPath(workDir: string, environment: VercelEnvironment): string;
|
|
10
|
+
export declare function extractAndSavePrivateKeys(workDir: string, envFiles: string[], logger: EnvPullLogger): boolean;
|
|
11
|
+
export declare function removePrivateKeysFromEnvFile(filePath: string): void;
|
|
12
|
+
export declare function replaceWithLocalValues(filePath: string, workDir: string, logger: EnvPullLogger, dryRun?: boolean): LocalBootstrapReport;
|
|
13
|
+
export declare function encryptFile(workDir: string, filePath: string, logger: EnvPullLogger): Promise<boolean>;
|
|
14
|
+
//# sourceMappingURL=dotenv-files.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: env pull security helpers
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Path validation and error sanitization for env pull.
|
|
5
|
+
*/
|
|
6
|
+
import type { EnvPullLogger, EnvPullOptions } from './shared.js';
|
|
7
|
+
export declare function sanitizeErrorMessage(message: string): string;
|
|
8
|
+
export declare function containsPathTraversal(inputPath: string): boolean;
|
|
9
|
+
export declare function isPathWithinBase(filePath: string, baseDir: string): boolean;
|
|
10
|
+
export declare function validateCustomWorkingDir(cwdPath: string, projectRoot: string): string;
|
|
11
|
+
export declare function resolveWorkingDir(options: EnvPullOptions, logger: EnvPullLogger): string;
|
|
12
|
+
//# sourceMappingURL=security.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: env pull orchestration
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Execute Vercel pull workflow while keeping the CLI entrypoint thin.
|
|
5
|
+
*/
|
|
6
|
+
import type { EnvPullActionResult, EnvPullOptions } from './shared.js';
|
|
7
|
+
export declare function runEnvPullAction(options: EnvPullOptions): Promise<EnvPullActionResult>;
|
|
8
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { createCLILogger } from '@runa-ai/runa';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export type VercelEnvironment = 'development' | 'preview' | 'production';
|
|
4
|
+
export interface EnvPullOptions {
|
|
5
|
+
environment?: VercelEnvironment;
|
|
6
|
+
app?: string;
|
|
7
|
+
cwd?: string;
|
|
8
|
+
encrypt: boolean;
|
|
9
|
+
token?: string;
|
|
10
|
+
project?: string;
|
|
11
|
+
org?: string;
|
|
12
|
+
productionAll?: boolean;
|
|
13
|
+
localhost?: boolean;
|
|
14
|
+
check?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface PullResult {
|
|
17
|
+
environment: VercelEnvironment;
|
|
18
|
+
outputPath: string;
|
|
19
|
+
success: boolean;
|
|
20
|
+
encrypted?: boolean;
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
export type LocalBootstrapStatus = 'ok' | 'partial' | 'missing';
|
|
24
|
+
export interface LocalBootstrapReport {
|
|
25
|
+
status: LocalBootstrapStatus;
|
|
26
|
+
missing: string[];
|
|
27
|
+
}
|
|
28
|
+
export interface VercelAuth {
|
|
29
|
+
method: 'env' | 'file';
|
|
30
|
+
token?: string;
|
|
31
|
+
projectId?: string;
|
|
32
|
+
orgId?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface VercelSyncResult {
|
|
35
|
+
detected: boolean;
|
|
36
|
+
rootDirectory: string | null;
|
|
37
|
+
configUpdated: boolean;
|
|
38
|
+
reason?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface EnvPullActionResult {
|
|
41
|
+
results: PullResult[];
|
|
42
|
+
totalPulled: number;
|
|
43
|
+
totalFailed: number;
|
|
44
|
+
totalEncrypted: number;
|
|
45
|
+
localBootstrap?: LocalBootstrapReport;
|
|
46
|
+
vercelSync?: VercelSyncResult;
|
|
47
|
+
}
|
|
48
|
+
export type EnvPullLogger = ReturnType<typeof createCLILogger>;
|
|
49
|
+
export declare const EnvPullOutputSchema: z.ZodObject<{
|
|
50
|
+
results: z.ZodArray<z.ZodObject<{
|
|
51
|
+
environment: z.ZodEnum<{
|
|
52
|
+
preview: "preview";
|
|
53
|
+
production: "production";
|
|
54
|
+
development: "development";
|
|
55
|
+
}>;
|
|
56
|
+
outputPath: z.ZodString;
|
|
57
|
+
success: z.ZodBoolean;
|
|
58
|
+
encrypted: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
error: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
totalPulled: z.ZodNumber;
|
|
62
|
+
totalFailed: z.ZodNumber;
|
|
63
|
+
totalEncrypted: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
localBootstrap: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
status: z.ZodEnum<{
|
|
66
|
+
ok: "ok";
|
|
67
|
+
missing: "missing";
|
|
68
|
+
partial: "partial";
|
|
69
|
+
}>;
|
|
70
|
+
missing: z.ZodArray<z.ZodString>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
vercelSync: z.ZodOptional<z.ZodObject<{
|
|
73
|
+
detected: z.ZodBoolean;
|
|
74
|
+
rootDirectory: z.ZodNullable<z.ZodString>;
|
|
75
|
+
configUpdated: z.ZodBoolean;
|
|
76
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -94,9 +94,9 @@ export declare const EnvSetupOutputSchema: z.ZodObject<{
|
|
|
94
94
|
}>;
|
|
95
95
|
success: z.ZodBoolean;
|
|
96
96
|
action: z.ZodEnum<{
|
|
97
|
+
updated: "updated";
|
|
97
98
|
skipped: "skipped";
|
|
98
99
|
created: "created";
|
|
99
|
-
updated: "updated";
|
|
100
100
|
}>;
|
|
101
101
|
error: z.ZodOptional<z.ZodString>;
|
|
102
102
|
}, z.core.$strip>>;
|