@vzn/vx 0.0.568 → 0.0.569

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.568",
3
+ "version": "0.0.569",
4
4
  "description": "The fastest task runner and build cache for JavaScript monorepos.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,10 +21,10 @@
21
21
  "node": ">=18"
22
22
  },
23
23
  "optionalDependencies": {
24
- "@vzn/vx-linux-x64": "0.0.568",
25
- "@vzn/vx-linux-arm64": "0.0.568",
26
- "@vzn/vx-darwin-x64": "0.0.568",
27
- "@vzn/vx-darwin-arm64": "0.0.568"
24
+ "@vzn/vx-linux-x64": "0.0.569",
25
+ "@vzn/vx-linux-arm64": "0.0.569",
26
+ "@vzn/vx-darwin-x64": "0.0.569",
27
+ "@vzn/vx-darwin-arm64": "0.0.569"
28
28
  },
29
29
  "dependencies": {
30
30
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
package/src/cli/run.ts CHANGED
@@ -10,6 +10,7 @@ import {
10
10
  outcomeLabel,
11
11
  projectOutcome,
12
12
  run as runOrchestrator,
13
+ shellQuote,
13
14
  type OutcomeView,
14
15
  type RunOptions,
15
16
  type RunResult,
@@ -649,8 +650,9 @@ export async function runCmd(args: readonly string[]): Promise<number> {
649
650
  }
650
651
  const opts = resolved
651
652
  // The raw invocation, recorded on the `invocations` row so dashboards
652
- // show what was actually run. `args` is everything after `run`.
653
- opts.command = ['vx', 'run', ...args].join(' ')
653
+ // show what was actually run. `args` is everything after `run`, quoted
654
+ // so `vx last` replays one paste-able line.
655
+ opts.command = ['vx', 'run', ...args.map(shellQuote)].join(' ')
654
656
 
655
657
  // Planning paths short-circuit execution. Both build the full task
656
658
  // graph + probe the cache; the difference is just the formatter.
package/src/exec/index.ts CHANGED
@@ -13,6 +13,7 @@ export {
13
13
  runPersistent,
14
14
  PersistentReadyError,
15
15
  withForwardArgs,
16
+ shellQuote,
16
17
  signalExitCode,
17
18
  exitSignal,
18
19
  type CaptureConfig,
@@ -106,7 +106,8 @@ function taskStdio(terminal: boolean | undefined, stdin: 'ignore' | 'pipe') {
106
106
 
107
107
  export function shellQuote(arg: string): string {
108
108
  if (arg === '') return `''`
109
- if (/^[A-Za-z0-9_\-.,/=:@%+]+$/.test(arg)) return arg
109
+ // A `#` opens a comment only at a word's start, so `app#build` stays bare.
110
+ if (/^[A-Za-z0-9_\-.,/=:@%+][A-Za-z0-9_\-.,/=:@%+#]*$/.test(arg)) return arg
110
111
  return `'${arg.replace(/'/g, `'\\''`)}'`
111
112
  }
112
113
 
@@ -21,7 +21,8 @@ export type { HeldPersistent, RunOptions, RunSummary } from './options.js'
21
21
  // reach it without importing the cache module directly.
22
22
  export { type CachePolicy, FULL_CACHE_POLICY, parseCachePolicy } from '../cache/index.js'
23
23
  // The CLI reads a recorded exit code; the runner's convention decodes it.
24
- export { exitSignal } from '../exec/index.js'
24
+ // It records its own argv quoted as the runner quotes forwarded args.
25
+ export { exitSignal, shellQuote } from '../exec/index.js'
25
26
  export { forwardedSignal } from './signals.js'
26
27
  // `vx cache prune` waits for a run on the workspace before it evicts.
27
28
  export { acquireRunLock } from './run-lock.js'
@@ -65,6 +65,9 @@ export function secretMask(
65
65
  const add = (value: string | undefined): void => {
66
66
  if (value === undefined || value.length < MIN_SECRET_CHARS) return
67
67
  values.add(value)
68
+ // A value with a `'` reaches a printed command spelled as shellQuote
69
+ // spells it (`'\''`), which the plain value does not match (X-45).
70
+ if (value.includes("'")) values.add(value.replaceAll("'", `'\\''`))
68
71
  // A multi-line value (a PEM key) is also masked line by line, as GitHub
69
72
  // Actions does: a tool that indents or reflows it prints no copy of the
70
73
  // whole value, and every line leaked (L-36).