hyperframes 0.8.143 → 0.8.144
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/dist/{add-Q5EYDUAY.js → add-CWRTVGDB.js} +12 -12
- package/dist/{animatedGifPrep-H2DUQEZ3.js → animatedGifPrep-JTOHIWI4.js} +7 -7
- package/dist/{asset-C7JBYYX4.js → asset-KU2Z4UFM.js} +2 -2
- package/dist/{assetCataloger-FRO4G6OU.js → assetCataloger-3CS2P7PA.js} +3 -3
- package/dist/{auth-FRWLCO36.js → auth-IDSOIQWG.js} +1 -1
- package/dist/{autoUpdate-E4OZXQK6.js → autoUpdate-373B4BA2.js} +2 -2
- package/dist/{backgroundChecks-FSUVHN5L.js → backgroundChecks-53Q3NAMG.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-4U73BYTU.js → batchRender-UKZA6BME.js} +4 -4
- package/dist/{beats-U6KJWF35.js → beats-N5JGEOFR.js} +13 -13
- package/dist/{benchmark-5ONT7V7B.js → benchmark-CUN3LN4V.js} +9 -9
- package/dist/{browser-R4DU46IE.js → browser-NCZT5AP6.js} +39 -55
- package/dist/{bundleWithLocalizedFonts-VH55VOAL.js → bundleWithLocalizedFonts-FWC7PE2D.js} +2 -2
- package/dist/{capture-26G2DPSI.js → capture-QBLG3VJR.js} +18 -18
- package/dist/{capture-OGQAEYKO.js → capture-YLS32UHT.js} +2 -2
- package/dist/{catalog-RKORTIUE.js → catalog-HIWNAFHW.js} +12 -12
- package/dist/{catch-up-4OBERRQO.js → catch-up-HGS7KIAC.js} +4 -4
- package/dist/{check-P2XDN57S.js → check-FH6UYYLO.js} +66 -55
- package/dist/{checkBrowser-NTGJGAEA.js → checkBrowser-RNWNOMCZ.js} +81 -30
- package/dist/{chunk-LVX6NK36.js → chunk-2DA2BBNY.js} +1 -1
- package/dist/{chunk-4M4EC7JX.js → chunk-3VYNNWVA.js} +12 -1
- package/dist/{chunk-N3DQEVSI.js → chunk-3XTEXWNN.js} +8 -5
- package/dist/{chunk-KO5QBV73.js → chunk-4LAR447G.js} +1 -1
- package/dist/{chunk-W35EKBS6.js → chunk-4OC7MQNB.js} +2 -2
- package/dist/{chunk-CLOH4LIB.js → chunk-54QISXOC.js} +2 -2
- package/dist/{chunk-HC7EVDEL.js → chunk-5HJ343GH.js} +1 -1
- package/dist/{chunk-33RZPZ4K.js → chunk-5VMR4WBS.js} +271 -119
- package/dist/{chunk-PJU63L6W.js → chunk-5WADG7PR.js} +1 -1
- package/dist/{chunk-LW6HO6U3.js → chunk-7RAYSCYT.js} +1 -1
- package/dist/{chunk-QRKLPWEX.js → chunk-7SDCIWHQ.js} +11 -2
- package/dist/{chunk-LAOCA3MQ.js → chunk-A4Q7W4LV.js} +13 -8
- package/dist/{chunk-BT27OYYX.js → chunk-A53CBD24.js} +18 -12
- package/dist/{chunk-4PFZPP2N.js → chunk-A6S35NYA.js} +54 -16
- package/dist/{chunk-HW4AKJ5F.js → chunk-AUBOF2PN.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-BFDJ63J5.js → chunk-DDIVWXN7.js} +1 -1
- package/dist/{chunk-KOEWEFHK.js → chunk-DIRJ322I.js} +10 -5
- package/dist/{chunk-PAGIICKN.js → chunk-EX6C672Y.js} +1 -1
- package/dist/{chunk-6XMFEICO.js → chunk-F2SMS24Q.js} +34 -19
- package/dist/{chunk-QVYVUCWD.js → chunk-GEWKFRFI.js} +1 -1
- package/dist/{chunk-P7THMINS.js → chunk-GZM2EFOE.js} +1 -1
- package/dist/{chunk-KJJLA674.js → chunk-GZVP4TWN.js} +1 -46
- package/dist/{chunk-TAMQYQGJ.js → chunk-I5KY7EZP.js} +1 -1
- package/dist/{chunk-XONFUK3M.js → chunk-IEIJRMLZ.js} +47 -35
- package/dist/chunk-IR35BCLK.js +13 -0
- package/dist/{chunk-2LBBHMKT.js → chunk-JEHFZQYT.js} +1 -1
- package/dist/{chunk-KDPYVTEU.js → chunk-KBB4RG6F.js} +6 -1
- package/dist/{chunk-VIVBA6E6.js → chunk-KFKZ3ISO.js} +1 -1
- package/dist/{sherpa-LVIUEAGF.js → chunk-L5TUCXWR.js} +11 -45
- package/dist/{chunk-GNBGPUJ7.js → chunk-LC3RQURJ.js} +3 -3
- package/dist/{chunk-I7QGQAZM.js → chunk-LFX2HEYP.js} +7 -7
- package/dist/{chunk-U3X3TPBW.js → chunk-MAYCCGMQ.js} +11 -2
- package/dist/{chunk-UICWP23D.js → chunk-MXNDKDFT.js} +3 -3
- package/dist/{chunk-POLR33RB.js → chunk-NOPBBSLA.js} +15 -17
- package/dist/{chunk-DF2BHILQ.js → chunk-NV4RXIQ7.js} +3 -3
- package/dist/{chunk-KQLGTGE5.js → chunk-OIDN7G42.js} +2 -2
- package/dist/{chunk-F26LCYRY.js → chunk-OUSLVRO4.js} +68 -77
- package/dist/{chunk-Y6QL2LGO.js → chunk-P6WH6QTV.js} +1 -1
- package/dist/{chunk-OBXQRJWQ.js → chunk-QATWIE4K.js} +1 -1
- package/dist/{chunk-QFN7NVWM.js → chunk-RG3QWWIE.js} +1 -1
- package/dist/{chunk-HLYOEIWM.js → chunk-RI53TS2Y.js} +2 -2
- package/dist/{chunk-5FISWJ37.js → chunk-RVFEDAUV.js} +4 -4
- package/dist/{chunk-HMT2RPZU.js → chunk-SLCFKB3Y.js} +13 -9
- package/dist/chunk-UPFUC4DB.js +136 -0
- package/dist/{chunk-BYK73CR7.js → chunk-VYSUZEJG.js} +5 -5
- package/dist/chunk-WJB7WI4J.js +3753 -0
- package/dist/{chunk-7UYBQ6NF.js → chunk-XGFHYAYN.js} +14 -10
- package/dist/{chunk-OSSHSIMD.js → chunk-XU5GGV6R.js} +1 -1
- package/dist/{chunk-FVYXDXEV.js → chunk-Y6UPYWJS.js} +2 -2
- package/dist/{chunk-UM2GRYM3.js → chunk-YJXHMIZA.js} +3 -3
- package/dist/{chunk-3NE7ZYU2.js → chunk-YUAXFWSQ.js} +3 -3
- package/dist/{chunk-TVCRUG2S.js → chunk-ZEUONDQG.js} +1 -1
- package/dist/{chunk-ZQQ3SEIE.js → chunk-ZOA2SC4P.js} +99 -31
- package/dist/{clean-YHGPY33K.js → clean-KPX27IKJ.js} +18 -18
- package/dist/cli.js +68 -56
- package/dist/{cloud-DOFI5ISR.js → cloud-P7DAOISN.js} +4 -4
- package/dist/{cloudrun-KTZ4XDHL.js → cloudrun-XM56TBOH.js} +4 -4
- package/dist/{compare-SMMIZN2C.js → compare-F6YAFZZM.js} +25 -25
- package/dist/{compiler-TEXQWW6N.js → compiler-JZ4GNFMG.js} +6 -4
- package/dist/{component-B3GCNGSS.js → component-3CFOGIQA.js} +3 -3
- package/dist/{compositions-OQNZZTKF.js → compositions-CPCMWF24.js} +11 -11
- package/dist/{delete-EL5LVSEP.js → delete-GYVKOKB6.js} +2 -2
- package/dist/{dist-5UVIRMSM.js → dist-KDJTFJHA.js} +2 -2
- package/dist/{dist-XN234YFQ.js → dist-YPWQDWJ4.js} +4 -4
- package/dist/{doctor-UOL3OI2A.js → doctor-GWI3B6JT.js} +13 -13
- package/dist/{events-NIZBS6S7.js → events-BRRUDPPT.js} +3 -3
- package/dist/{events-K2DB2PBC.js → events-V2QFN4YM.js} +2 -2
- package/dist/{feedback-QMP4E6L7.js → feedback-CXMD7FWL.js} +9 -9
- package/dist/{ffmpeg-QIUFEFTY.js → ffmpeg-T5SH2EFJ.js} +3 -2
- package/dist/{figma-2AUJRNVC.js → figma-YABDWD66.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -9
- package/dist/{get-P5NC7SRM.js → get-L2SOQKHX.js} +2 -2
- package/dist/{gpuPolicy-7N5MCE2G.js → gpuPolicy-NBJNWHYS.js} +11 -9
- package/dist/{grade-compare-HV5AFZ6P.js → grade-compare-STXQPKYQ.js} +27 -27
- package/dist/{help-3TSTXBLN.js → help-4H6BSFLB.js} +2 -2
- package/dist/{history-D65XFJ6D.js → history-4IQOLTHJ.js} +5 -5
- package/dist/hyperframe-runtime.js +56 -56
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +56 -56
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-TXV7MLFO.js → info-2CZOTNBC.js} +8 -8
- package/dist/{init-OSDMJZJV.js → init-6BXK42VS.js} +35 -36
- package/dist/{inspect-RQQSAYIJ.js → inspect-VKU47TBH.js} +26 -26
- package/dist/{installer-CDOB32HE.js → installer-T2BSSUDY.js} +5 -5
- package/dist/{keyframes-V75Q6GRM.js → keyframes-IEYVHRPI.js} +6 -6
- package/dist/{lambda-RODV4RCX.js → lambda-TIKG25CK.js} +5 -5
- package/dist/{layout-IZAI5SFC.js → layout-XOI4PT7A.js} +26 -26
- package/dist/{lint-PLXOXY5R.js → lint-DWCMVIX5.js} +8 -8
- package/dist/{lintProject-OQ6H6XBR.js → lintProject-UBZ3TDHU.js} +2 -2
- package/dist/{list-BQBPNKDZ.js → list-7GXKG5QM.js} +2 -2
- package/dist/{login-NP6F4FHC.js → login-BQ5L2UHX.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-IFB7OSZ3.js} +12 -12
- package/dist/{models-CEZM6XZ7.js → models-TY4PJ545.js} +59 -19
- package/dist/{motionShot-R4GHYWYM.js → motionShot-WXMFHICW.js} +21 -22
- package/dist/{normalize-H6KUHHEI.js → normalize-U3SL5VG3.js} +2 -2
- package/dist/{normalize-audio-MQ7NFCOV.js → normalize-audio-RFD776HQ.js} +6 -6
- package/dist/{open-AKQTGNXF.js → open-7IXXGO2E.js} +4 -4
- package/dist/parakeetRunner-IHLYYMTZ.js +67 -0
- package/dist/{pipeline-SYJYP2RM.js → pipeline-TXKPLL2U.js} +10 -9
- package/dist/{play-NBH4B7PL.js → play-J2KP64UK.js} +19 -19
- package/dist/{preflight-Y5DN5D37.js → preflight-B4AFK3RG.js} +4 -4
- package/dist/{present-XAX55CFS.js → present-MHHNRVRA.js} +15 -15
- package/dist/{preview-OLANKNFA.js → preview-CONUOFFQ.js} +19 -19
- package/dist/{producer-Q6YNZZUJ.js → producer-ZI46K7HH.js} +1 -1
- package/dist/{projectConfig-EM26P45P.js → projectConfig-FGGVG5MV.js} +7 -7
- package/dist/{publication-OXWJZKSX.js → publication-TXFBMW6B.js} +3 -3
- package/dist/{publish-4VBWP2UB.js → publish-YZSPBFRD.js} +11 -11
- package/dist/{remove-background-REB7427G.js → remove-background-4ATVLHLG.js} +11 -10
- package/dist/{render-K25YOG3M.js → render-6FBYLYGJ.js} +11 -11
- package/dist/{render-3CVZ2SZG.js → render-GFW5BPES.js} +4 -4
- package/dist/{render-TSE75QUL.js → render-MH4IUPWB.js} +26 -26
- package/dist/{render-batch-GGUOK3DS.js → render-batch-XUCZ2PUJ.js} +4 -4
- package/dist/{renderCancellation-PZRWB53I.js → renderCancellation-XF7M7IUP.js} +10 -9
- package/dist/renderSetupWorker.js +32 -44
- package/dist/{resolver-S5VK6UCB.js → resolver-W7AYCQGS.js} +5 -5
- package/dist/sherpa-LDUB5NLY.js +75 -0
- package/dist/sherpaWorker.js +2 -1
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
- package/dist/{skills-I65FU5HD.js → skills-VENERS5X.js} +7 -7
- package/dist/{skillsUpdateCheck-J57RNNIV.js → skillsUpdateCheck-UXFYTACG.js} +3 -3
- package/dist/{snapshot-YROOGY22.js → snapshot-C6T74HTI.js} +28 -28
- package/dist/{src-X426BZAG.js → src-FS5RSVEI.js} +8 -8
- package/dist/{src-JO5JOV7Y.js → src-VUJ2FUFK.js} +8 -6
- package/dist/{staticProjectServer-5VMBS262.js → staticProjectServer-V2RZ4DWD.js} +15 -15
- package/dist/studio/assets/{hyperframes-player-BXSuksFh.js → hyperframes-player-Bw_jIaSX.js} +3 -3
- package/dist/studio/assets/{index-J7jpL4pj.js → index-BVM9NuWl.js} +141 -141
- package/dist/studio/assets/{index-BgOVCqjo.js → index-Cj7W_c7p.js} +1 -1
- package/dist/studio/assets/{index-FgyO_5Kv.js → index-DyH9dT7b.js} +1 -1
- package/dist/studio/{chunk-TFLU2MGI.js → chunk-3GHTHPZD.js} +8 -1
- package/dist/studio/chunk-3GHTHPZD.js.map +1 -0
- package/dist/studio/{chunk-H2DUOXTF.js → chunk-G3EDKRZH.js} +3 -3
- package/dist/studio/{chunk-UYWON5AX.js → chunk-PEAKCOUW.js} +7 -3
- package/dist/studio/chunk-PEAKCOUW.js.map +1 -0
- package/dist/studio/{chunk-LOVBLSMR.js → chunk-Y2OHHNM2.js} +35 -19
- package/dist/studio/chunk-Y2OHHNM2.js.map +1 -0
- package/dist/studio/{domEditingLayers-KBTPQKGA.js → domEditingLayers-PYST4G45.js} +3 -3
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +139 -70
- package/dist/studio/index.js.map +1 -1
- 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-TQE7KWKO.js} +9 -9
- package/dist/{studioServer-DBNKZ6I6.js → studioServer-CYKSQK7L.js} +68 -52
- package/dist/{telemetry-CXAX3TO3.js → telemetry-A23PPRD6.js} +3 -3
- package/dist/{timeline-VQ34WH7J.js → timeline-T3QSGT3A.js} +69 -47
- package/dist/{tokens-62R7VFAZ.js → tokens-RT5HWA6C.js} +2 -2
- package/dist/{transcribe-XOHPPL2O.js → transcribe-FOLNOC5G.js} +115 -51
- package/dist/{transcribe-7KR7IPJA.js → transcribe-HCF64LQK.js} +14 -12
- package/dist/{tts-MUV42JXT.js → tts-B6AHFQEO.js} +1 -1
- package/dist/{updateCheck-POYNH3B5.js → updateCheck-27PIP3AA.js} +2 -2
- package/dist/{upgrade-NBNOT7J2.js → upgrade-TVGXBUPJ.js} +2 -2
- package/dist/{urlDownloader-3NS63A7B.js → urlDownloader-KBLBJKRL.js} +6 -6
- package/dist/{validate-Y2QDHAEP.js → validate-ZMYGK4QI.js} +20 -20
- package/dist/{video-SJDMTSTL.js → video-AVE5GIGM.js} +7 -7
- package/package.json +1 -1
- package/dist/chunk-6TPZSTCL.js +0 -3681
- package/dist/studio/chunk-LOVBLSMR.js.map +0 -1
- package/dist/studio/chunk-TFLU2MGI.js.map +0 -1
- package/dist/studio/chunk-UYWON5AX.js.map +0 -1
- package/dist/{screenshotCapture-TEUIWXWN.js → screenshotCapture-3JXXUZND.js} +3 -3
- package/dist/studio/{chunk-H2DUOXTF.js.map → chunk-G3EDKRZH.js.map} +0 -0
- package/dist/studio/{domEditingLayers-KBTPQKGA.js.map → domEditingLayers-PYST4G45.js.map} +0 -0
- package/dist/{synthesize-C3IWDAXF.js → synthesize-UCI4X5O7.js} +4 -4
|
@@ -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-5VMR4WBS.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-VUJ2FUFK.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
|
};
|
|
@@ -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,24 +6,24 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
serveStaticProjectHtml
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RVFEDAUV.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProject
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KFKZ3ISO.js";
|
|
13
13
|
import {
|
|
14
14
|
AUDIT_SEEK_OPTIONS,
|
|
15
15
|
installPageFunctionGuard,
|
|
16
16
|
seekCompositionTimeline,
|
|
17
17
|
waitForCompositionFonts,
|
|
18
18
|
waitForRuntimeReady
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SLCFKB3Y.js";
|
|
20
20
|
import {
|
|
21
21
|
launchManagedBrowser,
|
|
22
22
|
resolveManagedGpuMode
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5WADG7PR.js";
|
|
24
24
|
import {
|
|
25
25
|
resolveDiagnosticNavigationTimeoutMs
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GZM2EFOE.js";
|
|
27
27
|
import {
|
|
28
28
|
defineCommand
|
|
29
29
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
printDeprecationNotice,
|
|
36
36
|
withMeta
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-P6WH6QTV.js";
|
|
38
38
|
import {
|
|
39
39
|
normalizeErrorMessage
|
|
40
40
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -707,7 +707,7 @@ async function collectTweenBoundaries(page) {
|
|
|
707
707
|
});
|
|
708
708
|
}
|
|
709
709
|
async function bundleProjectHtml(projectDir) {
|
|
710
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
710
|
+
const { bundleToSingleHtml } = await import("./compiler-JZ4GNFMG.js");
|
|
711
711
|
return bundleToSingleHtml(projectDir);
|
|
712
712
|
}
|
|
713
713
|
async function alignViewportToComposition(page, url) {
|
|
@@ -727,10 +727,15 @@ async function alignViewportToComposition(page, url) {
|
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
729
|
async function runLayoutAudit(projectDir, opts) {
|
|
730
|
-
const { ensureBrowser } = await import("./manager-
|
|
730
|
+
const { ensureBrowser } = await import("./manager-BPSR6D3V.js");
|
|
731
731
|
const puppeteer = await import("puppeteer-core");
|
|
732
|
-
const { buildChromeArgs } = await import("./src-
|
|
733
|
-
const {
|
|
732
|
+
const { buildChromeArgs } = await import("./src-VUJ2FUFK.js");
|
|
733
|
+
const {
|
|
734
|
+
assertWebGpuAdapterAvailable,
|
|
735
|
+
compositionRequiresWebGpu,
|
|
736
|
+
resolveLocalBrowserGpuMode,
|
|
737
|
+
resolveLocalWebGpu
|
|
738
|
+
} = await import("./gpuPolicy-NBJNWHYS.js");
|
|
734
739
|
const html = await bundleProjectHtml(projectDir);
|
|
735
740
|
const server = await serveStaticProjectHtml(
|
|
736
741
|
projectDir,
|
|
@@ -743,12 +748,13 @@ async function runLayoutAudit(projectDir, opts) {
|
|
|
743
748
|
const requestedGpuMode = resolveLocalBrowserGpuMode();
|
|
744
749
|
const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, browser.executablePath);
|
|
745
750
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
751
|
+
const { gpuConfig, softwareWebGpu } = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
|
|
746
752
|
chromeBrowser = await launchManagedBrowser(puppeteer.default, {
|
|
747
753
|
headless: true,
|
|
748
754
|
executablePath: browser.executablePath,
|
|
749
755
|
args: buildChromeArgs(
|
|
750
756
|
{ width: 1920, height: 1080, captureMode: "screenshot", requiresWebGpu },
|
|
751
|
-
|
|
757
|
+
gpuConfig
|
|
752
758
|
)
|
|
753
759
|
});
|
|
754
760
|
const page = await chromeBrowser.newPage();
|
|
@@ -758,7 +764,7 @@ async function runLayoutAudit(projectDir, opts) {
|
|
|
758
764
|
waitUntil: "domcontentloaded",
|
|
759
765
|
timeout: resolveDiagnosticNavigationTimeoutMs()
|
|
760
766
|
});
|
|
761
|
-
await assertWebGpuAdapterAvailable(page, requiresWebGpu);
|
|
767
|
+
await assertWebGpuAdapterAvailable(page, requiresWebGpu, softwareWebGpu);
|
|
762
768
|
await alignViewportToComposition(page, server.url);
|
|
763
769
|
await waitForRuntimeReady(page, opts.timeout);
|
|
764
770
|
await waitForCompositionFonts(page, 750);
|
|
@@ -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()}`);
|
|
@@ -144,8 +144,9 @@ function rewriteAssetPath(compSrcPath, relativePath, assetExists) {
|
|
|
144
144
|
const compDir = dirname(compSrcPath);
|
|
145
145
|
if (!compDir || compDir === ".") return relativePath;
|
|
146
146
|
const { basePath, suffix } = splitUrlSuffix(relativePath);
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
const slashed = basePath.replace(/\\/g, "/");
|
|
148
|
+
if (!slashed || slashed.startsWith("/")) return relativePath;
|
|
149
|
+
const filePath = decodeWellFormedEscapes(slashed);
|
|
149
150
|
const sibling = resolve2("/", join(compDir, filePath)).slice(1);
|
|
150
151
|
if (!needsRewrite(filePath) && (!assetExists || !assetExists(sibling))) return relativePath;
|
|
151
152
|
return encodeUrlPath(sibling) + suffix;
|
|
@@ -4,6 +4,9 @@ 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
|
+
normalizeErrorMessage
|
|
9
|
+
} from "./chunk-KNU5COPB.js";
|
|
7
10
|
|
|
8
11
|
// src/utils/processTree.ts
|
|
9
12
|
import { execFileSync, spawn } from "child_process";
|
|
@@ -121,6 +124,57 @@ async function terminateProcessTree(pid, options = {}) {
|
|
|
121
124
|
return options.processGroup ? terminateProcessGroup(pid, signal) : terminatePidTree(pid, signal);
|
|
122
125
|
}
|
|
123
126
|
|
|
127
|
+
// src/renderSetupWorkerLifecycle.ts
|
|
128
|
+
var RENDER_SETUP_SIGNALS = ["SIGINT", "SIGTERM", "SIGHUP"];
|
|
129
|
+
var RENDER_SETUP_RESULT_PREFIX = "HYPERFRAMES_RENDER_SETUP_RESULT:";
|
|
130
|
+
var RENDER_SETUP_ERROR_PREFIX = "HYPERFRAMES_RENDER_SETUP_ERROR:";
|
|
131
|
+
function installRenderSetupSignalHandlers(signalTarget, releaseLock, resendSignal, handleHangup = true) {
|
|
132
|
+
const handlers = /* @__PURE__ */ new Map();
|
|
133
|
+
const handledSignals = handleHangup ? RENDER_SETUP_SIGNALS : RENDER_SETUP_SIGNALS.filter((signal) => signal !== "SIGHUP");
|
|
134
|
+
for (const signal of handledSignals) {
|
|
135
|
+
const handler = () => {
|
|
136
|
+
releaseLock();
|
|
137
|
+
signalTarget.off(signal, handler);
|
|
138
|
+
resendSignal(signal);
|
|
139
|
+
};
|
|
140
|
+
handlers.set(signal, handler);
|
|
141
|
+
signalTarget.on(signal, handler);
|
|
142
|
+
}
|
|
143
|
+
return () => {
|
|
144
|
+
for (const [signal, handler] of handlers) signalTarget.off(signal, handler);
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function prefixedLine(prefix, value) {
|
|
148
|
+
return prefix + JSON.stringify(value) + "\n";
|
|
149
|
+
}
|
|
150
|
+
function parseJson(text) {
|
|
151
|
+
try {
|
|
152
|
+
return JSON.parse(text);
|
|
153
|
+
} catch {
|
|
154
|
+
return void 0;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function prefixedValue(output, prefix) {
|
|
158
|
+
const line = output.split(/\r?\n/).find((text) => text.startsWith(prefix));
|
|
159
|
+
return line === void 0 ? void 0 : parseJson(line.slice(prefix.length));
|
|
160
|
+
}
|
|
161
|
+
function renderSetupResultLine(result) {
|
|
162
|
+
return prefixedLine(RENDER_SETUP_RESULT_PREFIX, result);
|
|
163
|
+
}
|
|
164
|
+
function renderSetupResultFrom(stdout) {
|
|
165
|
+
return prefixedValue(stdout, RENDER_SETUP_RESULT_PREFIX);
|
|
166
|
+
}
|
|
167
|
+
function renderSetupErrorLine(error) {
|
|
168
|
+
return "\n" + prefixedLine(RENDER_SETUP_ERROR_PREFIX, normalizeErrorMessage(error));
|
|
169
|
+
}
|
|
170
|
+
function renderSetupFailureFrom(stderr) {
|
|
171
|
+
const lines = stderr.split(/\r?\n/);
|
|
172
|
+
const at = lines.findIndex((text) => text.startsWith(RENDER_SETUP_ERROR_PREFIX));
|
|
173
|
+
const reason = at === -1 ? void 0 : parseJson(lines[at].slice(RENDER_SETUP_ERROR_PREFIX.length));
|
|
174
|
+
if (typeof reason !== "string" || reason === "") return void 0;
|
|
175
|
+
return { reason, earlierOutput: lines.slice(0, at).join("\n") };
|
|
176
|
+
}
|
|
177
|
+
|
|
124
178
|
// src/utils/cancellableProcess.ts
|
|
125
179
|
import { spawn as spawn2 } from "child_process";
|
|
126
180
|
import { fileURLToPath } from "url";
|
|
@@ -269,7 +323,14 @@ function runCancellableProcess(command, args, options = {}) {
|
|
|
269
323
|
}
|
|
270
324
|
});
|
|
271
325
|
}
|
|
272
|
-
|
|
326
|
+
function renderSetupError(error) {
|
|
327
|
+
if (!(error instanceof CancellableProcessError)) return error;
|
|
328
|
+
const failure = renderSetupFailureFrom(error.stderr);
|
|
329
|
+
if (failure?.earlierOutput.trim()) process.stderr.write(`${failure.earlierOutput.trimEnd()}
|
|
330
|
+
`);
|
|
331
|
+
const reason = failure?.reason ?? error.stderr.trim();
|
|
332
|
+
return reason ? new Error(reason, { cause: error }) : error;
|
|
333
|
+
}
|
|
273
334
|
async function runRenderSetupWorker(mode, input, options) {
|
|
274
335
|
const sourceMode = import.meta.url.endsWith(".ts");
|
|
275
336
|
const workerUrl = new URL(
|
|
@@ -293,20 +354,20 @@ async function runRenderSetupWorker(mode, input, options) {
|
|
|
293
354
|
);
|
|
294
355
|
} catch (error) {
|
|
295
356
|
if (options.signal?.aborted) options.signal.throwIfAborted();
|
|
296
|
-
|
|
297
|
-
throw new Error(error.stderr.trim(), { cause: error });
|
|
298
|
-
}
|
|
299
|
-
throw error;
|
|
357
|
+
throw renderSetupError(error);
|
|
300
358
|
}
|
|
301
359
|
if (result.stderr) process.stderr.write(result.stderr);
|
|
302
|
-
const
|
|
303
|
-
if (
|
|
304
|
-
return
|
|
360
|
+
const value = renderSetupResultFrom(result.stdout);
|
|
361
|
+
if (value === void 0) throw new Error(`${mode} setup process exited without a result`);
|
|
362
|
+
return value;
|
|
305
363
|
}
|
|
306
364
|
|
|
307
365
|
export {
|
|
308
366
|
processIsAlive,
|
|
309
367
|
terminateProcessTree,
|
|
368
|
+
installRenderSetupSignalHandlers,
|
|
369
|
+
renderSetupResultLine,
|
|
370
|
+
renderSetupErrorLine,
|
|
310
371
|
runCancellableProcess,
|
|
311
372
|
runRenderSetupWorker
|
|
312
373
|
};
|
|
@@ -10,22 +10,25 @@ import {
|
|
|
10
10
|
distroLabel,
|
|
11
11
|
getFFmpegInstallHint,
|
|
12
12
|
parseLddMissingLibs
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZEUONDQG.js";
|
|
14
14
|
import {
|
|
15
15
|
getFreeDiskMb
|
|
16
16
|
} from "./chunk-GQJZORQP.js";
|
|
17
17
|
import {
|
|
18
18
|
ensureBrowser,
|
|
19
19
|
findBrowser
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-A6S35NYA.js";
|
|
21
21
|
import {
|
|
22
22
|
runCancellableProcess
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BYSBRF24.js";
|
|
24
24
|
import {
|
|
25
25
|
FFMPEG_PATH_ENV,
|
|
26
26
|
FFPROBE_PATH_ENV,
|
|
27
27
|
findFfBinary
|
|
28
28
|
} from "./chunk-PJ3HDUCY.js";
|
|
29
|
+
import {
|
|
30
|
+
normalizeErrorMessage
|
|
31
|
+
} from "./chunk-KNU5COPB.js";
|
|
29
32
|
|
|
30
33
|
// src/browser/preflight.ts
|
|
31
34
|
import { existsSync } from "fs";
|
|
@@ -254,11 +257,13 @@ async function checkChrome(browserPath, signal) {
|
|
|
254
257
|
};
|
|
255
258
|
}
|
|
256
259
|
let info;
|
|
260
|
+
let failure;
|
|
257
261
|
try {
|
|
258
262
|
info = signal ? await ensureBrowser({ preferManagedChrome: true, signal }) : await findBrowser();
|
|
259
|
-
} catch {
|
|
263
|
+
} catch (error) {
|
|
260
264
|
if (signal?.aborted) signal.throwIfAborted();
|
|
261
265
|
info = void 0;
|
|
266
|
+
failure = normalizeErrorMessage(error);
|
|
262
267
|
}
|
|
263
268
|
if (info) {
|
|
264
269
|
return chromeLaunchOutcome(
|
|
@@ -278,7 +283,7 @@ async function checkChrome(browserPath, signal) {
|
|
|
278
283
|
ok: false,
|
|
279
284
|
level: "error",
|
|
280
285
|
title: "Chrome not found",
|
|
281
|
-
detail: "Chrome Headless Shell is required for local rendering.",
|
|
286
|
+
detail: failure ?? "Chrome Headless Shell is required for local rendering.",
|
|
282
287
|
hint: "Run: npx hyperframes browser ensure"
|
|
283
288
|
};
|
|
284
289
|
}
|