@vzn/vx 0.0.16 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +135 -124
- package/index.ts +10 -0
- package/launcher.mjs +10 -11
- package/package.json +11 -7
- package/src/bin.ts +14 -4
- package/src/cache/archive.ts +659 -0
- package/src/cache/cache.ts +769 -1101
- package/src/cache/chained-cache.ts +194 -0
- package/src/cache/config-evals.ts +89 -0
- package/src/cache/file-hashes.ts +262 -0
- package/src/cache/git-inputs.ts +637 -0
- package/src/cache/index.ts +24 -5
- package/src/cache/inputs.ts +373 -456
- package/src/cache/layer.ts +604 -0
- package/src/cache/layered-cache.ts +96 -43
- package/src/cache/output-index.ts +224 -0
- package/src/cache/policy.ts +84 -0
- package/src/cache/run-history.ts +147 -0
- package/src/cache/tar-stream.ts +358 -0
- package/src/cache/zstd.ts +160 -0
- package/src/cli/cache.ts +75 -21
- package/src/cli/completions.ts +104 -0
- package/src/cli/core-alias.ts +25 -0
- package/src/cli/help.ts +195 -128
- package/src/cli/index.ts +116 -46
- package/src/cli/info.ts +122 -63
- package/src/cli/init.ts +75 -0
- package/src/cli/last.ts +172 -0
- package/src/cli/lock.ts +2 -1
- package/src/cli/plan-format.ts +72 -6
- package/src/cli/plugin-commands.ts +103 -0
- package/src/cli/run.ts +245 -271
- package/src/cli/select.ts +332 -0
- package/src/cli/show.ts +144 -69
- package/src/cli/upgrade.ts +9 -7
- package/src/cli/watch.ts +858 -110
- package/src/cli/why.ts +223 -0
- package/src/cli/workspace-config.ts +126 -0
- package/src/config.ts +187 -150
- package/src/exec/env.ts +18 -1
- package/src/exec/executor.ts +224 -0
- package/src/exec/index.ts +24 -2
- package/src/exec/local-executor.ts +41 -0
- package/src/exec/runner.ts +166 -40
- package/src/exec/sandbox-binds.ts +182 -0
- package/src/exec/sandbox-paths.ts +50 -0
- package/src/exec/sandbox-runtime.ts +642 -260
- package/src/exec/sandbox-violations.ts +280 -0
- package/src/graph/index.ts +4 -10
- package/src/graph/scheduler.ts +232 -203
- package/src/graph/task-graph.ts +222 -8
- package/src/index.ts +146 -153
- package/src/orchestrator/admission.ts +137 -0
- package/src/orchestrator/deferred-outputs.ts +147 -0
- package/src/orchestrator/doctor.ts +255 -0
- package/src/orchestrator/download-policy.ts +171 -0
- package/src/orchestrator/events.ts +72 -8
- package/src/orchestrator/execute-task.ts +374 -549
- package/src/orchestrator/failure-mode.ts +202 -0
- package/src/orchestrator/framed-output.ts +126 -69
- package/src/orchestrator/history.ts +126 -59
- package/src/orchestrator/hit-restore.ts +221 -0
- package/src/orchestrator/index.ts +77 -93
- package/src/orchestrator/local-shortcircuit.ts +22 -0
- package/src/orchestrator/lockfile-claim.ts +281 -0
- package/src/orchestrator/logger.ts +208 -35
- package/src/orchestrator/metrics.ts +102 -1388
- package/src/orchestrator/miss-save.ts +169 -0
- package/src/orchestrator/options.ts +55 -34
- package/src/orchestrator/persistent.ts +79 -0
- package/src/orchestrator/placement.ts +182 -0
- package/src/orchestrator/plan.ts +144 -1
- package/src/orchestrator/plugin-host.ts +357 -120
- package/src/orchestrator/plugin.ts +298 -58
- package/src/orchestrator/prepare.ts +202 -106
- package/src/orchestrator/projects.ts +259 -0
- package/src/orchestrator/remote-prefetch.ts +12 -8
- package/src/orchestrator/run-artifacts.ts +63 -16
- package/src/orchestrator/run-context.ts +167 -29
- package/src/orchestrator/run-records.ts +149 -0
- package/src/orchestrator/run-report.ts +74 -47
- package/src/orchestrator/run.ts +534 -417
- package/src/orchestrator/sandbox-request.ts +243 -0
- package/src/orchestrator/save-lane.ts +47 -0
- package/src/orchestrator/signals.ts +111 -0
- package/src/orchestrator/stable-keys.ts +129 -31
- package/src/orchestrator/status-line.ts +49 -9
- package/src/orchestrator/summary.ts +90 -26
- package/src/orchestrator/tally.ts +78 -35
- package/src/orchestrator/task-hash.ts +111 -15
- package/src/orchestrator/task-log-buffer.ts +288 -0
- package/src/orchestrator/telemetry-host.ts +34 -6
- package/src/orchestrator/telemetry.ts +182 -36
- package/src/orchestrator/upstream.ts +72 -31
- package/src/util/cgroup.ts +160 -0
- package/src/util/edit-distance.ts +70 -0
- package/src/util/errors.ts +15 -1
- package/src/util/index.ts +15 -2
- package/src/util/num.ts +37 -0
- package/src/util/paths.ts +64 -0
- package/src/util/settle.ts +67 -0
- package/src/util/size.ts +5 -1
- package/src/util/tail.ts +66 -0
- package/src/util/timing.ts +63 -0
- package/src/util/verbs.ts +39 -0
- package/src/workspace/affected.ts +250 -23
- package/src/workspace/config-cache.ts +313 -0
- package/src/workspace/config-eval.ts +217 -0
- package/src/workspace/config-imports.ts +162 -0
- package/src/workspace/config-schema.ts +837 -0
- package/src/workspace/filter.ts +65 -10
- package/src/workspace/fingerprint.ts +53 -4
- package/src/workspace/index.ts +42 -3
- package/src/workspace/lockfile.ts +25 -9
- package/src/workspace/migrate-scripts.ts +134 -0
- package/src/workspace/migration.ts +314 -0
- package/src/workspace/nested-dirs.ts +21 -7
- package/src/workspace/package-graph.ts +114 -41
- package/src/workspace/project-loader.ts +224 -450
- package/src/workspace/workspace.ts +298 -72
- package/src/cache/cas-backend.ts +0 -97
- package/src/cache/digest.ts +0 -47
- package/src/cache/tar.ts +0 -343
- package/src/cli/backend.ts +0 -23
- package/src/cli/mcp-rpc.ts +0 -292
- package/src/cli/mcp.ts +0 -92
- package/src/cli/migrate-nx.ts +0 -450
- package/src/cli/migrate-turbo.ts +0 -364
- package/src/cli/migrate.ts +0 -219
- package/src/orchestrator/devframe-surface.ts +0 -74
- package/src/orchestrator/predict.ts +0 -106
- package/src/orchestrator/protocol.ts +0 -156
- package/src/orchestrator/resources.ts +0 -59
- package/src/orchestrator/run-state.ts +0 -145
- package/src/orchestrator/verify.ts +0 -164
- package/src/orchestrator/wire-render.ts +0 -92
- package/src/orchestrator/wire.ts +0 -212
package/src/cli/upgrade.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// `vx upgrade [tag]` — self-update the compiled binary in place.
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// Downloads the GitHub release asset for this os/arch, writes next to
|
|
3
|
+
// the current executable, atomic rename over it.
|
|
4
4
|
// Named `upgrade` (not `update`) per CLI convention: bun upgrade,
|
|
5
5
|
// deno upgrade — "update" is what package managers do to indexes.
|
|
6
6
|
|
|
7
7
|
import { chmod, rename, rm } from 'node:fs/promises'
|
|
8
|
+
import { seeHelp } from './help.js'
|
|
8
9
|
import { UserError } from '../util/index.js'
|
|
9
10
|
import { VERSION } from '../version.js'
|
|
10
11
|
|
|
@@ -24,7 +25,7 @@ export function isBunfsPath(p: string): boolean {
|
|
|
24
25
|
* `Bun.main` (and argv[1]) rather than `import.meta.path`: with
|
|
25
26
|
* `--minify --bytecode` — vx's release build flags — `import.meta.path`
|
|
26
27
|
* reports the ORIGINAL SOURCE path, not the bunfs path, so the old
|
|
27
|
-
* check silently failed for every
|
|
28
|
+
* check silently failed for every installed binary and `vx
|
|
28
29
|
* upgrade` refused with "running from source". `Bun.main` stays the
|
|
29
30
|
* bunfs path under every compile-flag combination.
|
|
30
31
|
*/
|
|
@@ -68,7 +69,7 @@ export async function replaceBinary(dest: string, url: string): Promise<void> {
|
|
|
68
69
|
const msg = err instanceof Error ? err.message : String(err)
|
|
69
70
|
throw new UserError(
|
|
70
71
|
`vx upgrade: could not replace ${dest} (${msg}) — ` +
|
|
71
|
-
`check permissions, or reinstall
|
|
72
|
+
`check permissions, or reinstall with npm install -g @vzn/vx`,
|
|
72
73
|
)
|
|
73
74
|
}
|
|
74
75
|
}
|
|
@@ -77,13 +78,14 @@ export async function upgradeCmd(args: readonly string[]): Promise<number> {
|
|
|
77
78
|
const tag = args.find((a) => !a.startsWith('-'))
|
|
78
79
|
const unknown = args.find((a) => a.startsWith('-'))
|
|
79
80
|
if (unknown !== undefined) {
|
|
80
|
-
process.stderr.write(`vx upgrade: unknown flag: ${unknown}\n`)
|
|
81
|
+
process.stderr.write(`vx upgrade: unknown flag: ${unknown}${seeHelp('upgrade')}\n`)
|
|
81
82
|
return 1
|
|
82
83
|
}
|
|
83
84
|
if (!isCompiledBinary()) {
|
|
84
85
|
throw new UserError(
|
|
85
|
-
'vx upgrade only works for the compiled binary
|
|
86
|
-
'You are running from source — use git pull instead.'
|
|
86
|
+
'vx upgrade only works for the compiled binary. ' +
|
|
87
|
+
'You are running from source — use git pull instead. ' +
|
|
88
|
+
'(npm installs update with: npm install -g @vzn/vx@latest)',
|
|
87
89
|
)
|
|
88
90
|
}
|
|
89
91
|
const asset = assetName()
|