hyperframes 0.8.207 → 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-LXFWHBE3.js → add-VZKUIZEH.js} +17 -15
- package/dist/{agentPromptGenerator-D2E62ZP5.js → agentPromptGenerator-4NJ252MR.js} +6 -2
- package/dist/{animatedGifPrep-VBPJZKFT.js → animatedGifPrep-PN4G4YPJ.js} +10 -7
- package/dist/api.js +24 -20
- package/dist/{appHistory-HIBH6XZW.js → appHistory-OHYU5ZBQ.js} +3 -2
- package/dist/{asset-JX4RW3GO.js → asset-I4PHGE57.js} +2 -2
- package/dist/{assetCataloger-JKKOPBCF.js → assetCataloger-LRAUXQ46.js} +12 -8
- package/dist/{audio-OXQ3L6DW.js → audio-T7SAVYED.js} +424 -133
- package/dist/{auth-JAL7P7ZA.js → auth-GP6HTQT3.js} +4 -4
- package/dist/{autoUpdate-MRI2AICE.js → autoUpdate-Z6GFPZAG.js} +4 -4
- package/dist/{backgroundChecks-ORR46PBY.js → backgroundChecks-ZJ7JV52S.js} +5 -5
- package/dist/backgroundChecksWorker.js +5 -5
- package/dist/{batchRender-IFZYPGIW.js → batchRender-J3ETE23Y.js} +5 -4
- package/dist/{beats-UDLOEW6U.js → beats-WF4FJCM5.js} +25 -15
- package/dist/{benchmark-VTVDNKSO.js → benchmark-B7UPP4PQ.js} +10 -10
- package/dist/{browser-QJC4BL2Y.js → browser-SIUYD43U.js} +8 -8
- package/dist/{bundleWithLocalizedFonts-Z2JTBNDS.js → bundleWithLocalizedFonts-RRGFY3XV.js} +3 -3
- package/dist/{capture-2P4JERSX.js → capture-J3GLHUKI.js} +52 -17
- package/dist/{capture-GLM2ACPM.js → capture-VYS4PCCJ.js} +66 -39
- package/dist/{captureCompositionFrame-A2A5MGQB.js → captureCompositionFrame-SVLMPQYC.js} +16 -14
- package/dist/{captureFile-RPUEOZO6.js → captureFile-VIVGKFY4.js} +2 -1
- package/dist/{catalog-5ZLVUQVJ.js → catalog-DVBNR422.js} +17 -15
- package/dist/{catch-up-FRMVYJHZ.js → catch-up-OBPMV7KG.js} +9 -8
- package/dist/{check-WVY7SM7C.js → check-MEALXNZK.js} +47 -44
- package/dist/{checkAudio-PLEQY3SZ.js → checkAudio-RZ7WQYVN.js} +23 -13
- package/dist/{checkBrowser-XSZUA2DQ.js → checkBrowser-2LEQ2LSX.js} +39 -36
- package/dist/{chunk-526VSRZ4.js → chunk-3A4SB326.js} +6 -6
- package/dist/{chunk-GXUONASF.js → chunk-3PTZ2TD4.js} +25 -2
- package/dist/{chunk-JQ32262N.js → chunk-3PUXUIWB.js} +1 -1
- package/dist/chunk-3RATCY3W.js +205 -0
- package/dist/{chunk-MAUGXKSI.js → chunk-4BXEPVSA.js} +113 -20
- package/dist/{chunk-C6KE4AFW.js → chunk-56ANHX5U.js} +1 -1
- package/dist/{chunk-VBPNCOD7.js → chunk-5T4DP25D.js} +5 -3
- package/dist/{chunk-IBZHSU2J.js → chunk-66PNSZ7K.js} +1 -1
- package/dist/{chunk-WL263XM2.js → chunk-6PWQH77E.js} +1 -1
- package/dist/chunk-7VZEOCUY.js +98 -0
- package/dist/{chunk-VAVDAOUA.js → chunk-A7GDBL6D.js} +1 -1
- package/dist/{chunk-UAT2UMTP.js → chunk-AQTODJWP.js} +1 -1
- package/dist/{chunk-5KBMYSF2.js → chunk-BYPDKF36.js} +7 -2
- package/dist/{chunk-EG3B2VWK.js → chunk-CA3PXWN4.js} +16 -21
- package/dist/{chunk-FEO7YW7V.js → chunk-CBM4ZUVN.js} +6 -6
- package/dist/{chunk-6KCFVLO6.js → chunk-CIDCNE2D.js} +21 -5
- package/dist/{chunk-C53ZNJDZ.js → chunk-D2CE2J2A.js} +1 -1
- package/dist/chunk-D3MUHMFG.js +16 -0
- package/dist/{chunk-5PYRU5DT.js → chunk-D6T5BNSK.js} +18 -17
- package/dist/{chunk-PUIG6DHT.js → chunk-DR47DSOY.js} +7 -7
- package/dist/chunk-DROFHVQD.js +240 -0
- package/dist/{chunk-YJK6HOL5.js → chunk-DVIX7UPH.js} +2 -2
- package/dist/{chunk-QTWXVOZI.js → chunk-EA5FUMJN.js} +2 -2
- package/dist/{chunk-NWGXTUYS.js → chunk-EQBDKYXR.js} +3 -30
- package/dist/{chunk-4UMPIPCQ.js → chunk-ERUQ3S6D.js} +2 -2
- package/dist/{chunk-T2EUWCJE.js → chunk-EU7MVORF.js} +13 -1
- package/dist/{chunk-IW5P4KK7.js → chunk-EVYDKSML.js} +3 -3
- package/dist/{chunk-FVAI7AHF.js → chunk-F4O4G4ZW.js} +5 -5
- package/dist/{chunk-6KOHY5EP.js → chunk-FB5BXGGF.js} +17 -11
- package/dist/{chunk-HTIUNMTP.js → chunk-GDZA4ALG.js} +8 -2
- package/dist/{chunk-DJQZ7DEH.js → chunk-GQZHLF5P.js} +15 -15
- package/dist/{chunk-ZYGIDXAK.js → chunk-H7B526GH.js} +114 -65
- package/dist/{chunk-P2I4RLJE.js → chunk-HTZJNQYI.js} +1 -1
- package/dist/{chunk-I2TDHVFV.js → chunk-I3ICHLHV.js} +2 -2
- package/dist/{chunk-CVZO6TFE.js → chunk-IJPFVMIE.js} +11 -11
- package/dist/{chunk-LK6KPVX2.js → chunk-IQNS7O4W.js} +403 -290
- package/dist/{chunk-XDMZY3H7.js → chunk-J7A73K2B.js} +43 -35
- package/dist/{chunk-RPZNQV6D.js → chunk-JC6BAQOG.js} +4 -10
- package/dist/{chunk-HA3V4XAF.js → chunk-JJRMN2RV.js} +63 -200
- package/dist/{chunk-XMRA7CQG.js → chunk-KCLBO65Y.js} +1 -1
- package/dist/{chunk-QE4WRS3N.js → chunk-KGBFHYHX.js} +4 -4
- package/dist/{chunk-HM7SUIQD.js → chunk-KTWGVEN6.js} +3 -3
- package/dist/{chunk-7PJ3AJB2.js → chunk-L5XVBFUM.js} +1 -1
- package/dist/{chunk-NSC5A4IR.js → chunk-L7MGVFR4.js} +7 -2
- package/dist/{chunk-I3TYUQLB.js → chunk-LJ7H2A2C.js} +1 -1
- package/dist/{chunk-VH4PNYOS.js → chunk-LV4NWCJS.js} +2 -2
- package/dist/{chunk-ELP5QZWL.js → chunk-M4QZFUMW.js} +1 -1
- package/dist/{chunk-7RWUY3BJ.js → chunk-MI4V4HPE.js} +1 -1
- package/dist/{chunk-SXOD5J7T.js → chunk-MKALOCDV.js} +1 -1
- package/dist/{chunk-UKM3JYNB.js → chunk-MVNTJGDX.js} +3 -3
- package/dist/{chunk-PSX5SF2N.js → chunk-NEASABW6.js} +1 -1
- package/dist/{chunk-H3LQ5X6Q.js → chunk-NJZRXELC.js} +68 -34
- package/dist/{chunk-EOVYQ3IG.js → chunk-NQ2INEHX.js} +17 -17
- package/dist/{chunk-LCCYYTEK.js → chunk-NXNDHV26.js} +1 -1
- package/dist/{chunk-JKE24AG7.js → chunk-OK3QLJSF.js} +1 -1
- package/dist/{chunk-63DP5CB2.js → chunk-OML6HQQN.js} +4 -4
- package/dist/{chunk-UUOIH4RW.js → chunk-P2FSCR5B.js} +2 -2
- package/dist/{chunk-ZCJ5EGLU.js → chunk-P327BIJR.js} +66 -1
- package/dist/{chunk-HVOTYAS4.js → chunk-P3OKYRGA.js} +3 -3
- package/dist/{chunk-U32PA6DI.js → chunk-PYVYF64E.js} +1 -1
- package/dist/{chunk-EHFZEKQM.js → chunk-Q43YUROE.js} +1 -1
- package/dist/{chunk-CZUAX3BV.js → chunk-QIDN4ML5.js} +1 -1
- package/dist/{chunk-NHL5CMO2.js → chunk-QIKZ2HZJ.js} +3 -3
- package/dist/{chunk-IK4JY2LI.js → chunk-R52YM6ZK.js} +2 -2
- package/dist/{chunk-DML6BD4K.js → chunk-RAONLDN5.js} +2 -2
- package/dist/{chunk-MSHL6CF2.js → chunk-RJO4X3AA.js} +1 -1
- package/dist/{chunk-6IYIS2U7.js → chunk-RVG2JNDU.js} +2 -2
- package/dist/{chunk-UYPWH7PH.js → chunk-SE6S4SGZ.js} +13 -15
- package/dist/{chunk-NJNC2DQV.js → chunk-SNLXWCET.js} +105 -46
- package/dist/{chunk-TSTONNOD.js → chunk-SOXQXX2M.js} +2 -2
- package/dist/{chunk-EGRIVMCQ.js → chunk-SPMKVI6H.js} +2 -2
- package/dist/{chunk-PL36HK3U.js → chunk-SWHCYFEF.js} +27 -5
- package/dist/{chunk-ID766OZB.js → chunk-TF7YE7J5.js} +3 -3
- package/dist/{chunk-XAGBSYIQ.js → chunk-TSM67ADU.js} +1 -1
- package/dist/{chunk-KDHHPJOG.js → chunk-U5IZUWBW.js} +4 -4
- package/dist/{chunk-T4JGFCXU.js → chunk-V4VXWOIF.js} +4 -4
- package/dist/{chunk-6N65ZMC5.js → chunk-VYRJAQGC.js} +1 -1
- package/dist/{chunk-LXP6XWJL.js → chunk-W32DVMX3.js} +2 -2
- package/dist/{chunk-LPI7HX4G.js → chunk-WLVHSGVL.js} +2 -2
- package/dist/chunk-XCIHCPJK.js +106 -0
- package/dist/chunk-XFMO3BEN.js +71 -0
- package/dist/{chunk-XKW4Z7BU.js → chunk-Y2EVJBR6.js} +1 -1
- package/dist/{chunk-QZ2JQ6O4.js → chunk-YCGLT5B4.js} +3 -3
- package/dist/{chunk-5PCALX6G.js → chunk-YIFEK3UD.js} +1 -1
- package/dist/{chunk-ZF3R2IPC.js → chunk-YRO3PXWU.js} +2 -85
- package/dist/chunk-Z5J67X44.js +40 -0
- package/dist/{chunk-XULJBZ7K.js → chunk-Z67J3TTU.js} +5 -3
- package/dist/{chunk-7JAD4MEW.js → chunk-ZA5TNF4R.js} +1 -0
- package/dist/{chunk-6Z7XDUUJ.js → chunk-ZMIRSWN6.js} +1 -1
- package/dist/{chunk-IYZT62UR.js → chunk-ZPILPVYU.js} +2 -2
- package/dist/chunk-ZXTSUXSL.js +4870 -0
- package/dist/{clean-TL3IPJDN.js → clean-VWCYLOVI.js} +26 -22
- package/dist/cli.js +58 -58
- package/dist/{cloud-EYMRPJNY.js → cloud-HU3RXCVE.js} +4 -4
- package/dist/{cloudrun-TOJ36NLX.js → cloudrun-OST6QBYD.js} +6 -5
- package/dist/commands/layout-audit.browser.js +1 -0
- package/dist/{compare-MP5EOW4D.js → compare-U2MJWZAH.js} +38 -35
- package/dist/{compiler-NOPVLJ2S.js → compiler-DSP4MVEC.js} +5 -3
- package/dist/{component-ASACDCZK.js → component-EC5XU6KR.js} +3 -3
- package/dist/{compositions-WKNZJY34.js → compositions-AKYCTF4G.js} +16 -13
- package/dist/{contactSheet-YOBPATEM.js → contactSheet-RYAE7Y5D.js} +3 -2
- package/dist/{delete-DQTFHP3G.js → delete-Z5MOEZM2.js} +10 -9
- package/dist/{deploy-HHCFOUFM.js → deploy-Y4LFVYXT.js} +6 -6
- package/dist/{dist-L4Z4ZEYW.js → dist-73YTUT3W.js} +1 -1
- package/dist/{dist-NQEYA4ZX.js → dist-JJL4QUDL.js} +2 -2
- package/dist/docker/Dockerfile.render +1 -1
- package/dist/{doctor-JDM65CP7.js → doctor-7234U557.js} +18 -15
- package/dist/{events-RKRHRLJD.js → events-RUIZNTG3.js} +4 -4
- package/dist/{events-MBRNA3UF.js → events-SII53QYO.js} +5 -5
- package/dist/{feedback-LZWIWV5J.js → feedback-6CCDDQ36.js} +12 -12
- package/dist/{ffmpeg-4PZKSIGE.js → ffmpeg-C4VWK4M2.js} +12 -9
- package/dist/{figma-QFNYUT3F.js → figma-GAN63U5U.js} +3 -3
- package/dist/fontLocalizeCli.js +13 -10
- package/dist/{get-2B5ENJOH.js → get-RZGUHZB4.js} +10 -9
- package/dist/{gpuPolicy-E5FB2GFR.js → gpuPolicy-BGJRCLP4.js} +10 -7
- package/dist/{grade-compare-4GUAPJHE.js → grade-compare-XOBN52WV.js} +38 -35
- package/dist/{heifImagePrep-C2RYIEER.js → heifImagePrep-DCHSYGW7.js} +11 -8
- package/dist/{help-XGDAXV67.js → help-O2IV6PUC.js} +1 -1
- package/dist/{history-WNFF6HGU.js → history-GPTEM4UX.js} +11 -10
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +67 -67
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-BR2LKGJD.js → info-7Y3JPN7C.js} +9 -9
- package/dist/{init-P6UWPUY3.js → init-L6W5WG5K.js} +40 -34
- package/dist/{inspect-MSRPF7ZO.js → inspect-MQZANGQY.js} +37 -34
- package/dist/{installer-MPUQS3ZX.js → installer-DCIMLYB6.js} +4 -4
- package/dist/{keyframes-J6K66QTO.js → keyframes-WNJIKL4G.js} +8 -8
- package/dist/{lambda-LJ2OSWFJ.js → lambda-FEA4SSFK.js} +16 -13
- package/dist/{layout-CDY65XGA.js → layout-AUQAYDJU.js} +37 -34
- package/dist/{lint-CAUNBGPX.js → lint-A33IHYID.js} +9 -9
- package/dist/{lintProject-ZTSX3AWT.js → lintProject-KCN7MRBN.js} +1 -1
- package/dist/{list-33BYQNRZ.js → list-56JHCET6.js} +10 -9
- package/dist/localPage-V3HBGM3Z.js +27 -0
- package/dist/{login-5QMRKOHK.js → login-HUOM4GNP.js} +7 -7
- package/dist/{logout-JYFWWUGK.js → logout-3IID4KXD.js} +3 -3
- package/dist/{manager-3JOHHPVR.js → manager-SDRJOMPR.js} +13 -10
- package/dist/{manager-RMYSZ3KI.js → manager-Z7W4GQGF.js} +4 -4
- package/dist/{media-treatment-4WP22CFN.js → media-treatment-5TGZOD67.js} +27 -22
- package/dist/{models-HPWCHAZX.js → models-ABDX6TXI.js} +17 -14
- package/dist/{motionShot-I7GDIROQ.js → motionShot-AV2WRH2C.js} +20 -18
- package/dist/{normalize-audio-VTMXPSC7.js → normalize-audio-M7T25DST.js} +12 -9
- package/dist/{open-SAO7OQTT.js → open-IRNZY5XN.js} +17 -16
- package/dist/{parakeetRunner-ZYPBIA73.js → parakeetRunner-2EJUIMOJ.js} +21 -17
- package/dist/{pipeline-VNBMR6QU.js → pipeline-QGKOJKXS.js} +13 -10
- package/dist/{play-7VI6A7KN.js → play-2SQLHM5B.js} +26 -23
- package/dist/{policies-GHVXA5PE.js → policies-PKLD4UW5.js} +1 -1
- package/dist/{preflight-VWV7L45J.js → preflight-ZHXMG2SM.js} +14 -11
- package/dist/{present-CSJGYOFF.js → present-RERVL6R7.js} +21 -18
- package/dist/{preview-B246ZTVO.js → preview-S6RQOMHE.js} +28 -25
- package/dist/{producer-WJLFDVQJ.js → producer-DBRGH2FI.js} +1 -1
- package/dist/{projectConfig-OMR46ZWQ.js → projectConfig-TUMDULTL.js} +9 -8
- package/dist/{publication-AA7NNYET.js → publication-7VGXIFVZ.js} +2 -2
- package/dist/{publish-TJ4QVVSP.js → publish-KJB2AGHL.js} +18 -15
- package/dist/{refresh-USSFPJAU.js → refresh-3IRHJEQA.js} +3 -3
- package/dist/{remove-background-LQ2V7W7N.js → remove-background-EFWXPLS4.js} +14 -11
- package/dist/{render-AWEEPG3F.js → render-5O5ARP6C.js} +65 -62
- package/dist/{render-JLTNZ36U.js → render-7S6UBLOE.js} +50 -48
- package/dist/{render-E5QJG74D.js → render-HV6AA22W.js} +6 -5
- package/dist/{render-batch-U4T4VSCM.js → render-batch-7UEOULJJ.js} +7 -6
- package/dist/renderSetupWorker.js +6 -6
- package/dist/{resolver-GXCTUKPV.js → resolver-HFTEER5V.js} +4 -4
- package/dist/{screenshotCapture-X6OKIXCB.js → screenshotCapture-HOW4VSV6.js} +3 -2
- package/dist/{sherpa-4VZWVHWZ.js → sherpa-HSSM76FL.js} +20 -16
- package/dist/skills/hyperframes/SKILL.md +1 -1
- package/dist/skills/hyperframes/references/format.md +1 -0
- package/dist/skills/hyperframes-cli/references/beats.md +2 -0
- package/dist/skills/media-use/references/grading.md +2 -0
- package/dist/skills/media-use/references/local.md +1 -0
- package/dist/{skills-WUKR7SUE.js → skills-RQO5K6WL.js} +7 -7
- package/dist/{skillsUpdateCheck-YXRBY3JC.js → skillsUpdateCheck-S5WL2YLZ.js} +5 -5
- package/dist/{snapshot-Q7S2FTNG.js → snapshot-4RGI235E.js} +119 -66
- package/dist/{src-ZOXUSGAP.js → src-ALOV4D57.js} +26 -10
- package/dist/{src-CLAALR5W.js → src-D75YYW2M.js} +12 -9
- package/dist/{staticProjectServer-DQ7PIDPA.js → staticProjectServer-DIHWPJ6B.js} +21 -18
- package/dist/{status-LR7VXITS.js → status-DTP6ZYDU.js} +3 -3
- package/dist/studio/assets/{hyperframes-player-Cm5aBiKq.js → hyperframes-player-CMH8OeX2.js} +3 -3
- package/dist/studio/assets/{index-BF9YeBnC.js → index-DQam8zzE.js} +71 -71
- package/dist/studio/assets/{index-BrqAmMRt.js → index-DjHzuJGR.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-NUE227JM.js → studio-api-A2VSWTVF.js} +13 -10
- package/dist/{studioServer-HVOKP4VI.js → studioServer-PECYWZHS.js} +60 -57
- package/dist/{synthesize-QZHRXGRY.js → synthesize-RVE7IUOJ.js} +3 -2
- package/dist/{telemetry-IHU4HL3R.js → telemetry-6BPSGY5W.js} +2 -2
- package/dist/{telemetry-2Y5JXLDB.js → telemetry-YDGXGOLH.js} +5 -5
- package/dist/{timeline-WOQGXFRV.js → timeline-5WUEEKZ3.js} +27 -23
- package/dist/{tokens-T3OHTWUC.js → tokens-XVFZPIUZ.js} +2 -2
- package/dist/{transcribe-JZ3BO546.js → transcribe-QWDUIJWK.js} +26 -22
- package/dist/{transcribe-4U74P5TG.js → transcribe-TTJ6CDQT.js} +17 -13
- package/dist/{tts-AY4JO5NQ.js → tts-AGMCPQXE.js} +1 -1
- package/dist/{updateCheck-6EUAGAM4.js → updateCheck-P7STSJ6Q.js} +4 -4
- package/dist/{upgrade-55K6F4MP.js → upgrade-NEIZ3KVL.js} +4 -4
- package/dist/{urlDownloader-47JMOLNN.js → urlDownloader-ZZFNGZNG.js} +9 -6
- package/dist/{validate-QBJ3SBS4.js → validate-T2SLBOXG.js} +30 -27
- package/dist/{video-3ZAUNAR3.js → video-7OHSBSRT.js} +12 -8
- package/dist/warmCheck.js +47 -44
- package/package.json +1 -1
- package/dist/chunk-BDJIQZN2.js +0 -4830
- package/dist/chunk-DKPNNYBZ.js +0 -44
- package/dist/{destroy-SSPAKADI.js → destroy-CGAZIL2C.js} +4 -4
|
@@ -12,16 +12,20 @@ import {
|
|
|
12
12
|
atomicTempPath,
|
|
13
13
|
isAtomicTempPath,
|
|
14
14
|
replaceFileAtomically
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NQ2INEHX.js";
|
|
16
16
|
import {
|
|
17
17
|
isProjectIgnoredDir
|
|
18
18
|
} from "./chunk-EVMY7IPL.js";
|
|
19
|
+
import {
|
|
20
|
+
renameWithRetry,
|
|
21
|
+
renameWithRetryAsync
|
|
22
|
+
} from "./chunk-XCIHCPJK.js";
|
|
19
23
|
import {
|
|
20
24
|
isSafePath,
|
|
21
25
|
mkdirWithinProject
|
|
22
26
|
} from "./chunk-OFQWTKPW.js";
|
|
23
27
|
|
|
24
|
-
// ../studio-server/dist/chunk-
|
|
28
|
+
// ../studio-server/dist/chunk-BWZMWYB2.js
|
|
25
29
|
import { randomUUID as randomUUID7 } from "crypto";
|
|
26
30
|
import { mkdir as mkdir2, readdir as readdir3, rm as rm3, rmdir, stat as stat2, writeFile } from "fs/promises";
|
|
27
31
|
import {
|
|
@@ -41,28 +45,20 @@ import { readFileSync as readFileSync2 } from "fs";
|
|
|
41
45
|
import { isAbsolute, relative, resolve, sep } from "path";
|
|
42
46
|
import { spawnSync } from "child_process";
|
|
43
47
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
44
|
-
import {
|
|
45
|
-
linkSync,
|
|
46
|
-
mkdirSync,
|
|
47
|
-
readFileSync,
|
|
48
|
-
renameSync,
|
|
49
|
-
rmSync,
|
|
50
|
-
statSync,
|
|
51
|
-
writeFileSync
|
|
52
|
-
} from "fs";
|
|
48
|
+
import { linkSync, mkdirSync, readFileSync, rmSync, statSync, writeFileSync } from "fs";
|
|
53
49
|
import { uptime } from "os";
|
|
54
50
|
import { join } from "path";
|
|
55
51
|
import { createHash as createHash2 } from "crypto";
|
|
56
52
|
import { lstatSync, readFileSync as readFileSync3, readdirSync } from "fs";
|
|
57
53
|
import { extname, isAbsolute as isAbsolute2, relative as relative2, resolve as resolve2, sep as sep2 } from "path";
|
|
58
54
|
import { createHash as createHash3, randomUUID as randomUUID3 } from "crypto";
|
|
59
|
-
import { constants, createReadStream, createWriteStream
|
|
60
|
-
import { copyFile, mkdir, readdir, readFile,
|
|
55
|
+
import { constants, createReadStream, createWriteStream } from "fs";
|
|
56
|
+
import { copyFile, mkdir, readdir, readFile, rm, stat } from "fs/promises";
|
|
61
57
|
import { dirname, join as join2 } from "path";
|
|
62
58
|
import { pipeline } from "stream/promises";
|
|
63
59
|
import { extname as extname2 } from "path";
|
|
64
60
|
import { randomUUID as randomUUID5 } from "crypto";
|
|
65
|
-
import { readdirSync as readdirSync2, readFileSync as readFileSync5, renameSync
|
|
61
|
+
import { readdirSync as readdirSync2, readFileSync as readFileSync5, renameSync, statSync as statSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
66
62
|
import { lstat, readdir as readdir2, rm as rm2 } from "fs/promises";
|
|
67
63
|
import { tmpdir } from "os";
|
|
68
64
|
import { dirname as dirname2, join as join4 } from "path";
|
|
@@ -70,7 +66,7 @@ import { randomUUID as randomUUID4 } from "crypto";
|
|
|
70
66
|
import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync4, statSync as statSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
71
67
|
import { basename, join as join3, resolve as resolve3 } from "path";
|
|
72
68
|
import { createHash as createHash5, randomUUID as randomUUID6 } from "crypto";
|
|
73
|
-
import { createReadStream as createReadStream2, existsSync as existsSync2, readFileSync as readFileSync8, renameSync as
|
|
69
|
+
import { createReadStream as createReadStream2, existsSync as existsSync2, readFileSync as readFileSync8, renameSync as renameSync2, statSync as statSync4 } from "fs";
|
|
74
70
|
import { isAbsolute as isAbsolute4, join as join7, resolve as resolve6 } from "path";
|
|
75
71
|
import { createHash as createHash4 } from "crypto";
|
|
76
72
|
import {
|
|
@@ -270,14 +266,15 @@ function claim(file) {
|
|
|
270
266
|
const draft = `${file}-${process.pid}-${randomUUID2()}.tmp`;
|
|
271
267
|
writeFileSync(draft, String(process.pid));
|
|
272
268
|
try {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
269
|
+
try {
|
|
270
|
+
linkSync(draft, file);
|
|
271
|
+
} catch (error) {
|
|
272
|
+
const code = error.code ?? "";
|
|
273
|
+
if (code === "EEXIST") return false;
|
|
274
|
+
if (!NO_HARD_LINKS.has(code)) throw error;
|
|
275
|
+
return createExclusively(file);
|
|
276
|
+
}
|
|
277
|
+
return recordOwnership(file);
|
|
281
278
|
} finally {
|
|
282
279
|
rmSync(draft, { force: true });
|
|
283
280
|
}
|
|
@@ -285,12 +282,20 @@ function claim(file) {
|
|
|
285
282
|
function createExclusively(file) {
|
|
286
283
|
try {
|
|
287
284
|
writeFileSync(file, String(process.pid), { flag: "wx" });
|
|
288
|
-
recordStart(file);
|
|
289
|
-
return true;
|
|
290
285
|
} catch (error) {
|
|
291
286
|
if (error.code !== "EEXIST") throw error;
|
|
292
287
|
return false;
|
|
293
288
|
}
|
|
289
|
+
return recordOwnership(file);
|
|
290
|
+
}
|
|
291
|
+
function recordOwnership(file) {
|
|
292
|
+
try {
|
|
293
|
+
recordStart(file);
|
|
294
|
+
return true;
|
|
295
|
+
} catch (error) {
|
|
296
|
+
releaseOwn(file);
|
|
297
|
+
throw error;
|
|
298
|
+
}
|
|
294
299
|
}
|
|
295
300
|
function releaseOwn(file) {
|
|
296
301
|
if (ownerOf(file) !== process.pid) return;
|
|
@@ -317,9 +322,7 @@ function evictDeadOwner(file) {
|
|
|
317
322
|
}
|
|
318
323
|
function advertise(urlFile, url) {
|
|
319
324
|
if (!url) return rmSync(urlFile, { force: true });
|
|
320
|
-
|
|
321
|
-
writeFileSync(draft, JSON.stringify({ pid: process.pid, url }));
|
|
322
|
-
renameSync(draft, urlFile);
|
|
325
|
+
replaceFileAtomically(urlFile, JSON.stringify({ pid: process.pid, url }));
|
|
323
326
|
}
|
|
324
327
|
function servedBy(file, urlFile, pid) {
|
|
325
328
|
try {
|
|
@@ -353,7 +356,12 @@ async function takeHistoryOwnership(home, waitMs, url) {
|
|
|
353
356
|
if (next === "claimed") break;
|
|
354
357
|
if (next === "wait") await new Promise((settle) => setTimeout(settle, 50));
|
|
355
358
|
}
|
|
356
|
-
|
|
359
|
+
try {
|
|
360
|
+
advertise(urlFile, url);
|
|
361
|
+
} catch (error) {
|
|
362
|
+
releaseOwn(file);
|
|
363
|
+
throw error;
|
|
364
|
+
}
|
|
357
365
|
let held = true;
|
|
358
366
|
return () => {
|
|
359
367
|
if (held && servedBy(file, urlFile, process.pid)) rmSync(urlFile, { force: true });
|
|
@@ -600,7 +608,7 @@ async function cloneOrCopy(from, to, beforeReplace) {
|
|
|
600
608
|
try {
|
|
601
609
|
await copyFile(from, temp, constants.COPYFILE_FICLONE);
|
|
602
610
|
beforeReplace?.();
|
|
603
|
-
|
|
611
|
+
renameWithRetry(temp, to);
|
|
604
612
|
} catch (error) {
|
|
605
613
|
await rm(temp, { force: true });
|
|
606
614
|
throw error;
|
|
@@ -656,7 +664,7 @@ async function openBlobStore(dir) {
|
|
|
656
664
|
}
|
|
657
665
|
await mkdir(dirname(blobPath(dir, hash)), { recursive: true });
|
|
658
666
|
const size = (await stat(temp)).size;
|
|
659
|
-
await
|
|
667
|
+
await renameWithRetryAsync(temp, blobPath(dir, hash));
|
|
660
668
|
sizes.set(hash, size);
|
|
661
669
|
total += size;
|
|
662
670
|
return hash;
|
|
@@ -680,7 +688,7 @@ async function openBlobStore(dir) {
|
|
|
680
688
|
}
|
|
681
689
|
const to = blobPath(asideDir, hash);
|
|
682
690
|
await mkdir(dirname(to), { recursive: true });
|
|
683
|
-
const moved = remove && await
|
|
691
|
+
const moved = remove && await renameWithRetryAsync(absPath, to).then(
|
|
684
692
|
() => true,
|
|
685
693
|
() => false
|
|
686
694
|
);
|
|
@@ -690,7 +698,7 @@ async function openBlobStore(dir) {
|
|
|
690
698
|
await rm(temp, { force: true });
|
|
691
699
|
throw error;
|
|
692
700
|
});
|
|
693
|
-
await
|
|
701
|
+
await renameWithRetryAsync(temp, to);
|
|
694
702
|
}
|
|
695
703
|
asideSizes.set(hash, (await stat(to)).size);
|
|
696
704
|
holds.set(hash, /* @__PURE__ */ new Set([path]));
|
|
@@ -891,7 +899,7 @@ function recheckAndMoveAway(historyRoot, id, { now, dryRun, tempDir }) {
|
|
|
891
899
|
if (projectDir === null) return null;
|
|
892
900
|
if (dryRun) return { projectDir, trash: null };
|
|
893
901
|
const trash = join4(historyRoot, `${PRUNED_PREFIX}${id}-${randomUUID5()}`);
|
|
894
|
-
|
|
902
|
+
renameSync(home, trash);
|
|
895
903
|
return { projectDir, trash };
|
|
896
904
|
}
|
|
897
905
|
function abandonedProject(home, id, now, tempDir) {
|
|
@@ -1313,7 +1321,7 @@ async function updateState(dir, update) {
|
|
|
1313
1321
|
state = readState(dir);
|
|
1314
1322
|
} catch (error) {
|
|
1315
1323
|
if (!(error instanceof SyntaxError)) throw error;
|
|
1316
|
-
|
|
1324
|
+
renameSync2(statePath(dir), `${statePath(dir)}.invalid-${randomUUID6()}`);
|
|
1317
1325
|
state = emptyState();
|
|
1318
1326
|
}
|
|
1319
1327
|
update(state);
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
SCENE_PARTS_META,
|
|
17
17
|
SCENE_PART_ATTR,
|
|
18
18
|
assignMediaRenderIds,
|
|
19
|
-
buildVariablesByCompScript,
|
|
20
19
|
clampDurations,
|
|
21
20
|
compileTimingAttrs,
|
|
22
21
|
compositionStyle,
|
|
@@ -25,6 +24,7 @@ import {
|
|
|
25
24
|
cssStyleMergeKey,
|
|
26
25
|
dedupeFontFaceRules,
|
|
27
26
|
deferScriptsUntilFonts,
|
|
27
|
+
emitVariablesByCompScript,
|
|
28
28
|
enumerateNestedCompositionHosts,
|
|
29
29
|
escapeCssAttributeValue,
|
|
30
30
|
escapeCssIdentifier,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
warnUnknownEnumValues,
|
|
60
60
|
wrapInlineScriptWithErrorBoundary,
|
|
61
61
|
wrapScopedCompositionScript
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-ZXTSUXSL.js";
|
|
63
63
|
import {
|
|
64
64
|
cssVariableName
|
|
65
65
|
} from "./chunk-VC76R6W2.js";
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
} from "./chunk-OFQWTKPW.js";
|
|
70
70
|
import {
|
|
71
71
|
lintHyperframeHtml
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-P327BIJR.js";
|
|
73
73
|
import {
|
|
74
74
|
CSS_URL_RE,
|
|
75
75
|
checkSubCompositionUsability,
|
|
@@ -2462,13 +2462,7 @@ async function bundleProject(projectDir, options) {
|
|
|
2462
2462
|
pushRun(styleRuns, void 0, css);
|
|
2463
2463
|
for (const chunk of compScriptChunks)
|
|
2464
2464
|
pushRun(scriptRuns, void 0, chunk);
|
|
2465
|
-
|
|
2466
|
-
if (variablesByCompScript) {
|
|
2467
|
-
if (scriptRuns[0] && !scriptRuns[0].scene)
|
|
2468
|
-
scriptRuns[0].chunks.unshift(variablesByCompScript);
|
|
2469
|
-
else
|
|
2470
|
-
scriptRuns.unshift({ chunks: [variablesByCompScript] });
|
|
2471
|
-
}
|
|
2465
|
+
emitVariablesByCompScript(document, compVariablesByComp);
|
|
2472
2466
|
for (const { scene, chunks } of styleRuns) {
|
|
2473
2467
|
const join = scene ? joinCssHoistingImports : (css) => css.join("\n\n");
|
|
2474
2468
|
for (const style of styleElementsFor(document, chunks, join)) {
|
|
@@ -5,16 +5,17 @@ var require = __hf_createRequire(import.meta.url);
|
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
probeFirstFrameColour,
|
|
9
|
+
probeMediaMetadata
|
|
10
|
+
} from "./chunk-3RATCY3W.js";
|
|
11
|
+
import {
|
|
12
|
+
alphaDecoderFor
|
|
10
13
|
} from "./chunk-5S7W3TUO.js";
|
|
11
14
|
import {
|
|
12
|
-
firstFrameColourArgs,
|
|
13
15
|
formatPreviewProxyBox,
|
|
14
16
|
hdrToSdrToneMapFilter,
|
|
15
|
-
isHeavyForPreview
|
|
16
|
-
|
|
17
|
-
} from "./chunk-7RWUY3BJ.js";
|
|
17
|
+
isHeavyForPreview
|
|
18
|
+
} from "./chunk-MI4V4HPE.js";
|
|
18
19
|
import {
|
|
19
20
|
mkdirWithinProject,
|
|
20
21
|
realProjectRoot,
|
|
@@ -37,168 +38,31 @@ import {
|
|
|
37
38
|
scanHtmlOpeningTags
|
|
38
39
|
} from "./chunk-NHA4NRBE.js";
|
|
39
40
|
|
|
40
|
-
// ../studio-server/dist/chunk-
|
|
41
|
+
// ../studio-server/dist/chunk-FUTDRYQK.js
|
|
41
42
|
import { statSync } from "fs";
|
|
42
43
|
import { sep } from "path";
|
|
43
|
-
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
);
|
|
63
|
-
});
|
|
64
|
-
var VIDEO_EXT = /* @__PURE__ */ new Set([
|
|
65
|
-
".mp4",
|
|
66
|
-
".mov",
|
|
67
|
-
".webm",
|
|
68
|
-
".mkv",
|
|
69
|
-
".avi",
|
|
70
|
-
".m4v",
|
|
71
|
-
".mxf",
|
|
72
|
-
".mts",
|
|
73
|
-
".m2ts",
|
|
74
|
-
".ts"
|
|
75
|
-
]);
|
|
76
|
-
var IMAGE_EXT = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".avif"]);
|
|
77
|
-
var AUDIO_EXT = /* @__PURE__ */ new Set([".mp3", ".wav", ".ogg", ".m4a", ".aac", ".flac"]);
|
|
78
|
-
function lower(value) {
|
|
79
|
-
return value?.toLowerCase() ?? "";
|
|
80
|
-
}
|
|
81
|
-
function inferKindFromPath(path) {
|
|
82
|
-
const ext = extname(path).toLowerCase();
|
|
83
|
-
if (VIDEO_EXT.has(ext)) return "video";
|
|
84
|
-
if (IMAGE_EXT.has(ext)) return "image";
|
|
85
|
-
if (AUDIO_EXT.has(ext)) return "audio";
|
|
86
|
-
return "unknown";
|
|
87
|
-
}
|
|
88
|
-
function colorLabel(input) {
|
|
89
|
-
if (input.isHdr) {
|
|
90
|
-
if (input.hdrTransfer === "pq") return "HDR PQ";
|
|
91
|
-
if (input.hdrTransfer === "hlg") return "HDR HLG";
|
|
92
|
-
return "HDR";
|
|
93
|
-
}
|
|
94
|
-
if (input.colorPrimaries.includes("bt709") || input.colorSpace.includes("bt709") || input.colorTransfer.includes("bt709")) {
|
|
95
|
-
return "SDR Rec.709";
|
|
96
|
-
}
|
|
97
|
-
return "SDR/unknown";
|
|
98
|
-
}
|
|
99
|
-
function classifyMediaColor(stream) {
|
|
100
|
-
const colorPrimaries = lower(stream?.color_primaries);
|
|
101
|
-
const colorSpace = lower(stream?.color_space);
|
|
102
|
-
const colorTransfer = lower(stream?.color_transfer);
|
|
103
|
-
const isHdr = colorPrimaries.includes("bt2020") || colorSpace.includes("bt2020") || colorTransfer === "smpte2084" || colorTransfer === "arib-std-b67";
|
|
104
|
-
const hdrTransfer = isHdr ? colorTransfer === "smpte2084" ? "pq" : colorTransfer === "arib-std-b67" ? "hlg" : "unknown" : null;
|
|
105
|
-
return {
|
|
106
|
-
dynamicRange: stream ? isHdr ? "hdr" : "sdr" : "unknown",
|
|
107
|
-
hdrTransfer,
|
|
108
|
-
label: stream ? colorLabel({ isHdr, hdrTransfer, colorPrimaries, colorSpace, colorTransfer }) : "Unknown",
|
|
109
|
-
isHdr,
|
|
110
|
-
codecName: stream?.codec_name,
|
|
111
|
-
profile: stream?.profile,
|
|
112
|
-
pixelFormat: stream?.pix_fmt,
|
|
113
|
-
colorSpace: stream?.color_space,
|
|
114
|
-
colorTransfer: stream?.color_transfer,
|
|
115
|
-
colorPrimaries: stream?.color_primaries,
|
|
116
|
-
bitsPerRawSample: stream?.bits_per_raw_sample
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
async function probeFirstFrameColour(filePath, runner = execFileRunner) {
|
|
120
|
-
const ffmpegPath = findFfBinary("ffmpeg", { configuredMustExist: true }) ?? (runner === execFileRunner ? void 0 : "ffmpeg");
|
|
121
|
-
if (!ffmpegPath) return {};
|
|
122
|
-
const result = await runner(ffmpegPath, firstFrameColourArgs(filePath), {
|
|
123
|
-
timeout: 15e3,
|
|
124
|
-
maxBuffer: 1024 * 1024
|
|
125
|
-
});
|
|
126
|
-
return result.status === 0 ? parseFirstFrameColour(String(result.stderr)) : {};
|
|
127
|
-
}
|
|
128
|
-
function bitDepthOf(stream) {
|
|
129
|
-
const raw = Number(stream.bits_per_raw_sample);
|
|
130
|
-
if (Number.isFinite(raw) && raw > 0) return raw;
|
|
131
|
-
const suffixed = /(\d{1,3})(?:le|be)$/.exec(stream.pix_fmt ?? "");
|
|
132
|
-
return suffixed ? Number(suffixed[1]) : 8;
|
|
133
|
-
}
|
|
134
|
-
function sourceFactsOf(stream, formatBitrate) {
|
|
135
|
-
if (!stream?.width || !stream.height) return void 0;
|
|
136
|
-
const bitrate = Number(stream.bit_rate ?? formatBitrate);
|
|
137
|
-
return {
|
|
138
|
-
width: stream.width,
|
|
139
|
-
height: stream.height,
|
|
140
|
-
bitDepth: bitDepthOf(stream),
|
|
141
|
-
bitrate: Number.isFinite(bitrate) ? bitrate : 0
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
var STREAM_SUMMARY_MAX = 12;
|
|
145
|
-
function summarizeStream(stream) {
|
|
146
|
-
const flags = Object.entries(stream.disposition ?? {}).filter(([, on]) => on === 1).map(([name]) => name);
|
|
147
|
-
return `${stream.codec_type ?? "?"}:${stream.codec_name ?? "?"}[${flags.join(",")}]`;
|
|
148
|
-
}
|
|
149
|
-
function metadataFromProbe(kind, parsed) {
|
|
150
|
-
const stream = parsed.streams?.find((item) => {
|
|
151
|
-
if (kind === "image") return item.codec_type === "video";
|
|
152
|
-
return item.codec_type === kind && item.disposition?.attached_pic !== 1;
|
|
44
|
+
import { spawn } from "child_process";
|
|
45
|
+
var checks = /* @__PURE__ */ new Map();
|
|
46
|
+
function ffmpegHasHdrFilters(ffmpegPath) {
|
|
47
|
+
const known = checks.get(ffmpegPath);
|
|
48
|
+
if (known) return known;
|
|
49
|
+
const check = new Promise((resolveCheck) => {
|
|
50
|
+
const proc = spawn(ffmpegPath, ["-hide_banner", "-filters"], {
|
|
51
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
52
|
+
windowsHide: true
|
|
53
|
+
});
|
|
54
|
+
let stdout = "";
|
|
55
|
+
proc.stdout?.on("data", (chunk) => {
|
|
56
|
+
stdout += chunk.toString();
|
|
57
|
+
});
|
|
58
|
+
proc.on("error", () => resolveCheck(false));
|
|
59
|
+
proc.on(
|
|
60
|
+
"close",
|
|
61
|
+
(code) => resolveCheck(code === 0 && /\bzscale\b/.test(stdout) && /\btonemap\b/.test(stdout))
|
|
62
|
+
);
|
|
153
63
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
color: classifyMediaColor(stream),
|
|
157
|
-
streams: (parsed.streams ?? []).slice(0, STREAM_SUMMARY_MAX).map(summarizeStream)
|
|
158
|
-
};
|
|
159
|
-
if (kind === "video") {
|
|
160
|
-
metadata.hasAudio = (parsed.streams ?? []).some((item) => item.codec_type === "audio");
|
|
161
|
-
metadata.hasAlpha = stream !== void 0 && videoStreamHasAlpha(stream);
|
|
162
|
-
const duration = Number(parsed.format?.duration);
|
|
163
|
-
if (Number.isFinite(duration) && duration > 0) metadata.durationSeconds = duration;
|
|
164
|
-
metadata.source = sourceFactsOf(stream, parsed.format?.bit_rate);
|
|
165
|
-
}
|
|
166
|
-
return metadata;
|
|
167
|
-
}
|
|
168
|
-
async function probeMediaMetadata(filePath, runner = execFileRunner) {
|
|
169
|
-
const kind = inferKindFromPath(filePath);
|
|
170
|
-
if (kind === "audio" || kind === "unknown") {
|
|
171
|
-
return { kind, color: classifyMediaColor(null) };
|
|
172
|
-
}
|
|
173
|
-
const ffprobePath = findFfBinary("ffprobe", { configuredMustExist: true }) ?? (runner === execFileRunner ? void 0 : "ffprobe");
|
|
174
|
-
if (!ffprobePath) {
|
|
175
|
-
return { kind, color: classifyMediaColor(null), probeError: "ffprobe unavailable" };
|
|
176
|
-
}
|
|
177
|
-
const result = await runner(
|
|
178
|
-
ffprobePath,
|
|
179
|
-
[
|
|
180
|
-
"-v",
|
|
181
|
-
"error",
|
|
182
|
-
"-show_entries",
|
|
183
|
-
"stream=codec_type,codec_name,profile,pix_fmt,color_space,color_transfer,color_primaries,bits_per_raw_sample,width,height,bit_rate:stream_disposition:stream_tags=alpha_mode:format=duration,bit_rate",
|
|
184
|
-
"-of",
|
|
185
|
-
"json",
|
|
186
|
-
"--",
|
|
187
|
-
filePath
|
|
188
|
-
],
|
|
189
|
-
{ timeout: 15e3, maxBuffer: 1024 * 1024 }
|
|
190
|
-
);
|
|
191
|
-
if (result.error?.code === "ENOENT") {
|
|
192
|
-
return { kind, color: classifyMediaColor(null), probeError: "ffprobe unavailable" };
|
|
193
|
-
}
|
|
194
|
-
if (result.status !== 0) {
|
|
195
|
-
return { kind, color: classifyMediaColor(null), probeError: "ffprobe failed" };
|
|
196
|
-
}
|
|
197
|
-
try {
|
|
198
|
-
return metadataFromProbe(kind, JSON.parse(String(result.stdout || "{}")));
|
|
199
|
-
} catch {
|
|
200
|
-
return { kind, color: classifyMediaColor(null), probeError: "ffprobe returned invalid json" };
|
|
201
|
-
}
|
|
64
|
+
checks.set(ffmpegPath, check);
|
|
65
|
+
return check;
|
|
202
66
|
}
|
|
203
67
|
var BROWSER_HOSTILE_CODECS = {
|
|
204
68
|
// HEVC decode is platform-bound, not absent: macOS Chrome answers
|
|
@@ -269,12 +133,13 @@ function decideMediaProxyEligibility(facts, lightBox) {
|
|
|
269
133
|
}
|
|
270
134
|
return { eligible: false, reason: "browser_safe_codec" };
|
|
271
135
|
}
|
|
272
|
-
function codecFactsFor(codecName, hasAlpha, source) {
|
|
136
|
+
function codecFactsFor(codecName, hasAlpha, source, toneMapsToSdr = false) {
|
|
273
137
|
const hostile = hostileCodecEntry(codecName);
|
|
274
138
|
return {
|
|
275
139
|
codecName,
|
|
276
|
-
browserHostile: hostile !== void 0,
|
|
277
|
-
|
|
140
|
+
browserHostile: hostile !== void 0 || toneMapsToSdr,
|
|
141
|
+
// An HDR clip is never 'playable' for preview, whatever its codec: it takes the SDR copy the export uses.
|
|
142
|
+
representativeMime: toneMapsToSdr ? null : hostile?.representativeMime ?? null,
|
|
278
143
|
hasAlpha,
|
|
279
144
|
...source && { source }
|
|
280
145
|
};
|
|
@@ -285,7 +150,22 @@ async function probeCodecFacts(filePath, runner) {
|
|
|
285
150
|
if (metadata.kind !== "video") return null;
|
|
286
151
|
const codecName = metadata.color.codecName;
|
|
287
152
|
if (!codecName) return null;
|
|
288
|
-
|
|
153
|
+
const hasAlpha = metadata.hasAlpha === true;
|
|
154
|
+
const toneMaps = !hasAlpha && await toneMapsHdr(metadata.color.hdrTransfer);
|
|
155
|
+
return codecFactsFor(codecName, hasAlpha, metadata.source, toneMaps);
|
|
156
|
+
}
|
|
157
|
+
var warnedNoHdrFilters = false;
|
|
158
|
+
async function toneMapsHdr(hdrTransfer) {
|
|
159
|
+
if (hdrTransfer !== "pq" && hdrTransfer !== "hlg") return false;
|
|
160
|
+
const ffmpegPath = findFfBinary("ffmpeg");
|
|
161
|
+
if (ffmpegPath && await ffmpegHasHdrFilters(ffmpegPath)) return true;
|
|
162
|
+
if (!warnedNoHdrFilters) {
|
|
163
|
+
warnedNoHdrFilters = true;
|
|
164
|
+
console.warn(
|
|
165
|
+
`[hyperframes] A video in this project is HDR, but this ffmpeg has no zscale/tonemap (libzimg), so the preview plays it as the browser shows it and will not match an SDR export. Install an ffmpeg with libzimg.`
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
return false;
|
|
289
169
|
}
|
|
290
170
|
function createMediaCodecProbeCache() {
|
|
291
171
|
return /* @__PURE__ */ new Map();
|
|
@@ -378,8 +258,8 @@ async function scanProjectMediaCodecMap(projectDir, htmlSources, options = {}) {
|
|
|
378
258
|
return (await scanProjectMedia(projectDir, htmlSources, options)).codecMap;
|
|
379
259
|
}
|
|
380
260
|
|
|
381
|
-
// ../studio-server/dist/chunk-
|
|
382
|
-
import { spawn } from "child_process";
|
|
261
|
+
// ../studio-server/dist/chunk-2B5SR4RJ.js
|
|
262
|
+
import { spawn as spawn2 } from "child_process";
|
|
383
263
|
import { randomUUID } from "crypto";
|
|
384
264
|
import {
|
|
385
265
|
existsSync as existsSync4,
|
|
@@ -393,7 +273,7 @@ import {
|
|
|
393
273
|
import { availableParallelism, tmpdir, totalmem } from "os";
|
|
394
274
|
import { basename as basename3, dirname as dirname3, extname as extname3, isAbsolute, join as join4, relative, resolve, sep as sep2 } from "path";
|
|
395
275
|
import { existsSync, readdirSync, statSync as statSync2, unlinkSync } from "fs";
|
|
396
|
-
import { extname
|
|
276
|
+
import { extname, join } from "path";
|
|
397
277
|
import { createHash } from "crypto";
|
|
398
278
|
import {
|
|
399
279
|
closeSync,
|
|
@@ -405,7 +285,7 @@ import {
|
|
|
405
285
|
statSync as statSync22,
|
|
406
286
|
writeFileSync
|
|
407
287
|
} from "fs";
|
|
408
|
-
import { basename, dirname, extname as
|
|
288
|
+
import { basename, dirname, extname as extname2, join as join2 } from "path";
|
|
409
289
|
import {
|
|
410
290
|
closeSync as closeSync2,
|
|
411
291
|
existsSync as existsSync3,
|
|
@@ -474,7 +354,7 @@ function readCacheInventory(cacheDir, protectedPaths, now, staleTempMs) {
|
|
|
474
354
|
if (leftoverIsDead(cacheDir, dirent.name, stat.mtimeMs, protectedPaths, now, staleTempMs)) {
|
|
475
355
|
staleTemps.push(entry);
|
|
476
356
|
}
|
|
477
|
-
} else if (TRANSCODER_PROXY_NAME.test(dirent.name) && PROXY_EXTENSIONS.has(
|
|
357
|
+
} else if (TRANSCODER_PROXY_NAME.test(dirent.name) && PROXY_EXTENSIONS.has(extname(dirent.name))) {
|
|
478
358
|
entries.push(entry);
|
|
479
359
|
}
|
|
480
360
|
}
|
|
@@ -569,7 +449,7 @@ function sourceSizeBytes(sourcePath) {
|
|
|
569
449
|
}
|
|
570
450
|
}
|
|
571
451
|
function fastIndexPath(cachePath) {
|
|
572
|
-
return join2(dirname(cachePath), `.fast-${basename(cachePath,
|
|
452
|
+
return join2(dirname(cachePath), `.fast-${basename(cachePath, extname2(cachePath))}`);
|
|
573
453
|
}
|
|
574
454
|
function contentIndexPath(cacheDir, contentKey) {
|
|
575
455
|
return join2(cacheDir, `.content-${contentKey}`);
|
|
@@ -836,29 +716,8 @@ function markCacheEntryUsed(cachePath) {
|
|
|
836
716
|
}
|
|
837
717
|
}
|
|
838
718
|
var failedTranscodes = /* @__PURE__ */ new Map();
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
if (hdrFilterCheck?.ffmpegPath === ffmpegPath) return hdrFilterCheck.promise;
|
|
842
|
-
const promise = new Promise((resolveCheck, rejectCheck) => {
|
|
843
|
-
const proc = spawn(ffmpegPath, ["-hide_banner", "-filters"], {
|
|
844
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
845
|
-
windowsHide: true
|
|
846
|
-
});
|
|
847
|
-
let stdout = "";
|
|
848
|
-
proc.stdout?.on("data", (chunk) => {
|
|
849
|
-
stdout += chunk.toString();
|
|
850
|
-
});
|
|
851
|
-
proc.on("error", () => rejectCheck(new FfmpegMissingFilterError()));
|
|
852
|
-
proc.on("close", (code) => {
|
|
853
|
-
if (code !== 0 || !/\bzscale\b/.test(stdout) || !/\btonemap\b/.test(stdout)) {
|
|
854
|
-
rejectCheck(new FfmpegMissingFilterError());
|
|
855
|
-
} else {
|
|
856
|
-
resolveCheck();
|
|
857
|
-
}
|
|
858
|
-
});
|
|
859
|
-
});
|
|
860
|
-
hdrFilterCheck = { ffmpegPath, promise };
|
|
861
|
-
return promise;
|
|
719
|
+
async function ensureHdrFilters(ffmpegPath) {
|
|
720
|
+
if (!await ffmpegHasHdrFilters(ffmpegPath)) throw new FfmpegMissingFilterError();
|
|
862
721
|
}
|
|
863
722
|
function rememberFailure(cachePath, error) {
|
|
864
723
|
const ttlMs = error instanceof FfmpegUnavailableError || error instanceof FfmpegMissingFilterError ? ENVIRONMENT_FAILURE_TTL_MS : FAILURE_CACHE_TTL_MS;
|
|
@@ -1115,6 +974,10 @@ async function runFfmpeg(sourcePath, outputPath, chunkPrefix, variant, box, sign
|
|
|
1115
974
|
const videoFilter = await buildVideoFilter(ffmpegPath, sourcePath, metadata, keepsAlpha, box);
|
|
1116
975
|
const alphaDecoder = keepsAlpha ? alphaDecoderFor(metadata.color.codecName) : null;
|
|
1117
976
|
const decoderArgs = alphaDecoder ? ["-c:v", alphaDecoder] : [];
|
|
977
|
+
const streamArgs = [
|
|
978
|
+
...["-map", "0:V:0"],
|
|
979
|
+
...metadata.audioStream === void 0 ? [] : ["-map", `0:a:${metadata.audioStream}`]
|
|
980
|
+
];
|
|
1118
981
|
const totalSeconds = metadata.durationSeconds;
|
|
1119
982
|
const gate = keepsAlpha ? ALPHA_PIECE_GATE : UNGATED;
|
|
1120
983
|
const vp8Threads = (pieces) => [
|
|
@@ -1132,6 +995,7 @@ async function runFfmpeg(sourcePath, outputPath, chunkPrefix, variant, box, sign
|
|
|
1132
995
|
...decoderArgs,
|
|
1133
996
|
"-i",
|
|
1134
997
|
sourcePath,
|
|
998
|
+
...streamArgs,
|
|
1135
999
|
...range ? ["-t", String(range.lengthSeconds)] : [],
|
|
1136
1000
|
"-vf",
|
|
1137
1001
|
videoFilter,
|
|
@@ -1186,7 +1050,7 @@ var OUT_TIME = /^out_time_(?:us|ms)=(\d+)$/;
|
|
|
1186
1050
|
function spawnFfmpeg(ffmpegPath, args, stallMs, signal, onProgress) {
|
|
1187
1051
|
return new Promise((resolvePromise, reject) => {
|
|
1188
1052
|
signal.throwIfAborted();
|
|
1189
|
-
const proc =
|
|
1053
|
+
const proc = spawn2(ffmpegPath, args, {
|
|
1190
1054
|
stdio: ["ignore", "pipe", "pipe"],
|
|
1191
1055
|
killSignal: "SIGKILL",
|
|
1192
1056
|
signal,
|
|
@@ -1424,7 +1288,6 @@ function joinJob(promise, job, signal) {
|
|
|
1424
1288
|
}
|
|
1425
1289
|
|
|
1426
1290
|
export {
|
|
1427
|
-
probeMediaMetadata,
|
|
1428
1291
|
shouldPrewarmProxy,
|
|
1429
1292
|
recordProxyPrewarm,
|
|
1430
1293
|
recordProxyRequest,
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
createFileAtomically
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NQ2INEHX.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/writeNewFile.ts
|
|
12
12
|
function writeNewFileSync(filePath, content) {
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
downloadToFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QIDN4ML5.js";
|
|
10
10
|
import {
|
|
11
11
|
CACHE_DIR,
|
|
12
12
|
PINNED_PACKAGES,
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
emitWords,
|
|
22
22
|
getPreparedWavDurationSeconds,
|
|
23
23
|
prepareWav
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-SWHCYFEF.js";
|
|
25
25
|
import {
|
|
26
26
|
stoppedByCancelSignal
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-RVG2JNDU.js";
|
|
28
28
|
import {
|
|
29
29
|
verifies
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-3PUXUIWB.js";
|
|
31
31
|
import {
|
|
32
32
|
PARAKEET_MODEL_LABEL,
|
|
33
33
|
SHERPA_ERROR_PREFIX,
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
runCancellableProcess,
|
|
9
9
|
runRenderSetupWorker
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q43YUROE.js";
|
|
11
11
|
import {
|
|
12
12
|
getFreeDiskMb
|
|
13
13
|
} from "./chunk-QSFWGZG6.js";
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
browserPathFromEnv,
|
|
16
16
|
managedChromeVersion,
|
|
17
17
|
pickSharedShell
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ERUQ3S6D.js";
|
|
19
19
|
import {
|
|
20
20
|
normalizeErrorMessage
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EU7MVORF.js";
|
|
22
22
|
|
|
23
23
|
// src/browser/manager.ts
|
|
24
24
|
import { execSync, spawnSync } from "child_process";
|