haltija 1.12.7 → 1.12.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.12.8 (unreleased)
4
+
5
+ - **Electron discovery assumed macOS, so Linux re-downloaded Electron every run (#43).** The npx-cache
6
+ search looked for `Electron.app` — a macOS bundle — behind a `platform() !== 'win32'` guard, so
7
+ Linux took the branch and matched nothing. A populated cache was never detected: the launcher
8
+ printed "Electron not cached" on every run and fell back to `npx --yes electron`, putting an
9
+ npm-registry round-trip on the browser-readiness path. During a registry degradation on
10
+ 2026-09-04 that became a server which never bound its port across three CI lanes.
11
+
12
+ The defect was two expressions of "what an Electron dist looks like", only one of them
13
+ platform-aware. The search now finds dist *directories* and lets `binaryInDist()` — which had it
14
+ right all along — decide the binary name, so there is one authority instead of two to drift.
15
+ Reported by snowfox with the diagnosis and the fix.
16
+
3
17
  ## 1.12.7 (unreleased)
4
18
 
5
19
  ### File preview: 3D models, video, audio and fonts
@@ -46,7 +46,7 @@
46
46
  });
47
47
 
48
48
  // src/version.ts
49
- var VERSION = "1.12.7";
49
+ var VERSION = "1.12.8";
50
50
 
51
51
  // src/ws-url.ts
52
52
  function httpBaseFromWsUrl(wsUrl2, fallback = "http://localhost:8700") {
@@ -628,15 +628,27 @@ function resolveElectronBinary() {
628
628
  } catch {}
629
629
 
630
630
  // 3. Search npx cache for electron dist directories (no Electron launch)
631
+ //
632
+ // Look for the **dist directory itself**, not for a binary by name. This used to search for
633
+ // `Electron.app` — a macOS bundle — under a `platform() !== 'win32'` guard, so Linux took the
634
+ // branch and matched nothing: `resolveElectronBinary()` returned null on every run, the launcher
635
+ // printed "Electron not cached" over a populated cache, and fell back to `npx --yes electron`,
636
+ // putting an npm-registry round-trip on the browser-readiness path. On 2026-09-04 a registry
637
+ // degradation turned that into a server that never bound its port across three CI lanes (#43,
638
+ // from snowfox).
639
+ //
640
+ // The bug was TWO expressions of "what an Electron dist looks like", only one of them
641
+ // platform-aware — `binaryInDist()` above had it right all along. So this no longer re-derives
642
+ // the answer: it finds candidate dist dirs (a platform-neutral path) and lets `binaryInDist()`
643
+ // decide, which is the one place that knows. Fixing the pattern per-platform would have left
644
+ // the same two authorities to drift apart again.
631
645
  if (platform() !== 'win32') {
632
646
  try {
633
647
  const cacheHits = execSyncImported(
634
- `find ${homedir()}/.npm/_npx -name "Electron.app" -path "*/electron/dist/*" -type d 2>/dev/null`,
648
+ `find ${homedir()}/.npm/_npx -type d -name dist -path "*/electron/dist" 2>/dev/null`,
635
649
  { encoding: 'utf-8', timeout: 3000 }
636
650
  ).trim().split('\n').filter(Boolean)
637
- for (const hit of cacheHits) {
638
- // hit is .../electron/dist/Electron.app — we want the dist dir
639
- const distDir = join(hit, '..')
651
+ for (const distDir of cacheHits) {
640
652
  const bin = binaryInDist(distDir)
641
653
  if (bin) { _cachedElectronBinary = bin; return bin }
642
654
  }
package/bin/version.mjs CHANGED
@@ -3,4 +3,4 @@
3
3
  * ⚠️ To change the version, update package.json and run: bun run build
4
4
  */
5
5
 
6
- export const HJ_VERSION = '1.12.7'
6
+ export const HJ_VERSION = '1.12.8'
@@ -20,7 +20,7 @@
20
20
  * - Option+Tab toggles visibility (but active state always shows briefly)
21
21
  * - Localhost only by default
22
22
  */
23
- export declare const VERSION = "1.12.7";
23
+ export declare const VERSION = "1.12.8";
24
24
  export declare class DevChannel extends HTMLElement {
25
25
  static get tagName(): string;
26
26
  static elementCreator(): () => DevChannel;
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "1.12.7";
2
+ var VERSION = "1.12.8";
3
3
 
4
4
  // src/ws-url.ts
5
5
  function httpBaseFromWsUrl(wsUrl2, fallback = "http://localhost:8700") {
package/dist/component.js CHANGED
@@ -46,7 +46,7 @@
46
46
  });
47
47
 
48
48
  // src/version.ts
49
- var VERSION = "1.12.7";
49
+ var VERSION = "1.12.8";
50
50
 
51
51
  // src/ws-url.ts
52
52
  function httpBaseFromWsUrl(wsUrl2, fallback = "http://localhost:8700") {
package/dist/hj.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- // haltija-cli:do-not-edit v1.12.7
2
+ // haltija-cli:do-not-edit v1.12.8
3
3
  import { createRequire } from "node:module";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __returnValue = (v) => v;
@@ -909,7 +909,7 @@ function substituteGeneratedVars(text, seed) {
909
909
  }
910
910
 
911
911
  // bin/version.mjs
912
- var HJ_VERSION = "1.12.7";
912
+ var HJ_VERSION = "1.12.8";
913
913
 
914
914
  // bin/semver.mjs
915
915
  function parseVersion(v) {
package/dist/index.js CHANGED
@@ -674,7 +674,7 @@ var injectorCode = `
674
674
  `;
675
675
 
676
676
  // src/version.ts
677
- var VERSION = "1.12.7";
677
+ var VERSION = "1.12.8";
678
678
 
679
679
  // src/embedded-assets.ts
680
680
  var APP_MD = `# Haltija App
@@ -3633,7 +3633,7 @@ var COMPONENT_JS = `(() => {
3633
3633
  });
3634
3634
 
3635
3635
  // src/version.ts
3636
- var VERSION = "1.12.7";
3636
+ var VERSION = "1.12.8";
3637
3637
 
3638
3638
  // src/ws-url.ts
3639
3639
  function httpBaseFromWsUrl(wsUrl2, fallback = "http://localhost:8700") {
package/dist/server.js CHANGED
@@ -674,7 +674,7 @@ var injectorCode = `
674
674
  `;
675
675
 
676
676
  // src/version.ts
677
- var VERSION = "1.12.7";
677
+ var VERSION = "1.12.8";
678
678
 
679
679
  // src/embedded-assets.ts
680
680
  var APP_MD = `# Haltija App
@@ -3633,7 +3633,7 @@ var COMPONENT_JS = `(() => {
3633
3633
  });
3634
3634
 
3635
3635
  // src/version.ts
3636
- var VERSION = "1.12.7";
3636
+ var VERSION = "1.12.8";
3637
3637
 
3638
3638
  // src/ws-url.ts
3639
3639
  function httpBaseFromWsUrl(wsUrl2, fallback = "http://localhost:8700") {
package/dist/version.d.ts CHANGED
@@ -8,4 +8,4 @@
8
8
  * ⚠️ AUTO-GENERATED FROM package.json - DO NOT EDIT THIS FILE
9
9
  * ⚠️ To change the version, update package.json and run: bun run build
10
10
  */
11
- export declare const VERSION = "1.12.7";
11
+ export declare const VERSION = "1.12.8";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "haltija",
3
- "version": "1.12.7",
3
+ "version": "1.12.8",
4
4
  "description": "Browser control for AI agents - query DOM, click, type, run JS, watch mutations",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",