capiumbrowser 1.3.12 → 1.3.17
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/bin/capiumbrowser.js +3 -1
- package/lib/channels.json +6 -6
- package/lib/config.js +4 -0
- package/lib/download.js +36 -5
- 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.3.
|
|
715
|
+
The **1.3.16** release ships Chromium **156.0.8078.48** on Windows x64, macOS arm64 and **156.0.8078.47** on Linux x64 (the packaging revisions above). Browser downloads require a valid license. Linux arm64 remains declared but unpublished.
|
|
716
716
|
<!-- /capium:release-line -->
|
|
717
717
|
|
|
718
718
|
---
|
package/bin/capiumbrowser.js
CHANGED
|
@@ -220,7 +220,9 @@ function cmdVersion() {
|
|
|
220
220
|
async function cmdInstall() {
|
|
221
221
|
const { key } = license.effective();
|
|
222
222
|
console.log('downloading the capium browser binary ...');
|
|
223
|
-
|
|
223
|
+
// force: true -- `install` always re-downloads + re-extracts, repairing a truncated/partial
|
|
224
|
+
// install instead of no-opping when the version marker happens to match.
|
|
225
|
+
console.log('installed:', await download.ensureBinary({ licenseKey: key, force: true }));
|
|
224
226
|
return 0;
|
|
225
227
|
}
|
|
226
228
|
|
package/lib/channels.json
CHANGED
|
@@ -7,24 +7,24 @@
|
|
|
7
7
|
"windows-x64": {
|
|
8
8
|
"version": "156.0.8078.48",
|
|
9
9
|
"engine_version": "156.0.8078.47",
|
|
10
|
-
"revision":
|
|
11
|
-
"sha256": "
|
|
10
|
+
"revision": 13,
|
|
11
|
+
"sha256": "ed026354dc8e3bb5243c725d33f6881552f372e969476bc8e606fb9d84005962",
|
|
12
12
|
"published": true,
|
|
13
13
|
"license_status_protocol": 1
|
|
14
14
|
},
|
|
15
15
|
"macos-arm64": {
|
|
16
16
|
"version": "156.0.8078.48",
|
|
17
17
|
"engine_version": "156.0.8078.47",
|
|
18
|
-
"revision":
|
|
19
|
-
"sha256": "
|
|
18
|
+
"revision": 13,
|
|
19
|
+
"sha256": "03d6218777b12cc0bab2e5a6bbf9a67fdd352f0b9342f1e7ce7bd772ead10239",
|
|
20
20
|
"published": true,
|
|
21
21
|
"license_status_protocol": 1
|
|
22
22
|
},
|
|
23
23
|
"linux-x64": {
|
|
24
24
|
"version": "156.0.8078.47",
|
|
25
25
|
"engine_version": "156.0.8078.47",
|
|
26
|
-
"revision":
|
|
27
|
-
"sha256": "
|
|
26
|
+
"revision": 18,
|
|
27
|
+
"sha256": "c947c7486efcf47e49c667d9a27eebdcad08cf2683c57fd82495438ad23e84d5",
|
|
28
28
|
"published": true,
|
|
29
29
|
"license_status_protocol": 1
|
|
30
30
|
},
|
package/lib/config.js
CHANGED
|
@@ -115,6 +115,10 @@ function getDefaultStealthArgs(seed = null, platform = 'windows', screen = null,
|
|
|
115
115
|
// We keep --disable-features=TrackingProtection3pcd too (belt-and-suspenders / other path).
|
|
116
116
|
'--fingerprint-allow-3p-cookies',
|
|
117
117
|
'--disable-features=TrackingProtection3pcd',
|
|
118
|
+
// (The Protected Audience/FLEDGE + CpuPerformance navigator surface is trimmed to
|
|
119
|
+
// match real Chrome in the BINARY -- runtime_features.cc, gated on --fingerprint --
|
|
120
|
+
// not here, because Playwright manages --disable-blink-features and drops a
|
|
121
|
+
// user-supplied one.)
|
|
118
122
|
// present a desktop mouse (fine pointer + hover), not a touch device
|
|
119
123
|
'--blink-settings=primaryHoverType=2,availableHoverTypes=2,' +
|
|
120
124
|
'primaryPointerType=4,availablePointerTypes=4',
|
package/lib/download.js
CHANGED
|
@@ -203,6 +203,31 @@ function stampVersion(binPath, version) {
|
|
|
203
203
|
} catch {}
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Best-effort: does this install carry Chrome's resource payload, or just the launcher? A
|
|
208
|
+
* truncated extract (launcher present, .pak/ICU missing) still has a matching marker, so the
|
|
209
|
+
* version check alone would reuse a broken install and Chrome dies with 'side-by-side
|
|
210
|
+
* configuration is incorrect'. Returns false ONLY when the payload is positively missing; unsure
|
|
211
|
+
* (unusual layout) -> true, so we never re-download in a loop.
|
|
212
|
+
*/
|
|
213
|
+
function payloadLooksComplete(binPath) {
|
|
214
|
+
const d = path.dirname(binPath);
|
|
215
|
+
if (process.platform === 'darwin') return true; // app-bundle layout varies; trust the marker
|
|
216
|
+
try {
|
|
217
|
+
if (fs.existsSync(path.join(d, 'icudtl.dat'))) return true;
|
|
218
|
+
// Resource paks live either beside the launcher (resources.pak, chrome_100_percent.pak)
|
|
219
|
+
// or under locales/ (en-US.pak, ...). Either proves the extract carried the payload, not
|
|
220
|
+
// just the launcher -- so accept a .pak in BOTH places before deciding the install is
|
|
221
|
+
// truncated. (Checking only the top level wrongly re-downloaded a complete install whose
|
|
222
|
+
// only top-level resource was ICU-less, e.g. a locales-only layout.)
|
|
223
|
+
if (fs.readdirSync(d).some((f) => f.endsWith('.pak'))) return true;
|
|
224
|
+
const locales = path.join(d, 'locales');
|
|
225
|
+
return fs.existsSync(locales) && fs.readdirSync(locales).some((f) => f.endsWith('.pak'));
|
|
226
|
+
} catch {
|
|
227
|
+
return false;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
206
231
|
/**
|
|
207
232
|
* The buildId (`<version>.<N>`) this host SHOULD run, honoring CAPIUM_* env, or
|
|
208
233
|
* null if it can't be determined (CAPIUM_BINARY override / unsupported platform / bad manifest).
|
|
@@ -317,7 +342,7 @@ async function download(url, headers, dest, version, tag) {
|
|
|
317
342
|
* CapiumExpiredError -- the license was rejected (401/403).
|
|
318
343
|
* CapiumServerDownError-- the download server was unreachable / 5xx.
|
|
319
344
|
*/
|
|
320
|
-
async function ensureBinary({ version = null, licenseKey = null, server = null } = {}) {
|
|
345
|
+
async function ensureBinary({ version = null, licenseKey = null, server = null, force = false } = {}) {
|
|
321
346
|
// An explicit CAPIUM_BINARY path always wins -- it's the caller's choice, no version check.
|
|
322
347
|
if (process.env.CAPIUM_BINARY) return config.findBinary();
|
|
323
348
|
|
|
@@ -349,10 +374,16 @@ async function ensureBinary({ version = null, licenseKey = null, server = null }
|
|
|
349
374
|
// lives in the canonical root (~/.capium or CAPIUM_HOME). A different build -- or a same-build
|
|
350
375
|
// binary in a LEGACY location -- falls through so we (re)install into ~/.capium, keeping the
|
|
351
376
|
// browser under one folder next to the license.
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
377
|
+
// force (explicit install) always re-downloads. Otherwise reuse only a cached binary that is
|
|
378
|
+
// this exact build, in the canonical root, AND still has its resource payload -- a truncated
|
|
379
|
+
// install (launcher only, .pak/ICU gone) must be re-downloaded, not trusted.
|
|
380
|
+
if (!force) {
|
|
381
|
+
try {
|
|
382
|
+
const existing = config.findBinary();
|
|
383
|
+
if (readInstalledVersion(existing) === bid && inRoot(existing, destRoot())
|
|
384
|
+
&& payloadLooksComplete(existing)) return existing;
|
|
385
|
+
} catch {}
|
|
386
|
+
}
|
|
356
387
|
|
|
357
388
|
let url;
|
|
358
389
|
let headers = null;
|
package/package.json
CHANGED