hyperframes 0.8.143 → 0.8.145
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 +3 -2
- package/dist/{add-Q5EYDUAY.js → add-B6OUH46W.js} +12 -12
- package/dist/{animatedGifPrep-H2DUQEZ3.js → animatedGifPrep-MIWRDJIO.js} +7 -7
- package/dist/{asset-C7JBYYX4.js → asset-XJ2B2PU3.js} +2 -2
- package/dist/{assetCataloger-FRO4G6OU.js → assetCataloger-A5ZLSCMZ.js} +3 -3
- package/dist/{auth-FRWLCO36.js → auth-5HOVCZMV.js} +1 -1
- package/dist/{autoUpdate-E4OZXQK6.js → autoUpdate-WVNL5K3D.js} +2 -2
- package/dist/{backgroundChecks-FSUVHN5L.js → backgroundChecks-IGF54SFH.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-4U73BYTU.js → batchRender-T6JEGCQV.js} +4 -4
- package/dist/{beats-U6KJWF35.js → beats-37T6Y6QP.js} +13 -13
- package/dist/{benchmark-5ONT7V7B.js → benchmark-ZVVLOWPP.js} +9 -9
- package/dist/{browser-R4DU46IE.js → browser-4SSJOLH4.js} +39 -55
- package/dist/{bundleWithLocalizedFonts-VH55VOAL.js → bundleWithLocalizedFonts-XWK423QP.js} +2 -2
- package/dist/{capture-OGQAEYKO.js → capture-2SF7YP57.js} +2 -2
- package/dist/{capture-26G2DPSI.js → capture-KZXOPBMO.js} +18 -18
- package/dist/{catalog-RKORTIUE.js → catalog-NLD4A2C6.js} +12 -12
- package/dist/{catch-up-4OBERRQO.js → catch-up-4BSRN6IR.js} +4 -4
- package/dist/{check-P2XDN57S.js → check-IA44QQWM.js} +66 -55
- package/dist/{checkBrowser-NTGJGAEA.js → checkBrowser-VM35KZMW.js} +81 -30
- package/dist/{chunk-LVX6NK36.js → chunk-3IBMBNYY.js} +1 -1
- package/dist/{chunk-6XMFEICO.js → chunk-3KU3PFDW.js} +77 -92
- package/dist/{chunk-PJU63L6W.js → chunk-4ORLNTET.js} +1 -1
- package/dist/{chunk-DF2BHILQ.js → chunk-4QWD6JYN.js} +3 -3
- package/dist/{chunk-BT27OYYX.js → chunk-5NRXZGKK.js} +18 -12
- package/dist/{chunk-UM2GRYM3.js → chunk-5WVW7P23.js} +3 -3
- package/dist/{chunk-I7QGQAZM.js → chunk-6LGNTUZN.js} +7 -7
- package/dist/{chunk-LAOCA3MQ.js → chunk-A4Q7W4LV.js} +13 -8
- package/dist/{chunk-4PFZPP2N.js → chunk-A6S35NYA.js} +54 -16
- package/dist/{chunk-QRKLPWEX.js → chunk-ADF3X6GM.js} +11 -2
- package/dist/chunk-AUWHD7RA.js +3753 -0
- package/dist/{chunk-W35EKBS6.js → chunk-BFACGEII.js} +2 -2
- package/dist/{chunk-HW4AKJ5F.js → chunk-BIAC7IJT.js} +1 -1
- package/dist/{chunk-ZLW2V65P.js → chunk-BSQ7XANM.js} +3 -2
- package/dist/{chunk-LCSMOLGX.js → chunk-BYSBRF24.js} +69 -8
- package/dist/{chunk-2LBBHMKT.js → chunk-CFUXNBWH.js} +1 -1
- package/dist/{chunk-BFDJ63J5.js → chunk-DDIVWXN7.js} +1 -1
- package/dist/{chunk-KOEWEFHK.js → chunk-DIRJ322I.js} +10 -5
- package/dist/{chunk-FVYXDXEV.js → chunk-DWUKJQTO.js} +2 -2
- package/dist/{chunk-POLR33RB.js → chunk-EPE2HRJK.js} +15 -17
- package/dist/{chunk-UICWP23D.js → chunk-FBCULCAL.js} +3 -3
- package/dist/{chunk-F26LCYRY.js → chunk-FDT6KQV4.js} +142 -81
- package/dist/{chunk-P7THMINS.js → chunk-FXJJCPPB.js} +1 -1
- package/dist/{chunk-BYK73CR7.js → chunk-GBGJ7A3D.js} +5 -5
- package/dist/{sherpa-LVIUEAGF.js → chunk-GEMJYBRU.js} +11 -45
- package/dist/{chunk-KO5QBV73.js → chunk-GMAJB2P6.js} +1 -1
- package/dist/{chunk-KQLGTGE5.js → chunk-GRY3PN3K.js} +2 -2
- package/dist/{chunk-7UYBQ6NF.js → chunk-GXJEGZL2.js} +30 -20
- package/dist/{chunk-KJJLA674.js → chunk-GZVP4TWN.js} +1 -46
- package/dist/{chunk-QVYVUCWD.js → chunk-HB7FJOY4.js} +1 -1
- package/dist/{chunk-QFN7NVWM.js → chunk-ICKDMTLA.js} +1 -1
- package/dist/{chunk-XONFUK3M.js → chunk-IEIJRMLZ.js} +47 -35
- package/dist/{chunk-PAGIICKN.js → chunk-IHTRYDFN.js} +1 -1
- package/dist/chunk-IR35BCLK.js +13 -0
- package/dist/{chunk-KDPYVTEU.js → chunk-KBB4RG6F.js} +6 -1
- package/dist/{chunk-ZQQ3SEIE.js → chunk-KIFHYXPB.js} +99 -31
- package/dist/{chunk-TAMQYQGJ.js → chunk-LAFJSYDL.js} +1 -1
- package/dist/{chunk-U3X3TPBW.js → chunk-MAYCCGMQ.js} +11 -2
- package/dist/{chunk-HC7EVDEL.js → chunk-OB5MJR4W.js} +1 -1
- package/dist/{chunk-N3DQEVSI.js → chunk-OTHDVXOJ.js} +8 -5
- package/dist/{chunk-Y6QL2LGO.js → chunk-PLR7Z6TC.js} +1 -1
- package/dist/{chunk-OBXQRJWQ.js → chunk-QATWIE4K.js} +1 -1
- package/dist/{chunk-HLYOEIWM.js → chunk-QLSM7K5S.js} +2 -2
- package/dist/{chunk-LW6HO6U3.js → chunk-R42WWQVB.js} +1 -1
- package/dist/{chunk-HMT2RPZU.js → chunk-U5QY7KTN.js} +13 -9
- package/dist/chunk-UPFUC4DB.js +136 -0
- package/dist/{chunk-33RZPZ4K.js → chunk-UXO2L7HJ.js} +366 -156
- package/dist/{chunk-GNBGPUJ7.js → chunk-VHFEMFYL.js} +3 -3
- package/dist/{chunk-4M4EC7JX.js → chunk-VRW6EBHV.js} +12 -1
- package/dist/{chunk-VIVBA6E6.js → chunk-XBX4QJP7.js} +1 -1
- package/dist/{chunk-CLOH4LIB.js → chunk-XIHCMVMG.js} +2 -2
- package/dist/{chunk-TVCRUG2S.js → chunk-ZEUONDQG.js} +1 -1
- package/dist/{chunk-OSSHSIMD.js → chunk-ZF7SXQJ7.js} +1 -1
- package/dist/{chunk-5FISWJ37.js → chunk-ZIYZ77MR.js} +4 -4
- package/dist/{chunk-3NE7ZYU2.js → chunk-ZSVUAVMT.js} +3 -3
- package/dist/{clean-YHGPY33K.js → clean-RDKJB5FK.js} +18 -18
- package/dist/cli.js +68 -56
- package/dist/{cloud-DOFI5ISR.js → cloud-QVPVVNCW.js} +4 -4
- package/dist/{cloudrun-KTZ4XDHL.js → cloudrun-3RE2UCQG.js} +4 -4
- package/dist/{compare-SMMIZN2C.js → compare-LEDOY7MO.js} +25 -25
- package/dist/{compiler-TEXQWW6N.js → compiler-F54OZZPM.js} +10 -4
- package/dist/{component-B3GCNGSS.js → component-N42M67WY.js} +3 -3
- package/dist/{compositions-OQNZZTKF.js → compositions-VB2J2LZI.js} +11 -11
- package/dist/{delete-EL5LVSEP.js → delete-Q6RWMJ4Z.js} +2 -2
- package/dist/{dist-5UVIRMSM.js → dist-KDJTFJHA.js} +2 -2
- package/dist/{dist-XN234YFQ.js → dist-Q4BI5A73.js} +4 -4
- package/dist/{doctor-UOL3OI2A.js → doctor-JMMUHDRV.js} +13 -13
- package/dist/{events-K2DB2PBC.js → events-6ZBSIBE5.js} +2 -2
- package/dist/{events-NIZBS6S7.js → events-RGUAHIBW.js} +3 -3
- package/dist/{feedback-QMP4E6L7.js → feedback-FIID6MZW.js} +9 -9
- package/dist/{ffmpeg-QIUFEFTY.js → ffmpeg-T5SH2EFJ.js} +3 -2
- package/dist/{figma-2AUJRNVC.js → figma-BL3JJC36.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -9
- package/dist/{get-P5NC7SRM.js → get-P46GS7S6.js} +2 -2
- package/dist/{gpuPolicy-7N5MCE2G.js → gpuPolicy-AQ2BPLBK.js} +11 -9
- package/dist/{grade-compare-HV5AFZ6P.js → grade-compare-GDCWU7ZZ.js} +27 -27
- package/dist/{help-3TSTXBLN.js → help-HJR3RWFG.js} +2 -2
- package/dist/{history-D65XFJ6D.js → history-GGO5AWJB.js} +5 -5
- package/dist/hyperframe-runtime.js +59 -59
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +59 -59
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-TXV7MLFO.js → info-3GFWUBJC.js} +8 -8
- package/dist/{init-OSDMJZJV.js → init-36OPU2ZG.js} +35 -36
- package/dist/{inspect-RQQSAYIJ.js → inspect-F2HEL5ON.js} +26 -26
- package/dist/{installer-CDOB32HE.js → installer-NI6P6GC4.js} +5 -5
- package/dist/{keyframes-V75Q6GRM.js → keyframes-7OY3LMAZ.js} +6 -6
- package/dist/{lambda-RODV4RCX.js → lambda-6GJIWNJ3.js} +5 -5
- package/dist/{layout-IZAI5SFC.js → layout-FTMLNL5A.js} +26 -26
- package/dist/{lint-PLXOXY5R.js → lint-U6POHUON.js} +8 -8
- package/dist/{lintProject-OQ6H6XBR.js → lintProject-UBZ3TDHU.js} +2 -2
- package/dist/{list-BQBPNKDZ.js → list-IP5KI5Q2.js} +2 -2
- package/dist/{login-NP6F4FHC.js → login-4VWTVPHG.js} +4 -4
- package/dist/{manager-CT3D67CG.js → manager-BPSR6D3V.js} +2 -2
- package/dist/{manager-GXYF4AVO.js → manager-YKMHR6LN.js} +8 -5
- package/dist/{media-treatment-PXGMZ4A4.js → media-treatment-XGV44AGV.js} +16 -13
- package/dist/{models-CEZM6XZ7.js → models-UCXB6UR5.js} +59 -19
- package/dist/{motionShot-R4GHYWYM.js → motionShot-WPVNBXKA.js} +21 -22
- package/dist/{normalize-H6KUHHEI.js → normalize-U3SL5VG3.js} +2 -2
- package/dist/{normalize-audio-MQ7NFCOV.js → normalize-audio-TYJ3UEHO.js} +6 -6
- package/dist/{open-AKQTGNXF.js → open-HENOLVB2.js} +4 -4
- package/dist/parakeetRunner-VFQ6WFTD.js +67 -0
- package/dist/{pipeline-SYJYP2RM.js → pipeline-6WPSC3H4.js} +10 -9
- package/dist/{play-NBH4B7PL.js → play-OI53WNUM.js} +19 -19
- package/dist/{preflight-Y5DN5D37.js → preflight-B4AFK3RG.js} +4 -4
- package/dist/{present-XAX55CFS.js → present-NGMEQ4NO.js} +15 -15
- package/dist/{preview-OLANKNFA.js → preview-VT2HWRWZ.js} +19 -19
- package/dist/{producer-Q6YNZZUJ.js → producer-7TYEAUF7.js} +1 -1
- package/dist/{projectConfig-EM26P45P.js → projectConfig-B2AF5DXY.js} +7 -7
- package/dist/{publication-OXWJZKSX.js → publication-2PANQVC6.js} +3 -3
- package/dist/{publish-4VBWP2UB.js → publish-O5OL42BG.js} +11 -11
- package/dist/{remove-background-REB7427G.js → remove-background-T2JM6UVP.js} +11 -10
- package/dist/{render-K25YOG3M.js → render-OLPKOJRU.js} +11 -11
- package/dist/{render-3CVZ2SZG.js → render-W7OFXDOJ.js} +4 -4
- package/dist/{render-TSE75QUL.js → render-Z253WHBK.js} +26 -26
- package/dist/{render-batch-GGUOK3DS.js → render-batch-46IIBFKL.js} +4 -4
- package/dist/{renderCancellation-PZRWB53I.js → renderCancellation-QTZOCDJ2.js} +10 -9
- package/dist/renderSetupWorker.js +32 -44
- package/dist/{resolver-S5VK6UCB.js → resolver-J2PL5FVJ.js} +5 -5
- package/dist/sherpa-ZF42V3RN.js +75 -0
- package/dist/sherpaWorker.js +2 -1
- package/dist/skills/hyperframes/scripts/lib/frame-packets-core.mjs +2 -20
- package/dist/skills/hyperframes/scripts/lib/main-module.mjs +13 -0
- package/dist/skills/hyperframes/scripts/lib/main-module.test.mjs +51 -0
- package/dist/skills/hyperframes/scripts/plugin-cli.mjs +4 -3
- package/dist/skills/hyperframes/scripts/plugin-cli.test.mjs +5 -1
- package/dist/skills/hyperframes-cli/SKILL.md +2 -0
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
- package/dist/skills/media-use/audio/scripts/heygen-voice.mjs +2 -2
- package/dist/skills/media-use/audio/scripts/lib/main-module.mjs +13 -0
- package/dist/skills/media-use/scripts/lib/cube-validate.mjs +2 -3
- package/dist/skills/media-use/scripts/lib/main-module.mjs +13 -0
- package/dist/{skills-I65FU5HD.js → skills-ACDOO3PX.js} +7 -7
- package/dist/{skillsUpdateCheck-J57RNNIV.js → skillsUpdateCheck-L5OXVVPU.js} +3 -3
- package/dist/{snapshot-YROOGY22.js → snapshot-UUVNZOW5.js} +28 -28
- package/dist/{src-JO5JOV7Y.js → src-BSLKXEGX.js} +10 -6
- package/dist/{src-X426BZAG.js → src-KS3AWFGT.js} +8 -8
- package/dist/{staticProjectServer-5VMBS262.js → staticProjectServer-2TTVGPQH.js} +15 -15
- package/dist/studio/assets/{hyperframes-player-BXSuksFh.js → hyperframes-player-DZ5JrMDg.js} +3 -3
- package/dist/studio/assets/{index-FgyO_5Kv.js → index-BOs6C0aZ.js} +1 -1
- package/dist/studio/assets/{index-BgOVCqjo.js → index-BqFRhNZa.js} +1 -1
- package/dist/studio/assets/{index-J7jpL4pj.js → index-D8W0a0Z9.js} +149 -149
- package/dist/studio/{chunk-TFLU2MGI.js → chunk-6JY3MTIX.js} +108 -2
- package/dist/studio/{chunk-H2DUOXTF.js → chunk-NZPJUZKT.js} +100 -4
- package/dist/studio/{chunk-UYWON5AX.js → chunk-TP6D3U37.js} +7 -100
- package/dist/studio/{chunk-LOVBLSMR.js → chunk-Y2OHHNM2.js} +35 -19
- package/dist/studio/{domEditingLayers-KBTPQKGA.js → domEditingLayers-PTP2ICGM.js} +3 -3
- package/dist/studio/index.d.ts +8 -5
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +545 -495
- package/dist/studio/player.js +3 -3
- package/dist/studio/ui.d.ts +4 -5
- package/dist/studio/ui.js +1 -1
- package/dist/{studio-api-VRBZUGAE.js → studio-api-WYWF7XRC.js} +9 -9
- package/dist/{studioServer-DBNKZ6I6.js → studioServer-3FG4YTP7.js} +72 -54
- package/dist/{telemetry-CXAX3TO3.js → telemetry-PAOOB4T4.js} +3 -3
- package/dist/{timeline-VQ34WH7J.js → timeline-JIIJKKPC.js} +69 -47
- package/dist/{tokens-62R7VFAZ.js → tokens-3QRAM75Z.js} +2 -2
- package/dist/{transcribe-XOHPPL2O.js → transcribe-QSBP5MUG.js} +115 -51
- package/dist/{transcribe-7KR7IPJA.js → transcribe-SZB6UMXE.js} +14 -12
- package/dist/{tts-MUV42JXT.js → tts-B6AHFQEO.js} +1 -1
- package/dist/{updateCheck-POYNH3B5.js → updateCheck-V3DSB26K.js} +2 -2
- package/dist/{upgrade-NBNOT7J2.js → upgrade-L5GISOEV.js} +2 -2
- package/dist/{urlDownloader-3NS63A7B.js → urlDownloader-52FERT4X.js} +6 -6
- package/dist/{validate-Y2QDHAEP.js → validate-HVVLX7KO.js} +20 -20
- package/dist/{video-SJDMTSTL.js → video-MEOWRMFG.js} +7 -7
- package/package.json +1 -1
- package/dist/chunk-6TPZSTCL.js +0 -3681
- package/dist/studio/chunk-EEXSYY5F.js.map +0 -1
- package/dist/studio/chunk-H2DUOXTF.js.map +0 -1
- package/dist/studio/chunk-LOVBLSMR.js.map +0 -1
- package/dist/studio/chunk-PZ5AY32C.js.map +0 -1
- package/dist/studio/chunk-TFLU2MGI.js.map +0 -1
- package/dist/studio/chunk-UYWON5AX.js.map +0 -1
- package/dist/studio/domEditingLayers-KBTPQKGA.js.map +0 -1
- package/dist/studio/index.css.map +0 -1
- package/dist/studio/index.js.map +0 -1
- package/dist/studio/player.js.map +0 -1
- package/dist/studio/styles/tailwind-preset.js.map +0 -1
- package/dist/studio/ui.js.map +0 -1
- package/dist/{screenshotCapture-TEUIWXWN.js → screenshotCapture-3JXXUZND.js} +3 -3
- package/dist/{synthesize-C3IWDAXF.js → synthesize-UCI4X5O7.js} +4 -4
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
runRenderSetupWorker,
|
|
9
9
|
terminateProcessTree
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BYSBRF24.js";
|
|
11
11
|
|
|
12
12
|
// src/utils/orphanCleanup.ts
|
|
13
13
|
import { execFileSync } from "child_process";
|
|
@@ -62,17 +62,19 @@ function processIdentity(pid) {
|
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
+
var holdsReusedPid = (parent, child) => parent.startedAt !== void 0 && child?.startedAt !== void 0 && parent.startedAt > child.startedAt;
|
|
65
66
|
function recordsToAncestors(pid, records) {
|
|
66
67
|
const byPid = new Map(records.map((record) => [record.pid, record]));
|
|
67
68
|
const ancestors = [];
|
|
68
69
|
const visited = /* @__PURE__ */ new Set([pid]);
|
|
69
70
|
let current = pid;
|
|
70
71
|
for (let depth = 0; depth < 64; depth++) {
|
|
71
|
-
const
|
|
72
|
+
const child = byPid.get(current);
|
|
73
|
+
const parent = child?.parentPid;
|
|
72
74
|
if (parent === void 0 || parent <= 1 || visited.has(parent)) break;
|
|
73
75
|
visited.add(parent);
|
|
74
76
|
const ancestor = byPid.get(parent);
|
|
75
|
-
if (!ancestor) break;
|
|
77
|
+
if (!ancestor || holdsReusedPid(ancestor, child)) break;
|
|
76
78
|
ancestors.push({ pid: ancestor.pid, identity: ancestor.identity });
|
|
77
79
|
current = parent;
|
|
78
80
|
}
|
|
@@ -92,11 +94,14 @@ function processAncestorSnapshot(pid) {
|
|
|
92
94
|
],
|
|
93
95
|
{ encoding: "utf8", timeout: 2e3, stdio: ["pipe", "pipe", "ignore"], windowsHide: true }
|
|
94
96
|
);
|
|
95
|
-
const records2 = output2.split(/\r?\n/).map((line) => line.trim().split(/\s+/)).map(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
const records2 = output2.split(/\r?\n/).map((line) => line.trim().split(/\s+/)).map(
|
|
98
|
+
([processId, parentProcessId, creationDate]) => ({
|
|
99
|
+
pid: Number(processId),
|
|
100
|
+
parentPid: Number(parentProcessId),
|
|
101
|
+
identity: creationDate ? `windows:${creationDate}` : "",
|
|
102
|
+
startedAt: creationDate && /^\d+$/.test(creationDate) ? BigInt(creationDate) : void 0
|
|
103
|
+
})
|
|
104
|
+
).filter(
|
|
100
105
|
(record) => Number.isInteger(record.pid) && record.pid > 0 && Number.isInteger(record.parentPid) && record.parentPid > 0 && record.identity !== ""
|
|
101
106
|
);
|
|
102
107
|
return recordsToAncestors(pid, records2);
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
runRenderSetupWorker
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BYSBRF24.js";
|
|
10
10
|
import {
|
|
11
11
|
chromeMajorCeiling,
|
|
12
12
|
exceedsChromeCeiling
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
writeFileSync
|
|
31
31
|
} from "fs";
|
|
32
32
|
import { homedir } from "os";
|
|
33
|
+
import { debuglog } from "util";
|
|
33
34
|
import { basename, dirname, join, relative } from "path";
|
|
34
35
|
async function loadPuppeteerBrowsers() {
|
|
35
36
|
try {
|
|
@@ -234,7 +235,7 @@ async function findFromHyperframesCache() {
|
|
|
234
235
|
const match = installed.find(
|
|
235
236
|
(b) => b.browser === Browser.CHROMEHEADLESSSHELL && b.buildId === managedChromeVersion() && b.platform === hostPlatform
|
|
236
237
|
);
|
|
237
|
-
if (match &&
|
|
238
|
+
if (match && isUsableExecutable(match.executablePath)) {
|
|
238
239
|
return { result: { executablePath: match.executablePath, source: "cache" } };
|
|
239
240
|
}
|
|
240
241
|
if (match) {
|
|
@@ -301,7 +302,7 @@ function findFromPuppeteerCache() {
|
|
|
301
302
|
for (const version of versions) {
|
|
302
303
|
if (exceedsChromeCeiling(version, ceiling)) continue;
|
|
303
304
|
const binary = join(PUPPETEER_CACHE_DIR, version, ...executable);
|
|
304
|
-
if (
|
|
305
|
+
if (isUsableExecutable(binary)) {
|
|
305
306
|
return { executablePath: binary, source: "cache" };
|
|
306
307
|
}
|
|
307
308
|
}
|
|
@@ -345,14 +346,14 @@ async function findBrowser() {
|
|
|
345
346
|
if (fromCache.result) return fromCache.result;
|
|
346
347
|
if (fromCache.staleHyperframesCachePath) {
|
|
347
348
|
console.warn(
|
|
348
|
-
`[browser] Cached binary missing at ${fromCache.staleHyperframesCachePath} \u2014 re-downloading...`
|
|
349
|
+
`[browser] Cached binary unusable (missing, empty or not a file) at ${fromCache.staleHyperframesCachePath} \u2014 re-downloading...`
|
|
349
350
|
);
|
|
350
351
|
try {
|
|
351
352
|
return await withInstallLock(() => downloadBrowser());
|
|
352
353
|
} catch (err) {
|
|
353
354
|
const cause = normalizeErrorMessage(err);
|
|
354
355
|
throw new Error(
|
|
355
|
-
`Cached Chrome binary was
|
|
356
|
+
`Cached Chrome binary was unusable at ${fromCache.staleHyperframesCachePath}, and re-download failed: ${cause}
|
|
356
357
|
Run \`hyperframes browser ensure --force\` to re-download.`
|
|
357
358
|
);
|
|
358
359
|
}
|
|
@@ -414,7 +415,7 @@ async function ensureBrowserInCurrentProcess(options) {
|
|
|
414
415
|
if (fromCache.result) return fromCache.result;
|
|
415
416
|
if (fromCache.staleHyperframesCachePath) {
|
|
416
417
|
console.warn(
|
|
417
|
-
`[browser] Cached binary missing at ${fromCache.staleHyperframesCachePath} \u2014 re-downloading...`
|
|
418
|
+
`[browser] Cached binary unusable (missing, empty or not a file) at ${fromCache.staleHyperframesCachePath} \u2014 re-downloading...`
|
|
418
419
|
);
|
|
419
420
|
return withInstallLock(() => downloadBrowser(options));
|
|
420
421
|
}
|
|
@@ -478,10 +479,11 @@ function browserPathHintForPlatform() {
|
|
|
478
479
|
}
|
|
479
480
|
return "/usr/bin/google-chrome";
|
|
480
481
|
}
|
|
481
|
-
function wrapDownloadFailureWithBrowserPathHint(cause) {
|
|
482
|
+
function wrapDownloadFailureWithBrowserPathHint(cause, unzipLog) {
|
|
482
483
|
const original = normalizeErrorMessage(cause);
|
|
484
|
+
const unzipErrors = unzipLog.length > 0 ? ` Unzip errors: ${unzipLog.join("; ")}` : "";
|
|
483
485
|
const example = browserPathHintForPlatform();
|
|
484
|
-
const message = `Failed to
|
|
486
|
+
const message = `Failed to install chrome-headless-shell ${managedChromeVersion()}: ${original}${unzipErrors}
|
|
485
487
|
|
|
486
488
|
Point hyperframes at an already-installed Chrome/Chromium instead:
|
|
487
489
|
|
|
@@ -502,13 +504,27 @@ async function downloadBrowser(options) {
|
|
|
502
504
|
removeInstallLeftovers();
|
|
503
505
|
const stagingDir = join(CACHE_ROOT_DIR, `${STAGING_PREFIX}${randomUUID()}`);
|
|
504
506
|
const clearStaging = () => rmSync(stagingDir, { recursive: true, force: true });
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
507
|
+
let unzipLog = [];
|
|
508
|
+
const runInstall = () => {
|
|
509
|
+
unzipLog = [];
|
|
510
|
+
return install({
|
|
511
|
+
cacheDir: stagingDir,
|
|
512
|
+
browser: Browser.CHROMEHEADLESSSHELL,
|
|
513
|
+
buildId: managedChromeVersion(),
|
|
514
|
+
platform,
|
|
515
|
+
downloadProgressCallback: options?.onProgress,
|
|
516
|
+
logger: (prefix) => {
|
|
517
|
+
const debug = debuglog(prefix);
|
|
518
|
+
const isUnzip = prefix === "puppeteer:browsers:fileUtil";
|
|
519
|
+
if (!isUnzip && !debug.enabled) return void 0;
|
|
520
|
+
return (...args) => {
|
|
521
|
+
const line = args.join(" ");
|
|
522
|
+
if (isUnzip) unzipLog.push(line);
|
|
523
|
+
if (debug.enabled) debug(line);
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
};
|
|
512
528
|
try {
|
|
513
529
|
const staged = await installWithCorruptArchiveRecovery(
|
|
514
530
|
runInstall,
|
|
@@ -517,13 +533,35 @@ async function downloadBrowser(options) {
|
|
|
517
533
|
`[hyperframes] Downloaded browser archive was corrupt (${normalizeErrorMessage(err)}); re-downloading.`
|
|
518
534
|
)
|
|
519
535
|
);
|
|
536
|
+
assertExecutableUnpacked(stagingDir, staged.executablePath);
|
|
537
|
+
unzipLog = [];
|
|
520
538
|
return { executablePath: moveStagedInstallIntoCache(stagingDir, staged), source: "download" };
|
|
521
539
|
} catch (err) {
|
|
522
|
-
throw wrapDownloadFailureWithBrowserPathHint(err);
|
|
540
|
+
throw wrapDownloadFailureWithBrowserPathHint(err, unzipLog);
|
|
523
541
|
} finally {
|
|
524
542
|
clearStaging();
|
|
525
543
|
}
|
|
526
544
|
}
|
|
545
|
+
function executableState(path) {
|
|
546
|
+
const stat = statSync(path, { throwIfNoEntry: false });
|
|
547
|
+
if (!stat) return "is missing";
|
|
548
|
+
if (!stat.isFile()) return "is not a file";
|
|
549
|
+
return stat.size > 0 ? "usable" : "is empty";
|
|
550
|
+
}
|
|
551
|
+
function isUsableExecutable(path) {
|
|
552
|
+
try {
|
|
553
|
+
return executableState(path) === "usable";
|
|
554
|
+
} catch {
|
|
555
|
+
return false;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
function assertExecutableUnpacked(stagingDir, executablePath) {
|
|
559
|
+
const state = executableState(executablePath);
|
|
560
|
+
if (state === "usable") return;
|
|
561
|
+
throw new Error(
|
|
562
|
+
`the archive downloaded, but ${relative(stagingDir, executablePath)} ${state} after unzipping.`
|
|
563
|
+
);
|
|
564
|
+
}
|
|
527
565
|
function moveStagedInstallIntoCache(stagingDir, staged) {
|
|
528
566
|
const target = join(CACHE_DIR, relative(stagingDir, staged.path));
|
|
529
567
|
const aside = join(CACHE_ROOT_DIR, `${REPLACED_PREFIX}${randomUUID()}`);
|
|
@@ -4,6 +4,10 @@ import { dirname as __hf_dirname } from "node:path";
|
|
|
4
4
|
var require = __hf_createRequire(import.meta.url);
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
resolveConfig,
|
|
9
|
+
usesSoftwareWebGpu
|
|
10
|
+
} from "./chunk-UXO2L7HJ.js";
|
|
7
11
|
|
|
8
12
|
// src/browser/gpuPolicy.ts
|
|
9
13
|
function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCER_BROWSER_GPU_MODE) {
|
|
@@ -13,11 +17,16 @@ function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCE
|
|
|
13
17
|
return "auto";
|
|
14
18
|
}
|
|
15
19
|
async function resolveCaptureBrowserGpuMode(requestedMode, chromePath) {
|
|
16
|
-
const { resolveBrowserGpuMode } = await import("./src-
|
|
20
|
+
const { resolveBrowserGpuMode } = await import("./src-BSLKXEGX.js");
|
|
17
21
|
return resolveBrowserGpuMode(requestedMode, { chromePath });
|
|
18
22
|
}
|
|
23
|
+
function resolveLocalWebGpu(browserGpuMode, requiresWebGpu) {
|
|
24
|
+
const gpuConfig = { browserGpuMode, allowSoftwareWebGpu: resolveConfig().allowSoftwareWebGpu };
|
|
25
|
+
return { gpuConfig, softwareWebGpu: usesSoftwareWebGpu(requiresWebGpu, gpuConfig) };
|
|
26
|
+
}
|
|
19
27
|
|
|
20
28
|
export {
|
|
21
29
|
resolveLocalBrowserGpuMode,
|
|
22
|
-
resolveCaptureBrowserGpuMode
|
|
30
|
+
resolveCaptureBrowserGpuMode,
|
|
31
|
+
resolveLocalWebGpu
|
|
23
32
|
};
|