@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,626 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { emitJsonSuccess } from './chunk-UU55OH7P.js';
|
|
4
|
+
import './chunk-RRGQCUKT.js';
|
|
5
|
+
import './chunk-JT5SUTWE.js';
|
|
6
|
+
import './chunk-HKUWEGUX.js';
|
|
7
|
+
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
8
|
+
import { runTest, TestRunOutputSchema, CLIError, runTestService, TestServiceOutputSchema, runTestIntegration, TestIntegrationOutputSchema, runTestStatic, TestStaticOutputSchema, createCLILogger, generateOwaspTop10Tests, TestOwaspGenerateOutputSchema } from '@runa-ai/runa';
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
import { execSync } from 'child_process';
|
|
11
|
+
|
|
12
|
+
createRequire(import.meta.url);
|
|
13
|
+
|
|
14
|
+
// src/commands/test/index.ts
|
|
15
|
+
init_esm_shims();
|
|
16
|
+
|
|
17
|
+
// src/commands/test/commands/test.ts
|
|
18
|
+
init_esm_shims();
|
|
19
|
+
function resolveEffectiveRequireManifest(options) {
|
|
20
|
+
if (options.requireManifest && options.allowManifestFallback) {
|
|
21
|
+
throw new CLIError(
|
|
22
|
+
"--require-manifest and --allow-manifest-fallback are mutually exclusive",
|
|
23
|
+
"TEST_MANIFEST_FLAGS_EXCLUSIVE",
|
|
24
|
+
["Use strict mode (default) OR explicitly allow fallback, but not both"]
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
if (options.allowManifestFallback) return false;
|
|
28
|
+
return options.requireManifest;
|
|
29
|
+
}
|
|
30
|
+
var testCommand = new Command("test").description("Run tests (compat). Prefer: test:layer0..4 or test:static/service/integration.").option("--layer <number>", "Run specific layer (0-4)").option("--from <number>", "Run from layer N to 4").option("--to <number>", "Run from layer 0 to N").option("--ci", "CI mode (fail fast, no interactive)").option("--verbose", "Verbose output").option("--record", "Record test results to database", true).option(
|
|
31
|
+
"--report-json <path>",
|
|
32
|
+
"Export test report as JSON. If <path> is a bare filename, it will be written under .runa/tmp/."
|
|
33
|
+
).option("--generate", "Generate tests from XState before running (integration)").option("--advanced", "Generate advanced tests (integration)").option("--auto", "Zero-config auto-generation (integration)").option("--base-url <url>", "Override base URL (integration)").option("--changed", "Run only impacted layers based on git diff (service)").option("--base <ref>", "Base ref for --changed (service)").option("--skip-missing", "Skip layers with missing dependencies instead of failing").option(
|
|
34
|
+
"--require-manifest",
|
|
35
|
+
"Require manifest to be present and valid for Layer 3/4 tests (strict behavior)"
|
|
36
|
+
).option(
|
|
37
|
+
"--allow-manifest-fallback",
|
|
38
|
+
"Allow fallback behavior when manifest is missing/invalid (disables Layer 4 strict default)"
|
|
39
|
+
).action(async (options) => {
|
|
40
|
+
try {
|
|
41
|
+
const effectiveRequireManifest = resolveEffectiveRequireManifest(options);
|
|
42
|
+
const output = await runTest({
|
|
43
|
+
layer: options.layer !== void 0 ? Number.parseInt(options.layer, 10) : void 0,
|
|
44
|
+
from: options.from !== void 0 ? Number.parseInt(options.from, 10) : void 0,
|
|
45
|
+
to: options.to !== void 0 ? Number.parseInt(options.to, 10) : void 0,
|
|
46
|
+
ci: options.ci ?? false,
|
|
47
|
+
verbose: options.verbose,
|
|
48
|
+
record: options.record,
|
|
49
|
+
reportJson: options.reportJson,
|
|
50
|
+
generate: options.generate,
|
|
51
|
+
advanced: options.advanced,
|
|
52
|
+
auto: options.auto,
|
|
53
|
+
baseUrl: options.baseUrl,
|
|
54
|
+
changed: options.changed,
|
|
55
|
+
base: options.base,
|
|
56
|
+
skipMissing: options.skipMissing,
|
|
57
|
+
requireManifest: effectiveRequireManifest
|
|
58
|
+
});
|
|
59
|
+
emitJsonSuccess(testCommand, TestRunOutputSchema, output);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
if (error instanceof CLIError) throw error;
|
|
62
|
+
throw new CLIError(
|
|
63
|
+
"Test execution failed",
|
|
64
|
+
"TEST_EXECUTION_FAILED",
|
|
65
|
+
[
|
|
66
|
+
"Check error details above",
|
|
67
|
+
"Prefer new commands: runa test:layer0..4 or runa test:static/service/integration",
|
|
68
|
+
"Verify environment: runa check"
|
|
69
|
+
],
|
|
70
|
+
error instanceof Error ? error : void 0
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// src/commands/test/commands/test-db.ts
|
|
76
|
+
init_esm_shims();
|
|
77
|
+
var testDbCommand = new Command("test:db").description("Run Layer 2-3: Database tests (schema + api) - Requires PostgreSQL").option("--ci", "CI mode (fail fast, no interactive)").option("--record", "Record test results to database", true).option(
|
|
78
|
+
"--report-json <path>",
|
|
79
|
+
"Export test report as JSON. If <path> is a bare filename, it will be written under .runa/tmp/."
|
|
80
|
+
).option("--verbose", "Verbose output (full error details, environment info)").option("--changed", "Run only impacted layers based on git diff").option(
|
|
81
|
+
"--base <ref>",
|
|
82
|
+
"Base ref for --changed (default: $RUNA_TEST_BASE_REF or $GITHUB_BASE_REF)"
|
|
83
|
+
).option("--layer <layer>", "Run specific layer: 2/schema, 3/api, or all (default: all)").action(async (options) => {
|
|
84
|
+
try {
|
|
85
|
+
const layers = options.layer === "2" || options.layer === "schema" ? [2] : options.layer === "3" || options.layer === "api" ? [3] : [2, 3];
|
|
86
|
+
const output = await runTestService({
|
|
87
|
+
ci: options.ci ?? false,
|
|
88
|
+
record: options.record,
|
|
89
|
+
reportJson: options.reportJson,
|
|
90
|
+
verbose: options.verbose,
|
|
91
|
+
changed: options.changed,
|
|
92
|
+
base: options.base,
|
|
93
|
+
layers
|
|
94
|
+
});
|
|
95
|
+
emitJsonSuccess(testDbCommand, TestServiceOutputSchema, output);
|
|
96
|
+
} catch (error) {
|
|
97
|
+
if (error instanceof CLIError) {
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
100
|
+
throw new CLIError(
|
|
101
|
+
"Database test execution failed",
|
|
102
|
+
"TEST_DB_EXECUTION_FAILED",
|
|
103
|
+
["Check error details above", "Verify environment: runa check"],
|
|
104
|
+
error instanceof Error ? error : void 0
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
var testSchemaCommand = new Command("test:schema").description("Run Layer 2: Schema tests (Drizzle, RLS, pgTAP) - Alias for test:layer2").option("--ci", "CI mode (fail fast, no interactive)").option("--record", "Record test results to database", true).option("--report-json <path>", "Export test report as JSON").option("--verbose", "Verbose output").action(async (options) => {
|
|
109
|
+
try {
|
|
110
|
+
const output = await runTestService({
|
|
111
|
+
ci: options.ci ?? false,
|
|
112
|
+
record: options.record,
|
|
113
|
+
reportJson: options.reportJson,
|
|
114
|
+
verbose: options.verbose,
|
|
115
|
+
layers: [2]
|
|
116
|
+
});
|
|
117
|
+
emitJsonSuccess(testSchemaCommand, TestServiceOutputSchema, output);
|
|
118
|
+
} catch (error) {
|
|
119
|
+
if (error instanceof CLIError) {
|
|
120
|
+
throw error;
|
|
121
|
+
}
|
|
122
|
+
throw new CLIError(
|
|
123
|
+
"Schema test execution failed",
|
|
124
|
+
"TEST_SCHEMA_EXECUTION_FAILED",
|
|
125
|
+
["Check error details above", "Verify environment: runa check"],
|
|
126
|
+
error instanceof Error ? error : void 0
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
var testApiCommand = new Command("test:api").description("Run Layer 3: API tests (Hono RPC, Contract, Integration) - Alias for test:layer3").option("--ci", "CI mode (fail fast, no interactive)").option("--record", "Record test results to database", true).option("--report-json <path>", "Export test report as JSON").option("--verbose", "Verbose output").action(async (options) => {
|
|
131
|
+
try {
|
|
132
|
+
const output = await runTestService({
|
|
133
|
+
ci: options.ci ?? false,
|
|
134
|
+
record: options.record,
|
|
135
|
+
reportJson: options.reportJson,
|
|
136
|
+
verbose: options.verbose,
|
|
137
|
+
layers: [3]
|
|
138
|
+
});
|
|
139
|
+
emitJsonSuccess(testApiCommand, TestServiceOutputSchema, output);
|
|
140
|
+
} catch (error) {
|
|
141
|
+
if (error instanceof CLIError) {
|
|
142
|
+
throw error;
|
|
143
|
+
}
|
|
144
|
+
throw new CLIError(
|
|
145
|
+
"API test execution failed",
|
|
146
|
+
"TEST_API_EXECUTION_FAILED",
|
|
147
|
+
["Check error details above", "Verify environment: runa check"],
|
|
148
|
+
error instanceof Error ? error : void 0
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
// src/commands/test/commands/test-e2e.ts
|
|
154
|
+
init_esm_shims();
|
|
155
|
+
function resolveEffectiveRequireManifest2(options) {
|
|
156
|
+
if (options.requireManifest && options.allowManifestFallback) {
|
|
157
|
+
throw new CLIError(
|
|
158
|
+
"--require-manifest and --allow-manifest-fallback are mutually exclusive",
|
|
159
|
+
"TEST_E2E_MANIFEST_FLAGS_EXCLUSIVE",
|
|
160
|
+
["Use strict mode (default) OR explicitly allow fallback, but not both"]
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
if (options.allowManifestFallback) return false;
|
|
164
|
+
return options.requireManifest;
|
|
165
|
+
}
|
|
166
|
+
var testE2ECommand = new Command("test:e2e").description("Run Layer 4: E2E tests (Playwright) - Requires browser").option("--generate", "Generate tests from XState before running").option("--advanced", "Generate advanced tests (context-aware, guards, invariants, etc.)").option("--auto", "Zero-config auto-generation (implementation-driven)").option("--ci", "CI mode (fail fast, no interactive)").option("--record", "Record test results to database", true).option("--base-url <url>", "Explicit base URL for E2E (disables auto dev server start)").option(
|
|
167
|
+
"--require-manifest",
|
|
168
|
+
"Require manifest to be present and valid (strict behavior; enabled by default for Layer 4)"
|
|
169
|
+
).option(
|
|
170
|
+
"--allow-manifest-fallback",
|
|
171
|
+
"Allow fallback behavior when manifest is missing/invalid (disables Layer 4 strict default)"
|
|
172
|
+
).option(
|
|
173
|
+
"--report-json <path>",
|
|
174
|
+
"Export test report as JSON. If <path> is a bare filename, it will be written under .runa/tmp/."
|
|
175
|
+
).option("--verbose", "Verbose output (full error details, environment info)").action(async (options) => {
|
|
176
|
+
try {
|
|
177
|
+
const effectiveRequireManifest = resolveEffectiveRequireManifest2(options);
|
|
178
|
+
const output = await runTestIntegration({
|
|
179
|
+
ci: options.ci ?? false,
|
|
180
|
+
record: options.record,
|
|
181
|
+
reportJson: options.reportJson,
|
|
182
|
+
verbose: options.verbose,
|
|
183
|
+
generate: options.generate,
|
|
184
|
+
advanced: options.advanced,
|
|
185
|
+
auto: options.auto,
|
|
186
|
+
baseUrl: options.baseUrl,
|
|
187
|
+
requireManifest: effectiveRequireManifest,
|
|
188
|
+
invokedAs: "runa test:e2e"
|
|
189
|
+
});
|
|
190
|
+
emitJsonSuccess(testE2ECommand, TestIntegrationOutputSchema, output);
|
|
191
|
+
} catch (error) {
|
|
192
|
+
if (error instanceof CLIError) {
|
|
193
|
+
throw error;
|
|
194
|
+
}
|
|
195
|
+
throw new CLIError(
|
|
196
|
+
"E2E test execution failed",
|
|
197
|
+
"TEST_E2E_EXECUTION_FAILED",
|
|
198
|
+
[
|
|
199
|
+
"Check error details above",
|
|
200
|
+
"Verify environment: runa check",
|
|
201
|
+
"Verify browser is available: npx playwright install",
|
|
202
|
+
"Verify environment: runa check"
|
|
203
|
+
],
|
|
204
|
+
error instanceof Error ? error : void 0
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
var testBrowserCommand = new Command("test:browser").description("Run Layer 4: Browser tests (Playwright E2E) - Alias for test:e2e").option("--generate", "Generate tests from XState before running").option("--advanced", "Generate advanced tests").option("--auto", "Zero-config auto-generation").option("--ci", "CI mode (fail fast, no interactive)").option("--record", "Record test results to database", true).option("--base-url <url>", "Explicit base URL for E2E").option(
|
|
209
|
+
"--require-manifest",
|
|
210
|
+
"Require manifest to be present and valid (strict behavior; enabled by default for Layer 4)"
|
|
211
|
+
).option(
|
|
212
|
+
"--allow-manifest-fallback",
|
|
213
|
+
"Allow fallback behavior when manifest is missing/invalid (disables Layer 4 strict default)"
|
|
214
|
+
).option("--report-json <path>", "Export test report as JSON").option("--verbose", "Verbose output").action(async (options) => {
|
|
215
|
+
try {
|
|
216
|
+
const effectiveRequireManifest = resolveEffectiveRequireManifest2(options);
|
|
217
|
+
const output = await runTestIntegration({
|
|
218
|
+
ci: options.ci ?? false,
|
|
219
|
+
record: options.record,
|
|
220
|
+
reportJson: options.reportJson,
|
|
221
|
+
verbose: options.verbose,
|
|
222
|
+
generate: options.generate,
|
|
223
|
+
advanced: options.advanced,
|
|
224
|
+
auto: options.auto,
|
|
225
|
+
baseUrl: options.baseUrl,
|
|
226
|
+
requireManifest: effectiveRequireManifest,
|
|
227
|
+
invokedAs: "runa test:browser"
|
|
228
|
+
});
|
|
229
|
+
emitJsonSuccess(testBrowserCommand, TestIntegrationOutputSchema, output);
|
|
230
|
+
} catch (error) {
|
|
231
|
+
if (error instanceof CLIError) {
|
|
232
|
+
throw error;
|
|
233
|
+
}
|
|
234
|
+
throw new CLIError(
|
|
235
|
+
"Browser test execution failed",
|
|
236
|
+
"TEST_BROWSER_EXECUTION_FAILED",
|
|
237
|
+
["Check error details above", "Verify browser is available: npx playwright install"],
|
|
238
|
+
error instanceof Error ? error : void 0
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
// src/commands/test/commands/test-fast.ts
|
|
244
|
+
init_esm_shims();
|
|
245
|
+
var testFastCommand = new Command("test:fast").description("Run Layer 0-1: Fast tests (lint + logic) - No DB required").option("--ci", "CI mode (fail fast, no interactive)").option("--record", "Record test results to database", true).option(
|
|
246
|
+
"--report-json <path>",
|
|
247
|
+
"Export test report as JSON. If <path> is a bare filename, it will be written under .runa/tmp/."
|
|
248
|
+
).option("--verbose", "Verbose output (full error details, environment info)").option("--security", "Force security checks (pnpm audit) in local mode").option("--layer <layer>", "Run specific layer: 0/lint, 1/logic, or all (default: all)").action(async (options) => {
|
|
249
|
+
try {
|
|
250
|
+
const output = await runTestStatic({
|
|
251
|
+
ci: options.ci ?? false,
|
|
252
|
+
record: options.record,
|
|
253
|
+
reportJson: options.reportJson,
|
|
254
|
+
verbose: options.verbose,
|
|
255
|
+
security: options.security
|
|
256
|
+
});
|
|
257
|
+
emitJsonSuccess(testFastCommand, TestStaticOutputSchema, output);
|
|
258
|
+
} catch (error) {
|
|
259
|
+
if (error instanceof CLIError) {
|
|
260
|
+
throw error;
|
|
261
|
+
}
|
|
262
|
+
throw new CLIError(
|
|
263
|
+
"Fast test execution failed",
|
|
264
|
+
"TEST_FAST_EXECUTION_FAILED",
|
|
265
|
+
[
|
|
266
|
+
"Check error details above",
|
|
267
|
+
"Verify environment: runa check",
|
|
268
|
+
"Review test configuration"
|
|
269
|
+
],
|
|
270
|
+
error instanceof Error ? error : void 0
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
var testLintCommand = new Command("test:lint").description("Run Layer 0: Lint (type-check, biome, build) - Alias for test:layer0").option("--ci", "CI mode (fail fast, no interactive)").option("--record", "Record test results to database", true).option("--report-json <path>", "Export test report as JSON").option("--verbose", "Verbose output").option("--security", "Force security checks (pnpm audit)").action(async (options) => {
|
|
275
|
+
try {
|
|
276
|
+
const output = await runTestStatic({
|
|
277
|
+
ci: options.ci ?? false,
|
|
278
|
+
record: options.record,
|
|
279
|
+
reportJson: options.reportJson,
|
|
280
|
+
verbose: options.verbose,
|
|
281
|
+
security: options.security
|
|
282
|
+
});
|
|
283
|
+
emitJsonSuccess(testLintCommand, TestStaticOutputSchema, output);
|
|
284
|
+
} catch (error) {
|
|
285
|
+
if (error instanceof CLIError) {
|
|
286
|
+
throw error;
|
|
287
|
+
}
|
|
288
|
+
throw new CLIError(
|
|
289
|
+
"Lint test execution failed",
|
|
290
|
+
"TEST_LINT_EXECUTION_FAILED",
|
|
291
|
+
["Check error details above", "Verify environment: runa check"],
|
|
292
|
+
error instanceof Error ? error : void 0
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
// src/commands/test/commands/test-integration.ts
|
|
298
|
+
init_esm_shims();
|
|
299
|
+
function resolveEffectiveRequireManifest3(options) {
|
|
300
|
+
if (options.requireManifest && options.allowManifestFallback) {
|
|
301
|
+
throw new CLIError(
|
|
302
|
+
"--require-manifest and --allow-manifest-fallback are mutually exclusive",
|
|
303
|
+
"TEST_INTEGRATION_MANIFEST_FLAGS_EXCLUSIVE",
|
|
304
|
+
["Use strict mode (default) OR explicitly allow fallback, but not both"]
|
|
305
|
+
);
|
|
306
|
+
}
|
|
307
|
+
if (options.allowManifestFallback) return false;
|
|
308
|
+
return options.requireManifest;
|
|
309
|
+
}
|
|
310
|
+
var testIntegrationCommand = new Command("test:integration").description("Run Layer 4: Integration tests (E2E) with auto-generation").option("--generate", "Generate tests from XState before running").option("--advanced", "Generate advanced tests (context-aware, guards, invariants, etc.)").option("--auto", "Zero-config auto-generation (implementation-driven)").option("--ci", "CI mode (fail fast, no interactive)").option("--record", "Record test results to database", true).option("--base-url <url>", "Explicit base URL for E2E/Security (disables auto dev server start)").option(
|
|
311
|
+
"--require-manifest",
|
|
312
|
+
"Require manifest to be present and valid (strict behavior; enabled by default for Layer 4)"
|
|
313
|
+
).option(
|
|
314
|
+
"--allow-manifest-fallback",
|
|
315
|
+
"Allow fallback behavior when manifest is missing/invalid (disables Layer 4 strict default)"
|
|
316
|
+
).option(
|
|
317
|
+
"--report-json <path>",
|
|
318
|
+
"Export test report as JSON. If <path> is a bare filename, it will be written under .runa/tmp/."
|
|
319
|
+
).option("--verbose", "Verbose output (full error details, environment info)").action(async (options) => {
|
|
320
|
+
try {
|
|
321
|
+
const effectiveRequireManifest = resolveEffectiveRequireManifest3(options);
|
|
322
|
+
const output = await runTestIntegration({
|
|
323
|
+
ci: options.ci ?? false,
|
|
324
|
+
record: options.record,
|
|
325
|
+
reportJson: options.reportJson,
|
|
326
|
+
verbose: options.verbose,
|
|
327
|
+
generate: options.generate,
|
|
328
|
+
advanced: options.advanced,
|
|
329
|
+
auto: options.auto,
|
|
330
|
+
baseUrl: options.baseUrl,
|
|
331
|
+
requireManifest: effectiveRequireManifest,
|
|
332
|
+
invokedAs: "runa test:integration"
|
|
333
|
+
});
|
|
334
|
+
emitJsonSuccess(testIntegrationCommand, TestIntegrationOutputSchema, output);
|
|
335
|
+
} catch (error) {
|
|
336
|
+
if (error instanceof CLIError) {
|
|
337
|
+
throw error;
|
|
338
|
+
}
|
|
339
|
+
throw new CLIError(
|
|
340
|
+
"Integration test execution failed",
|
|
341
|
+
"TEST_INTEGRATION_EXECUTION_FAILED",
|
|
342
|
+
[
|
|
343
|
+
"Check error details above",
|
|
344
|
+
"Verify environment: runa check",
|
|
345
|
+
"Verify environment: runa check"
|
|
346
|
+
],
|
|
347
|
+
error instanceof Error ? error : void 0
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
// src/commands/test/commands/test-layer.ts
|
|
353
|
+
init_esm_shims();
|
|
354
|
+
function injectTestAttrsIfLayer4(layer, options) {
|
|
355
|
+
if (layer !== 4) return;
|
|
356
|
+
const { verbose, requireManifest } = options ?? {};
|
|
357
|
+
try {
|
|
358
|
+
if (verbose) {
|
|
359
|
+
console.log("[Layer 4] Auto-injecting XState test attributes...");
|
|
360
|
+
}
|
|
361
|
+
execSync("pnpm exec runa inject-test-attrs", {
|
|
362
|
+
cwd: process.cwd(),
|
|
363
|
+
stdio: verbose ? "inherit" : "pipe"
|
|
364
|
+
});
|
|
365
|
+
if (verbose) {
|
|
366
|
+
console.log("[Layer 4] Test attributes injected successfully");
|
|
367
|
+
}
|
|
368
|
+
} catch (error) {
|
|
369
|
+
if (requireManifest) {
|
|
370
|
+
throw new CLIError(
|
|
371
|
+
"XState test attribute injection failed",
|
|
372
|
+
"INJECT_TEST_ATTRS_FAILED",
|
|
373
|
+
[
|
|
374
|
+
"Run `runa inject-test-attrs` manually to see detailed errors",
|
|
375
|
+
"Ensure XState machines exist in your project",
|
|
376
|
+
"Check that machines have valid meta.e2e definitions",
|
|
377
|
+
"Or pass --allow-manifest-fallback to continue with fallback behavior"
|
|
378
|
+
],
|
|
379
|
+
error instanceof Error ? error : void 0
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
if (verbose) {
|
|
383
|
+
console.warn("[Layer 4] Test attribute injection failed, continuing with tests");
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
function resolveEffectiveRequireManifest4(layer, options) {
|
|
388
|
+
if (options.allowManifestFallback) return false;
|
|
389
|
+
if (options.requireManifest !== void 0) return options.requireManifest;
|
|
390
|
+
if (layer === 4 && process.env.RUNA_LAYER4_ALLOW_MANIFEST_FALLBACK !== "true") return true;
|
|
391
|
+
return void 0;
|
|
392
|
+
}
|
|
393
|
+
async function runSingleLayer(params) {
|
|
394
|
+
const effectiveRequireManifest = resolveEffectiveRequireManifest4(params.layer, params.options);
|
|
395
|
+
injectTestAttrsIfLayer4(params.layer, {
|
|
396
|
+
verbose: params.options.verbose,
|
|
397
|
+
requireManifest: effectiveRequireManifest
|
|
398
|
+
});
|
|
399
|
+
try {
|
|
400
|
+
const output = await runTest({
|
|
401
|
+
layer: params.layer,
|
|
402
|
+
ci: params.options.ci ?? false,
|
|
403
|
+
verbose: params.options.verbose,
|
|
404
|
+
reportJson: params.options.reportJson,
|
|
405
|
+
baseUrl: params.options.baseUrl,
|
|
406
|
+
generate: params.options.generate,
|
|
407
|
+
advanced: params.options.advanced,
|
|
408
|
+
auto: params.options.auto,
|
|
409
|
+
updateSnapshots: params.options.updateSnapshots,
|
|
410
|
+
filter: params.options.filter,
|
|
411
|
+
reviewSnapshots: params.options.reviewSnapshots,
|
|
412
|
+
forceRegenerate: params.options.force,
|
|
413
|
+
skipGeneration: params.options.skipGeneration,
|
|
414
|
+
requireManifest: effectiveRequireManifest,
|
|
415
|
+
invokedAs: `runa test:layer${params.layer}`
|
|
416
|
+
});
|
|
417
|
+
emitJsonSuccess(params.cmd, TestRunOutputSchema, output);
|
|
418
|
+
} catch (error) {
|
|
419
|
+
if (error instanceof CLIError) throw error;
|
|
420
|
+
throw new CLIError(
|
|
421
|
+
`Layer ${params.layer} failed`,
|
|
422
|
+
"TEST_LAYER_FAILED",
|
|
423
|
+
["Check error details above", "Verify environment: runa check"],
|
|
424
|
+
error instanceof Error ? error : void 0
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
function validateGenerationFlags(layer, opts) {
|
|
429
|
+
if (layer < 4 && (opts.generate || opts.advanced || opts.auto)) {
|
|
430
|
+
throw new CLIError(
|
|
431
|
+
"--generate/--advanced/--auto are only supported for Layer 4",
|
|
432
|
+
"TEST_LAYER_GENERATION_UNSUPPORTED",
|
|
433
|
+
["Remove generation flags, or run: runa test:layer4 --generate/--auto"]
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
if (opts.advanced && !opts.generate) {
|
|
437
|
+
throw new CLIError("--advanced requires --generate", "TEST_LAYER_ADVANCED_REQUIRES_GENERATE", [
|
|
438
|
+
"Add --generate, or remove --advanced"
|
|
439
|
+
]);
|
|
440
|
+
}
|
|
441
|
+
if (opts.auto && (opts.generate || opts.advanced)) {
|
|
442
|
+
throw new CLIError(
|
|
443
|
+
"--auto is mutually exclusive with --generate/--advanced",
|
|
444
|
+
"TEST_LAYER_AUTO_MUTUALLY_EXCLUSIVE",
|
|
445
|
+
["Use --auto (implementation-driven) OR --generate/--advanced (XState-driven)"]
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
if (layer === 4 && opts.requireManifest && opts.allowManifestFallback) {
|
|
449
|
+
throw new CLIError(
|
|
450
|
+
"--require-manifest and --allow-manifest-fallback are mutually exclusive",
|
|
451
|
+
"TEST_LAYER_MANIFEST_FLAGS_EXCLUSIVE",
|
|
452
|
+
["Use strict mode (default) OR explicitly allow fallback, but not both"]
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
function validateSnapshotFlags(opts) {
|
|
457
|
+
if (opts.reviewSnapshots && opts.ci) {
|
|
458
|
+
throw new CLIError(
|
|
459
|
+
"--review-snapshots requires interactive mode (cannot use with --ci)",
|
|
460
|
+
"TEST_LAYER_REVIEW_REQUIRES_INTERACTIVE",
|
|
461
|
+
["Remove --ci flag to use interactive snapshot review"]
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
if (opts.reviewSnapshots && opts.updateSnapshots) {
|
|
465
|
+
throw new CLIError(
|
|
466
|
+
"--review-snapshots and --update-snapshots are mutually exclusive",
|
|
467
|
+
"TEST_LAYER_REVIEW_UPDATE_EXCLUSIVE",
|
|
468
|
+
["Use --review-snapshots for selective approval, or --update-snapshots for bulk update"]
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
function createLayerCommand(layer) {
|
|
473
|
+
const cmd = new Command(`test:layer${layer}`).description(`Run Layer ${layer} only (canonical CLI notation)`).option("--ci", "CI mode (fail fast, no interactive)").option("--verbose", "Verbose output (full tool logs, environment info)").option("--base-url <url>", "Explicit base URL for E2E (Layer 4)").hook("preAction", (_thisCommand, actionCommand) => {
|
|
474
|
+
const opts = actionCommand.opts();
|
|
475
|
+
validateGenerationFlags(layer, opts);
|
|
476
|
+
validateSnapshotFlags(opts);
|
|
477
|
+
}).option(
|
|
478
|
+
"--report-json <path>",
|
|
479
|
+
"Export test report as JSON. If <path> is a bare filename, it will be written under .runa/tmp/."
|
|
480
|
+
).action(async (options) => {
|
|
481
|
+
await runSingleLayer({ cmd, layer, options });
|
|
482
|
+
});
|
|
483
|
+
if (layer === 3) {
|
|
484
|
+
cmd.option("--skip-generation", "Skip auto-generation of API tests (run manual tests only)").option(
|
|
485
|
+
"--require-manifest",
|
|
486
|
+
"Require manifest to be present and valid (fail if missing or stale)"
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
if (layer >= 4) {
|
|
490
|
+
cmd.option("--generate", "Generate tests from XState before running (Layer 4)").option("--advanced", "Generate advanced tests (requires --generate)").option("--auto", "Zero-config auto-generation (implementation-driven)").option("--update-snapshots", "Update visual baselines (Layer 4)").option("--filter <pattern>", 'Filter tests by pattern (e.g., "checkout-*")').option("--review-snapshots", "Interactive review of changed visual snapshots (Layer 4)").option("--force", "Force regenerate all tests, bypassing cache").option(
|
|
491
|
+
"--require-manifest",
|
|
492
|
+
"Require manifest to be present and valid (fail if missing or stale)"
|
|
493
|
+
).option(
|
|
494
|
+
"--allow-manifest-fallback",
|
|
495
|
+
"Allow fallback behavior when manifest is missing/invalid (disables Layer 4 strict default)"
|
|
496
|
+
);
|
|
497
|
+
}
|
|
498
|
+
return cmd;
|
|
499
|
+
}
|
|
500
|
+
var testLayer0Command = createLayerCommand(0);
|
|
501
|
+
var testLayer1Command = createLayerCommand(1);
|
|
502
|
+
var testLayer2Command = createLayerCommand(2);
|
|
503
|
+
var testLayer3Command = createLayerCommand(3);
|
|
504
|
+
var testLayer4Command = createLayerCommand(4);
|
|
505
|
+
function createAliasCommand(alias, layer, description) {
|
|
506
|
+
const cmd = new Command(`test:${alias}`).description(`${description} - Alias for test:layer${layer}`).option("--ci", "CI mode (fail fast, no interactive)").option("--verbose", "Verbose output (full tool logs, environment info)").option(
|
|
507
|
+
"--report-json <path>",
|
|
508
|
+
"Export test report as JSON. If <path> is a bare filename, it will be written under .runa/tmp/."
|
|
509
|
+
).action(async (options) => {
|
|
510
|
+
await runSingleLayer({ cmd, layer, options });
|
|
511
|
+
});
|
|
512
|
+
return cmd;
|
|
513
|
+
}
|
|
514
|
+
var testLogicCommand = createAliasCommand(
|
|
515
|
+
"logic",
|
|
516
|
+
1,
|
|
517
|
+
"Run Layer 1: Logic tests (XState, pure functions)"
|
|
518
|
+
);
|
|
519
|
+
|
|
520
|
+
// src/commands/test/commands/test-owasp-generate.ts
|
|
521
|
+
init_esm_shims();
|
|
522
|
+
var testOWASPGenerateCommand = new Command("test:owasp:generate").description("Generate OWASP Top 10 security tests (zero-config, auto-detect)").option("--verbose", "Verbose output").action(async (options) => {
|
|
523
|
+
const logger = createCLILogger("test:owasp:generate");
|
|
524
|
+
try {
|
|
525
|
+
logger.section("OWASP Top 10 Test Generation (Zero-Config)");
|
|
526
|
+
logger.info("Auto-detecting API routes from your project...");
|
|
527
|
+
const result = await generateOwaspTop10Tests({ verbose: options.verbose });
|
|
528
|
+
if (result.success) {
|
|
529
|
+
logger.section("Generation Complete");
|
|
530
|
+
logger.success(`Generated ${result.totalFiles} OWASP test files`);
|
|
531
|
+
if (result.errors.length > 0) {
|
|
532
|
+
logger.warn(`
|
|
533
|
+
\u26A0\uFE0F ${result.errors.length} warnings:`);
|
|
534
|
+
for (const error of result.errors) {
|
|
535
|
+
logger.warn(` ${error}`);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
} else {
|
|
539
|
+
logger.error("Generation failed");
|
|
540
|
+
throw new CLIError(
|
|
541
|
+
"Failed to generate OWASP tests",
|
|
542
|
+
"OWASP_GENERATION_FAILED",
|
|
543
|
+
result.errors
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
emitJsonSuccess(testOWASPGenerateCommand, TestOwaspGenerateOutputSchema, result);
|
|
547
|
+
} catch (error) {
|
|
548
|
+
if (error instanceof CLIError) throw error;
|
|
549
|
+
throw new CLIError(
|
|
550
|
+
"OWASP test generation failed",
|
|
551
|
+
"OWASP_GENERATION_ERROR",
|
|
552
|
+
["Check project structure", "Ensure API routes exist"],
|
|
553
|
+
error instanceof Error ? error : void 0
|
|
554
|
+
);
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
|
|
558
|
+
// src/commands/test/commands/test-service.ts
|
|
559
|
+
init_esm_shims();
|
|
560
|
+
var testServiceCommand = new Command("test:service").description("Run Layer 1-3: Service tests (XState, DB, API Contracts)").option("--ci", "CI mode (fail fast, no interactive)").option("--record", "Record test results to database", true).option(
|
|
561
|
+
"--report-json <path>",
|
|
562
|
+
"Export test report as JSON. If <path> is a bare filename, it will be written under .runa/tmp/."
|
|
563
|
+
).option("--verbose", "Verbose output (full error details, environment info)").option("--changed", "Run only impacted layers based on git diff").option(
|
|
564
|
+
"--base <ref>",
|
|
565
|
+
"Base ref for --changed (default: $RUNA_TEST_BASE_REF or $GITHUB_BASE_REF)"
|
|
566
|
+
).action(async (options) => {
|
|
567
|
+
try {
|
|
568
|
+
const output = await runTestService({
|
|
569
|
+
ci: options.ci ?? false,
|
|
570
|
+
record: options.record,
|
|
571
|
+
reportJson: options.reportJson,
|
|
572
|
+
verbose: options.verbose,
|
|
573
|
+
changed: options.changed,
|
|
574
|
+
base: options.base
|
|
575
|
+
});
|
|
576
|
+
emitJsonSuccess(testServiceCommand, TestServiceOutputSchema, output);
|
|
577
|
+
} catch (error) {
|
|
578
|
+
if (error instanceof CLIError) {
|
|
579
|
+
throw error;
|
|
580
|
+
}
|
|
581
|
+
throw new CLIError(
|
|
582
|
+
"Service test execution failed",
|
|
583
|
+
"TEST_SERVICE_EXECUTION_FAILED",
|
|
584
|
+
[
|
|
585
|
+
"Check error details above",
|
|
586
|
+
"Verify environment: runa check",
|
|
587
|
+
"Verify environment: runa check"
|
|
588
|
+
],
|
|
589
|
+
error instanceof Error ? error : void 0
|
|
590
|
+
);
|
|
591
|
+
}
|
|
592
|
+
});
|
|
593
|
+
|
|
594
|
+
// src/commands/test/commands/test-static.ts
|
|
595
|
+
init_esm_shims();
|
|
596
|
+
var testStaticCommand = new Command("test:static").description("Run Layer 0: Static analysis (type-check, lint, build, package quality)").option("--ci", "CI mode (fail fast, no interactive)").option("--record", "Record test results to database", true).option(
|
|
597
|
+
"--report-json <path>",
|
|
598
|
+
"Export test report as JSON. If <path> is a bare filename, it will be written under .runa/tmp/."
|
|
599
|
+
).option("--verbose", "Verbose output (full error details, environment info)").option("--security", "Force security checks (pnpm audit) in local mode").action(async (options) => {
|
|
600
|
+
try {
|
|
601
|
+
const output = await runTestStatic({
|
|
602
|
+
ci: options.ci ?? false,
|
|
603
|
+
record: options.record,
|
|
604
|
+
reportJson: options.reportJson,
|
|
605
|
+
verbose: options.verbose,
|
|
606
|
+
security: options.security
|
|
607
|
+
});
|
|
608
|
+
emitJsonSuccess(testStaticCommand, TestStaticOutputSchema, output);
|
|
609
|
+
} catch (error) {
|
|
610
|
+
if (error instanceof CLIError) {
|
|
611
|
+
throw error;
|
|
612
|
+
}
|
|
613
|
+
throw new CLIError(
|
|
614
|
+
"Static test execution failed",
|
|
615
|
+
"TEST_STATIC_EXECUTION_FAILED",
|
|
616
|
+
[
|
|
617
|
+
"Check error details above",
|
|
618
|
+
"Verify environment: runa check",
|
|
619
|
+
"Review test configuration"
|
|
620
|
+
],
|
|
621
|
+
error instanceof Error ? error : void 0
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
|
|
626
|
+
export { testApiCommand, testBrowserCommand, testCommand, testDbCommand, testE2ECommand, testFastCommand, testIntegrationCommand, testLayer0Command, testLayer1Command, testLayer2Command, testLayer3Command, testLayer4Command, testLintCommand, testLogicCommand, testOWASPGenerateCommand, testSchemaCommand, testServiceCommand, testStaticCommand };
|