hyperframes 0.8.208 → 0.8.209
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-XMWRBMBR.js → add-VZKUIZEH.js} +14 -13
- package/dist/{animatedGifPrep-6XURJIPV.js → animatedGifPrep-PN4G4YPJ.js} +8 -6
- package/dist/api.js +19 -16
- package/dist/{appHistory-HIBH6XZW.js → appHistory-OHYU5ZBQ.js} +3 -2
- package/dist/{asset-I5GGEOB2.js → asset-I4PHGE57.js} +2 -2
- package/dist/{assetCataloger-YBPXUNUP.js → assetCataloger-LRAUXQ46.js} +8 -6
- package/dist/{audio-GFJCHH5W.js → audio-T7SAVYED.js} +27 -18
- package/dist/{auth-QOA55RYR.js → auth-GP6HTQT3.js} +1 -1
- package/dist/{autoUpdate-SPS4QPJU.js → autoUpdate-Z6GFPZAG.js} +2 -2
- package/dist/{backgroundChecks-HRJO7YK7.js → backgroundChecks-ZJ7JV52S.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-FBP3RKUF.js → batchRender-J3ETE23Y.js} +3 -3
- package/dist/{beats-VNGJ7F6W.js → beats-WF4FJCM5.js} +13 -10
- package/dist/{benchmark-NZ3N3MIV.js → benchmark-B7UPP4PQ.js} +8 -8
- package/dist/{browser-BD5BKRJ5.js → browser-SIUYD43U.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-WXVNPAWD.js → bundleWithLocalizedFonts-RRGFY3XV.js} +2 -2
- package/dist/{capture-LMJ4TQRL.js → capture-J3GLHUKI.js} +2 -2
- package/dist/{capture-CXWXKWS5.js → capture-VYS4PCCJ.js} +13 -12
- package/dist/{captureCompositionFrame-ZKVCRYYU.js → captureCompositionFrame-SVLMPQYC.js} +13 -12
- package/dist/{catalog-WRXQSCAU.js → catalog-DVBNR422.js} +14 -13
- package/dist/{catch-up-MDSPABFC.js → catch-up-OBPMV7KG.js} +7 -6
- package/dist/{check-SIBBK5HA.js → check-MEALXNZK.js} +42 -40
- package/dist/{checkAudio-QQBR4HR7.js → checkAudio-RZ7WQYVN.js} +21 -12
- package/dist/{checkBrowser-4EBJLLIH.js → checkBrowser-2LEQ2LSX.js} +35 -33
- package/dist/{chunk-P7WGVXR7.js → chunk-3A4SB326.js} +6 -6
- package/dist/{chunk-FFDYRJBE.js → chunk-3PTZ2TD4.js} +1 -1
- package/dist/{chunk-4HT2L6W2.js → chunk-3PUXUIWB.js} +1 -1
- package/dist/chunk-3RATCY3W.js +205 -0
- package/dist/{chunk-X6MCIK7L.js → chunk-4BXEPVSA.js} +17 -11
- package/dist/{chunk-XOFBXLMG.js → chunk-5T4DP25D.js} +5 -3
- package/dist/{chunk-ULL3U6PV.js → chunk-66PNSZ7K.js} +1 -1
- package/dist/chunk-7VZEOCUY.js +98 -0
- package/dist/{chunk-TNTGGDSD.js → chunk-A7GDBL6D.js} +1 -1
- package/dist/{chunk-6WRN4WC6.js → chunk-AQTODJWP.js} +1 -1
- package/dist/{chunk-K4PHB3YQ.js → chunk-BYPDKF36.js} +1 -1
- package/dist/{chunk-MBGM26P5.js → chunk-CA3PXWN4.js} +1 -1
- package/dist/{chunk-SI7QCT2J.js → chunk-CBM4ZUVN.js} +5 -5
- package/dist/{chunk-IL2TMC6F.js → chunk-CIDCNE2D.js} +21 -5
- package/dist/chunk-D3MUHMFG.js +16 -0
- package/dist/{chunk-6N7D2GUV.js → chunk-D6T5BNSK.js} +17 -16
- package/dist/{chunk-XG3IZV62.js → chunk-DR47DSOY.js} +5 -5
- package/dist/{chunk-B5MPMIKQ.js → chunk-DVIX7UPH.js} +2 -2
- package/dist/{chunk-PSOAGSNO.js → chunk-EA5FUMJN.js} +1 -1
- package/dist/{chunk-VR3JLTZD.js → chunk-EVYDKSML.js} +3 -3
- package/dist/{chunk-XUQYC5DD.js → chunk-F4O4G4ZW.js} +5 -5
- package/dist/{chunk-VS4SK7BN.js → chunk-FB5BXGGF.js} +7 -7
- package/dist/{chunk-IIJVSCSH.js → chunk-GQZHLF5P.js} +13 -13
- package/dist/{chunk-J67FSI3Q.js → chunk-H7B526GH.js} +19 -16
- package/dist/{chunk-CSWCZA6V.js → chunk-I3ICHLHV.js} +2 -2
- package/dist/{chunk-EYEEZXLI.js → chunk-IJPFVMIE.js} +9 -9
- package/dist/{chunk-MPO25DQW.js → chunk-IQNS7O4W.js} +117 -135
- package/dist/{chunk-3O2E4Q66.js → chunk-J7A73K2B.js} +35 -22
- package/dist/{chunk-GHSO62LK.js → chunk-JC6BAQOG.js} +4 -10
- package/dist/{chunk-PKVA6MPV.js → chunk-JJRMN2RV.js} +63 -200
- package/dist/{chunk-XMRA7CQG.js → chunk-KCLBO65Y.js} +1 -1
- package/dist/{chunk-CP225S5H.js → chunk-KGBFHYHX.js} +4 -4
- package/dist/{chunk-QP2MJYTJ.js → chunk-L5XVBFUM.js} +1 -1
- package/dist/{chunk-DHQSDCWD.js → chunk-L7MGVFR4.js} +2 -1
- package/dist/{chunk-WNMVC3IT.js → chunk-LJ7H2A2C.js} +1 -1
- package/dist/{chunk-NZ6G5YWZ.js → chunk-LV4NWCJS.js} +1 -1
- package/dist/{chunk-QWBVPWUI.js → chunk-MI4V4HPE.js} +1 -1
- package/dist/{chunk-7CPI2DWL.js → chunk-MKALOCDV.js} +1 -1
- package/dist/{chunk-ENRFKCI6.js → chunk-MVNTJGDX.js} +3 -3
- package/dist/{chunk-GEO6THL3.js → chunk-NJZRXELC.js} +28 -25
- package/dist/{chunk-EOVYQ3IG.js → chunk-NQ2INEHX.js} +17 -17
- package/dist/{chunk-BLCKQPBE.js → chunk-NXNDHV26.js} +1 -1
- package/dist/{chunk-WABB4LZS.js → chunk-OK3QLJSF.js} +1 -1
- package/dist/{chunk-4KG3ESVO.js → chunk-OML6HQQN.js} +1 -1
- package/dist/{chunk-OTXXDONS.js → chunk-P2FSCR5B.js} +2 -2
- package/dist/{chunk-FC4WT5FX.js → chunk-P327BIJR.js} +1 -14
- package/dist/{chunk-43MW4SY7.js → chunk-P3OKYRGA.js} +3 -3
- package/dist/{chunk-S4KHJERB.js → chunk-PYVYF64E.js} +1 -1
- package/dist/{chunk-CZUAX3BV.js → chunk-QIDN4ML5.js} +1 -1
- package/dist/{chunk-DXACKQ3F.js → chunk-QIKZ2HZJ.js} +3 -3
- package/dist/{chunk-EGOXYG3M.js → chunk-R52YM6ZK.js} +1 -1
- package/dist/{chunk-MW2NQQ6Z.js → chunk-RAONLDN5.js} +2 -2
- package/dist/{chunk-MYO77JWR.js → chunk-RJO4X3AA.js} +1 -1
- package/dist/{chunk-LSMFOZ4F.js → chunk-RVG2JNDU.js} +1 -1
- package/dist/{chunk-7PAK7LZ5.js → chunk-SE6S4SGZ.js} +11 -13
- package/dist/{chunk-G2A6RC5R.js → chunk-SNLXWCET.js} +64 -48
- package/dist/{chunk-4F5NRJ6M.js → chunk-SOXQXX2M.js} +2 -2
- package/dist/{chunk-U6KN6OIP.js → chunk-SPMKVI6H.js} +1 -1
- package/dist/{chunk-6CWKORZO.js → chunk-SWHCYFEF.js} +27 -5
- package/dist/{chunk-PWEOSJ3E.js → chunk-TF7YE7J5.js} +3 -3
- package/dist/{chunk-Z5TGBEPJ.js → chunk-TSM67ADU.js} +1 -1
- package/dist/{chunk-BKDQFOKK.js → chunk-U5IZUWBW.js} +3 -3
- package/dist/{chunk-6JNSYFOH.js → chunk-V4VXWOIF.js} +3 -3
- package/dist/{chunk-ORFRUZPB.js → chunk-W32DVMX3.js} +2 -2
- package/dist/{chunk-4LTBQEPD.js → chunk-WLVHSGVL.js} +2 -2
- package/dist/chunk-XCIHCPJK.js +106 -0
- package/dist/{chunk-HUKQW4YE.js → chunk-Y2EVJBR6.js} +1 -1
- package/dist/{chunk-HZN7ICAF.js → chunk-YCGLT5B4.js} +1 -1
- package/dist/{chunk-5PCALX6G.js → chunk-YIFEK3UD.js} +1 -1
- package/dist/{chunk-6DSYBW7Z.js → chunk-YRO3PXWU.js} +1 -85
- package/dist/{chunk-5HB4JM7H.js → chunk-Z67J3TTU.js} +5 -3
- package/dist/{chunk-SKKQMW5X.js → chunk-ZMIRSWN6.js} +1 -1
- package/dist/{chunk-S2OLTAEL.js → chunk-ZPILPVYU.js} +2 -2
- package/dist/chunk-ZXTSUXSL.js +4870 -0
- package/dist/{clean-6GX7WAEC.js → clean-VWCYLOVI.js} +20 -17
- package/dist/cli.js +55 -55
- package/dist/{cloud-6PFJKLNL.js → cloud-HU3RXCVE.js} +4 -4
- package/dist/{cloudrun-UGG3ZFH7.js → cloudrun-OST6QBYD.js} +4 -4
- package/dist/commands/layout-audit.browser.js +1 -0
- package/dist/{compare-P4EBOP4B.js → compare-U2MJWZAH.js} +32 -30
- package/dist/{compiler-PG4RKX6K.js → compiler-DSP4MVEC.js} +5 -3
- package/dist/{component-SQPMI3W7.js → component-EC5XU6KR.js} +3 -3
- package/dist/{compositions-KRIHY3IY.js → compositions-AKYCTF4G.js} +12 -10
- package/dist/{delete-T5TO4SV6.js → delete-Z5MOEZM2.js} +5 -4
- package/dist/{deploy-AO6LQR5G.js → deploy-Y4LFVYXT.js} +1 -1
- package/dist/{dist-6IMEDVMC.js → dist-73YTUT3W.js} +1 -1
- package/dist/{dist-23AAB5X2.js → dist-JJL4QUDL.js} +2 -2
- package/dist/{doctor-QBUJQ655.js → doctor-7234U557.js} +12 -10
- package/dist/{events-J7CESLKQ.js → events-RUIZNTG3.js} +2 -2
- package/dist/{events-SIZO7YHI.js → events-SII53QYO.js} +3 -3
- package/dist/{feedback-74WOJ5PN.js → feedback-6CCDDQ36.js} +7 -7
- package/dist/{ffmpeg-AKUP6U2S.js → ffmpeg-C4VWK4M2.js} +8 -6
- package/dist/{figma-GGMYRR4Q.js → figma-GAN63U5U.js} +3 -3
- package/dist/fontLocalizeCli.js +11 -9
- package/dist/{get-PLKAI6JM.js → get-RZGUHZB4.js} +5 -4
- package/dist/{gpuPolicy-EYDAAPJF.js → gpuPolicy-BGJRCLP4.js} +8 -6
- package/dist/{grade-compare-UADJP4AV.js → grade-compare-XOBN52WV.js} +33 -31
- package/dist/{heifImagePrep-KDF3OPOK.js → heifImagePrep-DCHSYGW7.js} +9 -7
- package/dist/{help-WSQQ555Q.js → help-O2IV6PUC.js} +1 -1
- package/dist/{history-VSQ2DQ3V.js → history-GPTEM4UX.js} +9 -8
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +64 -64
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-MOQ4LRC3.js → info-7Y3JPN7C.js} +7 -7
- package/dist/{init-EONQSZJG.js → init-L6W5WG5K.js} +34 -29
- package/dist/{inspect-OLCVLHOU.js → inspect-MQZANGQY.js} +33 -31
- package/dist/{installer-GHISA75B.js → installer-DCIMLYB6.js} +4 -4
- package/dist/{keyframes-DGQYCY24.js → keyframes-WNJIKL4G.js} +6 -6
- package/dist/{lambda-AMMWF2YH.js → lambda-FEA4SSFK.js} +12 -10
- package/dist/{layout-R6CAPGRO.js → layout-AUQAYDJU.js} +33 -31
- package/dist/{lint-QZJEYPHD.js → lint-A33IHYID.js} +7 -7
- package/dist/{lintProject-W3YVHAGP.js → lintProject-KCN7MRBN.js} +1 -1
- package/dist/{list-KCJID4SP.js → list-56JHCET6.js} +5 -4
- package/dist/{login-7HKBEPJS.js → login-HUOM4GNP.js} +4 -4
- package/dist/{manager-6YSKJMVD.js → manager-SDRJOMPR.js} +9 -7
- package/dist/{media-treatment-E3DL6LEZ.js → media-treatment-5TGZOD67.js} +14 -12
- package/dist/{models-URWI7YEG.js → models-ABDX6TXI.js} +12 -10
- package/dist/{motionShot-27IXMDJK.js → motionShot-AV2WRH2C.js} +16 -15
- package/dist/{normalize-audio-WGRLPR3P.js → normalize-audio-M7T25DST.js} +10 -7
- package/dist/{open-LQ35PLEN.js → open-IRNZY5XN.js} +15 -14
- package/dist/{parakeetRunner-XASVIDTI.js → parakeetRunner-2EJUIMOJ.js} +16 -13
- package/dist/{pipeline-GA7QVCHS.js → pipeline-QGKOJKXS.js} +9 -7
- package/dist/{play-RYZP77CI.js → play-2SQLHM5B.js} +24 -21
- package/dist/{preflight-HJFSJXXF.js → preflight-ZHXMG2SM.js} +9 -7
- package/dist/{present-YBMLOWZV.js → present-RERVL6R7.js} +19 -16
- package/dist/{preview-QIRKJCRV.js → preview-S6RQOMHE.js} +22 -20
- package/dist/{producer-524FDOLX.js → producer-DBRGH2FI.js} +1 -1
- package/dist/{projectConfig-IDQN5ZRW.js → projectConfig-TUMDULTL.js} +9 -8
- package/dist/{publication-3X3IGSDO.js → publication-7VGXIFVZ.js} +2 -2
- package/dist/{publish-2BF7K6HX.js → publish-KJB2AGHL.js} +14 -11
- package/dist/{remove-background-EZBCEFT6.js → remove-background-EFWXPLS4.js} +10 -8
- package/dist/{render-TEEBI2UT.js → render-5O5ARP6C.js} +49 -50
- package/dist/{render-JFMTAXHD.js → render-7S6UBLOE.js} +36 -36
- package/dist/{render-EFUA2A6A.js → render-HV6AA22W.js} +5 -5
- package/dist/{render-batch-XTYNXVSW.js → render-batch-7UEOULJJ.js} +5 -5
- package/dist/renderSetupWorker.js +1 -1
- package/dist/{resolver-FZS6TN6B.js → resolver-HFTEER5V.js} +4 -4
- package/dist/{sherpa-TQIAIKTH.js → sherpa-HSSM76FL.js} +15 -12
- package/dist/{skills-S6ZG5KKH.js → skills-RQO5K6WL.js} +5 -5
- package/dist/{skillsUpdateCheck-XC7JQL3F.js → skillsUpdateCheck-S5WL2YLZ.js} +3 -3
- package/dist/{snapshot-ERYZIM32.js → snapshot-4RGI235E.js} +86 -52
- package/dist/{src-6XOMREMS.js → src-ALOV4D57.js} +24 -9
- package/dist/{src-OL6RHPE4.js → src-D75YYW2M.js} +10 -8
- package/dist/{staticProjectServer-JYDDGPAH.js → staticProjectServer-DIHWPJ6B.js} +21 -18
- package/dist/studio/assets/{hyperframes-player-5dRdMVOq.js → hyperframes-player-CMH8OeX2.js} +1 -1
- package/dist/studio/assets/{index-Bu3mJUU2.js → index-DQam8zzE.js} +4 -4
- package/dist/studio/assets/{index-ZqyQ91pm.js → index-DjHzuJGR.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-GRU4SHKD.js → studio-api-A2VSWTVF.js} +13 -10
- package/dist/{studioServer-OYPBEI5B.js → studioServer-PECYWZHS.js} +53 -51
- package/dist/{synthesize-QZHRXGRY.js → synthesize-RVE7IUOJ.js} +3 -2
- package/dist/{telemetry-CPYINR63.js → telemetry-YDGXGOLH.js} +3 -3
- package/dist/{timeline-RGK5BMPD.js → timeline-5WUEEKZ3.js} +21 -18
- package/dist/{tokens-EX4BOWRW.js → tokens-XVFZPIUZ.js} +2 -2
- package/dist/{transcribe-RI52JMVW.js → transcribe-QWDUIJWK.js} +20 -17
- package/dist/{transcribe-MK367I6A.js → transcribe-TTJ6CDQT.js} +12 -9
- package/dist/{tts-AY4JO5NQ.js → tts-AGMCPQXE.js} +1 -1
- package/dist/{updateCheck-BIEJKQI4.js → updateCheck-P7STSJ6Q.js} +2 -2
- package/dist/{upgrade-ES3UUI7O.js → upgrade-NEIZ3KVL.js} +2 -2
- package/dist/{urlDownloader-XAGYSTAG.js → urlDownloader-ZZFNGZNG.js} +7 -5
- package/dist/{validate-A6GZHNEI.js → validate-T2SLBOXG.js} +26 -24
- package/dist/{video-OEMGR3MN.js → video-7OHSBSRT.js} +8 -6
- package/dist/warmCheck.js +42 -40
- package/package.json +1 -1
- package/dist/chunk-BQMAPNDA.js +0 -4830
- package/dist/chunk-DKPNNYBZ.js +0 -44
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
splitElementInHtml,
|
|
20
20
|
unwrapElementsFromHtml,
|
|
21
21
|
wrapElementsInHtml
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TF7YE7J5.js";
|
|
23
23
|
import {
|
|
24
24
|
MEDIA_LINK_ATTR,
|
|
25
25
|
relinkSplitHalves
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
requestedProjectPath,
|
|
33
33
|
requiredFfmpeg,
|
|
34
34
|
resolveLocalAudioPath
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-CIDCNE2D.js";
|
|
36
36
|
import {
|
|
37
37
|
HistoryBusyError,
|
|
38
38
|
MAX_WINDOW_IDLE_MS,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
resolveProjectAndSignature,
|
|
47
47
|
resolveProjectSignature,
|
|
48
48
|
settledFileTag
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-J7A73K2B.js";
|
|
50
50
|
import {
|
|
51
51
|
PROXY_PARAMS_VERSION,
|
|
52
52
|
PROXY_PENDING_RETRY_AFTER_SECONDS,
|
|
@@ -58,7 +58,6 @@ import {
|
|
|
58
58
|
decideMediaProxyEligibility,
|
|
59
59
|
isProxyVariantRequest,
|
|
60
60
|
probeAssetCodec,
|
|
61
|
-
probeMediaMetadata,
|
|
62
61
|
proxyActivityMark,
|
|
63
62
|
proxyCopyProgress,
|
|
64
63
|
proxyVariantFor,
|
|
@@ -70,7 +69,11 @@ import {
|
|
|
70
69
|
scanProjectMedia,
|
|
71
70
|
shouldPrewarmProxy,
|
|
72
71
|
waitForProxy
|
|
73
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-JJRMN2RV.js";
|
|
73
|
+
import {
|
|
74
|
+
probeAudioTrack,
|
|
75
|
+
probeMediaMetadata
|
|
76
|
+
} from "./chunk-3RATCY3W.js";
|
|
74
77
|
import {
|
|
75
78
|
STUDIO_MOTION_PATH,
|
|
76
79
|
createStudioMotionRenderBodyScript,
|
|
@@ -90,7 +93,7 @@ import {
|
|
|
90
93
|
atomicTempPath,
|
|
91
94
|
createFileAtomically,
|
|
92
95
|
replaceFileAtomically
|
|
93
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-NQ2INEHX.js";
|
|
94
97
|
import {
|
|
95
98
|
parseEncoderOptions
|
|
96
99
|
} from "./chunk-5YHQBCWH.js";
|
|
@@ -103,12 +106,15 @@ import {
|
|
|
103
106
|
fontDirectories,
|
|
104
107
|
locateSystemFont
|
|
105
108
|
} from "./chunk-7FMUTGOH.js";
|
|
109
|
+
import {
|
|
110
|
+
decodableAudioStream
|
|
111
|
+
} from "./chunk-D3MUHMFG.js";
|
|
106
112
|
import {
|
|
107
113
|
addScenePartsManifest,
|
|
108
114
|
ensureHfIds,
|
|
109
115
|
stampHfIdsInPlace,
|
|
110
116
|
stripSdrPngColourTags
|
|
111
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-JC6BAQOG.js";
|
|
112
118
|
import {
|
|
113
119
|
GSAP_BASE_URL_META,
|
|
114
120
|
PREVIEW_PROXY_BOX_PARAM,
|
|
@@ -124,7 +130,7 @@ import {
|
|
|
124
130
|
normalizeGsapLocalRoot,
|
|
125
131
|
parseFps,
|
|
126
132
|
parsePreviewProxyBox
|
|
127
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-MI4V4HPE.js";
|
|
128
134
|
import {
|
|
129
135
|
AFTER_FONTS_SCRIPT_TYPE,
|
|
130
136
|
RUNTIME_BOOTSTRAP_ATTR,
|
|
@@ -135,10 +141,11 @@ import {
|
|
|
135
141
|
insertBeforeCloseTag,
|
|
136
142
|
insertRuntimeTag,
|
|
137
143
|
isFullHtmlDocument,
|
|
144
|
+
mapStartTagsAndStyles,
|
|
138
145
|
resolveRateSpec,
|
|
139
146
|
sourceTimeAt,
|
|
140
147
|
stripEmbeddedRuntimeScripts
|
|
141
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-ZXTSUXSL.js";
|
|
142
149
|
import {
|
|
143
150
|
ProjectRootMissingError,
|
|
144
151
|
folderGone,
|
|
@@ -313,7 +320,7 @@ function clearElementScreenshotIsolation() {
|
|
|
313
320
|
page.__hfThumbnailFaded = [];
|
|
314
321
|
}
|
|
315
322
|
|
|
316
|
-
// ../studio-server/dist/chunk-
|
|
323
|
+
// ../studio-server/dist/chunk-C3KTZ7G3.js
|
|
317
324
|
import { resolve } from "path";
|
|
318
325
|
function isAutoProxyEnabled(adapter) {
|
|
319
326
|
return adapter.autoProxy !== false;
|
|
@@ -3687,8 +3694,7 @@ import { createHash as createHash5, randomBytes } from "crypto";
|
|
|
3687
3694
|
import { existsSync as existsSync8 } from "fs";
|
|
3688
3695
|
import { existsSync as existsSync9, readFileSync as readFileSync12, statSync as statSync9 } from "fs";
|
|
3689
3696
|
import { join as join14, resolve as resolve6 } from "path";
|
|
3690
|
-
import {
|
|
3691
|
-
import { promisify } from "util";
|
|
3697
|
+
import { spawn as spawn2 } from "child_process";
|
|
3692
3698
|
import { closeSync as closeSync3, constants as constants2, fstatSync as fstatSync3, openSync as openSync3, readSync } from "fs";
|
|
3693
3699
|
import { streamSSE as streamSSE2 } from "hono/streaming";
|
|
3694
3700
|
import { existsSync as existsSync10 } from "fs";
|
|
@@ -3826,6 +3832,30 @@ function insertGsapCoreBeforeHeadPlugin(html, coreTag) {
|
|
|
3826
3832
|
return `${html.slice(0, at)}${coreTag}
|
|
3827
3833
|
${html.slice(at)}`;
|
|
3828
3834
|
}
|
|
3835
|
+
var ROOT_PATH = /^\/(?!\/)/;
|
|
3836
|
+
var PATH_ATTR = /(\s(?:src|href|poster|xlink:href)\s*=\s*)(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/gi;
|
|
3837
|
+
var CSS_ROOT_URL = /(\burl\(\s*)(["']?)(\/(?!\/)[^"')\s]*)\2/gi;
|
|
3838
|
+
var projectRelative = (path, base) => ROOT_PATH.test(path) && path !== "/" && !path.startsWith(base) ? path.slice(1) : path;
|
|
3839
|
+
var underBase = (path, base) => {
|
|
3840
|
+
const relative5 = projectRelative(path, base);
|
|
3841
|
+
return relative5 === path ? path : base + relative5;
|
|
3842
|
+
};
|
|
3843
|
+
function withRootPathsRelative(html, base) {
|
|
3844
|
+
const css = (text2) => text2.replace(
|
|
3845
|
+
CSS_ROOT_URL,
|
|
3846
|
+
(_m, open2, quote, path) => `${open2}${quote}${projectRelative(path, base)}${quote}`
|
|
3847
|
+
);
|
|
3848
|
+
const attrs = (tag) => tag.replace(PATH_ATTR, (whole, name, dq, sq, bare) => {
|
|
3849
|
+
const path = (dq ?? sq ?? bare ?? "").trim();
|
|
3850
|
+
const moved = projectRelative(path, base);
|
|
3851
|
+
if (moved === path) return whole;
|
|
3852
|
+
return dq !== void 0 ? `${name}"${moved}"` : sq !== void 0 ? `${name}'${moved}'` : `${name}${moved}`;
|
|
3853
|
+
});
|
|
3854
|
+
return mapStartTagsAndStyles(html, {
|
|
3855
|
+
tag: (tag) => /^<(?:a|base)[\s/>]/i.test(tag) ? tag : css(attrs(tag)),
|
|
3856
|
+
style: css
|
|
3857
|
+
});
|
|
3858
|
+
}
|
|
3829
3859
|
function rewriteRelativePaths(root, compPath, projectDir) {
|
|
3830
3860
|
const assetExists = (path) => existsSync(join22(projectDir, path));
|
|
3831
3861
|
rewriteAssetPaths(
|
|
@@ -3973,6 +4003,10 @@ ${headContent}`;
|
|
|
3973
4003
|
}
|
|
3974
4004
|
if (compHeadContent) headContent += `
|
|
3975
4005
|
${compHeadContent}`;
|
|
4006
|
+
if (baseHref) {
|
|
4007
|
+
headContent = withRootPathsRelative(headContent, baseHref);
|
|
4008
|
+
rewrittenContent = withRootPathsRelative(rewrittenContent, baseHref);
|
|
4009
|
+
}
|
|
3976
4010
|
headContent = stripEmbeddedRuntimeScripts(headContent);
|
|
3977
4011
|
headContent += `
|
|
3978
4012
|
<script ${RUNTIME_BOOTSTRAP_ATTR}="1" src="${runtimeUrl}"></script>`;
|
|
@@ -4318,13 +4352,17 @@ function computePeaks(floats, count) {
|
|
|
4318
4352
|
const maxPeak = Math.max(...peaks, 1e-3);
|
|
4319
4353
|
return peaks.map((p) => p / maxPeak);
|
|
4320
4354
|
}
|
|
4321
|
-
function decodeAudioPeaks(audioPath) {
|
|
4355
|
+
async function decodeAudioPeaks(audioPath) {
|
|
4356
|
+
const track = await probeAudioTrack(audioPath);
|
|
4357
|
+
if (!track) throw new Error("no audio stream");
|
|
4322
4358
|
return new Promise((resolvePromise, reject) => {
|
|
4323
4359
|
const proc = spawn(
|
|
4324
4360
|
findFfBinary("ffmpeg") ?? "ffmpeg",
|
|
4325
4361
|
[
|
|
4326
4362
|
"-i",
|
|
4327
4363
|
audioPath,
|
|
4364
|
+
"-map",
|
|
4365
|
+
`0:a:${track.stream}`,
|
|
4328
4366
|
"-af",
|
|
4329
4367
|
"atrim=start_sample=1152",
|
|
4330
4368
|
"-f",
|
|
@@ -4406,7 +4444,7 @@ function validateUploadedMedia(filePath, runner = defaultRunner) {
|
|
|
4406
4444
|
if (!ffprobe) return { ok: true, unchecked: FFPROBE_MISSING };
|
|
4407
4445
|
const result = runner(
|
|
4408
4446
|
ffprobe,
|
|
4409
|
-
["-v", "error", "-show_entries", "stream=codec_type", "-of", "json", "--", filePath],
|
|
4447
|
+
["-v", "error", "-show_entries", "stream=codec_type,codec_name", "-of", "json", "--", filePath],
|
|
4410
4448
|
{ windowsHide: true }
|
|
4411
4449
|
);
|
|
4412
4450
|
if (result.error && process.env[FFPROBE_PATH_ENV]?.trim()) {
|
|
@@ -4428,7 +4466,7 @@ function checkStreams(stdout, isVideo, isAudio) {
|
|
|
4428
4466
|
const parsed = JSON.parse(stdout);
|
|
4429
4467
|
const streams = parsed.streams ?? [];
|
|
4430
4468
|
const hasVideo = streams.some((stream) => stream.codec_type === "video");
|
|
4431
|
-
const hasAudio = streams
|
|
4469
|
+
const hasAudio = decodableAudioStream(streams) !== null;
|
|
4432
4470
|
if (isVideo && !hasVideo) {
|
|
4433
4471
|
return { ok: false, reason: "no supported video stream found" };
|
|
4434
4472
|
}
|
|
@@ -5552,7 +5590,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
|
5552
5590
|
let block = extractGsapScriptBlock(html);
|
|
5553
5591
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
5554
5592
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
5555
|
-
const { GSAP_CDN } = await import("./dist-
|
|
5593
|
+
const { GSAP_CDN } = await import("./dist-JJL4QUDL.js");
|
|
5556
5594
|
const bootstrap = [
|
|
5557
5595
|
`<script src="${GSAP_CDN}"></script>`,
|
|
5558
5596
|
"<script>",
|
|
@@ -7282,7 +7320,6 @@ function registerFileRoutes(api, adapter) {
|
|
|
7282
7320
|
return c.json({ ok: true, restored: true, conflict: false });
|
|
7283
7321
|
});
|
|
7284
7322
|
}
|
|
7285
|
-
var ROOT_PATH = /^\/(?!\/)/;
|
|
7286
7323
|
var IMPORT_MAP_TYPE = /\btype\s*=\s*["']?importmap["']?(?=[\s/>])/i;
|
|
7287
7324
|
function findImportMap(html) {
|
|
7288
7325
|
for (const at of findStartTags(html, "script")) {
|
|
@@ -7309,7 +7346,7 @@ function withRootImportMap(html, base) {
|
|
|
7309
7346
|
return html;
|
|
7310
7347
|
}
|
|
7311
7348
|
if (!map || typeof map !== "object") return html;
|
|
7312
|
-
const under = (path) =>
|
|
7349
|
+
const under = (path) => underBase(path, base);
|
|
7313
7350
|
const moved = (entries = {}) => Object.fromEntries(
|
|
7314
7351
|
Object.entries(entries).map(([key, target]) => [key, under(String(target))])
|
|
7315
7352
|
);
|
|
@@ -7708,7 +7745,7 @@ var PREVIEW_BUNDLE_OPTIONS = {
|
|
|
7708
7745
|
var previewBaseHref = (projectId) => `/api/projects/${encodeURIComponent(projectId)}/preview/`;
|
|
7709
7746
|
var withPreviewBase = (html, projectId) => {
|
|
7710
7747
|
const base = previewBaseHref(projectId);
|
|
7711
|
-
const mapped = withRootImportMap(html, base);
|
|
7748
|
+
const mapped = withRootImportMap(withRootPathsRelative(html, base), base);
|
|
7712
7749
|
return hasBaseElement(mapped) ? mapped : injectTagsAtHeadStart(mapped, `<base href="${base}">`);
|
|
7713
7750
|
};
|
|
7714
7751
|
function resolvePreviewGsapBaseUrl(adapter) {
|
|
@@ -7753,10 +7790,9 @@ function registerPreviewRoutes(api, adapter) {
|
|
|
7753
7790
|
bundled = ensureHfIds(diskMain.html);
|
|
7754
7791
|
mainCompositionPath = diskMain.compositionPath;
|
|
7755
7792
|
}
|
|
7756
|
-
bundled = withPreviewRuntime(bundled, adapter.runtimeUrl);
|
|
7793
|
+
bundled = withPreviewRuntime(withPreviewBase(bundled, project.id), adapter.runtimeUrl);
|
|
7757
7794
|
recordPreviewReferences(project.dir, bundled);
|
|
7758
7795
|
recordPreviewBuilt(project.dir);
|
|
7759
|
-
bundled = withPreviewBase(bundled, project.id);
|
|
7760
7796
|
bundled = injectStudioPreviewAugmentations(
|
|
7761
7797
|
ensureHfIds(await transformPreviewHtml(bundled, adapter, project, mainCompositionPath)),
|
|
7762
7798
|
adapter,
|
|
@@ -7781,9 +7817,9 @@ function registerPreviewRoutes(api, adapter) {
|
|
|
7781
7817
|
} catch {
|
|
7782
7818
|
const fallback = resolveProjectMainHtml(project.dir, project.id);
|
|
7783
7819
|
if (fallback) {
|
|
7784
|
-
const fallbackHtml =
|
|
7785
|
-
|
|
7786
|
-
|
|
7820
|
+
const fallbackHtml = withPreviewRuntime(
|
|
7821
|
+
withPreviewBase(ensureHfIds(fallback.html), project.id),
|
|
7822
|
+
adapter.runtimeUrl
|
|
7787
7823
|
);
|
|
7788
7824
|
let fallbackAugmented = injectStudioPreviewAugmentations(
|
|
7789
7825
|
await transformPreviewHtml(fallbackHtml, adapter, project, fallback.compositionPath),
|
|
@@ -9160,7 +9196,6 @@ function registerLoudnessRoutes(api, adapter, measure = defaultMeasure) {
|
|
|
9160
9196
|
}
|
|
9161
9197
|
var PEAK_BIN_SECONDS = 0.05;
|
|
9162
9198
|
var PEAK_SAMPLE_RATE = 48e3;
|
|
9163
|
-
var execFileAsync = promisify(execFile2);
|
|
9164
9199
|
var PEAK_MAP_CACHE_VERSION = "peaks-v2";
|
|
9165
9200
|
function createPeakAccumulator(sampleRate = PEAK_SAMPLE_RATE, binSeconds = PEAK_BIN_SECONDS, channels = 2) {
|
|
9166
9201
|
return {
|
|
@@ -9194,29 +9229,10 @@ function accumulatePeaks(acc, chunk) {
|
|
|
9194
9229
|
function finishPeaks(acc) {
|
|
9195
9230
|
return acc.bins.map((peak) => Number(peak.toFixed(4)));
|
|
9196
9231
|
}
|
|
9197
|
-
async function probeChannels(mediaPath) {
|
|
9198
|
-
const { stdout } = await execFileAsync(
|
|
9199
|
-
findFfBinary("ffprobe") ?? "ffprobe",
|
|
9200
|
-
[
|
|
9201
|
-
"-v",
|
|
9202
|
-
"error",
|
|
9203
|
-
"-select_streams",
|
|
9204
|
-
"a:0",
|
|
9205
|
-
"-show_entries",
|
|
9206
|
-
"stream=channels",
|
|
9207
|
-
"-of",
|
|
9208
|
-
"csv=p=0",
|
|
9209
|
-
"--",
|
|
9210
|
-
mediaPath
|
|
9211
|
-
],
|
|
9212
|
-
{ encoding: "utf8", timeout: 3e4, windowsHide: true }
|
|
9213
|
-
);
|
|
9214
|
-
const channels = Number.parseInt(stdout.trim(), 10);
|
|
9215
|
-
if (!Number.isFinite(channels) || channels < 1) throw new Error("no audio stream");
|
|
9216
|
-
return channels;
|
|
9217
|
-
}
|
|
9218
9232
|
async function decodePeakMap(mediaPath) {
|
|
9219
|
-
const
|
|
9233
|
+
const track = await probeAudioTrack(mediaPath);
|
|
9234
|
+
if (!track || track.channels < 1) throw new Error("no audio stream");
|
|
9235
|
+
const { stream, channels } = track;
|
|
9220
9236
|
return new Promise((resolvePromise, reject) => {
|
|
9221
9237
|
const proc = spawn2(
|
|
9222
9238
|
findFfBinary("ffmpeg") ?? "ffmpeg",
|
|
@@ -9226,7 +9242,7 @@ async function decodePeakMap(mediaPath) {
|
|
|
9226
9242
|
"-i",
|
|
9227
9243
|
mediaPath,
|
|
9228
9244
|
"-map",
|
|
9229
|
-
|
|
9245
|
+
`0:a:${stream}`,
|
|
9230
9246
|
"-vn",
|
|
9231
9247
|
"-ar",
|
|
9232
9248
|
String(PEAK_SAMPLE_RATE),
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
typeDirPath,
|
|
21
21
|
updateRecord,
|
|
22
22
|
withFigmaErrors
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-RJO4X3AA.js";
|
|
24
24
|
import {
|
|
25
25
|
defineCommand
|
|
26
26
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -229,7 +229,7 @@ var asset_default = defineCommand({
|
|
|
229
229
|
rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
|
|
230
230
|
);
|
|
231
231
|
}
|
|
232
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
232
|
+
const { trackFigmaImport } = await import("./telemetry-YDGXGOLH.js");
|
|
233
233
|
trackFigmaImport({
|
|
234
234
|
phase: "asset",
|
|
235
235
|
reused: results.every((r) => r.reused),
|
|
@@ -4,9 +4,12 @@ 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
|
+
probeAudio
|
|
9
|
+
} from "./chunk-7VZEOCUY.js";
|
|
7
10
|
import {
|
|
8
11
|
stoppedByCancelSignal
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RVG2JNDU.js";
|
|
10
13
|
import {
|
|
11
14
|
DEFAULT_MODEL,
|
|
12
15
|
ensureModel,
|
|
@@ -14,12 +17,12 @@ import {
|
|
|
14
17
|
hasFFmpeg,
|
|
15
18
|
pinnedWhisperModel,
|
|
16
19
|
sha256File
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3PUXUIWB.js";
|
|
18
21
|
import {
|
|
19
22
|
findFFmpeg,
|
|
20
23
|
findFFprobe,
|
|
21
24
|
getFFmpegInstallHint
|
|
22
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-R52YM6ZK.js";
|
|
23
26
|
import {
|
|
24
27
|
findWavChunk
|
|
25
28
|
} from "./chunk-UOFAE5RF.js";
|
|
@@ -29,6 +32,9 @@ import {
|
|
|
29
32
|
import {
|
|
30
33
|
stoppableExecFile
|
|
31
34
|
} from "./chunk-HU2SPFNG.js";
|
|
35
|
+
import {
|
|
36
|
+
decodableAudioStream
|
|
37
|
+
} from "./chunk-D3MUHMFG.js";
|
|
32
38
|
|
|
33
39
|
// src/whisper/transcribe.ts
|
|
34
40
|
import { execFile, execFileSync } from "child_process";
|
|
@@ -258,10 +264,24 @@ async function extractAudio(videoPath, signal) {
|
|
|
258
264
|
`ffmpeg is required to extract audio from video. Install: ${getFFmpegInstallHint()}`
|
|
259
265
|
);
|
|
260
266
|
}
|
|
267
|
+
const audio = await probeAudio(videoPath);
|
|
268
|
+
if (!audio) throw new Error("the file has no audio track ffmpeg can decode");
|
|
261
269
|
const wavPath = tempWavPath();
|
|
262
270
|
await runFfmpeg(
|
|
263
271
|
ffmpegPath,
|
|
264
|
-
[
|
|
272
|
+
[
|
|
273
|
+
"-i",
|
|
274
|
+
videoPath,
|
|
275
|
+
"-map",
|
|
276
|
+
`0:a:${audio.audioStream}`,
|
|
277
|
+
"-vn",
|
|
278
|
+
"-ar",
|
|
279
|
+
"16000",
|
|
280
|
+
"-ac",
|
|
281
|
+
"1",
|
|
282
|
+
"-f",
|
|
283
|
+
"wav"
|
|
284
|
+
],
|
|
265
285
|
wavPath,
|
|
266
286
|
resolveAudioPreparationTimeoutMs(getMediaDurationSeconds(videoPath)),
|
|
267
287
|
signal
|
|
@@ -281,7 +301,9 @@ function isWav16kMono(filePath) {
|
|
|
281
301
|
{ encoding: "utf-8", timeout: 1e4 }
|
|
282
302
|
);
|
|
283
303
|
const parsed = JSON.parse(raw);
|
|
284
|
-
|
|
304
|
+
const audio = (parsed.streams ?? []).filter((s) => s.codec_type === "audio");
|
|
305
|
+
const index = decodableAudioStream(audio);
|
|
306
|
+
return isPcm16kMono(index === null ? void 0 : audio[index]);
|
|
285
307
|
} catch {
|
|
286
308
|
return false;
|
|
287
309
|
}
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
ensureHfIds,
|
|
13
13
|
mintHfId,
|
|
14
14
|
walkCompositionDescendants
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JC6BAQOG.js";
|
|
16
16
|
import {
|
|
17
17
|
isAllowedHtmlAttribute,
|
|
18
18
|
isSafeAttributeValue,
|
|
19
19
|
sanitizeRichTextChildren
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MI4V4HPE.js";
|
|
21
21
|
import {
|
|
22
22
|
require_dist
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-P327BIJR.js";
|
|
24
24
|
import {
|
|
25
25
|
readClipTiming,
|
|
26
26
|
readMediaOffsetSeconds,
|
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
findFFmpeg,
|
|
16
16
|
findFFprobe,
|
|
17
17
|
getFFmpegInstallHint
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-R52YM6ZK.js";
|
|
19
19
|
import {
|
|
20
20
|
DEFAULT_VP9_CPU_USED,
|
|
21
21
|
SDR_RGB_TO_BT709_FILTER,
|
|
22
22
|
SDR_RGB_TO_TAGGED_BT709_FILTER,
|
|
23
23
|
renderProvenanceArgs
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-IQNS7O4W.js";
|
|
25
25
|
import {
|
|
26
26
|
runCancellableProcess
|
|
27
27
|
} from "./chunk-Q43YUROE.js";
|
|
@@ -317,7 +317,7 @@ async function decoderTransposesDimensions(inputPath) {
|
|
|
317
317
|
}
|
|
318
318
|
async function probeMedia(inputPath) {
|
|
319
319
|
const isImage = inferInputKind(inputPath) === "image";
|
|
320
|
-
const engine = await import("./src-
|
|
320
|
+
const engine = await import("./src-ALOV4D57.js");
|
|
321
321
|
const meta = await engine.extractMediaMetadata(inputPath);
|
|
322
322
|
if (isImage) {
|
|
323
323
|
return { width: meta.width, height: meta.height, fps: 0, frameCount: 1 };
|
|
@@ -7,10 +7,10 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
parseFeedbackRating,
|
|
9
9
|
trackRenderFeedback
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-L7MGVFR4.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldTrack
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EA5FUMJN.js";
|
|
14
14
|
import {
|
|
15
15
|
c
|
|
16
16
|
} from "./chunk-ZTZA4UWZ.js";
|
|
@@ -84,7 +84,7 @@ async function getDoctorSummary() {
|
|
|
84
84
|
try {
|
|
85
85
|
const [{ getSystemMeta }, { findFFmpeg }] = await Promise.all([
|
|
86
86
|
import("./system-YD4AW5ZX.js"),
|
|
87
|
-
import("./ffmpeg-
|
|
87
|
+
import("./ffmpeg-C4VWK4M2.js")
|
|
88
88
|
]);
|
|
89
89
|
const sys = getSystemMeta();
|
|
90
90
|
const parts = [
|
|
@@ -6,13 +6,13 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
writeNewFileSync
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KCLBO65Y.js";
|
|
10
10
|
import {
|
|
11
11
|
normalizeSkillSlug
|
|
12
12
|
} from "./chunk-HVW7ABXD.js";
|
|
13
13
|
import {
|
|
14
14
|
DEFAULT_REGISTRY_URL
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Y2EVJBR6.js";
|
|
16
16
|
|
|
17
17
|
// src/utils/projectConfig.ts
|
|
18
18
|
import { readFileSync, writeFileSync } from "fs";
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
resolveConfig,
|
|
9
9
|
usesSoftwareWebGpu
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IQNS7O4W.js";
|
|
11
11
|
|
|
12
12
|
// src/browser/gpuPolicy.ts
|
|
13
13
|
function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCER_BROWSER_GPU_MODE) {
|
|
@@ -17,7 +17,7 @@ function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCE
|
|
|
17
17
|
return "auto";
|
|
18
18
|
}
|
|
19
19
|
async function resolveCaptureBrowserGpuMode(requestedMode, chromePath, probeLifecycle) {
|
|
20
|
-
const { resolveBrowserGpuMode } = await import("./src-
|
|
20
|
+
const { resolveBrowserGpuMode } = await import("./src-ALOV4D57.js");
|
|
21
21
|
return resolveBrowserGpuMode(requestedMode, { chromePath, probeLifecycle });
|
|
22
22
|
}
|
|
23
23
|
function resolveLocalWebGpu(browserGpuMode, requiresWebGpu) {
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
|
|
8
|
+
// ../core/dist/removeScratch.js
|
|
9
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
10
|
+
import { rmSync } from "fs";
|
|
11
|
+
var collecting = new AsyncLocalStorage();
|
|
12
|
+
function removeScratch(path) {
|
|
13
|
+
try {
|
|
14
|
+
rmSync(path, { recursive: true, force: true });
|
|
15
|
+
} catch {
|
|
16
|
+
collecting.getStore()?.push(path);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
async function collectScratchLeftovers(run, report) {
|
|
20
|
+
const left = [];
|
|
21
|
+
try {
|
|
22
|
+
return await collecting.run(left, run);
|
|
23
|
+
} finally {
|
|
24
|
+
report(left);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// ../core/dist/renameWithRetry.js
|
|
29
|
+
import { copyFileSync, renameSync } from "fs";
|
|
30
|
+
import { copyFile, rename } from "fs/promises";
|
|
31
|
+
var RETRYABLE = /* @__PURE__ */ new Set(["EPERM", "EACCES", "EBUSY"]);
|
|
32
|
+
var BACKOFF_MS = [10, 20, 40, 80, 160, 320, 640];
|
|
33
|
+
function isRetryable(error, platform) {
|
|
34
|
+
if (platform !== "win32")
|
|
35
|
+
return false;
|
|
36
|
+
return RETRYABLE.has(error?.code ?? "");
|
|
37
|
+
}
|
|
38
|
+
function nextStep(error, attempt, options, platform) {
|
|
39
|
+
if (!isRetryable(error, platform))
|
|
40
|
+
return "throw";
|
|
41
|
+
if (attempt < BACKOFF_MS.length)
|
|
42
|
+
return "wait";
|
|
43
|
+
return options.copyFallback ? "copy" : "throw";
|
|
44
|
+
}
|
|
45
|
+
function sleepSync(ms) {
|
|
46
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
47
|
+
}
|
|
48
|
+
function renameWithRetry(from, to, options = {}) {
|
|
49
|
+
const doRename = options.rename ?? renameSync;
|
|
50
|
+
const doCopy = options.copy ?? copyFileSync;
|
|
51
|
+
const platform = options.platform ?? process.platform;
|
|
52
|
+
for (let attempt = 0; ; attempt++) {
|
|
53
|
+
try {
|
|
54
|
+
doRename(from, to);
|
|
55
|
+
return;
|
|
56
|
+
} catch (error) {
|
|
57
|
+
const step = nextStep(error, attempt, options, platform);
|
|
58
|
+
if (step === "throw")
|
|
59
|
+
throw error;
|
|
60
|
+
if (step === "wait") {
|
|
61
|
+
sleepSync(BACKOFF_MS[attempt]);
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
doCopy(from, to);
|
|
66
|
+
} catch {
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
removeScratch(from);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async function renameWithRetryAsync(from, to, options = {}) {
|
|
75
|
+
const doRename = options.rename ?? rename;
|
|
76
|
+
const doCopy = options.copy ?? copyFile;
|
|
77
|
+
const platform = options.platform ?? process.platform;
|
|
78
|
+
for (let attempt = 0; ; attempt++) {
|
|
79
|
+
try {
|
|
80
|
+
await doRename(from, to);
|
|
81
|
+
return;
|
|
82
|
+
} catch (error) {
|
|
83
|
+
const step = nextStep(error, attempt, options, platform);
|
|
84
|
+
if (step === "throw")
|
|
85
|
+
throw error;
|
|
86
|
+
if (step === "wait") {
|
|
87
|
+
await new Promise((resolve) => setTimeout(resolve, BACKOFF_MS[attempt]));
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
await doCopy(from, to);
|
|
92
|
+
} catch {
|
|
93
|
+
throw error;
|
|
94
|
+
}
|
|
95
|
+
removeScratch(from);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export {
|
|
102
|
+
removeScratch,
|
|
103
|
+
collectScratchLeftovers,
|
|
104
|
+
renameWithRetry,
|
|
105
|
+
renameWithRetryAsync
|
|
106
|
+
};
|