@cnc-tools/storm 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/application.d.ts +22 -13
- package/dist/application.js +21 -10
- package/dist/bin/run.d.ts +18 -0
- package/dist/bin/run.js +31 -0
- package/dist/bin/storm.js +42 -26
- package/dist/build-info.js +1 -1
- package/dist/chunks/{chunk-5CCP36QQ.js → chunk-2RNDPDTJ.js} +2 -2
- package/dist/chunks/chunk-2VP4GRJM.js +1219 -0
- package/dist/chunks/{chunk-P357TZAY.js → chunk-4O5C2XGJ.js} +18 -15
- package/dist/chunks/{chunk-VL7WFTVQ.js → chunk-4WAMTUWZ.js} +419 -340
- package/dist/chunks/{chunk-OIY3DMF2.js → chunk-6UHIJXZG.js} +3 -3
- package/dist/chunks/{chunk-CN4EFA5J.js → chunk-72ZFEMAW.js} +1 -1
- package/dist/chunks/{chunk-CK2GZEPK.js → chunk-7DZE67QM.js} +2 -2
- package/dist/chunks/{chunk-VUPZH7J2.js → chunk-BCBKYOHW.js} +1 -1
- package/dist/chunks/{chunk-2MAD5NKK.js → chunk-CKGZA25H.js} +1 -18
- package/dist/chunks/{chunk-ZG3WQ4UF.js → chunk-D27KILIA.js} +1 -1
- package/dist/chunks/{chunk-V4IKA3WI.js → chunk-DADEYJDW.js} +24 -17
- package/dist/chunks/{chunk-R7XVBZOY.js → chunk-EEENLQHE.js} +59 -11
- package/dist/chunks/chunk-F4MOYHRY.js +198 -0
- package/dist/chunks/{chunk-HVNK3I45.js → chunk-FNBB6V4R.js} +1 -1
- package/dist/chunks/{chunk-G3PHMXH5.js → chunk-GRT3UIBV.js} +18 -1
- package/dist/chunks/chunk-HP3CURSZ.js +88 -0
- package/dist/chunks/{chunk-DWEAHX4T.js → chunk-HWIQ2S7K.js} +5 -5
- package/dist/chunks/chunk-JN3YY6ZH.js +2166 -0
- package/dist/chunks/{chunk-TJNFVNKR.js → chunk-LKTZ5OXS.js} +1 -1
- package/dist/chunks/{chunk-3L52KNQA.js → chunk-M7EKRGVD.js} +8 -8
- package/dist/chunks/chunk-MR77L2GK.js +340 -0
- package/dist/chunks/{chunk-DC2CDHNK.js → chunk-RNAS7JHE.js} +1438 -445
- package/dist/chunks/{chunk-FCQUJDA4.js → chunk-RWIXDDCK.js} +4 -189
- package/dist/chunks/{chunk-5VXBKPW6.js → chunk-WV3DP6NR.js} +1 -1
- package/dist/chunks/{chunk-AWBSONHB.js → chunk-XBDRVFEV.js} +55 -16
- package/dist/chunks/{chunk-FOZWA52V.js → chunk-YEPFSLQR.js} +480 -375
- package/dist/chunks/{live-app-WECQOQ4C.js → live-app-R76JQXZL.js} +15 -13
- package/dist/commands/exec/across-sandboxes-outcomes.d.ts +1 -1
- package/dist/commands/exec/across-sandboxes-outcomes.js +2 -2
- package/dist/commands/exec/before-run.d.ts +123 -0
- package/dist/commands/exec/before-run.js +105 -0
- package/dist/commands/exec/command.d.ts +31 -2
- package/dist/commands/exec/command.js +31 -95
- package/dist/commands/exec/driver-plan.d.ts +9 -4
- package/dist/commands/exec/driver-plan.js +8 -8
- package/dist/commands/exec/exec-words.js +1 -1
- package/dist/commands/exec/execute-run.d.ts +39 -0
- package/dist/commands/exec/execute-run.js +325 -0
- package/dist/commands/exec/live-view.d.ts +3 -3
- package/dist/commands/exec/live-view.js +16 -15
- package/dist/commands/exec/metadata.js +1 -1
- package/dist/commands/exec/mint-failed.d.ts +38 -0
- package/dist/commands/exec/mint-failed.js +27 -4
- package/dist/commands/exec/outcomes.d.ts +34 -8
- package/dist/commands/exec/outcomes.js +30 -23
- package/dist/commands/exec/plan-run.d.ts +58 -150
- package/dist/commands/exec/plan-run.js +232 -88
- package/dist/commands/exec/progress.d.ts +10 -6
- package/dist/commands/exec/progress.js +38 -25
- package/dist/commands/exec/run-bin.d.ts +11 -11
- package/dist/commands/exec/run-bin.js +9 -9
- package/dist/commands/exec/run-flags.d.ts +69 -0
- package/dist/commands/exec/run-flags.js +58 -0
- package/dist/commands/exec/run-metadata.js +4 -4
- package/dist/commands/exec/run-summary.d.ts +58 -0
- package/dist/commands/exec/run-summary.js +205 -0
- package/dist/commands/exec/runner-refusals.d.ts +82 -0
- package/dist/commands/exec/runner-refusals.js +71 -0
- package/dist/commands/exec/sandbox-progress.js +3 -0
- package/dist/commands/exec/stopped-outcome.d.ts +12 -0
- package/dist/commands/exec/stopped-outcome.js +77 -0
- package/dist/commands/exec/view.d.ts +20 -11
- package/dist/commands/exec/view.js +103 -47
- package/dist/commands/runs/facts.d.ts +7 -3
- package/dist/commands/runs/facts.js +17 -8
- package/dist/commands/runs/list/command.d.ts +14 -6
- package/dist/commands/runs/list/command.js +10 -10
- package/dist/commands/runs/list/outcomes.d.ts +7 -3
- package/dist/commands/runs/logs/command.js +10 -10
- package/dist/commands/runs/show/command.d.ts +14 -6
- package/dist/commands/runs/show/command.js +30 -28
- package/dist/commands/runs/show/outcomes.d.ts +7 -3
- package/dist/commands/runs/show/outcomes.js +7 -5
- package/dist/commands/snapshots/access.d.ts +111 -0
- package/dist/commands/snapshots/access.js +96 -0
- package/dist/commands/snapshots/build/command.d.ts +360 -93
- package/dist/commands/snapshots/build/command.js +446 -150
- package/dist/commands/snapshots/build/metadata.d.ts +10 -0
- package/dist/commands/snapshots/build/metadata.js +31 -11
- package/dist/commands/snapshots/build/outcomes.d.ts +234 -43
- package/dist/commands/snapshots/build/outcomes.js +200 -36
- package/dist/commands/snapshots/list/command.d.ts +366 -25
- package/dist/commands/snapshots/list/command.js +296 -66
- package/dist/commands/snapshots/list/metadata.d.ts +16 -0
- package/dist/commands/snapshots/list/metadata.js +29 -6
- package/dist/commands/snapshots/list/outcomes.d.ts +245 -13
- package/dist/commands/snapshots/list/outcomes.js +221 -50
- package/dist/commands/snapshots/metadata.js +1 -1
- package/dist/commands/snapshots/prune/command.d.ts +430 -0
- package/dist/commands/snapshots/prune/command.js +161 -0
- package/dist/commands/snapshots/prune/metadata.d.ts +28 -0
- package/dist/commands/snapshots/prune/metadata.js +39 -0
- package/dist/commands/snapshots/prune/outcomes.d.ts +208 -0
- package/dist/commands/snapshots/prune/outcomes.js +78 -0
- package/dist/commands/suites/list/command.js +17 -17
- package/dist/commands/suites/list/outcomes.js +2 -2
- package/dist/commands/test/command.d.ts +31 -2
- package/dist/commands/test/command.js +49 -252
- package/dist/commands/test/outcomes.d.ts +15 -1
- package/dist/config/check-runner.d.ts +3 -3
- package/dist/config/check-runner.js +8 -7
- package/dist/config/credential-resolver.d.ts +50 -5
- package/dist/config/credential-resolver.js +51 -19
- package/dist/config/credential-settle.d.ts +6 -2
- package/dist/config/credential-settle.js +11 -5
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +1 -1
- package/dist/config/runner.d.ts +5 -5
- package/dist/config/runner.js +1 -1
- package/dist/config/schema.d.ts +2 -2
- package/dist/config/schema.js +1 -1
- package/dist/config-file/define.d.ts +1 -1
- package/dist/config-file/define.js +1 -1
- package/dist/config-file/runner.d.ts +5 -5
- package/dist/config-file/toolchain.d.ts +1 -1
- package/dist/config-file/toolchain.js +2 -2
- package/dist/context.d.ts +8 -6
- package/dist/context.js +7 -6
- package/dist/core/across-sandboxes.d.ts +7 -6
- package/dist/core/across-sandboxes.js +123 -152
- package/dist/core/coordinator.d.ts +166 -0
- package/dist/core/coordinator.js +233 -0
- package/dist/core/events.d.ts +2 -2
- package/dist/core/index.d.ts +4 -2
- package/dist/core/index.js +1 -1
- package/dist/core/outcomes.d.ts +148 -0
- package/dist/core/{sandbox-end.js → outcomes.js} +28 -4
- package/dist/core/resources.d.ts +31 -53
- package/dist/core/resources.js +32 -70
- package/dist/core/run-state.d.ts +7 -1
- package/dist/core/run-state.js +2 -0
- package/dist/core/run.d.ts +32 -236
- package/dist/core/run.js +106 -266
- package/dist/core/state-directory.d.ts +1 -1
- package/dist/core/state-directory.js +2 -2
- package/dist/credential/gateways.d.ts +15 -1
- package/dist/credential/index.d.ts +4 -3
- package/dist/credential/index.js +3 -2
- package/dist/credential/live/vercel-cli-gateway.d.ts +1 -1
- package/dist/credential/live/vercel-cli-gateway.js +1 -1
- package/dist/credential/live/vercel-oidc-token-gateway.d.ts +11 -0
- package/dist/credential/live/vercel-oidc-token-gateway.js +16 -0
- package/dist/credential/source.d.ts +73 -6
- package/dist/credential/source.js +55 -2
- package/dist/extension-commands.d.ts +6 -1
- package/dist/extension-commands.js +15 -1
- package/dist/extensions/testserver/commands/pool/create/command.d.ts +35 -2
- package/dist/extensions/testserver/commands/pool/create/command.js +7 -7
- package/dist/extensions/testserver/commands/pool/create/metadata.js +5 -5
- package/dist/extensions/testserver/commands/pool/create/outcomes.d.ts +17 -1
- package/dist/extensions/testserver/commands/pool/list/command.js +4 -4
- package/dist/extensions/testserver/credential-facts.d.ts +6 -2
- package/dist/extensions/testserver/credential-facts.js +29 -11
- package/dist/extensions/testserver/lifecycle.js +7 -1
- package/dist/extensions/testserver/limit.d.ts +3 -0
- package/dist/extensions/testserver/limit.js +3 -0
- package/dist/extensions/testserver/provision.d.ts +8 -1
- package/dist/extensions/testserver/provision.js +8 -3
- package/dist/extensions/testserver/refusals.d.ts +6 -1
- package/dist/extensions/testserver/refusals.js +16 -1
- package/dist/extensions/testserver/resource.d.ts +1 -1
- package/dist/extensions/testserver/resource.js +1 -1
- package/dist/extensions/testserver/result.d.ts +1 -1
- package/dist/extensions/testserver/result.js +9 -4
- package/dist/planning/driver-file-lists.d.ts +0 -15
- package/dist/planning/driver-file-lists.js +2 -21
- package/dist/planning/plan-only.d.ts +3 -14
- package/dist/planning/plan-only.js +11 -20
- package/dist/planning/run-kind-flags.js +2 -2
- package/dist/planning/run-plan.d.ts +45 -12
- package/dist/planning/run-plan.js +4 -3
- package/dist/planning/suites.d.ts +1 -1
- package/dist/planning/suites.js +2 -2
- package/dist/planning/test-plan.d.ts +9 -0
- package/dist/planning/test-plan.js +9 -0
- package/dist/run-directory/recording.js +2 -2
- package/dist/run-directory/run-record.d.ts +21 -6
- package/dist/run-directory/run-record.js +12 -9
- package/dist/runner/base.js +1 -1
- package/dist/runner/build-snapshots.d.ts +55 -29
- package/dist/runner/build-snapshots.js +130 -29
- package/dist/runner/context.d.ts +15 -7
- package/dist/runner/context.js +19 -6
- package/dist/runner/events.d.ts +16 -10
- package/dist/runner/gateways.d.ts +87 -21
- package/dist/runner/gateways.js +1 -1
- package/dist/runner/index.d.ts +11 -7
- package/dist/runner/index.js +9 -4
- package/dist/runner/live/sandbox-errors.d.ts +2 -0
- package/dist/runner/live/sandbox-errors.js +4 -0
- package/dist/runner/live/sandbox-gateway.js +129 -3
- package/dist/runner/live/snapshot-index-gateway.d.ts +12 -0
- package/dist/runner/live/{snapshot-cache-gateway.js → snapshot-index-gateway.js} +11 -11
- package/dist/runner/live/snapshot-records.js +6 -7
- package/dist/runner/local-snapshot-index.d.ts +199 -0
- package/dist/runner/local-snapshot-index.js +211 -0
- package/dist/runner/network-policy.d.ts +6 -6
- package/dist/runner/network-policy.js +7 -7
- package/dist/runner/policy-writes.d.ts +1 -1
- package/dist/runner/policy-writes.js +1 -1
- package/dist/runner/prepare.d.ts +14 -14
- package/dist/runner/prepare.js +20 -11
- package/dist/runner/ready.d.ts +18 -10
- package/dist/runner/ready.js +104 -33
- package/dist/runner/sandboxed-command.d.ts +3 -3
- package/dist/runner/sandboxed-command.js +3 -3
- package/dist/runner/scope.d.ts +10 -6
- package/dist/runner/scope.js +10 -3
- package/dist/runner/secrets.d.ts +13 -13
- package/dist/runner/secrets.js +18 -15
- package/dist/runner/session.d.ts +8 -8
- package/dist/runner/session.js +3 -3
- package/dist/runner/shared-snapshot-entry.d.ts +92 -0
- package/dist/runner/shared-snapshot-entry.js +168 -0
- package/dist/runner/shared-snapshot-list.d.ts +81 -0
- package/dist/runner/shared-snapshot-list.js +155 -0
- package/dist/runner/shared-snapshot-lookup.d.ts +51 -0
- package/dist/runner/shared-snapshot-lookup.js +118 -0
- package/dist/runner/shared-snapshot-prune.d.ts +58 -0
- package/dist/runner/shared-snapshot-prune.js +133 -0
- package/dist/runner/snapshot-build.d.ts +42 -14
- package/dist/runner/snapshot-build.js +32 -29
- package/dist/runner/snapshot-choice.js +1 -1
- package/dist/runner/snapshot-inspect.d.ts +39 -40
- package/dist/runner/snapshot-inspect.js +55 -35
- package/dist/runner/snapshot-key.d.ts +13 -12
- package/dist/runner/snapshot-key.js +13 -12
- package/dist/runner/steps.d.ts +1 -1
- package/dist/runner/steps.js +1 -1
- package/dist/runner/{recipe-check.d.ts → vercel-sandbox-check.d.ts} +2 -2
- package/dist/runner/{recipe-check.js → vercel-sandbox-check.js} +3 -2
- package/dist/runner/{recipe.d.ts → vercel-sandbox-options.d.ts} +24 -23
- package/dist/runner/{recipe.js → vercel-sandbox-options.js} +70 -69
- package/dist/runner/{recipe-secrets.d.ts → vercel-sandbox-secrets.d.ts} +6 -6
- package/dist/runner/{recipe-secrets.js → vercel-sandbox-secrets.js} +20 -20
- package/dist/sdk/extension/commands.d.ts +8 -3
- package/dist/sdk/extension/commands.js +3 -1
- package/dist/sdk/extension/credential-diagnosis.d.ts +3 -1
- package/dist/sdk/extension/credential-diagnosis.js +25 -5
- package/dist/sdk/extension/credential-source.d.ts +20 -3
- package/dist/sdk/extension/credential-source.js +4 -4
- package/dist/sdk/extension/index.d.ts +3 -2
- package/dist/sdk/extension/index.js +2 -1
- package/dist/sdk/extension/resource-definition.d.ts +1 -1
- package/dist/sdk/extension/secret-source.d.ts +1 -1
- package/dist/sdk/extension/secret-source.js +1 -1
- package/dist/sdk/extension/vercel-oidc-facts.d.ts +20 -0
- package/dist/sdk/extension/vercel-oidc-facts.js +20 -0
- package/dist/shared/cleanup.d.ts +3 -3
- package/dist/shared/cleanup.js +15 -5
- package/dist/shared/snapshot-text.d.ts +4 -4
- package/dist/shared/snapshot-text.js +11 -11
- package/dist/time/duration.js +1 -1
- package/package.json +3 -2
- package/skills/overview.md +4 -4
- package/skills/plan-runs.md +1 -1
- package/skills/read-run-output.md +6 -6
- package/dist/chunks/chunk-7EENF73W.js +0 -782
- package/dist/chunks/chunk-Z5PBVG3Y.js +0 -2599
- package/dist/commands/exec/across-sandboxes-run.d.ts +0 -180
- package/dist/commands/exec/across-sandboxes-run.js +0 -339
- package/dist/commands/exec/plan-only.d.ts +0 -10
- package/dist/commands/exec/plan-only.js +0 -45
- package/dist/commands/exec/run-command.d.ts +0 -475
- package/dist/commands/exec/run-command.js +0 -603
- package/dist/commands/exec/run-planned.d.ts +0 -20
- package/dist/commands/exec/run-planned.js +0 -22
- package/dist/commands/exec/sandbox-view.d.ts +0 -19
- package/dist/commands/exec/sandbox-view.js +0 -72
- package/dist/commands/test/plan.d.ts +0 -92
- package/dist/commands/test/plan.js +0 -125
- package/dist/core/sandbox-end.d.ts +0 -64
- package/dist/runner/live/snapshot-cache-gateway.d.ts +0 -12
- package/dist/runner/snapshot-cache.d.ts +0 -148
- package/dist/runner/snapshot-cache.js +0 -126
package/dist/application.d.ts
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
|
-
import { type ApplicationVersion, type ClinkrApplication } from "@vercel/clinkr";
|
|
1
|
+
import { type ApplicationVersion, type ClinkrApplication, type Mount, type TreeGroup } from "@vercel/clinkr";
|
|
2
2
|
import type { StormApp } from "./context.ts";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Where storm's commands, mounts, and skills come from: either resolved from `root` via `directoryStormSources`
|
|
5
|
+
* (`src/` from source, `dist/` built) for filesystem discovery, or pre-built static manifests and in-memory skills
|
|
6
|
+
* for a single-file compiled binary.
|
|
7
|
+
*/
|
|
4
8
|
export interface StormApplicationOptions {
|
|
5
9
|
/** Whether accessible mode is on (`VERCEL_ACCESSIBLE=1`), which leaves the help logo out of root help. */
|
|
6
10
|
readonly accessible: boolean;
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
readonly
|
|
11
|
+
/** Storm's own command tree: a directory group or a static manifest group. */
|
|
12
|
+
readonly commands: TreeGroup<StormApp>;
|
|
13
|
+
/** Each extension's mounted command tree. */
|
|
14
|
+
readonly mounts: readonly Mount<StormApp>[];
|
|
15
|
+
/** Storm's skill files: an absolute directory path, or an in-memory record of `<name>.md` to Markdown text. */
|
|
16
|
+
readonly skills: string | Readonly<Record<string, string>>;
|
|
13
17
|
}
|
|
14
18
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
* Resolves storm's command tree, extension mounts, and skills directory from `root`, storm's code root (`src/` from
|
|
20
|
+
* source, `dist/` built). The Node bin and source tests pass this to `loadStormApplication`, since a bundled build
|
|
21
|
+
* moves this module's code to another file, where `import.meta.dirname` names another directory.
|
|
22
|
+
*/
|
|
23
|
+
export declare function directoryStormSources(root: string): Omit<StormApplicationOptions, "accessible">;
|
|
24
|
+
/**
|
|
25
|
+
* Builds the `storm` Clinkr application from the given `commands`, `mounts`, and `skills` (from
|
|
26
|
+
* `directoryStormSources` for Node/source runs, or pre-built static manifests for compiled binaries). `version` is
|
|
27
|
+
* what root `--version` prints, the version and commit as a run's version line shows them (`versionText`), or a
|
|
28
|
+
* function Clinkr calls only to print it.
|
|
20
29
|
*/
|
|
21
30
|
export declare function loadStormApplication(version: ApplicationVersion, options: StormApplicationOptions): Promise<ClinkrApplication<StormApp>>;
|
package/dist/application.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
|
-
import { createApplication } from "@vercel/clinkr";
|
|
2
|
+
import { createApplication, } from "@vercel/clinkr";
|
|
3
3
|
import { stormCommands } from "./command-tree.js";
|
|
4
4
|
import { stormHelpLogo } from "./help-logo.js";
|
|
5
5
|
import { extensionMounts } from "./extension-commands.js";
|
|
@@ -11,20 +11,31 @@ const DESCRIPTION = [
|
|
|
11
11
|
"Docs: https://storm.playground-vercel.tools/",
|
|
12
12
|
].join("\n");
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
* Resolves storm's command tree, extension mounts, and skills directory from `root`, storm's code root (`src/` from
|
|
15
|
+
* source, `dist/` built). The Node bin and source tests pass this to `loadStormApplication`, since a bundled build
|
|
16
|
+
* moves this module's code to another file, where `import.meta.dirname` names another directory.
|
|
17
|
+
*/
|
|
18
|
+
export function directoryStormSources(root) {
|
|
19
|
+
return {
|
|
20
|
+
commands: stormCommands.directory(join(root, "commands")),
|
|
21
|
+
mounts: extensionMounts(root),
|
|
22
|
+
skills: join(root, "../skills"),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Builds the `storm` Clinkr application from the given `commands`, `mounts`, and `skills` (from
|
|
27
|
+
* `directoryStormSources` for Node/source runs, or pre-built static manifests for compiled binaries). `version` is
|
|
28
|
+
* what root `--version` prints, the version and commit as a run's version line shows them (`versionText`), or a
|
|
29
|
+
* function Clinkr calls only to print it.
|
|
19
30
|
*/
|
|
20
31
|
export async function loadStormApplication(version, options) {
|
|
21
|
-
const { accessible,
|
|
32
|
+
const { accessible, commands, mounts, skills } = options;
|
|
22
33
|
return await createApplication("storm", {
|
|
23
|
-
commands
|
|
34
|
+
commands,
|
|
24
35
|
description: DESCRIPTION,
|
|
25
36
|
version,
|
|
26
37
|
helpLogo: (terminal) => stormHelpLogo(terminal, { accessible }),
|
|
27
|
-
mounts
|
|
28
|
-
skills
|
|
38
|
+
mounts,
|
|
39
|
+
skills,
|
|
29
40
|
});
|
|
30
41
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ApplicationVersion } from "@vercel/clinkr";
|
|
2
|
+
import { type StormApplicationOptions } from "../application.ts";
|
|
3
|
+
/** Inputs for running the `storm` CLI from either the Node bin or the compiled Bun executable. */
|
|
4
|
+
export interface RunStormCliOptions {
|
|
5
|
+
readonly version: ApplicationVersion;
|
|
6
|
+
readonly buildInfo: () => Promise<{
|
|
7
|
+
readonly version: string;
|
|
8
|
+
readonly commit: string | null;
|
|
9
|
+
}>;
|
|
10
|
+
readonly sources: Omit<StormApplicationOptions, "accessible">;
|
|
11
|
+
}
|
|
12
|
+
/** Whether the global `--no-color` flag appears before a bare `--` in `argv`, matching Clinkr's global flag parse. */
|
|
13
|
+
export declare function hasNoColorFlag(argv: readonly string[]): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Runs the `storm` CLI under Clinkr's `runNodeCli`, lazily loading `live-app.ts` only when a command runs, then exits
|
|
16
|
+
* with the status a command recorded past Clinkr's (the command's exit code), or else Clinkr's.
|
|
17
|
+
*/
|
|
18
|
+
export declare function runStormCli(options: RunStormCliOptions): Promise<void>;
|
package/dist/bin/run.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Shared CLI execution entry for both `src/bin/storm.ts` (Node) and `scripts/bun-runtime.ts` (compiled Bun
|
|
2
|
+
// executable). Keeps help, listings, and invocation errors light: `live-app.ts` is imported lazily inside Clinkr's
|
|
3
|
+
// `app` factory only when a command actually executes.
|
|
4
|
+
import { runNodeCli } from "@vercel/clinkr/node";
|
|
5
|
+
import { loadStormApplication } from "../application.js";
|
|
6
|
+
/** Whether the global `--no-color` flag appears before a bare `--` in `argv`, matching Clinkr's global flag parse. */
|
|
7
|
+
export function hasNoColorFlag(argv) {
|
|
8
|
+
for (const token of argv) {
|
|
9
|
+
if (token === "--")
|
|
10
|
+
return false;
|
|
11
|
+
if (token === "--no-color")
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Runs the `storm` CLI under Clinkr's `runNodeCli`, lazily loading `live-app.ts` only when a command runs, then exits
|
|
18
|
+
* with the status a command recorded past Clinkr's (the command's exit code), or else Clinkr's.
|
|
19
|
+
*/
|
|
20
|
+
export async function runStormCli(options) {
|
|
21
|
+
const exit = { status: undefined };
|
|
22
|
+
const accessible = process.env["VERCEL_ACCESSIBLE"] === "1";
|
|
23
|
+
const noColor = hasNoColorFlag(process.argv.slice(2));
|
|
24
|
+
const status = await runNodeCli(await loadStormApplication(options.version, { accessible, ...options.sources }), {
|
|
25
|
+
app: async (host) => {
|
|
26
|
+
const [{ liveStormApp }, buildInfo] = await Promise.all([import("../live-app.js"), options.buildInfo()]);
|
|
27
|
+
return liveStormApp(host, buildInfo, exit, { noColor });
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
process.exitCode = exit.status ?? status;
|
|
31
|
+
}
|
package/dist/bin/storm.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runNodeCli
|
|
3
|
-
} from "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-BCBKYOHW.js";
|
|
4
4
|
import {
|
|
5
5
|
testserverExtensionCommands
|
|
6
|
-
} from "../chunks/chunk-
|
|
7
|
-
import "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-D27KILIA.js";
|
|
7
|
+
import "../chunks/chunk-2RNDPDTJ.js";
|
|
8
8
|
import {
|
|
9
9
|
stormCommands
|
|
10
|
-
} from "../chunks/chunk-
|
|
10
|
+
} from "../chunks/chunk-WV3DP6NR.js";
|
|
11
11
|
import {
|
|
12
12
|
createApplication
|
|
13
|
-
} from "../chunks/chunk-
|
|
13
|
+
} from "../chunks/chunk-4WAMTUWZ.js";
|
|
14
14
|
|
|
15
15
|
// src/bin/storm.ts
|
|
16
16
|
import { readFileSync } from "node:fs";
|
|
@@ -79,16 +79,44 @@ var DESCRIPTION = [
|
|
|
79
79
|
"",
|
|
80
80
|
"Docs: https://storm.playground-vercel.tools/"
|
|
81
81
|
].join("\n");
|
|
82
|
+
function directoryStormSources(root2) {
|
|
83
|
+
return {
|
|
84
|
+
commands: stormCommands.directory(join(root2, "commands")),
|
|
85
|
+
mounts: extensionMounts(root2),
|
|
86
|
+
skills: join(root2, "../skills")
|
|
87
|
+
};
|
|
88
|
+
}
|
|
82
89
|
async function loadStormApplication(version2, options) {
|
|
83
|
-
const { accessible
|
|
90
|
+
const { accessible, commands, mounts, skills } = options;
|
|
84
91
|
return await createApplication("storm", {
|
|
85
|
-
commands
|
|
92
|
+
commands,
|
|
86
93
|
description: DESCRIPTION,
|
|
87
94
|
version: version2,
|
|
88
|
-
helpLogo: (terminal) => stormHelpLogo(terminal, { accessible
|
|
89
|
-
mounts
|
|
90
|
-
skills
|
|
95
|
+
helpLogo: (terminal) => stormHelpLogo(terminal, { accessible }),
|
|
96
|
+
mounts,
|
|
97
|
+
skills
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// src/bin/run.ts
|
|
102
|
+
function hasNoColorFlag(argv) {
|
|
103
|
+
for (const token of argv) {
|
|
104
|
+
if (token === "--") return false;
|
|
105
|
+
if (token === "--no-color") return true;
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
async function runStormCli(options) {
|
|
110
|
+
const exit = { status: void 0 };
|
|
111
|
+
const accessible = process.env["VERCEL_ACCESSIBLE"] === "1";
|
|
112
|
+
const noColor = hasNoColorFlag(process.argv.slice(2));
|
|
113
|
+
const status = await runNodeCli(await loadStormApplication(options.version, { accessible, ...options.sources }), {
|
|
114
|
+
app: async (host) => {
|
|
115
|
+
const [{ liveStormApp }, buildInfo] = await Promise.all([import("../chunks/live-app-R76JQXZL.js"), options.buildInfo()]);
|
|
116
|
+
return liveStormApp(host, buildInfo, exit, { noColor });
|
|
117
|
+
}
|
|
91
118
|
});
|
|
119
|
+
process.exitCode = exit.status ?? status;
|
|
92
120
|
}
|
|
93
121
|
|
|
94
122
|
// src/bin/storm.ts
|
|
@@ -103,20 +131,8 @@ async function version() {
|
|
|
103
131
|
const [{ versionText }, built] = await Promise.all([import("../chunks/version-X7RMSKZI.js"), commit()]);
|
|
104
132
|
return versionText(manifest.version, built);
|
|
105
133
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (token === "--no-color") return true;
|
|
111
|
-
}
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
var accessible = process.env["VERCEL_ACCESSIBLE"] === "1";
|
|
115
|
-
var noColor = hasNoColorFlag(process.argv.slice(2));
|
|
116
|
-
var status = await runNodeCli(await loadStormApplication(version, { accessible, root }), {
|
|
117
|
-
app: async (host) => {
|
|
118
|
-
const [{ liveStormApp }, built] = await Promise.all([import("../chunks/live-app-WECQOQ4C.js"), commit()]);
|
|
119
|
-
return liveStormApp(host, { version: manifest.version, commit: built }, exit, { noColor });
|
|
120
|
-
}
|
|
134
|
+
await runStormCli({
|
|
135
|
+
version,
|
|
136
|
+
buildInfo: async () => ({ version: manifest.version, commit: await commit() }),
|
|
137
|
+
sources: directoryStormSources(root)
|
|
121
138
|
});
|
|
122
|
-
process.exitCode = exit.status ?? status;
|
package/dist/build-info.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
commandTree,
|
|
3
3
|
mount
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4WAMTUWZ.js";
|
|
5
5
|
|
|
6
6
|
// src/sdk/extension/commands.ts
|
|
7
7
|
import { join } from "node:path";
|
|
@@ -10,7 +10,7 @@ function defineExtensionCommands(definition) {
|
|
|
10
10
|
return {
|
|
11
11
|
description,
|
|
12
12
|
directory,
|
|
13
|
-
mount: ({ path,
|
|
13
|
+
mount: (placement) => "manifest" in placement ? mount(tree.manifest(placement.manifest), { path: placement.path, description, app }) : mount(tree.directory(join(placement.root, directory)), { path: placement.path, description, app })
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
function defineExtension(extension) {
|