tina4-nodejs 3.13.164 → 3.13.165

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.
@@ -19,7 +19,7 @@ import { generate, GENERATORS, RESOLUTION_ENVELOPE_VERSION, RESOLUTION_FLAGS } f
19
19
  import { runSeeds } from "./commands/seed.js";
20
20
  import { queueCommand, QUEUE_FLAGS, QUEUE_SUBCOMMAND_NAMES } from "./commands/queue.js";
21
21
  import { buildImage } from "./commands/build.js";
22
- import { spawnSync } from "node:child_process";
22
+ import { spawnSyncAllowingBatch } from "../../core/src/batchSpawn.js";
23
23
  import { existsSync, readFileSync } from "node:fs";
24
24
  import { dirname, join } from "node:path";
25
25
  import { findOnPath } from "./util.js";
@@ -557,7 +557,10 @@ export function delegateToClient(command: string, args: string[]): number {
557
557
 
558
558
  // stdio is inherited, so the client's interactive prompts (setup) and colour
559
559
  // output work exactly as if it had been invoked directly.
560
- const result = spawnSync(client, [command, ...args], {
560
+ // A tina4.cmd / tina4.bat client is accepted above, so it must be startable:
561
+ // Node will not spawn a batch file without a shell, and a plain shell would
562
+ // not escape the user's arguments.
563
+ const result = spawnSyncAllowingBatch(client, [command, ...args], {
561
564
  stdio: "inherit",
562
565
  env: { ...process.env, [DELEGATION_GUARD_ENV]: command },
563
566
  });
@@ -46,6 +46,7 @@ import { createRequire } from "node:module";
46
46
  import { dirname, join, relative } from "node:path";
47
47
  import { findOnPath } from "../util.js";
48
48
  import { spawnSync } from "node:child_process";
49
+ import { spawnSyncAllowingBatch } from "../../../core/src/batchSpawn.js";
49
50
 
50
51
  // Source extensions we count as lintable app code. `.d.ts` declaration files are
51
52
  // deliberately excluded — they carry no runnable code for `node --check` and are
@@ -237,7 +238,8 @@ function bootstrapEslint(cwd: string, noInstall: boolean): EslintSetup {
237
238
  }
238
239
  if (!bin) {
239
240
  console.log(" · installing eslint (npm i -D eslint @eslint/js typescript-eslint)...");
240
- const rc = spawnSync(npm, ["install", "-D", "eslint", "@eslint/js", "typescript-eslint"], { cwd, stdio: "inherit" }).status;
241
+ // On Windows npm is npm.cmd, which Node will not spawn without a shell.
242
+ const rc = spawnSyncAllowingBatch(npm, ["install", "-D", "eslint", "@eslint/js", "typescript-eslint"], { cwd, stdio: "inherit" }).status;
241
243
  if (rc === 0) bin = resolveEslintBin(cwd);
242
244
  else console.log(" · could not install eslint — using the zero-dependency baseline.");
243
245
  }