jumpy-lion 0.1.6-beta.10 → 0.1.6-beta.13

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 (27) hide show
  1. package/browser/fonts/macos-bundle/40-macos-aliases.conf +497 -0
  2. package/browser/fonts/macos-bundle/README.md +76 -0
  3. package/browser/fonts/macos-bundle/install.sh +83 -0
  4. package/dist/browser-controller.d.ts.map +1 -1
  5. package/dist/browser-controller.js +8 -1
  6. package/dist/browser-controller.js.map +1 -1
  7. package/dist/browser-plugin.d.ts.map +1 -1
  8. package/dist/browser-plugin.js +7 -1
  9. package/dist/browser-plugin.js.map +1 -1
  10. package/dist/browser-process/anti-detect-config.d.ts +31 -0
  11. package/dist/browser-process/anti-detect-config.d.ts.map +1 -1
  12. package/dist/browser-process/anti-detect-config.js +64 -0
  13. package/dist/browser-process/anti-detect-config.js.map +1 -1
  14. package/dist/browser-process/browser.d.ts.map +1 -1
  15. package/dist/browser-process/browser.js +106 -18
  16. package/dist/browser-process/browser.js.map +1 -1
  17. package/dist/fingerprinting/fingerprint-injector.d.ts.map +1 -1
  18. package/dist/fingerprinting/fingerprint-injector.js +29 -2
  19. package/dist/fingerprinting/fingerprint-injector.js.map +1 -1
  20. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts.map +1 -1
  21. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js +42 -11
  22. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js.map +1 -1
  23. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.d.ts.map +1 -1
  24. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js +23 -4
  25. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js.map +1 -1
  26. package/dist/tsconfig.build.tsbuildinfo +1 -1
  27. package/package.json +3 -2
