@runa-ai/runa-cli 0.5.71 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-BXUJKYHC.js +1730 -0
- package/dist/cache-H63JKFYH.js +112 -0
- package/dist/check-6AB5NGWK.js +207 -0
- package/dist/chunk-22CS6EMA.js +31 -0
- package/dist/chunk-3FDQW524.js +544 -0
- package/dist/chunk-5NKWR4FF.js +254 -0
- package/dist/chunk-6AALH2ED.js +121 -0
- package/dist/chunk-6Y3LAUGL.js +35 -0
- package/dist/chunk-7QV7U6NI.js +62 -0
- package/dist/chunk-AAIE4F2U.js +140 -0
- package/dist/chunk-CCKG5R4Y.js +59 -0
- package/dist/chunk-CE3DEYFT.js +480 -0
- package/dist/chunk-DRSUEMAK.js +123 -0
- package/dist/chunk-GOGRLQNP.js +12 -0
- package/dist/chunk-HD74F6W2.js +460 -0
- package/dist/chunk-HKUWEGUX.js +36 -0
- package/dist/chunk-HPYJPB5Y.js +408 -0
- package/dist/chunk-IBVVGH6X.js +33 -0
- package/dist/chunk-II7VYQEM.js +179 -0
- package/dist/chunk-JMJP4A47.js +204 -0
- package/dist/chunk-JQXOVCOP.js +574 -0
- package/dist/chunk-JT5SUTWE.js +9 -0
- package/dist/chunk-KWX3JHCY.js +85 -0
- package/dist/chunk-M47WJJVS.js +71 -0
- package/dist/chunk-MNPMZERI.js +194 -0
- package/dist/chunk-MXRWBNIY.js +74 -0
- package/dist/chunk-NPSRD26F.js +149 -0
- package/dist/chunk-P7U52PBY.js +1149 -0
- package/dist/chunk-QDF7QXBL.js +67 -0
- package/dist/chunk-RRGQCUKT.js +48 -0
- package/dist/chunk-RZLYEO4U.js +219 -0
- package/dist/chunk-TYIAD6SB.js +74 -0
- package/dist/chunk-UU55OH7P.js +42 -0
- package/dist/chunk-UWWSAPDR.js +31 -0
- package/dist/chunk-VM3IWOT5.js +458 -0
- package/dist/chunk-VRXHCR5K.js +42 -0
- package/dist/chunk-XJBQINSA.js +351 -0
- package/dist/chunk-ZZOXM6Q4.js +8 -0
- package/dist/ci-V3PIG2GI.js +8322 -0
- package/dist/cli/index.d.ts +7 -1
- package/dist/cli/requested-command.d.ts +8 -0
- package/dist/cli-GFRZCJQR.js +661 -0
- package/dist/commands/build/actors/db-sync.d.ts +2 -0
- package/dist/commands/build/actors/static-checks.d.ts +7 -6
- package/dist/commands/build/contract.d.ts +30 -30
- package/dist/commands/build/machine-dry-run.d.ts +3 -0
- package/dist/commands/build/machine-e2e-meta.d.ts +120 -0
- package/dist/commands/build/machine.d.ts +22 -22
- package/dist/commands/build/types.d.ts +2 -4
- package/dist/commands/ci/machine/contract.d.ts +26 -26
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts +1 -5
- package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts +5 -0
- package/dist/commands/ci/machine/formatters/sections/index.d.ts +2 -2
- package/dist/commands/ci/machine/machine-execution-helpers.d.ts +40 -0
- package/dist/commands/ci/machine/machine-state-helpers.d.ts +14 -0
- package/dist/commands/ci/machine/machine.d.ts +12 -12
- package/dist/commands/ci/machine/types.d.ts +0 -5
- package/dist/commands/ci/utils/ci-summary.d.ts +15 -15
- package/dist/commands/ci/utils/execa-helpers.d.ts +1 -0
- package/dist/commands/db/apply/actors/idempotent-actors.d.ts +34 -0
- package/dist/commands/db/apply/actors/lock-actors.d.ts +16 -0
- package/dist/commands/db/apply/actors/pg-schema-diff-actors.d.ts +31 -0
- package/dist/commands/db/apply/actors/seed-actors.d.ts +11 -0
- package/dist/commands/db/apply/actors/shared.d.ts +9 -0
- package/dist/commands/db/apply/actors.d.ts +16 -65
- package/dist/commands/db/apply/contract.d.ts +8 -1
- package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts +3 -4
- package/dist/commands/db/apply/helpers/data-integrity-verifier.d.ts +37 -0
- package/dist/commands/db/apply/helpers/fresh-db-handler.d.ts +34 -0
- package/dist/commands/db/apply/helpers/hazard-handler.d.ts +60 -0
- package/dist/commands/db/apply/helpers/idempotent-object-registry.d.ts +96 -0
- package/dist/commands/db/apply/helpers/idempotent-transaction.d.ts +20 -0
- package/dist/commands/db/apply/helpers/index.d.ts +7 -1
- package/dist/commands/db/apply/helpers/partition-validator.d.ts +2 -15
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts +18 -162
- package/dist/commands/db/apply/helpers/pg-schema-diff-patterns.d.ts +55 -0
- package/dist/commands/db/apply/helpers/pg-schema-diff-version.d.ts +50 -0
- package/dist/commands/db/apply/helpers/plan-validator.d.ts +30 -10
- package/dist/commands/db/apply/helpers/rbac-password-manager.d.ts +34 -0
- package/dist/commands/db/apply/helpers/retry-logic.d.ts +16 -2
- package/dist/commands/db/apply/helpers/shadow-db-manager.d.ts +1 -1
- package/dist/commands/db/apply/helpers/sql-utils.d.ts +26 -0
- package/dist/commands/db/apply/machine.d.ts +52 -1
- package/dist/commands/db/commands/db-apply.d.ts +18 -0
- package/dist/commands/db/commands/db-sync/boundary-classifier.d.ts +21 -0
- package/dist/commands/db/commands/db-sync/plan-hazard-analyzer.d.ts +13 -0
- package/dist/commands/db/commands/db-sync/risk-reporter.d.ts +19 -0
- package/dist/commands/db/commands/db-sync/sql-parser.d.ts +25 -0
- package/dist/commands/db/commands/db-sync/types.d.ts +47 -0
- package/dist/commands/db/commands/db-sync.d.ts +14 -0
- package/dist/commands/db/sync/contract.d.ts +6 -2
- package/dist/commands/db/sync/machine.d.ts +2 -1
- package/dist/commands/db/types.d.ts +2 -0
- package/dist/commands/db/utils/boundary-policy/rule-compiler.d.ts +11 -0
- package/dist/commands/db/utils/boundary-policy/types.d.ts +105 -0
- package/dist/commands/db/utils/boundary-policy/validation.d.ts +20 -0
- package/dist/commands/db/utils/boundary-policy-runtime.d.ts +28 -0
- package/dist/commands/db/utils/boundary-policy.d.ts +5 -0
- package/dist/commands/db/utils/idempotent-risk-context.d.ts +29 -0
- package/dist/commands/db/utils/preflight-check.d.ts +14 -0
- package/dist/commands/db/utils/preflight-checks/domain-naming-checks.d.ts +106 -0
- package/dist/commands/db/utils/preflight-checks/orphan-checks.d.ts +36 -0
- package/dist/commands/db/utils/preflight-checks/schema-risk-checks.d.ts +22 -0
- package/dist/commands/db/utils/preflight-checks/supabase-checks.d.ts +55 -0
- package/dist/commands/db/utils/risk-detector-loader.d.ts +8 -0
- package/dist/commands/db/utils/schema-precheck-budget.d.ts +17 -0
- package/dist/commands/db/utils/sql-boundary-parser.d.ts +12 -0
- package/dist/commands/db/utils/sql-file-collector.d.ts +8 -0
- package/dist/commands/db/utils/sql-filename-parser.d.ts +20 -0
- package/dist/commands/db/utils/sql-table-extractor-ast.d.ts +19 -0
- package/dist/commands/db/utils/sql-table-extractor-regex.d.ts +50 -0
- package/dist/commands/db/utils/sql-table-extractor-rls.d.ts +13 -0
- package/dist/commands/db/utils/sql-table-extractor.d.ts +79 -1
- package/dist/commands/db/utils/table-registry-introspection.d.ts +68 -0
- package/dist/commands/db/utils/table-registry.d.ts +3 -38
- package/dist/commands/dev/actors/app-lifecycle.d.ts +18 -0
- package/dist/commands/dev/actors/index.d.ts +7 -2
- package/dist/commands/dev/actors/process-check.d.ts +12 -0
- package/dist/commands/dev/actors/shared.d.ts +15 -0
- package/dist/commands/dev/contract.d.ts +2 -2
- package/dist/commands/dev/machine.d.ts +7 -31
- package/dist/commands/env/commands/env-pull/auth.d.ts +13 -0
- package/dist/commands/env/commands/env-pull/dotenv-files.d.ts +14 -0
- package/dist/commands/env/commands/env-pull/security.d.ts +12 -0
- package/dist/commands/env/commands/env-pull/service.d.ts +8 -0
- package/dist/commands/env/commands/env-pull/shared.d.ts +79 -0
- package/dist/commands/env/commands/setup/types.d.ts +1 -1
- package/dist/commands/env/constants/local-supabase.d.ts +2 -0
- package/dist/commands/template-check/contract.d.ts +6 -6
- package/dist/commands/template-check/machine.d.ts +2 -2
- package/dist/commands/template-check/types.d.ts +0 -4
- package/dist/commands/template-check/utils/diff-analyzer.d.ts +0 -4
- package/dist/config/env.d.ts +4 -4
- package/dist/config-loader-GT3HAQ7U.js +7 -0
- package/dist/db-HR7CREX2.js +15913 -0
- package/dist/dev-A7RW6XQV.js +873 -0
- package/dist/env-B47Z4747.js +2624 -0
- package/dist/env-HMMRSYCI.js +7 -0
- package/dist/env-files-K2C7O7L5.js +8 -0
- package/dist/error-handler-4EYSDOSE.js +460 -0
- package/dist/hotfix-CULKKMGS.js +1477 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +48 -42912
- package/dist/init-ELK5QCWR.js +632 -0
- package/dist/inject-test-attrs-Y5UD5P7Q.js +36 -0
- package/dist/internal/machines/snapshot-helpers.d.ts +6 -0
- package/dist/lib/sql-comment-utils.d.ts +25 -0
- package/dist/license-OB7GVJQ2.js +468 -0
- package/dist/link-C43JRZWY.js +60 -0
- package/dist/manifest-2NOQ2IMK.js +32 -0
- package/dist/prepare-32DOVHTE.js +250 -0
- package/dist/risk-detector-BXUY2WKS.js +6 -0
- package/dist/risk-detector-core-O7I7SPR7.js +166 -0
- package/dist/risk-detector-plpgsql-SGMVKYJP.js +1856 -0
- package/dist/sdk-XK6HQU7S.js +348 -0
- package/dist/services-7VK5KZTO.js +177 -0
- package/dist/session-SFW5QSXZ.js +142 -0
- package/dist/signal-handler-DO3OANW5.js +6 -0
- package/dist/status-IJ4ZWHMX.js +95 -0
- package/dist/telemetry-FN7V727Y.js +94 -0
- package/dist/template-check-PNG5NQ5H.js +1933 -0
- package/dist/test-QYXE5UVW.js +626 -0
- package/dist/test-gen-QPWOIEHU.js +89 -0
- package/dist/ui-RJAMCWUI.js +331 -0
- package/dist/upgrade-3SLWVNAC.js +625 -0
- package/dist/utils/config-loader.d.ts +0 -3
- package/dist/validate-SM4PXPS7.js +55 -0
- package/dist/validators/risk-detector-content-risks.d.ts +13 -0
- package/dist/validators/risk-detector-core.d.ts +25 -0
- package/dist/validators/risk-detector-patterns.d.ts +15 -0
- package/dist/validators/risk-detector-plpgsql-expression-resolver.d.ts +22 -0
- package/dist/validators/risk-detector-plpgsql-parser.d.ts +5 -0
- package/dist/validators/risk-detector-plpgsql-tokenizer.d.ts +18 -0
- package/dist/validators/risk-detector-plpgsql.d.ts +9 -0
- package/dist/validators/risk-detector-text-utils.d.ts +6 -0
- package/dist/validators/risk-detector-types.d.ts +16 -0
- package/dist/validators/risk-detector.d.ts +7 -26
- package/dist/vuln-check-TYQNEFS7.js +122 -0
- package/dist/vuln-checker-2QXGN5YT.js +2950 -0
- package/dist/watch-UCDVOQAH.js +911 -0
- package/dist/workflow-ZB5Q2PFY.js +898 -0
- package/package.json +4 -1
- package/dist/cli/contract-mode.d.ts.map +0 -1
- package/dist/cli/contract-output.d.ts.map +0 -1
- package/dist/cli/early-flags.d.ts.map +0 -1
- package/dist/cli/error-handler.d.ts.map +0 -1
- package/dist/cli/exec.d.ts.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/json-output.d.ts.map +0 -1
- package/dist/cli/non-interactive.d.ts.map +0 -1
- package/dist/cli/output-format.d.ts.map +0 -1
- package/dist/cli/signal-handler.d.ts.map +0 -1
- package/dist/commands/build/actors/build.d.ts.map +0 -1
- package/dist/commands/build/actors/clean.d.ts.map +0 -1
- package/dist/commands/build/actors/db-sync.d.ts.map +0 -1
- package/dist/commands/build/actors/index.d.ts.map +0 -1
- package/dist/commands/build/actors/manifest.d.ts.map +0 -1
- package/dist/commands/build/actors/setup.d.ts.map +0 -1
- package/dist/commands/build/actors/static-checks.d.ts.map +0 -1
- package/dist/commands/build/actors/validate.d.ts.map +0 -1
- package/dist/commands/build/commands/build.d.ts.map +0 -1
- package/dist/commands/build/contract.d.ts.map +0 -1
- package/dist/commands/build/guards.d.ts.map +0 -1
- package/dist/commands/build/index.d.ts.map +0 -1
- package/dist/commands/build/machine.d.ts.map +0 -1
- package/dist/commands/build/types.d.ts.map +0 -1
- package/dist/commands/cache.d.ts.map +0 -1
- package/dist/commands/check/commands/check.d.ts.map +0 -1
- package/dist/commands/check/index.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-checks.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-layer-content.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-pr-capabilities.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-apply.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-github.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-types.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-utils.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-prod-workflow.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-resolvers.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-static.d.ts.map +0 -1
- package/dist/commands/ci/commands/ci-supabase-local.d.ts.map +0 -1
- package/dist/commands/ci/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/app-build.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/app-start.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/build-and-playwright.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/playwright-install.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/build/static-checks.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/apply-seeds.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/pgtap-install.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/production-preview.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/pull-production.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/reset.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/schema-stats.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/setup-roles.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/github.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/finalize/summary.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/local.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/pr-common.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/setup/pr-local.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/capabilities.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/actors/test/run-layers.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/ci-local.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/ci-pr.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/machine-runner.d.ts.map +0 -1
- package/dist/commands/ci/machine/commands/runtime-env.d.ts.map +0 -1
- package/dist/commands/ci/machine/contract.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/github-comment-types.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/github-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/progress-comment.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts.map +0 -1
- package/dist/commands/ci/machine/formatters/summary.d.ts.map +0 -1
- package/dist/commands/ci/machine/guards.d.ts.map +0 -1
- package/dist/commands/ci/machine/helpers.d.ts.map +0 -1
- package/dist/commands/ci/machine/index.d.ts.map +0 -1
- package/dist/commands/ci/machine/machine.d.ts.map +0 -1
- package/dist/commands/ci/machine/types.d.ts.map +0 -1
- package/dist/commands/ci/utils/ai-report.d.ts.map +0 -1
- package/dist/commands/ci/utils/app-process.d.ts.map +0 -1
- package/dist/commands/ci/utils/app-runtime.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-config.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-env-schema.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-logging.d.ts.map +0 -1
- package/dist/commands/ci/utils/ci-summary.d.ts.map +0 -1
- package/dist/commands/ci/utils/config-readers.d.ts.map +0 -1
- package/dist/commands/ci/utils/db-url-utils.d.ts.map +0 -1
- package/dist/commands/ci/utils/e2e-auth-setup.d.ts.map +0 -1
- package/dist/commands/ci/utils/env-security.d.ts.map +0 -1
- package/dist/commands/ci/utils/execa-helpers.d.ts.map +0 -1
- package/dist/commands/ci/utils/exit-code-computation.d.ts.map +0 -1
- package/dist/commands/ci/utils/github-api.d.ts.map +0 -1
- package/dist/commands/ci/utils/github.d.ts.map +0 -1
- package/dist/commands/ci/utils/index.d.ts.map +0 -1
- package/dist/commands/ci/utils/pgtap-installer.d.ts.map +0 -1
- package/dist/commands/ci/utils/rls-verification.d.ts.map +0 -1
- package/dist/commands/ci/utils/schema-operations.d.ts.map +0 -1
- package/dist/commands/ci/utils/seed-operations.d.ts.map +0 -1
- package/dist/commands/ci/utils/test-parallel.d.ts.map +0 -1
- package/dist/commands/ci/utils/timestamp-invariants.d.ts.map +0 -1
- package/dist/commands/ci/utils/workflow-idempotency.d.ts.map +0 -1
- package/dist/commands/db/apply/actors.d.ts.map +0 -1
- package/dist/commands/db/apply/contract.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/advisory-lock.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/index.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-acl-cleaner.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-prefilter.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/partition-validator.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/plan-validator.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/retry-logic.d.ts.map +0 -1
- package/dist/commands/db/apply/helpers/shadow-db-manager.d.ts.map +0 -1
- package/dist/commands/db/apply/index.d.ts.map +0 -1
- package/dist/commands/db/apply/machine.d.ts.map +0 -1
- package/dist/commands/db/commands/db-apply.d.ts.map +0 -1
- package/dist/commands/db/commands/db-audit.d.ts.map +0 -1
- package/dist/commands/db/commands/db-backup.d.ts.map +0 -1
- package/dist/commands/db/commands/db-cleanup.d.ts.map +0 -1
- package/dist/commands/db/commands/db-derive-role-passwords.d.ts.map +0 -1
- package/dist/commands/db/commands/db-derive-urls.d.ts.map +0 -1
- package/dist/commands/db/commands/db-diagram.d.ts.map +0 -1
- package/dist/commands/db/commands/db-drizzle.d.ts.map +0 -1
- package/dist/commands/db/commands/db-extension.d.ts.map +0 -1
- package/dist/commands/db/commands/db-generate-password.d.ts.map +0 -1
- package/dist/commands/db/commands/db-lifecycle.d.ts.map +0 -1
- package/dist/commands/db/commands/db-rollback.d.ts.map +0 -1
- package/dist/commands/db/commands/db-schema.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed-metadata.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed-verify.d.ts.map +0 -1
- package/dist/commands/db/commands/db-seed.d.ts.map +0 -1
- package/dist/commands/db/commands/db-snapshot.d.ts.map +0 -1
- package/dist/commands/db/commands/db-stack.d.ts.map +0 -1
- package/dist/commands/db/commands/db-stats.d.ts.map +0 -1
- package/dist/commands/db/commands/db-sync.d.ts.map +0 -1
- package/dist/commands/db/commands/db-test.d.ts.map +0 -1
- package/dist/commands/db/constants.d.ts.map +0 -1
- package/dist/commands/db/extension-registry.d.ts.map +0 -1
- package/dist/commands/db/index.d.ts.map +0 -1
- package/dist/commands/db/preflight/actors.d.ts.map +0 -1
- package/dist/commands/db/preflight/contract.d.ts.map +0 -1
- package/dist/commands/db/preflight/index.d.ts.map +0 -1
- package/dist/commands/db/sync/actors.d.ts.map +0 -1
- package/dist/commands/db/sync/contract.d.ts.map +0 -1
- package/dist/commands/db/sync/index.d.ts.map +0 -1
- package/dist/commands/db/sync/machine.d.ts.map +0 -1
- package/dist/commands/db/types.d.ts.map +0 -1
- package/dist/commands/db/utils/db-target.d.ts.map +0 -1
- package/dist/commands/db/utils/db-url-builder.d.ts.map +0 -1
- package/dist/commands/db/utils/error-handlers.d.ts.map +0 -1
- package/dist/commands/db/utils/import-impact-analyzer.d.ts.map +0 -1
- package/dist/commands/db/utils/preflight-check.d.ts.map +0 -1
- package/dist/commands/db/utils/psql.d.ts.map +0 -1
- package/dist/commands/db/utils/schema-detector.d.ts.map +0 -1
- package/dist/commands/db/utils/schema-sync.d.ts.map +0 -1
- package/dist/commands/db/utils/script-runner.d.ts.map +0 -1
- package/dist/commands/db/utils/seed-manager.d.ts.map +0 -1
- package/dist/commands/db/utils/semantic-mapper.d.ts.map +0 -1
- package/dist/commands/db/utils/sql-table-extractor.d.ts.map +0 -1
- package/dist/commands/db/utils/stack-detector.d.ts.map +0 -1
- package/dist/commands/db/utils/table-registry.d.ts.map +0 -1
- package/dist/commands/db/utils/table-source-classifier.d.ts.map +0 -1
- package/dist/commands/dev/actors/index.d.ts.map +0 -1
- package/dist/commands/dev/commands/dev.d.ts.map +0 -1
- package/dist/commands/dev/contract.d.ts.map +0 -1
- package/dist/commands/dev/guards.d.ts.map +0 -1
- package/dist/commands/dev/helpers/stale-process-detector.d.ts.map +0 -1
- package/dist/commands/dev/machine.d.ts.map +0 -1
- package/dist/commands/dev/types.d.ts.map +0 -1
- package/dist/commands/env/commands/env-check.d.ts.map +0 -1
- package/dist/commands/env/commands/env-encrypt.d.ts.map +0 -1
- package/dist/commands/env/commands/env-pull.d.ts.map +0 -1
- package/dist/commands/env/commands/env-setup.d.ts.map +0 -1
- package/dist/commands/env/commands/env-sync.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/action.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/auth.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/file-export.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/github-api.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/helpers.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/index.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/parsers.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/prompts.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/supabase-api.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/types.d.ts.map +0 -1
- package/dist/commands/env/commands/setup/vercel-api.d.ts.map +0 -1
- package/dist/commands/env/constants/local-supabase.d.ts.map +0 -1
- package/dist/commands/env/index.d.ts.map +0 -1
- package/dist/commands/hotfix/actors.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-complete.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-create.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-deploy.d.ts.map +0 -1
- package/dist/commands/hotfix/commands/hotfix-status.d.ts.map +0 -1
- package/dist/commands/hotfix/contract.d.ts.map +0 -1
- package/dist/commands/hotfix/index.d.ts.map +0 -1
- package/dist/commands/hotfix/machine.d.ts.map +0 -1
- package/dist/commands/hotfix/metadata.d.ts.map +0 -1
- package/dist/commands/hotfix/utils/hotfix-machine-helper.d.ts.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/action.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/commands/inject-test-attrs.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/contract.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/detection-diagnostics.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/formatter.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/index.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/manifest-generator.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/processor-utils.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/processor.d.ts.map +0 -1
- package/dist/commands/inject-test-attrs/types.d.ts.map +0 -1
- package/dist/commands/link.d.ts.map +0 -1
- package/dist/commands/manifest/index.d.ts.map +0 -1
- package/dist/commands/prepare/commands/prepare.d.ts.map +0 -1
- package/dist/commands/prepare/index.d.ts.map +0 -1
- package/dist/commands/sdk/commands/publish.d.ts.map +0 -1
- package/dist/commands/sdk/index.d.ts.map +0 -1
- package/dist/commands/services/index.d.ts.map +0 -1
- package/dist/commands/session/index.d.ts.map +0 -1
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/commands/template-check/actors/compare.d.ts.map +0 -1
- package/dist/commands/template-check/actors/discover.d.ts.map +0 -1
- package/dist/commands/template-check/actors/index.d.ts.map +0 -1
- package/dist/commands/template-check/actors/report.d.ts.map +0 -1
- package/dist/commands/template-check/commands/template-check.d.ts.map +0 -1
- package/dist/commands/template-check/config.d.ts.map +0 -1
- package/dist/commands/template-check/contract.d.ts.map +0 -1
- package/dist/commands/template-check/index.d.ts.map +0 -1
- package/dist/commands/template-check/machine.d.ts.map +0 -1
- package/dist/commands/template-check/types.d.ts.map +0 -1
- package/dist/commands/template-check/utils/diff-analyzer.d.ts.map +0 -1
- package/dist/commands/template-check/utils/normalizer.d.ts.map +0 -1
- package/dist/commands/template-check/utils/path-mapping.d.ts.map +0 -1
- package/dist/commands/test/commands/test-db.d.ts.map +0 -1
- package/dist/commands/test/commands/test-e2e.d.ts.map +0 -1
- package/dist/commands/test/commands/test-fast.d.ts.map +0 -1
- package/dist/commands/test/commands/test-integration.d.ts.map +0 -1
- package/dist/commands/test/commands/test-layer.d.ts.map +0 -1
- package/dist/commands/test/commands/test-owasp-generate.d.ts.map +0 -1
- package/dist/commands/test/commands/test-service.d.ts.map +0 -1
- package/dist/commands/test/commands/test-static.d.ts.map +0 -1
- package/dist/commands/test/commands/test.d.ts.map +0 -1
- package/dist/commands/test/index.d.ts.map +0 -1
- package/dist/commands/test-gen.d.ts.map +0 -1
- package/dist/commands/ui.d.ts.map +0 -1
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/validate.d.ts.map +0 -1
- package/dist/commands/vuln-check.d.ts.map +0 -1
- package/dist/commands/watch.d.ts.map +0 -1
- package/dist/commands/workflow/commands/deploy-production.d.ts.map +0 -1
- package/dist/commands/workflow/commands/final-status.d.ts.map +0 -1
- package/dist/commands/workflow/commands/log.d.ts.map +0 -1
- package/dist/commands/workflow/commands/notify.d.ts.map +0 -1
- package/dist/commands/workflow/commands/paths.d.ts.map +0 -1
- package/dist/commands/workflow/commands/sync.d.ts.map +0 -1
- package/dist/commands/workflow/commands/validate.d.ts.map +0 -1
- package/dist/commands/workflow/commands/verify-credentials.d.ts.map +0 -1
- package/dist/commands/workflow/index.d.ts.map +0 -1
- package/dist/commands/workflow/types.d.ts.map +0 -1
- package/dist/config/env-files.d.ts.map +0 -1
- package/dist/config/env.d.ts.map +0 -1
- package/dist/constants/versions.d.ts.map +0 -1
- package/dist/contracts/envelope.d.ts.map +0 -1
- package/dist/errors/catalog.d.ts.map +0 -1
- package/dist/errors/exit-codes.d.ts.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/incremental/affected-tests.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/internal/machines/index.d.ts.map +0 -1
- package/dist/internal/machines/machine-runner.d.ts.map +0 -1
- package/dist/internal/machines/snapshot-helpers.d.ts.map +0 -1
- package/dist/internal/machines/types.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/dependency-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/rls-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/secret-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/analyzers/typescript-analyzer.d.ts.map +0 -1
- package/dist/internal/vuln-checker/config/loader.d.ts.map +0 -1
- package/dist/internal/vuln-checker/constants.d.ts.map +0 -1
- package/dist/internal/vuln-checker/ignore/matcher.d.ts.map +0 -1
- package/dist/internal/vuln-checker/index.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/console-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/json-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/markdown-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/reporters/sarif-reporter.d.ts.map +0 -1
- package/dist/internal/vuln-checker/security/path-validation.d.ts.map +0 -1
- package/dist/internal/vuln-checker/types.d.ts.map +0 -1
- package/dist/notifiers/desktop-notifier.d.ts.map +0 -1
- package/dist/ui/components/db-panel.d.ts.map +0 -1
- package/dist/ui/components/status-bar.d.ts.map +0 -1
- package/dist/ui/components/test-panel.d.ts.map +0 -1
- package/dist/ui/dashboard.d.ts.map +0 -1
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/utils/config-loader.d.ts.map +0 -1
- package/dist/utils/config-updater.d.ts.map +0 -1
- package/dist/utils/diagnostics.d.ts.map +0 -1
- package/dist/utils/dotenvx.d.ts.map +0 -1
- package/dist/utils/env-local-bridge.d.ts.map +0 -1
- package/dist/utils/execution-plan.d.ts.map +0 -1
- package/dist/utils/github-output-security.d.ts.map +0 -1
- package/dist/utils/help-system.d.ts.map +0 -1
- package/dist/utils/license/admin-auth.d.ts.map +0 -1
- package/dist/utils/license/allowlist-checker.d.ts.map +0 -1
- package/dist/utils/license/ci-detector.d.ts.map +0 -1
- package/dist/utils/license/index.d.ts.map +0 -1
- package/dist/utils/license/owner-resolver.d.ts.map +0 -1
- package/dist/utils/license/types.d.ts.map +0 -1
- package/dist/utils/license/validate-owner.d.ts.map +0 -1
- package/dist/utils/path-security.d.ts.map +0 -1
- package/dist/utils/port-allocator.d.ts.map +0 -1
- package/dist/utils/secure-exec.d.ts.map +0 -1
- package/dist/utils/template-fetcher.d.ts.map +0 -1
- package/dist/utils/type-guards.d.ts.map +0 -1
- package/dist/utils/vercel-project.d.ts.map +0 -1
- package/dist/utils/workspace-detector.d.ts.map +0 -1
- package/dist/validators/risk-detector.d.ts.map +0 -1
- package/dist/validators/schema-validator.d.ts.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/dist/watchers/schema-watcher.d.ts.map +0 -1
- package/dist/watchers/test-watcher.d.ts.map +0 -1
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import './chunk-ZZOXM6Q4.js';
|
|
4
|
+
import { ERROR_CATALOG } from './chunk-JQXOVCOP.js';
|
|
5
|
+
import { ErrorEnvelopeSchema, CLI_CONTRACT_VERSION } from './chunk-JT5SUTWE.js';
|
|
6
|
+
import { getOutputFormatFromEnv } from './chunk-HKUWEGUX.js';
|
|
7
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
8
|
+
import { formatCLIError, CLIError, createCLILogger } from '@runa-ai/runa/cli-runtime';
|
|
9
|
+
|
|
10
|
+
createRequire(import.meta.url);
|
|
11
|
+
|
|
12
|
+
// src/cli/error-handler.ts
|
|
13
|
+
init_esm_shims();
|
|
14
|
+
function getCommandPathFromArgv(argv) {
|
|
15
|
+
const parts = [];
|
|
16
|
+
for (const token of argv) {
|
|
17
|
+
if (token.startsWith("-")) break;
|
|
18
|
+
parts.push(token);
|
|
19
|
+
}
|
|
20
|
+
return parts.length > 0 ? `runa ${parts.join(" ")}` : "runa";
|
|
21
|
+
}
|
|
22
|
+
function findCatalogEntry(errorCode) {
|
|
23
|
+
if (!errorCode) return void 0;
|
|
24
|
+
for (const key of Object.keys(ERROR_CATALOG)) {
|
|
25
|
+
const entry = ERROR_CATALOG[key];
|
|
26
|
+
if (entry.code === errorCode) {
|
|
27
|
+
return entry;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return void 0;
|
|
31
|
+
}
|
|
32
|
+
function getDocUrlFromCatalog(errorCode) {
|
|
33
|
+
const entry = findCatalogEntry(errorCode);
|
|
34
|
+
if (!entry) return void 0;
|
|
35
|
+
return "docUrl" in entry ? entry.docUrl : void 0;
|
|
36
|
+
}
|
|
37
|
+
var diagnosisRules = [
|
|
38
|
+
// Package resolution issues (@runa-ai/*)
|
|
39
|
+
{
|
|
40
|
+
name: "runa-package-resolution",
|
|
41
|
+
matches: (msg) => msg.includes("Cannot find module '@runa-ai/runa-"),
|
|
42
|
+
getSuggestions: () => [
|
|
43
|
+
"\u{1F527} This error indicates a package resolution issue.",
|
|
44
|
+
"",
|
|
45
|
+
"If you are in a pj-repo (not runa monorepo):",
|
|
46
|
+
" 1. Reinstall packages:",
|
|
47
|
+
" rm -rf node_modules pnpm-lock.yaml",
|
|
48
|
+
" pnpm install",
|
|
49
|
+
"",
|
|
50
|
+
" 2. If the issue persists, update to the latest SDK:",
|
|
51
|
+
" pnpm add -D @runa-ai/runa@latest @runa-ai/runa-cli@latest"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
// GitHub Packages authentication
|
|
55
|
+
{
|
|
56
|
+
name: "github-packages-auth",
|
|
57
|
+
matches: (msg) => msg.includes("401") || msg.includes("403") || msg.includes("UNAUTHORIZED") || msg.includes("npm.pkg.github.com"),
|
|
58
|
+
getSuggestions: () => [
|
|
59
|
+
"\u{1F510} GitHub Packages authentication required.",
|
|
60
|
+
"",
|
|
61
|
+
"Setup steps:",
|
|
62
|
+
" 1. Create a GitHub Personal Access Token with `read:packages` scope:",
|
|
63
|
+
" https://github.com/settings/tokens/new?scopes=read:packages",
|
|
64
|
+
"",
|
|
65
|
+
" 2. Configure npm authentication:",
|
|
66
|
+
" npm login --registry=https://npm.pkg.github.com",
|
|
67
|
+
" # Username: your GitHub username",
|
|
68
|
+
" # Password: your Personal Access Token",
|
|
69
|
+
"",
|
|
70
|
+
" 3. Or set the token in your environment:",
|
|
71
|
+
" export NODE_AUTH_TOKEN=ghp_your_token_here"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
// Lint/format errors
|
|
75
|
+
{
|
|
76
|
+
name: "lint-format-errors",
|
|
77
|
+
matches: (msg) => msg.includes("biome check") || msg.includes("lint") && msg.includes("error") || msg.includes("noAssignInExpressions") || msg.includes("noDuplicateTestHooks"),
|
|
78
|
+
getSuggestions: () => [
|
|
79
|
+
"\u{1F527} Lint/format errors detected.",
|
|
80
|
+
"",
|
|
81
|
+
"Auto-fix safe issues:",
|
|
82
|
+
" pnpm biome check --write --unsafe .",
|
|
83
|
+
"",
|
|
84
|
+
"Or fix manually and re-run:",
|
|
85
|
+
" runa build"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
// Type errors
|
|
89
|
+
{
|
|
90
|
+
name: "type-errors",
|
|
91
|
+
matches: (msg) => msg.includes("type-check") || msg.includes("TypeScript") || msg.includes("TS2"),
|
|
92
|
+
getSuggestions: () => [
|
|
93
|
+
"\u{1F4DD} Type errors detected.",
|
|
94
|
+
"",
|
|
95
|
+
"Check type errors:",
|
|
96
|
+
" pnpm turbo run type-check",
|
|
97
|
+
"",
|
|
98
|
+
"Fix the errors and re-run:",
|
|
99
|
+
" runa build"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
// Database connection issues
|
|
103
|
+
{
|
|
104
|
+
name: "database-connection",
|
|
105
|
+
matches: (msg) => msg.includes("ECONNREFUSED") || msg.includes("connection refused") || msg.includes("DATABASE_URL") || msg.includes("PostgreSQL") || msg.includes("database") && msg.includes("connect"),
|
|
106
|
+
getSuggestions: () => [
|
|
107
|
+
"\u{1F5C4}\uFE0F Database connection issue detected.",
|
|
108
|
+
"",
|
|
109
|
+
"For local development:",
|
|
110
|
+
" 1. Start local Supabase:",
|
|
111
|
+
" runa db start",
|
|
112
|
+
"",
|
|
113
|
+
" 2. Check environment:",
|
|
114
|
+
" runa check",
|
|
115
|
+
"",
|
|
116
|
+
" 3. Verify your DATABASE_URL in .env.development.local"
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
// Supabase CLI not found
|
|
120
|
+
{
|
|
121
|
+
name: "supabase-cli-not-found",
|
|
122
|
+
matches: (msg) => msg.includes("supabase") && msg.includes("not found"),
|
|
123
|
+
getSuggestions: () => [
|
|
124
|
+
"\u{1F4E6} Supabase CLI not found.",
|
|
125
|
+
"",
|
|
126
|
+
"Install Supabase CLI:",
|
|
127
|
+
" # macOS",
|
|
128
|
+
" brew install supabase/tap/supabase",
|
|
129
|
+
"",
|
|
130
|
+
" # npm (alternative)",
|
|
131
|
+
" npm install -g supabase",
|
|
132
|
+
"",
|
|
133
|
+
"Then run: runa check"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
// Docker not running
|
|
137
|
+
{
|
|
138
|
+
name: "docker-not-running",
|
|
139
|
+
matches: (msg) => msg.includes("Cannot connect to the Docker daemon") || msg.includes("docker daemon is not running") || msg.includes("Is the docker daemon running") || msg.includes("connect ENOENT /var/run/docker.sock"),
|
|
140
|
+
getSuggestions: () => [
|
|
141
|
+
"\u{1F433} Docker is not running.",
|
|
142
|
+
"",
|
|
143
|
+
"Start Docker:",
|
|
144
|
+
" # macOS",
|
|
145
|
+
" open -a Docker",
|
|
146
|
+
"",
|
|
147
|
+
" # Linux",
|
|
148
|
+
" sudo systemctl start docker",
|
|
149
|
+
"",
|
|
150
|
+
"Then run: runa check"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
// Port already in use
|
|
154
|
+
{
|
|
155
|
+
name: "port-in-use",
|
|
156
|
+
matches: (msg) => msg.includes("EADDRINUSE") || msg.includes("address already in use") || msg.includes("port is already allocated"),
|
|
157
|
+
getSuggestions: (msg) => {
|
|
158
|
+
const portMatch = msg.match(/:(\d{4,5})/);
|
|
159
|
+
const port = portMatch ? portMatch[1] : "3000";
|
|
160
|
+
const nextPort = Number.parseInt(port, 10) + 1;
|
|
161
|
+
return [
|
|
162
|
+
`\u{1F50C} Port ${port} is already in use.`,
|
|
163
|
+
"",
|
|
164
|
+
"Find and stop the process:",
|
|
165
|
+
` lsof -i :${port}`,
|
|
166
|
+
" kill -9 <PID>",
|
|
167
|
+
"",
|
|
168
|
+
"Or use a different port:",
|
|
169
|
+
` runa dev --port ${nextPort}`
|
|
170
|
+
];
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
// Missing environment files
|
|
174
|
+
{
|
|
175
|
+
name: "missing-env-files",
|
|
176
|
+
matches: (msg) => msg.includes(".env") && (msg.includes("not found") || msg.includes("ENOENT") || msg.includes("missing")),
|
|
177
|
+
getSuggestions: () => [
|
|
178
|
+
"\u{1F4C4} Environment file missing.",
|
|
179
|
+
"",
|
|
180
|
+
"Setup environment:",
|
|
181
|
+
" runa prepare",
|
|
182
|
+
"",
|
|
183
|
+
"Or pull from Vercel (if configured):",
|
|
184
|
+
" runa env pull"
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
// Missing node_modules / general module not found
|
|
188
|
+
{
|
|
189
|
+
name: "missing-dependencies",
|
|
190
|
+
matches: (msg) => msg.includes("Cannot find module") && !msg.includes("@runa-ai/runa-"),
|
|
191
|
+
getSuggestions: () => [
|
|
192
|
+
"\u{1F4E6} Dependencies may be missing.",
|
|
193
|
+
"",
|
|
194
|
+
"Install dependencies:",
|
|
195
|
+
" pnpm install",
|
|
196
|
+
"",
|
|
197
|
+
"If issue persists, try fresh install:",
|
|
198
|
+
" rm -rf node_modules pnpm-lock.yaml",
|
|
199
|
+
" pnpm install"
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
// Schema out of sync
|
|
203
|
+
{
|
|
204
|
+
name: "schema-out-of-sync",
|
|
205
|
+
matches: (msg) => msg.includes("relation") && (msg.includes("does not exist") || msg.includes("already exists")),
|
|
206
|
+
getSuggestions: () => [
|
|
207
|
+
"\u{1F5C4}\uFE0F Database schema may be out of sync.",
|
|
208
|
+
"",
|
|
209
|
+
"Sync database schema:",
|
|
210
|
+
" runa db sync",
|
|
211
|
+
"",
|
|
212
|
+
"Preview changes first:",
|
|
213
|
+
" runa db sync --check"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
// Permission denied
|
|
217
|
+
{
|
|
218
|
+
name: "permission-denied",
|
|
219
|
+
matches: (msg) => msg.includes("EACCES") || msg.includes("permission denied"),
|
|
220
|
+
getSuggestions: () => [
|
|
221
|
+
"\u{1F512} Permission denied.",
|
|
222
|
+
"",
|
|
223
|
+
"Check file permissions or run with appropriate access.",
|
|
224
|
+
"Avoid using sudo with npm/pnpm commands."
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
// Network errors
|
|
228
|
+
{
|
|
229
|
+
name: "network-errors",
|
|
230
|
+
matches: (msg) => msg.includes("ETIMEDOUT") || msg.includes("ENETUNREACH") || msg.includes("getaddrinfo ENOTFOUND"),
|
|
231
|
+
getSuggestions: () => [
|
|
232
|
+
"\u{1F310} Network connection issue.",
|
|
233
|
+
"",
|
|
234
|
+
"Check your internet connection and try again.",
|
|
235
|
+
"If behind a proxy, ensure proxy settings are configured."
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
// Vercel CLI issues
|
|
239
|
+
{
|
|
240
|
+
name: "vercel-cli-issues",
|
|
241
|
+
matches: (msg) => msg.includes("Failed to list Vercel projects") || msg.includes("Failed to link Vercel project") || msg.includes("vercel") && msg.includes("not found") || msg.includes("VERCEL_TOKEN"),
|
|
242
|
+
getSuggestions: () => [
|
|
243
|
+
"\u{1F53A} Vercel CLI issue detected.",
|
|
244
|
+
"",
|
|
245
|
+
"Setup steps:",
|
|
246
|
+
" 1. Install Vercel CLI:",
|
|
247
|
+
" pnpm add -g vercel",
|
|
248
|
+
"",
|
|
249
|
+
" 2. Login to Vercel:",
|
|
250
|
+
" vercel login",
|
|
251
|
+
"",
|
|
252
|
+
" 3. Or set VERCEL_TOKEN environment variable:",
|
|
253
|
+
" export VERCEL_TOKEN=your_token",
|
|
254
|
+
"",
|
|
255
|
+
"Then run: runa env setup"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
// Supabase authentication issues
|
|
259
|
+
{
|
|
260
|
+
name: "supabase-auth-issues",
|
|
261
|
+
matches: (msg) => msg.includes("supabase login") || msg.includes("Failed to fetch API keys") || msg.includes("supabase") && msg.includes("authentication") || msg.includes("Supabase") && msg.includes("not found"),
|
|
262
|
+
getSuggestions: () => [
|
|
263
|
+
"\u{1F5C4}\uFE0F Supabase authentication issue.",
|
|
264
|
+
"",
|
|
265
|
+
"Setup steps:",
|
|
266
|
+
" 1. Login to Supabase:",
|
|
267
|
+
" supabase login",
|
|
268
|
+
"",
|
|
269
|
+
" 2. Verify access:",
|
|
270
|
+
" supabase projects list",
|
|
271
|
+
"",
|
|
272
|
+
" 3. If project not found, check project-ref:",
|
|
273
|
+
" supabase projects list | grep <your-project>"
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
// pg-schema-diff issues
|
|
277
|
+
{
|
|
278
|
+
name: "pg-schema-diff-issues",
|
|
279
|
+
matches: (msg) => msg.includes("pg-schema-diff binary not found") || msg.includes("pg-schema-diff spawn failed") || msg.includes("pg-schema-diff") && msg.includes("PATH"),
|
|
280
|
+
getSuggestions: () => [
|
|
281
|
+
"\u{1F527} pg-schema-diff not available.",
|
|
282
|
+
"",
|
|
283
|
+
"This tool is required for database migrations.",
|
|
284
|
+
"",
|
|
285
|
+
"Install pg-schema-diff:",
|
|
286
|
+
" # Using Go",
|
|
287
|
+
" go install github.com/stripe/pg-schema-diff/cmd/pg-schema-diff@latest",
|
|
288
|
+
"",
|
|
289
|
+
" # Ensure it's in PATH",
|
|
290
|
+
" export PATH=$PATH:$(go env GOPATH)/bin",
|
|
291
|
+
"",
|
|
292
|
+
"Or use CI where it's pre-installed."
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
// Seed application failures
|
|
296
|
+
{
|
|
297
|
+
name: "seed-failures",
|
|
298
|
+
matches: (msg) => msg.includes("Seed application failed") || msg.includes("seed") && msg.includes("failed") || msg.includes("ci.sql"),
|
|
299
|
+
getSuggestions: () => [
|
|
300
|
+
"\u{1F331} Seed application failed.",
|
|
301
|
+
"",
|
|
302
|
+
"Common causes:",
|
|
303
|
+
" 1. Schema not synced - run: runa db sync",
|
|
304
|
+
" 2. Foreign key violations - check seed order",
|
|
305
|
+
" 3. Duplicate data - reset DB: runa db reset",
|
|
306
|
+
"",
|
|
307
|
+
"Debug with:",
|
|
308
|
+
" runa db sync --verbose"
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
// Script not found
|
|
312
|
+
{
|
|
313
|
+
name: "script-not-found",
|
|
314
|
+
matches: (msg) => msg.includes("Script not found") || msg.includes("script") && msg.includes("ENOENT"),
|
|
315
|
+
getSuggestions: () => [
|
|
316
|
+
"\u{1F4DC} Script file not found.",
|
|
317
|
+
"",
|
|
318
|
+
"Ensure the script exists and is executable:",
|
|
319
|
+
" ls -la packages/database/scripts/",
|
|
320
|
+
"",
|
|
321
|
+
"Common scripts:",
|
|
322
|
+
" \u2022 generate-seeds.ts - Auto-generate seed data",
|
|
323
|
+
" \u2022 db-sync.ts - Schema synchronization"
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
// Git working tree issues
|
|
327
|
+
{
|
|
328
|
+
name: "git-working-tree",
|
|
329
|
+
matches: (msg) => msg.includes("uncommitted changes") || msg.includes("working tree") || msg.includes("dirty working"),
|
|
330
|
+
getSuggestions: () => [
|
|
331
|
+
"\u{1F4DD} Git working tree has uncommitted changes.",
|
|
332
|
+
"",
|
|
333
|
+
"Options:",
|
|
334
|
+
" 1. Commit your changes:",
|
|
335
|
+
' git add . && git commit -m "WIP"',
|
|
336
|
+
"",
|
|
337
|
+
" 2. Stash changes temporarily:",
|
|
338
|
+
" git stash",
|
|
339
|
+
"",
|
|
340
|
+
" 3. Discard changes (careful!):",
|
|
341
|
+
" git checkout ."
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
// Database authentication failures
|
|
345
|
+
{
|
|
346
|
+
name: "database-auth-failures",
|
|
347
|
+
matches: (msg) => msg.includes("authentication") && msg.includes("failed") || msg.includes("password") && msg.includes("authentication") || msg.includes("role") && msg.includes("does not exist"),
|
|
348
|
+
getSuggestions: () => [
|
|
349
|
+
"\u{1F510} Database authentication failed.",
|
|
350
|
+
"",
|
|
351
|
+
"Check your DATABASE_URL credentials:",
|
|
352
|
+
" 1. Verify password is correct",
|
|
353
|
+
" 2. Check user role exists",
|
|
354
|
+
"",
|
|
355
|
+
"For local development:",
|
|
356
|
+
" DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres",
|
|
357
|
+
"",
|
|
358
|
+
"For production, use runa db derive-urls"
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
// Turbo cache issues
|
|
362
|
+
{
|
|
363
|
+
name: "turbo-cache-issues",
|
|
364
|
+
matches: (msg) => msg.includes("turbo") && msg.includes("cache") || msg.includes("turbo") && msg.includes("daemon"),
|
|
365
|
+
getSuggestions: () => [
|
|
366
|
+
"\u26A1 Turbo cache issue detected.",
|
|
367
|
+
"",
|
|
368
|
+
"Clear turbo cache:",
|
|
369
|
+
" runa cache clear",
|
|
370
|
+
"",
|
|
371
|
+
"Or manually:",
|
|
372
|
+
" rm -rf .turbo node_modules/.cache"
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
];
|
|
376
|
+
function diagnosePjRepoIssues(errorMessage) {
|
|
377
|
+
for (const rule of diagnosisRules) {
|
|
378
|
+
if (rule.matches(errorMessage)) {
|
|
379
|
+
return rule.getSuggestions(errorMessage);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return [];
|
|
383
|
+
}
|
|
384
|
+
function outputJsonError(formatted, allSuggestions) {
|
|
385
|
+
const argv = process.argv.slice(2);
|
|
386
|
+
const command = getCommandPathFromArgv(argv);
|
|
387
|
+
const payload = {
|
|
388
|
+
version: CLI_CONTRACT_VERSION,
|
|
389
|
+
ok: false,
|
|
390
|
+
command,
|
|
391
|
+
error: {
|
|
392
|
+
title: formatted.code ?? "CLI_ERROR",
|
|
393
|
+
message: formatted.message,
|
|
394
|
+
code: formatted.code,
|
|
395
|
+
suggestions: allSuggestions.filter((s) => s.length > 0)
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
const parsed = ErrorEnvelopeSchema.parse(payload);
|
|
399
|
+
process.env.RUNA_JSON_EMITTING = "true";
|
|
400
|
+
try {
|
|
401
|
+
process.stdout.write(`${JSON.stringify(parsed)}
|
|
402
|
+
`);
|
|
403
|
+
} finally {
|
|
404
|
+
process.env.RUNA_JSON_EMITTING = "false";
|
|
405
|
+
}
|
|
406
|
+
process.exit(formatted.exitCode);
|
|
407
|
+
}
|
|
408
|
+
function outputDiagnostics(logger, diagnostics) {
|
|
409
|
+
if (diagnostics.length === 0) return;
|
|
410
|
+
logger.info("\n\u{1F50D} Diagnosis:");
|
|
411
|
+
for (const diagnostic of diagnostics) {
|
|
412
|
+
logger.info(diagnostic.startsWith(" ") ? diagnostic : `${diagnostic}`);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
function outputSuggestions(logger, suggestions) {
|
|
416
|
+
if (suggestions.length === 0) return;
|
|
417
|
+
logger.info("\n\u{1F4A1} Suggestions:");
|
|
418
|
+
for (const suggestion of suggestions) {
|
|
419
|
+
logger.info(` \u2022 ${suggestion}`);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
function outputHumanReadableError(formatted, pjRepoDiagnostics) {
|
|
423
|
+
const logger = createCLILogger("runa");
|
|
424
|
+
logger.error(formatted.message);
|
|
425
|
+
if (formatted.code) {
|
|
426
|
+
logger.info(`Error Code: ${formatted.code}`);
|
|
427
|
+
}
|
|
428
|
+
outputDiagnostics(logger, pjRepoDiagnostics);
|
|
429
|
+
outputSuggestions(logger, formatted.suggestions);
|
|
430
|
+
logger.info("\n\u{1F4D6} For more help:");
|
|
431
|
+
if (pjRepoDiagnostics.length === 0 && formatted.suggestions.length === 0) {
|
|
432
|
+
logger.info(" \u2022 First-time setup: runa prepare");
|
|
433
|
+
logger.info(" \u2022 Diagnose issues: runa check");
|
|
434
|
+
} else {
|
|
435
|
+
logger.info(" \u2022 Diagnose issues: runa check");
|
|
436
|
+
}
|
|
437
|
+
logger.info(" \u2022 Docs: https://github.com/r06-dev/runa");
|
|
438
|
+
if (process.env.DEBUG === "true" && formatted.debug) {
|
|
439
|
+
logger.debug("\nStack Trace:");
|
|
440
|
+
logger.debug(formatted.debug);
|
|
441
|
+
}
|
|
442
|
+
process.exit(formatted.exitCode);
|
|
443
|
+
}
|
|
444
|
+
function handleCLIError(error) {
|
|
445
|
+
const formatted = formatCLIError(error, { debug: process.env.DEBUG === "true" });
|
|
446
|
+
const errorCode = error instanceof CLIError ? error.code : formatted.code;
|
|
447
|
+
const catalogDocUrl = getDocUrlFromCatalog(errorCode);
|
|
448
|
+
const pjRepoDiagnostics = diagnosePjRepoIssues(formatted.message);
|
|
449
|
+
const allSuggestions = [...formatted.suggestions, ...pjRepoDiagnostics];
|
|
450
|
+
if (catalogDocUrl && !allSuggestions.some((s) => s.includes(catalogDocUrl))) {
|
|
451
|
+
allSuggestions.push(`Docs: ${catalogDocUrl}`);
|
|
452
|
+
}
|
|
453
|
+
const outputFormat = getOutputFormatFromEnv();
|
|
454
|
+
if (outputFormat === "json") {
|
|
455
|
+
return outputJsonError(formatted, allSuggestions);
|
|
456
|
+
}
|
|
457
|
+
return outputHumanReadableError(formatted, pjRepoDiagnostics);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export { handleCLIError };
|