@runa-ai/runa-cli 0.5.26
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.
Potentially problematic release.
This version of @runa-ai/runa-cli might be problematic. Click here for more details.
- package/dist/cli/contract-mode.d.ts +2 -0
- package/dist/cli/contract-mode.d.ts.map +1 -0
- package/dist/cli/contract-output.d.ts +4 -0
- package/dist/cli/contract-output.d.ts.map +1 -0
- package/dist/cli/early-flags.d.ts +10 -0
- package/dist/cli/early-flags.d.ts.map +1 -0
- package/dist/cli/error-handler.d.ts +28 -0
- package/dist/cli/error-handler.d.ts.map +1 -0
- package/dist/cli/exec.d.ts +15 -0
- package/dist/cli/exec.d.ts.map +1 -0
- package/dist/cli/index.d.ts +16 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/json-output.d.ts +4 -0
- package/dist/cli/json-output.d.ts.map +1 -0
- package/dist/cli/non-interactive.d.ts +4 -0
- package/dist/cli/non-interactive.d.ts.map +1 -0
- package/dist/cli/output-format.d.ts +5 -0
- package/dist/cli/output-format.d.ts.map +1 -0
- package/dist/cli/signal-handler.d.ts +32 -0
- package/dist/cli/signal-handler.d.ts.map +1 -0
- package/dist/commands/build/actors/build.d.ts +32 -0
- package/dist/commands/build/actors/build.d.ts.map +1 -0
- package/dist/commands/build/actors/clean.d.ts +36 -0
- package/dist/commands/build/actors/clean.d.ts.map +1 -0
- package/dist/commands/build/actors/db-sync.d.ts +30 -0
- package/dist/commands/build/actors/db-sync.d.ts.map +1 -0
- package/dist/commands/build/actors/index.d.ts +20 -0
- package/dist/commands/build/actors/index.d.ts.map +1 -0
- package/dist/commands/build/actors/manifest.d.ts +34 -0
- package/dist/commands/build/actors/manifest.d.ts.map +1 -0
- package/dist/commands/build/actors/setup.d.ts +74 -0
- package/dist/commands/build/actors/setup.d.ts.map +1 -0
- package/dist/commands/build/actors/static-checks.d.ts +36 -0
- package/dist/commands/build/actors/static-checks.d.ts.map +1 -0
- package/dist/commands/build/actors/validate.d.ts +28 -0
- package/dist/commands/build/actors/validate.d.ts.map +1 -0
- package/dist/commands/build/commands/build.d.ts +25 -0
- package/dist/commands/build/commands/build.d.ts.map +1 -0
- package/dist/commands/build/contract.d.ts +213 -0
- package/dist/commands/build/contract.d.ts.map +1 -0
- package/dist/commands/build/guards.d.ts +106 -0
- package/dist/commands/build/guards.d.ts.map +1 -0
- package/dist/commands/build/index.d.ts +9 -0
- package/dist/commands/build/index.d.ts.map +1 -0
- package/dist/commands/build/machine.d.ts +212 -0
- package/dist/commands/build/machine.d.ts.map +1 -0
- package/dist/commands/build/types.d.ts +75 -0
- package/dist/commands/build/types.d.ts.map +1 -0
- package/dist/commands/cache.d.ts +32 -0
- package/dist/commands/cache.d.ts.map +1 -0
- package/dist/commands/check/commands/check.d.ts +26 -0
- package/dist/commands/check/commands/check.d.ts.map +1 -0
- package/dist/commands/check/index.d.ts +24 -0
- package/dist/commands/check/index.d.ts.map +1 -0
- package/dist/commands/ci/commands/ci-checks.d.ts +14 -0
- package/dist/commands/ci/commands/ci-checks.d.ts.map +1 -0
- package/dist/commands/ci/commands/ci-layer-content.d.ts +40 -0
- package/dist/commands/ci/commands/ci-layer-content.d.ts.map +1 -0
- package/dist/commands/ci/commands/ci-pr-capabilities.d.ts +30 -0
- package/dist/commands/ci/commands/ci-pr-capabilities.d.ts.map +1 -0
- package/dist/commands/ci/commands/ci-prod-apply.d.ts +10 -0
- package/dist/commands/ci/commands/ci-prod-apply.d.ts.map +1 -0
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts +98 -0
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts.map +1 -0
- package/dist/commands/ci/commands/ci-prod-github.d.ts +28 -0
- package/dist/commands/ci/commands/ci-prod-github.d.ts.map +1 -0
- package/dist/commands/ci/commands/ci-prod-utils.d.ts +33 -0
- package/dist/commands/ci/commands/ci-prod-utils.d.ts.map +1 -0
- package/dist/commands/ci/commands/ci-resolvers.d.ts +71 -0
- package/dist/commands/ci/commands/ci-resolvers.d.ts.map +1 -0
- package/dist/commands/ci/commands/ci-static.d.ts +18 -0
- package/dist/commands/ci/commands/ci-static.d.ts.map +1 -0
- package/dist/commands/ci/commands/ci-supabase-local.d.ts +51 -0
- package/dist/commands/ci/commands/ci-supabase-local.d.ts.map +1 -0
- package/dist/commands/ci/index.d.ts +23 -0
- package/dist/commands/ci/index.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/build/app-build.d.ts +31 -0
- package/dist/commands/ci/machine/actors/build/app-build.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/build/app-start.d.ts +47 -0
- package/dist/commands/ci/machine/actors/build/app-start.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/build/build-and-playwright.d.ts +41 -0
- package/dist/commands/ci/machine/actors/build/build-and-playwright.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/build/index.d.ts +12 -0
- package/dist/commands/ci/machine/actors/build/index.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/build/playwright-install.d.ts +30 -0
- package/dist/commands/ci/machine/actors/build/playwright-install.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/build/static-checks.d.ts +35 -0
- package/dist/commands/ci/machine/actors/build/static-checks.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/db/apply-seeds.d.ts +32 -0
- package/dist/commands/ci/machine/actors/db/apply-seeds.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts +38 -0
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/db/index.d.ts +16 -0
- package/dist/commands/ci/machine/actors/db/index.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/db/pgtap-install.d.ts +33 -0
- package/dist/commands/ci/machine/actors/db/pgtap-install.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/db/production-preview.d.ts +34 -0
- package/dist/commands/ci/machine/actors/db/production-preview.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/db/pull-production.d.ts +35 -0
- package/dist/commands/ci/machine/actors/db/pull-production.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/db/reset.d.ts +31 -0
- package/dist/commands/ci/machine/actors/db/reset.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/db/schema-stats.d.ts +141 -0
- package/dist/commands/ci/machine/actors/db/schema-stats.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/db/setup-roles.d.ts +37 -0
- package/dist/commands/ci/machine/actors/db/setup-roles.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +48 -0
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/finalize/github.d.ts +66 -0
- package/dist/commands/ci/machine/actors/finalize/github.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/finalize/index.d.ts +9 -0
- package/dist/commands/ci/machine/actors/finalize/index.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/finalize/summary.d.ts +32 -0
- package/dist/commands/ci/machine/actors/finalize/summary.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/index.d.ts +17 -0
- package/dist/commands/ci/machine/actors/index.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/setup/index.d.ts +10 -0
- package/dist/commands/ci/machine/actors/setup/index.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/setup/local.d.ts +41 -0
- package/dist/commands/ci/machine/actors/setup/local.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/setup/pr-common.d.ts +145 -0
- package/dist/commands/ci/machine/actors/setup/pr-common.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/setup/pr-local.d.ts +17 -0
- package/dist/commands/ci/machine/actors/setup/pr-local.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/test/capabilities.d.ts +66 -0
- package/dist/commands/ci/machine/actors/test/capabilities.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/test/index.d.ts +9 -0
- package/dist/commands/ci/machine/actors/test/index.d.ts.map +1 -0
- package/dist/commands/ci/machine/actors/test/run-layers.d.ts +43 -0
- package/dist/commands/ci/machine/actors/test/run-layers.d.ts.map +1 -0
- package/dist/commands/ci/machine/commands/ci-local.d.ts +18 -0
- package/dist/commands/ci/machine/commands/ci-local.d.ts.map +1 -0
- package/dist/commands/ci/machine/commands/ci-pr.d.ts +14 -0
- package/dist/commands/ci/machine/commands/ci-pr.d.ts.map +1 -0
- package/dist/commands/ci/machine/commands/index.d.ts +13 -0
- package/dist/commands/ci/machine/commands/index.d.ts.map +1 -0
- package/dist/commands/ci/machine/commands/machine-runner.d.ts +36 -0
- package/dist/commands/ci/machine/commands/machine-runner.d.ts.map +1 -0
- package/dist/commands/ci/machine/contract.d.ts +393 -0
- package/dist/commands/ci/machine/contract.d.ts.map +1 -0
- package/dist/commands/ci/machine/formatters/github-comment-types.d.ts +87 -0
- package/dist/commands/ci/machine/formatters/github-comment-types.d.ts.map +1 -0
- package/dist/commands/ci/machine/formatters/github-comment.d.ts +44 -0
- package/dist/commands/ci/machine/formatters/github-comment.d.ts.map +1 -0
- package/dist/commands/ci/machine/formatters/index.d.ts +13 -0
- package/dist/commands/ci/machine/formatters/index.d.ts.map +1 -0
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts +18 -0
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts.map +1 -0
- package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts +63 -0
- package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts.map +1 -0
- package/dist/commands/ci/machine/formatters/sections/index.d.ts +10 -0
- package/dist/commands/ci/machine/formatters/sections/index.d.ts.map +1 -0
- package/dist/commands/ci/machine/formatters/sections/progress-comment.d.ts +14 -0
- package/dist/commands/ci/machine/formatters/sections/progress-comment.d.ts.map +1 -0
- package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts +25 -0
- package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts.map +1 -0
- package/dist/commands/ci/machine/formatters/summary.d.ts +27 -0
- package/dist/commands/ci/machine/formatters/summary.d.ts.map +1 -0
- package/dist/commands/ci/machine/guards.d.ts +136 -0
- package/dist/commands/ci/machine/guards.d.ts.map +1 -0
- package/dist/commands/ci/machine/helpers.d.ts +88 -0
- package/dist/commands/ci/machine/helpers.d.ts.map +1 -0
- package/dist/commands/ci/machine/index.d.ts +21 -0
- package/dist/commands/ci/machine/index.d.ts.map +1 -0
- package/dist/commands/ci/machine/machine.d.ts +315 -0
- package/dist/commands/ci/machine/machine.d.ts.map +1 -0
- package/dist/commands/ci/machine/types.d.ts +264 -0
- package/dist/commands/ci/machine/types.d.ts.map +1 -0
- package/dist/commands/ci/utils/ai-report.d.ts +70 -0
- package/dist/commands/ci/utils/ai-report.d.ts.map +1 -0
- package/dist/commands/ci/utils/app-process.d.ts +29 -0
- package/dist/commands/ci/utils/app-process.d.ts.map +1 -0
- package/dist/commands/ci/utils/app-runtime.d.ts +27 -0
- package/dist/commands/ci/utils/app-runtime.d.ts.map +1 -0
- package/dist/commands/ci/utils/ci-config.d.ts +22 -0
- package/dist/commands/ci/utils/ci-config.d.ts.map +1 -0
- package/dist/commands/ci/utils/ci-env-schema.d.ts +128 -0
- package/dist/commands/ci/utils/ci-env-schema.d.ts.map +1 -0
- package/dist/commands/ci/utils/ci-logging.d.ts +16 -0
- package/dist/commands/ci/utils/ci-logging.d.ts.map +1 -0
- package/dist/commands/ci/utils/ci-summary.d.ts +109 -0
- package/dist/commands/ci/utils/ci-summary.d.ts.map +1 -0
- package/dist/commands/ci/utils/config-readers.d.ts +46 -0
- package/dist/commands/ci/utils/config-readers.d.ts.map +1 -0
- package/dist/commands/ci/utils/db-url-utils.d.ts +81 -0
- package/dist/commands/ci/utils/db-url-utils.d.ts.map +1 -0
- package/dist/commands/ci/utils/e2e-auth-setup.d.ts +78 -0
- package/dist/commands/ci/utils/e2e-auth-setup.d.ts.map +1 -0
- package/dist/commands/ci/utils/execa-helpers.d.ts +14 -0
- package/dist/commands/ci/utils/execa-helpers.d.ts.map +1 -0
- package/dist/commands/ci/utils/exit-code-computation.d.ts +62 -0
- package/dist/commands/ci/utils/exit-code-computation.d.ts.map +1 -0
- package/dist/commands/ci/utils/github-api.d.ts +54 -0
- package/dist/commands/ci/utils/github-api.d.ts.map +1 -0
- package/dist/commands/ci/utils/github.d.ts +43 -0
- package/dist/commands/ci/utils/github.d.ts.map +1 -0
- package/dist/commands/ci/utils/index.d.ts +25 -0
- package/dist/commands/ci/utils/index.d.ts.map +1 -0
- package/dist/commands/ci/utils/pgtap-installer.d.ts +34 -0
- package/dist/commands/ci/utils/pgtap-installer.d.ts.map +1 -0
- package/dist/commands/ci/utils/rls-verification.d.ts +72 -0
- package/dist/commands/ci/utils/rls-verification.d.ts.map +1 -0
- package/dist/commands/ci/utils/schema-operations.d.ts +42 -0
- package/dist/commands/ci/utils/schema-operations.d.ts.map +1 -0
- package/dist/commands/ci/utils/seed-operations.d.ts +101 -0
- package/dist/commands/ci/utils/seed-operations.d.ts.map +1 -0
- package/dist/commands/ci/utils/test-parallel.d.ts +45 -0
- package/dist/commands/ci/utils/test-parallel.d.ts.map +1 -0
- package/dist/commands/ci/utils/timestamp-invariants.d.ts +13 -0
- package/dist/commands/ci/utils/timestamp-invariants.d.ts.map +1 -0
- package/dist/commands/db/apply/actors.d.ts +42 -0
- package/dist/commands/db/apply/actors.d.ts.map +1 -0
- package/dist/commands/db/apply/contract.d.ts +64 -0
- package/dist/commands/db/apply/contract.d.ts.map +1 -0
- package/dist/commands/db/apply/helpers/advisory-lock.d.ts +18 -0
- package/dist/commands/db/apply/helpers/advisory-lock.d.ts.map +1 -0
- package/dist/commands/db/apply/helpers/index.d.ts +11 -0
- package/dist/commands/db/apply/helpers/index.d.ts.map +1 -0
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts +122 -0
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts.map +1 -0
- package/dist/commands/db/apply/helpers/retry-logic.d.ts +51 -0
- package/dist/commands/db/apply/helpers/retry-logic.d.ts.map +1 -0
- package/dist/commands/db/apply/index.d.ts +9 -0
- package/dist/commands/db/apply/index.d.ts.map +1 -0
- package/dist/commands/db/apply/machine.d.ts +126 -0
- package/dist/commands/db/apply/machine.d.ts.map +1 -0
- package/dist/commands/db/commands/db-apply.d.ts +6 -0
- package/dist/commands/db/commands/db-apply.d.ts.map +1 -0
- package/dist/commands/db/commands/db-audit.d.ts +13 -0
- package/dist/commands/db/commands/db-audit.d.ts.map +1 -0
- package/dist/commands/db/commands/db-backup.d.ts +18 -0
- package/dist/commands/db/commands/db-backup.d.ts.map +1 -0
- package/dist/commands/db/commands/db-cleanup.d.ts +3 -0
- package/dist/commands/db/commands/db-cleanup.d.ts.map +1 -0
- package/dist/commands/db/commands/db-derive-role-passwords.d.ts +18 -0
- package/dist/commands/db/commands/db-derive-role-passwords.d.ts.map +1 -0
- package/dist/commands/db/commands/db-derive-urls.d.ts +14 -0
- package/dist/commands/db/commands/db-derive-urls.d.ts.map +1 -0
- package/dist/commands/db/commands/db-diagram.d.ts +21 -0
- package/dist/commands/db/commands/db-diagram.d.ts.map +1 -0
- package/dist/commands/db/commands/db-drizzle.d.ts +17 -0
- package/dist/commands/db/commands/db-drizzle.d.ts.map +1 -0
- package/dist/commands/db/commands/db-extension.d.ts +16 -0
- package/dist/commands/db/commands/db-extension.d.ts.map +1 -0
- package/dist/commands/db/commands/db-generate-password.d.ts +19 -0
- package/dist/commands/db/commands/db-generate-password.d.ts.map +1 -0
- package/dist/commands/db/commands/db-lifecycle.d.ts +43 -0
- package/dist/commands/db/commands/db-lifecycle.d.ts.map +1 -0
- package/dist/commands/db/commands/db-rollback.d.ts +17 -0
- package/dist/commands/db/commands/db-rollback.d.ts.map +1 -0
- package/dist/commands/db/commands/db-schema.d.ts +51 -0
- package/dist/commands/db/commands/db-schema.d.ts.map +1 -0
- package/dist/commands/db/commands/db-seed-metadata.d.ts +20 -0
- package/dist/commands/db/commands/db-seed-metadata.d.ts.map +1 -0
- package/dist/commands/db/commands/db-seed-verify.d.ts +13 -0
- package/dist/commands/db/commands/db-seed-verify.d.ts.map +1 -0
- package/dist/commands/db/commands/db-seed.d.ts +32 -0
- package/dist/commands/db/commands/db-seed.d.ts.map +1 -0
- package/dist/commands/db/commands/db-snapshot.d.ts +12 -0
- package/dist/commands/db/commands/db-snapshot.d.ts.map +1 -0
- package/dist/commands/db/commands/db-stack.d.ts +17 -0
- package/dist/commands/db/commands/db-stack.d.ts.map +1 -0
- package/dist/commands/db/commands/db-stats.d.ts +15 -0
- package/dist/commands/db/commands/db-stats.d.ts.map +1 -0
- package/dist/commands/db/commands/db-sync.d.ts +3 -0
- package/dist/commands/db/commands/db-sync.d.ts.map +1 -0
- package/dist/commands/db/commands/db-test.d.ts +27 -0
- package/dist/commands/db/commands/db-test.d.ts.map +1 -0
- package/dist/commands/db/constants.d.ts +97 -0
- package/dist/commands/db/constants.d.ts.map +1 -0
- package/dist/commands/db/extension-registry.d.ts +81 -0
- package/dist/commands/db/extension-registry.d.ts.map +1 -0
- package/dist/commands/db/index.d.ts +17 -0
- package/dist/commands/db/index.d.ts.map +1 -0
- package/dist/commands/db/preflight/actors.d.ts +6 -0
- package/dist/commands/db/preflight/actors.d.ts.map +1 -0
- package/dist/commands/db/preflight/contract.d.ts +53 -0
- package/dist/commands/db/preflight/contract.d.ts.map +1 -0
- package/dist/commands/db/preflight/index.d.ts +3 -0
- package/dist/commands/db/preflight/index.d.ts.map +1 -0
- package/dist/commands/db/sync/actors.d.ts +93 -0
- package/dist/commands/db/sync/actors.d.ts.map +1 -0
- package/dist/commands/db/sync/contract.d.ts +155 -0
- package/dist/commands/db/sync/contract.d.ts.map +1 -0
- package/dist/commands/db/sync/index.d.ts +10 -0
- package/dist/commands/db/sync/index.d.ts.map +1 -0
- package/dist/commands/db/sync/machine.d.ts +159 -0
- package/dist/commands/db/sync/machine.d.ts.map +1 -0
- package/dist/commands/db/types.d.ts +107 -0
- package/dist/commands/db/types.d.ts.map +1 -0
- package/dist/commands/db/utils/db-target.d.ts +53 -0
- package/dist/commands/db/utils/db-target.d.ts.map +1 -0
- package/dist/commands/db/utils/db-url-builder.d.ts +34 -0
- package/dist/commands/db/utils/db-url-builder.d.ts.map +1 -0
- package/dist/commands/db/utils/error-handlers.d.ts +17 -0
- package/dist/commands/db/utils/error-handlers.d.ts.map +1 -0
- package/dist/commands/db/utils/preflight-check.d.ts +20 -0
- package/dist/commands/db/utils/preflight-check.d.ts.map +1 -0
- package/dist/commands/db/utils/psql.d.ts +17 -0
- package/dist/commands/db/utils/psql.d.ts.map +1 -0
- package/dist/commands/db/utils/schema-detector.d.ts +32 -0
- package/dist/commands/db/utils/schema-detector.d.ts.map +1 -0
- package/dist/commands/db/utils/schema-sync.d.ts +59 -0
- package/dist/commands/db/utils/schema-sync.d.ts.map +1 -0
- package/dist/commands/db/utils/script-runner.d.ts +34 -0
- package/dist/commands/db/utils/script-runner.d.ts.map +1 -0
- package/dist/commands/db/utils/seed-manager.d.ts +23 -0
- package/dist/commands/db/utils/seed-manager.d.ts.map +1 -0
- package/dist/commands/db/utils/semantic-mapper.d.ts +119 -0
- package/dist/commands/db/utils/semantic-mapper.d.ts.map +1 -0
- package/dist/commands/db/utils/sql-table-extractor.d.ts +56 -0
- package/dist/commands/db/utils/sql-table-extractor.d.ts.map +1 -0
- package/dist/commands/db/utils/stack-detector.d.ts +34 -0
- package/dist/commands/db/utils/stack-detector.d.ts.map +1 -0
- package/dist/commands/db/utils/table-registry.d.ts +112 -0
- package/dist/commands/db/utils/table-registry.d.ts.map +1 -0
- package/dist/commands/dev/actors/index.d.ts +14 -0
- package/dist/commands/dev/actors/index.d.ts.map +1 -0
- package/dist/commands/dev/commands/dev.d.ts +15 -0
- package/dist/commands/dev/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev/contract.d.ts +46 -0
- package/dist/commands/dev/contract.d.ts.map +1 -0
- package/dist/commands/dev/guards.d.ts +26 -0
- package/dist/commands/dev/guards.d.ts.map +1 -0
- package/dist/commands/dev/machine.d.ts +121 -0
- package/dist/commands/dev/machine.d.ts.map +1 -0
- package/dist/commands/dev/types.d.ts +44 -0
- package/dist/commands/dev/types.d.ts.map +1 -0
- package/dist/commands/env/commands/env-check.d.ts +24 -0
- package/dist/commands/env/commands/env-check.d.ts.map +1 -0
- package/dist/commands/env/commands/env-encrypt.d.ts +19 -0
- package/dist/commands/env/commands/env-encrypt.d.ts.map +1 -0
- package/dist/commands/env/commands/env-pull.d.ts +49 -0
- package/dist/commands/env/commands/env-pull.d.ts.map +1 -0
- package/dist/commands/env/commands/env-setup.d.ts +51 -0
- package/dist/commands/env/commands/env-setup.d.ts.map +1 -0
- package/dist/commands/env/commands/env-sync.d.ts +18 -0
- package/dist/commands/env/commands/env-sync.d.ts.map +1 -0
- package/dist/commands/env/commands/setup/action.d.ts +18 -0
- package/dist/commands/env/commands/setup/action.d.ts.map +1 -0
- package/dist/commands/env/commands/setup/auth.d.ts +25 -0
- package/dist/commands/env/commands/setup/auth.d.ts.map +1 -0
- package/dist/commands/env/commands/setup/file-export.d.ts +20 -0
- package/dist/commands/env/commands/setup/file-export.d.ts.map +1 -0
- package/dist/commands/env/commands/setup/github-api.d.ts +17 -0
- package/dist/commands/env/commands/setup/github-api.d.ts.map +1 -0
- package/dist/commands/env/commands/setup/helpers.d.ts +117 -0
- package/dist/commands/env/commands/setup/helpers.d.ts.map +1 -0
- package/dist/commands/env/commands/setup/index.d.ts +16 -0
- package/dist/commands/env/commands/setup/index.d.ts.map +1 -0
- package/dist/commands/env/commands/setup/parsers.d.ts +66 -0
- package/dist/commands/env/commands/setup/parsers.d.ts.map +1 -0
- package/dist/commands/env/commands/setup/prompts.d.ts +41 -0
- package/dist/commands/env/commands/setup/prompts.d.ts.map +1 -0
- package/dist/commands/env/commands/setup/supabase-api.d.ts +30 -0
- package/dist/commands/env/commands/setup/supabase-api.d.ts.map +1 -0
- package/dist/commands/env/commands/setup/types.d.ts +105 -0
- package/dist/commands/env/commands/setup/types.d.ts.map +1 -0
- package/dist/commands/env/commands/setup/vercel-api.d.ts +34 -0
- package/dist/commands/env/commands/setup/vercel-api.d.ts.map +1 -0
- package/dist/commands/env/constants/local-supabase.d.ts +43 -0
- package/dist/commands/env/constants/local-supabase.d.ts.map +1 -0
- package/dist/commands/env/index.d.ts +14 -0
- package/dist/commands/env/index.d.ts.map +1 -0
- package/dist/commands/hotfix/actors.d.ts +88 -0
- package/dist/commands/hotfix/actors.d.ts.map +1 -0
- package/dist/commands/hotfix/commands/hotfix-complete.d.ts +23 -0
- package/dist/commands/hotfix/commands/hotfix-complete.d.ts.map +1 -0
- package/dist/commands/hotfix/commands/hotfix-create.d.ts +23 -0
- package/dist/commands/hotfix/commands/hotfix-create.d.ts.map +1 -0
- package/dist/commands/hotfix/commands/hotfix-deploy.d.ts +23 -0
- package/dist/commands/hotfix/commands/hotfix-deploy.d.ts.map +1 -0
- package/dist/commands/hotfix/commands/hotfix-status.d.ts +20 -0
- package/dist/commands/hotfix/commands/hotfix-status.d.ts.map +1 -0
- package/dist/commands/hotfix/contract.d.ts +219 -0
- package/dist/commands/hotfix/contract.d.ts.map +1 -0
- package/dist/commands/hotfix/index.d.ts +15 -0
- package/dist/commands/hotfix/index.d.ts.map +1 -0
- package/dist/commands/hotfix/machine.d.ts +242 -0
- package/dist/commands/hotfix/machine.d.ts.map +1 -0
- package/dist/commands/hotfix/metadata.d.ts +37 -0
- package/dist/commands/hotfix/metadata.d.ts.map +1 -0
- package/dist/commands/hotfix/utils/hotfix-machine-helper.d.ts +58 -0
- package/dist/commands/hotfix/utils/hotfix-machine-helper.d.ts.map +1 -0
- package/dist/commands/init.d.ts +21 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/inject-test-attrs/action.d.ts +14 -0
- package/dist/commands/inject-test-attrs/action.d.ts.map +1 -0
- package/dist/commands/inject-test-attrs/commands/inject-test-attrs.d.ts +16 -0
- package/dist/commands/inject-test-attrs/commands/inject-test-attrs.d.ts.map +1 -0
- package/dist/commands/inject-test-attrs/contract.d.ts +52 -0
- package/dist/commands/inject-test-attrs/contract.d.ts.map +1 -0
- package/dist/commands/inject-test-attrs/formatter.d.ts +13 -0
- package/dist/commands/inject-test-attrs/formatter.d.ts.map +1 -0
- package/dist/commands/inject-test-attrs/index.d.ts +9 -0
- package/dist/commands/inject-test-attrs/index.d.ts.map +1 -0
- package/dist/commands/inject-test-attrs/manifest-generator.d.ts +21 -0
- package/dist/commands/inject-test-attrs/manifest-generator.d.ts.map +1 -0
- package/dist/commands/inject-test-attrs/processor-utils.d.ts +76 -0
- package/dist/commands/inject-test-attrs/processor-utils.d.ts.map +1 -0
- package/dist/commands/inject-test-attrs/processor.d.ts +35 -0
- package/dist/commands/inject-test-attrs/processor.d.ts.map +1 -0
- package/dist/commands/inject-test-attrs/types.d.ts +48 -0
- package/dist/commands/inject-test-attrs/types.d.ts.map +1 -0
- package/dist/commands/link.d.ts +16 -0
- package/dist/commands/link.d.ts.map +1 -0
- package/dist/commands/manifest/index.d.ts +27 -0
- package/dist/commands/manifest/index.d.ts.map +1 -0
- package/dist/commands/prepare/commands/prepare.d.ts +32 -0
- package/dist/commands/prepare/commands/prepare.d.ts.map +1 -0
- package/dist/commands/prepare/index.d.ts +10 -0
- package/dist/commands/prepare/index.d.ts.map +1 -0
- package/dist/commands/sdk/commands/publish.d.ts +33 -0
- package/dist/commands/sdk/commands/publish.d.ts.map +1 -0
- package/dist/commands/sdk/index.d.ts +14 -0
- package/dist/commands/sdk/index.d.ts.map +1 -0
- package/dist/commands/services/index.d.ts +3 -0
- package/dist/commands/services/index.d.ts.map +1 -0
- package/dist/commands/session/index.d.ts +19 -0
- package/dist/commands/session/index.d.ts.map +1 -0
- package/dist/commands/status.d.ts +13 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/telemetry.d.ts +3 -0
- package/dist/commands/telemetry.d.ts.map +1 -0
- package/dist/commands/template-check/actors/compare.d.ts +18 -0
- package/dist/commands/template-check/actors/compare.d.ts.map +1 -0
- package/dist/commands/template-check/actors/discover.d.ts +18 -0
- package/dist/commands/template-check/actors/discover.d.ts.map +1 -0
- package/dist/commands/template-check/actors/index.d.ts +9 -0
- package/dist/commands/template-check/actors/index.d.ts.map +1 -0
- package/dist/commands/template-check/actors/report.d.ts +44 -0
- package/dist/commands/template-check/actors/report.d.ts.map +1 -0
- package/dist/commands/template-check/commands/template-check.d.ts +17 -0
- package/dist/commands/template-check/commands/template-check.d.ts.map +1 -0
- package/dist/commands/template-check/config.d.ts +100 -0
- package/dist/commands/template-check/config.d.ts.map +1 -0
- package/dist/commands/template-check/contract.d.ts +169 -0
- package/dist/commands/template-check/contract.d.ts.map +1 -0
- package/dist/commands/template-check/index.d.ts +8 -0
- package/dist/commands/template-check/index.d.ts.map +1 -0
- package/dist/commands/template-check/machine.d.ts +91 -0
- package/dist/commands/template-check/machine.d.ts.map +1 -0
- package/dist/commands/template-check/types.d.ts +87 -0
- package/dist/commands/template-check/types.d.ts.map +1 -0
- package/dist/commands/template-check/utils/diff-analyzer.d.ts +40 -0
- package/dist/commands/template-check/utils/diff-analyzer.d.ts.map +1 -0
- package/dist/commands/template-check/utils/normalizer.d.ts +55 -0
- package/dist/commands/template-check/utils/normalizer.d.ts.map +1 -0
- package/dist/commands/template-check/utils/path-mapping.d.ts +43 -0
- package/dist/commands/template-check/utils/path-mapping.d.ts.map +1 -0
- package/dist/commands/test/commands/test-db.d.ts +25 -0
- package/dist/commands/test/commands/test-db.d.ts.map +1 -0
- package/dist/commands/test/commands/test-e2e.d.ts +20 -0
- package/dist/commands/test/commands/test-e2e.d.ts.map +1 -0
- package/dist/commands/test/commands/test-fast.d.ts +21 -0
- package/dist/commands/test/commands/test-fast.d.ts.map +1 -0
- package/dist/commands/test/commands/test-integration.d.ts +3 -0
- package/dist/commands/test/commands/test-integration.d.ts.map +1 -0
- package/dist/commands/test/commands/test-layer.d.ts +8 -0
- package/dist/commands/test/commands/test-layer.d.ts.map +1 -0
- package/dist/commands/test/commands/test-owasp-generate.d.ts +11 -0
- package/dist/commands/test/commands/test-owasp-generate.d.ts.map +1 -0
- package/dist/commands/test/commands/test-service.d.ts +3 -0
- package/dist/commands/test/commands/test-service.d.ts.map +1 -0
- package/dist/commands/test/commands/test-static.d.ts +3 -0
- package/dist/commands/test/commands/test-static.d.ts.map +1 -0
- package/dist/commands/test/commands/test.d.ts +3 -0
- package/dist/commands/test/commands/test.d.ts.map +1 -0
- package/dist/commands/test/index.d.ts +39 -0
- package/dist/commands/test/index.d.ts.map +1 -0
- package/dist/commands/test-gen.d.ts +39 -0
- package/dist/commands/test-gen.d.ts.map +1 -0
- package/dist/commands/ui.d.ts +12 -0
- package/dist/commands/ui.d.ts.map +1 -0
- package/dist/commands/upgrade.d.ts +38 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/validate.d.ts +9 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/vuln-check.d.ts +18 -0
- package/dist/commands/vuln-check.d.ts.map +1 -0
- package/dist/commands/watch.d.ts +21 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/workflow/commands/deploy-production.d.ts +10 -0
- package/dist/commands/workflow/commands/deploy-production.d.ts.map +1 -0
- package/dist/commands/workflow/commands/final-status.d.ts +19 -0
- package/dist/commands/workflow/commands/final-status.d.ts.map +1 -0
- package/dist/commands/workflow/commands/log.d.ts +14 -0
- package/dist/commands/workflow/commands/log.d.ts.map +1 -0
- package/dist/commands/workflow/commands/notify.d.ts +18 -0
- package/dist/commands/workflow/commands/notify.d.ts.map +1 -0
- package/dist/commands/workflow/commands/paths.d.ts +15 -0
- package/dist/commands/workflow/commands/paths.d.ts.map +1 -0
- package/dist/commands/workflow/commands/sync.d.ts +21 -0
- package/dist/commands/workflow/commands/sync.d.ts.map +1 -0
- package/dist/commands/workflow/commands/validate.d.ts +9 -0
- package/dist/commands/workflow/commands/validate.d.ts.map +1 -0
- package/dist/commands/workflow/commands/verify-credentials.d.ts +15 -0
- package/dist/commands/workflow/commands/verify-credentials.d.ts.map +1 -0
- package/dist/commands/workflow/index.d.ts +15 -0
- package/dist/commands/workflow/index.d.ts.map +1 -0
- package/dist/commands/workflow/types.d.ts +87 -0
- package/dist/commands/workflow/types.d.ts.map +1 -0
- package/dist/config/env-files.d.ts +65 -0
- package/dist/config/env-files.d.ts.map +1 -0
- package/dist/config/env.d.ts +131 -0
- package/dist/config/env.d.ts.map +1 -0
- package/dist/constants/versions.d.ts +26 -0
- package/dist/constants/versions.d.ts.map +1 -0
- package/dist/contracts/envelope.d.ts +2 -0
- package/dist/contracts/envelope.d.ts.map +1 -0
- package/dist/errors/catalog.d.ts +461 -0
- package/dist/errors/catalog.d.ts.map +1 -0
- package/dist/errors/exit-codes.d.ts +46 -0
- package/dist/errors/exit-codes.d.ts.map +1 -0
- package/dist/errors/index.d.ts +13 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/incremental/affected-tests.d.ts +29 -0
- package/dist/incremental/affected-tests.d.ts.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36594 -0
- package/dist/internal/machines/index.d.ts +10 -0
- package/dist/internal/machines/index.d.ts.map +1 -0
- package/dist/internal/machines/machine-runner.d.ts +18 -0
- package/dist/internal/machines/machine-runner.d.ts.map +1 -0
- package/dist/internal/machines/types.d.ts +48 -0
- package/dist/internal/machines/types.d.ts.map +1 -0
- package/dist/internal/vuln-checker/analyzers/dependency-analyzer.d.ts +24 -0
- package/dist/internal/vuln-checker/analyzers/dependency-analyzer.d.ts.map +1 -0
- package/dist/internal/vuln-checker/analyzers/rls-analyzer.d.ts +28 -0
- package/dist/internal/vuln-checker/analyzers/rls-analyzer.d.ts.map +1 -0
- package/dist/internal/vuln-checker/analyzers/secret-analyzer.d.ts +26 -0
- package/dist/internal/vuln-checker/analyzers/secret-analyzer.d.ts.map +1 -0
- package/dist/internal/vuln-checker/analyzers/typescript-analyzer.d.ts +25 -0
- package/dist/internal/vuln-checker/analyzers/typescript-analyzer.d.ts.map +1 -0
- package/dist/internal/vuln-checker/config/loader.d.ts +16 -0
- package/dist/internal/vuln-checker/config/loader.d.ts.map +1 -0
- package/dist/internal/vuln-checker/constants.d.ts +75 -0
- package/dist/internal/vuln-checker/constants.d.ts.map +1 -0
- package/dist/internal/vuln-checker/ignore/matcher.d.ts +23 -0
- package/dist/internal/vuln-checker/ignore/matcher.d.ts.map +1 -0
- package/dist/internal/vuln-checker/index.d.ts +45 -0
- package/dist/internal/vuln-checker/index.d.ts.map +1 -0
- package/dist/internal/vuln-checker/reporters/console-reporter.d.ts +9 -0
- package/dist/internal/vuln-checker/reporters/console-reporter.d.ts.map +1 -0
- package/dist/internal/vuln-checker/reporters/json-reporter.d.ts +9 -0
- package/dist/internal/vuln-checker/reporters/json-reporter.d.ts.map +1 -0
- package/dist/internal/vuln-checker/reporters/markdown-reporter.d.ts +9 -0
- package/dist/internal/vuln-checker/reporters/markdown-reporter.d.ts.map +1 -0
- package/dist/internal/vuln-checker/reporters/sarif-reporter.d.ts +12 -0
- package/dist/internal/vuln-checker/reporters/sarif-reporter.d.ts.map +1 -0
- package/dist/internal/vuln-checker/types.d.ts +149 -0
- package/dist/internal/vuln-checker/types.d.ts.map +1 -0
- package/dist/notifiers/desktop-notifier.d.ts +34 -0
- package/dist/notifiers/desktop-notifier.d.ts.map +1 -0
- package/dist/schemas/ci.config.schema.json +206 -0
- package/dist/ui/components/db-panel.d.ts +12 -0
- package/dist/ui/components/db-panel.d.ts.map +1 -0
- package/dist/ui/components/status-bar.d.ts +6 -0
- package/dist/ui/components/status-bar.d.ts.map +1 -0
- package/dist/ui/components/test-panel.d.ts +12 -0
- package/dist/ui/components/test-panel.d.ts.map +1 -0
- package/dist/ui/dashboard.d.ts +20 -0
- package/dist/ui/dashboard.d.ts.map +1 -0
- package/dist/ui/index.d.ts +16 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/utils/config-loader.d.ts +92 -0
- package/dist/utils/config-loader.d.ts.map +1 -0
- package/dist/utils/config-updater.d.ts +44 -0
- package/dist/utils/config-updater.d.ts.map +1 -0
- package/dist/utils/diagnostics.d.ts +44 -0
- package/dist/utils/diagnostics.d.ts.map +1 -0
- package/dist/utils/dotenvx.d.ts +33 -0
- package/dist/utils/dotenvx.d.ts.map +1 -0
- package/dist/utils/execution-plan.d.ts +43 -0
- package/dist/utils/execution-plan.d.ts.map +1 -0
- package/dist/utils/help-system.d.ts +34 -0
- package/dist/utils/help-system.d.ts.map +1 -0
- package/dist/utils/license/admin-auth.d.ts +39 -0
- package/dist/utils/license/admin-auth.d.ts.map +1 -0
- package/dist/utils/license/allowlist-checker.d.ts +56 -0
- package/dist/utils/license/allowlist-checker.d.ts.map +1 -0
- package/dist/utils/license/ci-detector.d.ts +43 -0
- package/dist/utils/license/ci-detector.d.ts.map +1 -0
- package/dist/utils/license/index.d.ts +49 -0
- package/dist/utils/license/index.d.ts.map +1 -0
- package/dist/utils/license/owner-resolver.d.ts +35 -0
- package/dist/utils/license/owner-resolver.d.ts.map +1 -0
- package/dist/utils/license/types.d.ts +42 -0
- package/dist/utils/license/types.d.ts.map +1 -0
- package/dist/utils/license/validate-owner.d.ts +33 -0
- package/dist/utils/license/validate-owner.d.ts.map +1 -0
- package/dist/utils/port-allocator.d.ts +59 -0
- package/dist/utils/port-allocator.d.ts.map +1 -0
- package/dist/utils/secure-exec.d.ts +95 -0
- package/dist/utils/secure-exec.d.ts.map +1 -0
- package/dist/utils/template-fetcher.d.ts +63 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -0
- package/dist/utils/type-guards.d.ts +25 -0
- package/dist/utils/type-guards.d.ts.map +1 -0
- package/dist/utils/vercel-project.d.ts +38 -0
- package/dist/utils/vercel-project.d.ts.map +1 -0
- package/dist/utils/workspace-detector.d.ts +71 -0
- package/dist/utils/workspace-detector.d.ts.map +1 -0
- package/dist/validators/risk-detector.d.ts +38 -0
- package/dist/validators/risk-detector.d.ts.map +1 -0
- package/dist/validators/schema-validator.d.ts +20 -0
- package/dist/validators/schema-validator.d.ts.map +1 -0
- package/dist/version.d.ts +13 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/watchers/schema-watcher.d.ts +61 -0
- package/dist/watchers/schema-watcher.d.ts.map +1 -0
- package/dist/watchers/test-watcher.d.ts +57 -0
- package/dist/watchers/test-watcher.d.ts.map +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Allowlist API Checker
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Check CI access allowlist via API
|
|
5
|
+
* Pattern: HTTP fetch with caching + last-known-good fallback
|
|
6
|
+
*
|
|
7
|
+
* Design decisions:
|
|
8
|
+
* - 4-hour cache TTL (fast revocation response)
|
|
9
|
+
* - Last-known-good fallback on API errors (persisted 24h)
|
|
10
|
+
* - Timeout to prevent hanging CI
|
|
11
|
+
*
|
|
12
|
+
* Fail-open strategy:
|
|
13
|
+
* - API available: Use live response, cache result
|
|
14
|
+
* - API error + cached result exists: Use cached result (last-known-good)
|
|
15
|
+
* - API error + no cached result: Throw error (fail closed for new orgs)
|
|
16
|
+
*
|
|
17
|
+
* This prevents both:
|
|
18
|
+
* 1. Blocking legitimate users due to API outages (last-known-good)
|
|
19
|
+
* 2. Allowing unauthorized access during outages (no cache = fail closed)
|
|
20
|
+
*
|
|
21
|
+
* SECURITY (Issue #376):
|
|
22
|
+
* - URL validation prevents SSRF attacks
|
|
23
|
+
* - Only HTTPS allowed (except localhost for testing)
|
|
24
|
+
* - Internal network addresses blocked (127.0.0.0/8, 10.0.0.0/8, etc.)
|
|
25
|
+
* - Cloud metadata endpoints blocked (169.254.169.254)
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Check if an owner is in the allowlist
|
|
29
|
+
*
|
|
30
|
+
* Strategy:
|
|
31
|
+
* 1. Check cache (within 4h TTL) → return cached result
|
|
32
|
+
* 2. Try API → cache result, return
|
|
33
|
+
* 3. API failed + last-known-good (within 24h) → return cached result
|
|
34
|
+
* 4. API failed + no cache → throw error (fail closed)
|
|
35
|
+
*
|
|
36
|
+
* @param owner - GitHub organization or user name
|
|
37
|
+
* @returns true if allowed, false otherwise
|
|
38
|
+
* @throws Error on API failure WITH no last-known-good fallback
|
|
39
|
+
*/
|
|
40
|
+
export declare function checkAllowlist(owner: string): Promise<boolean>;
|
|
41
|
+
/**
|
|
42
|
+
* Clear the allowlist cache
|
|
43
|
+
*
|
|
44
|
+
* @internal For testing purposes
|
|
45
|
+
*/
|
|
46
|
+
export declare function clearAllowlistCache(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Get cache stats
|
|
49
|
+
*
|
|
50
|
+
* @internal For debugging purposes
|
|
51
|
+
*/
|
|
52
|
+
export declare function getAllowlistCacheStats(): {
|
|
53
|
+
size: number;
|
|
54
|
+
entries: string[];
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=allowlist-checker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allowlist-checker.d.ts","sourceRoot":"","sources":["../../../src/utils/license/allowlist-checker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AA6KH;;;;;;;;;;;;GAYG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAmEpE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAK5E"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: CI Environment Detection
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Detect if running in CI environment and identify provider
|
|
5
|
+
* Pattern: Check common CI environment variables
|
|
6
|
+
*
|
|
7
|
+
* Supported providers:
|
|
8
|
+
* - GitHub Actions
|
|
9
|
+
* - GitLab CI
|
|
10
|
+
* - CircleCI
|
|
11
|
+
* - Jenkins
|
|
12
|
+
* - Travis CI
|
|
13
|
+
* - Bitbucket Pipelines
|
|
14
|
+
* - Azure Pipelines
|
|
15
|
+
* - AWS CodeBuild
|
|
16
|
+
* - Google Cloud Build
|
|
17
|
+
* - Vercel
|
|
18
|
+
* - Netlify
|
|
19
|
+
*/
|
|
20
|
+
import type { CIDetectionResult } from './types.js';
|
|
21
|
+
/**
|
|
22
|
+
* Detect if running in CI environment
|
|
23
|
+
*
|
|
24
|
+
* Checks:
|
|
25
|
+
* 1. Generic CI=true environment variable
|
|
26
|
+
* 2. Provider-specific environment variables
|
|
27
|
+
*
|
|
28
|
+
* @returns true if running in CI
|
|
29
|
+
*/
|
|
30
|
+
export declare function isCI(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Detect the specific CI provider
|
|
33
|
+
*
|
|
34
|
+
* @returns Provider name or undefined if not detected
|
|
35
|
+
*/
|
|
36
|
+
export declare function detectCIProvider(): string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Full CI detection with provider info
|
|
39
|
+
*
|
|
40
|
+
* @returns Detection result with isCI flag and optional provider
|
|
41
|
+
*/
|
|
42
|
+
export declare function detectCI(): CIDetectionResult;
|
|
43
|
+
//# sourceMappingURL=ci-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci-detector.d.ts","sourceRoot":"","sources":["../../../src/utils/license/ci-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAyCpD;;;;;;;;GAQG;AACH,wBAAgB,IAAI,IAAI,OAAO,CAc9B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAarD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI,iBAAiB,CAM5C"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: License Enforcement Module
|
|
3
|
+
*
|
|
4
|
+
* Purpose: CI access control for runa CLI
|
|
5
|
+
* Pattern: Allowlist model with trusted org (r06-dev) always allowed
|
|
6
|
+
*
|
|
7
|
+
* Design decisions:
|
|
8
|
+
* - r06-dev: Instant allow, NO API call, NO log (zero-impact)
|
|
9
|
+
* - External org: API check via allowlist with last-known-good fallback
|
|
10
|
+
* - Fail-open strategy:
|
|
11
|
+
* - API available: Use live response
|
|
12
|
+
* - API error + cached: Use last-known-good (24h window)
|
|
13
|
+
* - API error + no cache: Fail closed (new orgs blocked during outage)
|
|
14
|
+
* - Escape hatch: RUNA_SKIP_LICENSE_CHECK=1 bypasses all checks
|
|
15
|
+
*
|
|
16
|
+
* Security model:
|
|
17
|
+
* - Known orgs protected during outages (last-known-good)
|
|
18
|
+
* - Unknown orgs cannot bypass by causing outages (fail closed)
|
|
19
|
+
*/
|
|
20
|
+
import type { LicenseCheckResult } from './types.js';
|
|
21
|
+
/**
|
|
22
|
+
* Perform license check and return result
|
|
23
|
+
*
|
|
24
|
+
* @internal Used by enforceLicenseInCI()
|
|
25
|
+
*/
|
|
26
|
+
export declare function checkLicense(): Promise<LicenseCheckResult>;
|
|
27
|
+
/**
|
|
28
|
+
* Enforce license check in CI environments
|
|
29
|
+
*
|
|
30
|
+
* Call this at CLI startup to enforce access control.
|
|
31
|
+
*
|
|
32
|
+
* Behavior:
|
|
33
|
+
* - Local dev: Skip silently
|
|
34
|
+
* - r06-dev: Skip silently (no API, no log)
|
|
35
|
+
* - External org in allowlist: Allow (with 4h cache)
|
|
36
|
+
* - External org NOT in allowlist: Throw CLIError
|
|
37
|
+
* - API error + last-known-good: Use cached result (24h window)
|
|
38
|
+
* - API error + no cache: Block (fail closed for unknown orgs)
|
|
39
|
+
*
|
|
40
|
+
* @throws CLIError when access is denied
|
|
41
|
+
*/
|
|
42
|
+
export declare function enforceLicenseInCI(): Promise<void>;
|
|
43
|
+
export type { LicenseCheckResult, OwnerResolutionResult, CIDetectionResult } from './types.js';
|
|
44
|
+
export { isCI, detectCI, detectCIProvider } from './ci-detector.js';
|
|
45
|
+
export { resolveGitHubOwner } from './owner-resolver.js';
|
|
46
|
+
export { checkAllowlist, clearAllowlistCache, getAllowlistCacheStats, } from './allowlist-checker.js';
|
|
47
|
+
export { validateOwner, isValidOwner } from './validate-owner.js';
|
|
48
|
+
export { verifyAdminAuth, getGitHubUserEmail, clearAdminAuthCache } from './admin-auth.js';
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/license/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAerD;;;;GAIG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAoDhE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAMxD;AAGD,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: GitHub Owner Resolution
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Resolve GitHub organization/user from CI environment
|
|
5
|
+
* Pattern: Try multiple sources in priority order
|
|
6
|
+
*
|
|
7
|
+
* SECURITY (Issue #375):
|
|
8
|
+
* - Git remote URL is PRIORITIZED over environment variables
|
|
9
|
+
* - Environment variables can be spoofed; git remote requires repo access
|
|
10
|
+
* - When using CI env vars, we verify the corresponding CI provider flag is set
|
|
11
|
+
* - This prevents GITHUB_REPOSITORY spoofing without GITHUB_ACTIONS=true
|
|
12
|
+
*
|
|
13
|
+
* Resolution methods (in order):
|
|
14
|
+
* 1. Git remote: Parse origin URL (MOST TRUSTWORTHY)
|
|
15
|
+
* 2. GitHub Actions: GITHUB_REPOSITORY env var (requires GITHUB_ACTIONS=true)
|
|
16
|
+
* 3. GitLab CI: CI_PROJECT_PATH env var (requires GITLAB_CI=true)
|
|
17
|
+
* 4. CircleCI: CIRCLE_PROJECT_USERNAME env var (requires CIRCLECI=true)
|
|
18
|
+
*/
|
|
19
|
+
import type { OwnerResolutionResult } from './types.js';
|
|
20
|
+
/**
|
|
21
|
+
* Resolve GitHub owner from CI environment or git remote
|
|
22
|
+
*
|
|
23
|
+
* SECURITY (Issue #375): Git remote is prioritized over environment variables
|
|
24
|
+
* because it cannot be spoofed without actual repository access.
|
|
25
|
+
*
|
|
26
|
+
* Tries multiple sources in priority order:
|
|
27
|
+
* 1. Git remote origin URL (MOST TRUSTWORTHY - requires repo access)
|
|
28
|
+
* 2. GitHub Actions GITHUB_REPOSITORY (requires GITHUB_ACTIONS=true)
|
|
29
|
+
* 3. GitLab CI CI_PROJECT_PATH (requires GITLAB_CI=true)
|
|
30
|
+
* 4. CircleCI CIRCLE_PROJECT_USERNAME (requires CIRCLECI=true)
|
|
31
|
+
*
|
|
32
|
+
* @returns Owner resolution result or null if not found
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveGitHubOwner(): Promise<OwnerResolutionResult | null>;
|
|
35
|
+
//# sourceMappingURL=owner-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owner-resolver.d.ts","sourceRoot":"","sources":["../../../src/utils/license/owner-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAuHxD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAsBhF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: License Check Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Type definitions for CI access control
|
|
5
|
+
* Pattern: Allowlist model - r06-dev always allowed, others checked via API
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Result of CI environment detection
|
|
9
|
+
*/
|
|
10
|
+
export interface CIDetectionResult {
|
|
11
|
+
/** Whether running in CI environment */
|
|
12
|
+
isCI: boolean;
|
|
13
|
+
/** Detected CI provider name (e.g., 'github-actions', 'gitlab-ci') */
|
|
14
|
+
provider?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Result of GitHub owner resolution
|
|
18
|
+
*/
|
|
19
|
+
export interface OwnerResolutionResult {
|
|
20
|
+
/** GitHub organization or user name */
|
|
21
|
+
owner: string;
|
|
22
|
+
/** Repository name (optional) */
|
|
23
|
+
repo?: string;
|
|
24
|
+
/** Resolution method used */
|
|
25
|
+
source: 'github-env' | 'gitlab-env' | 'git-remote' | 'circleci-env';
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Result of license check
|
|
29
|
+
*/
|
|
30
|
+
export interface LicenseCheckResult {
|
|
31
|
+
/** Whether access is allowed */
|
|
32
|
+
allowed: boolean;
|
|
33
|
+
/** Reason for the decision */
|
|
34
|
+
reason: LicenseCheckReason;
|
|
35
|
+
/** Resolved owner (if available) */
|
|
36
|
+
owner?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Reasons for license check decisions
|
|
40
|
+
*/
|
|
41
|
+
export type LicenseCheckReason = 'not-ci' | 'trusted-org' | 'allowlist' | 'not-found' | 'error' | 'skip-flag';
|
|
42
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/license/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,MAAM,EAAE,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,cAAc,CAAC;CACrE;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,8BAA8B;IAC9B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,aAAa,GACb,WAAW,GACX,WAAW,GACX,OAAO,GACP,WAAW,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: GitHub Owner Validation
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Validate GitHub organization/user name format
|
|
5
|
+
* Pattern: Shared validation utility for allowlist operations
|
|
6
|
+
*
|
|
7
|
+
* GitHub username rules:
|
|
8
|
+
* - 1-39 characters (we use 100 for flexibility with enterprise)
|
|
9
|
+
* - Alphanumeric and hyphens only
|
|
10
|
+
* - Cannot start or end with hyphen
|
|
11
|
+
* - Case-insensitive
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Validate GitHub owner format
|
|
15
|
+
*
|
|
16
|
+
* @param owner - GitHub organization or user name
|
|
17
|
+
* @throws CLIError if owner format is invalid
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* validateOwner('acme-corp'); // OK
|
|
21
|
+
* validateOwner('myorg'); // OK
|
|
22
|
+
* validateOwner('-invalid'); // Throws
|
|
23
|
+
* validateOwner(''); // Throws
|
|
24
|
+
*/
|
|
25
|
+
export declare function validateOwner(owner: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Check if owner format is valid without throwing
|
|
28
|
+
*
|
|
29
|
+
* @param owner - GitHub organization or user name
|
|
30
|
+
* @returns true if valid, false otherwise
|
|
31
|
+
*/
|
|
32
|
+
export declare function isValidOwner(owner: string): boolean;
|
|
33
|
+
//# sourceMappingURL=validate-owner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-owner.d.ts","sourceRoot":"","sources":["../../../src/utils/license/validate-owner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAeH;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAkBjD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAKnD"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Dynamic port allocation for Supabase local development
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Prevent port conflicts when running multiple pj-repos simultaneously.
|
|
5
|
+
* Since pj-repos cannot share state, we use a deterministic hash-based approach
|
|
6
|
+
* where the project path determines the port offset.
|
|
7
|
+
*
|
|
8
|
+
* Port ranges (10 ports per slot, 100 slots):
|
|
9
|
+
* Slot 0: 54321-54330
|
|
10
|
+
* Slot 1: 54331-54340
|
|
11
|
+
* ...
|
|
12
|
+
* Slot 99: 55311-55320
|
|
13
|
+
*
|
|
14
|
+
* Port assignments within a slot:
|
|
15
|
+
* +0: API (Kong gateway)
|
|
16
|
+
* +1: DB (PostgreSQL)
|
|
17
|
+
* +2: Studio
|
|
18
|
+
* +3: Inbucket (email testing)
|
|
19
|
+
* +4: JWT verification
|
|
20
|
+
* +5: Auth
|
|
21
|
+
* +6: REST (PostgREST)
|
|
22
|
+
* +7: Realtime
|
|
23
|
+
* +8: Storage
|
|
24
|
+
* +9: Reserved
|
|
25
|
+
*/
|
|
26
|
+
export interface SupabasePorts {
|
|
27
|
+
api: number;
|
|
28
|
+
db: number;
|
|
29
|
+
studio: number;
|
|
30
|
+
inbucket: number;
|
|
31
|
+
auth: number;
|
|
32
|
+
rest: number;
|
|
33
|
+
realtime: number;
|
|
34
|
+
storage: number;
|
|
35
|
+
shadow: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Calculate port offset from project path using MD5 hash.
|
|
39
|
+
* Same path always produces same offset (deterministic).
|
|
40
|
+
*/
|
|
41
|
+
export declare function calculatePortOffset(projectPath: string): number;
|
|
42
|
+
/**
|
|
43
|
+
* Get Supabase ports for a project based on its path.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getSupabasePorts(projectPath: string): SupabasePorts;
|
|
46
|
+
/**
|
|
47
|
+
* Update supabase/config.toml with allocated ports.
|
|
48
|
+
* Preserves other settings and comments.
|
|
49
|
+
*/
|
|
50
|
+
export declare function updateSupabaseConfigPorts(projectPath: string): {
|
|
51
|
+
updated: boolean;
|
|
52
|
+
ports: SupabasePorts;
|
|
53
|
+
configPath: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Get a human-readable summary of port allocation.
|
|
57
|
+
*/
|
|
58
|
+
export declare function getPortAllocationSummary(projectPath: string): string;
|
|
59
|
+
//# sourceMappingURL=port-allocator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"port-allocator.d.ts","sourceRoot":"","sources":["../../src/utils/port-allocator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAUH,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAI/D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,CAenE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG;IAC9D,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB,CAwCA;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAYpE"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Secure Binary Execution Utility
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Prevent PATH manipulation attacks by resolving and validating binary paths
|
|
5
|
+
* Security: Resolves binary paths once, caches results, validates before execution
|
|
6
|
+
*
|
|
7
|
+
* Pattern:
|
|
8
|
+
* 1. Resolve binary path using `which` command (or platform equivalent)
|
|
9
|
+
* 2. Cache resolved paths for performance
|
|
10
|
+
* 3. Validate binary exists and is executable before use
|
|
11
|
+
* 4. Use absolute path in execa calls
|
|
12
|
+
*
|
|
13
|
+
* @see Issue #380 - User-controlled path binary execution vulnerability
|
|
14
|
+
*/
|
|
15
|
+
import { type Options as ExecaOptions, type ResultPromise } from 'execa';
|
|
16
|
+
/**
|
|
17
|
+
* Known trusted binaries that the CLI may execute.
|
|
18
|
+
* Only binaries in this list can be resolved and executed.
|
|
19
|
+
*/
|
|
20
|
+
export declare const TRUSTED_BINARIES: readonly ["node", "pnpm", "npm", "npx", "git", "gh", "vercel", "supabase", "docker", "psql", "turbo", "biome", "lsof", "runa"];
|
|
21
|
+
export type TrustedBinary = (typeof TRUSTED_BINARIES)[number];
|
|
22
|
+
/**
|
|
23
|
+
* Clear the binary path cache.
|
|
24
|
+
* Useful for testing or when PATH changes.
|
|
25
|
+
*/
|
|
26
|
+
export declare function clearBinaryPathCache(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Resolve a binary name to its absolute path.
|
|
29
|
+
*
|
|
30
|
+
* SECURITY:
|
|
31
|
+
* - Only resolves binaries in the TRUSTED_BINARIES list
|
|
32
|
+
* - Uses PATH environment variable for resolution
|
|
33
|
+
* - Validates the resolved path is executable
|
|
34
|
+
* - Caches results with TTL to prevent repeated lookups
|
|
35
|
+
*
|
|
36
|
+
* @throws Error if binary is not trusted or not found
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveBinaryPath(binaryName: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Check if a binary is available without throwing.
|
|
41
|
+
*/
|
|
42
|
+
export declare function isBinaryAvailable(binaryName: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Execute a trusted binary with resolved absolute path.
|
|
45
|
+
*
|
|
46
|
+
* SECURITY: This function:
|
|
47
|
+
* 1. Validates the binary is in the trusted list
|
|
48
|
+
* 2. Resolves the absolute path (not relying on shell PATH)
|
|
49
|
+
* 3. Validates the path is executable
|
|
50
|
+
* 4. Passes the absolute path to execa
|
|
51
|
+
*
|
|
52
|
+
* @param binaryName - Name of the trusted binary to execute
|
|
53
|
+
* @param args - Arguments to pass to the binary
|
|
54
|
+
* @param options - execa options
|
|
55
|
+
* @returns execa result promise
|
|
56
|
+
*/
|
|
57
|
+
export declare function secureExeca(binaryName: TrustedBinary, args?: readonly string[], options?: ExecaOptions): ResultPromise;
|
|
58
|
+
/**
|
|
59
|
+
* Execute a command relative to node_modules/.bin
|
|
60
|
+
* This is for locally installed packages.
|
|
61
|
+
*
|
|
62
|
+
* SECURITY: Only executes from the project's node_modules/.bin directory.
|
|
63
|
+
*/
|
|
64
|
+
export declare function secureExecaLocal(binaryName: string, args?: readonly string[], options?: ExecaOptions & {
|
|
65
|
+
cwd?: string;
|
|
66
|
+
}): ResultPromise;
|
|
67
|
+
/**
|
|
68
|
+
* Execute pnpm with secure path resolution.
|
|
69
|
+
*/
|
|
70
|
+
export declare function securePnpm(args?: readonly string[], options?: ExecaOptions): ResultPromise;
|
|
71
|
+
/**
|
|
72
|
+
* Execute git with secure path resolution.
|
|
73
|
+
*/
|
|
74
|
+
export declare function secureGit(args?: readonly string[], options?: ExecaOptions): ResultPromise;
|
|
75
|
+
/**
|
|
76
|
+
* Execute gh (GitHub CLI) with secure path resolution.
|
|
77
|
+
*/
|
|
78
|
+
export declare function secureGh(args?: readonly string[], options?: ExecaOptions): ResultPromise;
|
|
79
|
+
/**
|
|
80
|
+
* Execute vercel with secure path resolution.
|
|
81
|
+
*/
|
|
82
|
+
export declare function secureVercel(args?: readonly string[], options?: ExecaOptions): ResultPromise;
|
|
83
|
+
/**
|
|
84
|
+
* Execute supabase with secure path resolution.
|
|
85
|
+
*/
|
|
86
|
+
export declare function secureSupabase(args?: readonly string[], options?: ExecaOptions): ResultPromise;
|
|
87
|
+
/**
|
|
88
|
+
* Execute docker with secure path resolution.
|
|
89
|
+
*/
|
|
90
|
+
export declare function secureDocker(args?: readonly string[], options?: ExecaOptions): ResultPromise;
|
|
91
|
+
/**
|
|
92
|
+
* Execute psql with secure path resolution.
|
|
93
|
+
*/
|
|
94
|
+
export declare function securePsql(args?: readonly string[], options?: ExecaOptions): ResultPromise;
|
|
95
|
+
//# sourceMappingURL=secure-exec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-exec.d.ts","sourceRoot":"","sources":["../../src/utils/secure-exec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EAAE,KAAK,OAAO,IAAI,YAAY,EAAE,KAAK,aAAa,EAAS,MAAM,OAAO,CAAC;AAMhF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,gIAenB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAgB9D;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AA+CD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAuC5D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAO7D;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,aAAa,EACzB,IAAI,GAAE,SAAS,MAAM,EAAO,EAC5B,OAAO,CAAC,EAAE,YAAY,GACrB,aAAa,CAGf;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE,SAAS,MAAM,EAAO,EAC5B,OAAO,CAAC,EAAE,YAAY,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACxC,aAAa,CAaf;AAMD;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAE9F;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAE7F;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAE5F;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAEhG;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,IAAI,GAAE,SAAS,MAAM,EAAO,EAC5B,OAAO,CAAC,EAAE,YAAY,GACrB,aAAa,CAEf;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAEhG;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAE9F"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Template Fetcher Utility
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Fetch templates from @r06-dev/runa-templates (GitHub Packages)
|
|
5
|
+
* Used by: init.ts, upgrade.ts (Admin commands only)
|
|
6
|
+
*
|
|
7
|
+
* Authentication Flow:
|
|
8
|
+
* ┌─────────────────────────────────────────────────────────────────┐
|
|
9
|
+
* │ 1. Check workspace (runa-repo development) │
|
|
10
|
+
* │ └─ Found → Use local packages/runa-templates/ (no auth) │
|
|
11
|
+
* │ │
|
|
12
|
+
* │ 2. Try auto-detect NODE_AUTH_TOKEN │
|
|
13
|
+
* │ ├─ Already set → Continue │
|
|
14
|
+
* │ └─ Not set → Try `gh auth token` command │
|
|
15
|
+
* │ ├─ Success → Set NODE_AUTH_TOKEN and continue │
|
|
16
|
+
* │ └─ Fail → CLIError with setup instructions │
|
|
17
|
+
* │ │
|
|
18
|
+
* │ 3. Check cache (~/.cache/runa/templates/{version}/) │
|
|
19
|
+
* │ └─ Hit → Return cached path (no network) │
|
|
20
|
+
* │ │
|
|
21
|
+
* │ 4. Fetch from GitHub Packages │
|
|
22
|
+
* │ └─ Success → Cache and return path │
|
|
23
|
+
* └─────────────────────────────────────────────────────────────────┘
|
|
24
|
+
*
|
|
25
|
+
* Token Sources (precedence order):
|
|
26
|
+
* 1. NODE_AUTH_TOKEN env var (explicit)
|
|
27
|
+
* 2. `gh auth token` command (GitHub CLI auto-detection)
|
|
28
|
+
* 3. Manual PAT creation (fallback instructions in error)
|
|
29
|
+
*
|
|
30
|
+
* Cache Location: ~/.cache/runa/templates/{version}/templates/
|
|
31
|
+
* Cache Invalidation: --fresh flag or version change
|
|
32
|
+
*/
|
|
33
|
+
export interface FetchTemplatesOptions {
|
|
34
|
+
/** Templates version to fetch (default: COMPATIBLE_TEMPLATES_VERSION) */
|
|
35
|
+
version?: string;
|
|
36
|
+
/** Clear cache and re-fetch */
|
|
37
|
+
fresh?: boolean;
|
|
38
|
+
/** Show verbose output */
|
|
39
|
+
verbose?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface FetchTemplatesResult {
|
|
42
|
+
/** Path to the fetched templates directory */
|
|
43
|
+
templatesDir: string;
|
|
44
|
+
/** Version that was fetched */
|
|
45
|
+
version: string;
|
|
46
|
+
/** Whether templates were served from cache */
|
|
47
|
+
cached: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Fetch templates from GitHub Packages.
|
|
51
|
+
*
|
|
52
|
+
* SECURITY: Token handling is scoped to this operation only.
|
|
53
|
+
* Auto-detected tokens are cleaned up after fetch completes.
|
|
54
|
+
*
|
|
55
|
+
* @param options - Fetch options
|
|
56
|
+
* @returns Path to templates directory and metadata
|
|
57
|
+
*/
|
|
58
|
+
export declare function fetchTemplates(options?: FetchTemplatesOptions): Promise<FetchTemplatesResult>;
|
|
59
|
+
/**
|
|
60
|
+
* Clear templates cache.
|
|
61
|
+
*/
|
|
62
|
+
export declare function clearTemplatesCache(): Promise<void>;
|
|
63
|
+
//# sourceMappingURL=template-fetcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-fetcher.d.ts","sourceRoot":"","sources":["../../src/utils/template-fetcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAcH,MAAM,WAAW,qBAAqB;IACpC,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,MAAM,EAAE,OAAO,CAAC;CACjB;AA6MD;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,oBAAoB,CAAC,CAgF/B;AAkCD;;GAEG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAKzD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Common type guards for CLI
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Reusable type guards shared across commands
|
|
5
|
+
* Design: Pure functions, no dependencies
|
|
6
|
+
*/
|
|
7
|
+
import type { Ora } from 'ora';
|
|
8
|
+
/**
|
|
9
|
+
* Execa error structure
|
|
10
|
+
*/
|
|
11
|
+
export interface ExecaError extends Error {
|
|
12
|
+
stdout?: string;
|
|
13
|
+
stderr?: string;
|
|
14
|
+
exitCode?: number;
|
|
15
|
+
command?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Type guard for ExecaError
|
|
19
|
+
*/
|
|
20
|
+
export declare function isExecaError(error: unknown): error is ExecaError;
|
|
21
|
+
/**
|
|
22
|
+
* Type guard for spinner (Ora instance)
|
|
23
|
+
*/
|
|
24
|
+
export declare function isSpinner(spinner: unknown): spinner is Ora;
|
|
25
|
+
//# sourceMappingURL=type-guards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-guards.d.ts","sourceRoot":"","sources":["../../src/utils/type-guards.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,KAAK;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,GAAG,CAQ1D"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Vercel Project Information Helper
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Fetch Vercel project settings (Root Directory, etc.) via CLI
|
|
5
|
+
* Design: Uses `vercel project inspect` output parsing
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* const info = await getVercelProjectInfo();
|
|
9
|
+
* // info.rootDirectory = 'apps/dashboard'
|
|
10
|
+
*
|
|
11
|
+
* Requirements:
|
|
12
|
+
* - Vercel CLI installed
|
|
13
|
+
* - Vercel authentication (vercel login or VERCEL_TOKEN)
|
|
14
|
+
* - Linked project (.vercel/project.json or VERCEL_PROJECT_ID)
|
|
15
|
+
*/
|
|
16
|
+
export interface VercelProjectInfo {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
owner: string;
|
|
20
|
+
rootDirectory: string | null;
|
|
21
|
+
nodeVersion: string | null;
|
|
22
|
+
frameworkPreset: string | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get Vercel project information via CLI
|
|
26
|
+
*
|
|
27
|
+
* @returns Project info or null if not available
|
|
28
|
+
*/
|
|
29
|
+
export declare function getVercelProjectInfo(): Promise<VercelProjectInfo | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Get Vercel project root directory
|
|
32
|
+
*
|
|
33
|
+
* Convenience function for common use case
|
|
34
|
+
*
|
|
35
|
+
* @returns Root directory path (e.g., 'apps/dashboard') or null
|
|
36
|
+
*/
|
|
37
|
+
export declare function getVercelRootDirectory(): Promise<string | null>;
|
|
38
|
+
//# sourceMappingURL=vercel-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vercel-project.d.ts","sourceRoot":"","sources":["../../src/utils/vercel-project.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAkB9E;AA4ED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAGrE"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Workspace and package detection utility
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Smart detection of workspace structure and package locations
|
|
5
|
+
* Design: Zero-config, works in both runa-repo (workspace) and pj-repo (npm installed)
|
|
6
|
+
*
|
|
7
|
+
* Key Features:
|
|
8
|
+
* - Finds workspace root by looking for workspace markers (uses @runa-ai/runa)
|
|
9
|
+
* - Locates packages by name without hardcoded paths
|
|
10
|
+
* - Detects environment (runa-repo vs pj-repo)
|
|
11
|
+
* - Falls back gracefully to conventions
|
|
12
|
+
*
|
|
13
|
+
* Security Features (Issue #383):
|
|
14
|
+
* - Package name validation (no path traversal sequences)
|
|
15
|
+
* - Path boundary validation (resolved paths must be within workspace)
|
|
16
|
+
* - Pattern validation for workspace yaml
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Environment type detection
|
|
20
|
+
*/
|
|
21
|
+
export type Environment = 'runa-repo' | 'pj-repo' | 'unknown';
|
|
22
|
+
/**
|
|
23
|
+
* Find workspace root by looking up the directory tree
|
|
24
|
+
* Uses @runa-ai/runa implementation with stopAtGitRoot option
|
|
25
|
+
*
|
|
26
|
+
* @param from - Starting directory (defaults to cwd)
|
|
27
|
+
* @returns Workspace root path or null if not in workspace
|
|
28
|
+
*/
|
|
29
|
+
export declare function findWorkspaceRoot(from?: string): string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Find package directory by name
|
|
32
|
+
*
|
|
33
|
+
* Search strategy:
|
|
34
|
+
* 1. Workspace packages (if in workspace)
|
|
35
|
+
* 2. node_modules/@runa/{packageName}
|
|
36
|
+
* 3. Conventional locations (e.g., packages/{packageName})
|
|
37
|
+
*
|
|
38
|
+
* SECURITY: Validates package name before searching to prevent path traversal attacks
|
|
39
|
+
*
|
|
40
|
+
* @param packageName - Package name (e.g., "database", "sdk")
|
|
41
|
+
* @param from - Starting directory (defaults to cwd)
|
|
42
|
+
* @returns Package directory path or null if not found
|
|
43
|
+
*/
|
|
44
|
+
export declare function findPackage(packageName: string, from?: string): string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Detect current environment
|
|
47
|
+
*
|
|
48
|
+
* Detection logic:
|
|
49
|
+
* - runa-repo: In workspace with @runa-ai/runa-cli and @runa-ai/runa packages
|
|
50
|
+
* - pj-repo: Has @runa-ai/runa in node_modules but not in workspace
|
|
51
|
+
* - unknown: No runa packages found
|
|
52
|
+
*/
|
|
53
|
+
export declare function detectEnvironment(from?: string): Environment;
|
|
54
|
+
/**
|
|
55
|
+
* Find runa.config.ts location
|
|
56
|
+
*
|
|
57
|
+
* Search strategy:
|
|
58
|
+
* 1. Current directory
|
|
59
|
+
* 2. Workspace root (if in workspace)
|
|
60
|
+
* 3. Walk up to git root
|
|
61
|
+
*/
|
|
62
|
+
export declare function findRunaConfig(from?: string): string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Get package info from package.json
|
|
65
|
+
*/
|
|
66
|
+
export declare function getPackageInfo(packagePath: string): {
|
|
67
|
+
name: string;
|
|
68
|
+
version: string;
|
|
69
|
+
main?: string;
|
|
70
|
+
} | null;
|
|
71
|
+
//# sourceMappingURL=workspace-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-detector.d.ts","sourceRoot":"","sources":["../../src/utils/workspace-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAyHH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAE9D;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAE7E;AAuLD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAgB5F;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,MAAsB,GAAG,WAAW,CAoB3E;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAwB1E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAgBP"}
|