hyperframes 0.9.52 → 0.9.53
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-Z6G2DLNE.js → add-TZFSLV5M.js} +21 -16
- package/dist/{agentPromptGenerator-RCTC2XXL.js → agentPromptGenerator-OPQZUVYC.js} +12 -17
- package/dist/{animatedGifPrep-X7KILCDI.js → animatedGifPrep-DEK4XZYT.js} +15 -16
- package/dist/api.js +46 -46
- package/dist/{asset-A3ENWWCU.js → asset-3BIBG7LB.js} +2 -2
- package/dist/{assetCataloger-TIMZTOYH.js → assetCataloger-R4NWWO4P.js} +13 -13
- package/dist/{audio-HMCUO2CV.js → audio-N3DHNT3F.js} +38 -31
- package/dist/{auth-NXR3QM4C.js → auth-CBF2DVRT.js} +5 -5
- package/dist/{autoUpdate-TY7P2Z4F.js → autoUpdate-UJB4MI4Z.js} +5 -3
- package/dist/{avatars-36MYJUPA.js → avatars-JVATTQYO.js} +21 -19
- package/dist/{backgroundChecks-EWWJEGF6.js → backgroundChecks-R7SFELIM.js} +6 -4
- package/dist/backgroundChecksWorker.js +6 -5
- package/dist/{batchRender-VKM4E7PI.js → batchRender-D4VO4OCF.js} +26 -7
- package/dist/{beats-Z4B4B4KM.js → beats-UCYZ7MKK.js} +14 -14
- package/dist/{benchmark-PLGO2THH.js → benchmark-3NMJO5DK.js} +31 -14
- package/dist/{billing-ZIXACCLR.js → billing-76JTGOHN.js} +18 -17
- package/dist/{browser-VZFBNASB.js → browser-5XXA4O25.js} +11 -11
- package/dist/{bundleWithLocalizedFonts-XD2XDEQL.js → bundleWithLocalizedFonts-S7DIF43W.js} +1 -1
- package/dist/{capture-BAFLHNDI.js → capture-EV4G3SCY.js} +33 -34
- package/dist/{capture-GC4F54XT.js → capture-JHMVFAUS.js} +4 -4
- package/dist/{captureCompositionFrame-YBVEFKWM.js → captureCompositionFrame-3M3BFHZH.js} +19 -19
- package/dist/{catalog-LHOCJUO2.js → catalog-WVZJ6XYV.js} +21 -16
- package/dist/{catch-up-6FNQ6I7Q.js → catch-up-FQ5KCZIH.js} +11 -11
- package/dist/{check-S7T5LE6V.js → check-VTUVZWCF.js} +52 -49
- package/dist/{checkAudio-AKOI4AWK.js → checkAudio-FYRBXK22.js} +19 -19
- package/dist/{checkBrowser-NABXGNNM.js → checkBrowser-EJQEWSIH.js} +46 -43
- package/dist/{chunk-YXQA6MKA.js → chunk-2ODGEXNH.js} +4 -4
- package/dist/{chunk-7SZ7QQJ3.js → chunk-2ST2FAVH.js} +2 -2
- package/dist/{chunk-POGZYVM2.js → chunk-2YSQU74C.js} +9 -9
- package/dist/{chunk-H4S3WY2N.js → chunk-346RTE74.js} +1 -1
- package/dist/{chunk-Z46RV43W.js → chunk-35PKJPEI.js} +2 -2
- package/dist/{chunk-MQGRMXFN.js → chunk-365OGBQ2.js} +3 -3
- package/dist/chunk-3FHPYC6X.js +5069 -0
- package/dist/{chunk-6PXVXIC7.js → chunk-3FL7MKQH.js} +163 -60
- package/dist/{chunk-SQ64IEA7.js → chunk-3HQ4C4HI.js} +2 -2
- package/dist/{chunk-CDK23M57.js → chunk-43ILJV43.js} +11 -11
- package/dist/{chunk-RMO7KIFX.js → chunk-44OCDK5C.js} +4 -4
- package/dist/{chunk-APT2TSYC.js → chunk-47IXIEBQ.js} +1 -1
- package/dist/{chunk-FCNMU7LC.js → chunk-4FOHO7GC.js} +1 -1
- package/dist/{chunk-CQ5VQNOD.js → chunk-4KRID4YV.js} +1 -1
- package/dist/{chunk-MR7VKWYT.js → chunk-4KS3GL5I.js} +1 -1
- package/dist/{chunk-4Q2HYZZK.js → chunk-4TJGOQER.js} +58 -3
- package/dist/{chunk-YJFIGFON.js → chunk-562X3KBJ.js} +2 -2
- package/dist/chunk-5A75E4OT.js +72 -0
- package/dist/{chunk-XHUFLQGD.js → chunk-5CRHNVJW.js} +3 -3
- package/dist/{chunk-22EEGJLH.js → chunk-5JOYZGHQ.js} +82 -54
- package/dist/{chunk-NQ3NHCF6.js → chunk-5SMHNPMW.js} +2 -2
- package/dist/{chunk-24M5C5EQ.js → chunk-6CO6L3YP.js} +1 -1
- package/dist/{chunk-MP4TEYUJ.js → chunk-6EMFSRTW.js} +4 -1
- package/dist/{chunk-H4LCNEA2.js → chunk-6F4ZVQUX.js} +195 -128
- package/dist/{chunk-YRXIEP35.js → chunk-6RPLXBZJ.js} +89 -10
- package/dist/{chunk-7RLMDAUO.js → chunk-6T4PB35F.js} +2 -1
- package/dist/{chunk-VOJ3ICMF.js → chunk-7ELQHSEE.js} +1 -1
- package/dist/{chunk-NXDFCWF2.js → chunk-7FU5JCAK.js} +1 -1
- package/dist/{chunk-UFET7UTU.js → chunk-B3WRUPRS.js} +2 -2
- package/dist/{chunk-TI7JN55F.js → chunk-BCJJ64JG.js} +1 -1
- package/dist/{chunk-P27QDOID.js → chunk-BH5P5QZN.js} +4 -4
- package/dist/{chunk-RIHRYTNB.js → chunk-BQRJZDSM.js} +15 -15
- package/dist/{chunk-7GVHPY7W.js → chunk-BS36NRXV.js} +1 -1
- package/dist/{chunk-PRG42HNH.js → chunk-CBV4W4R3.js} +2 -2
- package/dist/{chunk-UX2KMUKC.js → chunk-CTHG3WLB.js} +9 -9
- package/dist/{chunk-MF53JVZ5.js → chunk-CYBOQOKO.js} +1 -1
- package/dist/{chunk-DPVXBVLL.js → chunk-DZWAYZG2.js} +6254 -6096
- package/dist/{chunk-AMWWQXTC.js → chunk-E3LZAM64.js} +5 -5
- package/dist/{chunk-B2ZZYISD.js → chunk-ECGNWHFE.js} +29 -6
- package/dist/{chunk-ZG6BVWQ7.js → chunk-ES273AD6.js} +3 -3
- package/dist/{chunk-R64WJS45.js → chunk-FH6KC5EF.js} +6 -6
- package/dist/{chunk-S5EMQAKL.js → chunk-FLPVKGBS.js} +2 -2
- package/dist/{chunk-HLXZFHEY.js → chunk-FM5JRUWL.js} +6 -6
- package/dist/{chunk-DE7Q2LWF.js → chunk-FQMP2KFS.js} +2 -2
- package/dist/{chunk-ZXMZSU5Y.js → chunk-FRM4EM52.js} +15 -15
- package/dist/chunk-FSBV6Z7E.js +351 -0
- package/dist/{chunk-U7ZCBWNM.js → chunk-FU2R6OVR.js} +3 -3
- package/dist/{chunk-4OHV7UZZ.js → chunk-FZNH7SCB.js} +1 -1
- package/dist/{chunk-O45HB74L.js → chunk-G5FNJQER.js} +31 -27
- package/dist/{chunk-G6QCHM2N.js → chunk-G7GTO4YP.js} +4 -4
- package/dist/{chunk-WN4W76IQ.js → chunk-GDWPLGHY.js} +1 -1
- package/dist/{chunk-UB44XZOI.js → chunk-GVUG5VDL.js} +1 -1
- package/dist/{chunk-YXR5MVBM.js → chunk-GZG2Z2O2.js} +2 -2
- package/dist/{chunk-7QM73IH2.js → chunk-H5K3FS4W.js} +4 -4
- package/dist/{chunk-MOTJT42J.js → chunk-HJ2YUPBF.js} +13 -1
- package/dist/{chunk-47MEWWCO.js → chunk-HY25JZQ2.js} +2 -2
- package/dist/{chunk-DONVZZLV.js → chunk-HYO4DIYT.js} +1 -1
- package/dist/{chunk-6NGJ55V5.js → chunk-HZ2CD6RL.js} +1 -1
- package/dist/{chunk-WPC2FKNB.js → chunk-I7NTTMET.js} +326 -114
- package/dist/{chunk-P37ZACC6.js → chunk-I7SJBRVT.js} +3 -3
- package/dist/{chunk-CIMOTEZB.js → chunk-IB5DXMAH.js} +4 -4
- package/dist/{chunk-MI54IK7G.js → chunk-IEESWUIQ.js} +11 -2
- package/dist/{chunk-6MKM2RVL.js → chunk-IH2C53YV.js} +460 -1
- package/dist/{chunk-GEIWJSWN.js → chunk-IH56MGAB.js} +10 -10
- package/dist/{chunk-6MYO2IHD.js → chunk-IHXMN5YH.js} +7 -0
- package/dist/{chunk-YHJOTCTV.js → chunk-IJYIIHGK.js} +10 -5
- package/dist/{chunk-L2KUIV56.js → chunk-ISVRNYE5.js} +1 -1
- package/dist/{chunk-QP7MQ43Y.js → chunk-IXUIJ7OL.js} +3 -3
- package/dist/chunk-JCFOSR7Z.js +181 -0
- package/dist/{chunk-HS7LT4PL.js → chunk-JNM4WG7C.js} +1 -1
- package/dist/{chunk-WSZJS4QC.js → chunk-KDDRDNEE.js} +60 -9
- package/dist/{chunk-UAU4SIOQ.js → chunk-KEZ7QIJN.js} +6 -6
- package/dist/{chunk-ZW6ZUKBB.js → chunk-KKO4PRB5.js} +1 -1
- package/dist/{chunk-M3BJEZ7E.js → chunk-KPFJGQ6M.js} +45 -12
- package/dist/{chunk-YPURY3MW.js → chunk-LKWN2F7O.js} +2 -2
- package/dist/{chunk-CIGQUDEV.js → chunk-N2YHCAFL.js} +50 -15
- package/dist/{chunk-Z2EKCD7H.js → chunk-NCPSUM5A.js} +1 -1
- package/dist/{chunk-64T46P7K.js → chunk-NVGB7L2M.js} +2 -2
- package/dist/{chunk-2MNSS7PH.js → chunk-OLVZAALP.js} +2 -2
- package/dist/{chunk-LZTBL7SR.js → chunk-OSKSTJNQ.js} +12 -2
- package/dist/{chunk-QUUZ2BGC.js → chunk-OUPWEFUM.js} +1 -1
- package/dist/{chunk-4QFWV5GQ.js → chunk-P2ZMVHTF.js} +2 -1
- package/dist/{chunk-T6VQGCN3.js → chunk-PPLFDG7N.js} +9 -5
- package/dist/{chunk-UBHBB3TB.js → chunk-PUT3NPVE.js} +43 -51
- package/dist/{chunk-IMNIW22F.js → chunk-PYOCEDTU.js} +2 -2
- package/dist/{chunk-E2KJT7JR.js → chunk-Q5P7YJXO.js} +2 -2
- package/dist/{chunk-42JBYXIQ.js → chunk-QBDT7Z5D.js} +38 -22
- package/dist/{chunk-3LIMD4YP.js → chunk-QBN2W4T3.js} +6 -8
- package/dist/{chunk-J45SCYTD.js → chunk-QXYR7LOO.js} +7 -7
- package/dist/{chunk-LNZHSISH.js → chunk-RH6UD7XI.js} +11 -11
- package/dist/{chunk-IZQDQ5AN.js → chunk-RUQ2VOD3.js} +3 -2
- package/dist/{chunk-ETXOQXWT.js → chunk-SH6PAYUD.js} +5 -5
- package/dist/{chunk-M6TIOPL5.js → chunk-SRPPNXGX.js} +3 -3
- package/dist/{chunk-LIPVGXPV.js → chunk-SXZMJ7QJ.js} +4 -4
- package/dist/{chunk-ZGWOCGSJ.js → chunk-T3QK3VKM.js} +1 -1
- package/dist/{chunk-DC7AOIHN.js → chunk-T5S7U5C6.js} +1 -1
- package/dist/{chunk-RULKJFRT.js → chunk-TQKX3TA3.js} +1 -1
- package/dist/{chunk-IB722ALN.js → chunk-TTP6JGIL.js} +2 -2
- package/dist/{chunk-DYYAFCZH.js → chunk-TWI33YJP.js} +1 -1
- package/dist/{chunk-5B425ZB3.js → chunk-UAOL5PRX.js} +1 -1
- package/dist/{chunk-L56WTLQP.js → chunk-VCHJV7ZT.js} +10 -9
- package/dist/{chunk-M425BL2U.js → chunk-VCKUDUPN.js} +1 -1
- package/dist/{chunk-UIIQA7DN.js → chunk-W6WVHIU7.js} +6 -3
- package/dist/{chunk-JJLPGVTA.js → chunk-WPG76RJZ.js} +1 -1
- package/dist/{chunk-VXX4S2PH.js → chunk-XBPLO6CY.js} +384 -94
- package/dist/{chunk-M4E7CMYS.js → chunk-XJTFSMZK.js} +2 -2
- package/dist/{chunk-X3IULMVV.js → chunk-XM7LOJBP.js} +1 -1
- package/dist/{chunk-HT4FWRIT.js → chunk-XZZF6YBS.js} +1 -1
- package/dist/{chunk-4FWR7OE3.js → chunk-Y6CLFCYX.js} +3 -3
- package/dist/{chunk-7VQ3RAKO.js → chunk-YF34MK67.js} +19 -16
- package/dist/{chunk-UX4HQHMS.js → chunk-YT3LRZA3.js} +12 -10
- package/dist/{chunk-MOR3H5FK.js → chunk-ZFCK46UR.js} +1 -1
- package/dist/{chunk-C66O6A2J.js → chunk-ZI3MSFSN.js} +2 -2
- package/dist/{chunk-2AZMG6DR.js → chunk-ZK6BC3JM.js} +4 -4
- package/dist/{chunk-TDQUQAW5.js → chunk-ZPPEZJVD.js} +97 -39
- package/dist/{chunk-I6SCA2ME.js → chunk-ZT7RB42S.js} +43 -21
- package/dist/{chunk-KUZTIMY3.js → chunk-ZV3RIHRN.js} +7 -7
- package/dist/{clean-Y6YIQRPM.js → clean-KEVJGNES.js} +29 -28
- package/dist/cli.js +67 -66
- package/dist/{cloud-5C5SCK4H.js → cloud-EBJZO6ZY.js} +5 -4
- package/dist/{cloud-A5U7YYNA.js → cloud-OR62JJDE.js} +4 -4
- package/dist/{cloudrun-EULFHQQL.js → cloudrun-HPYJTM5N.js} +9 -9
- package/dist/{compare-6XCTMUF3.js → compare-353XZU2M.js} +43 -41
- package/dist/{compiler-DUG4GFRI.js → compiler-KPDUYBA5.js} +8 -8
- package/dist/{component-JDQIZSAL.js → component-5DZDY74T.js} +3 -3
- package/dist/{compositions-HZDEOSRL.js → compositions-VBICZHMF.js} +27 -20
- package/dist/{curve-SE7ZAMI6.js → curve-KDRSQWHP.js} +18 -17
- package/dist/{cuts-AEFJGBFP.js → cuts-ABAQKTF4.js} +19 -18
- package/dist/{delete-EQUQ7Z2K.js → delete-BXURHIL4.js} +10 -7
- package/dist/{deploy-NSLC6BYZ.js → deploy-4TBYCBNI.js} +7 -7
- package/dist/{describeProject-FTJBPDL3.js → describeProject-K62TKQLI.js} +14 -14
- package/dist/{destroy-4O4T3KL3.js → destroy-FAJUHCW4.js} +6 -6
- package/dist/{deterministicFonts-QY4KNTOU.js → deterministicFonts-XZIQ4PNP.js} +3 -3
- package/dist/{diff-VJ3CS7YE.js → diff-4O7ZCBM5.js} +43 -41
- package/dist/{dist-MXWEGMRB.js → dist-AAGJ6SXG.js} +5 -5
- package/dist/{dist-MNFB4YKV.js → dist-D67752QW.js} +18 -18
- package/dist/{dist-2YJCNIWI.js → dist-F4T6FB7P.js} +6 -6
- package/dist/{doctor-RR7SNO6X.js → doctor-IEUIWBC5.js} +23 -18
- package/dist/{dotEnv-33RDHX7P.js → dotEnv-RZ52L7X3.js} +5 -4
- package/dist/{energy-PN23W2UJ.js → energy-BJQTVGBO.js} +19 -18
- package/dist/{events-4ECJEB2W.js → events-4UBI5WNS.js} +10 -10
- package/dist/{events-NR6UPBHG.js → events-D3NBN44E.js} +4 -4
- package/dist/{events-5OLO73VJ.js → events-M37XFHGJ.js} +21 -20
- package/dist/{execute-TS3BP65F.js → execute-JCLM27KS.js} +36 -36
- package/dist/{extract-GCZ5HSEN.js → extract-AYWY5PIN.js} +19 -18
- package/dist/{face-QKMYBRV3.js → face-TEHC6WYN.js} +20 -19
- package/dist/{feedback-3H43EK7N.js → feedback-JZDCB5N4.js} +42 -30
- package/dist/{ffmpeg-JRNM74WY.js → ffmpeg-JMPVMPDT.js} +15 -15
- package/dist/{figma-JGP2UGGU.js → figma-6MYT2VRV.js} +3 -3
- package/dist/fontLocalizeCli.js +20 -21
- package/dist/{frames-OYSWKB3F.js → frames-NLFBDILH.js} +20 -19
- package/dist/{generate-TDXLUFMR.js → generate-YLPRVWHZ.js} +32 -30
- package/dist/{get-UB2MNBYO.js → get-APCR6ZJE.js} +10 -7
- package/dist/{gpuPolicy-6CTTH3NY.js → gpuPolicy-YXBUP4AF.js} +12 -12
- package/dist/{grade-compare-2DXT4RWV.js → grade-compare-VLWGCI4O.js} +43 -41
- package/dist/{gsapParser-L7TM3RGH.js → gsapParser-TSPNHW7F.js} +1 -1
- package/dist/hangReport.js +2 -1
- package/dist/{heifImagePrep-VDZVZ4G7.js → heifImagePrep-UC2AV5LU.js} +16 -17
- package/dist/{help-RGKY4DR4.js → help-YSBTU7WC.js} +1 -1
- package/dist/{history-AVDXYNAP.js → history-EPIGMZUN.js} +15 -14
- 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-NGTQABZC.js → info-6SF6E2T3.js} +26 -20
- package/dist/{init-C3EARHDW.js → init-BXS47X5W.js} +40 -38
- package/dist/{ink-ISO3VXRQ.js → ink-BWKWSIKA.js} +19 -18
- package/dist/{inspect-V6MPU5I5.js → inspect-NUE2R2OF.js} +44 -41
- package/dist/{installer-FI6HT2FW.js → installer-T57TKMM6.js} +7 -7
- package/dist/{keyframes-PTJDE47Y.js → keyframes-WCRUYIOQ.js} +19 -15
- package/dist/{lambda-JTO5YD2I.js → lambda-L2YNMAL5.js} +18 -18
- package/dist/{layout-QMLEZP5T.js → layout-FXTXMDAL.js} +44 -41
- package/dist/{lint-6BWOQAW6.js → lint-IKRYTERJ.js} +23 -17
- package/dist/{lintProject-G4MXY4YA.js → lintProject-2NDIJLD2.js} +6 -6
- package/dist/{list-7E4VD7JA.js → list-BX5SCZEC.js} +10 -7
- package/dist/{localPage-BQOYZAOW.js → localPage-HY3VMEYU.js} +12 -12
- package/dist/{login-37MSZXCY.js → login-5IDR2M6C.js} +6 -5
- package/dist/{logout-QGNBUJKS.js → logout-MTWA4BBI.js} +2 -1
- package/dist/{look-5GXW3NVP.js → look-7R4YJNX7.js} +19 -18
- package/dist/{manager-TMKN4DX5.js → manager-DBMIO5YG.js} +2 -2
- package/dist/{manager-J2IRAOR7.js → manager-PHCAZFHT.js} +13 -13
- package/dist/{measure-23IL23BL.js → measure-7CJ4RKSY.js} +11 -11
- package/dist/{media-treatment-7ODBREPX.js → media-treatment-HEW3RMDV.js} +22 -21
- package/dist/{media-use-QJA6NB3V.js → media-use-S5IJPK5G.js} +11 -18
- package/dist/{models-2Z6SURXU.js → models-4UJY22Z3.js} +16 -16
- package/dist/{motionShot-CYS3L6FK.js → motionShot-FLZQ75TM.js} +23 -23
- package/dist/{normalize-audio-6YVF4LED.js → normalize-audio-AN3KKSSK.js} +16 -16
- package/dist/{open-WQ6NRHCN.js → open-AHPOLDBY.js} +26 -20
- package/dist/{parakeetRunner-R7KK6ZHD.js → parakeetRunner-4URDK3H4.js} +17 -17
- package/dist/{pipeline-HRCK2JQL.js → pipeline-O5UWLQDZ.js} +15 -15
- package/dist/{plan-FQNKACYR.js → plan-SUV7WBBJ.js} +25 -25
- package/dist/{play-UJZBNX2O.js → play-LHMMHUUN.js} +37 -33
- package/dist/{preflight-VIMLSE3I.js → preflight-FLSEP55G.js} +14 -14
- package/dist/{present-JIOVM3ZH.js → present-VEDXFFPZ.js} +31 -28
- package/dist/{preview-HCYGBEWR.js → preview-FXNPXOJL.js} +41 -33
- package/dist/privateProjectFile-NN7MTTEQ.js +50 -0
- package/dist/{probe-6YQA2ZZC.js → probe-P6LUMX34.js} +19 -18
- package/dist/{producer-JIM74BGL.js → producer-SWV2GP4I.js} +1 -1
- package/dist/{projectConfig-VPL64JBD.js → projectConfig-EPOIXMHL.js} +9 -9
- package/dist/{publicNetwork-F3ZXSVOD.js → publicNetwork-GW7SVP7N.js} +1 -1
- package/dist/{publication-ST3VFFWM.js → publication-SIGMWEK3.js} +5 -5
- package/dist/{publish-3TTCO4R4.js → publish-EVCYPK6H.js} +45 -32
- package/dist/{refresh-6ONVQ3WV.js → refresh-PIFEWEAL.js} +2 -1
- package/dist/{remove-background-XTICO22L.js → remove-background-AFXDE5YR.js} +16 -16
- package/dist/{render-MG5MX45D.js → render-BCKSDBLK.js} +8 -8
- package/dist/{render-PFBZJRAN.js → render-DFUMSKVQ.js} +65 -55
- package/dist/{render-WYDOZEZ5.js → render-MENZ6KS5.js} +82 -50
- package/dist/{render-batch-C3XGAQGX.js → render-batch-DPT67NDL.js} +8 -8
- package/dist/renderSetupWorker.js +8 -8
- package/dist/{resolver-AGMKICJW.js → resolver-EE3255VM.js} +7 -7
- package/dist/{reverse-TV524NFW.js → reverse-TA73U7V6.js} +1 -1
- package/dist/{run-NQBD5RDR.js → run-Y2ISHW5P.js} +5 -4
- package/dist/{screenshotCapture-OUZMH7EQ.js → screenshotCapture-CEEBQ3FU.js} +14 -14
- package/dist/{service-UIHDIMFM.js → service-6P6QVFNF.js} +19 -18
- package/dist/{share-WD7MCA4I.js → share-Q25X6AIX.js} +24 -23
- package/dist/{sherpa-H67ZJICN.js → sherpa-PPSJ23WI.js} +16 -16
- package/dist/sherpaWorker.js +2 -2
- package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
- package/dist/skills/media-use/audio/references/tts.md +3 -2
- package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +95 -15
- package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +192 -2
- package/dist/skills/media-use/references/heygen.md +1 -1
- package/dist/{skills-7TUSQF6W.js → skills-PVJJ3R2V.js} +14 -13
- package/dist/{skillsUpdateCheck-HF6SQWRA.js → skillsUpdateCheck-L4TGSUN6.js} +6 -4
- package/dist/{snapshot-P7ZSTKED.js → snapshot-AIAJRR5C.js} +93 -54
- package/dist/{src-TQQ743H4.js → src-O5P56HIK.js} +20 -14
- package/dist/{src-H2EUJUV3.js → src-UEH4H4UY.js} +18 -19
- package/dist/{start-7ZTAKHD4.js → start-HY5WGCDN.js} +30 -28
- package/dist/{staticProjectServer-X4PARIVN.js → staticProjectServer-WNKXSUBZ.js} +28 -27
- package/dist/{status-ELQXIXIB.js → status-AFDHSUGG.js} +21 -20
- package/dist/studio/assets/{hyperframes-player-D7LhzIg1.js → hyperframes-player-z7r-N5fm.js} +2 -2
- package/dist/studio/assets/{index-CQ7o0CBU.js → index-2QPHxCxy.js} +1 -1
- package/dist/studio/assets/{index-D3WxJaqm.js → index-Dpo7Q_9-.js} +160 -160
- package/dist/studio/assets/index-Dv67Vrl6.js +74 -0
- package/dist/studio/assets/{pausedVideoDecoder-BVUmBgn0.js → pausedVideoDecoder-BarDYEAf.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-OJEU24EG.js → studio-api-P72FA5XB.js} +18 -18
- package/dist/{studioServer-E5CLZC46.js → studioServer-RICH4NMX.js} +81 -70
- package/dist/{sync-VEJWMKDP.js → sync-J66DIXED.js} +19 -18
- package/dist/system-I5KGZTUG.js +1 -1
- package/dist/{telemetry-3U4UGQ5V.js → telemetry-KOOKPGMR.js} +10 -10
- package/dist/{templates-AUAOWIYA.js → templates-6DRGOTNH.js} +19 -18
- package/dist/{timeline-YO27AP66.js → timeline-UZX7366C.js} +29 -28
- package/dist/{tokens-UXLQGLVG.js → tokens-AU3BUE6U.js} +2 -2
- package/dist/{transcribe-I7MTUH4M.js → transcribe-CW5HK2OA.js} +33 -32
- package/dist/{transcribe-FZ3TE4FK.js → transcribe-OUTSVFRZ.js} +15 -15
- package/dist/{tts-3VHEX4RB.js → tts-X3MAUZ7E.js} +1 -1
- package/dist/{update-KBKSO3SH.js → update-KRYJ6ACJ.js} +15 -14
- package/dist/{updateCheck-MUYN55HR.js → updateCheck-WQVGQLCG.js} +5 -3
- package/dist/{upgrade-CRCX7CCK.js → upgrade-S54RPT3R.js} +6 -4
- package/dist/{urlDownloader-4EM6GLN4.js → urlDownloader-MASRYSQX.js} +11 -11
- package/dist/{validate-Y2KF2DU3.js → validate-4QVUHCYG.js} +36 -35
- package/dist/{video-HG6SINBD.js → video-AEGOEGSP.js} +13 -13
- package/dist/{voices-O4UHHFZS.js → voices-T4U7EU5X.js} +29 -27
- package/dist/warmCheck.js +52 -50
- package/dist/warmCheckClient.js +2 -1
- package/package.json +1 -1
- package/dist/chunk-DQZRNGDS.js +0 -5069
- package/dist/chunk-IGLEPPTN.js +0 -24
- package/dist/chunk-L2U4ISSS.js +0 -93
- package/dist/studio/assets/index-BX3KHhGX.js +0 -71
- package/dist/{chunk-445BBSZS.js → chunk-UMRNTF3C.js} +3 -3
- package/dist/{synthesize-HOLHQCR2.js → synthesize-UKCQR7WW.js} +1 -1
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
iterateFontFamilyDeclarations,
|
|
12
12
|
normalizeSystemFontPrimaryFamilies,
|
|
13
13
|
resolveFontFamilyDeclarationFamilies
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6RPLXBZJ.js";
|
|
15
15
|
import {
|
|
16
16
|
Semaphore,
|
|
17
17
|
prepareHeifImageInputs,
|
|
18
18
|
withMediaProbeSlot
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NVGB7L2M.js";
|
|
20
20
|
import {
|
|
21
21
|
EncoderInterruptedError,
|
|
22
22
|
encoderFailureError,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
refusesOutsideLink,
|
|
31
31
|
resolveRenderPaths,
|
|
32
32
|
toExternalAssetKey
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-ZK6BC3JM.js";
|
|
34
34
|
import {
|
|
35
35
|
createStudioPositionSeekReapplyScript,
|
|
36
36
|
openRangeEnd,
|
|
@@ -145,6 +145,7 @@ import {
|
|
|
145
145
|
isProresProfile,
|
|
146
146
|
isSelfOrAncestorHidden,
|
|
147
147
|
isTransientBrowserError,
|
|
148
|
+
isUrlNotPermittedError,
|
|
148
149
|
isVideoFrameFormat,
|
|
149
150
|
isVideoHiddenBeforeStreamStart,
|
|
150
151
|
isVideoPastTimelineEnd,
|
|
@@ -164,6 +165,7 @@ import {
|
|
|
164
165
|
parseVideoElements,
|
|
165
166
|
playlistLeavesItsFolder,
|
|
166
167
|
prepareCaptureSessionForReuse,
|
|
168
|
+
privateCacheRoot,
|
|
167
169
|
probeBeginFrameLiveness,
|
|
168
170
|
probeMediaProfile,
|
|
169
171
|
processCompositionAudio,
|
|
@@ -184,6 +186,7 @@ import {
|
|
|
184
186
|
resolveFrameFormat,
|
|
185
187
|
resolveHeadlessShellPath,
|
|
186
188
|
resolvePlayableVideoDuration,
|
|
189
|
+
resolveRestrictPageNetwork,
|
|
187
190
|
resolveVideoExtractionWindow,
|
|
188
191
|
runFfmpeg,
|
|
189
192
|
runVideoExtractionWithRetry,
|
|
@@ -198,11 +201,12 @@ import {
|
|
|
198
201
|
verifyDiskDrawElementSamples,
|
|
199
202
|
videoAudioId,
|
|
200
203
|
videoStartOnMediaTimeline,
|
|
201
|
-
writeCapturedFrame
|
|
202
|
-
|
|
204
|
+
writeCapturedFrame,
|
|
205
|
+
writeUrlDownloadTelemetry
|
|
206
|
+
} from "./chunk-XBPLO6CY.js";
|
|
203
207
|
import {
|
|
204
208
|
settleOnBrowserSafePort
|
|
205
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-OSKSTJNQ.js";
|
|
206
210
|
import {
|
|
207
211
|
assignBundledRuntimeCompositionIds,
|
|
208
212
|
boundMediaSrc,
|
|
@@ -215,7 +219,7 @@ import {
|
|
|
215
219
|
parsesAsScript,
|
|
216
220
|
prepareFlattenedInnerRoot,
|
|
217
221
|
stripSdrPngColourTags
|
|
218
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-PUT3NPVE.js";
|
|
219
223
|
import {
|
|
220
224
|
cannotHardLink,
|
|
221
225
|
collectScratchLeftovers,
|
|
@@ -245,7 +249,7 @@ import {
|
|
|
245
249
|
redactTelemetryString,
|
|
246
250
|
resolveAuthoredTimingWindow,
|
|
247
251
|
toFps
|
|
248
|
-
} from "./chunk-
|
|
252
|
+
} from "./chunk-FU2R6OVR.js";
|
|
249
253
|
import {
|
|
250
254
|
CAPTURE_CANVAS_SELECTOR,
|
|
251
255
|
COMPOSITION_SOURCE_URL,
|
|
@@ -281,7 +285,7 @@ import {
|
|
|
281
285
|
sourceTimeAt,
|
|
282
286
|
styleElementsFor,
|
|
283
287
|
timeAtSourceTime
|
|
284
|
-
} from "./chunk-
|
|
288
|
+
} from "./chunk-3FHPYC6X.js";
|
|
285
289
|
import {
|
|
286
290
|
isPrivateFileUnder,
|
|
287
291
|
isSafePath,
|
|
@@ -293,7 +297,7 @@ import {
|
|
|
293
297
|
import {
|
|
294
298
|
lintHyperframeHtml,
|
|
295
299
|
resolveReferencedStart
|
|
296
|
-
} from "./chunk-
|
|
300
|
+
} from "./chunk-6F4ZVQUX.js";
|
|
297
301
|
import {
|
|
298
302
|
isUnresolvedAssetPlaceholder,
|
|
299
303
|
namesAnotherNetworkRoot,
|
|
@@ -301,7 +305,7 @@ import {
|
|
|
301
305
|
readTextFile,
|
|
302
306
|
resolveCompositionSrc,
|
|
303
307
|
resolveProjectRelativeSrc
|
|
304
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-6EMFSRTW.js";
|
|
305
309
|
import {
|
|
306
310
|
LOW_MEMORY_TOTAL_MB_THRESHOLD,
|
|
307
311
|
getCgroupMemoryLimitMb,
|
|
@@ -310,22 +314,32 @@ import {
|
|
|
310
314
|
usableCpuCount
|
|
311
315
|
} from "./chunk-U3LWQGCD.js";
|
|
312
316
|
import {
|
|
313
|
-
CSS_URL_RE,
|
|
314
317
|
MEDIA_START_BASIS_ATTR,
|
|
315
318
|
checkSubCompositionUsability,
|
|
316
319
|
compositionOriginSeconds,
|
|
320
|
+
cssRuleMatches,
|
|
321
|
+
cssUrlMatches,
|
|
317
322
|
cutToHostSlots,
|
|
318
323
|
decodedUrlPath,
|
|
324
|
+
fontFaceBlockMatches,
|
|
325
|
+
hasBackgroundImageDeclaration,
|
|
319
326
|
hostInPointSeconds,
|
|
327
|
+
importRuleMatches,
|
|
320
328
|
isNonRelativeUrl,
|
|
329
|
+
localFontFaceUrlMatches,
|
|
321
330
|
readMediaStartBasis,
|
|
322
331
|
readPlaybackRate,
|
|
332
|
+
remoteBackgroundUrlMatches,
|
|
333
|
+
remoteFontFaceUrlMatches,
|
|
334
|
+
replaceMatches,
|
|
323
335
|
resolveAbsoluteMediaStartSeconds,
|
|
324
336
|
rewriteAssetPath,
|
|
325
337
|
rewriteAssetPaths,
|
|
326
338
|
rewriteCssAssetUrls,
|
|
327
|
-
rewriteInlineStyleAssetUrls
|
|
328
|
-
|
|
339
|
+
rewriteInlineStyleAssetUrls,
|
|
340
|
+
styleBlockMatches,
|
|
341
|
+
stylesheetLinkMatches
|
|
342
|
+
} from "./chunk-IH2C53YV.js";
|
|
329
343
|
import {
|
|
330
344
|
CANVAS_DIMENSIONS,
|
|
331
345
|
HTML_BODY_CSS_HEIGHT_FIRST_RE,
|
|
@@ -336,7 +350,7 @@ import {
|
|
|
336
350
|
isAspectAgnosticResolutionAlias,
|
|
337
351
|
normalizeResolutionFlag,
|
|
338
352
|
suggestMatchingPreset
|
|
339
|
-
} from "./chunk-
|
|
353
|
+
} from "./chunk-VCKUDUPN.js";
|
|
340
354
|
import {
|
|
341
355
|
parseHTML
|
|
342
356
|
} from "./chunk-GWTIFRF5.js";
|
|
@@ -521,6 +535,7 @@ var MIME_TYPES = {
|
|
|
521
535
|
".css": "text/css; charset=utf-8",
|
|
522
536
|
".js": "application/javascript; charset=utf-8",
|
|
523
537
|
".mjs": "application/javascript; charset=utf-8",
|
|
538
|
+
".cjs": "application/javascript; charset=utf-8",
|
|
524
539
|
".json": "application/json; charset=utf-8",
|
|
525
540
|
".cube": "text/plain; charset=utf-8",
|
|
526
541
|
".png": "image/png",
|
|
@@ -1064,6 +1079,10 @@ function createFileServer(options) {
|
|
|
1064
1079
|
const bodyScripts = options.bodyScripts ?? [buildRenderModeScript(options.fps), HF_BRIDGE_SCRIPT];
|
|
1065
1080
|
const app = new Hono();
|
|
1066
1081
|
const warnLeftOut = (line) => console.warn(`[FileServer] ${line}`);
|
|
1082
|
+
app.use(async function loadEachFileOnlyAsItsNamedType(c, next) {
|
|
1083
|
+
await next();
|
|
1084
|
+
c.res.headers.set("X-Content-Type-Options", "nosniff");
|
|
1085
|
+
});
|
|
1067
1086
|
app.get("/*", async (c) => {
|
|
1068
1087
|
let requestPath = c.req.path;
|
|
1069
1088
|
if (requestPath === "/") requestPath = "/index.html";
|
|
@@ -1311,6 +1330,9 @@ import {
|
|
|
1311
1330
|
writeFileSync
|
|
1312
1331
|
} from "fs";
|
|
1313
1332
|
import { basename, dirname as dirname2, isAbsolute, join as join2, relative, resolve as resolve3 } from "path";
|
|
1333
|
+
function audioWorkDir(workDir) {
|
|
1334
|
+
return join2(workDir, "audio-work");
|
|
1335
|
+
}
|
|
1314
1336
|
var BROWSER_MEDIA_EPSILON = 1e-4;
|
|
1315
1337
|
function resolveBrowserMediaEnd(start, end, duration) {
|
|
1316
1338
|
return Number.isFinite(duration) && duration > 0 ? start + duration : end;
|
|
@@ -6906,10 +6928,16 @@ function normalizeCompositionSrcs(html, projectDir) {
|
|
|
6906
6928
|
return `${name}${quote}${relative2(projectDir, file).split(sep2).join("/")}${quote}`;
|
|
6907
6929
|
});
|
|
6908
6930
|
}
|
|
6909
|
-
|
|
6931
|
+
var COMPOSITION_FILE = /\.html?$/i;
|
|
6932
|
+
var NOT_A_COMPOSITION_FILE = "it is not an .html file, so it is refused";
|
|
6933
|
+
function resolveCompositionPath(projectDir, src, assetRoot) {
|
|
6910
6934
|
const file = resolveCompositionSrc(projectDir, src);
|
|
6911
6935
|
return file === null || escapesAssetRoot(file, assetRoot) ? null : file;
|
|
6912
6936
|
}
|
|
6937
|
+
function resolveCompositionFile(projectDir, src, assetRoot) {
|
|
6938
|
+
const file = resolveCompositionPath(projectDir, src, assetRoot);
|
|
6939
|
+
return file !== null && COMPOSITION_FILE.test(file) ? file : null;
|
|
6940
|
+
}
|
|
6913
6941
|
var isPrivateCompositionFile = (projectDir, filePath) => isPrivateFileUnder(projectDir, filePath, isVcsOrSecretPath);
|
|
6914
6942
|
function assertSubCompositionsUsable(html, projectDir, assetRoot, visited = /* @__PURE__ */ new Set()) {
|
|
6915
6943
|
const { document: document2 } = parseHTML(html);
|
|
@@ -6919,7 +6947,7 @@ function assertSubCompositionsUsable(html, projectDir, assetRoot, visited = /* @
|
|
|
6919
6947
|
const srcPath = el.getAttribute("data-composition-src");
|
|
6920
6948
|
if (!srcPath) continue;
|
|
6921
6949
|
if (isUnresolvedAssetPlaceholder(srcPath)) continue;
|
|
6922
|
-
const filePath =
|
|
6950
|
+
const filePath = resolveCompositionPath(projectDir, srcPath, assetRoot);
|
|
6923
6951
|
if (filePath === null) {
|
|
6924
6952
|
problems.push({ srcPath, detail: "it is outside the project folder" });
|
|
6925
6953
|
continue;
|
|
@@ -6932,6 +6960,10 @@ function assertSubCompositionsUsable(html, projectDir, assetRoot, visited = /* @
|
|
|
6932
6960
|
problems.push({ srcPath, detail: "it is git metadata or an env file" });
|
|
6933
6961
|
continue;
|
|
6934
6962
|
}
|
|
6963
|
+
if (!COMPOSITION_FILE.test(filePath)) {
|
|
6964
|
+
problems.push({ srcPath, detail: NOT_A_COMPOSITION_FILE });
|
|
6965
|
+
continue;
|
|
6966
|
+
}
|
|
6935
6967
|
if (visited.has(filePath)) continue;
|
|
6936
6968
|
const read = readProjectFile(filePath);
|
|
6937
6969
|
if (read.kind === "missing") {
|
|
@@ -7027,7 +7059,6 @@ var THREE_D_CONTEXT_PATTERN = /transform-style\s*:\s*preserve-3d|backface-visibi
|
|
|
7027
7059
|
function detectThreeDTransformUsage(html) {
|
|
7028
7060
|
return THREE_D_CONTEXT_PATTERN.test(html);
|
|
7029
7061
|
}
|
|
7030
|
-
var BACKGROUND_IMAGE_DECL_PATTERN = /(?:^|;|\{)\s*background(?:-image)?\s*:[^;}]*(?:\bgradient\s*\(|url\s*\()/i;
|
|
7031
7062
|
function detectAncestorBackgroundImage(html) {
|
|
7032
7063
|
const { document: document2 } = parseHTML(html);
|
|
7033
7064
|
const root = document2.querySelector("[data-composition-id]");
|
|
@@ -7039,13 +7070,13 @@ function detectAncestorBackgroundImage(html) {
|
|
|
7039
7070
|
}
|
|
7040
7071
|
for (const el of ancestors) {
|
|
7041
7072
|
const style = el.getAttribute("style");
|
|
7042
|
-
if (style &&
|
|
7073
|
+
if (style && hasBackgroundImageDeclaration(`{${style}}`)) return true;
|
|
7043
7074
|
}
|
|
7044
7075
|
for (const styleEl of document2.querySelectorAll("style")) {
|
|
7045
7076
|
const css = styleEl.textContent ?? "";
|
|
7046
|
-
for (const rule of css
|
|
7047
|
-
const [, selectorList
|
|
7048
|
-
if (!
|
|
7077
|
+
for (const { parts: rule } of cssRuleMatches(css)) {
|
|
7078
|
+
const [, selectorList, declarations] = rule;
|
|
7079
|
+
if (!hasBackgroundImageDeclaration(`{${declarations}}`)) continue;
|
|
7049
7080
|
for (const selector of selectorList.split(",")) {
|
|
7050
7081
|
const sel = selector.trim();
|
|
7051
7082
|
if (!sel || sel.startsWith("@")) continue;
|
|
@@ -7366,7 +7397,6 @@ function coalesceHeadStylesAndBodyScripts(html) {
|
|
|
7366
7397
|
el.textContent = dedupedStyles[i] ?? "";
|
|
7367
7398
|
});
|
|
7368
7399
|
const styleEls = head ? Array.from(head.querySelectorAll("style")) : [];
|
|
7369
|
-
const importRe = /@import\s+url\([^)]*\)\s*;|@import\s+["'][^"']+["']\s*;/gi;
|
|
7370
7400
|
for (const run of styleEls.length > 1 ? headStyleRuns(styleEls) : []) {
|
|
7371
7401
|
const imports = [];
|
|
7372
7402
|
const cssParts = [];
|
|
@@ -7374,7 +7404,7 @@ function coalesceHeadStylesAndBodyScripts(html) {
|
|
|
7374
7404
|
for (const el of run) {
|
|
7375
7405
|
const raw = (el.textContent || "").trim();
|
|
7376
7406
|
if (!raw) continue;
|
|
7377
|
-
const nonImportCss = raw
|
|
7407
|
+
const nonImportCss = replaceMatches(raw, importRuleMatches(raw), (match) => {
|
|
7378
7408
|
const cleaned = match.trim();
|
|
7379
7409
|
if (!seenImports.has(cleaned)) {
|
|
7380
7410
|
seenImports.add(cleaned);
|
|
@@ -7684,7 +7714,7 @@ function collectExternalAssets(html, projectDir, log = defaultLogger, file = "in
|
|
|
7684
7714
|
for (const styleEl of document2.querySelectorAll("style")) {
|
|
7685
7715
|
const css = styleEl.textContent || "";
|
|
7686
7716
|
if (!css.includes("url(")) continue;
|
|
7687
|
-
const rewritten = css
|
|
7717
|
+
const rewritten = replaceMatches(css, cssUrlMatches(css), (full, quote, rawUrl) => {
|
|
7688
7718
|
const result = processPath((rawUrl || "").trim());
|
|
7689
7719
|
if (!result) return full;
|
|
7690
7720
|
return `url(${quote || ""}${result}${quote || ""})`;
|
|
@@ -7694,7 +7724,7 @@ function collectExternalAssets(html, projectDir, log = defaultLogger, file = "in
|
|
|
7694
7724
|
for (const el of document2.querySelectorAll("[style]")) {
|
|
7695
7725
|
const style = el.getAttribute("style") || "";
|
|
7696
7726
|
if (!style.includes("url(")) continue;
|
|
7697
|
-
const rewritten = style
|
|
7727
|
+
const rewritten = replaceMatches(style, cssUrlMatches(style), (full, quote, rawUrl) => {
|
|
7698
7728
|
const result = processPath((rawUrl || "").trim());
|
|
7699
7729
|
if (!result) return full;
|
|
7700
7730
|
return `url(${quote || ""}${result}${quote || ""})`;
|
|
@@ -7797,13 +7827,10 @@ async function localizeRemoteImageSources(html, downloadDir) {
|
|
|
7797
7827
|
"Localized remote image source(s)"
|
|
7798
7828
|
);
|
|
7799
7829
|
}
|
|
7800
|
-
var REMOTE_BG_URL_RE = /background(?:-image)?\s*:\s*[^;}"']*?url\(\s*["']?(https?:\/\/[^"')]+)["']?\s*\)/gi;
|
|
7801
7830
|
async function localizeRemoteBackgroundImages(html, downloadDir) {
|
|
7802
7831
|
const urlSet = /* @__PURE__ */ new Set();
|
|
7803
|
-
const
|
|
7804
|
-
|
|
7805
|
-
while ((m = re.exec(html)) !== null) {
|
|
7806
|
-
if (m[1] && !isGoogleFontsUrl(m[1])) urlSet.add(m[1]);
|
|
7832
|
+
for (const { parts } of remoteBackgroundUrlMatches(html)) {
|
|
7833
|
+
if (parts[1] && !isGoogleFontsUrl(parts[1])) urlSet.add(parts[1]);
|
|
7807
7834
|
}
|
|
7808
7835
|
return downloadAndRewriteUrls(
|
|
7809
7836
|
urlSet,
|
|
@@ -7816,7 +7843,6 @@ async function localizeRemoteBackgroundImages(html, downloadDir) {
|
|
|
7816
7843
|
(h, url, rel) => h.replaceAll(`url(${url})`, `url(${rel})`)
|
|
7817
7844
|
);
|
|
7818
7845
|
}
|
|
7819
|
-
var REMOTE_FONTFACE_URL_RE = /url\(["']?(https?:\/\/[^"')]+)["']?\)/gi;
|
|
7820
7846
|
function isGoogleFontsUrl(href) {
|
|
7821
7847
|
try {
|
|
7822
7848
|
const host = new URL(href).hostname.toLowerCase();
|
|
@@ -7844,31 +7870,33 @@ async function fetchExternalStylesheetCss(href) {
|
|
|
7844
7870
|
}
|
|
7845
7871
|
function extractFontFaceBlocks(css) {
|
|
7846
7872
|
const blocks = [];
|
|
7873
|
+
const closes = matchingBraces(css);
|
|
7847
7874
|
const atRule = /@font-face\s*/gi;
|
|
7848
|
-
let
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
if (
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
else if (css[i] === "}") depth--;
|
|
7857
|
-
}
|
|
7858
|
-
if (depth === 0) {
|
|
7859
|
-
blocks.push(css.slice(m.index, i));
|
|
7860
|
-
atRule.lastIndex = i;
|
|
7861
|
-
}
|
|
7875
|
+
let open2 = -1;
|
|
7876
|
+
for (let m = atRule.exec(css); m; m = atRule.exec(css)) {
|
|
7877
|
+
if (open2 < atRule.lastIndex) open2 = css.indexOf("{", atRule.lastIndex);
|
|
7878
|
+
if (open2 === -1) break;
|
|
7879
|
+
const close = closes.get(open2);
|
|
7880
|
+
if (close === void 0) continue;
|
|
7881
|
+
blocks.push(css.slice(m.index, close + 1));
|
|
7882
|
+
atRule.lastIndex = close + 1;
|
|
7862
7883
|
}
|
|
7863
7884
|
return blocks;
|
|
7864
7885
|
}
|
|
7886
|
+
function matchingBraces(css) {
|
|
7887
|
+
const closes = /* @__PURE__ */ new Map();
|
|
7888
|
+
const unclosed = [];
|
|
7889
|
+
for (let i = 0; i < css.length; i++) {
|
|
7890
|
+
if (css[i] === "{") unclosed.push(i);
|
|
7891
|
+
else if (css[i] === "}" && unclosed.length > 0) closes.set(unclosed.pop(), i);
|
|
7892
|
+
}
|
|
7893
|
+
return closes;
|
|
7894
|
+
}
|
|
7865
7895
|
async function inlineExternalFontStylesheets(html) {
|
|
7866
|
-
const linkRe = /<link\b[^>]*\brel=["']stylesheet["'][^>]*>/gi;
|
|
7867
7896
|
const hrefRe = /\bhref=["']([^"']+)["']/i;
|
|
7868
7897
|
const linkMatches = [];
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
const tag = linkMatch[0];
|
|
7898
|
+
for (const { parts } of stylesheetLinkMatches(html)) {
|
|
7899
|
+
const tag = parts[0];
|
|
7872
7900
|
const hrefMatch = hrefRe.exec(tag);
|
|
7873
7901
|
if (!hrefMatch?.[1]) continue;
|
|
7874
7902
|
const href = hrefMatch[1];
|
|
@@ -7909,14 +7937,16 @@ ${fontFaceBlocks.join("\n")}
|
|
|
7909
7937
|
}
|
|
7910
7938
|
function projectStylesheetFontFamilies(html, projectDir) {
|
|
7911
7939
|
const families = [];
|
|
7912
|
-
for (const
|
|
7940
|
+
for (const {
|
|
7941
|
+
parts: [tag]
|
|
7942
|
+
} of stylesheetLinkMatches(html)) {
|
|
7913
7943
|
const href = /\bhref=["']([^"']+)["']/i.exec(tag)?.[1];
|
|
7914
7944
|
if (!href || /^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(href)) continue;
|
|
7915
7945
|
const sheet = resolve5(projectDir, decodedUrlPath(href).replace(/^(?:\.?\/)+/, ""));
|
|
7916
7946
|
if (!isPathInside(sheet, projectDir) || !existsSync10(sheet)) continue;
|
|
7917
7947
|
for (const face of extractFontFaceBlocks(readFileSync6(sheet, "utf8"))) {
|
|
7918
7948
|
const family = /font-family\s*:\s*([^;}]+)/i.exec(face)?.[1]?.trim().replace(/^['"]|['"]$/g, "");
|
|
7919
|
-
const shipsFile = [...face
|
|
7949
|
+
const shipsFile = [...localFontFaceUrlMatches(face)].some(({ parts: [, url = ""] }) => {
|
|
7920
7950
|
const path = decodedUrlPath(url);
|
|
7921
7951
|
const file = path.startsWith("/") ? resolve5(projectDir, `.${path}`) : resolve5(dirname6(sheet), path);
|
|
7922
7952
|
return isPathInside(file, projectDir) && existsSync10(file);
|
|
@@ -7927,11 +7957,9 @@ function projectStylesheetFontFamilies(html, projectDir) {
|
|
|
7927
7957
|
return families;
|
|
7928
7958
|
}
|
|
7929
7959
|
function collectFontFaceUrls(html) {
|
|
7930
|
-
const styleBlockRe = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
|
|
7931
7960
|
const urlSet = /* @__PURE__ */ new Set();
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
const cssText = styleMatch[1] ?? "";
|
|
7961
|
+
for (const { parts } of styleBlockMatches(html)) {
|
|
7962
|
+
const cssText = parts[1];
|
|
7935
7963
|
let i = 0;
|
|
7936
7964
|
while (i < cssText.length) {
|
|
7937
7965
|
const atIdx = cssText.indexOf("@font-face", i);
|
|
@@ -7946,10 +7974,8 @@ function collectFontFaceUrls(html) {
|
|
|
7946
7974
|
j++;
|
|
7947
7975
|
}
|
|
7948
7976
|
const block = cssText.slice(braceStart + 1, j - 1);
|
|
7949
|
-
const
|
|
7950
|
-
|
|
7951
|
-
while ((urlMatch = urlRe.exec(block)) !== null) {
|
|
7952
|
-
if (urlMatch[1]) urlSet.add(urlMatch[1]);
|
|
7977
|
+
for (const { parts: parts2 } of remoteFontFaceUrlMatches(block)) {
|
|
7978
|
+
if (parts2[1]) urlSet.add(parts2[1]);
|
|
7953
7979
|
}
|
|
7954
7980
|
i = j;
|
|
7955
7981
|
}
|
|
@@ -7969,7 +7995,6 @@ function localizeFontFaceUrls(html, downloadDir) {
|
|
|
7969
7995
|
(h, url, relPath) => h.replaceAll(`url(${url})`, `url("${relPath}")`)
|
|
7970
7996
|
);
|
|
7971
7997
|
}
|
|
7972
|
-
var LOCAL_FONTFACE_URL_RE = /url\(["']?(?!data:|file:|https?:\/\/)([^"')]+)["']?\)/gi;
|
|
7973
7998
|
function urlOccurrenceRe(localPath) {
|
|
7974
7999
|
const escaped = localPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
7975
8000
|
return new RegExp(`url\\((["']?)${escaped}\\1\\)`, "g");
|
|
@@ -7989,24 +8014,16 @@ async function readLocalFont(absPath) {
|
|
|
7989
8014
|
return { kind: "inline", buffer: Buffer.concat(chunks, totalBytes) };
|
|
7990
8015
|
}
|
|
7991
8016
|
async function embedLocalFontFaces(html, projectDir, assetRoot, log = defaultLogger) {
|
|
7992
|
-
const { fontToDataUri: toDataUri } = await import("./deterministicFonts-
|
|
7993
|
-
const styleBlockRe = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
|
|
7994
|
-
const fontFaceRe = /@font-face\s*\{([^}]*)\}/gi;
|
|
8017
|
+
const { fontToDataUri: toDataUri } = await import("./deterministicFonts-XZIQ4PNP.js");
|
|
7995
8018
|
let result = html;
|
|
7996
8019
|
const embeddedPaths = /* @__PURE__ */ new Set();
|
|
7997
8020
|
const dataUriByAbsolutePath = /* @__PURE__ */ new Map();
|
|
7998
8021
|
const fileBackedAbsolutePaths = /* @__PURE__ */ new Set();
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
while ((ffMatch = ffRe.exec(cssText)) !== null) {
|
|
8005
|
-
const block = ffMatch[1] ?? "";
|
|
8006
|
-
const urlRe = new RegExp(LOCAL_FONTFACE_URL_RE.source, LOCAL_FONTFACE_URL_RE.flags);
|
|
8007
|
-
let urlMatch;
|
|
8008
|
-
while ((urlMatch = urlRe.exec(block)) !== null) {
|
|
8009
|
-
const localPath = urlMatch[1];
|
|
8022
|
+
for (const { parts: style } of styleBlockMatches(html)) {
|
|
8023
|
+
for (const { parts: face } of fontFaceBlockMatches(style[1])) {
|
|
8024
|
+
const block = face[1];
|
|
8025
|
+
for (const { parts } of localFontFaceUrlMatches(block)) {
|
|
8026
|
+
const localPath = parts[1];
|
|
8010
8027
|
if (!localPath || embeddedPaths.has(localPath)) continue;
|
|
8011
8028
|
const absPath = localPath.startsWith("/") ? localPath : resolve5(projectDir, localPath);
|
|
8012
8029
|
if (!isPathInside(absPath, projectDir) || escapesAssetRoot(absPath, assetRoot)) continue;
|
|
@@ -8125,6 +8142,9 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
8125
8142
|
if (isPathInside(htmlPath, projectDir) && escapesAssetRoot(htmlPath, assetRoot)) {
|
|
8126
8143
|
throw new Error(`Entry file ${htmlPath} leads outside the project folder`);
|
|
8127
8144
|
}
|
|
8145
|
+
if (!COMPOSITION_FILE.test(htmlPath)) {
|
|
8146
|
+
throw new Error(`Entry file ${htmlPath} is not an .html file, so it is refused`);
|
|
8147
|
+
}
|
|
8128
8148
|
const entryHtml = rebaseDirectEntryAssetPaths(readTextFile(htmlPath), projectDir, htmlPath);
|
|
8129
8149
|
const rawHtml = bindVariableMediaSources(
|
|
8130
8150
|
normalizeCompositionSrcs(rewriteUnresolvableGsapToCdn(entryHtml, projectDir), projectDir),
|
|
@@ -8680,6 +8700,14 @@ async function recompileWithResolutions(compiled, resolutions, projectDir, downl
|
|
|
8680
8700
|
}
|
|
8681
8701
|
|
|
8682
8702
|
// ../producer/src/services/render/stages/compileStage.ts
|
|
8703
|
+
function animatedGifCacheDir(extractCacheDir) {
|
|
8704
|
+
try {
|
|
8705
|
+
const root = extractCacheDir && privateCacheRoot(extractCacheDir);
|
|
8706
|
+
return root ? join17(root, "animated-gif") : void 0;
|
|
8707
|
+
} catch {
|
|
8708
|
+
return void 0;
|
|
8709
|
+
}
|
|
8710
|
+
}
|
|
8683
8711
|
function adaptAspectAgnosticResolution(requested, aspectAgnostic, width, height, log) {
|
|
8684
8712
|
if (!requested || !aspectAgnostic) return requested;
|
|
8685
8713
|
const flipped = suggestMatchingPreset(width, height, requested);
|
|
@@ -8759,7 +8787,7 @@ async function runCompileStage(input) {
|
|
|
8759
8787
|
variables: input.variables,
|
|
8760
8788
|
urlByAbsentLocalPath: input.urlByAbsentLocalPath,
|
|
8761
8789
|
pageMotionBlur: input.pageMotionBlur,
|
|
8762
|
-
animatedGifCacheDir:
|
|
8790
|
+
animatedGifCacheDir: animatedGifCacheDir(cfg.extractCacheDir),
|
|
8763
8791
|
ffmpegProcessTimeout: cfg.ffmpegProcessTimeout,
|
|
8764
8792
|
allowOutsideProjectAssets: job.config.allowOutsideProjectAssets
|
|
8765
8793
|
});
|
|
@@ -9827,6 +9855,7 @@ async function runExtractVideosStage(input) {
|
|
|
9827
9855
|
deferRangeExtraction,
|
|
9828
9856
|
shownBoxes,
|
|
9829
9857
|
urlByAbsentLocalPath,
|
|
9858
|
+
audioDownloadDir,
|
|
9830
9859
|
skipFrameExtractionIds = []
|
|
9831
9860
|
} = input;
|
|
9832
9861
|
const stage2Start = Date.now();
|
|
@@ -9899,7 +9928,15 @@ async function runExtractVideosStage(input) {
|
|
|
9899
9928
|
imageColorSpaces.push(...probed);
|
|
9900
9929
|
}
|
|
9901
9930
|
if (skipFrameExtractionIds.length > 0) {
|
|
9902
|
-
await appendVideoAudioFromProbe({
|
|
9931
|
+
await appendVideoAudioFromProbe({
|
|
9932
|
+
projectDir,
|
|
9933
|
+
compiledDir,
|
|
9934
|
+
composition,
|
|
9935
|
+
urlByAbsentLocalPath,
|
|
9936
|
+
downloadDir: audioDownloadDir,
|
|
9937
|
+
signal: abortSignal,
|
|
9938
|
+
log
|
|
9939
|
+
});
|
|
9903
9940
|
videoReadinessSkipIds = [...skipFrameExtractionIds];
|
|
9904
9941
|
} else if (composition.videos.length > 0) {
|
|
9905
9942
|
const totalVideos = composition.videos.length;
|
|
@@ -10006,17 +10043,37 @@ function isPublicHttpsUrl(url) {
|
|
|
10006
10043
|
return false;
|
|
10007
10044
|
}
|
|
10008
10045
|
}
|
|
10046
|
+
function localProbeSource(src, input) {
|
|
10047
|
+
const path = resolveProjectRelativeSrc(src, input.projectDir, input.compiledDir);
|
|
10048
|
+
const readFrom = input.urlByAbsentLocalPath?.get(path) ?? path;
|
|
10049
|
+
return isHttpUrl(readFrom) || existsSync12(readFrom) ? readFrom : null;
|
|
10050
|
+
}
|
|
10051
|
+
async function remoteProbeSource(video, input) {
|
|
10052
|
+
if (!isPublicHttpsUrl(video.src)) return null;
|
|
10053
|
+
if (!resolveRestrictPageNetwork()) return video.src;
|
|
10054
|
+
if (!video.hasAudio || video.hidden) return null;
|
|
10055
|
+
const downloadDir = input.downloadDir ?? join19(input.compiledDir, REMOTE_MEDIA_SUBDIR);
|
|
10056
|
+
try {
|
|
10057
|
+
return await downloadToTemp(video.src, downloadDir, void 0, input.signal, void 0, {
|
|
10058
|
+
onTelemetry: writeUrlDownloadTelemetry
|
|
10059
|
+
});
|
|
10060
|
+
} catch (error) {
|
|
10061
|
+
if (!isUrlNotPermittedError(error)) throw error;
|
|
10062
|
+
input.log?.warn("Video sound skipped: its URL is outside the download address rules", {
|
|
10063
|
+
videoId: video.id
|
|
10064
|
+
});
|
|
10065
|
+
return null;
|
|
10066
|
+
}
|
|
10067
|
+
}
|
|
10009
10068
|
async function appendVideoAudioFromProbe(input) {
|
|
10010
|
-
const {
|
|
10069
|
+
const { composition } = input;
|
|
10011
10070
|
const videos = composition.videos.filter(
|
|
10012
10071
|
(video) => !isVideoPastTimelineEnd(video, composition.duration)
|
|
10013
10072
|
);
|
|
10014
10073
|
const probed = await Promise.all(
|
|
10015
10074
|
videos.map(async (video) => {
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
const readFrom = urlByAbsentLocalPath?.get(path) ?? path;
|
|
10019
|
-
if (!isHttpUrl(readFrom) && !existsSync12(readFrom)) return null;
|
|
10075
|
+
const readFrom = isHttpUrl(video.src) ? await remoteProbeSource(video, input) : localProbeSource(video.src, input);
|
|
10076
|
+
if (readFrom === null) return null;
|
|
10020
10077
|
const metadata = await extractMediaMetadata(readFrom);
|
|
10021
10078
|
const window2 = await resolveFinalFrameExtractionWindow(
|
|
10022
10079
|
readFrom,
|
|
@@ -10755,7 +10812,7 @@ async function mixAudioForDelivery(input, duration, pcmSourcePath) {
|
|
|
10755
10812
|
audioResult = await processCompositionAudio(
|
|
10756
10813
|
audios,
|
|
10757
10814
|
projectDir,
|
|
10758
|
-
|
|
10815
|
+
audioWorkDir(workDir),
|
|
10759
10816
|
audioOutputPath,
|
|
10760
10817
|
duration,
|
|
10761
10818
|
abortSignal,
|
|
@@ -13599,6 +13656,19 @@ function resolveCaptureForceScreenshotForPageSideCompositing(args) {
|
|
|
13599
13656
|
function shouldDiscardProbeSessionForPageSideCompositing(args) {
|
|
13600
13657
|
return args.hasProbeSession && args.usePageSideCompositing;
|
|
13601
13658
|
}
|
|
13659
|
+
var PAGE_SIDE_COMPOSITOR_CANVAS_ID = "__hf-page-side-compositor";
|
|
13660
|
+
async function pageInstallsShaderCompositor(open2, session = { initializeSession, closeCaptureSession }) {
|
|
13661
|
+
const probe = await open2();
|
|
13662
|
+
try {
|
|
13663
|
+
await session.initializeSession(probe);
|
|
13664
|
+
return await probe.page.evaluate(
|
|
13665
|
+
(id) => document.getElementById(id) !== null,
|
|
13666
|
+
PAGE_SIDE_COMPOSITOR_CANVAS_ID
|
|
13667
|
+
);
|
|
13668
|
+
} finally {
|
|
13669
|
+
await session.closeCaptureSession(probe);
|
|
13670
|
+
}
|
|
13671
|
+
}
|
|
13602
13672
|
function deVerifyFallbackTelemetry(err) {
|
|
13603
13673
|
const details = getDrawElementVerificationDetails(err);
|
|
13604
13674
|
return {
|
|
@@ -14029,6 +14099,7 @@ async function executeRenderPipeline(input) {
|
|
|
14029
14099
|
log,
|
|
14030
14100
|
composition,
|
|
14031
14101
|
skipFrameExtractionIds: videoLayer ? [videoLayer.videoId] : [],
|
|
14102
|
+
audioDownloadDir: audioWorkDir(workDir),
|
|
14032
14103
|
abortSignal: executionSignal,
|
|
14033
14104
|
assertNotAborted,
|
|
14034
14105
|
// Local staging can use links; distributed plan() alone requires real copies.
|
|
@@ -14734,7 +14805,7 @@ async function executeRenderPipeline(input) {
|
|
|
14734
14805
|
};
|
|
14735
14806
|
const videoExt = FORMAT_EXT[outputFormat] ?? ".mp4";
|
|
14736
14807
|
const videoOnlyPath = join29(workDir, `video-only${videoExt}`);
|
|
14737
|
-
|
|
14808
|
+
let usePageSideCompositingForTransitions = (cfg.enablePageSideCompositing || isGif) && compiled.hasShaderTransitions && !hasHdrContent && outputSupportsPageSideShaderCompositing(outputFormat);
|
|
14738
14809
|
if (usePageSideCompositingForTransitions) {
|
|
14739
14810
|
activeFileServer.addPreHeadScript(HF_PAGE_SIDE_COMPOSITING_STUB);
|
|
14740
14811
|
if (shouldDiscardProbeSessionForPageSideCompositing({
|
|
@@ -14748,6 +14819,26 @@ async function executeRenderPipeline(input) {
|
|
|
14748
14819
|
"[Render] Recreating capture session so page-side compositing pre-head script is loaded."
|
|
14749
14820
|
);
|
|
14750
14821
|
}
|
|
14822
|
+
try {
|
|
14823
|
+
usePageSideCompositingForTransitions = await pageInstallsShaderCompositor(
|
|
14824
|
+
() => createCaptureSession(activeFileServer.url, framesDir, buildPrepCaptureOptions(), null, {
|
|
14825
|
+
...cfg,
|
|
14826
|
+
forceScreenshot: true
|
|
14827
|
+
})
|
|
14828
|
+
);
|
|
14829
|
+
} catch (error) {
|
|
14830
|
+
assertNotAborted();
|
|
14831
|
+
log.warn("[Render] Shader compositor check failed; keeping page-side compositing.", {
|
|
14832
|
+
error: error instanceof Error ? error.message : String(error)
|
|
14833
|
+
});
|
|
14834
|
+
}
|
|
14835
|
+
if (!usePageSideCompositingForTransitions) {
|
|
14836
|
+
log.warn(
|
|
14837
|
+
"[Render] The page's shader-transitions build cannot composite in this browser; shader transitions blend on the Node-side layered path."
|
|
14838
|
+
);
|
|
14839
|
+
}
|
|
14840
|
+
}
|
|
14841
|
+
if (usePageSideCompositingForTransitions) {
|
|
14751
14842
|
captureForceScreenshot = resolveCaptureForceScreenshotForPageSideCompositing({
|
|
14752
14843
|
forceScreenshot: captureForceScreenshot,
|
|
14753
14844
|
usePageSideCompositing: true
|
|
@@ -18017,7 +18108,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
18017
18108
|
if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
|
|
18018
18109
|
if (probeResult.probeSession) {
|
|
18019
18110
|
try {
|
|
18020
|
-
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-
|
|
18111
|
+
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-O5P56HIK.js");
|
|
18021
18112
|
await closeCaptureSession2(probeResult.probeSession);
|
|
18022
18113
|
} catch (err) {
|
|
18023
18114
|
log.warn("[plan] probe session close failed", {
|
|
@@ -20619,6 +20710,7 @@ import {
|
|
|
20619
20710
|
import { resolve as resolve10, dirname as dirname17, join as join46 } from "path";
|
|
20620
20711
|
import { tmpdir as tmpdir5 } from "os";
|
|
20621
20712
|
import { parseArgs } from "util";
|
|
20713
|
+
import { isIP } from "net";
|
|
20622
20714
|
import crypto from "crypto";
|
|
20623
20715
|
import { Hono as Hono2 } from "hono";
|
|
20624
20716
|
import { streamSSE } from "hono/streaming";
|
|
@@ -20677,7 +20769,11 @@ function readEntryHtml(filePath) {
|
|
|
20677
20769
|
closeSync6(fd);
|
|
20678
20770
|
}
|
|
20679
20771
|
}
|
|
20680
|
-
function
|
|
20772
|
+
function leavesProject(absProjectDir, absoluteEntryPath, isAllowedEntry) {
|
|
20773
|
+
const entryRelativePath = relative8(absProjectDir, absoluteEntryPath);
|
|
20774
|
+
return entryRelativePath === ".." || entryRelativePath.startsWith(`..${sep5}`) || isAbsolute4(entryRelativePath) || isAllowedEntry !== void 0 && !isAllowedEntry(absoluteEntryPath);
|
|
20775
|
+
}
|
|
20776
|
+
function readProjectEntryFile(projectDir, preferredEntryFile, isAllowedEntry) {
|
|
20681
20777
|
const absProjectDir = resolve9(projectDir);
|
|
20682
20778
|
if (!existsSync29(absProjectDir) || !statSync10(absProjectDir).isDirectory()) {
|
|
20683
20779
|
return { error: `Project directory not found: ${absProjectDir}` };
|
|
@@ -20687,8 +20783,7 @@ function readProjectEntryFile(projectDir, preferredEntryFile) {
|
|
|
20687
20783
|
);
|
|
20688
20784
|
for (const entryFile of entryCandidates) {
|
|
20689
20785
|
const absoluteEntryPath = resolve9(absProjectDir, entryFile);
|
|
20690
|
-
|
|
20691
|
-
if (entryRelativePath === ".." || entryRelativePath.startsWith(`..${sep5}`) || isAbsolute4(entryRelativePath)) {
|
|
20786
|
+
if (leavesProject(absProjectDir, absoluteEntryPath, isAllowedEntry)) {
|
|
20692
20787
|
return { error: `Entry file must stay inside project directory: ${entryFile}` };
|
|
20693
20788
|
}
|
|
20694
20789
|
const html = readEntryHtml(absoluteEntryPath);
|
|
@@ -20704,10 +20799,10 @@ function readProjectEntryFile(projectDir, preferredEntryFile) {
|
|
|
20704
20799
|
error: `No HTML entry file found in project directory: ${join44(absProjectDir, preferredEntryFile || "index.html")}`
|
|
20705
20800
|
};
|
|
20706
20801
|
}
|
|
20707
|
-
function prepareHyperframeLintBody(body) {
|
|
20802
|
+
function prepareHyperframeLintBody(body, isAllowedEntry) {
|
|
20708
20803
|
const requestedEntryFile = typeof body.entryFile === "string" && body.entryFile.trim().length > 0 ? body.entryFile.trim() : void 0;
|
|
20709
20804
|
if (typeof body.projectDir === "string" && body.projectDir.trim().length > 0) {
|
|
20710
|
-
const prepared = readProjectEntryFile(body.projectDir, requestedEntryFile);
|
|
20805
|
+
const prepared = readProjectEntryFile(body.projectDir, requestedEntryFile, isAllowedEntry);
|
|
20711
20806
|
if ("error" in prepared) {
|
|
20712
20807
|
return prepared;
|
|
20713
20808
|
}
|
|
@@ -20977,16 +21072,22 @@ function buildRenderJobConfig(input, outputPath, log) {
|
|
|
20977
21072
|
});
|
|
20978
21073
|
return renderConfigFromRequest(request, { logger: log });
|
|
20979
21074
|
}
|
|
20980
|
-
function resolvePreparedRenderOutput(prepared, rendersDir, log) {
|
|
21075
|
+
function resolvePreparedRenderOutput(prepared, rendersDir, log, confineOutput) {
|
|
20981
21076
|
const { input, cleanupProjectDir } = prepared;
|
|
20982
21077
|
const absoluteOutputPath = resolveOutputPath(input.projectDir, input.outputPath, rendersDir, log);
|
|
21078
|
+
if (confineOutput) {
|
|
21079
|
+
mkdirSync19(rendersDir, { recursive: true });
|
|
21080
|
+
if (!isSafePath(rendersDir, absoluteOutputPath)) {
|
|
21081
|
+
throw new Error("outputPath must be inside the renders directory");
|
|
21082
|
+
}
|
|
21083
|
+
}
|
|
20983
21084
|
const outputDir = dirname17(absoluteOutputPath);
|
|
20984
21085
|
if (!existsSync31(outputDir)) mkdirSync19(outputDir, { recursive: true });
|
|
20985
21086
|
return { input, cleanupProjectDir, absoluteOutputPath };
|
|
20986
21087
|
}
|
|
20987
|
-
function prepareRenderJob(prepared, rendersDir, log) {
|
|
21088
|
+
function prepareRenderJob(prepared, rendersDir, log, confineOutput) {
|
|
20988
21089
|
try {
|
|
20989
|
-
const output = resolvePreparedRenderOutput(prepared, rendersDir, log);
|
|
21090
|
+
const output = resolvePreparedRenderOutput(prepared, rendersDir, log, confineOutput);
|
|
20990
21091
|
const job = createRenderJob(buildRenderJobConfig(output.input, output.absoluteOutputPath, log));
|
|
20991
21092
|
return { ...output, job };
|
|
20992
21093
|
} catch (error) {
|
|
@@ -21037,16 +21138,32 @@ function validateOutputResolutionOverride(body) {
|
|
|
21037
21138
|
return void 0;
|
|
21038
21139
|
}
|
|
21039
21140
|
var MAX_PREVIEW_HTML_BYTES = 20 * 1024 * 1024;
|
|
21040
|
-
function
|
|
21141
|
+
function resolveRenderRequestPolicy(options) {
|
|
21142
|
+
return {
|
|
21143
|
+
projectsDir: resolve10(
|
|
21144
|
+
options.projectsDir ?? (process.env.PRODUCER_PROJECTS_DIR || process.cwd())
|
|
21145
|
+
),
|
|
21146
|
+
allowDebug: options.allowDebug ?? process.env.PRODUCER_ALLOW_DEBUG === "1"
|
|
21147
|
+
};
|
|
21148
|
+
}
|
|
21149
|
+
function isAllowedProjectPath(projectsDir, path) {
|
|
21150
|
+
return isSafePath(projectsDir, path) && !isSafePath(resolveRenderDebugDir(), path);
|
|
21151
|
+
}
|
|
21152
|
+
function isAllowedEntryPath(policy, projectDir, path) {
|
|
21153
|
+
return isSafePath(projectDir, path) && isAllowedProjectPath(policy.projectsDir, path);
|
|
21154
|
+
}
|
|
21155
|
+
function prepareProjectDirectory(projectDir, options, policy) {
|
|
21041
21156
|
const candidate = nonEmptyString(projectDir);
|
|
21042
21157
|
if (!candidate) return null;
|
|
21043
|
-
const absProjectDir = resolve10(candidate);
|
|
21044
|
-
|
|
21045
|
-
|
|
21158
|
+
const absProjectDir = policy ? resolve10(policy.projectsDir, candidate) : resolve10(candidate);
|
|
21159
|
+
const shown = policy ? candidate : absProjectDir;
|
|
21160
|
+
if (policy && !isAllowedProjectPath(policy.projectsDir, absProjectDir) || !existsSync31(absProjectDir) || !statSync11(absProjectDir).isDirectory()) {
|
|
21161
|
+
return { error: `Project directory not found: ${shown}` };
|
|
21046
21162
|
}
|
|
21047
21163
|
const entry = options.entryFile || "index.html";
|
|
21048
|
-
|
|
21049
|
-
|
|
21164
|
+
const entryPath = resolve10(absProjectDir, entry);
|
|
21165
|
+
if (policy && !isAllowedEntryPath(policy, absProjectDir, entryPath) || !existsSync31(entryPath)) {
|
|
21166
|
+
return { error: `Entry file "${entry}" not found in project directory: ${shown}` };
|
|
21050
21167
|
}
|
|
21051
21168
|
return { prepared: { input: { projectDir: absProjectDir, ...options } } };
|
|
21052
21169
|
}
|
|
@@ -21075,15 +21192,18 @@ function materializeInlineProject(html, options) {
|
|
|
21075
21192
|
}
|
|
21076
21193
|
};
|
|
21077
21194
|
}
|
|
21078
|
-
async function prepareRenderBody(body) {
|
|
21195
|
+
async function prepareRenderBody(body, policy) {
|
|
21079
21196
|
const overrideError = validateRenderOverrides(body);
|
|
21080
21197
|
if (overrideError) return { error: overrideError };
|
|
21198
|
+
if (policy && body.debug === true && !policy.allowDebug) {
|
|
21199
|
+
return { error: "debug is disabled on this server (set allowDebug or PRODUCER_ALLOW_DEBUG=1)" };
|
|
21200
|
+
}
|
|
21081
21201
|
const pageMotionBlur = body.pageMotionBlur;
|
|
21082
21202
|
if (pageMotionBlur !== void 0 && pageMotionBlur !== "off") {
|
|
21083
21203
|
return { error: "pageMotionBlur must be off when supplied" };
|
|
21084
21204
|
}
|
|
21085
21205
|
const options = { ...parseRenderOptions(body), pageMotionBlur };
|
|
21086
|
-
const project = prepareProjectDirectory(body.projectDir, options);
|
|
21206
|
+
const project = prepareProjectDirectory(body.projectDir, options, policy);
|
|
21087
21207
|
if (project) return project;
|
|
21088
21208
|
const source = await resolveInlineRenderHtml(body);
|
|
21089
21209
|
return "error" in source ? source : materializeInlineProject(source.html, options);
|
|
@@ -21136,6 +21256,9 @@ function cleanupTempDir(dir, log) {
|
|
|
21136
21256
|
});
|
|
21137
21257
|
}
|
|
21138
21258
|
}
|
|
21259
|
+
function publicPerfSummary(job) {
|
|
21260
|
+
return job.perfSummary ? { ...job.perfSummary, renderId: void 0 } : null;
|
|
21261
|
+
}
|
|
21139
21262
|
function outputFileSize(path) {
|
|
21140
21263
|
return existsSync31(path) ? statSync11(path).size : 0;
|
|
21141
21264
|
}
|
|
@@ -21148,7 +21271,7 @@ function createBlockingProgressReporter(log, requestId) {
|
|
|
21148
21271
|
log.info(`render progress ${pct}%`, { requestId, stage: job.currentStage, message });
|
|
21149
21272
|
};
|
|
21150
21273
|
}
|
|
21151
|
-
async function prepareSseRenderRequest(c, stream, requestId) {
|
|
21274
|
+
async function prepareSseRenderRequest(c, stream, requestId, policy) {
|
|
21152
21275
|
let body;
|
|
21153
21276
|
try {
|
|
21154
21277
|
body = await c.req.json();
|
|
@@ -21163,7 +21286,7 @@ async function prepareSseRenderRequest(c, stream, requestId) {
|
|
|
21163
21286
|
});
|
|
21164
21287
|
return null;
|
|
21165
21288
|
}
|
|
21166
|
-
const prepared = await prepareRenderBody(body);
|
|
21289
|
+
const prepared = await prepareRenderBody(body, policy);
|
|
21167
21290
|
if (!("error" in prepared)) return prepared.prepared;
|
|
21168
21291
|
await stream.writeSSE({
|
|
21169
21292
|
data: JSON.stringify({
|
|
@@ -21235,6 +21358,7 @@ function createRenderHandlers(options = {}) {
|
|
|
21235
21358
|
const getRequestId = options.getRequestId ?? ((c) => c.req.header("x-request-id") || crypto.randomUUID());
|
|
21236
21359
|
const outputUrlPrefix = options.outputUrlPrefix ?? "/outputs";
|
|
21237
21360
|
const rendersDir = options.rendersDir ?? process.env.PRODUCER_RENDERS_DIR ?? "/tmp";
|
|
21361
|
+
const policy = options.confineRequests ? resolveRenderRequestPolicy(options) : void 0;
|
|
21238
21362
|
const artifactTtlMs = options.artifactTtlMs ?? Number(process.env.PRODUCER_OUTPUT_ARTIFACT_TTL_MS || 15 * 60 * 1e3);
|
|
21239
21363
|
const store = createArtifactStore(artifactTtlMs);
|
|
21240
21364
|
const maxConcurrentRenders = options.maxConcurrentRenders ?? Number(process.env.PRODUCER_MAX_CONCURRENT_RENDERS || 2);
|
|
@@ -21253,7 +21377,18 @@ function createRenderHandlers(options = {}) {
|
|
|
21253
21377
|
} catch {
|
|
21254
21378
|
return c.json({ success: false, requestId, error: "Invalid JSON body" }, 400);
|
|
21255
21379
|
}
|
|
21256
|
-
const
|
|
21380
|
+
const lintProjectDir = nonEmptyString(body.projectDir);
|
|
21381
|
+
let isAllowedEntry;
|
|
21382
|
+
if (policy && lintProjectDir) {
|
|
21383
|
+
const absProjectDir = resolve10(policy.projectsDir, lintProjectDir);
|
|
21384
|
+
if (!isAllowedProjectPath(policy.projectsDir, absProjectDir)) {
|
|
21385
|
+
const error = `Project directory not found: ${lintProjectDir}`;
|
|
21386
|
+
return c.json({ success: false, requestId, error }, 400);
|
|
21387
|
+
}
|
|
21388
|
+
body = { ...body, projectDir: absProjectDir };
|
|
21389
|
+
isAllowedEntry = (path) => isAllowedEntryPath(policy, absProjectDir, path);
|
|
21390
|
+
}
|
|
21391
|
+
const preparedResult = prepareHyperframeLintBody(body, isAllowedEntry);
|
|
21257
21392
|
if ("error" in preparedResult) {
|
|
21258
21393
|
return c.json({ success: false, requestId, error: preparedResult.error }, 400);
|
|
21259
21394
|
}
|
|
@@ -21282,11 +21417,11 @@ function createRenderHandlers(options = {}) {
|
|
|
21282
21417
|
} catch {
|
|
21283
21418
|
return c.json({ success: false, requestId, error: "Invalid JSON body" }, 400);
|
|
21284
21419
|
}
|
|
21285
|
-
const preparedResult = await prepareRenderBody(body);
|
|
21420
|
+
const preparedResult = await prepareRenderBody(body, policy);
|
|
21286
21421
|
if ("error" in preparedResult) {
|
|
21287
21422
|
return c.json({ success: false, requestId, error: preparedResult.error }, 400);
|
|
21288
21423
|
}
|
|
21289
|
-
const preparedJob = prepareRenderJob(preparedResult.prepared, rendersDir, log);
|
|
21424
|
+
const preparedJob = prepareRenderJob(preparedResult.prepared, rendersDir, log, !!policy);
|
|
21290
21425
|
if ("error" in preparedJob) {
|
|
21291
21426
|
return c.json({ success: false, requestId, error: preparedJob.error }, 400);
|
|
21292
21427
|
}
|
|
@@ -21327,7 +21462,7 @@ function createRenderHandlers(options = {}) {
|
|
|
21327
21462
|
videoDurationSeconds: job.duration ?? null,
|
|
21328
21463
|
outcome: job.outcome ?? "completed",
|
|
21329
21464
|
warnings: job.warnings,
|
|
21330
|
-
perf: job.perfSummary ?? null,
|
|
21465
|
+
perf: policy ? publicPerfSummary(job) : job.perfSummary ?? null,
|
|
21331
21466
|
...strictVariablesResult(job)
|
|
21332
21467
|
});
|
|
21333
21468
|
} catch (error) {
|
|
@@ -21364,9 +21499,9 @@ function createRenderHandlers(options = {}) {
|
|
|
21364
21499
|
return streamSSE(c, async (stream) => {
|
|
21365
21500
|
const requestId = getRequestId(c);
|
|
21366
21501
|
const t0 = Date.now();
|
|
21367
|
-
const prepared = await prepareSseRenderRequest(c, stream, requestId);
|
|
21502
|
+
const prepared = await prepareSseRenderRequest(c, stream, requestId, policy);
|
|
21368
21503
|
if (!prepared) return;
|
|
21369
|
-
const preparedJob = prepareRenderJob(prepared, rendersDir, log);
|
|
21504
|
+
const preparedJob = prepareRenderJob(prepared, rendersDir, log, !!policy);
|
|
21370
21505
|
if ("error" in preparedJob) {
|
|
21371
21506
|
await stream.writeSSE({
|
|
21372
21507
|
data: JSON.stringify({
|
|
@@ -21423,7 +21558,7 @@ function createRenderHandlers(options = {}) {
|
|
|
21423
21558
|
videoDurationSeconds: job.duration ?? null,
|
|
21424
21559
|
outcome: job.outcome ?? "completed",
|
|
21425
21560
|
warnings: job.warnings,
|
|
21426
|
-
perf: job.perfSummary ?? null,
|
|
21561
|
+
perf: policy ? publicPerfSummary(job) : job.perfSummary ?? null,
|
|
21427
21562
|
producerVersion: readProducerVersion(),
|
|
21428
21563
|
...strictVariablesResult(job)
|
|
21429
21564
|
})
|
|
@@ -21481,9 +21616,79 @@ function isCrossOriginBrowserRequest(c) {
|
|
|
21481
21616
|
return true;
|
|
21482
21617
|
}
|
|
21483
21618
|
}
|
|
21619
|
+
function hostnameOf(host) {
|
|
21620
|
+
try {
|
|
21621
|
+
return new URL(`http://${host}`).hostname.toLowerCase();
|
|
21622
|
+
} catch {
|
|
21623
|
+
return null;
|
|
21624
|
+
}
|
|
21625
|
+
}
|
|
21626
|
+
function isAllowedBrowserHostname(hostname2, allowed) {
|
|
21627
|
+
if (!hostname2) return false;
|
|
21628
|
+
if (hostname2 === "localhost" || hostname2.endsWith(".localhost")) return true;
|
|
21629
|
+
if (isIP(hostname2.replace(/^\[|\]$/g, "")) !== 0) return true;
|
|
21630
|
+
return allowed.has(hostname2);
|
|
21631
|
+
}
|
|
21632
|
+
function allowedHostnames(options) {
|
|
21633
|
+
const fromEnv = (process.env.PRODUCER_ALLOWED_HOSTS ?? "").split(",");
|
|
21634
|
+
const names = /* @__PURE__ */ new Set();
|
|
21635
|
+
for (const entry of [...options.allowedHosts ?? [], ...fromEnv]) {
|
|
21636
|
+
const hostname2 = entry.trim() ? hostnameOf(entry.trim()) : null;
|
|
21637
|
+
if (hostname2) names.add(hostname2);
|
|
21638
|
+
}
|
|
21639
|
+
return names;
|
|
21640
|
+
}
|
|
21641
|
+
function resolveAuthToken(options) {
|
|
21642
|
+
return options.authToken?.trim() || process.env.PRODUCER_AUTH_TOKEN?.trim() || "";
|
|
21643
|
+
}
|
|
21644
|
+
function hasBearerToken(c, token) {
|
|
21645
|
+
const digest = (value) => crypto.createHash("sha256").update(value).digest();
|
|
21646
|
+
return crypto.timingSafeEqual(
|
|
21647
|
+
digest(c.req.header("authorization") ?? ""),
|
|
21648
|
+
digest(`Bearer ${token}`)
|
|
21649
|
+
);
|
|
21650
|
+
}
|
|
21651
|
+
function isLoopbackHostname(hostname2) {
|
|
21652
|
+
const host = hostname2.replace(/^\[|\]$/g, "").toLowerCase();
|
|
21653
|
+
return host === "localhost" || host === "::1" || isIP(host) === 4 && host.startsWith("127.");
|
|
21654
|
+
}
|
|
21655
|
+
function isDisallowedBrowserHost(c, allowed) {
|
|
21656
|
+
const origin = c.req.header("origin");
|
|
21657
|
+
if (!origin && !c.req.header("sec-fetch-site")) return false;
|
|
21658
|
+
if (!isAllowedBrowserHostname(hostnameOf(c.req.header("host") ?? ""), allowed)) return true;
|
|
21659
|
+
if (!origin) return false;
|
|
21660
|
+
try {
|
|
21661
|
+
return !isAllowedBrowserHostname(new URL(origin).hostname.toLowerCase(), allowed);
|
|
21662
|
+
} catch {
|
|
21663
|
+
return true;
|
|
21664
|
+
}
|
|
21665
|
+
}
|
|
21484
21666
|
function createProducerApp(options = {}) {
|
|
21485
21667
|
const app = new Hono2();
|
|
21486
|
-
const handlers = createRenderHandlers(
|
|
21668
|
+
const handlers = createRenderHandlers({
|
|
21669
|
+
...options,
|
|
21670
|
+
confineRequests: options.confineRequests ?? true
|
|
21671
|
+
});
|
|
21672
|
+
const allowed = allowedHostnames(options);
|
|
21673
|
+
const authToken = resolveAuthToken(options);
|
|
21674
|
+
app.use("*", async (c, next) => {
|
|
21675
|
+
if (authToken && c.req.path !== "/health" && !hasBearerToken(c, authToken)) {
|
|
21676
|
+
return c.json({ success: false, error: "Unauthorized" }, 401);
|
|
21677
|
+
}
|
|
21678
|
+
await next();
|
|
21679
|
+
});
|
|
21680
|
+
app.use("*", async (c, next) => {
|
|
21681
|
+
if (isDisallowedBrowserHost(c, allowed)) {
|
|
21682
|
+
return c.json(
|
|
21683
|
+
{
|
|
21684
|
+
success: false,
|
|
21685
|
+
error: "Host not allowed. Add it to allowedHosts or PRODUCER_ALLOWED_HOSTS."
|
|
21686
|
+
},
|
|
21687
|
+
403
|
|
21688
|
+
);
|
|
21689
|
+
}
|
|
21690
|
+
await next();
|
|
21691
|
+
});
|
|
21487
21692
|
app.post("*", async (c, next) => {
|
|
21488
21693
|
if (isCrossOriginBrowserRequest(c)) {
|
|
21489
21694
|
return c.json({ success: false, error: "Cross-origin requests are not allowed" }, 403);
|
|
@@ -21500,10 +21705,17 @@ function createProducerApp(options = {}) {
|
|
|
21500
21705
|
}
|
|
21501
21706
|
function startServer(options = {}) {
|
|
21502
21707
|
const port = options.port ?? parseInt(process.env.PRODUCER_PORT ?? "9847", 10);
|
|
21708
|
+
const hostname2 = options.hostname || process.env.PRODUCER_HOST || "127.0.0.1";
|
|
21503
21709
|
const log = options.logger ?? defaultLogger;
|
|
21710
|
+
if (!isLoopbackHostname(hostname2) && !resolveAuthToken(options)) {
|
|
21711
|
+
throw new Error(
|
|
21712
|
+
`Refusing to listen on ${hostname2} without an auth token. Set authToken or PRODUCER_AUTH_TOKEN, or listen on a loopback address.`
|
|
21713
|
+
);
|
|
21714
|
+
}
|
|
21504
21715
|
const app = createProducerApp(options);
|
|
21505
|
-
const server = serve2({ fetch: app.fetch, port }, () => {
|
|
21506
|
-
|
|
21716
|
+
const server = serve2({ fetch: app.fetch, port, hostname: hostname2 }, (info) => {
|
|
21717
|
+
const address = info.family === "IPv6" ? `[${info.address}]` : info.address;
|
|
21718
|
+
log.info(`Listening on http://${address}:${info.port}`);
|
|
21507
21719
|
});
|
|
21508
21720
|
server.setTimeout(0);
|
|
21509
21721
|
server.requestTimeout = 0;
|
|
@@ -21514,7 +21726,7 @@ function startServer(options = {}) {
|
|
|
21514
21726
|
});
|
|
21515
21727
|
async function shutdown(signal) {
|
|
21516
21728
|
log.info(`Received ${signal}, shutting down`);
|
|
21517
|
-
const { drainBrowserPool } = await import("./src-
|
|
21729
|
+
const { drainBrowserPool } = await import("./src-O5P56HIK.js");
|
|
21518
21730
|
await drainBrowserPool().catch(() => {
|
|
21519
21731
|
});
|
|
21520
21732
|
const handle = await Promise.race([
|