@zixt/host 0.0.71 → 0.0.72

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ import { homedir } from "node:os";
31
31
  // package.json
32
32
  var package_default = {
33
33
  name: "@zixt/host",
34
- version: "0.0.71",
34
+ version: "0.0.72",
35
35
  type: "module",
36
36
  exports: {
37
37
  ".": "./src/client.ts",
@@ -24557,6 +24557,9 @@ function versionsRoot() {
24557
24557
  function npmCommand(platform = process.platform) {
24558
24558
  return platform === "win32" ? "npm.cmd" : "npm";
24559
24559
  }
24560
+ function windowsInstallerCommandLine(command, args) {
24561
+ return [command, ...args].map(quoteForCmd).join(" ");
24562
+ }
24560
24563
  function installedReleaseEntry(version2, root = versionsRoot()) {
24561
24564
  return join6(root, version2, "node_modules", PACKAGE_NAME, "dist", "index.js");
24562
24565
  }
@@ -24820,14 +24823,18 @@ process.stdin.on('data', (chunk) => {
24820
24823
  if (pending.length !== expectedBytes) return fail();
24821
24824
  let config;
24822
24825
  try { config = JSON.parse(pending.toString('utf8')); } catch { return fail(); }
24823
- if (!config || typeof config.command !== 'string' || !Array.isArray(config.args)) return fail();
24826
+ if (!config || typeof config.commandLine !== 'string' || !config.commandLine) return fail();
24824
24827
  launched = true;
24825
- const target = spawn(config.command, config.args, {
24828
+ const target = spawn(config.commandLine, {
24826
24829
  cwd: config.cwd,
24827
24830
  env: process.env,
24828
24831
  stdio: 'inherit',
24829
24832
  windowsHide: true,
24830
- shell: Boolean(config.shell),
24833
+ // cmd.exe has to resolve npm.cmd, so the shell stays - but the whole line
24834
+ // arrives pre-quoted as one string. Node's (command, args, shell) shape is
24835
+ // deprecated (DEP0190) because the shell concatenates args unescaped: it
24836
+ // printed a warning on every install and broke any prefix with a space.
24837
+ shell: true,
24831
24838
  });
24832
24839
  target.once('error', () => report(null, null));
24833
24840
  target.once('exit', report);
@@ -24997,10 +25004,11 @@ async function installRelease(version2, options = {}) {
24997
25004
  }
24998
25005
  const release = Buffer.from(
24999
25006
  JSON.stringify({
25000
- command: installerCommand,
25001
- args: installerArguments(staging, version2),
25002
- cwd: root,
25003
- shell: true
25007
+ commandLine: windowsInstallerCommandLine(
25008
+ installerCommand,
25009
+ installerArguments(staging, version2)
25010
+ ),
25011
+ cwd: root
25004
25012
  }),
25005
25013
  "utf8"
25006
25014
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zixt/host",
3
- "version": "0.0.71",
3
+ "version": "0.0.72",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/client.ts",