@runa-ai/runa-cli 0.5.72 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-V66FAQXB.js +1719 -0
- package/dist/cache-N7WNPEYF.js +111 -0
- package/dist/check-LOMVIRHX.js +12 -0
- package/dist/chunk-2APB25TT.js +442 -0
- package/dist/chunk-3FDQW524.js +544 -0
- package/dist/chunk-3WDV32GA.js +33 -0
- package/dist/chunk-5FT3F36G.js +59 -0
- package/dist/chunk-5NKWR4FF.js +254 -0
- package/dist/chunk-644FVGIQ.js +194 -0
- package/dist/chunk-6AALH2ED.js +121 -0
- package/dist/chunk-6FAU4IGR.js +63 -0
- package/dist/chunk-6Y3LAUGL.js +35 -0
- package/dist/chunk-7B5C6U2K.js +274 -0
- package/dist/chunk-AAIE4F2U.js +140 -0
- package/dist/chunk-AIP6MR42.js +12 -0
- package/dist/chunk-CCKG5R4Y.js +59 -0
- package/dist/chunk-DRSUEMAK.js +123 -0
- package/dist/chunk-FHG3ILE4.js +2011 -0
- package/dist/chunk-H2AHNI75.js +31 -0
- package/dist/chunk-HD74F6W2.js +460 -0
- package/dist/chunk-HKUWEGUX.js +36 -0
- package/dist/chunk-IBVVGH6X.js +33 -0
- package/dist/chunk-II7VYQEM.js +179 -0
- package/dist/chunk-JMJP4A47.js +204 -0
- package/dist/chunk-JQXOVCOP.js +574 -0
- package/dist/chunk-KE6QJBZG.js +41 -0
- package/dist/chunk-KWX3JHCY.js +85 -0
- package/dist/chunk-MXRWBNIY.js +74 -0
- package/dist/chunk-NPSRD26F.js +149 -0
- package/dist/chunk-QDF7QXBL.js +67 -0
- package/dist/chunk-QM53IQHM.js +209 -0
- package/dist/chunk-RZLYEO4U.js +219 -0
- package/dist/chunk-SGJG3BKD.js +351 -0
- package/dist/chunk-TYIAD6SB.js +74 -0
- package/dist/chunk-UWWSAPDR.js +31 -0
- package/dist/chunk-VM3IWOT5.js +458 -0
- package/dist/chunk-VRXHCR5K.js +42 -0
- package/dist/chunk-WJXC4MVY.js +75 -0
- package/dist/chunk-XDCHRVE3.js +215 -0
- package/dist/chunk-Z4Z5DNW4.js +1196 -0
- package/dist/chunk-ZZOXM6Q4.js +8 -0
- package/dist/ci-ZWRVWNFX.js +9298 -0
- package/dist/cli/contract-output.d.ts +1 -0
- package/dist/cli/index.d.ts +7 -1
- package/dist/cli/requested-command.d.ts +8 -0
- package/dist/cli-2JNBJUBB.js +704 -0
- package/dist/commands/build/actors/db-sync.d.ts +2 -0
- package/dist/commands/build/actors/static-checks.d.ts +7 -6
- package/dist/commands/build/actors/validate.d.ts +2 -0
- package/dist/commands/build/contract.d.ts +30 -30
- package/dist/commands/build/machine-dry-run.d.ts +3 -0
- package/dist/commands/build/machine-e2e-meta.d.ts +120 -0
- package/dist/commands/build/machine.d.ts +22 -22
- package/dist/commands/build/types.d.ts +2 -4
- package/dist/commands/check/commands/check.d.ts +8 -3
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts +9 -6
- package/dist/commands/ci/machine/actors/db/schema-canonical-diff.d.ts +55 -0
- package/dist/commands/ci/machine/actors/db/schema-stats.d.ts +11 -0
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +9 -1
- package/dist/commands/ci/machine/contract.d.ts +26 -26
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts +1 -5
- package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts +5 -0
- package/dist/commands/ci/machine/formatters/sections/index.d.ts +2 -2
- package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts +3 -3
- package/dist/commands/ci/machine/machine-execution-helpers.d.ts +40 -0
- package/dist/commands/ci/machine/machine-state-helpers.d.ts +14 -0
- package/dist/commands/ci/machine/machine.d.ts +12 -12
- package/dist/commands/ci/machine/types.d.ts +2 -5
- package/dist/commands/ci/utils/ci-summary.d.ts +15 -15
- package/dist/commands/ci/utils/execa-helpers.d.ts +2 -0
- package/dist/commands/db/apply/actors/idempotent-actors.d.ts +34 -0
- package/dist/commands/db/apply/actors/lock-actors.d.ts +16 -0
- package/dist/commands/db/apply/actors/pg-schema-diff-actors.d.ts +31 -0
- package/dist/commands/db/apply/actors/seed-actors.d.ts +11 -0
- package/dist/commands/db/apply/actors/shared.d.ts +9 -0
- package/dist/commands/db/apply/actors.d.ts +16 -65
- package/dist/commands/db/apply/contract.d.ts +8 -1
- package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts +3 -4
- package/dist/commands/db/apply/helpers/data-integrity-verifier.d.ts +37 -0
- package/dist/commands/db/apply/helpers/fresh-db-handler.d.ts +34 -0
- package/dist/commands/db/apply/helpers/hazard-handler.d.ts +60 -0
- package/dist/commands/db/apply/helpers/idempotent-object-registry.d.ts +96 -0
- package/dist/commands/db/apply/helpers/idempotent-transaction.d.ts +20 -0
- package/dist/commands/db/apply/helpers/index.d.ts +6 -0
- package/dist/commands/db/apply/helpers/partition-validator.d.ts +2 -15
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts +18 -162
- package/dist/commands/db/apply/helpers/pg-schema-diff-patterns.d.ts +55 -0
- package/dist/commands/db/apply/helpers/pg-schema-diff-version.d.ts +50 -0
- package/dist/commands/db/apply/helpers/plan-validator.d.ts +4 -10
- package/dist/commands/db/apply/helpers/rbac-password-manager.d.ts +34 -0
- package/dist/commands/db/apply/helpers/retry-logic.d.ts +16 -2
- package/dist/commands/db/apply/helpers/shadow-db-manager.d.ts +1 -1
- package/dist/commands/db/apply/helpers/sql-utils.d.ts +26 -0
- package/dist/commands/db/apply/machine.d.ts +52 -1
- package/dist/commands/db/commands/db-apply.d.ts +18 -0
- package/dist/commands/db/commands/db-sync/boundary-classifier.d.ts +21 -0
- package/dist/commands/db/commands/db-sync/error-classifier.d.ts +9 -0
- package/dist/commands/db/commands/db-sync/plan-hazard-analyzer.d.ts +13 -0
- package/dist/commands/db/commands/db-sync/risk-reporter.d.ts +19 -0
- package/dist/commands/db/commands/db-sync/sql-parser.d.ts +25 -0
- package/dist/commands/db/commands/db-sync/types.d.ts +47 -0
- package/dist/commands/db/commands/db-sync.d.ts +14 -0
- package/dist/commands/db/sync/contract.d.ts +6 -2
- package/dist/commands/db/sync/machine.d.ts +2 -1
- package/dist/commands/db/types.d.ts +2 -0
- package/dist/commands/db/utils/boundary-policy/rule-compiler.d.ts +11 -0
- package/dist/commands/db/utils/boundary-policy/types.d.ts +105 -0
- package/dist/commands/db/utils/boundary-policy/validation.d.ts +20 -0
- package/dist/commands/db/utils/boundary-policy-runtime.d.ts +28 -0
- package/dist/commands/db/utils/boundary-policy.d.ts +5 -0
- package/dist/commands/db/utils/idempotent-risk-context.d.ts +29 -0
- package/dist/commands/db/utils/preflight-check.d.ts +14 -0
- package/dist/commands/db/utils/preflight-checks/domain-naming-checks.d.ts +106 -0
- package/dist/commands/db/utils/preflight-checks/orphan-checks.d.ts +36 -0
- package/dist/commands/db/utils/preflight-checks/schema-risk-checks.d.ts +22 -0
- package/dist/commands/db/utils/preflight-checks/supabase-checks.d.ts +55 -0
- package/dist/commands/db/utils/risk-detector-loader.d.ts +8 -0
- package/dist/commands/db/utils/schema-precheck-budget.d.ts +17 -0
- package/dist/commands/db/utils/sql-boundary-parser.d.ts +12 -0
- package/dist/commands/db/utils/sql-file-collector.d.ts +8 -0
- package/dist/commands/db/utils/sql-filename-parser.d.ts +20 -0
- package/dist/commands/db/utils/sql-table-extractor-ast.d.ts +19 -0
- package/dist/commands/db/utils/sql-table-extractor-regex.d.ts +50 -0
- package/dist/commands/db/utils/sql-table-extractor-rls.d.ts +13 -0
- package/dist/commands/db/utils/sql-table-extractor.d.ts +79 -1
- package/dist/commands/db/utils/table-registry-introspection.d.ts +68 -0
- package/dist/commands/db/utils/table-registry.d.ts +3 -38
- package/dist/commands/dev/actors/app-lifecycle.d.ts +18 -0
- package/dist/commands/dev/actors/index.d.ts +12 -2
- package/dist/commands/dev/actors/process-check.d.ts +12 -0
- package/dist/commands/dev/actors/shared.d.ts +15 -0
- package/dist/commands/dev/actors/tables-manifest.d.ts +16 -0
- package/dist/commands/dev/contract.d.ts +3 -3
- package/dist/commands/dev/guards.d.ts +24 -0
- package/dist/commands/dev/machine.d.ts +27 -32
- package/dist/commands/dev/types.d.ts +2 -0
- package/dist/commands/doctor.d.ts +9 -0
- package/dist/commands/env/commands/env-pull/auth.d.ts +13 -0
- package/dist/commands/env/commands/env-pull/dotenv-files.d.ts +14 -0
- package/dist/commands/env/commands/env-pull/security.d.ts +12 -0
- package/dist/commands/env/commands/env-pull/service.d.ts +8 -0
- package/dist/commands/env/commands/env-pull/shared.d.ts +79 -0
- package/dist/commands/env/commands/setup/types.d.ts +1 -1
- package/dist/commands/env/constants/local-supabase.d.ts +2 -0
- package/dist/commands/inject-test-attrs/defaults.d.ts +9 -0
- package/dist/commands/template-check/contract.d.ts +6 -6
- package/dist/commands/template-check/machine.d.ts +2 -2
- package/dist/commands/template-check/types.d.ts +0 -4
- package/dist/commands/template-check/utils/diff-analyzer.d.ts +0 -4
- package/dist/commands/utils/machine-state-logging.d.ts +20 -0
- package/dist/commands/utils/repo-root.d.ts +2 -0
- package/dist/config/env.d.ts +4 -4
- package/dist/config-loader-GT3HAQ7U.js +7 -0
- package/dist/db-XULCILOU.js +14137 -0
- package/dist/dev-5YXNPTCJ.js +992 -0
- package/dist/doctor-MZLOA53G.js +44 -0
- package/dist/env-HMMRSYCI.js +7 -0
- package/dist/env-SS66PZ4B.js +2623 -0
- package/dist/env-files-2UIUYLLR.js +8 -0
- package/dist/error-handler-HEXBRNVV.js +460 -0
- package/dist/hotfix-YA3DGLOM.js +1477 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +48 -42995
- package/dist/init-ZIL6LRFO.js +631 -0
- package/dist/inject-test-attrs-P44BVTQS.js +23 -0
- package/dist/internal/machines/snapshot-helpers.d.ts +6 -0
- package/dist/lib/sql-comment-utils.d.ts +25 -0
- package/dist/license-OB7GVJQ2.js +468 -0
- package/dist/link-VSNDVZZD.js +59 -0
- package/dist/manifest-TMFLESHW.js +19 -0
- package/dist/prepare-32DOVHTE.js +250 -0
- package/dist/risk-detector-4U6ZJ2G5.js +6 -0
- package/dist/risk-detector-core-TK4OAI3N.js +166 -0
- package/dist/risk-detector-plpgsql-HWKS4OLR.js +1886 -0
- package/dist/sdk-XK6HQU7S.js +348 -0
- package/dist/services-7VK5KZTO.js +177 -0
- package/dist/session-SFW5QSXZ.js +142 -0
- package/dist/signal-handler-DO3OANW5.js +6 -0
- package/dist/status-UTKS63AB.js +94 -0
- package/dist/telemetry-P56UBLZ2.js +93 -0
- package/dist/template-check-3P4HZXVY.js +1944 -0
- package/dist/test-V4KQL574.js +650 -0
- package/dist/test-gen-FS4CEY3P.js +88 -0
- package/dist/ui-RJAMCWUI.js +331 -0
- package/dist/upgrade-NUK3ZBCL.js +637 -0
- package/dist/utils/config-loader.d.ts +0 -3
- package/dist/validate-CAAW4Y44.js +54 -0
- package/dist/validators/risk-detector-content-risks.d.ts +13 -0
- package/dist/validators/risk-detector-core.d.ts +25 -0
- package/dist/validators/risk-detector-patterns.d.ts +15 -0
- package/dist/validators/risk-detector-plpgsql-expression-resolver.d.ts +22 -0
- package/dist/validators/risk-detector-plpgsql-parser.d.ts +5 -0
- package/dist/validators/risk-detector-plpgsql-tokenizer.d.ts +18 -0
- package/dist/validators/risk-detector-plpgsql.d.ts +9 -0
- package/dist/validators/risk-detector-text-utils.d.ts +6 -0
- package/dist/validators/risk-detector-types.d.ts +16 -0
- package/dist/validators/risk-detector.d.ts +7 -26
- package/dist/vuln-check-2W7N5TA2.js +121 -0
- package/dist/vuln-checker-IQJ56RUV.js +3223 -0
- package/dist/watch-PNTKZYFB.js +911 -0
- package/dist/workflow-H75N4BXX.js +897 -0
- package/package.json +5 -2
- package/dist/cli/contract-mode.d.ts.map +0 -1
- package/dist/cli/contract-output.d.ts.map +0 -1
- package/dist/cli/early-flags.d.ts.map +0 -1
- package/dist/cli/error-handler.d.ts.map +0 -1
- package/dist/cli/exec.d.ts.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/json-output.d.ts.map +0 -1
- package/dist/cli/non-interactive.d.ts.map +0 -1
- package/dist/cli/output-format.d.ts.map +0 -1
- package/dist/cli/signal-handler.d.ts.map +0 -1
- package/dist/commands/build/actors/build.d.ts.map +0 -1
- package/dist/commands/build/actors/clean.d.ts.map +0 -1
- package/dist/commands/build/actors/db-sync.d.ts.map +0 -1
- package/dist/commands/build/actors/index.d.ts.map +0 -1
- package/dist/commands/build/actors/manifest.d.ts.map +0 -1
- package/dist/commands/build/actors/setup.d.ts.map +0 -1
- package/dist/commands/build/actors/static-checks.d.ts.map +0 -1
- package/dist/commands/build/actors/validate.d.ts.map +0 -1
- package/dist/commands/build/commands/build.d.ts.map +0 -1
- package/dist/commands/build/contract.d.ts.map +0 -1
- package/dist/commands/build/guards.d.ts.map +0 -1
- package/dist/commands/build/index.d.ts.map +0 -1
- package/dist/commands/build/machine.d.ts.map +0 -1
- package/dist/commands/build/types.d.ts.map +0 -1
- package/dist/commands/cache.d.ts.map +0 -1
- package/dist/commands/check/commands/check.d.ts.map +0 -1
- package/dist/commands/check/index.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-checks.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-layer-content.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-pr-capabilities.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-apply.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-github.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-types.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-utils.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-workflow.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-resolvers.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-static.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-supabase-local.d.ts.map +0 -1
- package/dist/commands/ci/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/app-build.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/app-start.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/build-and-playwright.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/playwright-install.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/static-checks.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/apply-seeds.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/pgtap-install.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/production-preview.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/pull-production.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/reset.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/schema-stats.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/setup-roles.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/github.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/summary.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/local.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/pr-common.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/pr-local.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/capabilities.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/run-layers.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/ci-local.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/ci-pr.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/machine-runner.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/runtime-env.d.ts.map +0 -1
- package/dist/commands/ci/machine/contract.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/github-comment-types.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/github-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/progress-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/summary.d.ts.map +0 -1
- package/dist/commands/ci/machine/guards.d.ts.map +0 -1
- package/dist/commands/ci/machine/helpers.d.ts.map +0 -1
- package/dist/commands/ci/machine/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/machine.d.ts.map +0 -1
- package/dist/commands/ci/machine/types.d.ts.map +0 -1
- package/dist/commands/ci/utils/ai-report.d.ts.map +0 -1
- package/dist/commands/ci/utils/app-process.d.ts.map +0 -1
- package/dist/commands/ci/utils/app-runtime.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-config.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-env-schema.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-logging.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-summary.d.ts.map +0 -1
- package/dist/commands/ci/utils/config-readers.d.ts.map +0 -1
- package/dist/commands/ci/utils/db-url-utils.d.ts.map +0 -1
- package/dist/commands/ci/utils/e2e-auth-setup.d.ts.map +0 -1
- package/dist/commands/ci/utils/env-security.d.ts.map +0 -1
- package/dist/commands/ci/utils/execa-helpers.d.ts.map +0 -1
- package/dist/commands/ci/utils/exit-code-computation.d.ts.map +0 -1
- package/dist/commands/ci/utils/github-api.d.ts.map +0 -1
- package/dist/commands/ci/utils/github.d.ts.map +0 -1
- package/dist/commands/ci/utils/index.d.ts.map +0 -1
- package/dist/commands/ci/utils/pgtap-installer.d.ts.map +0 -1
- package/dist/commands/ci/utils/rls-verification.d.ts.map +0 -1
- package/dist/commands/ci/utils/schema-operations.d.ts.map +0 -1
- package/dist/commands/ci/utils/seed-operations.d.ts.map +0 -1
- package/dist/commands/ci/utils/test-parallel.d.ts.map +0 -1
- package/dist/commands/ci/utils/timestamp-invariants.d.ts.map +0 -1
- package/dist/commands/ci/utils/workflow-idempotency.d.ts.map +0 -1
- package/dist/commands/db/apply/actors.d.ts.map +0 -1
- package/dist/commands/db/apply/contract.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/advisory-lock.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/index.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-acl-cleaner.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-prefilter.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-validator.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/plan-validator.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/retry-logic.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/shadow-db-manager.d.ts.map +0 -1
- package/dist/commands/db/apply/index.d.ts.map +0 -1
- package/dist/commands/db/apply/machine.d.ts.map +0 -1
- package/dist/commands/db/commands/db-apply.d.ts.map +0 -1
- package/dist/commands/db/commands/db-audit.d.ts.map +0 -1
- package/dist/commands/db/commands/db-backup.d.ts.map +0 -1
- package/dist/commands/db/commands/db-cleanup.d.ts.map +0 -1
- package/dist/commands/db/commands/db-derive-role-passwords.d.ts.map +0 -1
- package/dist/commands/db/commands/db-derive-urls.d.ts.map +0 -1
- package/dist/commands/db/commands/db-diagram.d.ts.map +0 -1
- package/dist/commands/db/commands/db-drizzle.d.ts.map +0 -1
- package/dist/commands/db/commands/db-extension.d.ts.map +0 -1
- package/dist/commands/db/commands/db-generate-password.d.ts.map +0 -1
- package/dist/commands/db/commands/db-lifecycle.d.ts.map +0 -1
- package/dist/commands/db/commands/db-rollback.d.ts.map +0 -1
- package/dist/commands/db/commands/db-schema.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed-metadata.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed-verify.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed.d.ts.map +0 -1
- package/dist/commands/db/commands/db-snapshot.d.ts.map +0 -1
- package/dist/commands/db/commands/db-stack.d.ts.map +0 -1
- package/dist/commands/db/commands/db-stats.d.ts.map +0 -1
- package/dist/commands/db/commands/db-sync.d.ts.map +0 -1
- package/dist/commands/db/commands/db-test.d.ts.map +0 -1
- package/dist/commands/db/constants.d.ts.map +0 -1
- package/dist/commands/db/extension-registry.d.ts.map +0 -1
- package/dist/commands/db/index.d.ts.map +0 -1
- package/dist/commands/db/preflight/actors.d.ts.map +0 -1
- package/dist/commands/db/preflight/contract.d.ts.map +0 -1
- package/dist/commands/db/preflight/index.d.ts.map +0 -1
- package/dist/commands/db/sync/actors.d.ts.map +0 -1
- package/dist/commands/db/sync/contract.d.ts.map +0 -1
- package/dist/commands/db/sync/index.d.ts.map +0 -1
- package/dist/commands/db/sync/machine.d.ts.map +0 -1
- package/dist/commands/db/types.d.ts.map +0 -1
- package/dist/commands/db/utils/db-target.d.ts.map +0 -1
- package/dist/commands/db/utils/db-url-builder.d.ts.map +0 -1
- package/dist/commands/db/utils/error-handlers.d.ts.map +0 -1
- package/dist/commands/db/utils/import-impact-analyzer.d.ts.map +0 -1
- package/dist/commands/db/utils/preflight-check.d.ts.map +0 -1
- package/dist/commands/db/utils/psql.d.ts.map +0 -1
- package/dist/commands/db/utils/schema-detector.d.ts.map +0 -1
- package/dist/commands/db/utils/schema-sync.d.ts.map +0 -1
- package/dist/commands/db/utils/script-runner.d.ts.map +0 -1
- package/dist/commands/db/utils/seed-manager.d.ts.map +0 -1
- package/dist/commands/db/utils/semantic-mapper.d.ts.map +0 -1
- package/dist/commands/db/utils/sql-table-extractor.d.ts.map +0 -1
- package/dist/commands/db/utils/stack-detector.d.ts.map +0 -1
- package/dist/commands/db/utils/table-registry.d.ts.map +0 -1
- package/dist/commands/db/utils/table-source-classifier.d.ts.map +0 -1
- package/dist/commands/dev/actors/index.d.ts.map +0 -1
- package/dist/commands/dev/commands/dev.d.ts.map +0 -1
- package/dist/commands/dev/contract.d.ts.map +0 -1
- package/dist/commands/dev/guards.d.ts.map +0 -1
- package/dist/commands/dev/helpers/stale-process-detector.d.ts.map +0 -1
- package/dist/commands/dev/machine.d.ts.map +0 -1
- package/dist/commands/dev/types.d.ts.map +0 -1
- package/dist/commands/env/commands/env-check.d.ts.map +0 -1
- package/dist/commands/env/commands/env-encrypt.d.ts.map +0 -1
- package/dist/commands/env/commands/env-pull.d.ts.map +0 -1
- package/dist/commands/env/commands/env-setup.d.ts.map +0 -1
- package/dist/commands/env/commands/env-sync.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/action.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/auth.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/file-export.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/github-api.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/helpers.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/index.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/parsers.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/prompts.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/supabase-api.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/types.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/vercel-api.d.ts.map +0 -1
- package/dist/commands/env/constants/local-supabase.d.ts.map +0 -1
- package/dist/commands/env/index.d.ts.map +0 -1
- package/dist/commands/hotfix/actors.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-complete.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-create.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-deploy.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-status.d.ts.map +0 -1
- package/dist/commands/hotfix/contract.d.ts.map +0 -1
- package/dist/commands/hotfix/index.d.ts.map +0 -1
- package/dist/commands/hotfix/machine.d.ts.map +0 -1
- package/dist/commands/hotfix/metadata.d.ts.map +0 -1
- package/dist/commands/hotfix/utils/hotfix-machine-helper.d.ts.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/action.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/commands/inject-test-attrs.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/contract.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/detection-diagnostics.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/formatter.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/index.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/manifest-generator.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/processor-utils.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/processor.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/types.d.ts.map +0 -1
- package/dist/commands/link.d.ts.map +0 -1
- package/dist/commands/manifest/index.d.ts.map +0 -1
- package/dist/commands/prepare/commands/prepare.d.ts.map +0 -1
- package/dist/commands/prepare/index.d.ts.map +0 -1
- package/dist/commands/sdk/commands/publish.d.ts.map +0 -1
- package/dist/commands/sdk/index.d.ts.map +0 -1
- package/dist/commands/services/index.d.ts.map +0 -1
- package/dist/commands/session/index.d.ts.map +0 -1
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/commands/template-check/actors/compare.d.ts.map +0 -1
- package/dist/commands/template-check/actors/discover.d.ts.map +0 -1
- package/dist/commands/template-check/actors/index.d.ts.map +0 -1
- package/dist/commands/template-check/actors/report.d.ts.map +0 -1
- package/dist/commands/template-check/commands/template-check.d.ts.map +0 -1
- package/dist/commands/template-check/config.d.ts.map +0 -1
- package/dist/commands/template-check/contract.d.ts.map +0 -1
- package/dist/commands/template-check/index.d.ts.map +0 -1
- package/dist/commands/template-check/machine.d.ts.map +0 -1
- package/dist/commands/template-check/types.d.ts.map +0 -1
- package/dist/commands/template-check/utils/diff-analyzer.d.ts.map +0 -1
- package/dist/commands/template-check/utils/normalizer.d.ts.map +0 -1
- package/dist/commands/template-check/utils/path-mapping.d.ts.map +0 -1
- package/dist/commands/test/commands/test-db.d.ts.map +0 -1
- package/dist/commands/test/commands/test-e2e.d.ts.map +0 -1
- package/dist/commands/test/commands/test-fast.d.ts.map +0 -1
- package/dist/commands/test/commands/test-integration.d.ts.map +0 -1
- package/dist/commands/test/commands/test-layer.d.ts.map +0 -1
- package/dist/commands/test/commands/test-owasp-generate.d.ts.map +0 -1
- package/dist/commands/test/commands/test-service.d.ts.map +0 -1
- package/dist/commands/test/commands/test-static.d.ts.map +0 -1
- package/dist/commands/test/commands/test.d.ts.map +0 -1
- package/dist/commands/test/index.d.ts.map +0 -1
- package/dist/commands/test-gen.d.ts.map +0 -1
- package/dist/commands/ui.d.ts.map +0 -1
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/validate.d.ts.map +0 -1
- package/dist/commands/vuln-check.d.ts.map +0 -1
- package/dist/commands/watch.d.ts.map +0 -1
- package/dist/commands/workflow/commands/deploy-production.d.ts.map +0 -1
- package/dist/commands/workflow/commands/final-status.d.ts.map +0 -1
- package/dist/commands/workflow/commands/log.d.ts.map +0 -1
- package/dist/commands/workflow/commands/notify.d.ts.map +0 -1
- package/dist/commands/workflow/commands/paths.d.ts.map +0 -1
- package/dist/commands/workflow/commands/sync.d.ts.map +0 -1
- package/dist/commands/workflow/commands/validate.d.ts.map +0 -1
- package/dist/commands/workflow/commands/verify-credentials.d.ts.map +0 -1
- package/dist/commands/workflow/index.d.ts.map +0 -1
- package/dist/commands/workflow/types.d.ts.map +0 -1
- package/dist/config/env-files.d.ts.map +0 -1
- package/dist/config/env.d.ts.map +0 -1
- package/dist/constants/versions.d.ts.map +0 -1
- package/dist/contracts/envelope.d.ts.map +0 -1
- package/dist/errors/catalog.d.ts.map +0 -1
- package/dist/errors/exit-codes.d.ts.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/incremental/affected-tests.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/internal/machines/index.d.ts.map +0 -1
- package/dist/internal/machines/machine-runner.d.ts.map +0 -1
- package/dist/internal/machines/snapshot-helpers.d.ts.map +0 -1
- package/dist/internal/machines/types.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/dependency-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/rls-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/secret-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/typescript-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/config/loader.d.ts.map +0 -1
- package/dist/internal/vuln-checker/constants.d.ts.map +0 -1
- package/dist/internal/vuln-checker/ignore/matcher.d.ts.map +0 -1
- package/dist/internal/vuln-checker/index.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/console-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/json-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/markdown-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/sarif-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/security/path-validation.d.ts.map +0 -1
- package/dist/internal/vuln-checker/types.d.ts.map +0 -1
- package/dist/notifiers/desktop-notifier.d.ts.map +0 -1
- package/dist/ui/components/db-panel.d.ts.map +0 -1
- package/dist/ui/components/status-bar.d.ts.map +0 -1
- package/dist/ui/components/test-panel.d.ts.map +0 -1
- package/dist/ui/dashboard.d.ts.map +0 -1
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/utils/config-loader.d.ts.map +0 -1
- package/dist/utils/config-updater.d.ts.map +0 -1
- package/dist/utils/diagnostics.d.ts.map +0 -1
- package/dist/utils/dotenvx.d.ts.map +0 -1
- package/dist/utils/env-local-bridge.d.ts.map +0 -1
- package/dist/utils/execution-plan.d.ts.map +0 -1
- package/dist/utils/github-output-security.d.ts.map +0 -1
- package/dist/utils/help-system.d.ts.map +0 -1
- package/dist/utils/license/admin-auth.d.ts.map +0 -1
- package/dist/utils/license/allowlist-checker.d.ts.map +0 -1
- package/dist/utils/license/ci-detector.d.ts.map +0 -1
- package/dist/utils/license/index.d.ts.map +0 -1
- package/dist/utils/license/owner-resolver.d.ts.map +0 -1
- package/dist/utils/license/types.d.ts.map +0 -1
- package/dist/utils/license/validate-owner.d.ts.map +0 -1
- package/dist/utils/path-security.d.ts.map +0 -1
- package/dist/utils/port-allocator.d.ts.map +0 -1
- package/dist/utils/secure-exec.d.ts.map +0 -1
- package/dist/utils/template-fetcher.d.ts.map +0 -1
- package/dist/utils/type-guards.d.ts.map +0 -1
- package/dist/utils/vercel-project.d.ts.map +0 -1
- package/dist/utils/workspace-detector.d.ts.map +0 -1
- package/dist/validators/risk-detector.d.ts.map +0 -1
- package/dist/validators/schema-validator.d.ts.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/dist/watchers/schema-watcher.d.ts.map +0 -1
- package/dist/watchers/test-watcher.d.ts.map +0 -1
|
@@ -0,0 +1,631 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { diagnoseInitFailure } from './chunk-AAIE4F2U.js';
|
|
4
|
+
import { getVercelRootDirectory } from './chunk-MXRWBNIY.js';
|
|
5
|
+
import { fetchTemplates } from './chunk-SGJG3BKD.js';
|
|
6
|
+
import { syncRunaConfigWithVercel } from './chunk-6AALH2ED.js';
|
|
7
|
+
import './chunk-DRSUEMAK.js';
|
|
8
|
+
import './chunk-RZLYEO4U.js';
|
|
9
|
+
import { emitJsonSuccess } from './chunk-KE6QJBZG.js';
|
|
10
|
+
import './chunk-WJXC4MVY.js';
|
|
11
|
+
import './chunk-HKUWEGUX.js';
|
|
12
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
13
|
+
import fs from 'fs';
|
|
14
|
+
import path from 'path';
|
|
15
|
+
import { createCLILogger, CLIError, repairRunaConfig, detectExistingInitConfig, initProject, validateInitResult, detectDatabasePackage } from '@runa-ai/runa';
|
|
16
|
+
import { Command } from 'commander';
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
|
|
19
|
+
createRequire(import.meta.url);
|
|
20
|
+
|
|
21
|
+
// src/commands/init.ts
|
|
22
|
+
init_esm_shims();
|
|
23
|
+
|
|
24
|
+
// src/utils/help-system.ts
|
|
25
|
+
init_esm_shims();
|
|
26
|
+
var logger = createCLILogger("help");
|
|
27
|
+
var HELP_DATABASE = [
|
|
28
|
+
// Init command errors
|
|
29
|
+
{
|
|
30
|
+
command: "init",
|
|
31
|
+
errorPattern: /templates directory not found/i,
|
|
32
|
+
helpText: `
|
|
33
|
+
Templates directory not found. This usually means:
|
|
34
|
+
\u2022 @runa-ai/runa is not installed correctly
|
|
35
|
+
\u2022 You're running from the wrong directory
|
|
36
|
+
|
|
37
|
+
Fix:
|
|
38
|
+
1. Verify installation: pnpm list @runa-ai/runa
|
|
39
|
+
2. Reinstall if needed: pnpm add -D @runa-ai/runa
|
|
40
|
+
3. Run from project root (where package.json exists)
|
|
41
|
+
`,
|
|
42
|
+
relatedCommands: ["runa check", "runa status"]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
command: "init",
|
|
46
|
+
errorPattern: /package\.json/i,
|
|
47
|
+
helpText: `
|
|
48
|
+
Not in a valid Node.js project directory.
|
|
49
|
+
|
|
50
|
+
Fix:
|
|
51
|
+
1. Navigate to your project root directory
|
|
52
|
+
2. Ensure package.json exists
|
|
53
|
+
3. If this is a new project: pnpm init
|
|
54
|
+
`,
|
|
55
|
+
relatedCommands: ["runa check"]
|
|
56
|
+
},
|
|
57
|
+
// Database connection errors
|
|
58
|
+
{
|
|
59
|
+
command: "db:sync",
|
|
60
|
+
errorPattern: /DATABASE_URL.*not.*set/i,
|
|
61
|
+
helpText: `
|
|
62
|
+
DATABASE_URL environment variable is not set.
|
|
63
|
+
|
|
64
|
+
For local development:
|
|
65
|
+
1. Start Supabase: runa db start
|
|
66
|
+
2. Get connection string: supabase status
|
|
67
|
+
3. Set in .env.development: DATABASE_URL=postgresql://postgres:postgres@localhost:54322/postgres
|
|
68
|
+
`,
|
|
69
|
+
relatedCommands: ["runa db start", "runa status"]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
command: "db:sync",
|
|
73
|
+
errorPattern: /connection.*refused|ECONNREFUSED/i,
|
|
74
|
+
helpText: `
|
|
75
|
+
Cannot connect to database. The database server is not running or not accessible.
|
|
76
|
+
|
|
77
|
+
Fix:
|
|
78
|
+
1. Start local Supabase: runa db start
|
|
79
|
+
2. Check if Supabase is running: supabase status
|
|
80
|
+
3. Verify DATABASE_URL points to the correct host/port
|
|
81
|
+
4. Check firewall settings if using remote database
|
|
82
|
+
`,
|
|
83
|
+
relatedCommands: ["runa db start", "supabase status"]
|
|
84
|
+
},
|
|
85
|
+
// Schema errors
|
|
86
|
+
{
|
|
87
|
+
command: "db:sync",
|
|
88
|
+
errorPattern: /syntax error|invalid syntax/i,
|
|
89
|
+
helpText: `
|
|
90
|
+
SQL syntax error in your schema or migrations.
|
|
91
|
+
|
|
92
|
+
Fix:
|
|
93
|
+
1. Check your schema files (see runa.config.ts for schema path)
|
|
94
|
+
2. Review recent changes to schema definitions
|
|
95
|
+
3. Validate Drizzle syntax: pnpm type-check
|
|
96
|
+
4. Check SQL functions in database package sql/ directory
|
|
97
|
+
`,
|
|
98
|
+
relatedCommands: ["pnpm type-check"]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
command: "db:sync",
|
|
102
|
+
errorPattern: /constraint.*violation|foreign key/i,
|
|
103
|
+
helpText: `
|
|
104
|
+
Database constraint violation. This usually happens when:
|
|
105
|
+
\u2022 Trying to add a foreign key to non-existent data
|
|
106
|
+
\u2022 Adding NOT NULL constraint to column with existing NULL values
|
|
107
|
+
\u2022 Unique constraint violation
|
|
108
|
+
|
|
109
|
+
Fix:
|
|
110
|
+
1. Check existing data: Connect to DB and query affected tables
|
|
111
|
+
2. Consider data migration: Write a seed script to fix existing data
|
|
112
|
+
3. Make constraint nullable temporarily: Add .nullable() to column
|
|
113
|
+
4. Review schema changes (see runa.config.ts for schema path)
|
|
114
|
+
`,
|
|
115
|
+
relatedCommands: ["runa db start", "supabase db reset"]
|
|
116
|
+
},
|
|
117
|
+
// Docker/Supabase errors
|
|
118
|
+
{
|
|
119
|
+
command: "db:start",
|
|
120
|
+
errorPattern: /docker.*not.*running|cannot connect to docker/i,
|
|
121
|
+
helpText: `
|
|
122
|
+
Docker is not running or not installed.
|
|
123
|
+
|
|
124
|
+
Fix:
|
|
125
|
+
1. Start Colima: colima start --cpu 4 --memory 8 --vm-type vz --mount-type virtiofs
|
|
126
|
+
2. Install Colima: brew install colima docker
|
|
127
|
+
3. Linux: sudo systemctl start docker
|
|
128
|
+
4. Verify Docker is running: docker ps
|
|
129
|
+
`,
|
|
130
|
+
relatedCommands: ["runa check"]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
command: "db:start",
|
|
134
|
+
errorPattern: /port.*already.*allocated|address already in use/i,
|
|
135
|
+
helpText: `
|
|
136
|
+
Required port is already in use by another process.
|
|
137
|
+
|
|
138
|
+
Fix:
|
|
139
|
+
1. Find process using the port: lsof -i :54322
|
|
140
|
+
2. Stop the conflicting process
|
|
141
|
+
3. Or stop existing Supabase instance: supabase stop
|
|
142
|
+
4. Clean up Docker containers: docker ps -a
|
|
143
|
+
`,
|
|
144
|
+
relatedCommands: ["supabase stop", "runa check"]
|
|
145
|
+
},
|
|
146
|
+
// Test errors
|
|
147
|
+
{
|
|
148
|
+
command: "test",
|
|
149
|
+
errorPattern: /no test files found/i,
|
|
150
|
+
helpText: `
|
|
151
|
+
No test files found in the project.
|
|
152
|
+
|
|
153
|
+
Fix:
|
|
154
|
+
1. Check test file naming: *.test.ts or *.spec.ts
|
|
155
|
+
2. Verify test files are in correct location (tests/ or __tests__/)
|
|
156
|
+
3. Generate tests: runa test:gen
|
|
157
|
+
4. Check Vitest configuration: vitest.config.ts
|
|
158
|
+
`,
|
|
159
|
+
relatedCommands: ["runa test:gen"]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
command: "test",
|
|
163
|
+
errorPattern: /test environment.*not.*ready/i,
|
|
164
|
+
helpText: `
|
|
165
|
+
Test environment is not properly set up.
|
|
166
|
+
|
|
167
|
+
Fix:
|
|
168
|
+
1. Start database: runa db start
|
|
169
|
+
2. Check environment variables in .env.test
|
|
170
|
+
3. Run database sync: runa db sync
|
|
171
|
+
4. Verify test database connection: runa status
|
|
172
|
+
`,
|
|
173
|
+
relatedCommands: ["runa db start", "runa status"]
|
|
174
|
+
}
|
|
175
|
+
];
|
|
176
|
+
function findContextualHelp(command, errorMessage) {
|
|
177
|
+
return HELP_DATABASE.find((h) => h.command === command && h.errorPattern.test(errorMessage)) || null;
|
|
178
|
+
}
|
|
179
|
+
function getGenericHelp(command) {
|
|
180
|
+
const genericHelp = {
|
|
181
|
+
init: `
|
|
182
|
+
runa init - Initialize project with runa configuration
|
|
183
|
+
|
|
184
|
+
Common issues:
|
|
185
|
+
\u2022 Not in project root directory
|
|
186
|
+
\u2022 @runa-ai/runa not installed
|
|
187
|
+
\u2022 Missing package.json
|
|
188
|
+
|
|
189
|
+
Try:
|
|
190
|
+
\u2022 runa check (check environment)
|
|
191
|
+
\u2022 runa status (check configuration)
|
|
192
|
+
`,
|
|
193
|
+
"db:start": `
|
|
194
|
+
runa db start - Start local Supabase
|
|
195
|
+
|
|
196
|
+
Common issues:
|
|
197
|
+
\u2022 Docker not running
|
|
198
|
+
\u2022 Ports already in use
|
|
199
|
+
\u2022 Missing supabase/config.toml
|
|
200
|
+
|
|
201
|
+
Try:
|
|
202
|
+
\u2022 Check Docker: docker ps
|
|
203
|
+
\u2022 Check ports: lsof -i :54322
|
|
204
|
+
\u2022 runa check (full environment check)
|
|
205
|
+
`,
|
|
206
|
+
"db:sync": `
|
|
207
|
+
runa db sync - Sync database schema (Ephemeral Migration)
|
|
208
|
+
|
|
209
|
+
Common issues:
|
|
210
|
+
\u2022 DATABASE_URL not set
|
|
211
|
+
\u2022 Database not running
|
|
212
|
+
\u2022 Schema syntax errors
|
|
213
|
+
|
|
214
|
+
Try:
|
|
215
|
+
\u2022 Start database: runa db start
|
|
216
|
+
\u2022 Check connection: supabase status
|
|
217
|
+
\u2022 Validate schema: pnpm type-check
|
|
218
|
+
`,
|
|
219
|
+
test: `
|
|
220
|
+
runa test - Run tests
|
|
221
|
+
|
|
222
|
+
Common issues:
|
|
223
|
+
\u2022 No test files found
|
|
224
|
+
\u2022 Test environment not ready
|
|
225
|
+
\u2022 Database connection issues
|
|
226
|
+
|
|
227
|
+
Try:
|
|
228
|
+
\u2022 Generate tests: runa test:gen
|
|
229
|
+
\u2022 Start database: runa db start
|
|
230
|
+
\u2022 Check status: runa status
|
|
231
|
+
`
|
|
232
|
+
};
|
|
233
|
+
return genericHelp[command];
|
|
234
|
+
}
|
|
235
|
+
function displayHelp(help) {
|
|
236
|
+
logger.info(help.helpText);
|
|
237
|
+
if (help.relatedCommands && help.relatedCommands.length > 0) {
|
|
238
|
+
logger.info("\n\u{1F517} Related commands:");
|
|
239
|
+
for (const cmd of help.relatedCommands) {
|
|
240
|
+
logger.info(` ${cmd}`);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
if (help.learnMoreUrl) {
|
|
244
|
+
logger.info(`
|
|
245
|
+
\u{1F4D6} Learn more: ${help.learnMoreUrl}`);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// src/commands/init.ts
|
|
250
|
+
function checkZodVersion() {
|
|
251
|
+
const zodPaths = [
|
|
252
|
+
path.join(process.cwd(), "node_modules", "zod", "package.json"),
|
|
253
|
+
// Check home directory node_modules (common source of conflicts)
|
|
254
|
+
path.join(process.env.HOME ?? "", "node_modules", "zod", "package.json")
|
|
255
|
+
];
|
|
256
|
+
for (const zodPath of zodPaths) {
|
|
257
|
+
if (!fs.existsSync(zodPath)) continue;
|
|
258
|
+
try {
|
|
259
|
+
const raw = fs.readFileSync(zodPath, "utf-8");
|
|
260
|
+
const pkg = JSON.parse(raw);
|
|
261
|
+
const version = pkg.version ?? "";
|
|
262
|
+
if (version.startsWith("3.")) {
|
|
263
|
+
throw new CLIError(
|
|
264
|
+
`Incompatible zod version detected: ${version}`,
|
|
265
|
+
"ZOD_VERSION_INCOMPATIBLE",
|
|
266
|
+
[
|
|
267
|
+
"runa SDK requires zod v4.x, but found zod v3.x",
|
|
268
|
+
`Conflicting zod found at: ${path.dirname(zodPath)}`,
|
|
269
|
+
"",
|
|
270
|
+
"Solutions:",
|
|
271
|
+
"1. Run from a clean project directory without existing node_modules",
|
|
272
|
+
"2. Remove conflicting zod: rm -rf ~/node_modules (if in home dir)",
|
|
273
|
+
"3. Or create a new directory and run: pnpm dlx @runa-ai/runa-cli init"
|
|
274
|
+
]
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
} catch (error) {
|
|
278
|
+
if (error instanceof CLIError) throw error;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
var InitSuccessDataSchema = z.object({
|
|
283
|
+
projectName: z.string(),
|
|
284
|
+
copiedCount: z.number().int().nonnegative(),
|
|
285
|
+
skippedCount: z.number().int().nonnegative(),
|
|
286
|
+
huskyInstalled: z.boolean(),
|
|
287
|
+
dependenciesInstalled: z.boolean(),
|
|
288
|
+
isMonorepo: z.boolean(),
|
|
289
|
+
/** Database platform (not ORM). Drizzle is always the ORM. */
|
|
290
|
+
dbType: z.literal("supabase"),
|
|
291
|
+
existingConfig: z.object({
|
|
292
|
+
hasConfig: z.boolean(),
|
|
293
|
+
files: z.array(z.string())
|
|
294
|
+
}),
|
|
295
|
+
/** mise setup result (if setupMise was true) */
|
|
296
|
+
miseSetup: z.object({
|
|
297
|
+
miseInstalled: z.boolean(),
|
|
298
|
+
miseTrusted: z.boolean(),
|
|
299
|
+
miseToolsInstalled: z.boolean(),
|
|
300
|
+
preflightPassed: z.boolean()
|
|
301
|
+
}).optional(),
|
|
302
|
+
/** Vercel sync result (if not skipped) */
|
|
303
|
+
vercelSync: z.object({
|
|
304
|
+
detected: z.boolean(),
|
|
305
|
+
rootDirectory: z.string().nullable(),
|
|
306
|
+
configUpdated: z.boolean(),
|
|
307
|
+
reason: z.string().optional()
|
|
308
|
+
}).optional()
|
|
309
|
+
}).strict();
|
|
310
|
+
function renderExistingConfigNotice(params) {
|
|
311
|
+
if (!params.existingConfig.hasConfig || params.force) return;
|
|
312
|
+
params.logger.warn("Existing runa configuration detected");
|
|
313
|
+
params.logger.info("Found:");
|
|
314
|
+
for (const file of params.existingConfig.files) {
|
|
315
|
+
params.logger.info(` \u2022 ${file}`);
|
|
316
|
+
}
|
|
317
|
+
params.logger.info("Non-interactive mode: keeping existing files by default.");
|
|
318
|
+
params.logger.info("To overwrite existing files, re-run with: runa init --force");
|
|
319
|
+
}
|
|
320
|
+
function renderInstallStatus(logger2, success, successMsg, failMsg, manualCmd) {
|
|
321
|
+
if (success) {
|
|
322
|
+
logger2.success(successMsg);
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
logger2.warn(failMsg);
|
|
326
|
+
logger2.info(manualCmd);
|
|
327
|
+
}
|
|
328
|
+
function renderMiseSetupStatus(params) {
|
|
329
|
+
const miseSetup = params.result.miseSetup;
|
|
330
|
+
if (!miseSetup) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
params.logger.info("");
|
|
334
|
+
params.logger.section("mise Setup");
|
|
335
|
+
if (!miseSetup.miseInstalled) {
|
|
336
|
+
params.logger.warn("mise is not installed");
|
|
337
|
+
params.logger.info("");
|
|
338
|
+
params.logger.info(
|
|
339
|
+
"mise is a tool version manager that installs node, pnpm, supabase, and more."
|
|
340
|
+
);
|
|
341
|
+
params.logger.info("");
|
|
342
|
+
params.logger.info("To install mise:");
|
|
343
|
+
params.logger.info(" curl https://mise.run | sh");
|
|
344
|
+
params.logger.info(` echo 'eval "$(mise activate zsh)"' >> ~/.zshrc`);
|
|
345
|
+
params.logger.info(" source ~/.zshrc");
|
|
346
|
+
params.logger.info("");
|
|
347
|
+
params.logger.info("Then run setup:");
|
|
348
|
+
params.logger.info(" mise trust && mise install && mise run setup");
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
params.logger.success("\u2705 mise installed");
|
|
352
|
+
if (miseSetup.miseTrusted) {
|
|
353
|
+
params.logger.success("\u2705 mise.toml trusted");
|
|
354
|
+
} else {
|
|
355
|
+
params.logger.warn("\u26A0\uFE0F mise.toml not trusted");
|
|
356
|
+
params.logger.info(" Run: mise trust");
|
|
357
|
+
}
|
|
358
|
+
if (miseSetup.miseToolsInstalled) {
|
|
359
|
+
params.logger.success("\u2705 Tools installed (node, pnpm, go, supabase, gh)");
|
|
360
|
+
} else {
|
|
361
|
+
params.logger.warn("\u26A0\uFE0F Tools not installed");
|
|
362
|
+
params.logger.info(" Run: mise install");
|
|
363
|
+
}
|
|
364
|
+
if (miseSetup.preflightPassed) {
|
|
365
|
+
params.logger.success("\u2705 Preflight checks passed");
|
|
366
|
+
} else {
|
|
367
|
+
params.logger.warn("\u26A0\uFE0F Preflight checks failed");
|
|
368
|
+
params.logger.info(" Check: Docker running, gh auth, NODE_AUTH_TOKEN");
|
|
369
|
+
params.logger.info(" Run: mise run preflight (for details)");
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
async function syncWithVercelProject(targetDir, logger2) {
|
|
373
|
+
logger2.info("");
|
|
374
|
+
logger2.section("Vercel Project Sync");
|
|
375
|
+
const rootDirectory = await getVercelRootDirectory();
|
|
376
|
+
if (!rootDirectory) {
|
|
377
|
+
logger2.info("No Vercel project linked (skipping auto-config)");
|
|
378
|
+
logger2.info("Tip: Run `vercel link` to link a project");
|
|
379
|
+
return {
|
|
380
|
+
detected: false,
|
|
381
|
+
rootDirectory: null,
|
|
382
|
+
configUpdated: false,
|
|
383
|
+
reason: "No Vercel project linked"
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
logger2.info(`Detected Vercel Root Directory: ${rootDirectory}`);
|
|
387
|
+
const syncResult = syncRunaConfigWithVercel(targetDir, rootDirectory);
|
|
388
|
+
if (!syncResult) {
|
|
389
|
+
return {
|
|
390
|
+
detected: true,
|
|
391
|
+
rootDirectory,
|
|
392
|
+
configUpdated: false,
|
|
393
|
+
reason: "Sync not needed"
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
if (syncResult.updated) {
|
|
397
|
+
logger2.success(`\u2705 Updated runa.config.ts: ${syncResult.field} = '${rootDirectory}'`);
|
|
398
|
+
return {
|
|
399
|
+
detected: true,
|
|
400
|
+
rootDirectory,
|
|
401
|
+
configUpdated: true,
|
|
402
|
+
reason: syncResult.reason
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
logger2.info(`runa.config.ts: ${syncResult.reason}`);
|
|
406
|
+
return {
|
|
407
|
+
detected: true,
|
|
408
|
+
rootDirectory,
|
|
409
|
+
configUpdated: false,
|
|
410
|
+
reason: syncResult.reason
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
function renderNextSteps(params) {
|
|
414
|
+
params.logger.info("");
|
|
415
|
+
params.logger.section("Next Steps");
|
|
416
|
+
const dbPackage = detectDatabasePackage(process.cwd()) ?? "packages/database";
|
|
417
|
+
if (params.result.dbType === "supabase") {
|
|
418
|
+
const syncCmd = params.result.isMonorepo ? `cd ${dbPackage} && runa db sync` : "runa db sync";
|
|
419
|
+
params.logger.info("1. Start local Supabase:");
|
|
420
|
+
params.logger.info(" supabase start");
|
|
421
|
+
params.logger.info("");
|
|
422
|
+
params.logger.info("2. Apply schema (REQUIRED):");
|
|
423
|
+
params.logger.info(` ${syncCmd}`);
|
|
424
|
+
params.logger.info(" \u26A0\uFE0F This generates TypeScript types. Skip = type errors.");
|
|
425
|
+
params.logger.info("");
|
|
426
|
+
params.logger.info("3. Start developing:");
|
|
427
|
+
params.logger.info(" pnpm dev");
|
|
428
|
+
} else {
|
|
429
|
+
params.logger.info("1. Start developing:");
|
|
430
|
+
params.logger.info(" pnpm dev");
|
|
431
|
+
}
|
|
432
|
+
params.logger.info("");
|
|
433
|
+
params.logger.info("\u{1F4A1} Troubleshooting:");
|
|
434
|
+
params.logger.info(" runa check # Diagnose environment issues");
|
|
435
|
+
params.logger.info(" runa check --verbose # Detailed output with fix hints");
|
|
436
|
+
params.logger.info("");
|
|
437
|
+
params.logger.info(`\u{1F4D6} Documentation: ${dbPackage}/SETUP-AFTER-INIT.md`);
|
|
438
|
+
}
|
|
439
|
+
function tryShowContextualHelp(params) {
|
|
440
|
+
const help = findContextualHelp("init", params.message);
|
|
441
|
+
if (!help) return false;
|
|
442
|
+
displayHelp(help);
|
|
443
|
+
params.suggestions.push("Review contextual help above");
|
|
444
|
+
return true;
|
|
445
|
+
}
|
|
446
|
+
function applyDiagnostics(params) {
|
|
447
|
+
const diagnostics = diagnoseInitFailure(params.message);
|
|
448
|
+
if (diagnostics.length === 0) return false;
|
|
449
|
+
params.logger.info("\n\u{1F50D} Diagnostics:");
|
|
450
|
+
for (const diagnostic of diagnostics) {
|
|
451
|
+
params.logger.warn(` \u2022 ${diagnostic.message}`);
|
|
452
|
+
if (!diagnostic.fixInstructions) continue;
|
|
453
|
+
params.logger.info("\n Fix:");
|
|
454
|
+
for (const instruction of diagnostic.fixInstructions) {
|
|
455
|
+
params.logger.info(` - ${instruction}`);
|
|
456
|
+
params.suggestions.push(instruction);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return true;
|
|
460
|
+
}
|
|
461
|
+
function showGenericInitHelp(params) {
|
|
462
|
+
const genericHelp = getGenericHelp("init");
|
|
463
|
+
params.logger.info(`
|
|
464
|
+
${genericHelp}`);
|
|
465
|
+
params.suggestions.push("Review generic help above");
|
|
466
|
+
}
|
|
467
|
+
function toInitCliError(params) {
|
|
468
|
+
const suggestions = [];
|
|
469
|
+
if (!(params.error instanceof Error)) {
|
|
470
|
+
return new CLIError(
|
|
471
|
+
"Initialization failed with unknown error",
|
|
472
|
+
"INIT_UNKNOWN_ERROR",
|
|
473
|
+
["Check error details above", "Try: runa check"],
|
|
474
|
+
params.error instanceof Error ? params.error : void 0
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
const message = params.error.message;
|
|
478
|
+
const shownContext = tryShowContextualHelp({ message, suggestions });
|
|
479
|
+
if (!shownContext) {
|
|
480
|
+
const usedDiagnostics = applyDiagnostics({ logger: params.logger, message, suggestions });
|
|
481
|
+
if (!usedDiagnostics) {
|
|
482
|
+
showGenericInitHelp({ logger: params.logger, suggestions });
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
suggestions.push("For more help: runa check");
|
|
486
|
+
return new CLIError(
|
|
487
|
+
`Initialization failed: ${message}`,
|
|
488
|
+
"INIT_FAILED",
|
|
489
|
+
suggestions,
|
|
490
|
+
params.error
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
function handleRepairConfigMode(options, logger2) {
|
|
494
|
+
if (!options.repairConfig) {
|
|
495
|
+
return false;
|
|
496
|
+
}
|
|
497
|
+
logger2.section("Repairing runa.config.ts");
|
|
498
|
+
const projectName = path.basename(process.cwd());
|
|
499
|
+
const repairResult = repairRunaConfig(process.cwd(), projectName);
|
|
500
|
+
if (!repairResult.success) {
|
|
501
|
+
throw new CLIError(`Config repair failed: ${repairResult.message}`, "CONFIG_REPAIR_FAILED", [
|
|
502
|
+
"The config file could not be repaired automatically",
|
|
503
|
+
"Try: Remove runa.config.ts and run `runa init` fresh",
|
|
504
|
+
"Or: Manually fix the config file syntax"
|
|
505
|
+
]);
|
|
506
|
+
}
|
|
507
|
+
logger2.success("\u2705 Config file repaired successfully");
|
|
508
|
+
if (repairResult.backupPath) {
|
|
509
|
+
logger2.info(` Backup saved to: ${repairResult.backupPath}`);
|
|
510
|
+
}
|
|
511
|
+
logger2.info("");
|
|
512
|
+
logger2.info("Extracted values:");
|
|
513
|
+
if (repairResult.extractedValues.projectName) {
|
|
514
|
+
logger2.info(` projectName: ${repairResult.extractedValues.projectName}`);
|
|
515
|
+
}
|
|
516
|
+
if (repairResult.extractedValues.monorepo !== void 0) {
|
|
517
|
+
logger2.info(` monorepo: ${repairResult.extractedValues.monorepo}`);
|
|
518
|
+
}
|
|
519
|
+
if (repairResult.extractedValues.appDirectory) {
|
|
520
|
+
logger2.info(` appDirectory: ${repairResult.extractedValues.appDirectory}`);
|
|
521
|
+
}
|
|
522
|
+
logger2.info("");
|
|
523
|
+
logger2.info("Next steps:");
|
|
524
|
+
logger2.info(" 1. Run `runa check` to verify the configuration");
|
|
525
|
+
logger2.info(" 2. Review the generated runa.config.ts");
|
|
526
|
+
return true;
|
|
527
|
+
}
|
|
528
|
+
async function runInitWorkflow(options, logger2) {
|
|
529
|
+
logger2.section("Initializing runa Configuration");
|
|
530
|
+
checkZodVersion();
|
|
531
|
+
logger2.step("Fetching templates", 0);
|
|
532
|
+
const templateResult = await fetchTemplates({
|
|
533
|
+
version: options.templatesVersion,
|
|
534
|
+
fresh: options.fresh,
|
|
535
|
+
verbose: process.env.DEBUG === "true"
|
|
536
|
+
});
|
|
537
|
+
logger2.info(
|
|
538
|
+
templateResult.cached ? `Using ${templateResult.version === "workspace" ? "workspace" : "cached"} templates v${templateResult.version}` : `Fetched templates v${templateResult.version}`
|
|
539
|
+
);
|
|
540
|
+
const existingConfig = detectExistingInitConfig(process.cwd());
|
|
541
|
+
renderExistingConfigNotice({
|
|
542
|
+
logger: logger2,
|
|
543
|
+
existingConfig,
|
|
544
|
+
force: options.force === true
|
|
545
|
+
});
|
|
546
|
+
const projectName = path.basename(process.cwd());
|
|
547
|
+
logger2.info(`Project: ${projectName}`);
|
|
548
|
+
logger2.step("Applying templates (SDK)", 1);
|
|
549
|
+
const result = await initProject({
|
|
550
|
+
targetDir: process.cwd(),
|
|
551
|
+
projectName,
|
|
552
|
+
force: options.force === true,
|
|
553
|
+
installHusky: true,
|
|
554
|
+
db: options.db,
|
|
555
|
+
scope: options.scope,
|
|
556
|
+
setupMise: options.skipMise !== true,
|
|
557
|
+
skipPostInit: options.skipPostInit === true,
|
|
558
|
+
templatesDir: templateResult.templatesDir
|
|
559
|
+
});
|
|
560
|
+
logger2.info(`Copied ${result.copiedCount} file(s), skipped ${result.skippedCount} file(s)`);
|
|
561
|
+
if (result.skippedCount > 0 && !options.force) {
|
|
562
|
+
logger2.info("Use --force to overwrite existing files");
|
|
563
|
+
}
|
|
564
|
+
renderInstallStatus(
|
|
565
|
+
logger2,
|
|
566
|
+
result.dependenciesInstalled,
|
|
567
|
+
"Dependencies installed successfully",
|
|
568
|
+
"Failed to install dependencies",
|
|
569
|
+
"Run manually: pnpm install"
|
|
570
|
+
);
|
|
571
|
+
renderInstallStatus(
|
|
572
|
+
logger2,
|
|
573
|
+
result.huskyInstalled,
|
|
574
|
+
"Git hooks installed successfully",
|
|
575
|
+
"Failed to install Git hooks (husky)",
|
|
576
|
+
"You can install manually later: npx husky install"
|
|
577
|
+
);
|
|
578
|
+
renderMiseSetupStatus({ logger: logger2, result });
|
|
579
|
+
let vercelSyncResult;
|
|
580
|
+
if (options.skipVercel !== true) {
|
|
581
|
+
vercelSyncResult = await syncWithVercelProject(process.cwd(), logger2);
|
|
582
|
+
}
|
|
583
|
+
logger2.info("");
|
|
584
|
+
logger2.section("Validating Setup");
|
|
585
|
+
const validation = validateInitResult(process.cwd());
|
|
586
|
+
if (validation.valid) {
|
|
587
|
+
logger2.success("\u2705 monorepo: true");
|
|
588
|
+
logger2.success("\u2705 packages/database/ created");
|
|
589
|
+
logger2.success("\u2705 Database commands ready");
|
|
590
|
+
} else {
|
|
591
|
+
for (const error of validation.errors) {
|
|
592
|
+
logger2.error(`\u274C ${error}`);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
for (const warning of validation.warnings) {
|
|
596
|
+
logger2.warn(`\u26A0\uFE0F ${warning}`);
|
|
597
|
+
}
|
|
598
|
+
logger2.info("");
|
|
599
|
+
logger2.success("Initialization complete!");
|
|
600
|
+
renderNextSteps({ logger: logger2, result });
|
|
601
|
+
return { result, vercelSyncResult };
|
|
602
|
+
}
|
|
603
|
+
var initCommand = new Command("init").description("Initialize pj-repo with runa configuration").option("-f, --force", "Overwrite existing files").option("-y, --yes", "Skip all prompts (use defaults)").option("--db <type>", "Database platform (auto|supabase)", "auto").option("--scope <scope>", "Override npm scope for database package (e.g., @company)").option("--skip-mise", "Skip mise setup after init").option("--skip-post-init", "Skip all post-init steps (pnpm install, husky, mise)").option("--skip-vercel", "Skip Vercel project detection and config sync").option("--templates-version <version>", "Override templates version").option("--fresh", "Clear templates cache before fetching").option(
|
|
604
|
+
"--repair-config",
|
|
605
|
+
"Repair broken runa.config.ts (extracts existing values and regenerates)"
|
|
606
|
+
).action(async (options) => {
|
|
607
|
+
const logger2 = createCLILogger("init");
|
|
608
|
+
try {
|
|
609
|
+
if (handleRepairConfigMode(options, logger2)) return;
|
|
610
|
+
const { result, vercelSyncResult } = await runInitWorkflow(options, logger2);
|
|
611
|
+
emitJsonSuccess(initCommand, InitSuccessDataSchema, {
|
|
612
|
+
projectName: result.projectName,
|
|
613
|
+
copiedCount: result.copiedCount,
|
|
614
|
+
skippedCount: result.skippedCount,
|
|
615
|
+
huskyInstalled: result.huskyInstalled,
|
|
616
|
+
dependenciesInstalled: result.dependenciesInstalled,
|
|
617
|
+
isMonorepo: result.isMonorepo,
|
|
618
|
+
dbType: result.dbType,
|
|
619
|
+
existingConfig: result.existingConfig,
|
|
620
|
+
miseSetup: result.miseSetup,
|
|
621
|
+
vercelSync: vercelSyncResult
|
|
622
|
+
});
|
|
623
|
+
} catch (error) {
|
|
624
|
+
if (error instanceof CLIError) {
|
|
625
|
+
throw error;
|
|
626
|
+
}
|
|
627
|
+
throw toInitCliError({ error, logger: logger2 });
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
|
|
631
|
+
export { initCommand };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { DEFAULT_INCLUDE_PATTERNS, DEFAULT_EXCLUDE_PATTERNS, injectTestAttrsAction } from './chunk-Z4Z5DNW4.js';
|
|
4
|
+
export { processFiles } from './chunk-Z4Z5DNW4.js';
|
|
5
|
+
import './chunk-DRSUEMAK.js';
|
|
6
|
+
import './chunk-KE6QJBZG.js';
|
|
7
|
+
import './chunk-WJXC4MVY.js';
|
|
8
|
+
import './chunk-HKUWEGUX.js';
|
|
9
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
10
|
+
import { Command } from 'commander';
|
|
11
|
+
|
|
12
|
+
createRequire(import.meta.url);
|
|
13
|
+
|
|
14
|
+
// src/commands/inject-test-attrs/index.ts
|
|
15
|
+
init_esm_shims();
|
|
16
|
+
|
|
17
|
+
// src/commands/inject-test-attrs/commands/inject-test-attrs.ts
|
|
18
|
+
init_esm_shims();
|
|
19
|
+
var injectTestAttrsCommand = new Command("inject-test-attrs").description("Inject XState test attributes into source files (git-managed)").option("--check", "Check if files need injection without modifying (CI mode)").option("--force", "Force re-injection even if marker exists").option("--verbose", "Show detailed output").option("--include <patterns...>", "Glob patterns to include", [...DEFAULT_INCLUDE_PATTERNS]).option("--exclude <patterns...>", "Glob patterns to exclude", [...DEFAULT_EXCLUDE_PATTERNS]).option("--no-manifest", "Skip E2E selector manifest generation").option("--manifest-dir <dir>", "Output directory for manifest files", ".runa").option("--strict-detect", "Fail when fallback machine detection is used (for deterministic CI)").action(async (rawOptions) => {
|
|
20
|
+
await injectTestAttrsAction(rawOptions, injectTestAttrsCommand);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export { injectTestAttrsCommand };
|
|
@@ -26,5 +26,11 @@ export declare function isSnapshotComplete(snapshot: SnapshotWithStatus): boolea
|
|
|
26
26
|
* Extract normalized machine error from snapshot context.
|
|
27
27
|
*/
|
|
28
28
|
export declare function getSnapshotError(snapshot: SnapshotWithError): string | null;
|
|
29
|
+
/**
|
|
30
|
+
* Extract a human-readable error message from an unknown error value.
|
|
31
|
+
*
|
|
32
|
+
* Useful in XState machine error handlers where event.error is typed as unknown.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getErrorMessage(error: unknown): string;
|
|
29
35
|
export {};
|
|
30
36
|
//# sourceMappingURL=snapshot-helpers.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Shared SQL Comment Stripping Utilities
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Canonical implementation of SQL comment/string stripping.
|
|
5
|
+
* Used by: partition-validator, schema-detector, sql-table-extractor, sql-parser
|
|
6
|
+
*
|
|
7
|
+
* Handles:
|
|
8
|
+
* - Line comments (-- ...)
|
|
9
|
+
* - Nested block comments (PostgreSQL supports nested block comments)
|
|
10
|
+
* - Single-quoted strings with escaped quotes ('')
|
|
11
|
+
* - Double-quoted identifiers with escaped quotes ("")
|
|
12
|
+
* - Dollar-quoted strings ($tag$...$tag$)
|
|
13
|
+
* - PostgreSQL E-string literals (E'...' with backslash escapes)
|
|
14
|
+
*/
|
|
15
|
+
export declare function stripSqlComments(content: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Replace content inside dollar-quoted strings with spaces.
|
|
18
|
+
* This prevents false-positive matches inside PL/pgSQL function bodies.
|
|
19
|
+
*
|
|
20
|
+
* Input is already comment-stripped (from stripSqlComments), so we only need to
|
|
21
|
+
* handle dollar-quoted strings — single/double quotes are already handled by the
|
|
22
|
+
* regex (they can't span multi-statement patterns).
|
|
23
|
+
*/
|
|
24
|
+
export declare function blankDollarQuotedBodies(content: string): string;
|
|
25
|
+
//# sourceMappingURL=sql-comment-utils.d.ts.map
|