@vzn/vx 0.0.253 → 0.0.255
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.255",
|
|
4
4
|
"description": "A fast, correct task runner and build cache for JavaScript monorepos.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"node": ">=18"
|
|
18
18
|
},
|
|
19
19
|
"optionalDependencies": {
|
|
20
|
-
"@vzn/vx-linux-x64": "0.0.
|
|
21
|
-
"@vzn/vx-linux-arm64": "0.0.
|
|
22
|
-
"@vzn/vx-darwin-x64": "0.0.
|
|
23
|
-
"@vzn/vx-darwin-arm64": "0.0.
|
|
20
|
+
"@vzn/vx-linux-x64": "0.0.255",
|
|
21
|
+
"@vzn/vx-linux-arm64": "0.0.255",
|
|
22
|
+
"@vzn/vx-darwin-x64": "0.0.255",
|
|
23
|
+
"@vzn/vx-darwin-arm64": "0.0.255"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
package/src/cache/inputs.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { rm, rmdir } from 'node:fs/promises'
|
|
|
22
22
|
import type { CacheInputs } from '../config.js'
|
|
23
23
|
import {
|
|
24
24
|
asTrees,
|
|
25
|
+
executablePath,
|
|
25
26
|
isExecutableMissing,
|
|
26
27
|
isLiteralPattern,
|
|
27
28
|
normalizeGlob,
|
|
@@ -389,7 +390,11 @@ async function runRuntimeCommand(
|
|
|
389
390
|
const prefix = binDirs.join(path.delimiter)
|
|
390
391
|
let proc
|
|
391
392
|
try {
|
|
392
|
-
|
|
393
|
+
// vx's own `sh`, resolved on its PATH before the probe's: Bun.spawn looks
|
|
394
|
+
// a bare name up on the child's PATH, which leads with the project's
|
|
395
|
+
// `node_modules/.bin`, so a dependency's `sh` bin ran every probe (J-69).
|
|
396
|
+
const argv =
|
|
397
|
+
process.platform === 'win32' ? shellArgv(command) : [executablePath('sh'), '-c', command]
|
|
393
398
|
proc = Bun.spawn(argv, {
|
|
394
399
|
cwd,
|
|
395
400
|
env: { ...process.env, PATH: ambient ? `${prefix}${path.delimiter}${ambient}` : prefix },
|
|
@@ -2007,15 +2007,21 @@ async function wantsStraceDetection(): Promise<false | 'plain' | 'seccomp'> {
|
|
|
2007
2007
|
})
|
|
2008
2008
|
const out = await new Response(p.stdout).text()
|
|
2009
2009
|
await p.exited
|
|
2010
|
-
if (p.exitCode !== 0)
|
|
2011
|
-
|
|
2010
|
+
if (p.exitCode !== 0) {
|
|
2011
|
+
straceAvailableCache = false
|
|
2012
|
+
warnUntraced(`strace --version exited ${p.exitCode}`)
|
|
2013
|
+
} else {
|
|
2012
2014
|
const m = /version (\d+)\.(\d+)/.exec(out)
|
|
2013
2015
|
const [major, minor] = m ? [Number(m[1]), Number(m[2])] : [0, 0]
|
|
2014
2016
|
const form = major > 5 || (major === 5 && minor >= 3) ? 'seccomp' : 'plain'
|
|
2015
2017
|
straceAvailableCache = (await traceAttaches(form)) ? form : false
|
|
2016
2018
|
}
|
|
2017
2019
|
} catch {
|
|
2020
|
+
// Not on PATH. Said as the refused attach is: without it an undeclared
|
|
2021
|
+
// read is denied but never reported, so a task that tolerates the miss
|
|
2022
|
+
// passes and caches with no word of it (J's lead).
|
|
2018
2023
|
straceAvailableCache = false
|
|
2024
|
+
warnUntraced('strace is not on PATH')
|
|
2019
2025
|
}
|
|
2020
2026
|
return straceAvailableCache
|
|
2021
2027
|
}
|
|
@@ -2048,14 +2054,17 @@ async function traceAttaches(form: 'plain' | 'seccomp'): Promise<boolean> {
|
|
|
2048
2054
|
)
|
|
2049
2055
|
const err = await new Response(p.stderr).text()
|
|
2050
2056
|
if ((await p.exited) === 0) return true
|
|
2051
|
-
|
|
2052
|
-
warnedNoTrace = true
|
|
2053
|
-
process.stderr.write(
|
|
2054
|
-
`[vx] sandbox: strace cannot trace here (${err.trim().split('\n')[0] ?? `exit ${p.exitCode}`}), ` +
|
|
2055
|
-
`so sandboxed tasks run without the report of the reads the sandbox denied; ` +
|
|
2056
|
-
`the sandbox still enforces\n`,
|
|
2057
|
-
)
|
|
2058
|
-
}
|
|
2057
|
+
warnUntraced(`strace cannot trace here (${err.trim().split('\n')[0] ?? `exit ${p.exitCode}`})`)
|
|
2059
2058
|
return false
|
|
2060
2059
|
}
|
|
2061
2060
|
let warnedNoTrace = false
|
|
2061
|
+
|
|
2062
|
+
/** Said once per process: why sandboxed tasks run untraced, and what that loses. */
|
|
2063
|
+
function warnUntraced(why: string): void {
|
|
2064
|
+
if (warnedNoTrace) return
|
|
2065
|
+
warnedNoTrace = true
|
|
2066
|
+
process.stderr.write(
|
|
2067
|
+
`[vx] sandbox: ${why}, so sandboxed tasks run without the report of the reads the sandbox denied; ` +
|
|
2068
|
+
`the sandbox still enforces\n`,
|
|
2069
|
+
)
|
|
2070
|
+
}
|
|
@@ -256,9 +256,11 @@ export function configLoadError(err: unknown, configPath: string, kind: string):
|
|
|
256
256
|
if (name === 'ResolveMessage') {
|
|
257
257
|
const spec = /Cannot find (?:package|module) ['"]([^'"]+)['"]/.exec(message)?.[1]
|
|
258
258
|
const what = spec === undefined ? message.replace(BUST_QUERY, '') : `cannot find '${spec}'`
|
|
259
|
+
// The package the specifier names (`@vzn/vx-otel/x` → `@vzn/vx-otel`):
|
|
260
|
+
// a missing plugin was told to install core (J-59).
|
|
259
261
|
const hint =
|
|
260
262
|
spec?.startsWith('@vzn/vx') === true
|
|
261
|
-
? `; install it in the workspace: bun add -d
|
|
263
|
+
? `; install it in the workspace: bun add -d ${spec.split('/').slice(0, 2).join('/')}`
|
|
262
264
|
: ''
|
|
263
265
|
return new UserError(`${kind} config ${configPath}: ${what}${hint}`)
|
|
264
266
|
}
|