@@ -0,0 +1,497 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3
+ <!--
4
+ macOS family-name aliases for Linux hosts running with a macOS fingerprint.
5
+
6
+ Why: Skia consults fontconfig when resolving font family names. On a Linux
7
+ host without these aliases, "Helvetica" would silently substitute to
8
+ DejaVu Sans / Liberation Sans, producing different glyph rasters and
9
+ measureText() widths than real macOS. That delta survives any pixel-noise
10
+ patch and is the dominant signal anti-bot vendors use to detect the
11
+ Linux-host-spoofing-Mac case.
12
+
13
+ How it works: fontconfig reads files in /etc/fonts/conf.d/ in numeric order.
14
+ When a process asks for "Helvetica", the <prefer> chain below redirects to
15
+ the freely-licensed clone .ttf bundled in the host system, and Skia
16
+ rasterizes from THAT file — producing glyph metrics close to (though never
17
+ identical to) CoreText's output for the same name.
18
+
19
+ Prerequisites (install via apt-get on Debian/Ubuntu):
20
+ fonts-texgyre (TeX Gyre Heros, Pagella, Bonum)
21
+ fonts-croscore (Arimo, Tinos, Cousine — Apache 2.0 metric clones)
22
+ fonts-inter (Inter — SIL OFL, SF Pro look-alike)
23
+ fonts-jetbrains-mono (JetBrains Mono — Apache 2.0)
24
+ fonts-urw-base35 (Nimbus Sans/Roman/Mono PS, P052, URW Gothic)
25
+ fonts-noto-core (Noto Sans/Serif)
26
+ fonts-noto-cjk (CJK glyph coverage)
27
+ fonts-noto-color-emoji (Apple Color Emoji replacement)
28
+ fonts-liberation (already in g2-test-actor; provides Liberation Sans/Mono/Serif)
29
+ fonts-dejavu-core (already; provides DejaVu Sans Mono / DejaVu Sans)
30
+ -->
31
+ <fontconfig>
32
+
33
+ <!-- ============================================================
34
+ Helvetica family
35
+ ============================================================ -->
36
+ <alias>
37
+ <family>Helvetica</family>
38
+ <prefer>
39
+ <family>TeX Gyre Heros</family>
40
+ <family>Nimbus Sans</family>
41
+ <family>Arimo</family>
42
+ </prefer>
43
+ </alias>
44
+ <alias>
45
+ <family>Helvetica Neue</family>
46
+ <prefer>
47
+ <family>TeX Gyre Heros</family>
48
+ <family>Nimbus Sans</family>
49
+ <family>Arimo</family>
50
+ </prefer>
51
+ </alias>
52
+
53
+ <!-- ============================================================
54
+ Arial / Times / Courier (cross-platform but Skia maps differ)
55
+ ============================================================ -->
56
+ <alias>
57
+ <family>Arial</family>
58
+ <prefer>
59
+ <family>Arimo</family>
60
+ <family>Liberation Sans</family>
61
+ </prefer>
62
+ </alias>
63
+ <alias>
64
+ <family>Arial Narrow</family>
65
+ <prefer>
66
+ <family>Arimo</family>
67
+ </prefer>
68
+ </alias>
69
+ <alias>
70
+ <family>Arial Black</family>
71
+ <prefer>
72
+ <family>Arimo</family>
73
+ </prefer>
74
+ </alias>
75
+ <alias>
76
+ <family>Times</family>
77
+ <prefer>
78
+ <family>Tinos</family>
79
+ <family>Liberation Serif</family>
80
+ <family>Nimbus Roman</family>
81
+ </prefer>
82
+ </alias>
83
+ <alias>
84
+ <family>Times New Roman</family>
85
+ <prefer>
86
+ <family>Tinos</family>
87
+ <family>Liberation Serif</family>
88
+ <family>Nimbus Roman</family>
89
+ </prefer>
90
+ </alias>
91
+ <alias>
92
+ <family>Courier</family>
93
+ <prefer>
94
+ <family>Cousine</family>
95
+ <family>Liberation Mono</family>
96
+ <family>Nimbus Mono PS</family>
97
+ </prefer>
98
+ </alias>
99
+ <alias>
100
+ <family>Courier New</family>
101
+ <prefer>
102
+ <family>Cousine</family>
103
+ <family>Liberation Mono</family>
104
+ </prefer>
105
+ </alias>
106
+
107
+ <!-- ============================================================
108
+ SF Pro family (San Francisco — modern macOS UI font)
109
+ ============================================================ -->
110
+ <alias>
111
+ <family>SF Pro</family>
112
+ <prefer>
113
+ <family>Inter</family>
114
+ </prefer>
115
+ </alias>
116
+ <alias>
117
+ <family>SF Pro Display</family>
118
+ <prefer>
119
+ <family>Inter</family>
120
+ </prefer>
121
+ </alias>
122
+ <alias>
123
+ <family>SF Pro Text</family>
124
+ <prefer>
125
+ <family>Inter</family>
126
+ </prefer>
127
+ </alias>
128
+ <alias>
129
+ <family>SF Mono</family>
130
+ <prefer>
131
+ <family>JetBrains Mono</family>
132
+ <family>DejaVu Sans Mono</family>
133
+ </prefer>
134
+ </alias>
135
+ <alias>
136
+ <family>-apple-system</family>
137
+ <prefer>
138
+ <family>Inter</family>
139
+ </prefer>
140
+ </alias>
141
+ <alias>
142
+ <family>BlinkMacSystemFont</family>
143
+ <prefer>
144
+ <family>Inter</family>
145
+ </prefer>
146
+ </alias>
147
+
148
+ <!-- ============================================================
149
+ Mac monospace family (Menlo / Monaco)
150
+ ============================================================ -->
151
+ <alias>
152
+ <family>Menlo</family>
153
+ <prefer>
154
+ <family>DejaVu Sans Mono</family>
155
+ <family>Liberation Mono</family>
156
+ </prefer>
157
+ </alias>
158
+ <alias>
159
+ <family>Monaco</family>
160
+ <prefer>
161
+ <family>Liberation Mono</family>
162
+ <family>DejaVu Sans Mono</family>
163
+ </prefer>
164
+ </alias>
165
+
166
+ <!-- ============================================================
167
+ Mac sans family (Geneva / Lucida Grande / Charcoal)
168
+ ============================================================ -->
169
+ <alias>
170
+ <family>Geneva</family>
171
+ <prefer>
172
+ <family>Liberation Sans</family>
173
+ <family>DejaVu Sans</family>
174
+ </prefer>
175
+ </alias>
176
+ <alias>
177
+ <family>Lucida Grande</family>
178
+ <prefer>
179
+ <family>DejaVu Sans</family>
180
+ <family>Liberation Sans</family>
181
+ </prefer>
182
+ </alias>
183
+ <alias>
184
+ <family>Charcoal</family>
185
+ <prefer>
186
+ <family>DejaVu Sans</family>
187
+ </prefer>
188
+ </alias>
189
+ <alias>
190
+ <family>Chicago</family>
191
+ <prefer>
192
+ <family>DejaVu Sans</family>
193
+ </prefer>
194
+ </alias>
195
+
196
+ <!-- ============================================================
197
+ Mac serif family (New York / Baskerville / Big Caslon)
198
+ ============================================================ -->
199
+ <alias>
200
+ <family>New York</family>
201
+ <prefer>
202
+ <family>Tinos</family>
203
+ <family>Liberation Serif</family>
204
+ </prefer>
205
+ </alias>
206
+ <alias>
207
+ <family>Baskerville</family>
208
+ <prefer>
209
+ <family>Tinos</family>
210
+ <family>Liberation Serif</family>
211
+ </prefer>
212
+ </alias>
213
+ <alias>
214
+ <family>Big Caslon</family>
215
+ <prefer>
216
+ <family>Tinos</family>
217
+ </prefer>
218
+ </alias>
219
+ <alias>
220
+ <family>Hoefler Text</family>
221
+ <prefer>
222
+ <family>Tinos</family>
223
+ </prefer>
224
+ </alias>
225
+ <alias>
226
+ <family>Charter</family>
227
+ <prefer>
228
+ <family>Tinos</family>
229
+ </prefer>
230
+ </alias>
231
+ <alias>
232
+ <family>Cochin</family>
233
+ <prefer>
234
+ <family>Tinos</family>
235
+ </prefer>
236
+ </alias>
237
+ <alias>
238
+ <family>Didot</family>
239
+ <prefer>
240
+ <family>Tinos</family>
241
+ </prefer>
242
+ </alias>
243
+
244
+ <!-- ============================================================
245
+ Optima / Avenir / Futura / Gill Sans (sans variants)
246
+ ============================================================ -->
247
+ <alias>
248
+ <family>Optima</family>
249
+ <prefer>
250
+ <family>URW Classico</family>
251
+ <family>Liberation Sans</family>
252
+ </prefer>
253
+ </alias>
254
+ <alias>
255
+ <family>Avenir</family>
256
+ <prefer>
257
+ <family>Inter</family>
258
+ <family>Liberation Sans</family>
259
+ </prefer>
260
+ </alias>
261
+ <alias>
262
+ <family>Avenir Next</family>
263
+ <prefer>
264
+ <family>Inter</family>
265
+ </prefer>
266
+ </alias>
267
+ <alias>
268
+ <family>Avenir Next Condensed</family>
269
+ <prefer>
270
+ <family>Inter</family>
271
+ </prefer>
272
+ </alias>
273
+ <alias>
274
+ <family>Futura</family>
275
+ <prefer>
276
+ <family>URW Gothic</family>
277
+ <family>Liberation Sans</family>
278
+ </prefer>
279
+ </alias>
280
+ <alias>
281
+ <family>Gill Sans</family>
282
+ <prefer>
283
+ <family>URW Gothic</family>
284
+ </prefer>
285
+ </alias>
286
+ <alias>
287
+ <family>Trebuchet MS</family>
288
+ <prefer>
289
+ <family>Liberation Sans</family>
290
+ </prefer>
291
+ </alias>
292
+
293
+ <!-- ============================================================
294
+ Palatino / Bookman family
295
+ ============================================================ -->
296
+ <alias>
297
+ <family>Palatino</family>
298
+ <prefer>
299
+ <family>TeX Gyre Pagella</family>
300
+ <family>P052</family>
301
+ </prefer>
302
+ </alias>
303
+ <alias>
304
+ <family>Bookman</family>
305
+ <prefer>
306
+ <family>TeX Gyre Bonum</family>
307
+ <family>URW Bookman</family>
308
+ </prefer>
309
+ </alias>
310
+ <alias>
311
+ <family>Bookman Old Style</family>
312
+ <prefer>
313
+ <family>TeX Gyre Bonum</family>
314
+ <family>URW Bookman</family>
315
+ </prefer>
316
+ </alias>
317
+ <alias>
318
+ <family>American Typewriter</family>
319
+ <prefer>
320
+ <family>Tinos</family>
321
+ </prefer>
322
+ </alias>
323
+
324
+ <!-- ============================================================
325
+ Apple system / fallback families
326
+ ============================================================ -->
327
+ <alias>
328
+ <family>Apple Color Emoji</family>
329
+ <prefer>
330
+ <family>Noto Color Emoji</family>
331
+ </prefer>
332
+ </alias>
333
+ <alias>
334
+ <family>Apple SD Gothic Neo</family>
335
+ <prefer>
336
+ <family>Noto Sans CJK KR</family>
337
+ </prefer>
338
+ </alias>
339
+ <alias>
340
+ <family>AppleGothic</family>
341
+ <prefer>
342
+ <family>Noto Sans CJK KR</family>
343
+ </prefer>
344
+ </alias>
345
+ <alias>
346
+ <family>Hiragino Sans</family>
347
+ <prefer>
348
+ <family>Noto Sans CJK JP</family>
349
+ </prefer>
350
+ </alias>
351
+ <alias>
352
+ <family>Hiragino Mincho ProN</family>
353
+ <prefer>
354
+ <family>Noto Serif CJK JP</family>
355
+ </prefer>
356
+ </alias>
357
+ <alias>
358
+ <family>PingFang SC</family>
359
+ <prefer>
360
+ <family>Noto Sans CJK SC</family>
361
+ </prefer>
362
+ </alias>
363
+ <alias>
364
+ <family>PingFang TC</family>
365
+ <prefer>
366
+ <family>Noto Sans CJK TC</family>
367
+ </prefer>
368
+ </alias>
369
+ <alias>
370
+ <family>Apple Symbols</family>
371
+ <prefer>
372
+ <family>Noto Sans Symbols</family>
373
+ <family>Symbola</family>
374
+ </prefer>
375
+ </alias>
376
+ <alias>
377
+ <family>Andale Mono</family>
378
+ <prefer>
379
+ <family>DejaVu Sans Mono</family>
380
+ </prefer>
381
+ </alias>
382
+ <alias>
383
+ <family>Skia</family>
384
+ <prefer>
385
+ <family>Liberation Sans</family>
386
+ </prefer>
387
+ </alias>
388
+ <alias>
389
+ <family>Marker Felt</family>
390
+ <prefer>
391
+ <family>Liberation Sans</family>
392
+ </prefer>
393
+ </alias>
394
+ <alias>
395
+ <family>Chalkboard</family>
396
+ <prefer>
397
+ <family>Liberation Sans</family>
398
+ </prefer>
399
+ </alias>
400
+ <alias>
401
+ <family>Chalkboard SE</family>
402
+ <prefer>
403
+ <family>Liberation Sans</family>
404
+ </prefer>
405
+ </alias>
406
+ <alias>
407
+ <family>Chalkduster</family>
408
+ <prefer>
409
+ <family>Liberation Sans</family>
410
+ </prefer>
411
+ </alias>
412
+ <alias>
413
+ <family>Brush Script MT</family>
414
+ <prefer>
415
+ <family>Liberation Sans</family>
416
+ </prefer>
417
+ </alias>
418
+ <alias>
419
+ <family>Bradley Hand</family>
420
+ <prefer>
421
+ <family>Liberation Sans</family>
422
+ </prefer>
423
+ </alias>
424
+ <alias>
425
+ <family>Snell Roundhand</family>
426
+ <prefer>
427
+ <family>Liberation Sans</family>
428
+ </prefer>
429
+ </alias>
430
+ <alias>
431
+ <family>Zapfino</family>
432
+ <prefer>
433
+ <family>Liberation Sans</family>
434
+ </prefer>
435
+ </alias>
436
+ <alias>
437
+ <family>Phosphate</family>
438
+ <prefer>
439
+ <family>Liberation Sans</family>
440
+ </prefer>
441
+ </alias>
442
+ <alias>
443
+ <family>Trattatello</family>
444
+ <prefer>
445
+ <family>Liberation Sans</family>
446
+ </prefer>
447
+ </alias>
448
+ <alias>
449
+ <family>SignPainter</family>
450
+ <prefer>
451
+ <family>Liberation Sans</family>
452
+ </prefer>
453
+ </alias>
454
+ <alias>
455
+ <family>Savoye LET</family>
456
+ <prefer>
457
+ <family>Liberation Sans</family>
458
+ </prefer>
459
+ </alias>
460
+ <alias>
461
+ <family>Apple Chancery</family>
462
+ <prefer>
463
+ <family>Liberation Sans</family>
464
+ </prefer>
465
+ </alias>
466
+ <alias>
467
+ <family>Bodoni 72</family>
468
+ <prefer>
469
+ <family>Tinos</family>
470
+ </prefer>
471
+ </alias>
472
+ <alias>
473
+ <family>Bodoni 72 Oldstyle</family>
474
+ <prefer>
475
+ <family>Tinos</family>
476
+ </prefer>
477
+ </alias>
478
+ <alias>
479
+ <family>Bodoni 72 Smallcaps</family>
480
+ <prefer>
481
+ <family>Tinos</family>
482
+ </prefer>
483
+ </alias>
484
+ <alias>
485
+ <family>Copperplate</family>
486
+ <prefer>
487
+ <family>Liberation Sans</family>
488
+ </prefer>
489
+ </alias>
490
+ <alias>
491
+ <family>Rockwell</family>
492
+ <prefer>
493
+ <family>Tinos</family>
494
+ </prefer>
495
+ </alias>
496
+
497
+ </fontconfig>
@@ -0,0 +1,76 @@
1
+ # macOS-equivalent font bundle for Linux hosts
2
+
3
+ This directory ships:
4
+
5
+ - **`40-macos-aliases.conf`** — fontconfig file that aliases macOS family names
6
+ (Helvetica, SF Pro, Menlo, Lucida Grande, etc.) to freely-licensed clones.
7
+ - **`install.sh`** — installs the required apt packages, drops the alias file
8
+ into `/etc/fonts/conf.d/`, and rebuilds the font cache.
9
+
10
+ ## Why
11
+
12
+ When a Linux host runs the crawler with a macOS fingerprint (`platform:
13
+ 'MacIntel'`), Skia (Chromium's font subsystem) consults fontconfig to resolve
14
+ font family names. Without these aliases, "Helvetica" silently substitutes
15
+ to DejaVu Sans / Liberation Sans, producing different glyph rasters and
16
+ `measureText()` widths than real macOS. Anti-bot vendors detect this delta
17
+ through canvas pixel hashing and font-width fingerprinting — a signal that
18
+ survives any pixel-level noise patch.
19
+
20
+ These aliases redirect the resolution to clones that are visually close to
21
+ the macOS originals, narrowing the cross-platform delta enough that a
22
+ moderate noise envelope can mask the residual difference.
23
+
24
+ ## Usage (Docker)
25
+
26
+ In your Apify actor `Dockerfile`, copy this directory in and run the
27
+ installer as part of your image build:
28
+
29
+ ```dockerfile
30
+ # Bundle Mac-equivalent fonts so Skia rasterizes a Mac-like glyph set even
31
+ # on a Linux host. Must run as root.
32
+ COPY browser/fonts/macos-bundle /tmp/macos-bundle
33
+ RUN bash /tmp/macos-bundle/install.sh && rm -rf /tmp/macos-bundle
34
+ ```
35
+
36
+ After the build, verify inside the container:
37
+
38
+ ```bash
39
+ fc-match Helvetica
40
+ # Expect: qhvr.otf: "TeX Gyre Heros" "Regular"
41
+ # NOT: DejaVuSans.ttf: "DejaVu Sans" "Book"
42
+ ```
43
+
44
+ ## Font packages used
45
+
46
+ | macOS font | Linux clone | Apt package | License |
47
+ |------------|-------------|-------------|---------|
48
+ | Helvetica / Helvetica Neue | TeX Gyre Heros | `fonts-texgyre` | GUST (BSD-equivalent) |
49
+ | Arial | Arimo | `fonts-croscore` | Apache 2.0 |
50
+ | Times / Times New Roman | Tinos | `fonts-croscore` | Apache 2.0 |
51
+ | Courier / Courier New | Cousine | `fonts-croscore` | Apache 2.0 |
52
+ | SF Pro / SF Pro Display / SF Pro Text | Inter | `fonts-inter` | SIL OFL 1.1 |
53
+ | SF Mono | JetBrains Mono | `fonts-jetbrains-mono` | Apache 2.0 |
54
+ | Menlo | DejaVu Sans Mono | `fonts-dejavu-core` | Bitstream Vera (free) |
55
+ | Monaco | Liberation Mono | `fonts-liberation` | SIL OFL 1.1 |
56
+ | Geneva | Liberation Sans | `fonts-liberation` | SIL OFL 1.1 |
57
+ | Lucida Grande | DejaVu Sans | `fonts-dejavu-core` | Bitstream Vera |
58
+ | New York / Baskerville / Hoefler Text / Charter / Cochin / Didot | Tinos | `fonts-croscore` | Apache 2.0 |
59
+ | Optima / Gill Sans | URW Classico / URW Gothic | `fonts-urw-base35` | GPL+font exception |
60
+ | Avenir / Avenir Next | Inter | `fonts-inter` | SIL OFL 1.1 |
61
+ | Futura | URW Gothic | `fonts-urw-base35` | GPL+font exception |
62
+ | Palatino | TeX Gyre Pagella / P052 | `fonts-texgyre` | GUST |
63
+ | Bookman / Bookman Old Style | TeX Gyre Bonum / URW Bookman | `fonts-texgyre` | GUST |
64
+ | Apple Color Emoji | Noto Color Emoji | `fonts-noto-color-emoji` | SIL OFL 1.1 |
65
+ | Apple SD Gothic Neo / AppleGothic | Noto Sans CJK KR | `fonts-noto-cjk` | SIL OFL 1.1 |
66
+ | Hiragino Sans (JP) | Noto Sans CJK JP | `fonts-noto-cjk` | SIL OFL 1.1 |
67
+ | PingFang SC/TC | Noto Sans CJK SC/TC | `fonts-noto-cjk` | SIL OFL 1.1 |
68
+ | Apple Symbols | Symbola / Noto Sans Symbols | `fonts-symbola`, `fonts-noto-core` | various free |
69
+
70
+ ## Limitations
71
+
72
+ The aliases bring glyph metrics close to macOS but **never byte-identical**.
73
+ FreeType (Linux) and CoreText (macOS) use different rasterization, hinting,
74
+ and sub-pixel positioning algorithms. Pair this bundle with the cromite
75
+ text-rect noise envelope (`F7-B`) and the deterministic font-fallback patch
76
+ (`F7-C`) for full coverage.
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env bash
2
+ # install.sh — install Mac-equivalent fonts and apply fontconfig aliases on
3
+ # Debian/Ubuntu Linux hosts running cdp-crawler with a macOS fingerprint.
4
+ #
5
+ # Run as root (typically inside a Docker build). Idempotent — safe to re-run.
6
+ #
7
+ # Usage: bash install.sh [--no-cache]
8
+ #
9
+ # What it does:
10
+ # 1. apt-get installs free-licensed font packages that visually match the
11
+ # macOS system fonts (Helvetica → TeX Gyre Heros, SF Pro → Inter, etc.).
12
+ # 2. Copies the 40-macos-aliases.conf into /etc/fonts/conf.d/ so fontconfig
13
+ # remaps macOS family names to the bundled clones.
14
+ # 3. Runs fc-cache to rebuild the system font cache so Skia (Chromium's
15
+ # font subsystem) sees the aliases immediately.
16
+ #
17
+ # Verify post-install with: fc-match Helvetica → expect "qhvr.otf: ..."
18
+ # (TeX Gyre Heros), NOT "DejaVuSans.ttf".
19
+
20
+ set -euo pipefail
21
+
22
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
23
+ SKIP_CACHE=0
24
+ for arg in "$@"; do
25
+ case "$arg" in
26
+ --no-cache) SKIP_CACHE=1 ;;
27
+ esac
28
+ done
29
+
30
+ # Sanity: must be Debian/Ubuntu-flavored. RHEL/Alpine need a different package set.
31
+ if ! command -v apt-get >/dev/null 2>&1; then
32
+ echo "[macos-bundle] ERROR: apt-get not found — this script targets Debian/Ubuntu." >&2
33
+ echo "[macos-bundle] On other distros, install equivalent packages manually and copy" >&2
34
+ echo "[macos-bundle] 40-macos-aliases.conf into your fontconfig conf.d directory." >&2
35
+ exit 1
36
+ fi
37
+
38
+ # Package list. Most are present in Ubuntu 22.04+ default repos; texlive-fonts
39
+ # packages provide TeX Gyre. We deliberately do not install *-extra packages —
40
+ # every entry is a direct dependency of the alias chain in 40-macos-aliases.conf.
41
+ FONT_PACKAGES=(
42
+ fonts-texgyre # TeX Gyre Heros (Helvetica), Pagella (Palatino), Bonum (Bookman)
43
+ fonts-croscore # Arimo (Arial), Tinos (Times), Cousine (Courier) — Apache 2.0
44
+ fonts-inter # Inter — SF Pro look-alike (OFL)
45
+ fonts-jetbrains-mono # JetBrains Mono — SF Mono replacement (Apache 2.0)
46
+ fonts-urw-base35 # Nimbus Sans/Roman/Mono PS, P052, URW Gothic, URW Bookman
47
+ fonts-noto-core # Noto Sans / Noto Serif (broad Latin coverage)
48
+ fonts-noto-cjk # CJK glyph coverage for Apple SD Gothic Neo / Hiragino / PingFang
49
+ fonts-noto-color-emoji # Apple Color Emoji replacement
50
+ fonts-symbola # Apple Symbols replacement
51
+ fonts-liberation # Liberation Sans/Mono/Serif (cross-platform staple)
52
+ fonts-dejavu-core # DejaVu Sans / DejaVu Sans Mono (Menlo / Lucida Grande)
53
+ fontconfig # provides fc-cache, fc-match
54
+ )
55
+
56
+ echo "[macos-bundle] Installing $((${#FONT_PACKAGES[@]})) font packages via apt-get…"
57
+ export DEBIAN_FRONTEND=noninteractive
58
+ apt-get update -qq
59
+ apt-get install -y --no-install-recommends "${FONT_PACKAGES[@]}"
60
+
61
+ # Drop the alias config into fontconfig's per-system conf.d. The "40-" prefix
62
+ # places these aliases AFTER built-in family resolutions (10-/30-) but BEFORE
63
+ # user customizations (90-).
64
+ DEST_CONF="/etc/fonts/conf.d/40-macos-aliases.conf"
65
+ echo "[macos-bundle] Installing fontconfig aliases → $DEST_CONF"
66
+ install -m 0644 "$SCRIPT_DIR/40-macos-aliases.conf" "$DEST_CONF"
67
+
68
+ if [[ "$SKIP_CACHE" -eq 0 ]]; then
69
+ echo "[macos-bundle] Rebuilding system font cache…"
70
+ fc-cache -f -v >/dev/null
71
+ else
72
+ echo "[macos-bundle] Skipping fc-cache rebuild (--no-cache)"
73
+ fi
74
+
75
+ # Self-check: pick a few high-leverage aliases and confirm the resolution
76
+ # returns the bundled clone, not a Linux substitute.
77
+ echo "[macos-bundle] Verification:"
78
+ for family in "Helvetica" "Helvetica Neue" "Times" "SF Pro" "SF Mono" "Apple Color Emoji"; do
79
+ resolved="$(fc-match "$family" 2>/dev/null || echo 'fc-match unavailable')"
80
+ echo " $family → $resolved"
81
+ done
82
+
83
+ echo "[macos-bundle] Done."
@@ -1 +1 @@
1
- {"version":3,"file":"browser-controller.d.ts","sourceRoot":"","sources":["../src/browser-controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAc,MAAM,SAAS,CAAC;AAGxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIhE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC;AAEpC,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,iBAAiB,CAC/D,WAAW,EAAE,6CAA6C;AAC1D,oBAAoB,EAAE,gBAAgB;AACtC,YAAY,EAAE,4BAA4B;AAC1C,EAAE,EAAE,0DAA0D;AAC9D,aAAa,CAChB;IACG,OAAO,CAAC,MAAM,CAAC,CAAa;IAC5B,OAAO,CAAC,iBAAiB,CAAK;IAC9B,OAAO,CAAC,qBAAqB,CAAS;IACtC,OAAO,CAAC,SAAS,CAAS;IAEpB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BjC;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IAiBjC;;;OAGG;YACW,iBAAiB;IAqC/B;;;OAGG;cACa,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAiCvC;;;OAGG;cACa,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBtC;;;OAGG;cACa,QAAQ,CAAC,UAAU,SAAI,GAAG,OAAO,CAAC,aAAa,CAAC;YAqDlD,yBAAyB;IAgOvC;;;OAGG;cACa,WAAW,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAQlF;;;OAGG;cACa,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAQ1D,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,YAAY,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI5G"}
1
+ {"version":3,"file":"browser-controller.d.ts","sourceRoot":"","sources":["../src/browser-controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAc,MAAM,SAAS,CAAC;AAGxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIhE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC;AAEpC,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,iBAAiB,CAC/D,WAAW,EAAE,6CAA6C;AAC1D,oBAAoB,EAAE,gBAAgB;AACtC,YAAY,EAAE,4BAA4B;AAC1C,EAAE,EAAE,0DAA0D;AAC9D,aAAa,CAChB;IACG,OAAO,CAAC,MAAM,CAAC,CAAa;IAC5B,OAAO,CAAC,iBAAiB,CAAK;IAC9B,OAAO,CAAC,qBAAqB,CAAS;IACtC,OAAO,CAAC,SAAS,CAAS;IAEpB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BjC;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IAiBjC;;;OAGG;YACW,iBAAiB;IAqC/B;;;OAGG;cACa,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAiCvC;;;OAGG;cACa,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBtC;;;OAGG;cACa,QAAQ,CAAC,UAAU,SAAI,GAAG,OAAO,CAAC,aAAa,CAAC;YAqDlD,yBAAyB;IAuOvC;;;OAGG;cACa,WAAW,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAQlF;;;OAGG;cACa,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAQ1D,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,YAAY,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI5G"}
@@ -241,9 +241,16 @@ export default class CDPBrowserController extends BrowserController {
241
241
  return 'linux';
242
242
  return 'windows';
243
243
  })();
244
+ // Mirror the seed-source contract from browser-plugin.ts:405. Production
245
+ // path: extract `session-X` from the proxy URL. Test/A-B path: read
246
+ // `fingerprintOptions.seedKey` so harvest comparisons across hosts (Mac
247
+ // vs Linux Docker) hit the SAME bundled profile without needing a fake
248
+ // proxy.
244
249
  const proxySeedKey = this.launchContext.proxyUrl
245
250
  ? (this.launchContext.proxyUrl.match(/session-([^,&]+)/i)?.[1] ?? null)
246
- : null;
251
+ : (typeof _fpOpts?.seedKey === 'string'
252
+ ? _fpOpts.seedKey
253
+ : null);
247
254
  fingerprint = await generateNonApifyFingerprint({
248
255
  platform: userPlatform,
249
256
  os: osHint,