@zixt/host 0.0.71 → 0.0.73

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 +26 -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.73",
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
  );
@@ -26836,6 +26844,16 @@ function createPlaywrightBrowserAdapterFactory(dependencies = {}) {
26836
26844
  const playwright = await load();
26837
26845
  const context = await playwright.chromium.launchPersistentContext(profileDir, {
26838
26846
  headless: true,
26847
+ // Without a channel, Playwright resolves `headless: true` to its
26848
+ // `chromium_headless_shell` build — a stripped binary missing pieces
26849
+ // a browser is expected to have (no `window.chrome`, no plugins, a
26850
+ // single-entry `navigator.languages`). Google Accounts reads that
26851
+ // shape as "this browser or app may not be secure" and refuses the
26852
+ // sign-in outright, which made every site behind a Google login a
26853
+ // dead end for the person watching the panel. `chromium` selects the
26854
+ // full browser this adapter's capability probe already checks for
26855
+ // (`executablePath()` resolves to it), so the two now agree.
26856
+ channel: "chromium",
26839
26857
  viewport,
26840
26858
  // Headless Chromium announces itself in two ways that bot protection
26841
26859
  // reads as "not a person": `HeadlessChrome` in the user agent, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zixt/host",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/client.ts",