@cnc-tools/storm 0.0.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/node-version.js +24 -0
- package/bin/storm.js +16 -0
- package/dist/application.d.ts +13 -0
- package/dist/application.js +23 -0
- package/dist/bin/storm.d.ts +1 -0
- package/dist/bin/storm.js +45 -0
- package/dist/build-info.js +3 -0
- package/dist/closed-terminal.d.ts +7 -0
- package/dist/closed-terminal.js +18 -0
- package/dist/combine-errors.d.ts +11 -0
- package/dist/combine-errors.js +19 -0
- package/dist/commands/dashboard.d.ts +11 -0
- package/dist/commands/dashboard.js +18 -0
- package/dist/commands/exec/cleanup.d.ts +135 -0
- package/dist/commands/exec/cleanup.js +171 -0
- package/dist/commands/exec/command.d.ts +272 -0
- package/dist/commands/exec/command.js +23 -0
- package/dist/commands/exec/job-summary.d.ts +10 -0
- package/dist/commands/exec/job-summary.js +34 -0
- package/dist/commands/exec/live-view.d.ts +22 -0
- package/dist/commands/exec/live-view.js +395 -0
- package/dist/commands/exec/metadata.d.ts +66 -0
- package/dist/commands/exec/metadata.js +55 -0
- package/dist/commands/exec/mint-failed.d.ts +11 -0
- package/dist/commands/exec/mint-failed.js +33 -0
- package/dist/commands/exec/outcomes.d.ts +614 -0
- package/dist/commands/exec/outcomes.js +338 -0
- package/dist/commands/exec/progress.d.ts +44 -0
- package/dist/commands/exec/progress.js +277 -0
- package/dist/commands/exec/redaction.d.ts +15 -0
- package/dist/commands/exec/redaction.js +40 -0
- package/dist/commands/exec/run-collector.d.ts +30 -0
- package/dist/commands/exec/run-collector.js +73 -0
- package/dist/commands/exec/run-command.d.ts +221 -0
- package/dist/commands/exec/run-command.js +663 -0
- package/dist/commands/exec/run-metadata.d.ts +56 -0
- package/dist/commands/exec/run-metadata.js +58 -0
- package/dist/commands/exec/run-record.d.ts +170 -0
- package/dist/commands/exec/run-record.js +104 -0
- package/dist/commands/exec/tests-summary.d.ts +34 -0
- package/dist/commands/exec/tests-summary.js +141 -0
- package/dist/commands/exec/testserver-flags.d.ts +48 -0
- package/dist/commands/exec/testserver-flags.js +80 -0
- package/dist/commands/exec/text.d.ts +22 -0
- package/dist/commands/exec/text.js +74 -0
- package/dist/commands/exec/view.d.ts +35 -0
- package/dist/commands/exec/view.js +163 -0
- package/dist/commands/exec/waterfall.d.ts +25 -0
- package/dist/commands/exec/waterfall.js +108 -0
- package/dist/commands/exec/worker-chart.d.ts +79 -0
- package/dist/commands/exec/worker-chart.js +313 -0
- package/dist/commands/runs/facts.d.ts +150 -0
- package/dist/commands/runs/facts.js +292 -0
- package/dist/commands/runs/list/command.d.ts +86 -0
- package/dist/commands/runs/list/command.js +36 -0
- package/dist/commands/runs/list/metadata.d.ts +22 -0
- package/dist/commands/runs/list/metadata.js +19 -0
- package/dist/commands/runs/list/outcomes.d.ts +74 -0
- package/dist/commands/runs/list/outcomes.js +89 -0
- package/dist/commands/runs/logs/command.d.ts +72 -0
- package/dist/commands/runs/logs/command.js +51 -0
- package/dist/commands/runs/logs/metadata.d.ts +22 -0
- package/dist/commands/runs/logs/metadata.js +22 -0
- package/dist/commands/runs/logs/outcomes.d.ts +55 -0
- package/dist/commands/runs/logs/outcomes.js +80 -0
- package/dist/commands/runs/metadata.d.ts +3 -0
- package/dist/commands/runs/metadata.js +3 -0
- package/dist/commands/runs/past-run.d.ts +72 -0
- package/dist/commands/runs/past-run.js +99 -0
- package/dist/commands/runs/show/command.d.ts +176 -0
- package/dist/commands/runs/show/command.js +76 -0
- package/dist/commands/runs/show/metadata.d.ts +25 -0
- package/dist/commands/runs/show/metadata.js +22 -0
- package/dist/commands/runs/show/outcomes.d.ts +164 -0
- package/dist/commands/runs/show/outcomes.js +320 -0
- package/dist/commands/vitest/command.d.ts +299 -0
- package/dist/commands/vitest/command.js +138 -0
- package/dist/commands/vitest/metadata.d.ts +66 -0
- package/dist/commands/vitest/metadata.js +35 -0
- package/dist/commands/vitest/outcomes.d.ts +273 -0
- package/dist/commands/vitest/outcomes.js +77 -0
- package/dist/config/by-name.d.ts +24 -0
- package/dist/config/by-name.js +26 -0
- package/dist/config/errors.d.ts +58 -0
- package/dist/config/errors.js +101 -0
- package/dist/config/gateways.d.ts +32 -0
- package/dist/config/gateways.js +1 -0
- package/dist/config/index.d.ts +10 -0
- package/dist/config/index.js +13 -0
- package/dist/config/live/config-gateway.d.ts +6 -0
- package/dist/config/live/config-gateway.js +71 -0
- package/dist/config/load.d.ts +54 -0
- package/dist/config/load.js +175 -0
- package/dist/config/resolve.d.ts +49 -0
- package/dist/config/resolve.js +94 -0
- package/dist/config/resource-config.d.ts +132 -0
- package/dist/config/resource-config.js +19 -0
- package/dist/config/schema.d.ts +64 -0
- package/dist/config/schema.js +57 -0
- package/dist/config/set.d.ts +27 -0
- package/dist/config/set.js +71 -0
- package/dist/config/settings-file.d.ts +41 -0
- package/dist/config/settings-file.js +72 -0
- package/dist/config-file/define.d.ts +39 -0
- package/dist/config-file/define.js +9 -0
- package/dist/config-file/toolchain.d.ts +9 -0
- package/dist/config-file/toolchain.js +41 -0
- package/dist/context.d.ts +89 -0
- package/dist/context.js +45 -0
- package/dist/core/command-provider.d.ts +126 -0
- package/dist/core/command-provider.js +13 -0
- package/dist/core/command-slots.d.ts +67 -0
- package/dist/core/command-slots.js +136 -0
- package/dist/core/events.d.ts +128 -0
- package/dist/core/events.js +15 -0
- package/dist/core/gateways.d.ts +249 -0
- package/dist/core/gateways.js +1 -0
- package/dist/core/index.d.ts +20 -0
- package/dist/core/index.js +18 -0
- package/dist/core/keyed.d.ts +12 -0
- package/dist/core/keyed.js +24 -0
- package/dist/core/lane.d.ts +46 -0
- package/dist/core/lane.js +5 -0
- package/dist/core/limit.d.ts +9 -0
- package/dist/core/limit.js +29 -0
- package/dist/core/live/command-gateway.d.ts +11 -0
- package/dist/core/live/command-gateway.js +83 -0
- package/dist/core/live/job-summary-gateway.d.ts +5 -0
- package/dist/core/live/job-summary-gateway.js +20 -0
- package/dist/core/live/progress-terminal.d.ts +20 -0
- package/dist/core/live/progress-terminal.js +173 -0
- package/dist/core/live/run-directory-gateway.d.ts +24 -0
- package/dist/core/live/run-directory-gateway.js +437 -0
- package/dist/core/mint.d.ts +10 -0
- package/dist/core/mint.js +14 -0
- package/dist/core/payload.d.ts +26 -0
- package/dist/core/payload.js +33 -0
- package/dist/core/presentation.d.ts +87 -0
- package/dist/core/presentation.js +5 -0
- package/dist/core/presentations.d.ts +56 -0
- package/dist/core/presentations.js +66 -0
- package/dist/core/provider.d.ts +69 -0
- package/dist/core/provider.js +5 -0
- package/dist/core/resource.d.ts +262 -0
- package/dist/core/resource.js +6 -0
- package/dist/core/resources.d.ts +131 -0
- package/dist/core/resources.js +254 -0
- package/dist/core/run-directory.d.ts +69 -0
- package/dist/core/run-directory.js +94 -0
- package/dist/core/run-state.d.ts +152 -0
- package/dist/core/run-state.js +313 -0
- package/dist/core/run.d.ts +187 -0
- package/dist/core/run.js +321 -0
- package/dist/core/state-directory.d.ts +19 -0
- package/dist/core/state-directory.js +29 -0
- package/dist/core/timeline.d.ts +63 -0
- package/dist/core/timeline.js +97 -0
- package/dist/core/timing.d.ts +22 -0
- package/dist/core/timing.js +26 -0
- package/dist/credential/credential.d.ts +46 -0
- package/dist/credential/credential.js +80 -0
- package/dist/credential/diagnosis.d.ts +18 -0
- package/dist/credential/diagnosis.js +99 -0
- package/dist/credential/gateways.d.ts +109 -0
- package/dist/credential/gateways.js +1 -0
- package/dist/credential/index.d.ts +7 -0
- package/dist/credential/index.js +7 -0
- package/dist/credential/live/github-actions-token-gateway.d.ts +15 -0
- package/dist/credential/live/github-actions-token-gateway.js +43 -0
- package/dist/credential/live/github-actions-token-response.d.ts +19 -0
- package/dist/credential/live/github-actions-token-response.js +49 -0
- package/dist/credential/live/vercel-cli-gateway.d.ts +9 -0
- package/dist/credential/live/vercel-cli-gateway.js +64 -0
- package/dist/credential/live/vercel-output.d.ts +60 -0
- package/dist/credential/live/vercel-output.js +122 -0
- package/dist/credential/live/vercel-process.d.ts +14 -0
- package/dist/credential/live/vercel-process.js +3 -0
- package/dist/credential/settle.d.ts +31 -0
- package/dist/credential/settle.js +49 -0
- package/dist/credential/source.d.ts +110 -0
- package/dist/credential/source.js +114 -0
- package/dist/help-logo.d.ts +11 -0
- package/dist/help-logo.js +56 -0
- package/dist/presentation.d.ts +26 -0
- package/dist/presentation.js +21 -0
- package/dist/resources/github/cleanup.d.ts +23 -0
- package/dist/resources/github/cleanup.js +39 -0
- package/dist/resources/github/command.d.ts +74 -0
- package/dist/resources/github/command.js +117 -0
- package/dist/resources/github/config.d.ts +16 -0
- package/dist/resources/github/config.js +37 -0
- package/dist/resources/github/events.d.ts +26 -0
- package/dist/resources/github/events.js +2 -0
- package/dist/resources/github/fixture-repo.d.ts +69 -0
- package/dist/resources/github/fixture-repo.js +60 -0
- package/dist/resources/github/gateways.d.ts +62 -0
- package/dist/resources/github/gateways.js +1 -0
- package/dist/resources/github/index.d.ts +12 -0
- package/dist/resources/github/index.js +15 -0
- package/dist/resources/github/live/fixture-repo-gateway.d.ts +12 -0
- package/dist/resources/github/live/fixture-repo-gateway.js +92 -0
- package/dist/resources/github/live/gateways.d.ts +6 -0
- package/dist/resources/github/live/gateways.js +13 -0
- package/dist/resources/github/presentation.d.ts +13 -0
- package/dist/resources/github/presentation.js +43 -0
- package/dist/resources/github/provider.d.ts +66 -0
- package/dist/resources/github/provider.js +58 -0
- package/dist/resources/github/resource-provider.d.ts +6 -0
- package/dist/resources/github/resource-provider.js +20 -0
- package/dist/resources/github/resource.d.ts +33 -0
- package/dist/resources/github/resource.js +12 -0
- package/dist/resources/testserver/cleanup.d.ts +14 -0
- package/dist/resources/testserver/cleanup.js +22 -0
- package/dist/resources/testserver/command.d.ts +322 -0
- package/dist/resources/testserver/command.js +245 -0
- package/dist/resources/testserver/commands/app.d.ts +18 -0
- package/dist/resources/testserver/commands/app.js +3 -0
- package/dist/resources/testserver/commands/create/command.d.ts +136 -0
- package/dist/resources/testserver/commands/create/command.js +158 -0
- package/dist/resources/testserver/commands/create/metadata.d.ts +31 -0
- package/dist/resources/testserver/commands/create/metadata.js +45 -0
- package/dist/resources/testserver/commands/create/outcomes.d.ts +111 -0
- package/dist/resources/testserver/commands/create/outcomes.js +172 -0
- package/dist/resources/testserver/commands/list/command.d.ts +60 -0
- package/dist/resources/testserver/commands/list/command.js +56 -0
- package/dist/resources/testserver/commands/list/metadata.d.ts +9 -0
- package/dist/resources/testserver/commands/list/metadata.js +9 -0
- package/dist/resources/testserver/commands/list/outcomes.d.ts +54 -0
- package/dist/resources/testserver/commands/list/outcomes.js +152 -0
- package/dist/resources/testserver/config.d.ts +18 -0
- package/dist/resources/testserver/config.js +78 -0
- package/dist/resources/testserver/credential-facts.d.ts +80 -0
- package/dist/resources/testserver/credential-facts.js +83 -0
- package/dist/resources/testserver/events.d.ts +59 -0
- package/dist/resources/testserver/events.js +4 -0
- package/dist/resources/testserver/index.d.ts +16 -0
- package/dist/resources/testserver/index.js +24 -0
- package/dist/resources/testserver/lane.d.ts +28 -0
- package/dist/resources/testserver/lane.js +139 -0
- package/dist/resources/testserver/live/gateways.d.ts +6 -0
- package/dist/resources/testserver/live/gateways.js +26 -0
- package/dist/resources/testserver/options.d.ts +5 -0
- package/dist/resources/testserver/options.js +5 -0
- package/dist/resources/testserver/pool/channels.d.ts +80 -0
- package/dist/resources/testserver/pool/channels.js +48 -0
- package/dist/resources/testserver/pool/create.d.ts +48 -0
- package/dist/resources/testserver/pool/create.js +45 -0
- package/dist/resources/testserver/pool/directory.d.ts +4 -0
- package/dist/resources/testserver/pool/directory.js +5 -0
- package/dist/resources/testserver/pool/gateways.d.ts +190 -0
- package/dist/resources/testserver/pool/gateways.js +1 -0
- package/dist/resources/testserver/pool/host.d.ts +8 -0
- package/dist/resources/testserver/pool/host.js +21 -0
- package/dist/resources/testserver/pool/index.d.ts +9 -0
- package/dist/resources/testserver/pool/index.js +10 -0
- package/dist/resources/testserver/pool/inspect.d.ts +53 -0
- package/dist/resources/testserver/pool/inspect.js +45 -0
- package/dist/resources/testserver/pool/lease.d.ts +84 -0
- package/dist/resources/testserver/pool/lease.js +125 -0
- package/dist/resources/testserver/pool/live/pool-records.d.ts +17 -0
- package/dist/resources/testserver/pool/live/pool-records.js +70 -0
- package/dist/resources/testserver/pool/live/pool-store-gateway.d.ts +12 -0
- package/dist/resources/testserver/pool/live/pool-store-gateway.js +435 -0
- package/dist/resources/testserver/pool/staleness.d.ts +16 -0
- package/dist/resources/testserver/pool/staleness.js +27 -0
- package/dist/resources/testserver/presentation.d.ts +9 -0
- package/dist/resources/testserver/presentation.js +217 -0
- package/dist/resources/testserver/provider.d.ts +177 -0
- package/dist/resources/testserver/provider.js +254 -0
- package/dist/resources/testserver/ran.d.ts +87 -0
- package/dist/resources/testserver/ran.js +140 -0
- package/dist/resources/testserver/resource-provider.d.ts +12 -0
- package/dist/resources/testserver/resource-provider.js +38 -0
- package/dist/resources/testserver/resource.d.ts +32 -0
- package/dist/resources/testserver/resource.js +10 -0
- package/dist/resources/testserver/run-sandbox.d.ts +13 -0
- package/dist/resources/testserver/run-sandbox.js +6 -0
- package/dist/resources/testserver/sandbox/channels.d.ts +12 -0
- package/dist/resources/testserver/sandbox/channels.js +21 -0
- package/dist/resources/testserver/sandbox/create-failure.d.ts +35 -0
- package/dist/resources/testserver/sandbox/create-failure.js +65 -0
- package/dist/resources/testserver/sandbox/create.d.ts +29 -0
- package/dist/resources/testserver/sandbox/create.js +37 -0
- package/dist/resources/testserver/sandbox/gateways.d.ts +150 -0
- package/dist/resources/testserver/sandbox/gateways.js +1 -0
- package/dist/resources/testserver/sandbox/index.d.ts +6 -0
- package/dist/resources/testserver/sandbox/index.js +7 -0
- package/dist/resources/testserver/sandbox/live/builds-response.d.ts +9 -0
- package/dist/resources/testserver/sandbox/live/builds-response.js +27 -0
- package/dist/resources/testserver/sandbox/live/control-plane-gateway.d.ts +17 -0
- package/dist/resources/testserver/sandbox/live/control-plane-gateway.js +133 -0
- package/dist/resources/testserver/sandbox/live/create-response.d.ts +35 -0
- package/dist/resources/testserver/sandbox/live/create-response.js +78 -0
- package/dist/resources/testserver/sandbox/live/fetch-failure.d.ts +24 -0
- package/dist/resources/testserver/sandbox/live/fetch-failure.js +45 -0
- package/dist/resources/testserver/sandbox/live/health-check-gateway.d.ts +11 -0
- package/dist/resources/testserver/sandbox/live/health-check-gateway.js +36 -0
- package/dist/resources/testserver/sandbox/live/sse.d.ts +12 -0
- package/dist/resources/testserver/sandbox/live/sse.js +32 -0
- package/dist/resources.d.ts +455 -0
- package/dist/resources.js +88 -0
- package/dist/runner/base.d.ts +40 -0
- package/dist/runner/base.js +52 -0
- package/dist/runner/context.d.ts +13 -0
- package/dist/runner/context.js +9 -0
- package/dist/runner/events.d.ts +179 -0
- package/dist/runner/events.js +16 -0
- package/dist/runner/gateways.d.ts +351 -0
- package/dist/runner/gateways.js +3 -0
- package/dist/runner/index.d.ts +19 -0
- package/dist/runner/index.js +18 -0
- package/dist/runner/live/checkout-gateway.d.ts +3 -0
- package/dist/runner/live/checkout-gateway.js +206 -0
- package/dist/runner/live/git-output.d.ts +14 -0
- package/dist/runner/live/git-output.js +32 -0
- package/dist/runner/live/sandbox-errors.d.ts +7 -0
- package/dist/runner/live/sandbox-errors.js +21 -0
- package/dist/runner/live/sandbox-gateway.d.ts +7 -0
- package/dist/runner/live/sandbox-gateway.js +427 -0
- package/dist/runner/live/snapshot-cache-gateway.d.ts +12 -0
- package/dist/runner/live/snapshot-cache-gateway.js +104 -0
- package/dist/runner/live/snapshot-records.d.ts +11 -0
- package/dist/runner/live/snapshot-records.js +57 -0
- package/dist/runner/live/terminal.d.ts +16 -0
- package/dist/runner/live/terminal.js +37 -0
- package/dist/runner/live/user.d.ts +2 -0
- package/dist/runner/live/user.js +11 -0
- package/dist/runner/output.d.ts +23 -0
- package/dist/runner/output.js +58 -0
- package/dist/runner/prepare.d.ts +67 -0
- package/dist/runner/prepare.js +59 -0
- package/dist/runner/ready.d.ts +68 -0
- package/dist/runner/ready.js +159 -0
- package/dist/runner/recipe.d.ts +126 -0
- package/dist/runner/recipe.js +302 -0
- package/dist/runner/remote-command.d.ts +77 -0
- package/dist/runner/remote-command.js +127 -0
- package/dist/runner/scope.d.ts +58 -0
- package/dist/runner/scope.js +117 -0
- package/dist/runner/snapshot-build.d.ts +33 -0
- package/dist/runner/snapshot-build.js +112 -0
- package/dist/runner/snapshot-cache.d.ts +84 -0
- package/dist/runner/snapshot-cache.js +126 -0
- package/dist/runner/snapshot-key.d.ts +52 -0
- package/dist/runner/snapshot-key.js +91 -0
- package/dist/runner/steps.d.ts +41 -0
- package/dist/runner/steps.js +49 -0
- package/dist/sdk/container/api-request.d.ts +32 -0
- package/dist/sdk/container/api-request.js +46 -0
- package/dist/sdk/container/container.d.ts +144 -0
- package/dist/sdk/container/container.js +346 -0
- package/dist/sdk/container/feature-flags.d.ts +37 -0
- package/dist/sdk/container/feature-flags.js +118 -0
- package/dist/sdk/container/gateways.d.ts +108 -0
- package/dist/sdk/container/gateways.js +1 -0
- package/dist/sdk/container/index.d.ts +5 -0
- package/dist/sdk/container/index.js +5 -0
- package/dist/sdk/container/live/container-gateway.d.ts +17 -0
- package/dist/sdk/container/live/container-gateway.js +114 -0
- package/dist/sdk/factories/build.d.ts +66 -0
- package/dist/sdk/factories/build.js +98 -0
- package/dist/sdk/factories/definition.d.ts +28 -0
- package/dist/sdk/factories/definition.js +16 -0
- package/dist/sdk/factories/definitions.d.ts +166 -0
- package/dist/sdk/factories/definitions.js +235 -0
- package/dist/sdk/factories/gateways.d.ts +25 -0
- package/dist/sdk/factories/gateways.js +1 -0
- package/dist/sdk/factories/index.d.ts +5 -0
- package/dist/sdk/factories/index.js +5 -0
- package/dist/sdk/factories/live/factory-gateway.d.ts +10 -0
- package/dist/sdk/factories/live/factory-gateway.js +29 -0
- package/dist/sdk/index.d.ts +7 -0
- package/dist/sdk/index.js +15 -0
- package/dist/sdk/payload/index.d.ts +2 -0
- package/dist/sdk/payload/index.js +4 -0
- package/dist/sdk/payload/payload.d.ts +47 -0
- package/dist/sdk/payload/payload.js +74 -0
- package/dist/sdk/payload/test-events.d.ts +102 -0
- package/dist/sdk/payload/test-events.js +59 -0
- package/dist/sdk/proxy/exchange.d.ts +58 -0
- package/dist/sdk/proxy/exchange.js +173 -0
- package/dist/sdk/proxy/faulted-exchange.d.ts +10 -0
- package/dist/sdk/proxy/faulted-exchange.js +106 -0
- package/dist/sdk/proxy/faults.d.ts +133 -0
- package/dist/sdk/proxy/faults.js +147 -0
- package/dist/sdk/proxy/index.d.ts +3 -0
- package/dist/sdk/proxy/index.js +3 -0
- package/dist/sdk/proxy/proxy.d.ts +93 -0
- package/dist/sdk/proxy/proxy.js +99 -0
- package/dist/sdk/proxy/records.d.ts +56 -0
- package/dist/sdk/proxy/records.js +56 -0
- package/dist/sdk/records/body.d.ts +89 -0
- package/dist/sdk/records/body.js +236 -0
- package/dist/sdk/records/index.d.ts +2 -0
- package/dist/sdk/records/index.js +4 -0
- package/dist/sdk/records/records.d.ts +49 -0
- package/dist/sdk/records/records.js +16 -0
- package/dist/sdk/seed/index.d.ts +1 -0
- package/dist/sdk/seed/index.js +3 -0
- package/dist/sdk/seed/seed.d.ts +221 -0
- package/dist/sdk/seed/seed.js +171 -0
- package/dist/sdk/testserver/clock.d.ts +8 -0
- package/dist/sdk/testserver/clock.js +10 -0
- package/dist/sdk/testserver/failure.d.ts +73 -0
- package/dist/sdk/testserver/failure.js +61 -0
- package/dist/sdk/testserver/index.d.ts +5 -0
- package/dist/sdk/testserver/index.js +8 -0
- package/dist/sdk/testserver/live/connect-failure.d.ts +7 -0
- package/dist/sdk/testserver/live/connect-failure.js +30 -0
- package/dist/sdk/testserver/live/request.d.ts +69 -0
- package/dist/sdk/testserver/live/request.js +89 -0
- package/dist/sdk/testserver/service-ids.d.ts +19 -0
- package/dist/sdk/testserver/service-ids.js +77 -0
- package/dist/sdk/testserver/test-id.d.ts +15 -0
- package/dist/sdk/testserver/test-id.js +28 -0
- package/dist/story/align.d.ts +37 -0
- package/dist/story/align.js +39 -0
- package/dist/story/artifact.d.ts +60 -0
- package/dist/story/artifact.js +93 -0
- package/dist/story/definition.d.ts +52 -0
- package/dist/story/definition.js +9 -0
- package/dist/story/diff.d.ts +9 -0
- package/dist/story/diff.js +97 -0
- package/dist/story/errors.d.ts +14 -0
- package/dist/story/errors.js +21 -0
- package/dist/story/gateways.d.ts +74 -0
- package/dist/story/gateways.js +3 -0
- package/dist/story/host.d.ts +27 -0
- package/dist/story/host.js +97 -0
- package/dist/story/index.d.ts +7 -0
- package/dist/story/index.js +9 -0
- package/dist/story/json.d.ts +16 -0
- package/dist/story/json.js +59 -0
- package/dist/story/live/artifact-gateway.d.ts +2 -0
- package/dist/story/live/artifact-gateway.js +82 -0
- package/dist/story/mode.d.ts +17 -0
- package/dist/story/mode.js +21 -0
- package/dist/story/orphans.d.ts +17 -0
- package/dist/story/orphans.js +15 -0
- package/dist/story/report.d.ts +30 -0
- package/dist/story/report.js +118 -0
- package/dist/story/run.d.ts +49 -0
- package/dist/story/run.js +160 -0
- package/dist/story/sequence.d.ts +30 -0
- package/dist/story/sequence.js +74 -0
- package/dist/story/settle.d.ts +94 -0
- package/dist/story/settle.js +70 -0
- package/dist/time/duration.d.ts +19 -0
- package/dist/time/duration.js +37 -0
- package/dist/time/index.d.ts +2 -0
- package/dist/time/index.js +4 -0
- package/dist/time/time.d.ts +15 -0
- package/dist/time/time.js +23 -0
- package/dist/vercel-cli/ansi.d.ts +13 -0
- package/dist/vercel-cli/ansi.js +32 -0
- package/dist/vercel-cli/arguments.d.ts +25 -0
- package/dist/vercel-cli/arguments.js +78 -0
- package/dist/vercel-cli/auth-config.d.ts +43 -0
- package/dist/vercel-cli/auth-config.js +36 -0
- package/dist/vercel-cli/clock.d.ts +9 -0
- package/dist/vercel-cli/clock.js +10 -0
- package/dist/vercel-cli/config-files.d.ts +24 -0
- package/dist/vercel-cli/config-files.js +40 -0
- package/dist/vercel-cli/context.d.ts +12 -0
- package/dist/vercel-cli/context.js +12 -0
- package/dist/vercel-cli/driver.d.ts +218 -0
- package/dist/vercel-cli/driver.js +364 -0
- package/dist/vercel-cli/entry.d.ts +8 -0
- package/dist/vercel-cli/entry.js +13 -0
- package/dist/vercel-cli/environment.d.ts +33 -0
- package/dist/vercel-cli/environment.js +72 -0
- package/dist/vercel-cli/errors.d.ts +8 -0
- package/dist/vercel-cli/errors.js +8 -0
- package/dist/vercel-cli/gateways.d.ts +103 -0
- package/dist/vercel-cli/gateways.js +4 -0
- package/dist/vercel-cli/index.d.ts +10 -0
- package/dist/vercel-cli/index.js +15 -0
- package/dist/vercel-cli/invocation.d.ts +234 -0
- package/dist/vercel-cli/invocation.js +397 -0
- package/dist/vercel-cli/keys.d.ts +14 -0
- package/dist/vercel-cli/keys.js +12 -0
- package/dist/vercel-cli/live/config-files.d.ts +28 -0
- package/dist/vercel-cli/live/config-files.js +66 -0
- package/dist/vercel-cli/live/process-gateway.d.ts +14 -0
- package/dist/vercel-cli/live/process-gateway.js +178 -0
- package/dist/vercel-cli/redaction.d.ts +13 -0
- package/dist/vercel-cli/redaction.js +22 -0
- package/dist/vercel-cli/report.d.ts +22 -0
- package/dist/vercel-cli/report.js +110 -0
- package/dist/vercel-cli/verbose.d.ts +7 -0
- package/dist/vercel-cli/verbose.js +24 -0
- package/dist/version.d.ts +20 -0
- package/dist/version.js +57 -0
- package/dist/vitest/config.d.ts +51 -0
- package/dist/vitest/config.js +61 -0
- package/dist/vitest/container-scope.d.ts +108 -0
- package/dist/vitest/container-scope.js +234 -0
- package/dist/vitest/diagnostics.d.ts +146 -0
- package/dist/vitest/diagnostics.js +306 -0
- package/dist/vitest/find-vitest.d.ts +7 -0
- package/dist/vitest/find-vitest.js +28 -0
- package/dist/vitest/fixtures.d.ts +64 -0
- package/dist/vitest/fixtures.js +172 -0
- package/dist/vitest/gateways.d.ts +78 -0
- package/dist/vitest/gateways.js +4 -0
- package/dist/vitest/index.d.ts +3 -0
- package/dist/vitest/index.js +9 -0
- package/dist/vitest/list-output.d.ts +3 -0
- package/dist/vitest/list-output.js +19 -0
- package/dist/vitest/live/list-gateway.d.ts +11 -0
- package/dist/vitest/live/list-gateway.js +107 -0
- package/dist/vitest/ownership.d.ts +29 -0
- package/dist/vitest/ownership.js +68 -0
- package/dist/vitest/plan.d.ts +66 -0
- package/dist/vitest/plan.js +104 -0
- package/dist/vitest/sandbox.d.ts +16 -0
- package/dist/vitest/sandbox.js +35 -0
- package/dist/vitest/test-events.d.ts +41 -0
- package/dist/vitest/test-events.js +92 -0
- package/dist/vitest/test-results.d.ts +84 -0
- package/dist/vitest/test-results.js +160 -0
- package/dist/vitest/types.d.ts +68 -0
- package/dist/vitest/types.js +4 -0
- package/package.json +119 -3
- package/skills/overview.md +33 -0
- package/skills/read-run-output.md +65 -0
- package/README.md +0 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// The command half of a resource provider: what the composition layer asks each resource for when it settles a run
|
|
2
|
+
// and when it reports a run's outcome and progress, and the reports beside it: its cleanup report and its ran report.
|
|
3
|
+
// `resource.ts` holds the run half. Each resource folder implements them, and its provider value (`provider.ts`)
|
|
4
|
+
// carries them to the registry, which binds them to their names (`command-slots.ts`). It imports only Clinkr's and
|
|
5
|
+
// zod's types, so a resource folder can implement it without reaching into the composition layer. Users never see the
|
|
6
|
+
// word "provider": they see the resource's key under `resources`.
|
|
7
|
+
/**
|
|
8
|
+
* A resource's refusal errors as definitions, each with a schema: `defineErrors`' input, which types each `render` by
|
|
9
|
+
* its schema. The host defines them, with the run's cleanup beside each one's data.
|
|
10
|
+
*/
|
|
11
|
+
export function defineRefusals(definitions) {
|
|
12
|
+
return definitions;
|
|
13
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { CommandError, Refusable, Row, Warning } from "@vercel/clinkr";
|
|
2
|
+
import type { z } from "zod";
|
|
3
|
+
import type { RunnerResources } from "../runner/index.ts";
|
|
4
|
+
import type { RefusalFact } from "./command-provider.ts";
|
|
5
|
+
import type { ProviderList } from "./provider.ts";
|
|
6
|
+
import type { ResourceCanceledFacts, ResourceCleanup, ResourceCleanupFacts, ResourceFacts, ResourceFailures, ResourceOptions, ResourceRanFacts, ResourceReason, ResourceRefusal, ResourceRequests, ResourceUnprepared } from "./resource.ts";
|
|
7
|
+
/**
|
|
8
|
+
* Every resource's reports, in provider order, over kinds map `K`.
|
|
9
|
+
*
|
|
10
|
+
* - `cleanupSchema`: the run cleanup's `resources`, each resource's cleanup facts under its name, present once the run
|
|
11
|
+
* held it.
|
|
12
|
+
* - `cleanupFacts`: the run's resource cleanup as outcomes report it.
|
|
13
|
+
* - `cleanupRows` and `cleanupWarnings`: the rows an error lists and the warnings a ran outcome gives for what
|
|
14
|
+
* releasing the resources couldn't do, resource by resource.
|
|
15
|
+
* - `failuresTexts`: the progress cleanup line's words for each resource whose release couldn't do something.
|
|
16
|
+
* - `ranSchema`: a ran outcome's `resources`, each acquired resource's ran facts under its name, for the resources
|
|
17
|
+
* that report any.
|
|
18
|
+
* - `ranFacts` and `ranWarnings`: a ran outcome's `resources`, from the acquired resources' facts and their requests,
|
|
19
|
+
* and the warnings they give.
|
|
20
|
+
* - `ranRows`: the rows `storm runs show` lists for a past run's `resources`, resource by resource.
|
|
21
|
+
* - `runnerResources`: what a runner recipe's `vcpus` function sees of the resources the run holds.
|
|
22
|
+
* - `hostVariablesToDrop`: every resource's host variables the run's command must not see.
|
|
23
|
+
*/
|
|
24
|
+
export interface ResourceReports<K> {
|
|
25
|
+
readonly cleanupSchema: z.ZodType<ResourceCleanupFacts<K>, ResourceCleanupFacts<K>>;
|
|
26
|
+
cleanupFacts(cleanup: ResourceCleanup<K>): ResourceCleanupFacts<K>;
|
|
27
|
+
cleanupRows(facts: ResourceCleanupFacts<K>): readonly Row[];
|
|
28
|
+
cleanupWarnings(facts: ResourceCleanupFacts<K>): readonly Warning[];
|
|
29
|
+
failuresTexts(failures: ResourceFailures<K>): readonly string[];
|
|
30
|
+
readonly ranSchema: z.ZodType<ResourceRanFacts<K>, ResourceRanFacts<K>>;
|
|
31
|
+
ranFacts(facts: ResourceFacts<K>, requests: ResourceRequests<K>): ResourceRanFacts<K>;
|
|
32
|
+
ranWarnings(ran: ResourceRanFacts<K>): readonly Warning[];
|
|
33
|
+
ranRows(ran: ResourceRanFacts<K>): readonly Row[];
|
|
34
|
+
runnerResources(options: ResourceOptions<K>): RunnerResources;
|
|
35
|
+
readonly hostVariablesToDrop: readonly string[];
|
|
36
|
+
}
|
|
37
|
+
/** Every one of `providers`' reports, bound to their names, in order. */
|
|
38
|
+
export declare function resourceReports<K>(providers: ProviderList<K>): ResourceReports<K>;
|
|
39
|
+
/**
|
|
40
|
+
* Every held resource settled: the secrets the run hides as `<token>` in what it prints and writes, and the
|
|
41
|
+
* resources' part of the run request, the same in either kind of run.
|
|
42
|
+
*/
|
|
43
|
+
export interface ResourcesSettlement<K> {
|
|
44
|
+
readonly secrets: readonly string[];
|
|
45
|
+
readonly requests: ResourceRequests<K>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Every resource's command half, bound to its name, in provider order, over kinds map `K`. Every error is one of the
|
|
49
|
+
* resources' (`ResourceReason<K>`).
|
|
50
|
+
*
|
|
51
|
+
* - `settle`: settles every held resource, in provider order: their parts of the run request and their secrets, or
|
|
52
|
+
* the first refusal. `configFile` is the config file that applied, which a settle's error names.
|
|
53
|
+
* - `takesCredential`: whether any held resource, with its resolved options, takes the run's credential.
|
|
54
|
+
* - `refusalFacts`: which of its refusal errors a run a resource refused while it acquired ends with, and that error's
|
|
55
|
+
* data, without the run's cleanup, which the composition layer builds the error with.
|
|
56
|
+
* - `unpreparedError`: the error a run a resource refused before it held anything ends with.
|
|
57
|
+
* - `canceledLines`: what a canceled run changed in its resources, for a person, resource by resource.
|
|
58
|
+
*/
|
|
59
|
+
export interface ResourceCommands<K> {
|
|
60
|
+
settle(options: ResourceOptions<K>, env: Readonly<Record<string, string | undefined>>, configFile: string | null): Refusable<ResourcesSettlement<K>, CommandError<ResourceReason<K>>>;
|
|
61
|
+
takesCredential(options: ResourceOptions<K>): boolean;
|
|
62
|
+
refusalFacts(outcome: ResourceRefusal<K>): RefusalFact;
|
|
63
|
+
unpreparedError(outcome: ResourceUnprepared<K>): CommandError<ResourceReason<K>>;
|
|
64
|
+
canceledLines(resources: ResourceCanceledFacts<K>, cleanup: ResourceCleanup<K>): readonly string[];
|
|
65
|
+
}
|
|
66
|
+
/** Every one of `providers`' command halves, bound to their names, in order. */
|
|
67
|
+
export declare function bindCommands<K>(providers: ProviderList<K>): ResourceCommands<K>;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// How the composition layer asks every resource the same thing at once, through each resource's provider value: the
|
|
2
|
+
// command-side counterpart of `resources.ts`, which binds the run halves. `reportSlotOf` and `commandSlotOf` bind one
|
|
3
|
+
// provider to its name; their closures keep the provider's kind tied to its name, so every function below loops over
|
|
4
|
+
// slots in provider order and never relates a name to the kinds map. The only places a name meets the map are the
|
|
5
|
+
// helpers in `keyed.ts`.
|
|
6
|
+
//
|
|
7
|
+
// The reports are what outcomes report of each resource's cleanup and what a `ran` outcome reports of each resource
|
|
8
|
+
// (`resourceReports`); the command halves settle the resources and say which error ends a run a resource refused
|
|
9
|
+
// (`bindCommands`). A command half knows nothing of the run's cleanup: the composition layer builds each refusal error
|
|
10
|
+
// with it.
|
|
11
|
+
import { entry, keyedSchema } from "./keyed.js";
|
|
12
|
+
/** `provider`'s reports, bound to its name. */
|
|
13
|
+
function reportSlotOf(provider) {
|
|
14
|
+
const { name, cleanup } = provider;
|
|
15
|
+
const ran = provider.ran;
|
|
16
|
+
return {
|
|
17
|
+
cleanupSchema: [name, cleanup.schema.optional()],
|
|
18
|
+
ranSchema: ran === undefined ? undefined : [name, ran.schema.optional()],
|
|
19
|
+
cleanupFacts: (released) => {
|
|
20
|
+
const one = released[name];
|
|
21
|
+
return one === undefined ? {} : entry(name, cleanup.facts(one));
|
|
22
|
+
},
|
|
23
|
+
cleanupRows: (facts) => {
|
|
24
|
+
const one = facts[name];
|
|
25
|
+
return one === undefined ? [] : cleanup.rows(one);
|
|
26
|
+
},
|
|
27
|
+
cleanupWarnings: (facts) => {
|
|
28
|
+
const one = facts[name];
|
|
29
|
+
return one === undefined ? [] : cleanup.warnings(one);
|
|
30
|
+
},
|
|
31
|
+
failuresText: (failures) => {
|
|
32
|
+
const count = failures[name] ?? 0;
|
|
33
|
+
return count === 0 ? [] : [cleanup.failuresText(count)];
|
|
34
|
+
},
|
|
35
|
+
ranFacts: (facts, requests) => {
|
|
36
|
+
const request = requests[name];
|
|
37
|
+
// A resource's facts can be `undefined`, so whether it was acquired is whether its name is there.
|
|
38
|
+
if (ran === undefined || request === undefined || !Object.hasOwn(facts, name))
|
|
39
|
+
return {};
|
|
40
|
+
return entry(name, ran.facts(facts[name], request));
|
|
41
|
+
},
|
|
42
|
+
ranWarnings: (reported) => {
|
|
43
|
+
const one = reported[name];
|
|
44
|
+
return ran === undefined || one === undefined ? [] : ran.warnings(one);
|
|
45
|
+
},
|
|
46
|
+
ranRows: (reported) => {
|
|
47
|
+
const one = reported[name];
|
|
48
|
+
return ran === undefined || one === undefined ? [] : ran.rows(one);
|
|
49
|
+
},
|
|
50
|
+
runnerResources: (options) => {
|
|
51
|
+
const one = options[name];
|
|
52
|
+
return one === undefined || provider.runnerResources === undefined ? {} : provider.runnerResources(one);
|
|
53
|
+
},
|
|
54
|
+
hostVariablesToDrop: provider.hostVariablesToDrop ?? [],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/** Every one of `providers`' reports, bound to their names, in order. */
|
|
58
|
+
export function resourceReports(providers) {
|
|
59
|
+
const slots = providers.map((provider) => reportSlotOf(provider));
|
|
60
|
+
return {
|
|
61
|
+
cleanupSchema: keyedSchema(slots.map((slot) => slot.cleanupSchema)),
|
|
62
|
+
cleanupFacts: (cleanup) => merged(slots.map((slot) => slot.cleanupFacts(cleanup))),
|
|
63
|
+
cleanupRows: (facts) => slots.flatMap((slot) => slot.cleanupRows(facts)),
|
|
64
|
+
cleanupWarnings: (facts) => slots.flatMap((slot) => slot.cleanupWarnings(facts)),
|
|
65
|
+
failuresTexts: (failures) => slots.flatMap((slot) => slot.failuresText(failures)),
|
|
66
|
+
ranSchema: keyedSchema(slots.flatMap((slot) => (slot.ranSchema === undefined ? [] : [slot.ranSchema]))),
|
|
67
|
+
ranFacts: (facts, requests) => merged(slots.map((slot) => slot.ranFacts(facts, requests))),
|
|
68
|
+
ranWarnings: (ran) => slots.flatMap((slot) => slot.ranWarnings(ran)),
|
|
69
|
+
ranRows: (ran) => slots.flatMap((slot) => slot.ranRows(ran)),
|
|
70
|
+
runnerResources: (options) => merged(slots.map((slot) => slot.runnerResources(options))),
|
|
71
|
+
hostVariablesToDrop: slots.flatMap((slot) => slot.hostVariablesToDrop),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/** One map from `parts`, each keyed by one resource's name, in order. */
|
|
75
|
+
function merged(parts) {
|
|
76
|
+
let all = {};
|
|
77
|
+
for (const part of parts)
|
|
78
|
+
all = { ...all, ...part };
|
|
79
|
+
return all;
|
|
80
|
+
}
|
|
81
|
+
/** `provider`'s command half, bound to its name. */
|
|
82
|
+
function commandSlotOf(provider) {
|
|
83
|
+
const { name, command: half } = provider;
|
|
84
|
+
// None for a kind whose prepare never refuses, whose prepare refusal, and so its outcome, can't exist.
|
|
85
|
+
const unprepared = half.unpreparedError;
|
|
86
|
+
return {
|
|
87
|
+
settle: (options, env, configFile) => {
|
|
88
|
+
const one = options[name];
|
|
89
|
+
if (one === undefined)
|
|
90
|
+
return undefined;
|
|
91
|
+
const settled = half.settle({ options: one, env, configFile });
|
|
92
|
+
if (!settled.ok)
|
|
93
|
+
return settled;
|
|
94
|
+
return { ok: true, secrets: settled.secrets, requests: entry(name, settled.request) };
|
|
95
|
+
},
|
|
96
|
+
takesCredential: (options) => {
|
|
97
|
+
const one = options[name];
|
|
98
|
+
return one !== undefined && half.takesCredential(one);
|
|
99
|
+
},
|
|
100
|
+
// Each union is distributed over every name, so its member whose `resource` is `name` carries this resource's
|
|
101
|
+
// refusal.
|
|
102
|
+
refusalFacts: (outcome) => (outcome.resource === name ? half.refusalFacts(outcome.refusal) : undefined),
|
|
103
|
+
unpreparedError: (outcome) => (outcome.resource === name ? unprepared?.(outcome.refusal) : undefined),
|
|
104
|
+
canceledLines: (resources, cleanup) => half.canceledLines(resources[name], cleanup[name]),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/** Every one of `providers`' command halves, bound to their names, in order. */
|
|
108
|
+
export function bindCommands(providers) {
|
|
109
|
+
const slots = providers.map((provider) => commandSlotOf(provider));
|
|
110
|
+
const first = (answers, what) => {
|
|
111
|
+
const found = answers.find((answer) => answer !== undefined);
|
|
112
|
+
if (found === undefined)
|
|
113
|
+
throw new Error(`No resource answered ${what}`);
|
|
114
|
+
return found;
|
|
115
|
+
};
|
|
116
|
+
return {
|
|
117
|
+
settle: (options, env, configFile) => {
|
|
118
|
+
let secrets = [];
|
|
119
|
+
let requests = {};
|
|
120
|
+
for (const slot of slots) {
|
|
121
|
+
const settled = slot.settle(options, env, configFile);
|
|
122
|
+
if (settled === undefined)
|
|
123
|
+
continue;
|
|
124
|
+
if (!settled.ok)
|
|
125
|
+
return settled;
|
|
126
|
+
secrets = [...secrets, ...settled.secrets];
|
|
127
|
+
requests = { ...requests, ...settled.requests };
|
|
128
|
+
}
|
|
129
|
+
return { ok: true, secrets, requests };
|
|
130
|
+
},
|
|
131
|
+
takesCredential: (options) => slots.some((slot) => slot.takesCredential(options)),
|
|
132
|
+
refusalFacts: (outcome) => first(slots.map((slot) => slot.refusalFacts(outcome)), `${outcome.resource}'s refusal`),
|
|
133
|
+
unpreparedError: (outcome) => first(slots.map((slot) => slot.unpreparedError(outcome)), `${outcome.resource}'s prepare refusal`),
|
|
134
|
+
canceledLines: (resources, released) => slots.flatMap((slot) => slot.canceledLines(resources, released)),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { MintTarget } from "../credential/index.ts";
|
|
2
|
+
import type { RunnerEvent, SnapshotCacheNote } from "../runner/index.ts";
|
|
3
|
+
import type { Clock } from "../time/index.ts";
|
|
4
|
+
import type { TestEvent } from "../sdk/index.ts";
|
|
5
|
+
import type { AnyResources, ResourceEvent, ResourceFailures, ResourceHoldings, RunLane } from "./resource.ts";
|
|
6
|
+
import type { RanCommand } from "./timing.ts";
|
|
7
|
+
/** How a lane ended: ready for the command, failed, or stopped short of ready. */
|
|
8
|
+
export type LaneOutcome = "ready" | "failed" | "stopped";
|
|
9
|
+
/**
|
|
10
|
+
* What a run reports as it goes, in order, over the registry's kinds `K`. A run emits them; how they look is the
|
|
11
|
+
* caller's (`RunProgress`).
|
|
12
|
+
*
|
|
13
|
+
* - `started`: the run began; `version` is storm's, `commit` the git commit it was built from, if known,
|
|
14
|
+
* `configFile` the config file its settings came from, if any, `lanes` the lanes of the resources it holds, in
|
|
15
|
+
* provider order: none when it holds no resource with a lane, and `resources` the resources it holds, by name, in
|
|
16
|
+
* provider order.
|
|
17
|
+
* - `runner-prepared`: in a runner run, what the local checks found: the base, a full SHA, and the ref it is HEAD's
|
|
18
|
+
* merge-base with; the untracked nested Git repositories the upload leaves out; and what the cache read noticed.
|
|
19
|
+
* - `minting`, `minted` and `requesting-token`: a credential's events (`CredentialEvent`): the run's one mint, which a
|
|
20
|
+
* runner run makes for its runner sandbox and a resource makes in a local run, and a GitHub Actions OIDC token
|
|
21
|
+
* request.
|
|
22
|
+
* - `lanes-started`: in a runner run, acquiring the resources and readying the runner sandbox started together, after
|
|
23
|
+
* the mint; without a resource, readying the runner sandbox started alone.
|
|
24
|
+
* - `lane-started`: acquiring a resource with a lane started, in either kind of run; the runner lane starts with
|
|
25
|
+
* `lanes-started` instead.
|
|
26
|
+
* - `lane-ended`: one lane ended: `ready`, `failed`, or `stopped` by a signal or because another lane failed. In a
|
|
27
|
+
* runner run each lane ends this way, and the command starts once every lane it has is ready; with `--local` a
|
|
28
|
+
* resource's lane ends once acquiring it does. A run that doesn't ask for a resource reports no lane of its.
|
|
29
|
+
* - `command-started`: the command started, or in a runner run is about to start in the runner sandbox.
|
|
30
|
+
* - `command-ended`: the command ended as `outcome` after `ms`; `command` is its executable's name. A command the
|
|
31
|
+
* run killed reports the runner's `command-stopped` instead.
|
|
32
|
+
* - `cleanup-started`: the run is cleaning up: in a runner run (`runner`) stopping and deleting the runner's
|
|
33
|
+
* sandboxes, but for the runner sandbox it keeps running `keepSandboxMs` when that is above 0 (always 0 in a local
|
|
34
|
+
* run), then releasing its resources, holding what `holdings` says of each.
|
|
35
|
+
* - `cleanup-finished`: it is done; `resourceFailures` counts, for each resource the run held, what releasing it
|
|
36
|
+
* couldn't do, and in a runner run `notStopped` and `notDeleted` sandboxes couldn't be stopped or deleted.
|
|
37
|
+
* - `test`: in a runner run, a test event the command appended to the run payload's `testEvents` file, as it
|
|
38
|
+
* arrived; `test-event-unreadable`: a line there that holds none; `test-events-incomplete`: the final read of the
|
|
39
|
+
* file, once the command ended, failed with `message`, so the test events followed may not be all of them.
|
|
40
|
+
* - `runner`: in a runner run, what readying the runner sandbox and running the command in it reported.
|
|
41
|
+
* - `resource`: what one resource reported, nested with its name (`ResourceEvent`).
|
|
42
|
+
*/
|
|
43
|
+
export type RunEvent<K> = {
|
|
44
|
+
readonly kind: "started";
|
|
45
|
+
readonly version: string;
|
|
46
|
+
readonly commit: string | null;
|
|
47
|
+
readonly configFile: string | null;
|
|
48
|
+
readonly lanes: readonly RunLane<K>[];
|
|
49
|
+
readonly resources: readonly (keyof K & string)[];
|
|
50
|
+
} | {
|
|
51
|
+
readonly kind: "runner-prepared";
|
|
52
|
+
readonly base: string;
|
|
53
|
+
readonly baseRef: string;
|
|
54
|
+
readonly nestedRepositories: readonly string[];
|
|
55
|
+
readonly notes: readonly SnapshotCacheNote[];
|
|
56
|
+
} | CredentialEvent | {
|
|
57
|
+
readonly kind: "lanes-started";
|
|
58
|
+
} | {
|
|
59
|
+
readonly kind: "lane-started";
|
|
60
|
+
readonly lane: RunLane<K>;
|
|
61
|
+
} | {
|
|
62
|
+
readonly kind: "lane-ended";
|
|
63
|
+
readonly lane: RunLane<K>;
|
|
64
|
+
readonly outcome: LaneOutcome;
|
|
65
|
+
} | {
|
|
66
|
+
readonly kind: "command-started";
|
|
67
|
+
readonly argv: readonly string[];
|
|
68
|
+
} | {
|
|
69
|
+
readonly kind: "command-ended";
|
|
70
|
+
readonly command: string;
|
|
71
|
+
readonly outcome: RanCommand;
|
|
72
|
+
readonly ms: number;
|
|
73
|
+
} | {
|
|
74
|
+
readonly kind: "cleanup-started";
|
|
75
|
+
readonly runner: boolean;
|
|
76
|
+
readonly keepSandboxMs: number;
|
|
77
|
+
readonly holdings: ResourceHoldings<K>;
|
|
78
|
+
} | {
|
|
79
|
+
readonly kind: "cleanup-finished";
|
|
80
|
+
readonly resourceFailures: ResourceFailures<K>;
|
|
81
|
+
readonly notStopped: number;
|
|
82
|
+
readonly notDeleted: number;
|
|
83
|
+
} | {
|
|
84
|
+
readonly kind: "test";
|
|
85
|
+
readonly event: TestEvent;
|
|
86
|
+
} | {
|
|
87
|
+
readonly kind: "test-event-unreadable";
|
|
88
|
+
} | {
|
|
89
|
+
readonly kind: "test-events-incomplete";
|
|
90
|
+
readonly message: string;
|
|
91
|
+
} | {
|
|
92
|
+
readonly kind: "runner";
|
|
93
|
+
readonly event: RunnerEvent;
|
|
94
|
+
} | ResourceEvent<K>;
|
|
95
|
+
/** A credential's events: the run's one mint, and a GitHub Actions OIDC token request. */
|
|
96
|
+
export type CredentialEvent = {
|
|
97
|
+
readonly kind: "minting";
|
|
98
|
+
readonly target: MintTarget;
|
|
99
|
+
} | {
|
|
100
|
+
readonly kind: "minted";
|
|
101
|
+
readonly target: MintTarget;
|
|
102
|
+
readonly ok: boolean;
|
|
103
|
+
} | {
|
|
104
|
+
readonly kind: "requesting-token";
|
|
105
|
+
};
|
|
106
|
+
/** Hears a credential's events. */
|
|
107
|
+
export interface CredentialProgress {
|
|
108
|
+
emit(event: CredentialEvent): Promise<void>;
|
|
109
|
+
}
|
|
110
|
+
/** Hears a run's events as they happen. */
|
|
111
|
+
export interface RunProgress<K> {
|
|
112
|
+
emit(event: RunEvent<K>): Promise<void>;
|
|
113
|
+
}
|
|
114
|
+
/** Progress that reports nothing. */
|
|
115
|
+
export declare const silentProgress: RunProgress<AnyResources>;
|
|
116
|
+
/** A run event and when it happened, by the run's clock. */
|
|
117
|
+
export interface TimedRunEvent<K> {
|
|
118
|
+
readonly event: RunEvent<K>;
|
|
119
|
+
readonly at: Date;
|
|
120
|
+
}
|
|
121
|
+
/** Hears a run's events with the time each happened: what renders a run's progress and writes its run directory. */
|
|
122
|
+
export interface RunObserver<K> {
|
|
123
|
+
observe(timed: TimedRunEvent<K>): Promise<void>;
|
|
124
|
+
}
|
|
125
|
+
/** Progress that stamps each event with `clock`'s time as it is emitted, and hands it to `observer`. */
|
|
126
|
+
export declare function timedProgress<K>(clock: Clock, observer: RunObserver<K>): RunProgress<K>;
|
|
127
|
+
/** An observer that hands each event to every one of `observers`, in order. */
|
|
128
|
+
export declare function observeAll<K>(...observers: readonly RunObserver<K>[]): RunObserver<K>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Progress that reports nothing. */
|
|
2
|
+
export const silentProgress = { emit: async () => { } };
|
|
3
|
+
/** Progress that stamps each event with `clock`'s time as it is emitted, and hands it to `observer`. */
|
|
4
|
+
export function timedProgress(clock, observer) {
|
|
5
|
+
return { emit: (event) => observer.observe({ event, at: clock.now() }) };
|
|
6
|
+
}
|
|
7
|
+
/** An observer that hands each event to every one of `observers`, in order. */
|
|
8
|
+
export function observeAll(...observers) {
|
|
9
|
+
return {
|
|
10
|
+
observe: async (timed) => {
|
|
11
|
+
for (const observer of observers)
|
|
12
|
+
await observer.observe(timed);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import type { RunnerStepPhase } from "../runner/index.ts";
|
|
2
|
+
/** One chunk of a local command's output, as it arrives; a chunk may hold part of a line, or several. */
|
|
3
|
+
export interface CommandOutputChunk {
|
|
4
|
+
readonly stream: "stdout" | "stderr";
|
|
5
|
+
readonly data: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* One execution of a run's command: its argument list, its whole environment, when to stop it, and where its output
|
|
9
|
+
* goes.
|
|
10
|
+
*/
|
|
11
|
+
export interface CommandRequest {
|
|
12
|
+
/** The command: the argument list after `--`, run as given, with no shell. `argv[0]` is the executable. */
|
|
13
|
+
readonly argv: readonly string[];
|
|
14
|
+
/** The command's whole environment; nothing else is inherited. */
|
|
15
|
+
readonly env: Readonly<Record<string, string>>;
|
|
16
|
+
/** Aborting it sends the command SIGTERM. The command may still take its time to exit. */
|
|
17
|
+
readonly terminate: AbortSignal;
|
|
18
|
+
/** Hears each chunk of the command's stdout and stderr, as UTF-8 text, in the order it arrives. */
|
|
19
|
+
readonly onOutput: (chunk: CommandOutputChunk) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* How a command ended.
|
|
23
|
+
*
|
|
24
|
+
* - `exited`: it exited with `code`.
|
|
25
|
+
* - `signaled`: a signal ended it; `signal` is its name, such as `SIGINT`.
|
|
26
|
+
* - `spawn-failed`: it never started (no such executable, or not executable); `message` is what the OS said.
|
|
27
|
+
*/
|
|
28
|
+
export type CommandOutcome = {
|
|
29
|
+
readonly kind: "exited";
|
|
30
|
+
readonly code: number;
|
|
31
|
+
} | {
|
|
32
|
+
readonly kind: "signaled";
|
|
33
|
+
readonly signal: string;
|
|
34
|
+
} | {
|
|
35
|
+
readonly kind: "spawn-failed";
|
|
36
|
+
readonly message: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Runs a run's command with the terminal's stdin, hands its stdout and stderr to `onOutput`, and waits for it and for
|
|
40
|
+
* the last of its output. It never rejects: a command that can't start is `spawn-failed`.
|
|
41
|
+
*/
|
|
42
|
+
export interface CommandGateway {
|
|
43
|
+
run(request: CommandRequest): Promise<CommandOutcome>;
|
|
44
|
+
}
|
|
45
|
+
/** What a run directory operation couldn't do: the path and what the OS said, or why there is no place for it. */
|
|
46
|
+
export interface RunDirectoryFailure {
|
|
47
|
+
readonly path: string;
|
|
48
|
+
readonly message: string;
|
|
49
|
+
}
|
|
50
|
+
/** The output of a step in a run directory: a snapshot build's steps, applying the changes, the install, the build. */
|
|
51
|
+
export type RunDirectoryStep = RunnerStepPhase;
|
|
52
|
+
/** A run log: a step's log, or the command log (`command`), the command's output, in a run directory. */
|
|
53
|
+
export type RunLog = RunDirectoryStep | "command";
|
|
54
|
+
/**
|
|
55
|
+
* One run's run directory, open for writing: `run.json` (what the run was, and once it ended how), `events.jsonl`
|
|
56
|
+
* (the run's events, one JSON object a line), a log of each step's output (`snapshot.log`, `apply.log`,
|
|
57
|
+
* `install.log`, `build.log`), `command.log` (the command's stdout and stderr in arrival order, in either kind of
|
|
58
|
+
* run), `.test-events.jsonl` (the test events a local command stages, unredacted, while it runs, which `close`
|
|
59
|
+
* removes), `.tests.jsonl.partial` (the run's redacted test events as storm gets them), `tests.jsonl` (that file,
|
|
60
|
+
* published once the run is over) and `timeline.json`. While it is open, `active.json` marks it active, so no run
|
|
61
|
+
* prunes it. Writes never throw; `run.json`, `tests.jsonl` and `timeline.json` each appear whole, one after another in
|
|
62
|
+
* the order asked, so a reader sees a file whole or not at all; the first write that fails stops the rest, and `close`
|
|
63
|
+
* answers it.
|
|
64
|
+
*/
|
|
65
|
+
export interface RunDirectory {
|
|
66
|
+
readonly path: string;
|
|
67
|
+
/** Its run id, the directory's name. */
|
|
68
|
+
readonly id: string;
|
|
69
|
+
/** Replaces `run.json` whole. */
|
|
70
|
+
writeRun(text: string): void;
|
|
71
|
+
/** Appends one line to `events.jsonl`. */
|
|
72
|
+
appendEvent(line: string): void;
|
|
73
|
+
/** Appends one line of a step's output to its log. */
|
|
74
|
+
appendStepOutput(step: RunDirectoryStep, line: string): void;
|
|
75
|
+
/** Appends the command's output, as it came. */
|
|
76
|
+
appendCommandOutput(text: string): void;
|
|
77
|
+
/** Appends one redacted test event line to the private file that becomes `tests.jsonl`. */
|
|
78
|
+
appendTestEvent(line: string): void;
|
|
79
|
+
/**
|
|
80
|
+
* Publishes the redacted test events appended so far as `tests.jsonl`, after any earlier replacement. A run that
|
|
81
|
+
* appended none publishes an empty file. Appends after this are dropped.
|
|
82
|
+
*/
|
|
83
|
+
publishTestEvents(): void;
|
|
84
|
+
/** Writes `timeline.json` whole, after any earlier replacement. */
|
|
85
|
+
writeTimeline(text: string): void;
|
|
86
|
+
/**
|
|
87
|
+
* Streams the non-empty lines a local command staged in `.test-events.jsonl`, the test events file its run payload
|
|
88
|
+
* names, to `onLine`, in order. A file that doesn't exist reads as empty; any other read failure is returned after
|
|
89
|
+
* the lines read before it.
|
|
90
|
+
*/
|
|
91
|
+
readTestEvents(onLine: (line: string) => void): Promise<StagedTestEventsRead>;
|
|
92
|
+
/**
|
|
93
|
+
* Waits for every write so far, ends writing, removes the test events a local command staged whatever failed before,
|
|
94
|
+
* and removes the active marker, so the run directory is completed; answers the first write that failed, or else a
|
|
95
|
+
* staged test events file or a marker it couldn't remove, if any.
|
|
96
|
+
*/
|
|
97
|
+
close(): Promise<RunDirectoryFailure | undefined>;
|
|
98
|
+
}
|
|
99
|
+
/** How reading a local command's staged test events went: read whole, or stopped by a failure. */
|
|
100
|
+
export type StagedTestEventsRead = {
|
|
101
|
+
readonly ok: true;
|
|
102
|
+
} | {
|
|
103
|
+
readonly ok: false;
|
|
104
|
+
readonly failure: RunDirectoryFailure;
|
|
105
|
+
};
|
|
106
|
+
/** How opening a run directory went: the directory, and what pruning older ones couldn't remove; or a failure. */
|
|
107
|
+
export type OpenRunDirectoryResult = {
|
|
108
|
+
readonly ok: true;
|
|
109
|
+
readonly directory: RunDirectory;
|
|
110
|
+
readonly pruneFailures: readonly RunDirectoryFailure[];
|
|
111
|
+
} | {
|
|
112
|
+
readonly ok: false;
|
|
113
|
+
readonly failure: RunDirectoryFailure;
|
|
114
|
+
};
|
|
115
|
+
/** A run directory as a listing finds it: its run id, path, whether it is active, and its `run.json`, if readable. */
|
|
116
|
+
export interface ListedRunDirectory {
|
|
117
|
+
readonly id: string;
|
|
118
|
+
readonly path: string;
|
|
119
|
+
readonly active: boolean;
|
|
120
|
+
/** `run.json` as it reads; undefined when the run directory has none or it can't be read. */
|
|
121
|
+
readonly run: string | undefined;
|
|
122
|
+
}
|
|
123
|
+
/** How listing the run directories went: each one, newest first; or a failure. */
|
|
124
|
+
export type ListRunDirectoriesResult = {
|
|
125
|
+
readonly ok: true;
|
|
126
|
+
readonly runs: readonly ListedRunDirectory[];
|
|
127
|
+
} | {
|
|
128
|
+
readonly ok: false;
|
|
129
|
+
readonly failure: RunDirectoryFailure;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* A run directory as reading it finds it: its listing, its test events and timeline as they read, and the run logs it
|
|
133
|
+
* holds.
|
|
134
|
+
*/
|
|
135
|
+
export interface PastRunDirectory extends ListedRunDirectory {
|
|
136
|
+
/**
|
|
137
|
+
* The lines of `tests.jsonl`, the run's redacted test events; undefined until the run has written it, once it was
|
|
138
|
+
* over. The test events a local command stages while it runs are never read back.
|
|
139
|
+
*/
|
|
140
|
+
readonly tests: readonly string[] | undefined;
|
|
141
|
+
/** `timeline.json` as it reads; undefined when there is none. */
|
|
142
|
+
readonly timeline: string | undefined;
|
|
143
|
+
/** The run logs it holds, in `RUN_LOGS`' order. */
|
|
144
|
+
readonly logs: readonly RunLog[];
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* How reading a run log went: `found`, its `text` as it is now, less a UTF-8 character still being written at its end;
|
|
148
|
+
* `not-found` when the run directory or the log doesn't exist; or a failure.
|
|
149
|
+
*/
|
|
150
|
+
export type ReadRunLogResult = {
|
|
151
|
+
readonly kind: "found";
|
|
152
|
+
readonly path: string;
|
|
153
|
+
readonly text: string;
|
|
154
|
+
} | {
|
|
155
|
+
readonly kind: "not-found";
|
|
156
|
+
} | {
|
|
157
|
+
readonly kind: "failed";
|
|
158
|
+
readonly failure: RunDirectoryFailure;
|
|
159
|
+
};
|
|
160
|
+
/** How reading one run directory went: found, not found, or a failure. */
|
|
161
|
+
export type ReadRunDirectoryResult = {
|
|
162
|
+
readonly kind: "found";
|
|
163
|
+
readonly directory: PastRunDirectory;
|
|
164
|
+
} | {
|
|
165
|
+
readonly kind: "not-found";
|
|
166
|
+
} | {
|
|
167
|
+
readonly kind: "failed";
|
|
168
|
+
readonly failure: RunDirectoryFailure;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* The run directories: `${XDG_STATE_HOME:-~/.local/state}/storm/runs/<run id>/`, one for each recent run. A
|
|
172
|
+
* run id is the run's start in UTC, `YYYYMMDDTHHMMSS`, a dash and a short random suffix, so runs started in the
|
|
173
|
+
* same second from different worktrees don't collide.
|
|
174
|
+
*
|
|
175
|
+
* A run directory is active from when it is opened until it is closed, and completed after. One whose run ended
|
|
176
|
+
* without closing it, its holder gone, is completed too: on the same host, once its process no longer runs; held on
|
|
177
|
+
* another host, or with a marker that can't be read, 24 hours after.
|
|
178
|
+
*/
|
|
179
|
+
export interface RunDirectoryGateway {
|
|
180
|
+
/**
|
|
181
|
+
* Makes a run directory for a run started at `startedAt`, active, holding `run` as its `run.json`, then removes
|
|
182
|
+
* every completed run directory but the newest `keep`, and removes the private test event files a run that ended without
|
|
183
|
+
* closing its run directory left in each completed one it keeps. Active run directories, this one among them, all
|
|
184
|
+
* stay as they are.
|
|
185
|
+
*/
|
|
186
|
+
open(request: {
|
|
187
|
+
readonly startedAt: Date;
|
|
188
|
+
readonly keep: number;
|
|
189
|
+
readonly run: string;
|
|
190
|
+
}): Promise<OpenRunDirectoryResult>;
|
|
191
|
+
/**
|
|
192
|
+
* Every run directory, newest first, with whether it is active at `now` and its `run.json`. A run directory whose
|
|
193
|
+
* `run.json` can't be read is listed without it. No run directories yet is an empty list.
|
|
194
|
+
*/
|
|
195
|
+
list(request: {
|
|
196
|
+
readonly now: Date;
|
|
197
|
+
}): Promise<ListRunDirectoriesResult>;
|
|
198
|
+
/**
|
|
199
|
+
* Run directory `id`, with whether it is active at `now`, its `run.json`, test events and timeline, and the run logs
|
|
200
|
+
* it holds.
|
|
201
|
+
*/
|
|
202
|
+
read(request: {
|
|
203
|
+
readonly id: string;
|
|
204
|
+
readonly now: Date;
|
|
205
|
+
}): Promise<ReadRunDirectoryResult>;
|
|
206
|
+
/** Run log `log` of run directory `id`, as it is now. */
|
|
207
|
+
readLog(request: {
|
|
208
|
+
readonly id: string;
|
|
209
|
+
readonly log: RunLog;
|
|
210
|
+
}): Promise<ReadRunLogResult>;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* The terminal a run's live view shows on, a DI seam: a live region pinned at the bottom of stderr, redrawn in
|
|
214
|
+
* place, with text printed above it. Writes never throw; once one fails, as one does with EIO after SIGHUP closes
|
|
215
|
+
* the terminal, it writes nothing more.
|
|
216
|
+
*/
|
|
217
|
+
export interface ProgressTerminal {
|
|
218
|
+
/** The terminal's width now, in columns. */
|
|
219
|
+
columns(): number;
|
|
220
|
+
/**
|
|
221
|
+
* Shows `frame`'s lines in the live region: drawn now, then redrawn on a steady tick, about every 90 ms, until
|
|
222
|
+
* `settle`. Each line is cut to the terminal's width, and the frame to the rows above the terminal's last row, at
|
|
223
|
+
* least one, when the terminal reports its height. A redraw erases every row the region took, whatever the
|
|
224
|
+
* terminal's width since; on a terminal that reflows rows when narrowed, a row then takes more than one. Showing
|
|
225
|
+
* again after `settle` starts a new live region below the settled one. An empty frame draws nothing, and settling
|
|
226
|
+
* on one leaves nothing.
|
|
227
|
+
*/
|
|
228
|
+
show(frame: () => readonly string[]): void;
|
|
229
|
+
/** Writes `text` to stdout or stderr above the live region, which is redrawn below it. */
|
|
230
|
+
print(stream: "stdout" | "stderr", text: string): void;
|
|
231
|
+
/** Draws the frame one last time and leaves it in place, ending the live region and restoring the cursor. */
|
|
232
|
+
settle(): void;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* How appending to the job summary went: `appended`; `none`, outside a GitHub Actions step that has a job summary
|
|
236
|
+
* file (`GITHUB_STEP_SUMMARY`); or `failed`.
|
|
237
|
+
*/
|
|
238
|
+
export type JobSummaryResult = {
|
|
239
|
+
readonly kind: "appended";
|
|
240
|
+
} | {
|
|
241
|
+
readonly kind: "none";
|
|
242
|
+
} | {
|
|
243
|
+
readonly kind: "failed";
|
|
244
|
+
readonly failure: RunDirectoryFailure;
|
|
245
|
+
};
|
|
246
|
+
/** The GitHub Actions job summary a run appends its Markdown summary to. */
|
|
247
|
+
export interface JobSummaryGateway {
|
|
248
|
+
appendJobSummary(markdown: string): Promise<JobSummaryResult>;
|
|
249
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { type AnyResourceError, type CommandProvider, defineRefusals, type RefusalDefinition, type RefusalDefinitions, type RefusalFact, type RefusalFactOf, type RefusalSchemaOf, type ResourceCleanupReport, type ResourceErrors, type ResourceRanReport, type ResourceSettleInput, type ResourceSettlement, type UnpreparedErrorOf, } from "./command-provider.ts";
|
|
2
|
+
export { bindCommands, type ResourceCommands, type ResourceReports, resourceReports, type ResourcesSettlement, } from "./command-slots.ts";
|
|
3
|
+
export type { FittingConfig, Provider, ProviderList, ResourceCommandTree, ResourceHost } from "./provider.ts";
|
|
4
|
+
export type { LaneDraw, LanePresentation, Paint, ReleaseTense, ResourceNotice, ResourcePresentation, } from "./presentation.ts";
|
|
5
|
+
export { type PresentedLane, type ResourcePresentations, resourcePresentations } from "./presentations.ts";
|
|
6
|
+
export { type CredentialEvent, type CredentialProgress, type LaneOutcome, observeAll, type RunEvent, type RunObserver, type RunProgress, silentProgress, type TimedRunEvent, timedProgress, } from "./events.ts";
|
|
7
|
+
export type { CommandGateway, CommandOutcome, CommandOutputChunk, CommandRequest, JobSummaryGateway, JobSummaryResult, ListedRunDirectory, ListRunDirectoriesResult, OpenRunDirectoryResult, PastRunDirectory, ProgressTerminal, ReadRunDirectoryResult, ReadRunLogResult, RunDirectory, RunDirectoryFailure, RunDirectoryGateway, RunDirectoryStep, RunLog, StagedTestEventsRead, } from "./gateways.ts";
|
|
8
|
+
export { runLimited } from "./limit.ts";
|
|
9
|
+
export { liveCommandGateway } from "./live/command-gateway.ts";
|
|
10
|
+
export { liveJobSummaryGateway } from "./live/job-summary-gateway.ts";
|
|
11
|
+
export { liveProgressTerminal } from "./live/progress-terminal.ts";
|
|
12
|
+
export { liveRunDirectoryGateway, unavailableRunDirectoryGateway } from "./live/run-directory-gateway.ts";
|
|
13
|
+
export type { LaneRow, LaneStates, ResourceLane, ResourceLanes } from "./lane.ts";
|
|
14
|
+
export type { AnyResources, CoreContext, CoreLane, KindAt, KindsOf, LaneNameOf, ResourceAcquireInput, ResourceAcquireOutcome, ResourceCanceledFacts, ResourceCleanup, ResourceCleanupFacts, ResourceEvent, ResourceFacts, ResourceFailures, ResourceHoldings, ResourceKind, ResourceOptions, ResourcePayloads, ResourceProgress, ResourceRanFacts, ResourceReason, ResourceRefusal, ResourceRequests, ResourceUnprepared, RunLane, RunProvider, RunProviders, } from "./resource.ts";
|
|
15
|
+
export { ACTIVE_MARKER, COMMAND_LOG, EVENTS_FILE, RUN_DIRECTORIES_KEPT, RUN_LOGS, runLogFile, RUN_FILE, RUN_ID_PATTERN, runDirectoryObserver, runIdPrefix, RUNS_SUBPATH, stepLog, stepLogPath, TEST_EVENTS_STAGING_FILE, testEventsPath, TESTS_FILE, TESTS_PARTIAL_FILE, TIMELINE_FILE, } from "./run-directory.ts";
|
|
16
|
+
export { executeRun, type LocalRunRequest, type RanRun, type RanRunner, type RemoteRunRequest, type RunCleanup, type RunContext, type RunnerCleanupReport, type RunControl, type RunOutcome, type RunRequest, type RunRunnerFailure, type RunRunnerRequest, type RunStopped, } from "./run.ts";
|
|
17
|
+
export { resolveStateDirectory, stateDirectoryPattern } from "./state-directory.ts";
|
|
18
|
+
export { commandExitStatus, megabytesText, type RanCommand, secondsOf, secondsText } from "./timing.ts";
|
|
19
|
+
export { cleanupProblems, commandPassed, type CleanupState, type CommandState, applyRunEvent, EMPTY_RUN_STATE, RUNNER_STEPS, type RunnerSnapshotState, type RunnerState, type RunnerStepName, type RunnerStepState, type RunState, type Span, type SpanStatus, type TestsState, type TestWorkerState, } from "./run-state.ts";
|
|
20
|
+
export { timeline, type Timeline, type TimelineOutcome, type TimelineRow, type TimelineRowName, type TimelineSpan, type TimelineStep, type TimelineStepName, } from "./timeline.ts";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// The `core` module's caller-facing interface: the resource contract each resource folder implements, run and command
|
|
2
|
+
// halves, and what the composition layer runs a command with, with the types of its outcome and progress. It names no
|
|
3
|
+
// resource; the composition layer's registry (`src/resources.ts`) fixes the kinds map `K`.
|
|
4
|
+
export { defineRefusals, } from "./command-provider.js";
|
|
5
|
+
export { bindCommands, resourceReports, } from "./command-slots.js";
|
|
6
|
+
export { resourcePresentations } from "./presentations.js";
|
|
7
|
+
export { observeAll, silentProgress, timedProgress, } from "./events.js";
|
|
8
|
+
export { runLimited } from "./limit.js";
|
|
9
|
+
export { liveCommandGateway } from "./live/command-gateway.js";
|
|
10
|
+
export { liveJobSummaryGateway } from "./live/job-summary-gateway.js";
|
|
11
|
+
export { liveProgressTerminal } from "./live/progress-terminal.js";
|
|
12
|
+
export { liveRunDirectoryGateway, unavailableRunDirectoryGateway } from "./live/run-directory-gateway.js";
|
|
13
|
+
export { ACTIVE_MARKER, COMMAND_LOG, EVENTS_FILE, RUN_DIRECTORIES_KEPT, RUN_LOGS, runLogFile, RUN_FILE, RUN_ID_PATTERN, runDirectoryObserver, runIdPrefix, RUNS_SUBPATH, stepLog, stepLogPath, TEST_EVENTS_STAGING_FILE, testEventsPath, TESTS_FILE, TESTS_PARTIAL_FILE, TIMELINE_FILE, } from "./run-directory.js";
|
|
14
|
+
export { executeRun, } from "./run.js";
|
|
15
|
+
export { resolveStateDirectory, stateDirectoryPattern } from "./state-directory.js";
|
|
16
|
+
export { commandExitStatus, megabytesText, secondsOf, secondsText } from "./timing.js";
|
|
17
|
+
export { cleanupProblems, commandPassed, applyRunEvent, EMPTY_RUN_STATE, RUNNER_STEPS, } from "./run-state.js";
|
|
18
|
+
export { timeline, } from "./timeline.js";
|