@gfdelarue/testkit 0.3.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/LICENSE +68 -0
- package/README.md +1125 -0
- package/bin/testkit-windows-owner-arm64.exe +0 -0
- package/bin/testkit-windows-owner-x64.exe +0 -0
- package/bin/testkit.mjs +60 -0
- package/dist/app/cleanup/index.d.ts +52 -0
- package/dist/app/cleanup/index.js +1 -0
- package/dist/app/cloud/campaigns.d.ts +6 -0
- package/dist/app/cloud/campaigns.js +1 -0
- package/dist/app/cloud/control-actions.d.ts +12 -0
- package/dist/app/cloud/control-actions.js +2 -0
- package/dist/app/cloud/control-links.d.ts +5 -0
- package/dist/app/cloud/control-links.js +1 -0
- package/dist/app/cloud/control-read.d.ts +24 -0
- package/dist/app/cloud/control-read.js +1 -0
- package/dist/app/cloud/control-resources.d.ts +3 -0
- package/dist/app/cloud/control-resources.js +1 -0
- package/dist/app/cloud/control.d.ts +34 -0
- package/dist/app/cloud/control.js +5 -0
- package/dist/app/cloud/credentials.d.ts +11 -0
- package/dist/app/cloud/credentials.js +2 -0
- package/dist/app/cloud/index.d.ts +22 -0
- package/dist/app/cloud/index.js +2 -0
- package/dist/app/cloud/login.d.ts +63 -0
- package/dist/app/cloud/login.js +2 -0
- package/dist/app/cloud/migration/archive.d.ts +13 -0
- package/dist/app/cloud/migration/archive.js +1 -0
- package/dist/app/cloud/migration/commands.d.ts +8 -0
- package/dist/app/cloud/migration/commands.js +1 -0
- package/dist/app/cloud/migration/evidence.d.ts +13 -0
- package/dist/app/cloud/migration/evidence.js +2 -0
- package/dist/app/cloud/migration/files.d.ts +16 -0
- package/dist/app/cloud/migration/files.js +2 -0
- package/dist/app/cloud/migration/index.d.ts +6 -0
- package/dist/app/cloud/migration/index.js +1 -0
- package/dist/app/cloud/migration/journal.d.ts +64 -0
- package/dist/app/cloud/migration/journal.js +1 -0
- package/dist/app/cloud/migration/mapping-dispositions.d.ts +3 -0
- package/dist/app/cloud/migration/mapping-dispositions.js +1 -0
- package/dist/app/cloud/migration/mapping.d.ts +11 -0
- package/dist/app/cloud/migration/mapping.js +2 -0
- package/dist/app/cloud/migration/model.d.ts +175 -0
- package/dist/app/cloud/migration/model.js +1 -0
- package/dist/app/cloud/migration/plan.d.ts +7 -0
- package/dist/app/cloud/migration/plan.js +1 -0
- package/dist/app/cloud/migration/progress.d.ts +19 -0
- package/dist/app/cloud/migration/progress.js +1 -0
- package/dist/app/cloud/migration/reconcile.d.ts +22 -0
- package/dist/app/cloud/migration/reconcile.js +1 -0
- package/dist/app/cloud/migration/reconciliation-spool.d.ts +4 -0
- package/dist/app/cloud/migration/reconciliation-spool.js +1 -0
- package/dist/app/cloud/migration/state.d.ts +15 -0
- package/dist/app/cloud/migration/state.js +1 -0
- package/dist/app/cloud/migration/transfer.d.ts +6 -0
- package/dist/app/cloud/migration/transfer.js +1 -0
- package/dist/app/db-schema/prepare.d.ts +11 -0
- package/dist/app/db-schema/prepare.js +1 -0
- package/dist/app/db-schema/refresh.d.ts +17 -0
- package/dist/app/db-schema/refresh.js +1 -0
- package/dist/app/db-schema/verify.d.ts +11 -0
- package/dist/app/db-schema/verify.js +1 -0
- package/dist/app/destroy/index.d.ts +16 -0
- package/dist/app/destroy/index.js +1 -0
- package/dist/app/discover/index.d.ts +8 -0
- package/dist/app/discover/index.js +2 -0
- package/dist/app/doctor/index.d.ts +17 -0
- package/dist/app/doctor/index.js +1 -0
- package/dist/app/file-selection.d.ts +1 -0
- package/dist/app/file-selection.js +1 -0
- package/dist/app/inspect/artifacts.d.ts +29 -0
- package/dist/app/inspect/artifacts.js +1 -0
- package/dist/app/inspect/index.d.ts +112 -0
- package/dist/app/inspect/index.js +1 -0
- package/dist/app/lint/index.d.ts +28 -0
- package/dist/app/lint/index.js +2 -0
- package/dist/app/lint/native.d.ts +10 -0
- package/dist/app/lint/native.js +1 -0
- package/dist/app/lint/options.d.ts +67 -0
- package/dist/app/lint/options.js +1 -0
- package/dist/app/lint/policy.d.ts +21 -0
- package/dist/app/lint/policy.js +1 -0
- package/dist/app/lint/rules/data.d.ts +3 -0
- package/dist/app/lint/rules/data.js +1 -0
- package/dist/app/lint/rules/engine-imports.d.ts +3 -0
- package/dist/app/lint/rules/engine-imports.js +1 -0
- package/dist/app/lint/rules/syntax.d.ts +4 -0
- package/dist/app/lint/rules/syntax.js +1 -0
- package/dist/app/lint/rules/unit.d.ts +3 -0
- package/dist/app/lint/rules/unit.js +1 -0
- package/dist/app/lint/shared.d.ts +36 -0
- package/dist/app/lint/shared.js +1 -0
- package/dist/app/package-inspection.d.ts +20 -0
- package/dist/app/package-inspection.js +1 -0
- package/dist/app/run/endpoint-readiness.d.ts +43 -0
- package/dist/app/run/endpoint-readiness.js +1 -0
- package/dist/app/run/engine-evidence-persistence.d.ts +39 -0
- package/dist/app/run/engine-evidence-persistence.js +1 -0
- package/dist/app/run/engine-execution-cleanup.d.ts +8 -0
- package/dist/app/run/engine-execution-cleanup.js +1 -0
- package/dist/app/run/engine-execution-failures.d.ts +41 -0
- package/dist/app/run/engine-execution-failures.js +1 -0
- package/dist/app/run/engine-execution-observer.d.ts +21 -0
- package/dist/app/run/engine-execution-observer.js +1 -0
- package/dist/app/run/engine-execution-reporting.d.ts +17 -0
- package/dist/app/run/engine-execution-reporting.js +1 -0
- package/dist/app/run/engine-execution.d.ts +60 -0
- package/dist/app/run/engine-execution.js +1 -0
- package/dist/app/run/engine-orchestration.d.ts +49 -0
- package/dist/app/run/engine-orchestration.js +1 -0
- package/dist/app/run/failure-details.d.ts +36 -0
- package/dist/app/run/failure-details.js +1 -0
- package/dist/app/run/live-run.d.ts +27 -0
- package/dist/app/run/live-run.js +1 -0
- package/dist/app/run/operation-progress.d.ts +13 -0
- package/dist/app/run/operation-progress.js +1 -0
- package/dist/app/run/orchestrator.d.ts +68 -0
- package/dist/app/run/orchestrator.js +1 -0
- package/dist/app/run/planning-types.d.ts +68 -0
- package/dist/app/run/planning-types.js +1 -0
- package/dist/app/run/planning.d.ts +15 -0
- package/dist/app/run/planning.js +1 -0
- package/dist/app/run/playwright-configuration.d.ts +2 -0
- package/dist/app/run/playwright-configuration.js +1 -0
- package/dist/app/run/request.d.ts +30 -0
- package/dist/app/run/request.js +1 -0
- package/dist/app/run/results.d.ts +161 -0
- package/dist/app/run/results.js +1 -0
- package/dist/app/run/run-events.d.ts +144 -0
- package/dist/app/run/run-events.js +1 -0
- package/dist/app/run/run-finalization.d.ts +52 -0
- package/dist/app/run/run-finalization.js +1 -0
- package/dist/app/run/run-guards.d.ts +3 -0
- package/dist/app/run/run-guards.js +3 -0
- package/dist/app/run/runtime-failures.d.ts +18 -0
- package/dist/app/run/runtime-failures.js +1 -0
- package/dist/app/run/runtime-fixtures.d.ts +2 -0
- package/dist/app/run/runtime-fixtures.js +1 -0
- package/dist/app/run/runtime-task-types.d.ts +20 -0
- package/dist/app/run/runtime-task-types.js +1 -0
- package/dist/app/run/scheduler/estimates.d.ts +32 -0
- package/dist/app/run/scheduler/estimates.js +1 -0
- package/dist/app/run/scheduler/identity.d.ts +9 -0
- package/dist/app/run/scheduler/identity.js +1 -0
- package/dist/app/run/scheduler/index.d.ts +124 -0
- package/dist/app/run/scheduler/index.js +1 -0
- package/dist/app/run/scheduler/observations.d.ts +20 -0
- package/dist/app/run/scheduler/observations.js +1 -0
- package/dist/app/run/selection.d.ts +10 -0
- package/dist/app/run/selection.js +1 -0
- package/dist/app/run/setup/runtime-node-setup-errors.d.ts +13 -0
- package/dist/app/run/setup/runtime-node-setup-errors.js +1 -0
- package/dist/app/run/setup/runtime-node-setup-protocol.d.ts +85 -0
- package/dist/app/run/setup/runtime-node-setup-protocol.js +1 -0
- package/dist/app/run/setup/runtime-node-setup-worker.d.ts +1 -0
- package/dist/app/run/setup/runtime-node-setup-worker.js +1 -0
- package/dist/app/run/setup/runtime-node-setup.d.ts +48 -0
- package/dist/app/run/setup/runtime-node-setup.js +3 -0
- package/dist/app/run/task-batches.d.ts +23 -0
- package/dist/app/run/task-batches.js +1 -0
- package/dist/app/run/worker-loop.d.ts +57 -0
- package/dist/app/run/worker-loop.js +1 -0
- package/dist/app/setup/playwright.d.ts +22 -0
- package/dist/app/setup/playwright.js +1 -0
- package/dist/app/status/index.d.ts +7 -0
- package/dist/app/status/index.js +1 -0
- package/dist/app/status/model.d.ts +29 -0
- package/dist/app/status/model.js +1 -0
- package/dist/app/status/runs.d.ts +99 -0
- package/dist/app/status/runs.js +1 -0
- package/dist/app/stop/index.d.ts +14 -0
- package/dist/app/stop/index.js +1 -0
- package/dist/app/typecheck/index.d.ts +61 -0
- package/dist/app/typecheck/index.js +4 -0
- package/dist/app/typecheck/unavailable.d.ts +1 -0
- package/dist/app/typecheck/unavailable.js +1 -0
- package/dist/cli/cloud-apply-help.d.ts +1 -0
- package/dist/cli/cloud-apply-help.js +56 -0
- package/dist/cli/cloud-selection.d.ts +2 -0
- package/dist/cli/cloud-selection.js +3 -0
- package/dist/cli/command-catalog.d.ts +238 -0
- package/dist/cli/command-catalog.js +1 -0
- package/dist/cli/command-flags.d.ts +19 -0
- package/dist/cli/command-flags.js +1 -0
- package/dist/cli/command-registry.d.ts +2 -0
- package/dist/cli/command-registry.js +1 -0
- package/dist/cli/commands/artifacts.d.ts +48 -0
- package/dist/cli/commands/artifacts.js +3 -0
- package/dist/cli/commands/cleanup.d.ts +13 -0
- package/dist/cli/commands/cleanup.js +1 -0
- package/dist/cli/commands/cloud/apply.d.ts +5 -0
- package/dist/cli/commands/cloud/apply.js +1 -0
- package/dist/cli/commands/cloud/campaign/create.d.ts +5 -0
- package/dist/cli/commands/cloud/campaign/create.js +1 -0
- package/dist/cli/commands/cloud/download.d.ts +5 -0
- package/dist/cli/commands/cloud/download.js +1 -0
- package/dist/cli/commands/cloud/list.d.ts +5 -0
- package/dist/cli/commands/cloud/list.js +1 -0
- package/dist/cli/commands/cloud/login.d.ts +13 -0
- package/dist/cli/commands/cloud/login.js +2 -0
- package/dist/cli/commands/cloud/logout.d.ts +7 -0
- package/dist/cli/commands/cloud/logout.js +1 -0
- package/dist/cli/commands/cloud/migrate/apply.d.ts +2 -0
- package/dist/cli/commands/cloud/migrate/apply.js +1 -0
- package/dist/cli/commands/cloud/migrate/plan.d.ts +7 -0
- package/dist/cli/commands/cloud/migrate/plan.js +1 -0
- package/dist/cli/commands/cloud/migrate/progress.d.ts +2 -0
- package/dist/cli/commands/cloud/migrate/progress.js +2 -0
- package/dist/cli/commands/cloud/migrate/reconcile.d.ts +2 -0
- package/dist/cli/commands/cloud/migrate/reconcile.js +1 -0
- package/dist/cli/commands/cloud/policy/preview.d.ts +5 -0
- package/dist/cli/commands/cloud/policy/preview.js +1 -0
- package/dist/cli/commands/cloud/project/create.d.ts +5 -0
- package/dist/cli/commands/cloud/project/create.js +1 -0
- package/dist/cli/commands/cloud/publish.d.ts +7 -0
- package/dist/cli/commands/cloud/publish.js +1 -0
- package/dist/cli/commands/cloud/session/revoke.d.ts +8 -0
- package/dist/cli/commands/cloud/session/revoke.js +1 -0
- package/dist/cli/commands/cloud/show.d.ts +5 -0
- package/dist/cli/commands/cloud/show.js +1 -0
- package/dist/cli/commands/cloud/snapshot.d.ts +5 -0
- package/dist/cli/commands/cloud/snapshot.js +1 -0
- package/dist/cli/commands/cloud/status.d.ts +33 -0
- package/dist/cli/commands/cloud/status.js +1 -0
- package/dist/cli/commands/db/schema/refresh.d.ts +2 -0
- package/dist/cli/commands/db/schema/refresh.js +1 -0
- package/dist/cli/commands/db/schema/verify.d.ts +2 -0
- package/dist/cli/commands/db/schema/verify.js +1 -0
- package/dist/cli/commands/destroy.d.ts +9 -0
- package/dist/cli/commands/destroy.js +1 -0
- package/dist/cli/commands/discover.d.ts +2 -0
- package/dist/cli/commands/discover.js +1 -0
- package/dist/cli/commands/doctor.d.ts +2 -0
- package/dist/cli/commands/doctor.js +1 -0
- package/dist/cli/commands/guard/unsafe-entrypoint.d.ts +2 -0
- package/dist/cli/commands/guard/unsafe-entrypoint.js +2 -0
- package/dist/cli/commands/lint.d.ts +2 -0
- package/dist/cli/commands/lint.js +1 -0
- package/dist/cli/commands/run/status.d.ts +5 -0
- package/dist/cli/commands/run/status.js +1 -0
- package/dist/cli/commands/run/stop.d.ts +7 -0
- package/dist/cli/commands/run/stop.js +1 -0
- package/dist/cli/commands/run.d.ts +9 -0
- package/dist/cli/commands/run.js +1 -0
- package/dist/cli/commands/setup/playwright.d.ts +2 -0
- package/dist/cli/commands/setup/playwright.js +1 -0
- package/dist/cli/commands/status.d.ts +5 -0
- package/dist/cli/commands/status.js +1 -0
- package/dist/cli/commands/stop.d.ts +12 -0
- package/dist/cli/commands/stop.js +1 -0
- package/dist/cli/commands/typecheck.d.ts +2 -0
- package/dist/cli/commands/typecheck.js +1 -0
- package/dist/cli/commands/workspace.d.ts +2 -0
- package/dist/cli/commands/workspace.js +1 -0
- package/dist/cli/entrypoint.d.ts +1 -0
- package/dist/cli/entrypoint.js +1 -0
- package/dist/cli/framework/command.d.ts +21 -0
- package/dist/cli/framework/command.js +1 -0
- package/dist/cli/framework/definitions.d.ts +100 -0
- package/dist/cli/framework/definitions.js +1 -0
- package/dist/cli/framework/errors.d.ts +6 -0
- package/dist/cli/framework/errors.js +1 -0
- package/dist/cli/framework/execute.d.ts +13 -0
- package/dist/cli/framework/execute.js +6 -0
- package/dist/cli/framework/help.d.ts +11 -0
- package/dist/cli/framework/help.js +8 -0
- package/dist/cli/framework/index.d.ts +3 -0
- package/dist/cli/framework/index.js +1 -0
- package/dist/cli/framework/parser.d.ts +6 -0
- package/dist/cli/framework/parser.js +1 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.js +1 -0
- package/dist/cli/json-errors.d.ts +3 -0
- package/dist/cli/json-errors.js +1 -0
- package/dist/cli/operations/db/schema/refresh/operation.d.ts +6 -0
- package/dist/cli/operations/db/schema/refresh/operation.js +1 -0
- package/dist/cli/operations/db/schema/verify/operation.d.ts +6 -0
- package/dist/cli/operations/db/schema/verify/operation.js +1 -0
- package/dist/cli/operations/run/operation.d.ts +24 -0
- package/dist/cli/operations/run/operation.js +2 -0
- package/dist/cli/process-signal.d.ts +1 -0
- package/dist/cli/process-signal.js +1 -0
- package/dist/cli/renderers/artifact-preview.d.ts +4 -0
- package/dist/cli/renderers/artifact-preview.js +1 -0
- package/dist/cli/renderers/cleanup/format.d.ts +14 -0
- package/dist/cli/renderers/cleanup/format.js +1 -0
- package/dist/cli/renderers/db-schema/text.d.ts +4 -0
- package/dist/cli/renderers/db-schema/text.js +1 -0
- package/dist/cli/renderers/destroy/text.d.ts +4 -0
- package/dist/cli/renderers/destroy/text.js +1 -0
- package/dist/cli/renderers/discover/report.d.ts +7 -0
- package/dist/cli/renderers/discover/report.js +1 -0
- package/dist/cli/renderers/discover/text.d.ts +3 -0
- package/dist/cli/renderers/discover/text.js +1 -0
- package/dist/cli/renderers/doctor/text.d.ts +2 -0
- package/dist/cli/renderers/doctor/text.js +1 -0
- package/dist/cli/renderers/lint/text.d.ts +2 -0
- package/dist/cli/renderers/lint/text.js +1 -0
- package/dist/cli/renderers/run/events.d.ts +8 -0
- package/dist/cli/renderers/run/events.js +2 -0
- package/dist/cli/renderers/run/failure.d.ts +8 -0
- package/dist/cli/renderers/run/failure.js +1 -0
- package/dist/cli/renderers/run/formatting.d.ts +79 -0
- package/dist/cli/renderers/run/formatting.js +1 -0
- package/dist/cli/renderers/run/status.d.ts +6 -0
- package/dist/cli/renderers/run/status.js +1 -0
- package/dist/cli/renderers/run/text-reporter.d.ts +19 -0
- package/dist/cli/renderers/run/text-reporter.js +23 -0
- package/dist/cli/renderers/status/text.d.ts +2 -0
- package/dist/cli/renderers/status/text.js +1 -0
- package/dist/cli/renderers/stop/text.d.ts +7 -0
- package/dist/cli/renderers/stop/text.js +1 -0
- package/dist/cli/renderers/typecheck/text.d.ts +2 -0
- package/dist/cli/renderers/typecheck/text.js +1 -0
- package/dist/cli/terminal/colors.d.ts +10 -0
- package/dist/cli/terminal/colors.js +1 -0
- package/dist/cli/terminal/layout.d.ts +11 -0
- package/dist/cli/terminal/layout.js +2 -0
- package/dist/cli/version-drift.d.ts +25 -0
- package/dist/cli/version-drift.js +7 -0
- package/dist/cloud/account.d.ts +34 -0
- package/dist/cloud/account.js +1 -0
- package/dist/cloud/archive-contract.d.ts +1 -0
- package/dist/cloud/archive-contract.js +1 -0
- package/dist/cloud/archive.d.ts +12 -0
- package/dist/cloud/archive.js +1 -0
- package/dist/cloud/campaigns.d.ts +200 -0
- package/dist/cloud/campaigns.js +2 -0
- package/dist/cloud/client.d.ts +68 -0
- package/dist/cloud/client.js +4 -0
- package/dist/cloud/download.d.ts +5 -0
- package/dist/cloud/download.js +1 -0
- package/dist/cloud/historical-contract.d.ts +224 -0
- package/dist/cloud/historical-contract.js +1 -0
- package/dist/cloud/historical-json.d.ts +16 -0
- package/dist/cloud/historical-json.js +1 -0
- package/dist/cloud/historical.d.ts +69 -0
- package/dist/cloud/historical.js +1 -0
- package/dist/cloud/pagination.d.ts +5 -0
- package/dist/cloud/pagination.js +1 -0
- package/dist/cloud/transport.d.ts +18 -0
- package/dist/cloud/transport.js +1 -0
- package/dist/config/authoring/build-config-contract.d.ts +27 -0
- package/dist/config/authoring/build-config-contract.js +1 -0
- package/dist/config/authoring/configured-step-contract.d.ts +18 -0
- package/dist/config/authoring/configured-step-contract.js +1 -0
- package/dist/config/authoring/http-execution-contract.d.ts +70 -0
- package/dist/config/authoring/http-execution-contract.js +1 -0
- package/dist/config/authoring/http-methods.d.ts +18 -0
- package/dist/config/authoring/http-methods.js +1 -0
- package/dist/config/authoring/index.d.ts +376 -0
- package/dist/config/authoring/index.js +1 -0
- package/dist/config/authoring/preset-env.d.ts +19 -0
- package/dist/config/authoring/preset-env.js +1 -0
- package/dist/config/authoring/runtime.d.ts +64 -0
- package/dist/config/authoring/runtime.js +1 -0
- package/dist/config/loader/cloud.d.ts +2 -0
- package/dist/config/loader/cloud.js +1 -0
- package/dist/config/loader/config-loader.d.ts +9 -0
- package/dist/config/loader/config-loader.js +1 -0
- package/dist/config/loader/database-materialization.d.ts +19 -0
- package/dist/config/loader/database-materialization.js +1 -0
- package/dist/config/loader/database-roles.d.ts +2 -0
- package/dist/config/loader/database-roles.js +1 -0
- package/dist/config/loader/database.d.ts +55 -0
- package/dist/config/loader/database.js +1 -0
- package/dist/config/loader/decode-discovery.d.ts +5 -0
- package/dist/config/loader/decode-discovery.js +1 -0
- package/dist/config/loader/decode-execution.d.ts +9 -0
- package/dist/config/loader/decode-execution.js +1 -0
- package/dist/config/loader/dependencies.d.ts +7 -0
- package/dist/config/loader/dependencies.js +1 -0
- package/dist/config/loader/discover-tests.d.ts +101 -0
- package/dist/config/loader/discover-tests.js +1 -0
- package/dist/config/loader/discovery-summary.d.ts +29 -0
- package/dist/config/loader/discovery-summary.js +1 -0
- package/dist/config/loader/discovery.d.ts +54 -0
- package/dist/config/loader/discovery.js +2 -0
- package/dist/config/loader/env.d.ts +4 -0
- package/dist/config/loader/env.js +1 -0
- package/dist/config/loader/execution-model.d.ts +16 -0
- package/dist/config/loader/execution-model.js +1 -0
- package/dist/config/loader/file-metadata.d.ts +19 -0
- package/dist/config/loader/file-metadata.js +1 -0
- package/dist/config/loader/index.d.ts +10 -0
- package/dist/config/loader/index.js +1 -0
- package/dist/config/loader/load.d.ts +89 -0
- package/dist/config/loader/load.js +1 -0
- package/dist/config/loader/managed-configs.d.ts +21 -0
- package/dist/config/loader/managed-configs.js +1 -0
- package/dist/config/loader/path-policy.d.ts +9 -0
- package/dist/config/loader/path-policy.js +1 -0
- package/dist/config/loader/paths.d.ts +5 -0
- package/dist/config/loader/paths.js +1 -0
- package/dist/config/loader/runtime-isolation.d.ts +44 -0
- package/dist/config/loader/runtime-isolation.js +1 -0
- package/dist/config/loader/runtime.d.ts +25 -0
- package/dist/config/loader/runtime.js +1 -0
- package/dist/config/loader/skip-config.d.ts +44 -0
- package/dist/config/loader/skip-config.js +1 -0
- package/dist/config/loader/validation.d.ts +16 -0
- package/dist/config/loader/validation.js +1 -0
- package/dist/config/loader/values.d.ts +4 -0
- package/dist/config/loader/values.js +1 -0
- package/dist/config/runtime/build-assets.d.ts +6 -0
- package/dist/config/runtime/build-assets.js +1 -0
- package/dist/config/runtime/env/index.d.ts +35 -0
- package/dist/config/runtime/env/index.js +1 -0
- package/dist/config/runtime/next-runtime-tsconfig.d.ts +6 -0
- package/dist/config/runtime/next-runtime-tsconfig.js +2 -0
- package/dist/database/activity-gate.d.ts +22 -0
- package/dist/database/activity-gate.js +1 -0
- package/dist/database/admin.d.ts +31 -0
- package/dist/database/admin.js +2 -0
- package/dist/database/cleanup.d.ts +36 -0
- package/dist/database/cleanup.js +1 -0
- package/dist/database/configured-steps.d.ts +27 -0
- package/dist/database/configured-steps.js +1 -0
- package/dist/database/constants.d.ts +11 -0
- package/dist/database/constants.js +1 -0
- package/dist/database/docker.d.ts +65 -0
- package/dist/database/docker.js +5 -0
- package/dist/database/drizzle/index.d.ts +13 -0
- package/dist/database/drizzle/index.js +1 -0
- package/dist/database/fingerprint.d.ts +12 -0
- package/dist/database/fingerprint.js +1 -0
- package/dist/database/index.d.ts +41 -0
- package/dist/database/index.js +1 -0
- package/dist/database/local-postgres.d.ts +71 -0
- package/dist/database/local-postgres.js +2 -0
- package/dist/database/naming.d.ts +17 -0
- package/dist/database/naming.js +1 -0
- package/dist/database/postgres/index.d.ts +71 -0
- package/dist/database/postgres/index.js +2 -0
- package/dist/database/progress.d.ts +6 -0
- package/dist/database/progress.js +1 -0
- package/dist/database/roles.d.ts +19 -0
- package/dist/database/roles.js +41 -0
- package/dist/database/runtime-config.d.ts +16 -0
- package/dist/database/runtime-config.js +1 -0
- package/dist/database/runtime-reservations.d.ts +19 -0
- package/dist/database/runtime-reservations.js +1 -0
- package/dist/database/schema-operations.d.ts +18 -0
- package/dist/database/schema-operations.js +1 -0
- package/dist/database/schema-source.d.ts +93 -0
- package/dist/database/schema-source.js +3 -0
- package/dist/database/source-refresh-lock.d.ts +8 -0
- package/dist/database/source-refresh-lock.js +1 -0
- package/dist/database/source-url.d.ts +22 -0
- package/dist/database/source-url.js +2 -0
- package/dist/database/state-files.d.ts +13 -0
- package/dist/database/state-files.js +1 -0
- package/dist/database/state.d.ts +26 -0
- package/dist/database/state.js +1 -0
- package/dist/database/steps.d.ts +16 -0
- package/dist/database/steps.js +4 -0
- package/dist/database/template-steps.d.ts +35 -0
- package/dist/database/template-steps.js +4 -0
- package/dist/domain/file-timeout.d.ts +28 -0
- package/dist/domain/file-timeout.js +1 -0
- package/dist/domain/identifiers.d.ts +9 -0
- package/dist/domain/identifiers.js +1 -0
- package/dist/domain/operation-display.d.ts +10 -0
- package/dist/domain/operation-display.js +1 -0
- package/dist/domain/operation-reason.d.ts +5 -0
- package/dist/domain/operation-reason.js +1 -0
- package/dist/domain/postgres-route.d.ts +4 -0
- package/dist/domain/postgres-route.js +1 -0
- package/dist/domain/runtime-identity.d.ts +1 -0
- package/dist/domain/runtime-identity.js +1 -0
- package/dist/domain/runtime-isolation-contract.d.ts +5 -0
- package/dist/domain/runtime-isolation-contract.js +1 -0
- package/dist/domain/service-name.d.ts +2 -0
- package/dist/domain/service-name.js +1 -0
- package/dist/domain/suite-selection.d.ts +20 -0
- package/dist/domain/suite-selection.js +1 -0
- package/dist/domain/test-outcomes.d.ts +3 -0
- package/dist/domain/test-outcomes.js +1 -0
- package/dist/domain/test-types.d.ts +16 -0
- package/dist/domain/test-types.js +1 -0
- package/dist/engines/adapters/evidence-files.d.ts +32 -0
- package/dist/engines/adapters/evidence-files.js +1 -0
- package/dist/engines/adapters/evidence-identity.d.ts +12 -0
- package/dist/engines/adapters/evidence-identity.js +1 -0
- package/dist/engines/adapters/execution.d.ts +38 -0
- package/dist/engines/adapters/execution.js +1 -0
- package/dist/engines/adapters/native-report.d.ts +25 -0
- package/dist/engines/adapters/native-report.js +1 -0
- package/dist/engines/adapters/workspace.d.ts +4 -0
- package/dist/engines/adapters/workspace.js +1 -0
- package/dist/engines/api/capabilities.d.ts +31 -0
- package/dist/engines/api/capabilities.js +1 -0
- package/dist/engines/api/evidence.d.ts +38 -0
- package/dist/engines/api/evidence.js +1 -0
- package/dist/engines/api/execution-observer.d.ts +8 -0
- package/dist/engines/api/execution-observer.js +1 -0
- package/dist/engines/api/execution-scope.d.ts +17 -0
- package/dist/engines/api/execution-scope.js +1 -0
- package/dist/engines/api/execution.d.ts +99 -0
- package/dist/engines/api/execution.js +1 -0
- package/dist/engines/api/index.d.ts +5 -0
- package/dist/engines/api/index.js +1 -0
- package/dist/engines/api/k6-runtime-input.d.ts +26 -0
- package/dist/engines/api/k6-runtime-input.js +1 -0
- package/dist/engines/api/runtime-artifact.d.ts +19 -0
- package/dist/engines/api/runtime-artifact.js +1 -0
- package/dist/engines/bundle-cache.d.ts +32 -0
- package/dist/engines/bundle-cache.js +1 -0
- package/dist/engines/catalog.d.ts +32 -0
- package/dist/engines/catalog.js +1 -0
- package/dist/engines/contracts/fixture-manifest.d.ts +34 -0
- package/dist/engines/contracts/fixture-manifest.js +1 -0
- package/dist/engines/contracts/json-bounds.d.ts +36 -0
- package/dist/engines/contracts/json-bounds.js +2 -0
- package/dist/engines/contracts/k6-repository-configuration.d.ts +12 -0
- package/dist/engines/contracts/k6-repository-configuration.js +1 -0
- package/dist/engines/contracts/test-context.d.ts +15 -0
- package/dist/engines/contracts/test-context.js +1 -0
- package/dist/engines/definitions.d.ts +15 -0
- package/dist/engines/definitions.js +1 -0
- package/dist/engines/factory.d.ts +6 -0
- package/dist/engines/factory.js +1 -0
- package/dist/engines/installation-catalog.d.ts +27 -0
- package/dist/engines/installation-catalog.js +1 -0
- package/dist/engines/installations/k6.d.ts +98 -0
- package/dist/engines/installations/k6.js +1 -0
- package/dist/engines/installations/node-vitest.d.ts +47 -0
- package/dist/engines/installations/node-vitest.js +1 -0
- package/dist/engines/installations/package-resolution.d.ts +51 -0
- package/dist/engines/installations/package-resolution.js +1 -0
- package/dist/engines/installations/playwright-resolution-child.d.ts +1 -0
- package/dist/engines/installations/playwright-resolution-child.js +2 -0
- package/dist/engines/installations/playwright.d.ts +85 -0
- package/dist/engines/installations/playwright.js +1 -0
- package/dist/engines/installations/types.d.ts +10 -0
- package/dist/engines/installations/types.js +1 -0
- package/dist/engines/k6/adapter/bundle.d.ts +25 -0
- package/dist/engines/k6/adapter/bundle.js +112 -0
- package/dist/engines/k6/adapter/evidence.d.ts +15 -0
- package/dist/engines/k6/adapter/evidence.js +4 -0
- package/dist/engines/k6/adapter/executor.d.ts +13 -0
- package/dist/engines/k6/adapter/executor.js +1 -0
- package/dist/engines/k6/adapter/index.d.ts +1 -0
- package/dist/engines/k6/adapter/index.js +1 -0
- package/dist/engines/k6/adapter/input.d.ts +21 -0
- package/dist/engines/k6/adapter/input.js +1 -0
- package/dist/engines/k6/adapter/native-summary.d.ts +11 -0
- package/dist/engines/k6/adapter/native-summary.js +1 -0
- package/dist/engines/k6/adapter/repository-configuration.d.ts +2 -0
- package/dist/engines/k6/adapter/repository-configuration.js +1 -0
- package/dist/engines/k6/authoring-type-paths.d.ts +3 -0
- package/dist/engines/k6/authoring-type-paths.js +1 -0
- package/dist/engines/k6/runtime/ambient-types/bundle-manifest.json +146 -0
- package/dist/engines/k6/runtime/ambient-types/k6/LICENSE +21 -0
- package/dist/engines/k6/runtime/ambient-types/k6/browser/index.d.ts +6332 -0
- package/dist/engines/k6/runtime/ambient-types/k6/crypto/index.d.ts +218 -0
- package/dist/engines/k6/runtime/ambient-types/k6/data/index.d.ts +16 -0
- package/dist/engines/k6/runtime/ambient-types/k6/encoding/index.d.ts +46 -0
- package/dist/engines/k6/runtime/ambient-types/k6/execution/index.d.ts +127 -0
- package/dist/engines/k6/runtime/ambient-types/k6/experimental/csv/index.d.ts +96 -0
- package/dist/engines/k6/runtime/ambient-types/k6/experimental/fs/index.d.ts +104 -0
- package/dist/engines/k6/runtime/ambient-types/k6/experimental/redis/index.d.ts +821 -0
- package/dist/engines/k6/runtime/ambient-types/k6/experimental/streams/index.d.ts +198 -0
- package/dist/engines/k6/runtime/ambient-types/k6/global.d.ts +83 -0
- package/dist/engines/k6/runtime/ambient-types/k6/html/index.d.ts +1325 -0
- package/dist/engines/k6/runtime/ambient-types/k6/http/index.d.ts +806 -0
- package/dist/engines/k6/runtime/ambient-types/k6/index.d.ts +126 -0
- package/dist/engines/k6/runtime/ambient-types/k6/metrics/index.d.ts +66 -0
- package/dist/engines/k6/runtime/ambient-types/k6/net/grpc/index.d.ts +247 -0
- package/dist/engines/k6/runtime/ambient-types/k6/options/index.d.ts +459 -0
- package/dist/engines/k6/runtime/ambient-types/k6/package.json +79 -0
- package/dist/engines/k6/runtime/ambient-types/k6/secrets/index.d.ts +36 -0
- package/dist/engines/k6/runtime/ambient-types/k6/timers/index.d.ts +47 -0
- package/dist/engines/k6/runtime/ambient-types/k6/websockets/index.d.ts +324 -0
- package/dist/engines/k6/runtime/ambient-types/k6/ws/index.d.ts +283 -0
- package/dist/engines/k6/runtime/ambient-types/xk6-sql/LICENSE +201 -0
- package/dist/engines/k6/runtime/ambient-types/xk6-sql/index.d.ts +397 -0
- package/dist/engines/k6/runtime/ambient-types/xk6-sql/package.json +15 -0
- package/dist/engines/k6/runtime/artifacts.d.ts +2 -0
- package/dist/engines/k6/runtime/artifacts.js +1 -0
- package/dist/engines/k6/runtime/checks.d.ts +17 -0
- package/dist/engines/k6/runtime/checks.js +1 -0
- package/dist/engines/k6/runtime/dal-fixtures.d.ts +24 -0
- package/dist/engines/k6/runtime/dal-fixtures.js +1 -0
- package/dist/engines/k6/runtime/dal-suite.d.ts +24 -0
- package/dist/engines/k6/runtime/dal-suite.js +1 -0
- package/dist/engines/k6/runtime/dal.d.ts +10 -0
- package/dist/engines/k6/runtime/dal.js +1 -0
- package/dist/engines/k6/runtime/fixtures.d.ts +3 -0
- package/dist/engines/k6/runtime/fixtures.js +1 -0
- package/dist/engines/k6/runtime/http-assertions.d.ts +19 -0
- package/dist/engines/k6/runtime/http-assertions.js +1 -0
- package/dist/engines/k6/runtime/http-checks.d.ts +19 -0
- package/dist/engines/k6/runtime/http-checks.js +1 -0
- package/dist/engines/k6/runtime/http-suite-runtime.d.ts +103 -0
- package/dist/engines/k6/runtime/http-suite-runtime.js +1 -0
- package/dist/engines/k6/runtime/http.d.ts +15 -0
- package/dist/engines/k6/runtime/http.js +1 -0
- package/dist/engines/k6/runtime/index.d.ts +11 -0
- package/dist/engines/k6/runtime/index.js +1 -0
- package/dist/engines/k6/runtime/input.d.ts +3 -0
- package/dist/engines/k6/runtime/input.js +1 -0
- package/dist/engines/k6/runtime/k6-repository-configuration.d.ts +9 -0
- package/dist/engines/k6/runtime/k6-repository-configuration.js +1 -0
- package/dist/engines/k6/runtime/node-setup.d.ts +13 -0
- package/dist/engines/k6/runtime/node-setup.js +1 -0
- package/dist/engines/k6/runtime/runtime-globals.d.ts +10 -0
- package/dist/engines/k6/runtime/runtime-globals.js +1 -0
- package/dist/engines/k6/runtime/runtime.d.ts +54 -0
- package/dist/engines/k6/runtime/runtime.js +1 -0
- package/dist/engines/k6/runtime/shared/assertion-details.d.ts +19 -0
- package/dist/engines/k6/runtime/shared/assertion-details.js +2 -0
- package/dist/engines/k6/runtime/shared/db-normalization.d.ts +19 -0
- package/dist/engines/k6/runtime/shared/db-normalization.js +1 -0
- package/dist/engines/k6/runtime/shared/error-body.d.ts +3 -0
- package/dist/engines/k6/runtime/shared/error-body.js +1 -0
- package/dist/engines/k6/runtime/shared/file-data.d.ts +1 -0
- package/dist/engines/k6/runtime/shared/file-data.js +1 -0
- package/dist/engines/k6/runtime/shared/fixture-engine.d.ts +8 -0
- package/dist/engines/k6/runtime/shared/fixture-engine.js +2 -0
- package/dist/engines/k6/runtime/shared/http-check-plan.d.ts +29 -0
- package/dist/engines/k6/runtime/shared/http-check-plan.js +1 -0
- package/dist/engines/k6/runtime/shared/http-parsing.d.ts +10 -0
- package/dist/engines/k6/runtime/shared/http-parsing.js +3 -0
- package/dist/engines/k6/runtime/shared/ordering.d.ts +2 -0
- package/dist/engines/k6/runtime/shared/ordering.js +1 -0
- package/dist/engines/k6/runtime/shared/properties.d.ts +1 -0
- package/dist/engines/k6/runtime/shared/properties.js +1 -0
- package/dist/engines/k6/runtime/suite.d.ts +4 -0
- package/dist/engines/k6/runtime/suite.js +1 -0
- package/dist/engines/k6/runtime/types.d.ts +242 -0
- package/dist/engines/k6/runtime/types.js +1 -0
- package/dist/engines/k6/runtime/xk6-sql-driver-postgres.d.ts +7 -0
- package/dist/engines/k6/runtime/xk6-sql-driver-postgres.js +1 -0
- package/dist/engines/managed-module-resolution-policy-input.d.ts +9 -0
- package/dist/engines/managed-module-resolution-policy-input.js +1 -0
- package/dist/engines/managed-module-resolution-policy.d.ts +25 -0
- package/dist/engines/managed-module-resolution-policy.js +1 -0
- package/dist/engines/managed-module-resolution.d.ts +13 -0
- package/dist/engines/managed-module-resolution.js +697 -0
- package/dist/engines/manager.d.ts +24 -0
- package/dist/engines/manager.js +1 -0
- package/dist/engines/node-vitest/adapter/adapter.d.ts +16 -0
- package/dist/engines/node-vitest/adapter/adapter.js +1 -0
- package/dist/engines/node-vitest/adapter/consumer-typescript-paths.d.ts +17 -0
- package/dist/engines/node-vitest/adapter/consumer-typescript-paths.js +3 -0
- package/dist/engines/node-vitest/adapter/evidence.d.ts +33 -0
- package/dist/engines/node-vitest/adapter/evidence.js +2 -0
- package/dist/engines/node-vitest/adapter/failure-details.d.ts +2 -0
- package/dist/engines/node-vitest/adapter/failure-details.js +2 -0
- package/dist/engines/node-vitest/adapter/index.d.ts +1 -0
- package/dist/engines/node-vitest/adapter/index.js +1 -0
- package/dist/engines/node-vitest/adapter/reporter.d.ts +7 -0
- package/dist/engines/node-vitest/adapter/reporter.js +1 -0
- package/dist/engines/node-vitest/adapter/resolution.d.ts +12 -0
- package/dist/engines/node-vitest/adapter/resolution.js +1 -0
- package/dist/engines/node-vitest/adapter/workspace.d.ts +19 -0
- package/dist/engines/node-vitest/adapter/workspace.js +177 -0
- package/dist/engines/node-vitest/runtime/contract/index.d.ts +64 -0
- package/dist/engines/node-vitest/runtime/contract/index.js +1 -0
- package/dist/engines/node-vitest/runtime/data/http.d.ts +4 -0
- package/dist/engines/node-vitest/runtime/data/http.js +1 -0
- package/dist/engines/node-vitest/runtime/data/index.d.ts +8 -0
- package/dist/engines/node-vitest/runtime/data/index.js +1 -0
- package/dist/engines/node-vitest/runtime/data/primitives.d.ts +1 -0
- package/dist/engines/node-vitest/runtime/data/primitives.js +1 -0
- package/dist/engines/node-vitest/runtime/data/report.d.ts +3 -0
- package/dist/engines/node-vitest/runtime/data/report.js +6 -0
- package/dist/engines/node-vitest/runtime/data/runner.d.ts +4 -0
- package/dist/engines/node-vitest/runtime/data/runner.js +1 -0
- package/dist/engines/node-vitest/runtime/data/scenario.d.ts +12 -0
- package/dist/engines/node-vitest/runtime/data/scenario.js +2 -0
- package/dist/engines/node-vitest/runtime/data/types.d.ts +412 -0
- package/dist/engines/node-vitest/runtime/data/types.js +1 -0
- package/dist/engines/node-vitest/runtime/runtime-input.d.ts +63 -0
- package/dist/engines/node-vitest/runtime/runtime-input.js +1 -0
- package/dist/engines/playwright/adapter/adapter.d.ts +18 -0
- package/dist/engines/playwright/adapter/adapter.js +1 -0
- package/dist/engines/playwright/adapter/attachments.d.ts +25 -0
- package/dist/engines/playwright/adapter/attachments.js +1 -0
- package/dist/engines/playwright/adapter/config.d.ts +45 -0
- package/dist/engines/playwright/adapter/config.js +167 -0
- package/dist/engines/playwright/adapter/evidence-validation.d.ts +12 -0
- package/dist/engines/playwright/adapter/evidence-validation.js +1 -0
- package/dist/engines/playwright/adapter/evidence.d.ts +32 -0
- package/dist/engines/playwright/adapter/evidence.js +1 -0
- package/dist/engines/playwright/adapter/failure-details.d.ts +2 -0
- package/dist/engines/playwright/adapter/failure-details.js +2 -0
- package/dist/engines/playwright/adapter/index.d.ts +3 -0
- package/dist/engines/playwright/adapter/index.js +1 -0
- package/dist/engines/playwright/adapter/reporter.d.ts +12 -0
- package/dist/engines/playwright/adapter/reporter.js +1 -0
- package/dist/engines/playwright/runtime/config-file.d.ts +2 -0
- package/dist/engines/playwright/runtime/config-file.js +1 -0
- package/dist/engines/playwright/runtime/config.d.ts +24 -0
- package/dist/engines/playwright/runtime/config.js +1 -0
- package/dist/engines/playwright/runtime/index.d.ts +4 -0
- package/dist/engines/playwright/runtime/index.js +1 -0
- package/dist/engines/playwright/runtime/runtime-input.d.ts +36 -0
- package/dist/engines/playwright/runtime/runtime-input.js +151 -0
- package/dist/engines/playwright/runtime/sandbox.d.ts +84 -0
- package/dist/engines/playwright/runtime/sandbox.js +1 -0
- package/dist/engines/runtime-input-file.d.ts +25 -0
- package/dist/engines/runtime-input-file.js +1 -0
- package/dist/environment/lifecycle-artifacts.d.ts +7 -0
- package/dist/environment/lifecycle-artifacts.js +1 -0
- package/dist/environment/lifecycle-controller.d.ts +71 -0
- package/dist/environment/lifecycle-controller.js +1 -0
- package/dist/environment/lifecycle.d.ts +29 -0
- package/dist/environment/lifecycle.js +1 -0
- package/dist/environment/maintenance.d.ts +68 -0
- package/dist/environment/maintenance.js +1 -0
- package/dist/environment/planning-types.d.ts +35 -0
- package/dist/environment/planning-types.js +1 -0
- package/dist/environment/readiness.d.ts +12 -0
- package/dist/environment/readiness.js +1 -0
- package/dist/environment/ready-environment.d.ts +17 -0
- package/dist/environment/ready-environment.js +1 -0
- package/dist/environment/run-environment.d.ts +38 -0
- package/dist/environment/run-environment.js +1 -0
- package/dist/environment/run-stopping.d.ts +13 -0
- package/dist/environment/run-stopping.js +1 -0
- package/dist/environment/runtime-contexts.d.ts +32 -0
- package/dist/environment/runtime-contexts.js +1 -0
- package/dist/environment/runtime-manager.d.ts +95 -0
- package/dist/environment/runtime-manager.js +1 -0
- package/dist/environment/runtime-planning.d.ts +16 -0
- package/dist/environment/runtime-planning.js +1 -0
- package/dist/environment/runtime-preparation.d.ts +30 -0
- package/dist/environment/runtime-preparation.js +1 -0
- package/dist/environment/runtime-service.d.ts +18 -0
- package/dist/environment/runtime-service.js +1 -0
- package/dist/environment/services.d.ts +48 -0
- package/dist/environment/services.js +1 -0
- package/dist/environment/state.d.ts +18 -0
- package/dist/environment/state.js +1 -0
- package/dist/environment/status-runtime.d.ts +53 -0
- package/dist/environment/status-runtime.js +1 -0
- package/dist/environment/template.d.ts +180 -0
- package/dist/environment/template.js +1 -0
- package/dist/evidence/artifact-config.d.ts +14 -0
- package/dist/evidence/artifact-config.js +1 -0
- package/dist/evidence/artifact-validation.d.ts +5 -0
- package/dist/evidence/artifact-validation.js +1 -0
- package/dist/evidence/artifacts.d.ts +75 -0
- package/dist/evidence/artifacts.js +2 -0
- package/dist/evidence/bundles.d.ts +28 -0
- package/dist/evidence/bundles.js +1 -0
- package/dist/evidence/ci-provenance.d.ts +9 -0
- package/dist/evidence/ci-provenance.js +1 -0
- package/dist/evidence/contracts.d.ts +162 -0
- package/dist/evidence/contracts.js +1 -0
- package/dist/evidence/file-evidence.d.ts +23 -0
- package/dist/evidence/file-evidence.js +1 -0
- package/dist/evidence/finalization.d.ts +9 -0
- package/dist/evidence/finalization.js +1 -0
- package/dist/evidence/index.d.ts +8 -0
- package/dist/evidence/index.js +1 -0
- package/dist/evidence/logs.d.ts +31 -0
- package/dist/evidence/logs.js +2 -0
- package/dist/evidence/operation-timings.d.ts +60 -0
- package/dist/evidence/operation-timings.js +1 -0
- package/dist/evidence/read-bundle.d.ts +4 -0
- package/dist/evidence/read-bundle.js +1 -0
- package/dist/evidence/read-fields.d.ts +22 -0
- package/dist/evidence/read-fields.js +1 -0
- package/dist/evidence/read-provenance.d.ts +2 -0
- package/dist/evidence/read-provenance.js +1 -0
- package/dist/evidence/read-redaction.d.ts +2 -0
- package/dist/evidence/read-redaction.js +1 -0
- package/dist/evidence/read-retention.d.ts +2 -0
- package/dist/evidence/read-retention.js +1 -0
- package/dist/evidence/read-run.d.ts +2 -0
- package/dist/evidence/read-run.js +1 -0
- package/dist/evidence/reading.d.ts +28 -0
- package/dist/evidence/reading.js +1 -0
- package/dist/evidence/reporting-types.d.ts +330 -0
- package/dist/evidence/reporting-types.js +1 -0
- package/dist/evidence/reporting.d.ts +3 -0
- package/dist/evidence/reporting.js +1 -0
- package/dist/evidence/secure-file-copy.d.ts +24 -0
- package/dist/evidence/secure-file-copy.js +1 -0
- package/dist/evidence/setup-progress.d.ts +63 -0
- package/dist/evidence/setup-progress.js +1 -0
- package/dist/evidence/step-output.d.ts +16 -0
- package/dist/evidence/step-output.js +6 -0
- package/dist/evidence/storage-inventory.d.ts +27 -0
- package/dist/evidence/storage-inventory.js +1 -0
- package/dist/evidence/storage.d.ts +27 -0
- package/dist/evidence/storage.js +2 -0
- package/dist/evidence/timing.d.ts +23 -0
- package/dist/evidence/timing.js +1 -0
- package/dist/file.d.ts +11 -0
- package/dist/file.js +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/kernel/error-serialization.d.ts +38 -0
- package/dist/kernel/error-serialization.js +1 -0
- package/dist/kernel/redaction.d.ts +1 -0
- package/dist/kernel/redaction.js +1 -0
- package/dist/kernel/unknown-values.d.ts +6 -0
- package/dist/kernel/unknown-values.js +1 -0
- package/dist/process/capture-output.d.ts +7 -0
- package/dist/process/capture-output.js +1 -0
- package/dist/process/command-shell.d.ts +1 -0
- package/dist/process/command-shell.js +1 -0
- package/dist/process/environment-overlay.d.ts +17 -0
- package/dist/process/environment-overlay.js +1 -0
- package/dist/process/environment.d.ts +33 -0
- package/dist/process/environment.js +1 -0
- package/dist/process/files/contained-path.d.ts +8 -0
- package/dist/process/files/contained-path.js +1 -0
- package/dist/process/files/directory-status.d.ts +14 -0
- package/dist/process/files/directory-status.js +1 -0
- package/dist/process/files/dotenv.d.ts +2 -0
- package/dist/process/files/dotenv.js +1 -0
- package/dist/process/files/file-snapshot.d.ts +34 -0
- package/dist/process/files/file-snapshot.js +1 -0
- package/dist/process/files/json-file.d.ts +11 -0
- package/dist/process/files/json-file.js +1 -0
- package/dist/process/files/paths.d.ts +1 -0
- package/dist/process/files/paths.js +1 -0
- package/dist/process/files/temp-dir.d.ts +11 -0
- package/dist/process/files/temp-dir.js +1 -0
- package/dist/process/host/metadata.d.ts +6 -0
- package/dist/process/host/metadata.js +1 -0
- package/dist/process/host/platform.d.ts +57 -0
- package/dist/process/host/platform.js +1 -0
- package/dist/process/host-command.d.ts +4 -0
- package/dist/process/host-command.js +3 -0
- package/dist/process/host-inspection-command.d.ts +13 -0
- package/dist/process/host-inspection-command.js +1 -0
- package/dist/process/host-process.d.ts +14 -0
- package/dist/process/host-process.js +1 -0
- package/dist/process/index.d.ts +9 -0
- package/dist/process/index.js +1 -0
- package/dist/process/lifecycle-fence.d.ts +11 -0
- package/dist/process/lifecycle-fence.js +1 -0
- package/dist/process/locks.d.ts +28 -0
- package/dist/process/locks.js +4 -0
- package/dist/process/process-contracts.d.ts +70 -0
- package/dist/process/process-contracts.js +1 -0
- package/dist/process/process-group.d.ts +12 -0
- package/dist/process/process-group.js +1 -0
- package/dist/process/process-identity.d.ts +27 -0
- package/dist/process/process-identity.js +1 -0
- package/dist/process/process-limits.d.ts +6 -0
- package/dist/process/process-limits.js +1 -0
- package/dist/process/process.d.ts +11 -0
- package/dist/process/process.js +1 -0
- package/dist/process/readiness.d.ts +37 -0
- package/dist/process/readiness.js +1 -0
- package/dist/process/recovery.d.ts +3 -0
- package/dist/process/recovery.js +1 -0
- package/dist/process/runs/manifest.d.ts +85 -0
- package/dist/process/runs/manifest.js +1 -0
- package/dist/process/runs/ownership.d.ts +11 -0
- package/dist/process/runs/ownership.js +1 -0
- package/dist/process/runs/product-state.d.ts +2 -0
- package/dist/process/runs/product-state.js +1 -0
- package/dist/process/runs/schema.d.ts +3 -0
- package/dist/process/runs/schema.js +1 -0
- package/dist/process/runs/stop.d.ts +19 -0
- package/dist/process/runs/stop.js +1 -0
- package/dist/process/runtime-socket.d.ts +4 -0
- package/dist/process/runtime-socket.js +1 -0
- package/dist/process/service-processes.d.ts +13 -0
- package/dist/process/service-processes.js +1 -0
- package/dist/process/shutdown.d.ts +10 -0
- package/dist/process/shutdown.js +1 -0
- package/dist/process/windows-cli-owner.d.ts +2 -0
- package/dist/process/windows-cli-owner.js +3 -0
- package/dist/process/windows-native.d.ts +6 -0
- package/dist/process/windows-native.js +1 -0
- package/dist/process/windows-process-identity.d.ts +4 -0
- package/dist/process/windows-process-identity.js +1 -0
- package/dist/repo/ci-environment.d.ts +7 -0
- package/dist/repo/ci-environment.js +1 -0
- package/dist/repo/fingerprint-policy.d.ts +15 -0
- package/dist/repo/fingerprint-policy.js +1 -0
- package/dist/repo/git-path.d.ts +2 -0
- package/dist/repo/git-path.js +1 -0
- package/dist/repo/managed-git.d.ts +10 -0
- package/dist/repo/managed-git.js +1 -0
- package/dist/repo/metadata.d.ts +3 -0
- package/dist/repo/metadata.js +1 -0
- package/dist/repo/physical-tree.d.ts +37 -0
- package/dist/repo/physical-tree.js +1 -0
- package/dist/repo/remote.d.ts +6 -0
- package/dist/repo/remote.js +1 -0
- package/dist/repo/state.d.ts +25 -0
- package/dist/repo/state.js +5 -0
- package/dist/steps/build-config.d.ts +35 -0
- package/dist/steps/build-config.js +1 -0
- package/dist/steps/configured-step-testkit-modules.d.ts +19 -0
- package/dist/steps/configured-step-testkit-modules.js +1 -0
- package/dist/steps/configured-steps.d.ts +51 -0
- package/dist/steps/configured-steps.js +1 -0
- package/dist/steps/environment.d.ts +78 -0
- package/dist/steps/environment.js +1 -0
- package/dist/steps/index.d.ts +2 -0
- package/dist/steps/index.js +1 -0
- package/dist/steps/module-runner.d.ts +1 -0
- package/dist/steps/module-runner.js +1 -0
- package/dist/steps/run.d.ts +36 -0
- package/dist/steps/run.js +3 -0
- package/dist/toolchains/archive.d.ts +53 -0
- package/dist/toolchains/archive.js +1 -0
- package/dist/toolchains/esbuild.d.ts +9 -0
- package/dist/toolchains/esbuild.js +1 -0
- package/dist/toolchains/host-node-support.d.ts +3 -0
- package/dist/toolchains/host-node-support.js +1 -0
- package/dist/toolchains/index.d.ts +114 -0
- package/dist/toolchains/index.js +4 -0
- package/dist/toolchains/managed-node-releases.d.ts +28 -0
- package/dist/toolchains/managed-node-releases.js +1 -0
- package/dist/toolchains/node-cache.d.ts +20 -0
- package/dist/toolchains/node-cache.js +1 -0
- package/dist/toolchains/node-integrity.d.ts +16 -0
- package/dist/toolchains/node-integrity.js +1 -0
- package/dist/toolchains/node-provisioning.d.ts +29 -0
- package/dist/toolchains/node-provisioning.js +2 -0
- package/dist/toolchains/semver.d.ts +13 -0
- package/dist/toolchains/semver.js +1 -0
- package/dist/toolchains/shared-operation.d.ts +11 -0
- package/dist/toolchains/shared-operation.js +1 -0
- package/dist/toolchains/timeouts.d.ts +1 -0
- package/dist/toolchains/timeouts.js +1 -0
- package/dist/toolchains/vitest/index.d.ts +13 -0
- package/dist/toolchains/vitest/index.js +1 -0
- package/docs/cloud-control.md +105 -0
- package/docs/engine-architecture.md +631 -0
- package/docs/test-types.md +120 -0
- package/docs/testkit-cloud-boundary.md +640 -0
- package/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
- package/node_modules/@isaacs/fs-minipass/README.md +71 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +118 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +118 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/package.json +72 -0
- package/node_modules/buffer-crc32/LICENSE +19 -0
- package/node_modules/buffer-crc32/README.md +55 -0
- package/node_modules/buffer-crc32/dist/index.cjs +306 -0
- package/node_modules/buffer-crc32/dist/index.d.cts +35 -0
- package/node_modules/buffer-crc32/dist/index.d.mts +35 -0
- package/node_modules/buffer-crc32/dist/index.mjs +304 -0
- package/node_modules/buffer-crc32/index.d.ts +35 -0
- package/node_modules/buffer-crc32/package.json +54 -0
- package/node_modules/chownr/LICENSE.md +63 -0
- package/node_modules/chownr/README.md +3 -0
- package/node_modules/chownr/dist/commonjs/index.d.ts +3 -0
- package/node_modules/chownr/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/chownr/dist/commonjs/index.js +93 -0
- package/node_modules/chownr/dist/commonjs/index.js.map +1 -0
- package/node_modules/chownr/dist/commonjs/package.json +3 -0
- package/node_modules/chownr/dist/esm/index.d.ts +3 -0
- package/node_modules/chownr/dist/esm/index.d.ts.map +1 -0
- package/node_modules/chownr/dist/esm/index.js +85 -0
- package/node_modules/chownr/dist/esm/index.js.map +1 -0
- package/node_modules/chownr/dist/esm/package.json +3 -0
- package/node_modules/chownr/package.json +69 -0
- package/node_modules/diff/CONTRIBUTING.md +28 -0
- package/node_modules/diff/LICENSE +29 -0
- package/node_modules/diff/README.md +468 -0
- package/node_modules/diff/dist/diff.js +2313 -0
- package/node_modules/diff/dist/diff.min.js +1 -0
- package/node_modules/diff/eslint.config.mjs +182 -0
- package/node_modules/diff/libcjs/convert/dmp.d.ts +8 -0
- package/node_modules/diff/libcjs/convert/dmp.d.ts.map +1 -0
- package/node_modules/diff/libcjs/convert/dmp.js +24 -0
- package/node_modules/diff/libcjs/convert/xml.d.ts +6 -0
- package/node_modules/diff/libcjs/convert/xml.d.ts.map +1 -0
- package/node_modules/diff/libcjs/convert/xml.js +34 -0
- package/node_modules/diff/libcjs/diff/array.d.ts +19 -0
- package/node_modules/diff/libcjs/diff/array.d.ts.map +1 -0
- package/node_modules/diff/libcjs/diff/array.js +23 -0
- package/node_modules/diff/libcjs/diff/base.d.ts +20 -0
- package/node_modules/diff/libcjs/diff/base.d.ts.map +1 -0
- package/node_modules/diff/libcjs/diff/base.js +256 -0
- package/node_modules/diff/libcjs/diff/character.d.ts +19 -0
- package/node_modules/diff/libcjs/diff/character.d.ts.map +1 -0
- package/node_modules/diff/libcjs/diff/character.js +14 -0
- package/node_modules/diff/libcjs/diff/css.d.ts +18 -0
- package/node_modules/diff/libcjs/diff/css.d.ts.map +1 -0
- package/node_modules/diff/libcjs/diff/css.js +17 -0
- package/node_modules/diff/libcjs/diff/json.d.ts +24 -0
- package/node_modules/diff/libcjs/diff/json.d.ts.map +1 -0
- package/node_modules/diff/libcjs/diff/json.js +86 -0
- package/node_modules/diff/libcjs/diff/line.d.ts +24 -0
- package/node_modules/diff/libcjs/diff/line.d.ts.map +1 -0
- package/node_modules/diff/libcjs/diff/line.js +74 -0
- package/node_modules/diff/libcjs/diff/sentence.d.ts +21 -0
- package/node_modules/diff/libcjs/diff/sentence.d.ts.map +1 -0
- package/node_modules/diff/libcjs/diff/sentence.js +50 -0
- package/node_modules/diff/libcjs/diff/word.d.ts +35 -0
- package/node_modules/diff/libcjs/diff/word.d.ts.map +1 -0
- package/node_modules/diff/libcjs/diff/word.js +289 -0
- package/node_modules/diff/libcjs/index.d.ts +20 -0
- package/node_modules/diff/libcjs/index.d.ts.map +1 -0
- package/node_modules/diff/libcjs/index.js +67 -0
- package/node_modules/diff/libcjs/package.json +1 -0
- package/node_modules/diff/libcjs/patch/apply.d.ts +62 -0
- package/node_modules/diff/libcjs/patch/apply.d.ts.map +1 -0
- package/node_modules/diff/libcjs/patch/apply.js +264 -0
- package/node_modules/diff/libcjs/patch/create.d.ts +131 -0
- package/node_modules/diff/libcjs/patch/create.d.ts.map +1 -0
- package/node_modules/diff/libcjs/patch/create.js +364 -0
- package/node_modules/diff/libcjs/patch/line-endings.d.ts +17 -0
- package/node_modules/diff/libcjs/patch/line-endings.d.ts.map +1 -0
- package/node_modules/diff/libcjs/patch/line-endings.js +50 -0
- package/node_modules/diff/libcjs/patch/parse.d.ts +16 -0
- package/node_modules/diff/libcjs/patch/parse.d.ts.map +1 -0
- package/node_modules/diff/libcjs/patch/parse.js +515 -0
- package/node_modules/diff/libcjs/patch/reverse.d.ts +22 -0
- package/node_modules/diff/libcjs/patch/reverse.d.ts.map +1 -0
- package/node_modules/diff/libcjs/patch/reverse.js +63 -0
- package/node_modules/diff/libcjs/types.d.ts +260 -0
- package/node_modules/diff/libcjs/types.d.ts.map +1 -0
- package/node_modules/diff/libcjs/types.js +2 -0
- package/node_modules/diff/libcjs/util/array.d.ts +3 -0
- package/node_modules/diff/libcjs/util/array.d.ts.map +1 -0
- package/node_modules/diff/libcjs/util/array.js +21 -0
- package/node_modules/diff/libcjs/util/distance-iterator.d.ts +2 -0
- package/node_modules/diff/libcjs/util/distance-iterator.d.ts.map +1 -0
- package/node_modules/diff/libcjs/util/distance-iterator.js +40 -0
- package/node_modules/diff/libcjs/util/params.d.ts +4 -0
- package/node_modules/diff/libcjs/util/params.d.ts.map +1 -0
- package/node_modules/diff/libcjs/util/params.js +17 -0
- package/node_modules/diff/libcjs/util/string.d.ts +30 -0
- package/node_modules/diff/libcjs/util/string.d.ts.map +1 -0
- package/node_modules/diff/libcjs/util/string.js +199 -0
- package/node_modules/diff/libesm/convert/dmp.d.ts +8 -0
- package/node_modules/diff/libesm/convert/dmp.d.ts.map +1 -0
- package/node_modules/diff/libesm/convert/dmp.js +21 -0
- package/node_modules/diff/libesm/convert/xml.d.ts +6 -0
- package/node_modules/diff/libesm/convert/xml.d.ts.map +1 -0
- package/node_modules/diff/libesm/convert/xml.js +31 -0
- package/node_modules/diff/libesm/diff/array.d.ts +19 -0
- package/node_modules/diff/libesm/diff/array.d.ts.map +1 -0
- package/node_modules/diff/libesm/diff/array.js +16 -0
- package/node_modules/diff/libesm/diff/base.d.ts +20 -0
- package/node_modules/diff/libesm/diff/base.d.ts.map +1 -0
- package/node_modules/diff/libesm/diff/base.js +253 -0
- package/node_modules/diff/libesm/diff/character.d.ts +19 -0
- package/node_modules/diff/libesm/diff/character.d.ts.map +1 -0
- package/node_modules/diff/libesm/diff/character.js +7 -0
- package/node_modules/diff/libesm/diff/css.d.ts +18 -0
- package/node_modules/diff/libesm/diff/css.d.ts.map +1 -0
- package/node_modules/diff/libesm/diff/css.js +10 -0
- package/node_modules/diff/libesm/diff/json.d.ts +24 -0
- package/node_modules/diff/libesm/diff/json.d.ts.map +1 -0
- package/node_modules/diff/libesm/diff/json.js +78 -0
- package/node_modules/diff/libesm/diff/line.d.ts +24 -0
- package/node_modules/diff/libesm/diff/line.d.ts.map +1 -0
- package/node_modules/diff/libesm/diff/line.js +65 -0
- package/node_modules/diff/libesm/diff/sentence.d.ts +21 -0
- package/node_modules/diff/libesm/diff/sentence.d.ts.map +1 -0
- package/node_modules/diff/libesm/diff/sentence.js +43 -0
- package/node_modules/diff/libesm/diff/word.d.ts +35 -0
- package/node_modules/diff/libesm/diff/word.d.ts.map +1 -0
- package/node_modules/diff/libesm/diff/word.js +281 -0
- package/node_modules/diff/libesm/index.d.ts +20 -0
- package/node_modules/diff/libesm/index.d.ts.map +1 -0
- package/node_modules/diff/libesm/index.js +30 -0
- package/node_modules/diff/libesm/package.json +1 -0
- package/node_modules/diff/libesm/patch/apply.d.ts +62 -0
- package/node_modules/diff/libesm/patch/apply.d.ts.map +1 -0
- package/node_modules/diff/libesm/patch/apply.js +257 -0
- package/node_modules/diff/libesm/patch/create.d.ts +131 -0
- package/node_modules/diff/libesm/patch/create.d.ts.map +1 -0
- package/node_modules/diff/libesm/patch/create.js +357 -0
- package/node_modules/diff/libesm/patch/line-endings.d.ts +17 -0
- package/node_modules/diff/libesm/patch/line-endings.d.ts.map +1 -0
- package/node_modules/diff/libesm/patch/line-endings.js +44 -0
- package/node_modules/diff/libesm/patch/parse.d.ts +16 -0
- package/node_modules/diff/libesm/patch/parse.d.ts.map +1 -0
- package/node_modules/diff/libesm/patch/parse.js +512 -0
- package/node_modules/diff/libesm/patch/reverse.d.ts +22 -0
- package/node_modules/diff/libesm/patch/reverse.d.ts.map +1 -0
- package/node_modules/diff/libesm/patch/reverse.js +60 -0
- package/node_modules/diff/libesm/types.d.ts +260 -0
- package/node_modules/diff/libesm/types.d.ts.map +1 -0
- package/node_modules/diff/libesm/types.js +1 -0
- package/node_modules/diff/libesm/util/array.d.ts +3 -0
- package/node_modules/diff/libesm/util/array.d.ts.map +1 -0
- package/node_modules/diff/libesm/util/array.js +17 -0
- package/node_modules/diff/libesm/util/distance-iterator.d.ts +2 -0
- package/node_modules/diff/libesm/util/distance-iterator.d.ts.map +1 -0
- package/node_modules/diff/libesm/util/distance-iterator.js +37 -0
- package/node_modules/diff/libesm/util/params.d.ts +4 -0
- package/node_modules/diff/libesm/util/params.d.ts.map +1 -0
- package/node_modules/diff/libesm/util/params.js +14 -0
- package/node_modules/diff/libesm/util/string.d.ts +30 -0
- package/node_modules/diff/libesm/util/string.d.ts.map +1 -0
- package/node_modules/diff/libesm/util/string.js +184 -0
- package/node_modules/diff/package.json +130 -0
- package/node_modules/diff/release-notes.md +474 -0
- package/node_modules/minipass/LICENSE.md +55 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.d.ts +545 -0
- package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/esm/index.js +1020 -0
- package/node_modules/minipass/dist/esm/index.js.map +1 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +77 -0
- package/node_modules/minizlib/LICENSE +26 -0
- package/node_modules/minizlib/README.md +64 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
- package/node_modules/minizlib/dist/commonjs/constants.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.js +416 -0
- package/node_modules/minizlib/dist/commonjs/index.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/package.json +3 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/constants.js +117 -0
- package/node_modules/minizlib/dist/esm/constants.js.map +1 -0
- package/node_modules/minizlib/dist/esm/index.d.ts +99 -0
- package/node_modules/minizlib/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/index.js +363 -0
- package/node_modules/minizlib/dist/esm/index.js.map +1 -0
- package/node_modules/minizlib/dist/esm/package.json +3 -0
- package/node_modules/minizlib/package.json +80 -0
- package/node_modules/pend/LICENSE +23 -0
- package/node_modules/pend/README.md +41 -0
- package/node_modules/pend/index.js +55 -0
- package/node_modules/pend/package.json +18 -0
- package/node_modules/pend/test.js +137 -0
- package/node_modules/tar/LICENSE.md +55 -0
- package/node_modules/tar/README.md +1233 -0
- package/node_modules/tar/dist/commonjs/create.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/create.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/create.js +82 -0
- package/node_modules/tar/dist/commonjs/create.js.map +1 -0
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts +8 -0
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
- package/node_modules/tar/dist/commonjs/cwd-error.js.map +1 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/extract.js +88 -0
- package/node_modules/tar/dist/commonjs/extract.js.map +1 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.js.map +1 -0
- package/node_modules/tar/dist/commonjs/header.d.ts +53 -0
- package/node_modules/tar/dist/commonjs/header.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/header.js +348 -0
- package/node_modules/tar/dist/commonjs/header.js.map +1 -0
- package/node_modules/tar/dist/commonjs/index.d.ts +20 -0
- package/node_modules/tar/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/index.js +64 -0
- package/node_modules/tar/dist/commonjs/index.js.map +1 -0
- package/node_modules/tar/dist/commonjs/index.min.js +4 -0
- package/node_modules/tar/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
- package/node_modules/tar/dist/commonjs/large-numbers.js.map +1 -0
- package/node_modules/tar/dist/commonjs/list.d.ts +7 -0
- package/node_modules/tar/dist/commonjs/list.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/list.js +153 -0
- package/node_modules/tar/dist/commonjs/list.js.map +1 -0
- package/node_modules/tar/dist/commonjs/make-command.d.ts +49 -0
- package/node_modules/tar/dist/commonjs/make-command.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/make-command.js +52 -0
- package/node_modules/tar/dist/commonjs/make-command.js.map +1 -0
- package/node_modules/tar/dist/commonjs/mkdir.d.ts +25 -0
- package/node_modules/tar/dist/commonjs/mkdir.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/mkdir.js +187 -0
- package/node_modules/tar/dist/commonjs/mkdir.js.map +1 -0
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
- package/node_modules/tar/dist/commonjs/mode-fix.js.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.js.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +1 -0
- package/node_modules/tar/dist/commonjs/options.d.ts +604 -0
- package/node_modules/tar/dist/commonjs/options.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/options.js +66 -0
- package/node_modules/tar/dist/commonjs/options.js.map +1 -0
- package/node_modules/tar/dist/commonjs/pack.d.ts +105 -0
- package/node_modules/tar/dist/commonjs/pack.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/pack.js +544 -0
- package/node_modules/tar/dist/commonjs/pack.js.map +1 -0
- package/node_modules/tar/dist/commonjs/package.json +3 -0
- package/node_modules/tar/dist/commonjs/parse.d.ts +92 -0
- package/node_modules/tar/dist/commonjs/parse.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/parse.js +655 -0
- package/node_modules/tar/dist/commonjs/parse.js.map +1 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts +11 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
- package/node_modules/tar/dist/commonjs/path-reservations.js.map +1 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts +26 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/pax.js +182 -0
- package/node_modules/tar/dist/commonjs/pax.js.map +1 -0
- package/node_modules/tar/dist/commonjs/process-umask.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/process-umask.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/process-umask.js +7 -0
- package/node_modules/tar/dist/commonjs/process-umask.js.map +1 -0
- package/node_modules/tar/dist/commonjs/read-entry.d.ts +36 -0
- package/node_modules/tar/dist/commonjs/read-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/read-entry.js +136 -0
- package/node_modules/tar/dist/commonjs/read-entry.js.map +1 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/replace.js +227 -0
- package/node_modules/tar/dist/commonjs/replace.js.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map +1 -0
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts +9 -0
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
- package/node_modules/tar/dist/commonjs/symlink-error.js.map +1 -0
- package/node_modules/tar/dist/commonjs/types.d.ts +16 -0
- package/node_modules/tar/dist/commonjs/types.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/types.js +70 -0
- package/node_modules/tar/dist/commonjs/types.js.map +1 -0
- package/node_modules/tar/dist/commonjs/unpack.d.ts +101 -0
- package/node_modules/tar/dist/commonjs/unpack.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/unpack.js +932 -0
- package/node_modules/tar/dist/commonjs/unpack.js.map +1 -0
- package/node_modules/tar/dist/commonjs/update.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/update.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/update.js +33 -0
- package/node_modules/tar/dist/commonjs/update.js.map +1 -0
- package/node_modules/tar/dist/commonjs/warn-method.d.ts +24 -0
- package/node_modules/tar/dist/commonjs/warn-method.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/warn-method.js +31 -0
- package/node_modules/tar/dist/commonjs/warn-method.js.map +1 -0
- package/node_modules/tar/dist/commonjs/winchars.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/winchars.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/winchars.js +14 -0
- package/node_modules/tar/dist/commonjs/winchars.js.map +1 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts +129 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/write-entry.js +698 -0
- package/node_modules/tar/dist/commonjs/write-entry.js.map +1 -0
- package/node_modules/tar/dist/esm/create.d.ts +3 -0
- package/node_modules/tar/dist/esm/create.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/create.js +76 -0
- package/node_modules/tar/dist/esm/create.js.map +1 -0
- package/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
- package/node_modules/tar/dist/esm/cwd-error.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/cwd-error.js +14 -0
- package/node_modules/tar/dist/esm/cwd-error.js.map +1 -0
- package/node_modules/tar/dist/esm/extract.d.ts +3 -0
- package/node_modules/tar/dist/esm/extract.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/extract.js +49 -0
- package/node_modules/tar/dist/esm/extract.js.map +1 -0
- package/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
- package/node_modules/tar/dist/esm/get-write-flag.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/get-write-flag.js +26 -0
- package/node_modules/tar/dist/esm/get-write-flag.js.map +1 -0
- package/node_modules/tar/dist/esm/header.d.ts +53 -0
- package/node_modules/tar/dist/esm/header.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/header.js +311 -0
- package/node_modules/tar/dist/esm/header.js.map +1 -0
- package/node_modules/tar/dist/esm/index.d.ts +20 -0
- package/node_modules/tar/dist/esm/index.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/index.js +20 -0
- package/node_modules/tar/dist/esm/index.js.map +1 -0
- package/node_modules/tar/dist/esm/index.min.js +4 -0
- package/node_modules/tar/dist/esm/index.min.js.map +7 -0
- package/node_modules/tar/dist/esm/large-numbers.d.ts +3 -0
- package/node_modules/tar/dist/esm/large-numbers.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/large-numbers.js +94 -0
- package/node_modules/tar/dist/esm/large-numbers.js.map +1 -0
- package/node_modules/tar/dist/esm/list.d.ts +7 -0
- package/node_modules/tar/dist/esm/list.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/list.js +113 -0
- package/node_modules/tar/dist/esm/list.js.map +1 -0
- package/node_modules/tar/dist/esm/make-command.d.ts +49 -0
- package/node_modules/tar/dist/esm/make-command.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/make-command.js +48 -0
- package/node_modules/tar/dist/esm/make-command.js.map +1 -0
- package/node_modules/tar/dist/esm/mkdir.d.ts +25 -0
- package/node_modules/tar/dist/esm/mkdir.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/mkdir.js +179 -0
- package/node_modules/tar/dist/esm/mkdir.js.map +1 -0
- package/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
- package/node_modules/tar/dist/esm/mode-fix.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/mode-fix.js +25 -0
- package/node_modules/tar/dist/esm/mode-fix.js.map +1 -0
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
- package/node_modules/tar/dist/esm/normalize-unicode.js.map +1 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.js.map +1 -0
- package/node_modules/tar/dist/esm/options.d.ts +604 -0
- package/node_modules/tar/dist/esm/options.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/options.js +54 -0
- package/node_modules/tar/dist/esm/options.js.map +1 -0
- package/node_modules/tar/dist/esm/pack.d.ts +105 -0
- package/node_modules/tar/dist/esm/pack.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/pack.js +502 -0
- package/node_modules/tar/dist/esm/pack.js.map +1 -0
- package/node_modules/tar/dist/esm/package.json +3 -0
- package/node_modules/tar/dist/esm/parse.d.ts +92 -0
- package/node_modules/tar/dist/esm/parse.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/parse.js +651 -0
- package/node_modules/tar/dist/esm/parse.js.map +1 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts +11 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/path-reservations.js +166 -0
- package/node_modules/tar/dist/esm/path-reservations.js.map +1 -0
- package/node_modules/tar/dist/esm/pax.d.ts +26 -0
- package/node_modules/tar/dist/esm/pax.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/pax.js +178 -0
- package/node_modules/tar/dist/esm/pax.js.map +1 -0
- package/node_modules/tar/dist/esm/process-umask.d.ts +2 -0
- package/node_modules/tar/dist/esm/process-umask.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/process-umask.js +3 -0
- package/node_modules/tar/dist/esm/process-umask.js.map +1 -0
- package/node_modules/tar/dist/esm/read-entry.d.ts +36 -0
- package/node_modules/tar/dist/esm/read-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/read-entry.js +132 -0
- package/node_modules/tar/dist/esm/read-entry.js.map +1 -0
- package/node_modules/tar/dist/esm/replace.d.ts +2 -0
- package/node_modules/tar/dist/esm/replace.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/replace.js +221 -0
- package/node_modules/tar/dist/esm/replace.js.map +1 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +2 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js.map +1 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +2 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js.map +1 -0
- package/node_modules/tar/dist/esm/symlink-error.d.ts +9 -0
- package/node_modules/tar/dist/esm/symlink-error.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/symlink-error.js +15 -0
- package/node_modules/tar/dist/esm/symlink-error.js.map +1 -0
- package/node_modules/tar/dist/esm/types.d.ts +16 -0
- package/node_modules/tar/dist/esm/types.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/types.js +65 -0
- package/node_modules/tar/dist/esm/types.js.map +1 -0
- package/node_modules/tar/dist/esm/unpack.d.ts +101 -0
- package/node_modules/tar/dist/esm/unpack.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/unpack.js +891 -0
- package/node_modules/tar/dist/esm/unpack.js.map +1 -0
- package/node_modules/tar/dist/esm/update.d.ts +2 -0
- package/node_modules/tar/dist/esm/update.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/update.js +30 -0
- package/node_modules/tar/dist/esm/update.js.map +1 -0
- package/node_modules/tar/dist/esm/warn-method.d.ts +24 -0
- package/node_modules/tar/dist/esm/warn-method.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/warn-method.js +27 -0
- package/node_modules/tar/dist/esm/warn-method.js.map +1 -0
- package/node_modules/tar/dist/esm/winchars.d.ts +3 -0
- package/node_modules/tar/dist/esm/winchars.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/winchars.js +9 -0
- package/node_modules/tar/dist/esm/winchars.js.map +1 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts +129 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/write-entry.js +656 -0
- package/node_modules/tar/dist/esm/write-entry.js.map +1 -0
- package/node_modules/tar/package.json +298 -0
- package/node_modules/typescript/LICENSE.txt +55 -0
- package/node_modules/typescript/README.md +50 -0
- package/node_modules/typescript/SECURITY.md +41 -0
- package/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- package/node_modules/typescript/bin/tsc +2 -0
- package/node_modules/typescript/bin/tsserver +2 -0
- package/node_modules/typescript/lib/_tsc.js +133818 -0
- package/node_modules/typescript/lib/_tsserver.js +659 -0
- package/node_modules/typescript/lib/_typingsInstaller.js +222 -0
- package/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/lib.d.ts +22 -0
- package/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
- package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
- package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
- package/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
- package/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
- package/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
- package/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
- package/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
- package/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
- package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
- package/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
- package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
- package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
- package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
- package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
- package/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
- package/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- package/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
- package/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
- package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
- package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
- package/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
- package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
- package/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
- package/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
- package/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
- package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
- package/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
- package/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
- package/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
- package/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
- package/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
- package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
- package/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
- package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
- package/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
- package/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
- package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
- package/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
- package/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
- package/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
- package/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
- package/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
- package/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
- package/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
- package/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
- package/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
- package/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
- package/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
- package/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
- package/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
- package/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
- package/node_modules/typescript/lib/lib.es6.d.ts +23 -0
- package/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
- package/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
- package/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
- package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
- package/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
- package/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
- package/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
- package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
- package/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
- package/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
- package/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
- package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
- package/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
- package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
- package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
- package/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/tsc.js +8 -0
- package/node_modules/typescript/lib/tsserver.js +8 -0
- package/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
- package/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- package/node_modules/typescript/lib/typesMap.json +497 -0
- package/node_modules/typescript/lib/typescript.d.ts +11437 -0
- package/node_modules/typescript/lib/typescript.js +200276 -0
- package/node_modules/typescript/lib/typingsInstaller.js +8 -0
- package/node_modules/typescript/lib/watchGuard.js +53 -0
- package/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/package.json +120 -0
- package/node_modules/yallist/LICENSE.md +63 -0
- package/node_modules/yallist/README.md +205 -0
- package/node_modules/yallist/dist/commonjs/index.d.ts +39 -0
- package/node_modules/yallist/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/yallist/dist/commonjs/index.js +384 -0
- package/node_modules/yallist/dist/commonjs/index.js.map +1 -0
- package/node_modules/yallist/dist/commonjs/package.json +3 -0
- package/node_modules/yallist/dist/esm/index.d.ts +39 -0
- package/node_modules/yallist/dist/esm/index.d.ts.map +1 -0
- package/node_modules/yallist/dist/esm/index.js +379 -0
- package/node_modules/yallist/dist/esm/index.js.map +1 -0
- package/node_modules/yallist/dist/esm/package.json +3 -0
- package/node_modules/yallist/package.json +68 -0
- package/node_modules/yauzl/LICENSE +21 -0
- package/node_modules/yauzl/README.md +1015 -0
- package/node_modules/yauzl/crc32.js +45 -0
- package/node_modules/yauzl/fd-slicer.js +188 -0
- package/node_modules/yauzl/index.js +1096 -0
- package/node_modules/yauzl/package.json +40 -0
- package/node_modules/yazl/LICENSE +21 -0
- package/node_modules/yazl/README.md +457 -0
- package/node_modules/yazl/index.js +826 -0
- package/node_modules/yazl/package.json +34 -0
- package/package.json +163 -0
- package/testkit-config-schema.md +718 -0
|
Binary file
|
|
Binary file
|
package/bin/testkit.mjs
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { hostNodeIsSupported, TESTKIT_SUPPORTED_HOST_NODE_RANGE } from "../dist/toolchains/host-node-support.js";
|
|
3
|
+
|
|
4
|
+
const HOST_NODE_ERROR_CODE = "TESTKIT_HOST_NODE_UNSUPPORTED";
|
|
5
|
+
|
|
6
|
+
class UnsupportedTestkitHostNodeError extends Error {
|
|
7
|
+
code = HOST_NODE_ERROR_CODE;
|
|
8
|
+
|
|
9
|
+
constructor(actualVersion) {
|
|
10
|
+
super(
|
|
11
|
+
`Testkit requires Node ${TESTKIT_SUPPORTED_HOST_NODE_RANGE}; current host is Node ${actualVersion}. Upgrade the Node executable used to launch testkit and rerun the command.`,
|
|
12
|
+
);
|
|
13
|
+
this.name = "UnsupportedTestkitHostNodeError";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (!hostNodeIsSupported(process.versions.node)) {
|
|
18
|
+
const error = new UnsupportedTestkitHostNodeError(process.versions.node);
|
|
19
|
+
const json = hasControlFlag(process.argv.slice(2), "--json");
|
|
20
|
+
process.stderr.write(
|
|
21
|
+
json
|
|
22
|
+
? `${JSON.stringify({ code: error.code, message: error.message, name: error.name })}\n`
|
|
23
|
+
: `[${error.code}] ${error.message}\n`,
|
|
24
|
+
);
|
|
25
|
+
process.exitCode = 1;
|
|
26
|
+
} else {
|
|
27
|
+
const [{ normalizeCliArgs }, versionDrift] = await Promise.all([
|
|
28
|
+
import("../dist/cli/entrypoint.js"),
|
|
29
|
+
import("../dist/cli/version-drift.js"),
|
|
30
|
+
]);
|
|
31
|
+
const effectiveArgs = normalizeCliArgs(process.argv.slice(2));
|
|
32
|
+
const versionMismatch = versionDrift.checkCliVersionDrift(effectiveArgs, {
|
|
33
|
+
binUrl: import.meta.url,
|
|
34
|
+
});
|
|
35
|
+
if (
|
|
36
|
+
!versionDrift.emitCliVersionDriftAndExit(versionMismatch, {
|
|
37
|
+
json: versionDrift.isJsonMode(effectiveArgs),
|
|
38
|
+
})
|
|
39
|
+
) {
|
|
40
|
+
const { executeCli } = await import("../dist/cli/index.js");
|
|
41
|
+
await executeCli(
|
|
42
|
+
effectiveArgs,
|
|
43
|
+
process.platform === "win32"
|
|
44
|
+
? {
|
|
45
|
+
async beforeAction(id) {
|
|
46
|
+
if (id[0] === "guard") return;
|
|
47
|
+
const { ensureWindowsCliOwnership } = await import("../dist/process/windows-cli-owner.js");
|
|
48
|
+
await ensureWindowsCliOwnership();
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
: {},
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function hasControlFlag(arguments_, flag) {
|
|
57
|
+
const separatorIndex = arguments_.indexOf("--");
|
|
58
|
+
const controls = separatorIndex < 0 ? arguments_ : arguments_.slice(0, separatorIndex);
|
|
59
|
+
return controls.includes(flag);
|
|
60
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { NormalizedServiceConfig } from "../../config/loader/index.js";
|
|
2
|
+
import { type BundleCleanupTarget } from "../../engines/bundle-cache.js";
|
|
3
|
+
import { type ResourceCleanupSummary, type RuntimeCleanupTarget, type RunManifest } from "../../environment/maintenance.js";
|
|
4
|
+
export interface MaintenanceCleanupOptions {
|
|
5
|
+
allConfigs?: readonly NormalizedServiceConfig[];
|
|
6
|
+
cache?: unknown;
|
|
7
|
+
dryRun?: unknown;
|
|
8
|
+
resources?: unknown;
|
|
9
|
+
serviceName?: null | string;
|
|
10
|
+
}
|
|
11
|
+
export interface CleanupTargets {
|
|
12
|
+
bundles: BundleCleanupTarget[];
|
|
13
|
+
runtime: RuntimeCleanupTarget[];
|
|
14
|
+
}
|
|
15
|
+
export interface MaintenanceCleanupResult {
|
|
16
|
+
bundleCleaned: BundleCleanupTarget[];
|
|
17
|
+
cleaned: RunManifest[];
|
|
18
|
+
dryRun: boolean;
|
|
19
|
+
automaticResourceCleanup: ResourceCleanupSummary[];
|
|
20
|
+
resourceCleanup: ResourceCleanupSummary;
|
|
21
|
+
runtimeCleaned: RuntimeCleanupTarget[];
|
|
22
|
+
skippedActive: RunManifest[];
|
|
23
|
+
stoppedActive: RunManifest[];
|
|
24
|
+
targets: CleanupTargets;
|
|
25
|
+
}
|
|
26
|
+
export type CleanupRunSummaries = Awaited<ReturnType<typeof cleanupEnvironment>>["runSummaries"];
|
|
27
|
+
export interface CleanupOptions {
|
|
28
|
+
cache: unknown;
|
|
29
|
+
dir?: string;
|
|
30
|
+
dryRun: boolean;
|
|
31
|
+
resources: boolean;
|
|
32
|
+
service?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function cleanupEnvironment(options: Readonly<CleanupOptions>): Promise<{
|
|
35
|
+
productDir: string;
|
|
36
|
+
result: MaintenanceCleanupResult;
|
|
37
|
+
runSummaries: {
|
|
38
|
+
cleaned: {
|
|
39
|
+
runId: string;
|
|
40
|
+
summary: string;
|
|
41
|
+
}[];
|
|
42
|
+
stoppedActive: {
|
|
43
|
+
runId: string;
|
|
44
|
+
summary: string;
|
|
45
|
+
}[];
|
|
46
|
+
skippedActive: {
|
|
47
|
+
runId: string;
|
|
48
|
+
summary: string;
|
|
49
|
+
}[];
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
export declare function cleanup(productDir: string, options?: Readonly<MaintenanceCleanupOptions>): Promise<MaintenanceCleanupResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{formatRunSummary as m}from"../../process/runs/manifest.js";import d from"path";import{pruneEmptyDir as p}from"../../process/files/directory-status.js";import f from"fs";import{loadManagedConfigs as v}from"../../config/loader/managed-configs.js";import{collectBundleCleanupTargets as g}from"../../engines/bundle-cache.js";import{createEnvironmentMaintenance as y}from"../../environment/maintenance.js";import{runtimePlanning as h}from"../../environment/runtime-planning.js";export async function cleanupEnvironment(e){const{allConfigs:r}=await v({dir:e.dir,service:e.service}),n=r[0]?.productDir||process.cwd(),t=await cleanup(n,{allConfigs:r,serviceName:e.service||null,dryRun:e.dryRun,cache:e.cache,resources:e.resources}),a={cleaned:s(t.cleaned),stoppedActive:s(t.stoppedActive),skippedActive:s(t.skippedActive)};return{productDir:n,result:t,runSummaries:a}}export async function cleanup(e,r={}){const n=r.allConfigs??[],t=r.serviceName||null,a=C(r.cache),{environment:c,otherCaches:u}=await y(e).maintain({kind:"cleanup",desiredGraphs:h.collectDesiredRuntimeGraphs(n),serviceName:t,dryRun:!!r.dryRun,resources:!!r.resources},()=>{const i=a.includes("bundles")?g(e,{allConfigs:n,serviceName:t}):[],o=[];return{result:{targets:i,cleaned:o},prune(){for(const l of i)f.rmSync(l.path,{force:!0}),o.push(l);p(d.join(e,".testkit","_bundles"))}}});return{...c,targets:{runtime:c.targets,bundles:u.targets},bundleCleaned:u.cleaned}}function C(e){const n=(Array.isArray(e)?e:e?[e]:[]).filter(Boolean).map(String);return n.includes("all")?["runtime","bundles"]:n}function s(e){return e.map(r=>({runId:r.runId,summary:m(r)}))}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CloudClient, type CloudReceipt } from "../../cloud/client.js";
|
|
2
|
+
import { type CampaignReport, type CampaignResult } from "../../cloud/campaigns.js";
|
|
3
|
+
export declare function readCampaignReportFile(file: string): unknown;
|
|
4
|
+
export declare function requiresVerificationPreflight(currentVersion: number, expectedVersion: number): boolean;
|
|
5
|
+
export declare function checkVerificationSubmission(client: CloudClient, report: CampaignReport, productDir: string): Promise<void>;
|
|
6
|
+
export declare function associateReceipt(client: CloudClient, receipt: CloudReceipt, campaignId: string): Promise<CampaignResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import c from"node:fs";import u from"node:path";import p from"node:crypto";import{CloudResponseError as m}from"../../cloud/client.js";import{campaignError as f}from"../../cloud/campaigns.js";import{loadTestkitConfig as l,minimumConfirmingRuns as g}from"../../config/loader/index.js";import{attachErrorDiagnostics as d}from"../../kernel/error-serialization.js";import{shellQuote as h}from"../../process/host/platform.js";export function readCampaignReportFile(r){const e=c.openSync(u.resolve(r),"r");try{if(!c.fstatSync(e).isFile())throw f("file","report must be a regular file");const n=Buffer.alloc(65537);let t=0;for(;t<n.length;){const i=c.readSync(e,n,t,n.length-t,null);if(!i)break;t+=i}if(t>65536)throw f("file","report exceeds 65,536 bytes");try{return JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(n.subarray(0,t)))}catch{throw f("file","report must contain valid UTF-8 JSON")}}finally{c.closeSync(e)}}export function requiresVerificationPreflight(r,e){if(r<e)throw d(Object.assign(new Error("Verification report names a future campaign version; read current state before submitting"),{code:"campaign_version_conflict",status:409}),{source:"local",currentVersion:r,expectedVersion:e});return r===e}export async function checkVerificationSubmission(r,e,n){if(e.command.type==="finding.verify"&&requiresVerificationPreflight((await r.campaign(e.campaignId)).version,e.expectedVersion))try{const t=await r.finding(e.campaignId,e.command.findingId);if(!requiresVerificationPreflight(t.campaignVersion,e.expectedVersion))return;const i=g((await l(n)).config),o=new Set(t.evidence.filter(a=>a.available).map(a=>a.receiptId)),s=new Set;for(const a of o)s.add((await r.receipt(a)).runId);if(s.size<i)throw d(Object.assign(new Error(`Local verification submission requires ${String(i)} distinct confirming runs; ${String(s.size)} eligible`),{code:"local_insufficient_confirmations"}),{source:"local",required:i,eligible:s.size})}catch(t){if((await r.campaign(e.campaignId)).version>e.expectedVersion)return;throw t}}export async function associateReceipt(r,e,n){let t;try{const i=await r.campaign(n),o="link:"+p.createHash("sha256").update(JSON.stringify([r.projectId,n,e.id,i.version])).digest("hex");return t={schemaVersion:1,projectId:r.projectId,campaignId:n,expectedVersion:i.version,idempotencyKey:o,command:{type:"receipt.link",receiptId:e.id}},await r.report(t)}catch(i){const o=t?i instanceof m&&i.status<500?"rejected":"unknown":"not_attempted";throw i instanceof Error&&(i.message=`Published run ${e.runId} (${e.id}); campaign association did not return a confirmed result. ${i.message}. Use --json for receipt and report recovery details.`),d(i,{publication:{status:"accepted",receipt:e},association:{campaignId:n,status:o,...t?{report:t}:{}},recovery:o==="rejected"?"Resolve the rejection, then repeat publication to read the current campaign version and reuse the accepted receipt: testkit cloud publish --run "+h(e.runId)+" --campaign "+n+" --json":t?"Save association.report as JSON and retry: testkit cloud apply --campaign "+n+" --file report.json --json":"Read the campaign version, then submit receipt.link for accepted receipt "+e.id})}}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ControlOptions } from "./control.js";
|
|
2
|
+
export declare function createCloudCampaign(options: ControlOptions & {
|
|
3
|
+
requestKey?: string;
|
|
4
|
+
focus?: string;
|
|
5
|
+
targetBugCount?: number;
|
|
6
|
+
}): Promise<unknown>;
|
|
7
|
+
export declare function previewCloudPolicy(policy: string, file: string, options: ControlOptions): Promise<unknown>;
|
|
8
|
+
export declare function downloadCloudArtifact(receipt: string, artifactPath: string, output: string, options: ControlOptions): Promise<unknown>;
|
|
9
|
+
export declare function revokeCloudSession(id: string, options: ControlOptions): Promise<{
|
|
10
|
+
id: string;
|
|
11
|
+
revoked: true;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import p from"node:fs";import f from"node:path";import{randomUUID as d}from"node:crypto";import{controlClient as c,resolveOrganisation as w,resolveProject as h}from"./control.js";import{allItems as y,createdResourceDashboardLink as g}from"./control-links.js";import{invalidResponse as v}from"../../cloud/transport.js";export async function createCloudCampaign(e){const t=await c(e),r=await h(t,e),n=e.requestKey??d();e.notify?.(`Request key: ${n}. Reuse --request-key ${n} to retry the same campaign creation.
|
|
2
|
+
`);const a=await t.request("POST",`/api/v1/projects/${encodeURIComponent(r)}/campaigns`,{schemaVersion:1,projectId:r,idempotencyKey:n,focus:e.focus??"",...e.targetBugCount!==void 0?{targetBugCount:e.targetBugCount}:{}});return g(t,"campaign",a,e.env??process.env)}export async function previewCloudPolicy(e,t,r){const n=await c(r),a=await w(n,r.organisation,r.choose),i=p.statSync(t);if(!i.isFile()||i.size>256*1024)throw new Error("Policy preview input must be a JSON file no larger than 256 KiB.");const l=JSON.parse(p.readFileSync(t,"utf8"));return n.request("POST",`/api/v1/organisations/${encodeURIComponent(a)}/policies/${encodeURIComponent(e)}/preview`,l)}export async function downloadCloudArtifact(e,t,r,n){const a=await c(n);if(t.split("/").some(s=>!s||s==="."||s==="..")||t.includes("\\"))throw new Error("Artifact path must be a normalized relative path.");const i=`/api/v1/receipts/${encodeURIComponent(e)}/artifacts`,o=(await y(a,i)).find(s=>s.path===t);if(!o)throw new Error("This receipt has no artifact at the requested path.");if(o.available!==!0)throw new Error("Artifact evidence has expired. Its manifest metadata is still available.");if(typeof o.bytes!="number"||typeof o.sha256!="string")throw v("artifact manifest");const u=f.resolve(r);if(p.existsSync(u))throw new Error("Output file already exists. Choose a new path.");const m=new URL(`${i}/${t.split("/").map(encodeURIComponent).join("/")}`,a.origin);return await a.downloadArtifact(m,u,{bytes:o.bytes,sha256:o.sha256}),{receiptId:e,path:t,output:u,bytes:o.bytes,sha256:o.sha256}}export async function revokeCloudSession(e,t){if(!e.trim())throw new Error("Session ID is required");return await(await c(t,!1)).request("DELETE",`/api/v1/auth/cli/sessions/${encodeURIComponent(e)}`),{id:e,revoked:!0}}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type CloudAccountClient } from "../../cloud/account.js";
|
|
2
|
+
export declare function allItems(client: CloudAccountClient, target: string): Promise<Record<string, unknown>[]>;
|
|
3
|
+
export declare function resourceDashboardLinks(client: CloudAccountClient, resource: string, value: unknown, env: NodeJS.ProcessEnv): Promise<unknown>;
|
|
4
|
+
export declare function cloudDashboardUrl(origin: string, organisation: string, project: string, campaign?: string): string;
|
|
5
|
+
export declare function createdResourceDashboardLink(client: CloudAccountClient, resource: "project" | "campaign", result: unknown, env: NodeJS.ProcessEnv): Promise<unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isCloudAccountToken as y}from"../../cloud/account.js";import{isUnknownRecord as t}from"../../kernel/unknown-values.js";import{invalidResponse as c}from"../../cloud/transport.js";export async function allItems(i,s){const r=[],e=new Set;let o="";do{const a=new URL(s,i.origin);a.searchParams.set("limit","100"),o&&a.searchParams.set("cursor",o);const n=await i.request("GET",a.href);if(!t(n)||!Array.isArray(n.items)||!n.items.every(t)||typeof n.nextCursor!="string")throw c("resource page");if(r.push(...n.items),o=n.nextCursor,o&&e.has(o))throw c("repeated page cursor");e.add(o)}while(o);return r}export async function resourceDashboardLinks(i,s,r,e){if(!["project","projects","campaign","campaigns"].includes(s)||!t(r))return r;const o=e.TESTKIT_CLOUD_TOKEN;if(o!==void 0&&!y(o))return r;const a=await allItems(i,"/api/v1/organisations"),n=s==="campaign"||s==="campaigns",d=Array.isArray(r.items)?r.items[0]:r;if(n&&d===void 0)return r;if(n&&(!t(d)||typeof d.projectId!="string"))throw c("campaign project");const u=n&&t(d)?await i.request("GET",`/api/v1/projects/${encodeURIComponent(String(d.projectId))}`):void 0;function m(p){if(!t(p))throw c("dashboard resource");const g=n?u:p;if(!t(g)||typeof g.slug!="string")throw c("project slug");const f=a.find(h=>t(h.organisation)&&h.organisation.id===g.organisationId);if(!f||!t(f.organisation)||typeof f.organisation.slug!="string")throw c("organisation slug");if(n&&typeof p.id!="string")throw c("campaign identity");return{...p,dashboardUrl:cloudDashboardUrl(i.origin,f.organisation.slug,g.slug,n?p.id:void 0)}}return Array.isArray(r.items)?{...r,items:r.items.map(m)}:m(r)}export function cloudDashboardUrl(i,s,r,e){const o=`/dashboard/${encodeURIComponent(s)}/${encodeURIComponent(r)}`;return new URL(e?`${o}/campaigns/${encodeURIComponent(e)}`:o,i).href}export async function createdResourceDashboardLink(i,s,r,e){if(!t(r))return r;const o=s==="project"?r.project:{...r,id:r.campaignId};try{const a=await resourceDashboardLinks(i,s,o,e);return t(a)&&typeof a.dashboardUrl=="string"?{...r,dashboardUrl:a.dashboardUrl}:r}catch{return r}}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { cloudDashboardUrl } from "./control-links.js";
|
|
2
|
+
import { type ControlOptions } from "./control.js";
|
|
3
|
+
export interface ReadOptions extends ControlOptions {
|
|
4
|
+
limit?: number;
|
|
5
|
+
cursor?: string;
|
|
6
|
+
branch?: string;
|
|
7
|
+
decision?: string;
|
|
8
|
+
pr?: number;
|
|
9
|
+
sort?: string;
|
|
10
|
+
direction?: string;
|
|
11
|
+
flaky?: boolean;
|
|
12
|
+
receipt?: string;
|
|
13
|
+
caseId?: string;
|
|
14
|
+
testPath?: string;
|
|
15
|
+
page?: number;
|
|
16
|
+
campaign?: string;
|
|
17
|
+
filePath?: string;
|
|
18
|
+
rootCauseKey?: string;
|
|
19
|
+
issueReference?: string;
|
|
20
|
+
view?: string;
|
|
21
|
+
order?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function listCloudResources(resource: string, options: ReadOptions): Promise<unknown>;
|
|
24
|
+
export declare function showCloudResource(resource: string, id: string | undefined, options: ReadOptions): Promise<unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resourceDashboardLinks as p}from"./control-links.js";export{cloudDashboardUrl}from"./control-links.js";import{validateCloudListFilters as w}from"./control-resources.js";import{controlClient as m,resolveOrganisation as t,resolveProject as n}from"./control.js";export async function listCloudResources(i,e){w(i,{...e});const a=await m(e,i!=="sessions");let r;switch(i){case"artifacts":if(!e.receipt)throw new Error("Artifact listing requires --receipt");r=`/api/v1/receipts/${encodeURIComponent(e.receipt)}/artifacts`;break;case"metrics":r=`/api/v1/projects/${encodeURIComponent(await n(a,e))}/metrics`;break;case"case-occurrences":case"case-history":if(!e.caseId)throw new Error("Case history requires --case");r=`/api/v1/projects/${encodeURIComponent(await n(a,e))}/cases/${encodeURIComponent(e.caseId)}/${i==="case-history"?"history":"occurrences"}`;break;case"file-history":if(!e.testPath)throw new Error("File history requires --path");r=`/api/v1/projects/${encodeURIComponent(await n(a,e))}/file-history`;break;case"sessions":r="/api/v1/auth/cli/sessions";break;case"organisations":r="/api/v1/organisations";break;case"projects":r="/api/v1/projects";break;case"members":case"invitations":case"providers":case"policies":case"audit":r=`/api/v1/organisations/${encodeURIComponent(await t(a,e.organisation,e.choose))}/${i}`;break;case"notifications":case"tokens":case"campaigns":case"runs":case"tests":r=`/api/v1/projects/${encodeURIComponent(await n(a,e))}/${i}`;break;case"findings":r=`/api/v1/projects/${encodeURIComponent(await n(a,e))}/campaigns/${e.campaign?`${encodeURIComponent(e.campaign)}/`:""}findings`;break;case"cases":r=`/api/v1/projects/${encodeURIComponent(await n(a,e))}/cases`;break;default:throw new Error(`Unknown resource: ${i}`)}const s=new URL(r,a.origin),c={limit:e.limit,cursor:e.cursor,branch:e.branch,decision:e.decision,pr:e.pr,sort:e.sort,direction:e.direction,flaky:e.flaky,path:e.testPath,page:e.page,rootCauseKey:e.rootCauseKey,issueReference:e.issueReference,view:e.view,order:e.order};for(const[d,o]of Object.entries(c))o!==void 0&&s.searchParams.set(d,String(o));return i==="projects"&&e.organisation&&s.searchParams.set("organisationId",await t(a,e.organisation,e.choose)),p(a,i,await a.request("GET",s.href),e.env??process.env)}export async function showCloudResource(i,e,a){const r=await m(a),s=()=>{if(!e)throw new Error(`cloud show ${i} requires an ID`);return encodeURIComponent(e)};let c;switch(i){case"account":c="/api/v1/account";break;case"organisation":c=`/api/v1/organisations/${encodeURIComponent(await t(r,e??a.organisation,a.choose))}`;break;case"project":c=`/api/v1/projects/${encodeURIComponent(await n(r,{...a,project:e??a.project}))}`;break;case"policy":c=`/api/v1/organisations/${encodeURIComponent(await t(r,a.organisation,a.choose))}/policies/${s()}`;break;case"campaign":c=`/api/v1/projects/${encodeURIComponent(await n(r,a))}/campaigns/${s()}`;break;case"finding":if(!a.campaign)throw new Error("Finding detail requires --campaign");c=`/api/v1/projects/${encodeURIComponent(await n(r,a))}/campaigns/${encodeURIComponent(a.campaign)}/findings/${s()}`;break;case"receipt":c=`/api/v1/receipts/${s()}`;break;case"run":c=`/api/v1/runs/${s()}`;break;case"case":c=`/api/v1/projects/${encodeURIComponent(await n(r,a))}/cases/${s()}`;break;case"test-file":c=`/api/v1/projects/${encodeURIComponent(await n(r,a))}/test-file?path=${s()}`;break;case"project-policy":c=`/api/v1/projects/${encodeURIComponent(await n(r,a))}/policy`;break;case"performance":c=`/api/v1/projects/${encodeURIComponent(await n(r,a))}/performance`;break;case"connection":c=`/api/v1/project-connections/${s()}`;break;default:throw new Error(`Unknown resource: ${i}`)}return p(r,i,await r.request("GET",c),a.env??process.env)}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const cloudListResources: Readonly<Record<string, readonly string[]>>;
|
|
2
|
+
export declare const cloudShowResources: readonly ["account", "organisation", "project", "policy", "campaign", "finding", "receipt", "run", "case", "test-file", "performance", "project-policy", "connection"];
|
|
3
|
+
export declare function validateCloudListFilters(resource: string, options: Record<string, unknown>): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=["limit","cursor"];export const cloudListResources={organisations:e,projects:e,members:e,invitations:e,providers:e,policies:e,notifications:e,tokens:e,sessions:[],campaigns:e,findings:[...e,"campaign","rootCauseKey","issueReference","view","order"],runs:["limit","branch","decision","pr","sort","direction","page"],tests:["flaky"],audit:e,cases:e,artifacts:[...e,"receipt"],"case-history":[...e,"caseId"],"file-history":[...e,"testPath"],"case-occurrences":[...e,"caseId"],metrics:[...e,"testPath"]},cloudShowResources=["account","organisation","project","policy","campaign","finding","receipt","run","case","test-file","performance","project-policy","connection"];export function validateCloudListFilters(s,n){const o=Object.hasOwn(cloudListResources,s)?cloudListResources[s]:void 0;if(!o)throw new Error(`Unknown resource: ${s}`);const c=new Set(Object.values(cloudListResources).flat()),r={caseId:"case",testPath:"path",rootCauseKey:"root-cause-key",issueReference:"issue-reference"};for(const t of c){const i=n[t];if(i!==void 0&&i!==!1&&!o.includes(t))throw new Error(`--${r[t]??t} is not supported by cloud list ${s}`)}}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CloudAccountClient } from "../../cloud/account.js";
|
|
2
|
+
export interface ControlOptions {
|
|
3
|
+
origin?: string;
|
|
4
|
+
env?: NodeJS.ProcessEnv;
|
|
5
|
+
organisation?: string;
|
|
6
|
+
project?: string;
|
|
7
|
+
browser?: boolean;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
secretOutput?: string;
|
|
10
|
+
notify?: (message: string) => void;
|
|
11
|
+
choose?: (label: string, choices: readonly {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}[]) => Promise<string>;
|
|
15
|
+
}
|
|
16
|
+
export declare function controlClient(options?: ControlOptions, refreshCredential?: boolean): Promise<CloudAccountClient>;
|
|
17
|
+
export declare function resolveOrganisation(client: CloudAccountClient, selection?: string, choose?: ControlOptions["choose"]): Promise<string>;
|
|
18
|
+
export declare function resolveProject(client: CloudAccountClient, options: ControlOptions): Promise<string>;
|
|
19
|
+
export declare function projectsForRepository(projects: Record<string, unknown>[], origin: string): Record<string, unknown>[];
|
|
20
|
+
export declare function applyAccountCommand(command: Record<string, unknown>, options?: ControlOptions): Promise<unknown>;
|
|
21
|
+
export declare function waitForConnection(client: CloudAccountClient, initial: unknown, options: ControlOptions): Promise<unknown>;
|
|
22
|
+
export interface CreateProjectOptions extends ControlOptions {
|
|
23
|
+
name?: string;
|
|
24
|
+
repository?: string;
|
|
25
|
+
provider?: string;
|
|
26
|
+
host?: string;
|
|
27
|
+
publishDecisions?: boolean;
|
|
28
|
+
requestKey?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function createCloudProject(options: CreateProjectOptions): Promise<unknown>;
|
|
31
|
+
export declare function parseRepository(value: string, host?: string): {
|
|
32
|
+
repository: string;
|
|
33
|
+
host: string;
|
|
34
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{setTimeout as v}from"node:timers/promises";import c from"node:fs";import $ from"node:path";import{randomUUID as I}from"node:crypto";import{execFileSync as R}from"node:child_process";import{CloudAccountClient as E}from"../../cloud/account.js";import{invalidResponse as u}from"../../cloud/transport.js";import{isUnknownRecord as p}from"../../kernel/unknown-values.js";import{cloudToken as k}from"./credentials.js";import{openBrowser as C,selectedCloudOrigin as S}from"./login.js";import{allItems as l,createdResourceDashboardLink as x}from"./control-links.js";export async function controlClient(o={},r=!0){const e=S(o);return new E(e,await k(e,o.env??process.env,r))}async function m(o,r,e,n){const t=r?o.filter(a=>a.id===r||a.slug===r||a.name===r):o;if(t.length>1&&!r&&n){const a=t.map(s=>{if(typeof s.id!="string"||!s.id)throw u(`${e} identity`);return{id:s.id,name:typeof s.name=="string"?s.name:s.id}}),d=await n(e,a);if(!a.some(s=>s.id===d))throw new Error(`Invalid ${e} selection`);return d}if(t.length!==1)throw new Error(`${e} ${r?`"${r}" `:""}${t.length?"is ambiguous":"was not found"}. Select an explicit ID from cloud list ${e==="organisation"?"organisations":"projects"}.`);const i=t[0]?.id;if(typeof i!="string"||!i)throw u(`${e} identity`);return i}export async function resolveOrganisation(o,r,e){const n=await l(o,"/api/v1/organisations");return m(n.map(t=>{if(!p(t.organisation))throw u("organisation");return t.organisation}),r,"organisation",e)}export async function resolveProject(o,r){const e=r.project??(r.env??process.env).TESTKIT_CLOUD_PROJECT_ID;if(e?.startsWith("prj_"))return e;const n=r.organisation?`?organisationId=${encodeURIComponent(await resolveOrganisation(o,r.organisation,r.choose))}`:"",t=await l(o,`/api/v1/projects${n}`),i=e?void 0:g(),a=i?projectsForRepository(t,i):[];return m(a.length?a:t,e,"project",r.choose)}function g(){try{return R("git",["remote","get-url","origin"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return}}export function projectsForRepository(o,r){let e;try{e=parseRepository(r)}catch{return[]}return o.filter(n=>{const t=n.repository;return p(t)&&t.host===e.host&&`${String(t.owner)}/${String(t.name)}`===e.repository})}export async function applyAccountCommand(o,r={}){const e=o.operation==="token.create";if(r.secretOutput!==void 0&&!e)throw new Error("--secret-output is only supported for token.create.");const n=r.secretOutput?$.resolve(r.secretOutput):void 0;if(e&&!n)throw new Error("Credential creation requires --secret-output <new-file> to save the issued token privately.");const t=n?c.openSync(n,"wx",384):void 0;let i=!1,a=!1,d=!1;try{const s=await controlClient(r);d=e;const f=await s.request("POST","/api/v1/account/commands",o);if(e&&t!==void 0&&n!==void 0){if(i=!0,!p(f)||typeof f.value!="string")throw u("issued credential");c.writeFileSync(t,`${f.value}
|
|
2
|
+
`),c.fsyncSync(t);const y=c.fstatSync(t),h=c.lstatSync(n);if(!h.isFile()||h.ino!==y.ino||h.dev!==y.dev)throw new Error("Credential output was replaced while the command was running");c.closeSync(t),a=!0;const w={...f};return delete w.value,{...w,secretFile:n}}return await waitForConnection(s,f,r)}catch(s){throw d&&n!==void 0?new Error(`Cloud ${i?"issued the credential, but saving it failed":"may have issued the credential before the request failed"}. Retry the same command and idempotency key with --secret-output pointing to a new file to recover it. Output path: ${n}.`,{cause:s}):s}finally{if(t!==void 0&&!a){const s=c.fstatSync(t);c.closeSync(t),!i&&s.size===0&&n!==void 0&&O(n,s)}}}function O(o,r){try{const e=c.lstatSync(o);e.isFile()&&e.size===0&&e.ino===r.ino&&e.dev===r.dev&&c.unlinkSync(o)}catch(e){if(!p(e)||e.code!=="ENOENT")throw e}}export async function waitForConnection(o,r,e){if(!p(r)||typeof r.operationId!="string"||r.status==="complete")return r;let n=!1;for(;;){e.signal?.throwIfAborted();const t=await j(o,r.operationId);if(t.status==="complete")return t;if(t.status!=="pending"&&t.status!=="processing")throw new Error(`Repository connection ${r.operationId} is ${String(t.status)}. Inspect with cloud show connection ${r.operationId}; retry the create command with a new request key after checking access.`);if(t.status==="pending"&&!n){if(typeof t.verificationUrl!="string")throw u("repository approval link");const i=new URL(t.verificationUrl);if(i.origin!==o.origin||i.username||i.password||i.pathname!==`/cli/projects/${r.operationId}/authorize`)throw u("repository approval link");if(e.notify?.(`Open ${i.href}
|
|
3
|
+
Waiting for repository authorization. Operation: ${r.operationId}
|
|
4
|
+
`),(e.env??process.env).CI)throw new Error(`Repository authorization requires a person. Open ${i.href}, then retry the same request key. Operation: ${r.operationId}`);e.browser!==!1&&C(i.href),n=!0}if((e.env??process.env).CI)throw new Error(`Repository connection ${r.operationId} is processing. Inspect with cloud show connection ${r.operationId}, then retry the same request key to resume.`);if(typeof t.expiresAt!="string"||!Number.isFinite(Date.parse(t.expiresAt)))throw u("connection expiry");if(Date.now()>=Date.parse(t.expiresAt))throw new Error(`Repository connection ${r.operationId} expired. Start a new request.`);await v(2e3,void 0,{signal:e.signal})}}async function j(o,r){const e=await o.request("GET",`/api/v1/project-connections/${encodeURIComponent(r)}`);if(!p(e)||e.operationId!==r||typeof e.status!="string")throw u("repository connection");return e}export async function createCloudProject(o){const r=o.repository??g();if(!r)throw new Error("Pass --repository owner/repo when outside Git or when origin is unavailable.");const e=parseRepository(r,o.host),n=await controlClient(o),t=await resolveOrganisation(n,o.organisation,o.choose),i=o.requestKey??I();o.notify?.(`Request key: ${i}. Reuse --request-key ${i} to resume this operation.
|
|
5
|
+
`);const a=await applyAccountCommand({schemaVersion:1,idempotencyKey:i,operation:"project.create",organisationId:t,input:{name:o.name??e.repository.split("/")[1],repository:e.repository,host:e.host,provider:o.provider??(e.host==="github.com"?"github":"gitea"),publishDecisions:o.publishDecisions??!1}},o);return x(n,"project",a,o.env??process.env)}export function parseRepository(o,r){let e=o.trim(),n="github.com";if(e.includes("://")){const t=new URL(e);if(!["https:","http:","ssh:","git:"].includes(t.protocol)||t.search||t.hash)throw new Error("Repository must be owner/repo or a Git remote URL.");n=t.protocol==="ssh:"||t.protocol==="git:"?t.hostname:t.host,e=t.pathname.replace(/^\//u,"")}else{const t=/^(?:[^@/]+@)?([^/:]+):(.+)$/.exec(e);t?.[1]&&t[2]&&(n=t[1].toLowerCase(),e=t[2])}if(e=e.replace(/\/+$/u,"").replace(/\.git$/u,""),!/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(e)||e.split("/").some(t=>t==="."||t===".."))throw new Error("Repository must be owner/repo or a Git remote URL.");return{host:r??n,repository:e}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type AccountSession } from "../../cloud/account.js";
|
|
2
|
+
export interface SavedCredential extends AccountSession {
|
|
3
|
+
origin: string;
|
|
4
|
+
token: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function readCredential(origin: string, env?: NodeJS.ProcessEnv): SavedCredential | null;
|
|
7
|
+
export declare function saveCredential(credential: SavedCredential, env?: NodeJS.ProcessEnv): void;
|
|
8
|
+
export declare function removeCredential(origin: string, env?: NodeJS.ProcessEnv): void;
|
|
9
|
+
export declare function cloudToken(origin: string, env?: NodeJS.ProcessEnv, refresh?: boolean): Promise<string>;
|
|
10
|
+
export declare function shouldRefreshCredential(credential: AccountSession, now: number): boolean;
|
|
11
|
+
export declare function canUseCredentialAfterRefreshFailure(credential: AccountSession, error: unknown, now: number): boolean;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import s from"node:fs";import p from"node:os";import c from"node:path";import{createHash as y,randomUUID as T}from"node:crypto";import{CloudAccountClient as w,cloudOrigin as l,isCloudAccountToken as E,parseSession as O}from"../../cloud/account.js";import{CloudResponseError as h}from"../../cloud/client.js";import{isUnknownRecord as u}from"../../kernel/unknown-values.js";function d(o,e){const r=e.XDG_CONFIG_HOME??(process.platform==="win32"?e.APPDATA:void 0);if(r&&!c.isAbsolute(r))throw new Error("Cloud credential configuration directory must be absolute");const t=r||c.join(p.homedir(),".config"),n=y("sha256").update(l(o)).digest("hex");return c.join(t,"testkit","cloud",`${n}.json`)}function m(o,e){const r=c.dirname(o),t=c.dirname(r),n=c.dirname(t);for(const i of[n,t,r]){let a;try{a=s.lstatSync(i)}catch(f){if(!u(f)||f.code!=="ENOENT")throw f;if(!e)return!1;s.mkdirSync(i,{recursive:i===n,mode:448}),a=s.lstatSync(i)}if(!a.isDirectory()||a.isSymbolicLink())throw new Error("Cloud credential directory must be a real directory, not a symlink");if(i!==n&&process.platform!=="win32"&&(a.mode&63)!==0)throw new Error("Cloud credential directory must be private (mode 0700)")}return!0}export function readCredential(o,e=process.env){const r=d(o,e);if(!m(r,!1))return null;let t;try{t=s.openSync(r,s.constants.O_RDONLY|s.constants.O_NOFOLLOW)}catch(n){if(u(n)&&n.code==="ENOENT")return null;throw n}try{const n=s.fstatSync(t);if(!n.isFile()||n.size>16384||process.platform!=="win32"&&(n.mode&63)!==0)throw new Error("Cloud credential file must be a private regular file");const i=JSON.parse(s.readFileSync(t,"utf8"));if(!u(i)||i.origin!==l(o)||!E(i.token))throw new Error("Invalid Cloud credential file; run testkit cloud login --force");return{...O(i),origin:i.origin,token:i.token}}finally{s.closeSync(t)}}export function saveCredential(o,e=process.env){const r=d(o.origin,e);m(r,!0);const t=`${r}.${T()}.tmp`;try{s.writeFileSync(t,`${JSON.stringify(o)}
|
|
2
|
+
`,{flag:"wx",mode:384}),s.renameSync(t,r)}finally{s.rmSync(t,{force:!0})}}export function removeCredential(o,e=process.env){const r=d(o,e);m(r,!1)&&s.rmSync(r,{force:!0})}export async function cloudToken(o,e=process.env,r=!0){if(e.TESTKIT_CLOUD_TOKEN!==void 0){if(!e.TESTKIT_CLOUD_TOKEN.trim())throw new Error("TESTKIT_CLOUD_TOKEN is empty");return e.TESTKIT_CLOUD_TOKEN}const t=readCredential(o,e);if(!t||Date.parse(t.expiresAt)<=Date.now())throw new Error(e.CI?"Set TESTKIT_CLOUD_TOKEN to an automation token for CI.":`Run testkit cloud login --url ${l(o)} to connect your account, or set TESTKIT_CLOUD_TOKEN for automation.`);if(r&&shouldRefreshCredential(t,Date.now())){let n;try{n=await new w(o,t.token).refresh()}catch(i){if(!canUseCredentialAfterRefreshFailure(t,i,Date.now()))throw i}n&&saveCredential({...t,...n},e)}return t.token}export function shouldRefreshCredential(o,e){const r=Date.parse(o.expiresAt);return r>e&&r-e<10080*6e4&&r<Date.parse(o.maximumExpiresAt)}export function canUseCredentialAfterRefreshFailure(o,e,r){return Date.parse(o.expiresAt)<=r?!1:e instanceof h?e.status>=500||e.status===429:u(e)&&e.code==="cloud_transport_error"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type CampaignSelection, type CampaignResult } from "../../cloud/campaigns.js";
|
|
2
|
+
import { CloudClient, type CloudReceipt } from "../../cloud/client.js";
|
|
3
|
+
import type { ControlOptions } from "./control.js";
|
|
4
|
+
export interface CloudEnvironmentOptions extends Pick<ControlOptions, "browser" | "signal" | "secretOutput" | "notify"> {
|
|
5
|
+
env?: NodeJS.ProcessEnv;
|
|
6
|
+
origin?: string;
|
|
7
|
+
projectId?: string;
|
|
8
|
+
campaignId?: string;
|
|
9
|
+
productDir?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PublishRunToCloudOptions extends CloudEnvironmentOptions {
|
|
12
|
+
productDir: string;
|
|
13
|
+
runId?: null | string;
|
|
14
|
+
}
|
|
15
|
+
export declare function publishRunToCloud(options: Readonly<PublishRunToCloudOptions>): Promise<{
|
|
16
|
+
receipt: CloudReceipt;
|
|
17
|
+
association?: CampaignResult;
|
|
18
|
+
dashboardUrl: string;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function applyCloudMutationFile(filePath: string, options?: Readonly<CloudEnvironmentOptions>): Promise<unknown>;
|
|
21
|
+
export declare function readCloudSnapshot(options?: Readonly<CloudEnvironmentOptions & CampaignSelection>): Promise<unknown>;
|
|
22
|
+
export declare function cloudClientFromEnvironment(options?: Readonly<CloudEnvironmentOptions>): Promise<CloudClient>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{associateReceipt as s,checkVerificationSubmission as m,readCampaignReportFile as l}from"./campaigns.js";import{requireCloudId as u,parseCampaignReport as f}from"../../cloud/campaigns.js";import{isUnknownRecord as I}from"../../kernel/unknown-values.js";import c from"node:fs";import a from"node:path";import{prepareVerifiedRunBundleUpload as w}from"../../evidence/index.js";import{CloudClient as g}from"../../cloud/client.js";import{applyAccountCommand as y}from"./control.js";import{selectedCloudOrigin as C}from"./login.js";import{cloudToken as h}from"./credentials.js";export async function publishRunToCloud(e){if(e.campaignId!==void 0&&(u(e.campaignId,"campaignId"),!e.runId))throw new Error("Campaign publication requires an explicit --run ID");const r=w(e.productDir,e.runId??null),n=await cloudClientFromEnvironment(e),t=await n.publish(r,i=>{e.notify?.(i)});j(e.productDir,r.runId,t);const o=e.campaignId===void 0?void 0:await s(n,t,e.campaignId);return{receipt:t,dashboardUrl:new URL(`/receipts/${encodeURIComponent(t.id)}`,n.origin).href,...o?{association:o}:{}}}export async function applyCloudMutationFile(e,r={}){if(r.campaignId!==void 0){if(r.secretOutput!==void 0)throw new Error("--secret-output is only supported for token.create.");const d=await cloudClientFromEnvironment(r),p=f(l(e),d.projectId,u(r.campaignId,"campaignId"));return await m(d,p,a.resolve(r.productDir??process.cwd())),d.report(p)}const n=a.resolve(e),t=JSON.parse(c.readFileSync(n,"utf8"));if(!I(t))throw new Error("Cloud mutation file must contain a JSON object");if(typeof t.operation=="string")return y(t,r);if(r.secretOutput!==void 0)throw new Error("--secret-output is only supported for token.create.");const o=await cloudClientFromEnvironment(r),i={...t,projectId:typeof t.projectId=="string"?t.projectId:o.projectId};if(i.projectId!==o.projectId)throw new Error("Cloud mutation file projectId does not match TESTKIT_CLOUD_PROJECT_ID");return o.apply(i)}export async function readCloudSnapshot(e={}){return(await cloudClientFromEnvironment(e)).snapshot(e)}export async function cloudClientFromEnvironment(e={}){const r=e.env??process.env,n=C(e);return new g({origin:n,projectId:e.projectId??r.TESTKIT_CLOUD_PROJECT_ID??"",token:await h(n,r)})}function j(e,r,n){const t=a.join(e,".testkit","cloud","receipts");c.mkdirSync(t,{recursive:!0});const o=a.join(t,`${r}.json`),i=`${o}.${String(process.pid)}.${String(Date.now())}.tmp`;c.writeFileSync(i,`${JSON.stringify(n,null,2)}
|
|
2
|
+
`,{mode:384}),c.renameSync(i,o)}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export interface LoginOptions {
|
|
2
|
+
origin?: string;
|
|
3
|
+
env?: NodeJS.ProcessEnv;
|
|
4
|
+
force?: boolean;
|
|
5
|
+
browser?: boolean;
|
|
6
|
+
signal?: AbortSignal;
|
|
7
|
+
notify: (message: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function selectedCloudOrigin(options: {
|
|
10
|
+
origin?: string;
|
|
11
|
+
env?: NodeJS.ProcessEnv;
|
|
12
|
+
}): string;
|
|
13
|
+
export declare function loginToCloud(options: LoginOptions): Promise<{
|
|
14
|
+
reused: boolean;
|
|
15
|
+
user: {
|
|
16
|
+
id: string;
|
|
17
|
+
email: string;
|
|
18
|
+
name: string;
|
|
19
|
+
};
|
|
20
|
+
expiresAt: string;
|
|
21
|
+
maximumExpiresAt: string;
|
|
22
|
+
origin: string;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function cloudLoginStatus(options: {
|
|
25
|
+
origin?: string;
|
|
26
|
+
env?: NodeJS.ProcessEnv;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
origin: string;
|
|
29
|
+
source: "environment";
|
|
30
|
+
authenticated: null;
|
|
31
|
+
message: string;
|
|
32
|
+
} | {
|
|
33
|
+
origin: string;
|
|
34
|
+
source: "none";
|
|
35
|
+
authenticated: boolean;
|
|
36
|
+
message?: undefined;
|
|
37
|
+
} | {
|
|
38
|
+
user: {
|
|
39
|
+
id: string;
|
|
40
|
+
email: string;
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
expiresAt: string;
|
|
44
|
+
maximumExpiresAt: string;
|
|
45
|
+
origin: string;
|
|
46
|
+
source: "account";
|
|
47
|
+
authenticated: boolean;
|
|
48
|
+
message?: undefined;
|
|
49
|
+
} | {
|
|
50
|
+
origin: string;
|
|
51
|
+
source: "account";
|
|
52
|
+
authenticated: boolean;
|
|
53
|
+
message?: undefined;
|
|
54
|
+
}>;
|
|
55
|
+
export declare function logoutOfCloud(options: {
|
|
56
|
+
origin?: string;
|
|
57
|
+
env?: NodeJS.ProcessEnv;
|
|
58
|
+
}): Promise<{
|
|
59
|
+
origin: string;
|
|
60
|
+
loggedOut: boolean;
|
|
61
|
+
environmentTokenActive: boolean;
|
|
62
|
+
}>;
|
|
63
|
+
export declare function openBrowser(url: string): void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{spawn as p}from"node:child_process";import{setTimeout as w}from"node:timers/promises";import{CloudAccountClient as c,cloudOrigin as v}from"../../cloud/account.js";import{CloudResponseError as l}from"../../cloud/client.js";import{readCredential as u,removeCredential as g,saveCredential as h,canUseCredentialAfterRefreshFailure as C}from"./credentials.js";import{isUnknownRecord as x}from"../../kernel/unknown-values.js";export function selectedCloudOrigin(e){return v(e.origin??(e.env??process.env).TESTKIT_CLOUD_URL??"https://testkit.cloud")}export async function loginToCloud(e){const t=selectedCloudOrigin(e),o=e.env??process.env;let n;try{n=u(t,o)}catch(r){if(!e.force)throw r;n=null}if(n&&!e.force)try{const r=new c(t,n.token),m=Date.parse(n.expiresAt)===Date.parse(n.maximumExpiresAt)?await r.session():await r.refresh();return h({...n,...m},o),{origin:t,...m,reused:!0}}catch(r){if(C(n,r,Date.now()))return e.notify("Cloud session refresh is temporarily unavailable. Using the saved, unexpired session."),{origin:t,user:n.user,expiresAt:n.expiresAt,maximumExpiresAt:n.maximumExpiresAt,reused:!0};if(!(r instanceof l)||r.status!==401)throw r}const i=new c(t),a=await i.login();e.notify(`Open ${a.verificationUrl}
|
|
2
|
+
Check code ${a.userCode}, then choose Allow CLI access. Waiting for approval...`),e.browser!==!1&&!o.CI&&openBrowser(a.verificationUrl);const d=Date.now()+a.expiresIn*1e3;let s=a.interval*1e3,f=!1;try{for(;Date.now()<d;){e.signal?.throwIfAborted();try{const r=await i.poll(a.deviceCode);return e.signal?.throwIfAborted(),h({...r,origin:t,token:a.deviceCode},o),f=!0,n&&await i.revoke(n.token).catch(()=>{e.notify("The previous Cloud session could not be revoked. It will expire automatically.")}),{origin:t,...r,reused:!1}}catch(r){if(r instanceof l&&r.status>=500||x(r)&&r.code==="cloud_transport_error"){await w(Math.min(s,Math.max(1,d-Date.now())),void 0,{signal:e.signal});continue}if(!(r instanceof l)||!["authorization_pending","slow_down"].includes(r.code??""))throw r;r.code==="slow_down"&&(s=Math.min(s+1e3,3e4))}await w(Math.min(s,Math.max(1,d-Date.now())),void 0,{signal:e.signal})}throw new Error("CLI login expired. Run testkit cloud login again.")}finally{f||await i.revoke(a.deviceCode).catch(()=>{})}}export async function cloudLoginStatus(e){const t=selectedCloudOrigin(e),o=e.env??process.env;if(o.TESTKIT_CLOUD_TOKEN!==void 0)return{origin:t,source:"environment",authenticated:null,message:"Commands use TESTKIT_CLOUD_TOKEN. Select a project to check its permissions."};const n=u(t,o);if(!n)return{origin:t,source:"none",authenticated:!1};try{return{origin:t,source:"account",authenticated:!0,...await new c(t,n.token).session()}}catch(i){if(!(i instanceof l)||i.status!==401)throw i;return{origin:t,source:"account",authenticated:!1}}}export async function logoutOfCloud(e){const t=selectedCloudOrigin(e),o=e.env??process.env,n=u(t,o);return n&&(await new c(t).revoke(n.token),g(t,o)),{origin:t,loggedOut:!0,environmentTokenActive:o.TESTKIT_CLOUD_TOKEN!==void 0}}export function openBrowser(e){const t=process.platform==="darwin"?"open":process.platform==="win32"?"rundll32":"xdg-open",o=process.platform==="win32"?["url.dll,FileProtocolHandler",e]:[e],n=p(t,o,{detached:!0,stdio:"ignore",shell:!1});n.on("error",()=>{}),n.unref()}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MigrationPlan, PlannedRun } from "./model.js";
|
|
2
|
+
interface ArchiveIdentity {
|
|
3
|
+
bytes: number;
|
|
4
|
+
sha256: string;
|
|
5
|
+
}
|
|
6
|
+
/** The migration output lock and sequential run transfer own this single archive slot. */
|
|
7
|
+
export declare function prepareMigrationArchive(plan: MigrationPlan, run: PlannedRun, maxBytes: number, expected?: ArchiveIdentity): Promise<{
|
|
8
|
+
path: string;
|
|
9
|
+
bytes: number;
|
|
10
|
+
sha256: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function removeMigrationArchive(plan: MigrationPlan, runId: string): Promise<void>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import p from"node:crypto";import r from"node:fs";import a from"node:path";import{writeUploadArchive as l}from"../../../cloud/archive.js";import{canonicalHistoricalJson as w}from"../../../cloud/historical-json.js";import{digest as S}from"./files.js";function u(o,t){const n=r.lstatSync(o.outputDir);if(!n.isDirectory()||n.isSymbolicLink())throw new Error("Migration output directory is unsafe");const i=a.join(o.outputDir,"archives");r.existsSync(i)||r.mkdirSync(i,{mode:448});const e=r.lstatSync(i);if(!e.isDirectory()||e.isSymbolicLink())throw new Error("Migration archive directory is unsafe");return a.join(i,`${S(t)}.zip`)}function m(o){if(process.platform==="win32")return;const t=r.openSync(o,"r");try{r.fsyncSync(t)}finally{r.closeSync(t)}}async function d(o,t,n){if(t.bytes>n)throw new Error("Journaled migration archive exceeds the upload limit");try{const i=r.lstatSync(o);if(!i.isFile()||i.isSymbolicLink()||i.size!==t.bytes)throw new Error("Archive size or file type changed");const e=r.openSync(o,r.constants.O_RDONLY|r.constants.O_NOFOLLOW),f=r.createReadStream(o,{fd:e}),c=p.createHash("sha256");let s=0;for await(const y of f){const h=y;if(s+=h.length,s>t.bytes)throw new Error("Archive grew during verification");c.update(h)}if(s!==t.bytes||c.digest("hex")!==t.sha256)throw new Error("Archive SHA-256 or size changed")}catch(i){throw new Error("Journaled migration archive is missing or corrupt; restore the original archive before resuming",{cause:i})}}export async function prepareMigrationArchive(o,t,n,i){const e=u(o,t.runId),f=a.dirname(e),c=`${e}.tmp`;if(r.readdirSync(f).some(s=>s!==a.basename(e)&&s!==a.basename(c)))throw new Error("Another migration archive occupies the active run slot; resume its run before packaging another");if(i)return await d(e,i,n),{path:e,...i};r.rmSync(e,{force:!0}),r.rmSync(c,{force:!0});try{const s=await l({manifest:t.request.manifest,files:t.files},n,c,w),y=r.openSync(c,r.constants.O_RDWR|r.constants.O_NOFOLLOW);try{r.fsyncSync(y)}finally{r.closeSync(y)}return r.renameSync(c,e),m(f),m(o.outputDir),{path:e,...s}}finally{r.rmSync(c,{force:!0})}}export async function removeMigrationArchive(o,t){const n=u(o,t);await r.promises.rm(n,{force:!0}),await r.promises.rm(`${n}.tmp`,{force:!0}),m(a.dirname(n))}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type HistoricalBegin, type HistoricalRecord } from "../../../cloud/historical-contract.js";
|
|
2
|
+
import type { MigrationPlan, PlannedRecord } from "./model.js";
|
|
3
|
+
import type { MigrationJournal } from "./state.js";
|
|
4
|
+
export declare function dependencyOrder(records: PlannedRecord[]): PlannedRecord[];
|
|
5
|
+
/** The upper version bound makes chunk boundaries independent of resumed state. */
|
|
6
|
+
export declare function batchRecords(records: HistoricalRecord[]): HistoricalRecord[][];
|
|
7
|
+
export declare function beginCommand(plan: MigrationPlan, planDigest: string): HistoricalBegin;
|
|
8
|
+
export declare function plannedRecords(plan: MigrationPlan, journal: MigrationJournal, kind: "case" | "finding"): HistoricalRecord[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{HISTORICAL_BODY_LIMIT as u}from"../../../cloud/historical-contract.js";import{canonicalHistoricalJson as f,historicalDigest as p}from"../../../cloud/historical-json.js";import{expectedFindingData as h}from"./reconcile.js";export function dependencyOrder(i){const s=new Map(i.map(o=>[o.source.id,o])),n=new Set,t=new Set,e=[],c=o=>{const r=o.source.id;if(n.has(r))return;if(t.has(r))throw new Error(`Cyclic finding relationship: ${r}`);t.add(r);const a=o.relationship?.targetId,d=a?s.get(a):void 0;d&&c(d),t.delete(r),n.add(r),e.push(o)};return i.forEach(c),e}export function batchRecords(i){const s=[];let n=[];const t=e=>e.length<=25&&Buffer.byteLength(f({schemaVersion:1,idempotencyKey:"x".repeat(128),expectedVersion:Number.MAX_SAFE_INTEGER,records:e}))<=u;for(const e of i){if(!t([e]))throw new Error(`Record cannot fit a historical batch: ${e.source.id}`);t([...n,e])||(s.push(n),n=[]),n.push(e)}return n.length&&s.push(n),s}export function beginCommand(i,s){const n=[...i.runs.filter(t=>!Object.hasOwn(i.reusedRuns,t.runId)).map(t=>t.request.source),...i.records.map(t=>t.source)];return{schemaVersion:1,idempotencyKey:`migration-${s}`,namespace:i.namespace,inventoryDigest:p(n),inventory:n}}export function plannedRecords(i,s,n){const t=i.records.filter(e=>e.source.kind===n);return(n==="finding"?dependencyOrder(t):t).map(e=>({source:e.source,sourceRecord:e.sourceRecord,observedAt:e.observedAt,...e.case?{case:e.case}:{finding:h(e,s)},...e.relationship?{relationship:e.relationship}:{},...e.verify!==void 0?{verify:e.verify}:{}}))}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MigrationMapping, PlannedRun, SourceFile } from "./model.js";
|
|
2
|
+
export declare function referencedRuns(...documents: unknown[]): string[];
|
|
3
|
+
export declare function verifyCitedHashes(value: unknown, sourceFiles: SourceFile[]): void;
|
|
4
|
+
export declare function prepareHistoricalRun(options: {
|
|
5
|
+
sourceDir: string;
|
|
6
|
+
outputDir: string;
|
|
7
|
+
runId: string;
|
|
8
|
+
mapping: MigrationMapping;
|
|
9
|
+
sourceFiles: SourceFile[];
|
|
10
|
+
env: NodeJS.ProcessEnv;
|
|
11
|
+
}): PlannedRun;
|
|
12
|
+
/** Keep a cited source manifest distinct from the manifest describing derived files. */
|
|
13
|
+
export declare function includeOriginalManifest(run: PlannedRun, sourceDir: string, outputDir: string, sourceFiles: SourceFile[], env: NodeJS.ProcessEnv): void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import $ from"node:fs";import H from"node:path";import{canonicalHistoricalJson as R,historicalDigest as F,HistoricalJsonNumber as Z,parseHistoricalJson as J}from"../../../cloud/historical-json.js";import"../../../cloud/historical-contract.js";import{stableJson as q}from"../../../evidence/storage.js";import{array as O,digest as w,object as f,readSource as P,readSourceJson as W,sanitize as U,text as b}from"./files.js";export function referencedRuns(...e){const i=new Set;function n(t){if(typeof t=="string")for(const c of t.matchAll(/\.testkit\/results\/runs\/([A-Za-z0-9._-]+)\//gu))i.add(c[1]);else if(Array.isArray(t))t.forEach(n);else if(t&&typeof t=="object")for(const[c,m]of Object.entries(t)){if(c==="runId")i.add(b(m,"runId",256));else if(c.toLowerCase().endsWith("runids"))for(const l of O(m,c))i.add(b(l,c,256));n(m)}}if(e.forEach(n),i.size>1e4)throw new Error("Referenced run inventory exceeds 10,000 entries");for(const t of i)if(!/^[A-Za-z0-9][A-Za-z0-9._-]{0,255}$/u.test(t))throw new Error("Unsafe original run identity");return[...i].sort()}function B(e,i){if(e instanceof Z){if(!/^(?:0|[1-9]\d*)$/u.test(e.lexeme))throw new Error(`${i} must be an integer`);e=Number(e.lexeme)}if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new Error(`${i} must be a bounded integer`);return e}function z(e,i){const n=b(e,i,128);if(!/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d{1,9})?(?:Z|[+-]\d\d:\d\d)$/u.test(n)||!Number.isFinite(Date.parse(n)))throw new Error(`Invalid historical ${i}`);return n}export function verifyCitedHashes(e,i){if(Array.isArray(e)){e.forEach(t=>{verifyCitedHashes(t,i)});return}if(!e||typeof e!="object")return;const n=e;if(typeof n.path=="string"&&n.path.startsWith(".testkit/results/runs/")&&typeof n.sha256=="string"&&i.find(t=>t.path===n.path)?.sha256!==n.sha256)throw new Error(`Cited artifact hash does not match retained evidence: ${n.path}`);Object.values(n).forEach(t=>{verifyCitedHashes(t,i)})}function T(e,i){let n;if(e.repository)n=f(e.repository,"git.repository");else{const t=new URL(b(e.remoteUrl,"git.remoteUrl"));if(!["https:","http:"].includes(t.protocol)||t.search||t.hash)throw new Error("Historical remote URL requires explicit repository mapping");const c=t.pathname.replace(/\.git$/u,"").split("/").filter(Boolean);if(c.length!==2)throw new Error("Historical repository path is ambiguous");n={host:t.host,owner:c[0],name:c[1]}}for(const t of["host","owner","name"])if(b(n[t],`git.repository.${t}`).toLowerCase()!==i[t].toLowerCase())throw new Error("Historical repository does not match the selected repository mapping");e.repository=i,delete e.remoteUrl,delete e.repoRoot,delete e.worktreePath}export function prepareHistoricalRun(e){const{sourceDir:i,outputDir:n,runId:t,mapping:c,sourceFiles:m,env:l}=e,j=`.testkit/results/runs/${t}`,I=W(i,`${j}/manifest.json`,m,8*1024**2),x=f(I,"manifest"),a={...x,schemaVersion:B(x.schemaVersion,"manifest schemaVersion")};if(a.runId!==t||a.algorithm!=="sha256"||![1,2].includes(a.schemaVersion))throw new Error("Unsupported historical manifest schema or identity");const p=O(a.files,"manifest.files").map(r=>{const s=f(r,"manifest entry"),d=b(s.path,"manifest path"),D=B(s.bytes,"manifest entry bytes");if(d==="manifest.json"||!/^[a-f0-9]{64}$/u.test(String(s.sha256)))throw new Error("Invalid manifest entry");return{path:d,bytes:D,sha256:String(s.sha256)}});if(p.length<2||p.length>1e4||new Set(p.map(r=>r.path)).size!==p.length)throw new Error("Invalid or duplicate manifest entries");if(w(q(p))!==a.digest)throw new Error("Original manifest file-list digest mismatch");if(p.reduce((r,s)=>r+s.bytes,0)>2*1024**3)throw new Error("Historical bundle exceeds 2 GiB");const u=[],V=[];let E="",g;for(const r of p.sort((s,d)=>s.path==="run.json"?-1:d.path==="run.json"?1:s.path.localeCompare(d.path))){const s=P(i,`${j}/${r.path}`,m);if(s.length!==r.bytes||w(s)!==r.sha256)throw new Error(`Evidence hash/size mismatch: ${r.path}`);let d=s;const D=[];if(r.path==="run.json"||r.path==="provenance.json"){if(s.length>8*1024**2)throw new Error("Historical run/provenance exceeds 8 MiB");const o=f(J(new TextDecoder("utf-8",{fatal:!0}).decode(s)),r.path);if(r.path==="run.json"){const h=f(o.run,"run");if(h.id!==t||B(o.schemaVersion,"run schemaVersion")!==(a.schemaVersion===1?16:19))throw new Error("Unsupported historical run schema or identity");const v=z(h.startedAt,"startedAt"),S=h.finishedAt==null?v:z(h.finishedAt,"finishedAt"),A=Date.parse(v),L=Date.parse(S);if(o.generatedAt!==void 0&&o.generatedAt!==""&&z(o.generatedAt,"generatedAt"),!Number.isFinite(A)||!Number.isFinite(L)||L<A||A>Date.now())throw new Error("Invalid historical observation times");if(!["passed","failed","cancelled","interrupted","incomplete"].includes(String(h.status)))throw new Error("Unsupported historical run status");E=S;const N=f(o.git,"run.git");T(N,c.repository),g=N,o.product&&delete f(o.product,"product").directory,delete o.host}else{if(o.runId!==t||B(o.schemaVersion,"provenance schemaVersion")!==(a.schemaVersion===1?1:3))throw new Error("Unsupported historical provenance schema or identity");const h=f(o.source,"provenance.source");if(delete h.root,h.git){const S=f(h.git,"provenance.source.git");T(S,c.repository);for(const A of["branch","commitSha"])if(S[A]!=null&&S[A]!==g?.[A])throw new Error("Historical provenance disagrees with run identity")}const v=o.runtime?f(o.runtime,"runtime"):void 0;v&&delete v.hostname,v?.controller&&delete f(v.controller,"controller").hostname}if(d=Buffer.from(R(U(o,l))+`
|
|
2
|
+
`),d.length>8*1024**2)throw new Error("Derived run/provenance exceeds 8 MiB");D.push("Normalize repository from original metadata; remove machine paths and hostname; sanitize text; canonical JSON; preserve original schema, run identity and observation times")}else try{const o=new TextDecoder("utf-8",{fatal:!0}).decode(s);if(!o.includes("\0")){const h=String(U(o,l));h!==o&&(d=Buffer.from(h),D.push("Redact sensitive text and the configured Cloud credential"))}}catch{}const M=H.join(n,"evidence",t,r.path);let k=n;for(const o of["evidence",t,...r.path.split("/").slice(0,-1)]){k=H.join(k,o),$.existsSync(k)||$.mkdirSync(k,{mode:448});const h=$.lstatSync(k);if(h.isSymbolicLink()||!h.isDirectory())throw new Error("Derived evidence directory must not contain symlinks or files")}$.writeFileSync(M,d,{mode:384,flag:"wx"}),u.push({path:r.path,absolutePath:M,bytes:d.length,sha256:w(d)}),V.push({path:r.path,originalPath:`${j}/${r.path}`,originalBytes:r.bytes,originalSha256:r.sha256,...d.equals(s)?{}:{transformation:D.join("; ")}})}if(!u.some(r=>r.path==="run.json")||!u.some(r=>r.path==="provenance.json"))throw new Error("Historical bundle lacks run.json or provenance.json");const y={runId:t,observedAt:E,originalManifestSha256:b(m.find(r=>r.path===`${j}/manifest.json`)?.sha256,"original manifest SHA256",64),originalManifestDigest:b(a.digest,"manifest.digest",64),converterVersion:"testkit-legacy-v1",schemaTuple:{manifest:B(a.schemaVersion,"manifest.schemaVersion"),run:a.schemaVersion===1?16:19,provenance:a.schemaVersion===1?1:3}},C=u.map(({path:r,bytes:s,sha256:d})=>({path:r,bytes:s,sha256:d})).sort((r,s)=>r.path.localeCompare(s.path)),_={algorithm:"sha256",schemaVersion:a.schemaVersion,runId:t,createdAt:b(a.createdAt,"manifest.createdAt"),files:C,digest:w(q(C)),redaction:U(a.redaction??{},l),storage:{fileCount:u.length,logicalBytes:u.reduce((r,s)=>r+s.bytes,0),deduplicatedBytes:0,objectBytesWritten:0}};return{runId:t,observedAt:E,request:{schemaVersion:1,source:{kind:"run",id:Buffer.byteLength(t)<=128?t:`run_${w(t)}`,digest:F(y)},sourceRecord:y,manifest:_,artifacts:V},files:u}}export function includeOriginalManifest(e,i,n,t,c){const m=`.testkit/results/runs/${e.runId}/manifest.json`,l=P(i,m,t,8*1024**2);if(w(l)!==e.request.sourceRecord.originalManifestSha256)throw new Error(`Original manifest changed during planning: ${e.runId}`);const j=J(new TextDecoder("utf-8",{fatal:!0}).decode(l)),I=U(j,c),x=R(j)!==R(I),a=x?Buffer.from(R(I)):l;if(e.files.length>=1e4||e.files.reduce((g,y)=>g+y.bytes,a.length)>2*1024**3)throw new Error(`Cited original manifest exceeds derived evidence limits: ${e.runId}`);const p=H.join(n,"evidence",e.runId),u=$.lstatSync(p);if(!u.isDirectory()||u.isSymbolicLink())throw new Error("Derived evidence directory is unsafe");const V=H.join(p,"manifest.json");$.writeFileSync(V,a,{mode:384,flag:"wx"}),e.files.push({path:"manifest.json",absolutePath:V,bytes:a.length,sha256:w(a)}),e.request.artifacts.push({path:"manifest.json",originalPath:m,originalBytes:l.length,originalSha256:w(l),...x?{transformation:"Redact sensitive original manifest fields and Cloud credential"}:{}});const E=e.files.map(({path:g,bytes:y,sha256:C})=>({path:g,bytes:y,sha256:C})).sort((g,y)=>g.path.localeCompare(y.path));e.request.manifest.files=E,e.request.manifest.digest=w(q(E)),e.request.manifest.storage={...f(e.request.manifest.storage,"derived manifest storage"),fileCount:E.length,logicalBytes:E.reduce((g,y)=>g+y.bytes,0)}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import crypto from "node:crypto";
|
|
2
|
+
import type { SourceFile } from "./model.js";
|
|
3
|
+
export declare const digest: (bytes: crypto.BinaryLike) => string;
|
|
4
|
+
export declare function object(value: unknown, label: string): Record<string, unknown>;
|
|
5
|
+
export declare function text(value: unknown, label: string, max?: number): string;
|
|
6
|
+
export declare function array(value: unknown, label: string): unknown[];
|
|
7
|
+
export declare function plain(value: unknown): unknown;
|
|
8
|
+
export declare function contained(root: string, relative: string): string;
|
|
9
|
+
export declare function readBoundedFile(filename: string, maxBytes?: number): Buffer;
|
|
10
|
+
export declare function readSource(root: string, relative: string, inventory: SourceFile[], maxBytes?: number): Buffer;
|
|
11
|
+
export declare function readSourceJson(root: string, relative: string, inventory: SourceFile[], maxBytes?: number): unknown;
|
|
12
|
+
export declare function sanitize(value: unknown, env: NodeJS.ProcessEnv): unknown;
|
|
13
|
+
export declare function writeDocument(filename: string, value: unknown): void;
|
|
14
|
+
export declare function readDocument(filename: string): unknown;
|
|
15
|
+
export declare function separateOutput(source: string, output: string): void;
|
|
16
|
+
export declare function withOutputLock<T>(output: string, work: () => Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import y from"node:crypto";import i from"node:fs";import d from"node:os";import u from"node:path";import{canonicalHistoricalJson as m,parseHistoricalJson as h,HistoricalJsonNumber as l}from"../../../cloud/historical-json.js";import{redactSensitiveText as w}from"../../../kernel/redaction.js";export const digest=r=>y.createHash("sha256").update(r).digest("hex");export function object(r,n){if(!r||typeof r!="object"||Array.isArray(r))throw new Error(`${n} must be an object`);return r}export function text(r,n,e=4096){if(typeof r!="string"||!r.trim()||r.includes("\0")||Buffer.byteLength(r)>e)throw new Error(`${n} must be a nonblank string of at most ${String(e)} bytes`);return r}export function array(r,n){if(!Array.isArray(r))throw new Error(`${n} must be an array`);return r}export function plain(r){if(r instanceof l){const n=Number(r.lexeme);if(!Number.isFinite(n)||Number.isInteger(n)&&!Number.isSafeInteger(n))throw new Error("Numeric field exceeds supported range");return n}return Array.isArray(r)?r.map(plain):r&&typeof r=="object"?Object.fromEntries(Object.entries(r).map(([n,e])=>[n,plain(e)])):r}export function contained(r,n){if(u.isAbsolute(n)||u.win32.isAbsolute(n)||/[\\:\0]/u.test(n)||n.split("/").some(o=>!o||o==="."||o===".."))throw new Error("Source reference must be a normalized relative path");const e=u.resolve(r,n);let t=r;for(const o of n.split("/"))if(t=u.join(t,o),i.lstatSync(t).isSymbolicLink())throw new Error(`Symlink is not allowed: ${n}`);if(!i.statSync(e).isFile())throw new Error(`Source reference is not a file: ${n}`);return e}export function readBoundedFile(r,n=128*1024**2){const e=i.lstatSync(r);if(!e.isFile()||e.isSymbolicLink()||e.size>n)throw new Error("File must be regular and within its byte limit");const t=i.openSync(r,i.constants.O_RDONLY|i.constants.O_NOFOLLOW);try{const o=i.fstatSync(t);if(!o.isFile()||o.ino!==e.ino||o.dev!==e.dev||o.size!==e.size)throw new Error("Source changed during read");const s=Buffer.alloc(e.size+1);let c=0;for(;c<s.length;){const f=i.readSync(t,s,c,s.length-c,null);if(!f)break;c+=f}const a=i.fstatSync(t);if(c!==e.size||a.size!==e.size||a.mtimeMs!==e.mtimeMs||a.ctimeMs!==e.ctimeMs)throw new Error("Source changed during read");return s.subarray(0,c)}finally{i.closeSync(t)}}export function readSource(r,n,e,t=128*1024**2){const o=contained(r,n),s=readBoundedFile(o,t),c={path:n,bytes:s.length,sha256:digest(s)},a=e.find(f=>f.path===n);if(a&&(a.sha256!==c.sha256||a.bytes!==c.bytes))throw new Error(`Source changed during inventory: ${n}`);return a||e.push(c),s}export function readSourceJson(r,n,e,t=32*1024**2){return h(new TextDecoder("utf-8",{fatal:!0}).decode(readSource(r,n,e,t)),{maxBytes:t})}export function sanitize(r,n){const e=n.TESTKIT_CLOUD_TOKEN;function t(o){if(typeof o=="string"){const s=o.replace(/[a-z][a-z0-9+.-]*:\/\/[^\s"'<>]+/giu,a=>{try{const f=new URL(a);return f.username="",f.password="",f.search="",f.hash="",f.toString()}catch{return"<redacted-url>"}});let c=w(s).replace(/\bBearer\s+[^\s"']+/giu,"Bearer <redacted>").replace(/\btkc_cli_[A-Za-z0-9_-]{43}\b/gu,"<redacted>");return e&&(e.length>=12?c=c.replaceAll(e,"<redacted>"):c===e&&(c="<redacted>")),c}return o instanceof l?o:Array.isArray(o)?o.map(t):o&&typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,c])=>[s,/^(?:password|(?:access[_-]?|refresh[_-]?)?token|(?:client[_-]?)?secret|private[_-]?key|authorization|cookie|session|api[_-]?key)$/iu.test(s)?"<redacted>":t(c)])):o}return t(r)}export function writeDocument(r,n){const e=m(n)+`
|
|
2
|
+
`;if(Buffer.byteLength(e)>128*1024**2)throw new Error("Migration document exceeds 128 MiB");i.mkdirSync(u.dirname(r),{recursive:!0,mode:448});const t=`${r}.${y.randomUUID()}.tmp`,o=i.openSync(t,"wx",384);try{try{i.writeFileSync(o,e),i.fsyncSync(o)}finally{i.closeSync(o)}i.renameSync(t,r)}finally{i.rmSync(t,{force:!0})}if(process.platform!=="win32"){const s=i.openSync(u.dirname(r),"r");try{i.fsyncSync(s)}finally{i.closeSync(s)}}}export function readDocument(r){const n=h(new TextDecoder("utf-8",{fatal:!0}).decode(readBoundedFile(r)),{maxBytes:134217728});function e(t,o=""){return o==="sourceRecord"||o==="record"?t:t instanceof l?plain(t):Array.isArray(t)?t.map(s=>e(s)):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).map(([s,c])=>[s,e(c,s)])):t}return e(n)}export function separateOutput(r,n){const e=i.realpathSync(r);let t=u.resolve(n);const o=[];for(;!i.existsSync(t);)o.unshift(u.basename(t)),t=u.dirname(t);const s=u.join(i.realpathSync(t),...o);for(const[c,a]of[[e,s],[s,e]]){const f=u.relative(c,a);if(!f||!f.startsWith(`..${u.sep}`)&&f!==".."&&!u.isAbsolute(f))throw new Error("Migration output must be outside and separate from the source root")}}export async function withOutputLock(r,n){i.mkdirSync(r,{recursive:!0,mode:448});const e=u.join(r,".migration-lock"),t=u.join(r,".migration-lock-acquire");let o;try{o=i.openSync(t,"wx",384)}catch(a){throw object(a,"lock acquisition error").code==="EEXIST"?new Error("Migration lock acquisition is already running. If its process crashed, verify no migration is acquiring this directory before manually removing .migration-lock-acquire",{cause:a}):a}const s=i.fstatSync(o),c=y.randomUUID();try{if(i.writeFileSync(o,JSON.stringify({pid:process.pid,host:d.hostname(),owner:c})),i.existsSync(e)){const f=object(JSON.parse(readBoundedFile(e,4096).toString("utf8")),"lock");let p=!1;if(f.host===d.hostname()&&Number.isSafeInteger(f.pid)&&Number(f.pid)>0)try{process.kill(Number(f.pid),0)}catch(S){p=object(S,"process error").code==="ESRCH"}if(!p)throw new Error("Migration output is locked by another process");i.unlinkSync(e)}const a=i.openSync(e,"wx",384);try{i.writeFileSync(a,JSON.stringify({pid:process.pid,host:d.hostname(),owner:c}))}finally{i.closeSync(a)}}finally{if(i.closeSync(o),i.existsSync(t)){const a=i.lstatSync(t);a.ino===s.ino&&a.dev===s.dev&&i.unlinkSync(t)}}try{return await n()}finally{i.existsSync(e)&&object(JSON.parse(readBoundedFile(e,4096).toString("utf8")),"lock").owner===c&&i.unlinkSync(e)}}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type MigrationProgressCallback } from "./progress.js";
|
|
2
|
+
export type { MigrationProgress, MigrationProgressCallback } from "./progress.js";
|
|
3
|
+
import type { MigrationResult } from "./model.js";
|
|
4
|
+
export { planMigration } from "./plan.js";
|
|
5
|
+
export declare function applyMigration(planPath: string, env?: NodeJS.ProcessEnv, onProgress?: MigrationProgressCallback): Promise<MigrationResult>;
|
|
6
|
+
export declare function reconcileMigration(planPath: string, env?: NodeJS.ProcessEnv, onProgress?: MigrationProgressCallback): Promise<MigrationResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import w from"node:path";import{cloudToken as v}from"../credentials.js";import{HistoricalClient as O}from"../../../cloud/historical.js";import{sanitize as h,withOutputLock as $,writeDocument as j}from"./files.js";import{reconcileState as E}from"./reconcile.js";import{loadPlan as M,openJournal as k,performOperation as q,verifyPlanFiles as P,upgradeJournal as x}from"./state.js";import{transfer as R}from"./transfer.js";import{operationIs as V}from"./journal.js";import{createMigrationProgress as C}from"./progress.js";export{planMigration}from"./plan.js";export function applyMigration(m,i=process.env,c){return S(m,i,!0,c)}export function reconcileMigration(m,i=process.env,c){return S(m,i,!1,c)}async function S(m,i,c,r){const n=C(r,i),u=w.resolve(m),a=w.join(w.dirname(u),"report.json"),o={complete:!1,planPath:u,reportPath:a,problems:[]};try{n.emit("source-verification",{operation:"source-verification"});const{plan:t,planDigest:y}=M(u);return n.emit("source-verification",{totalRuns:t.runs.length,operation:"source-verification"}),await $(t.outputDir,async()=>{let d={planDigest:y,target:t.target,sourceSummary:t.sourceSummary,dispositions:t.dispositions??[]};try{if(P(t),!t.ready||t.problems.length)throw o.problems=t.problems,new Error("Migration plan has unresolved decisions");const e=k(t,y),s=new O({...t.target,token:await v(t.target.origin,i)});if(n.emit("source-verification",{completedRuns:Object.keys(e.receiptIds).length,operation:"source-verification"}),c){const l=e.schemaVersion===1;x(t,e),l&&e.upgradedFrom===1&&n.emit("journal-upgrade",{operation:"journal-upgrade",detail:"Schema 1 to schema 2; saved requests retained"}),await R(t,e,s,i,n)}e.importId&&(o.importId=e.importId),n.emit("reconciliation",{completedRuns:Object.keys(e.receiptIds).length,operation:"reconcile"});let I=0,p=await E(t,e,s,{onVerified(l){I+=l,n.emit("reconciliation",{verifiedBytes:I,operation:"reconcile"})}});if(c&&p.complete&&e.importId){const l=e.importId,b=e.operations.some(g=>g.key==="complete"&&g.state!=="accepted");n.emit("reconciliation",{operation:"complete-import",retries:n.current.retries+(b?1:0)}),await q(t,e,"complete","complete",{importId:l},()=>s.complete(l),i),n.emit("reconciliation",{operation:"verify-completion"}),p=await p.verifyCompletion()}o.problems.push(...p.problems);const f=e.importId?!!(await s.page(e.importId)).import.completedAt:!1;f||o.problems.push({kind:"import",id:e.importId??"missing",field:"completion",detail:"Server import is not complete"}),o.complete=p.complete&&f,n.emit(o.complete?"completion":"failed",{...o.problems[0]?{operation:"reconcile",detail:o.problems[0].detail}:{}}),d={...d,items:p.items,counts:p.counts,campaignVersion:p.campaignVersion,receiptIds:e.receiptIds,caseIds:e.caseIds,operations:e.operations.map(({key:l,state:b,error:g})=>({key:l,state:b,...g?{error:g}:{}}))}}catch(e){n.fail(e),o.problems.push({kind:"migration",id:"operation",field:c?"apply":"reconcile",detail:String(h(e instanceof Error?e.message:String(e),i))});try{const s=k(t,y);s.importId&&(o.importId=s.importId),d={...d,localOutcomes:D(t,s),receiptIds:s.receiptIds,caseIds:s.caseIds,operations:s.operations.map(({key:I,state:p,error:f})=>({key:I,state:p,...f?{error:f}:{}}))}}catch(s){d.journalError=String(h(s instanceof Error?s.message:String(s),i))}}return j(a,h({...d,...o},i)),o})}catch(t){return n.fail(t),o.problems.push({kind:"migration",id:"plan",field:"preflight",detail:String(h(t instanceof Error?t.message:String(t),i))}),o}}function D(m,i){const c=new Map;for(const r of m.runs)c.set(`run:${r.request.source.id}`,{...r.request.source,status:i.receiptIds[r.runId]?Object.hasOwn(m.reusedRuns,r.runId)?"reused":"accepted":"pending",...i.receiptIds[r.runId]?{cloudId:i.receiptIds[r.runId]}:{}});for(const r of m.records)c.set(`${r.source.kind}:${r.source.id}`,{...r.source,originalId:r.originalId,status:"pending"});for(const r of i.operations){const n=JSON.parse(r.request);for(const a of n.records??[]){const o=c.get(`${a.source.kind}:${a.source.id}`);o&&(o.status=r.state==="accepted"?"accepted":r.state)}const u=V(r,"batch")?r.result:void 0;for(const a of u?.items??[]){const o=c.get(`${a.kind}:${a.id}`);o&&c.set(`${a.kind}:${a.id}`,{...o,...a})}}return[...c.values()]}
|