capiumbrowser 1.4.1 → 1.4.2
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/README.md +1 -1
- package/lib/channels.json +10 -10
- package/lib/download.js +46 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -712,7 +712,7 @@ launches **headed**, which reads cleaner than headless.
|
|
|
712
712
|
The SDK auto-detects your host and downloads the matching tag; macOS Intel and Windows ARM are **not**
|
|
713
713
|
published and throw a clear error.
|
|
714
714
|
<!-- capium:release-line -->
|
|
715
|
-
The **1.4.
|
|
715
|
+
The **1.4.2** release ships Chromium **158.0.8127.89** on Windows x64, macOS arm64 and **158.0.8127.88** on Linux x64 (packaging revision **3**). Browser downloads require a valid license. Linux arm64 remains declared but unpublished.
|
|
716
716
|
<!-- /capium:release-line -->
|
|
717
717
|
|
|
718
718
|
---
|
package/lib/channels.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_comment": "SINGLE SOURCE OF TRUTH for the current stable Capium browser build per OS/arch. Each OS reaches stable independently -- edit one entry without touching the others. This file ships inside the wheel (the SDK reads it to pick each host's stable build) AND is published to the download server by the release pipeline. `version` is the reported Chromium version (what the browser reports to the customer, names the R2 folder); `engine_version` is the actual built Chromium engine (box_package verifies the binary against it) -- it differs from `version` when a platform reports a spoofed patch (Windows/macOS report .48 on the .47 engine). `revision` is our packaging counter -- the served R2 folder is chromium-v<version>.<revision>/, ALWAYS dotted-suffixed starting at 1. A Chromium version bump resets revision to 1. `published: false` means the tag is declared but no artifact exists yet.",
|
|
3
3
|
"schema": 1,
|
|
4
|
-
"updated": "2026-11-
|
|
4
|
+
"updated": "2026-11-25",
|
|
5
5
|
"channels": {
|
|
6
6
|
"stable": {
|
|
7
7
|
"windows-x64": {
|
|
8
|
-
"version": "158.0.8127.
|
|
8
|
+
"version": "158.0.8127.89",
|
|
9
9
|
"engine_version": "158.0.8127.36",
|
|
10
|
-
"revision":
|
|
11
|
-
"sha256": "
|
|
10
|
+
"revision": 3,
|
|
11
|
+
"sha256": "9c79c37528cafdd2c2b4ffec072f2ecc6432d15c5cb2f85ef95ab38040a687c9",
|
|
12
12
|
"published": true,
|
|
13
13
|
"license_status_protocol": 1
|
|
14
14
|
},
|
|
15
15
|
"macos-arm64": {
|
|
16
|
-
"version": "158.0.8127.
|
|
16
|
+
"version": "158.0.8127.89",
|
|
17
17
|
"engine_version": "158.0.8127.36",
|
|
18
|
-
"revision":
|
|
19
|
-
"sha256": "
|
|
18
|
+
"revision": 3,
|
|
19
|
+
"sha256": "7e1a923314f161ea62342936078f5c872794e0dcdac9c5cd31bbbdd296afdb53",
|
|
20
20
|
"published": true,
|
|
21
21
|
"license_status_protocol": 1
|
|
22
22
|
},
|
|
23
23
|
"linux-x64": {
|
|
24
|
-
"version": "158.0.8127.
|
|
24
|
+
"version": "158.0.8127.88",
|
|
25
25
|
"engine_version": "158.0.8127.36",
|
|
26
|
-
"revision":
|
|
27
|
-
"sha256": "
|
|
26
|
+
"revision": 3,
|
|
27
|
+
"sha256": "c44b3eda302ce6c6abe97f2f55e11cd942cbe445e481e7767e24284eee03f477",
|
|
28
28
|
"published": true,
|
|
29
29
|
"license_status_protocol": 1
|
|
30
30
|
},
|
package/lib/download.js
CHANGED
|
@@ -150,21 +150,58 @@ async function extract(archivePath, root, subdir) {
|
|
|
150
150
|
await tar.x({ file: archivePath, cwd: scratch });
|
|
151
151
|
}
|
|
152
152
|
const entries = fs.readdirSync(scratch);
|
|
153
|
+
let payload;
|
|
154
|
+
let target;
|
|
153
155
|
if (entries.length === 1 &&
|
|
154
156
|
fs.statSync(path.join(scratch, entries[0])).isDirectory()) {
|
|
155
157
|
// single top-level dir: the archive carries its own capium-*/ folder
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
payload = path.join(scratch, entries[0]);
|
|
159
|
+
target = path.join(root, entries[0]);
|
|
160
|
+
} else {
|
|
161
|
+
// flat archive: wrap it so discovery (capium-*/ glob) still finds it
|
|
162
|
+
payload = scratch;
|
|
163
|
+
target = path.join(root, subdir);
|
|
160
164
|
}
|
|
161
|
-
|
|
162
|
-
const target = path.join(root, subdir);
|
|
163
|
-
fs.rmSync(target, { recursive: true, force: true });
|
|
164
|
-
fs.renameSync(scratch, target);
|
|
165
|
+
swapDirIntoPlace(payload, target);
|
|
165
166
|
return target;
|
|
166
167
|
} finally {
|
|
167
|
-
fs.rmSync(scratch, { recursive: true, force: true });
|
|
168
|
+
try { fs.rmSync(scratch, { recursive: true, force: true }); } catch { /* already moved */ }
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Make `dst` become `src` (a freshly-extracted payload dir), replacing any existing `dst`
|
|
174
|
+
* WITHOUT ever nesting the new payload inside leftover files.
|
|
175
|
+
*
|
|
176
|
+
* Guards the Windows engine-build-upgrade failure: the previous build's chrome.exe / *.dll still
|
|
177
|
+
* hold handles (image loader / antivirus / a lingering process), so deleting `dst` removes the
|
|
178
|
+
* unlocked data files (icudtl.dat, *.pak, snapshots) but leaves the locked binaries -- and moving
|
|
179
|
+
* the new payload onto that leftover either throws or buries the real build one level down, which
|
|
180
|
+
* aborts at ICU init. A directory RENAME succeeds on Windows even with open files inside (unlike
|
|
181
|
+
* delete), so move a stubborn `dst` aside to free the path, then rename the new payload in.
|
|
182
|
+
*/
|
|
183
|
+
function swapDirIntoPlace(src, dst) {
|
|
184
|
+
if (fs.existsSync(dst)) {
|
|
185
|
+
try { fs.rmSync(dst, { recursive: true, force: true }); } catch { /* locked */ }
|
|
186
|
+
}
|
|
187
|
+
if (fs.existsSync(dst)) {
|
|
188
|
+
const trash = `${dst}.stale-${crypto.randomBytes(4).toString('hex')}`;
|
|
189
|
+
try {
|
|
190
|
+
fs.renameSync(dst, trash);
|
|
191
|
+
try { fs.rmSync(trash, { recursive: true, force: true }); } catch { /* handles still open */ }
|
|
192
|
+
} catch { /* fall through to merge */ }
|
|
193
|
+
}
|
|
194
|
+
if (!fs.existsSync(dst)) {
|
|
195
|
+
fs.renameSync(src, dst);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
// Last resort (rename-aside also failed): merge contents so the payload is at least FLAT at
|
|
199
|
+
// `dst`, never nested. Files we can't overwrite (still-locked) stay stale -- a rare case the
|
|
200
|
+
// rename-aside path above already handles for the normal loaded-image lock.
|
|
201
|
+
fs.mkdirSync(dst, { recursive: true });
|
|
202
|
+
for (const name of fs.readdirSync(src)) {
|
|
203
|
+
try { fs.rmSync(path.join(dst, name), { recursive: true, force: true }); } catch { /* ignore */ }
|
|
204
|
+
try { fs.renameSync(path.join(src, name), path.join(dst, name)); } catch { /* ignore */ }
|
|
168
205
|
}
|
|
169
206
|
}
|
|
170
207
|
|
package/package.json
CHANGED