hyperframes 0.9.59 → 0.9.63
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-C7J7HSLI.js → add-OBIEVDD7.js} +26 -27
- package/dist/{agentPromptGenerator-GCLJUGVE.js → agentPromptGenerator-KOFDIQGE.js} +15 -17
- package/dist/{animatedGifPrep-JPQZPZC4.js → animatedGifPrep-C4S7AVG7.js} +20 -21
- package/dist/api.d.ts +8 -1
- package/dist/api.js +58 -58
- package/dist/{appHistory-TQ6JAEP5.js → appHistory-ASGUPUUV.js} +5 -6
- package/dist/{asset-HQEPGBDJ.js → asset-FUQDWJ62.js} +15 -5
- package/dist/{assetCataloger-LMPPKPF6.js → assetCataloger-A5N6O4JB.js} +16 -18
- package/dist/{audio-FD2EBZ6D.js → audio-AFNZLDGT.js} +45 -45
- package/dist/{auth-JA7XH6NG.js → auth-N2G7ERXF.js} +4 -4
- package/dist/{autoUpdate-WKW2OMIY.js → autoUpdate-ZGC4CJIP.js} +4 -4
- package/dist/{avatars-Q7U6CO4X.js → avatars-ALJTTP5M.js} +23 -25
- package/dist/{backgroundChecks-H2SOS2CM.js → backgroundChecks-3S6MXDFU.js} +5 -5
- package/dist/backgroundChecksWorker.js +5 -5
- package/dist/{batchRender-75OLVMZY.js → batchRender-HZIXQY4N.js} +7 -9
- package/dist/{beats-R4EHWWJN.js → beats-2XU7WVQU.js} +16 -18
- package/dist/{benchmark-F5OHG3Q3.js → benchmark-SBZQIKED.js} +27 -27
- package/dist/{billing-LBRSBVXQ.js → billing-2DFCEQSM.js} +21 -23
- package/dist/{browser-CNTCFZOG.js → browser-336OZKWA.js} +13 -15
- package/dist/{bundleWithLocalizedFonts-RVF7AFP5.js → bundleWithLocalizedFonts-DMW5VAFU.js} +1 -1
- package/dist/{capture-CTRZEZTC.js → capture-AD5PYZ2O.js} +10 -12
- package/dist/{capture-DLYM3V5F.js → capture-Z3LNLS32.js} +43 -41
- package/dist/{captureCompositionFrame-2O2HP6SK.js → captureCompositionFrame-2BVCI3V2.js} +22 -24
- package/dist/{captureFile-W7ZDDBCD.js → captureFile-Z7HQDRC2.js} +4 -5
- package/dist/{catalog-6XL63LU3.js → catalog-OKCKRILJ.js} +28 -30
- package/dist/{catch-up-AOFQWE6O.js → catch-up-MP2BCTZH.js} +15 -17
- package/dist/{check-5V7K4RL6.js → check-FYG4RBOV.js} +62 -63
- package/dist/{checkAudio-4YUTDQSQ.js → checkAudio-3RKJELTT.js} +18 -20
- package/dist/{checkBrowser-BAWRZZZU.js → checkBrowser-R3KY4UR5.js} +52 -53
- package/dist/{chunk-EGZQX3UX.js → chunk-2SPQTJA2.js} +24 -22
- package/dist/{chunk-2ARKMOCD.js → chunk-2XKRMQJP.js} +6 -6
- package/dist/{chunk-MHF5F4FF.js → chunk-3GF72UPC.js} +74 -15
- package/dist/chunk-3HJX4F2S.js +39 -0
- package/dist/{chunk-KYXH4JWF.js → chunk-3KKKIHBJ.js} +18 -17
- package/dist/{chunk-QC35TPEE.js → chunk-3O2FM72C.js} +6 -6
- package/dist/{chunk-WDMSNDHS.js → chunk-3SMQ3AKQ.js} +297 -115
- package/dist/{chunk-MVA4OQL7.js → chunk-4KEONZJ2.js} +1 -1
- package/dist/{chunk-O733DEVT.js → chunk-4ORH2OXS.js} +1 -1
- package/dist/{chunk-VPPKUCSP.js → chunk-4SDNEKTL.js} +2 -2
- package/dist/{chunk-AEXDJU77.js → chunk-4T45V6GF.js} +1 -1
- package/dist/{chunk-CIXP5G7Z.js → chunk-5GUYYSVT.js} +1 -1
- package/dist/{chunk-ZQIMO52O.js → chunk-5RCXJH5B.js} +59 -24
- package/dist/{chunk-TVWDS5AT.js → chunk-5T2LNQAH.js} +46 -18
- package/dist/{chunk-XZ6THYIK.js → chunk-5YY4SRBH.js} +5 -5
- package/dist/{chunk-5IE5ZI66.js → chunk-62UUXB3F.js} +1 -1
- package/dist/{chunk-5T6HPV25.js → chunk-63CSQYYO.js} +2 -2
- package/dist/{chunk-R4EWRIDL.js → chunk-6B2TH52B.js} +8 -1
- package/dist/{chunk-N6QWL3E7.js → chunk-6HHKHDMW.js} +2 -2
- package/dist/{chunk-Z2U7ELGP.js → chunk-6KU6TCSS.js} +2 -2
- package/dist/{chunk-PSREPOJ4.js → chunk-6PANJZEW.js} +18 -14
- package/dist/{chunk-YMKCJRVK.js → chunk-7AYDKU2X.js} +1 -1
- package/dist/{chunk-PMKWTXHE.js → chunk-7CSPYOLI.js} +2 -2
- package/dist/{chunk-KQHDFVFF.js → chunk-7F3NOYSK.js} +2 -2
- package/dist/{chunk-ZMLZRMG7.js → chunk-7NHID6VP.js} +2 -2
- package/dist/{chunk-BMTT2T7M.js → chunk-7NMH22SY.js} +5 -5
- package/dist/{chunk-RDWGNSVI.js → chunk-7YB4BDX7.js} +2 -2
- package/dist/{chunk-RAOGN2HG.js → chunk-A65Q5P62.js} +1 -1
- package/dist/{chunk-JQ7BPN2R.js → chunk-ABK44JS4.js} +3 -3
- package/dist/{chunk-DSCMYTKJ.js → chunk-AQFSYY23.js} +3 -3
- package/dist/{chunk-PLOCYJ5U.js → chunk-B5TLZC2D.js} +11 -4
- package/dist/{chunk-EUVU5JS4.js → chunk-BGIRYNAW.js} +38 -11
- package/dist/{chunk-URHIQHDR.js → chunk-BGV5YKSM.js} +14 -12
- package/dist/{chunk-QVHDAS3L.js → chunk-BJLC2UEQ.js} +4 -4
- package/dist/{chunk-QHVE6AFU.js → chunk-BJMW2GYO.js} +1 -1
- package/dist/{chunk-LSGJY2FG.js → chunk-CDPVVNNZ.js} +1 -1
- package/dist/{chunk-HXFGAI6L.js → chunk-CLRASDLH.js} +16 -16
- package/dist/{chunk-CAMD2NBN.js → chunk-CSMWC336.js} +2 -2
- package/dist/{chunk-WRSGWDDB.js → chunk-CZYQR7VM.js} +9 -9
- package/dist/chunk-D37I36FY.js +21 -0
- package/dist/{chunk-6LGB4MVX.js → chunk-DEWY2KX4.js} +1 -1
- package/dist/{chunk-OV5OSN74.js → chunk-DG4VSBM3.js} +3 -3
- package/dist/{chunk-L456Q4KU.js → chunk-DJCBHKQ5.js} +1 -1
- package/dist/{chunk-SGQKP2JT.js → chunk-DN4KUTQ5.js} +2 -2
- package/dist/{chunk-RHFB457E.js → chunk-DVUC244G.js} +3 -3
- package/dist/{chunk-7Q4EGB3N.js → chunk-E6WYYM6K.js} +1 -1
- package/dist/chunk-EJINQHA6.js +113 -0
- package/dist/{chunk-T5QI7ZL2.js → chunk-EPWGATQN.js} +5 -5
- package/dist/{chunk-VXRTE7MZ.js → chunk-ERYGKPIR.js} +1 -1
- package/dist/{chunk-HOIEN7O4.js → chunk-F6PI5O3H.js} +3 -1
- package/dist/{chunk-L4MXZHRB.js → chunk-FA6TQ22Y.js} +3 -3
- package/dist/{chunk-JLMMY3UI.js → chunk-FAYFXXVF.js} +2 -2
- package/dist/{chunk-JUUOYXWH.js → chunk-FEURVA3G.js} +2 -2
- package/dist/{chunk-PHYFZXOS.js → chunk-FLJ4S7NA.js} +2 -2
- package/dist/{chunk-LZWG4GCC.js → chunk-GGSE4SO2.js} +55 -125
- package/dist/chunk-GJPT5Q6H.js +112 -0
- package/dist/{chunk-C3NDLM4S.js → chunk-GPZIE45V.js} +2 -2
- package/dist/{chunk-6UAYOSE7.js → chunk-GRBYYKYT.js} +9 -9
- package/dist/{chunk-GYJ7AJXN.js → chunk-H4HYZUE3.js} +1 -1
- package/dist/{chunk-7YRZBB4C.js → chunk-H7FGALE4.js} +1 -1
- package/dist/{chunk-FQ26QE5N.js → chunk-HAFE7SZR.js} +1 -1
- package/dist/{chunk-TIZC4XKU.js → chunk-HAMPVCRY.js} +2 -2
- package/dist/{chunk-POFQOZOF.js → chunk-HF2A733B.js} +490 -224
- package/dist/{chunk-3DFEBAWJ.js → chunk-HGVBKNLQ.js} +2 -2
- package/dist/{chunk-4STRMCGD.js → chunk-HHM2JZLH.js} +4 -4
- package/dist/{chunk-PYRM3OAI.js → chunk-HJTCWQGF.js} +11 -13
- package/dist/{chunk-677JGYQL.js → chunk-HLVNKNSW.js} +1 -0
- package/dist/{chunk-SC7SX2I3.js → chunk-HMY3GUJN.js} +4 -4
- package/dist/{chunk-3RTZ2UX7.js → chunk-HS7YBLZS.js} +1 -1
- package/dist/{chunk-B653JKWT.js → chunk-HY6N5K6U.js} +4 -4
- package/dist/{chunk-WI3FM54X.js → chunk-HZMDLKRP.js} +3 -3
- package/dist/{chunk-6ATP7YPZ.js → chunk-IBU2BW4H.js} +9 -4
- package/dist/{chunk-I5H2FPNP.js → chunk-ICP22AQY.js} +1 -1
- package/dist/{chunk-ORKZUTZW.js → chunk-IOWECUEU.js} +1 -1
- package/dist/{chunk-RKIF4EU7.js → chunk-IS45C2EI.js} +14 -14
- package/dist/{chunk-SXCM6VY3.js → chunk-IU6AC3WL.js} +1 -1
- package/dist/{chunk-FGJUVWAM.js → chunk-J2MAI47E.js} +1 -1
- package/dist/{chunk-K33E3YNK.js → chunk-J43NNMIX.js} +10 -10
- package/dist/{chunk-FC77MYAD.js → chunk-J4YDHNAH.js} +1 -1
- package/dist/{chunk-QKHW5NXL.js → chunk-JDKLF3AG.js} +2 -2
- package/dist/{chunk-PCHUX7Y5.js → chunk-JU4ZWNU6.js} +2 -2
- package/dist/{chunk-2LJPBYKI.js → chunk-KDLMUU3E.js} +1 -1
- package/dist/{chunk-OPIS2YMA.js → chunk-KIWGMFXC.js} +6 -6
- package/dist/{chunk-ISSG4PUD.js → chunk-LGIWC6KN.js} +3 -3
- package/dist/{chunk-YXX6CIHL.js → chunk-LKHH4BUW.js} +12 -1
- package/dist/{chunk-PDT6CBK2.js → chunk-LNDOTF7B.js} +8 -3
- package/dist/{chunk-BTXYXM2A.js → chunk-LYGIKJBA.js} +17 -17
- package/dist/{chunk-K2WLOTTF.js → chunk-LYTELQL2.js} +2 -4
- package/dist/chunk-MCTQEI6H.js +170 -0
- package/dist/{chunk-XXJBWKDS.js → chunk-MHS3RUAQ.js} +17 -17
- package/dist/{chunk-H3TD4VKX.js → chunk-MJBBKSKB.js} +1 -1
- package/dist/{chunk-ODLSLYJR.js → chunk-MTCVUAUK.js} +2 -2
- package/dist/{chunk-FFL5R2EZ.js → chunk-N5EZRITN.js} +4 -4
- package/dist/{chunk-65X2G57W.js → chunk-NEZVFC34.js} +4 -4
- package/dist/{chunk-J4OHC5FU.js → chunk-NK2UW3WR.js} +1 -1
- package/dist/{chunk-763UG5II.js → chunk-OOVT26AC.js} +8 -8
- package/dist/{chunk-JT7RXK2N.js → chunk-OW6MOJSR.js} +1 -1
- package/dist/{chunk-4VJQVTQI.js → chunk-PAHTZDMZ.js} +1 -1
- package/dist/chunk-PET4B6IL.js +159 -0
- package/dist/{chunk-7XOORL2Q.js → chunk-PJ22RPTH.js} +10 -10
- package/dist/{chunk-I6OSAVHD.js → chunk-PLI7YT5S.js} +7 -11
- package/dist/{chunk-6VY52EVW.js → chunk-PQ2OPPGP.js} +7 -3
- package/dist/{chunk-KK5Z5XQ3.js → chunk-PTGNUVCB.js} +3 -0
- package/dist/{chunk-HTISHNLA.js → chunk-Q7IOMZ5X.js} +1 -1
- package/dist/{chunk-TNFTRLLJ.js → chunk-QOLZBRLN.js} +3 -3
- package/dist/{chunk-WQGDE3L6.js → chunk-QUYSLXNP.js} +1 -1
- package/dist/{chunk-6R4MEYWD.js → chunk-QY42NK3T.js} +2 -2
- package/dist/{chunk-CC72LTIT.js → chunk-R5HNUPI5.js} +259 -230
- package/dist/{chunk-QBN2W4T3.js → chunk-RC2DDVX5.js} +1 -1
- package/dist/{chunk-J3H6QDDY.js → chunk-RF3DT4CS.js} +1 -1
- package/dist/{chunk-3QMGLSKC.js → chunk-RHHPEUVM.js} +2 -2
- package/dist/{chunk-UBNJWS2H.js → chunk-RQ4YNYWE.js} +3 -3
- package/dist/{chunk-6EMFSRTW.js → chunk-S35RUNXJ.js} +7 -0
- package/dist/{chunk-XXOEYRD5.js → chunk-S4X7H76F.js} +2 -2
- package/dist/{chunk-VFGFXE6J.js → chunk-SDIQEPAR.js} +1 -1
- package/dist/{chunk-D44MBZI6.js → chunk-SFIUSS3O.js} +2 -2
- package/dist/{chunk-OF7SQ77J.js → chunk-SIQGTRZ5.js} +1 -1
- package/dist/{chunk-AQIHV4PM.js → chunk-SKQWXQ7H.js} +2 -2
- package/dist/{chunk-QJ2BV7FM.js → chunk-SOIOB7FF.js} +9 -9
- package/dist/{chunk-GMIFMRWR.js → chunk-T25ZHQR2.js} +6 -6
- package/dist/{chunk-6T4PB35F.js → chunk-TRQDC2UC.js} +9 -2
- package/dist/{chunk-HLOJSBGC.js → chunk-TTRX7NM3.js} +9 -9
- package/dist/chunk-TZ6M2LEV.js +5101 -0
- package/dist/{chunk-6K6RIX2A.js → chunk-U4KLJXI4.js} +21 -6
- package/dist/{chunk-7CI5MLCC.js → chunk-UOWDVL6M.js} +26 -11
- package/dist/{chunk-OYKAS3J5.js → chunk-V7Z2JQRL.js} +3 -3
- package/dist/{chunk-UNB2DFR2.js → chunk-VHDT4EME.js} +3 -3
- package/dist/{chunk-RX67N2PU.js → chunk-VM2VBJRC.js} +31 -2
- package/dist/{chunk-LTOUXR3X.js → chunk-VSCJ76AM.js} +73 -75
- package/dist/{chunk-WTZT6FSK.js → chunk-VSS3OAZB.js} +1 -1
- package/dist/{chunk-TJGGLLQJ.js → chunk-VWI7V4Q5.js} +35 -16
- package/dist/{chunk-SO7FT7YA.js → chunk-WMKIO4OA.js} +33 -32
- package/dist/{chunk-THGJTFYB.js → chunk-WTO3A7ET.js} +86 -6
- package/dist/{chunk-YBYNBKCN.js → chunk-WTS245RC.js} +2 -2
- package/dist/{chunk-ECGNWHFE.js → chunk-XBHPFWRL.js} +88 -2
- package/dist/{chunk-KGPHUBBA.js → chunk-XFGC5XLR.js} +1 -1
- package/dist/{chunk-R3ONQOLE.js → chunk-XGKNDIBT.js} +11 -11
- package/dist/{chunk-DCRHNRUY.js → chunk-XQQRCWS5.js} +5 -5
- package/dist/{chunk-XWV6BOCG.js → chunk-XQQZ2G25.js} +5 -5
- package/dist/{chunk-WKE3WTIU.js → chunk-YB2ZJJFJ.js} +1 -1
- package/dist/{chunk-ZIYYSD6S.js → chunk-YN6UGKZE.js} +79 -40
- package/dist/{chunk-TIBFCGLT.js → chunk-YSWORAKY.js} +1 -1
- package/dist/{chunk-HY7FPTBD.js → chunk-YWNQOM4P.js} +2 -2
- package/dist/{chunk-6LU6JICP.js → chunk-YWUE4CRU.js} +96 -9
- package/dist/chunk-Z3BPDCRV.js +537 -0
- package/dist/{chunk-HYXQR5I3.js → chunk-Z55ASKZE.js} +1 -1
- package/dist/{chunk-4QSDXDLV.js → chunk-ZM3GP62D.js} +3 -3
- package/dist/{chunk-ELDZ6C3R.js → chunk-ZYODIJRG.js} +7 -3
- package/dist/{clean-Z5REUSNY.js → clean-QXAUIYBP.js} +36 -37
- package/dist/cli.js +74 -75
- package/dist/{cloud-QP5R6B6A.js → cloud-46NGVK4Q.js} +8 -9
- package/dist/{cloud-NJ7G3NF3.js → cloud-7B4YZT5U.js} +4 -4
- package/dist/{cloudrun-CPAZLNTW.js → cloudrun-CZGDPM57.js} +19 -12
- package/dist/{compare-T5CHD25P.js → compare-O2UN7HGD.js} +70 -92
- package/dist/{compiler-QVDXN4OS.js → compiler-ZGIAIJVE.js} +7 -9
- package/dist/{component-QMZ46KTE.js → component-ZIGH3VGE.js} +8 -10
- package/dist/{compositions-JHYYNBAK.js → compositions-W54S4VIU.js} +21 -23
- package/dist/{contactSheet-7SPGUTDV.js → contactSheet-ROUVWDRO.js} +5 -6
- package/dist/{curve-ON6QQY7T.js → curve-HBHRWPIE.js} +20 -22
- package/dist/{cuts-K4FOVP4E.js → cuts-YHNO7A5G.js} +21 -23
- package/dist/{delete-6WFQ3FC2.js → delete-WIW3WLKA.js} +26 -15
- package/dist/{deploy-UAZQ5PBA.js → deploy-ICQ2PLU5.js} +12 -13
- package/dist/{describeProject-7W6BN5A2.js → describeProject-OCXNHB5X.js} +15 -17
- package/dist/{destroy-4B4OVPHJ.js → destroy-UBSVUXYW.js} +12 -13
- package/dist/{deterministicFonts-VLIVGXUQ.js → deterministicFonts-JER4GPCM.js} +4 -5
- package/dist/{diff-ZSA37QQS.js → diff-43OCC2Y3.js} +57 -54
- package/dist/{dist-ACT5C6ME.js → dist-6EF2P3P7.js} +4 -4
- package/dist/{dist-VRYZIJFZ.js → dist-A65PCIEN.js} +5 -8
- package/dist/{dist-2O52E7QZ.js → dist-DRHXUWGQ.js} +25 -21
- package/dist/{doctor-RXQ2Y2YY.js → doctor-XVOTWU62.js} +23 -25
- package/dist/{dotEnv-RZ52L7X3.js → dotEnv-MWWLCN66.js} +11 -3
- package/dist/{energy-DRA3DCRO.js → energy-SGA245NF.js} +21 -23
- package/dist/{events-4SNBQE3M.js → events-6HPYERWI.js} +23 -25
- package/dist/{events-GA3YM3WT.js → events-LIZCRDAT.js} +5 -5
- package/dist/{events-AJNF2C3H.js → events-MMXXYK5J.js} +10 -12
- package/dist/{execute-6LTZRWE4.js → execute-3346FOCY.js} +49 -46
- package/dist/{extract-XZQN654B.js → extract-VDV6EY5E.js} +21 -23
- package/dist/{face-RKUNVSN3.js → face-EGKO7HYX.js} +22 -24
- package/dist/{feedback-AL7NPPMZ.js → feedback-KEX6YIDA.js} +62 -38
- package/dist/{ffmpeg-BEL7EZBA.js → ffmpeg-OIAPERTW.js} +14 -16
- package/dist/{figma-IZ3NH2KZ.js → figma-KANAV6Q6.js} +3 -3
- package/dist/fontLocalizeCli.js +26 -27
- package/dist/{frames-AYE53CSZ.js → frames-XBQNOQBU.js} +23 -25
- package/dist/{generate-BZ4EVVQI.js → generate-P4E5UIEY.js} +37 -39
- package/dist/{get-2GG4NSOK.js → get-R2FJMNJK.js} +26 -15
- package/dist/{gpuPolicy-W2ZGBXNG.js → gpuPolicy-AISTDFL2.js} +14 -16
- package/dist/{grade-compare-65NWHVXK.js → grade-compare-CE4RUMFU.js} +50 -51
- package/dist/hangReport.js +2 -2
- package/dist/{heifImagePrep-MRQ4KKDF.js → heifImagePrep-UQUW2OVF.js} +21 -22
- package/dist/{help-TEQWNNPI.js → help-SK6PGYI2.js} +1 -1
- package/dist/{history-MVNPETRW.js → history-DM5H55WQ.js} +23 -25
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +67 -67
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-NGNTHWYX.js → info-UBGKJ5XD.js} +23 -25
- package/dist/{init-H7SUGVZX.js → init-SGBCTXCE.js} +41 -43
- package/dist/{ink-CPZ4YZFM.js → ink-NWXEZQPJ.js} +21 -23
- package/dist/{inspect-GZBQ7XN7.js → inspect-B7VENILS.js} +53 -54
- package/dist/{installer-ZTHYVK4L.js → installer-GR5X6HMD.js} +8 -10
- package/dist/{keyframes-B52LQUOI.js → keyframes-VZSC75GL.js} +77 -28
- package/dist/{lambda-SZDQJMKA.js → lambda-KCTB2LV5.js} +32 -26
- package/dist/{layout-BOUOG2D2.js → layout-3HSW3SNT.js} +53 -54
- package/dist/{lint-H4OWI5JN.js → lint-Q6NRDYLG.js} +18 -20
- package/dist/{lintProject-P4EAXFU2.js → lintProject-N3UN6HEE.js} +4 -4
- package/dist/{list-VNEYACGL.js → list-5TAZKTS2.js} +27 -16
- package/dist/{localPage-ZP7WVA2N.js → localPage-X22Z5SDE.js} +15 -17
- package/dist/{login-RUDOUO5Z.js → login-TIPDZQXX.js} +6 -6
- package/dist/{logout-5ZO6ZNS3.js → logout-KQ7VU5M6.js} +2 -2
- package/dist/{look-G3NVPKXZ.js → look-VODDQOS6.js} +21 -23
- package/dist/{manager-NXH2NJC6.js → manager-B5HWXCKJ.js} +16 -18
- package/dist/{manager-KWNID2ZA.js → manager-C5S25OOK.js} +5 -5
- package/dist/{measure-5PVIZ2W2.js → measure-EPD4JLR7.js} +11 -11
- package/dist/{media-treatment-T5QJI4PQ.js → media-treatment-ZLWCSYMP.js} +29 -29
- package/dist/{media-use-RTN3SMVY.js → media-use-HELWSEKT.js} +12 -8
- package/dist/{models-J2CJ7EVX.js → models-OKVD2GZS.js} +20 -22
- package/dist/{motionShot-HU7P26WJ.js → motionShot-6HJBMGBW.js} +28 -30
- package/dist/{normalize-44E7R6T5.js → normalize-TBACWMEK.js} +4 -5
- package/dist/{normalize-audio-2YFTP2T6.js → normalize-audio-PKUJQYZZ.js} +20 -21
- package/dist/{open-RSCNUV6E.js → open-ZOXZI6MJ.js} +26 -28
- package/dist/{parakeetRunner-BUY25EIR.js → parakeetRunner-I3TPZNMG.js} +24 -26
- package/dist/{pipeline-A4RL5R5P.js → pipeline-IGYBW7NA.js} +20 -20
- package/dist/{plan-7WYNPILA.js → plan-K2WUQRA2.js} +31 -33
- package/dist/{play-UKHFNMYZ.js → play-QRRL526W.js} +47 -45
- package/dist/{preflight-2VFCT3PI.js → preflight-KTYLNVCB.js} +17 -19
- package/dist/{present-ZUGFCQOF.js → present-EX2TKGXD.js} +39 -40
- package/dist/{preview-BT2ZFYMC.js → preview-FXMD27D6.js} +50 -50
- package/dist/privateProjectFile-TTLLYWGC.js +65 -0
- package/dist/{probe-2CLEK2UT.js → probe-2QG66GKK.js} +21 -23
- package/dist/{producer-HCAMS55D.js → producer-QH7A62IS.js} +1 -1
- package/dist/{progress-5A4N7PTR.js → progress-PT3NAFVP.js} +5 -6
- package/dist/{projectConfig-2KJ2PXIM.js → projectConfig-ZX2IUY45.js} +11 -13
- package/dist/{publication-AR63EGJF.js → publication-SKR5UXQK.js} +6 -8
- package/dist/{publish-EGKYOJWV.js → publish-X2PMT5TT.js} +63 -42
- package/dist/receivedRecordFollow-K7DVCCUS.js +54 -0
- package/dist/{refresh-GYRLZ7DZ.js → refresh-CYSJHATJ.js} +2 -2
- package/dist/{remove-background-IQQPMM24.js → remove-background-5FVNHD45.js} +21 -21
- package/dist/{render-ROJ5X53T.js → render-CJDV7E5M.js} +128 -87
- package/dist/{render-HJRMJYTA.js → render-GPXJCWM4.js} +12 -13
- package/dist/{render-YNSZYEEK.js → render-KAABP77Y.js} +141 -114
- package/dist/{render-batch-MXYDIHRO.js → render-batch-JYPH5RA7.js} +12 -13
- package/dist/renderSetupWorker.js +9 -9
- package/dist/{resolver-SPLAVF76.js → resolver-NXCI42VM.js} +8 -10
- package/dist/{reverse-CE6OGBB7.js → reverse-TQTVHTEN.js} +1 -1
- package/dist/{run-YVNJJL26.js → run-3O3N737Q.js} +11 -12
- package/dist/{sam-2D3BUTL7.js → sam-O7Y2CCK3.js} +4 -4
- package/dist/{screenshotCapture-DRO7VMNI.js → screenshotCapture-V6VXB4AZ.js} +17 -19
- package/dist/{service-K65JYG4O.js → service-HBLZ3T4R.js} +22 -24
- package/dist/{share-CSVWF6SB.js → share-QBLF3RGF.js} +26 -28
- package/dist/{sherpa-JE6AFUEV.js → sherpa-UZXWHCV4.js} +23 -25
- package/dist/sherpaWorker.js +6 -7
- package/dist/{sites-QCGTWVNF.js → sites-R5F5FNAL.js} +6 -6
- package/dist/skills/hyperframes/scripts/locate.mjs +13 -19
- package/dist/skills/media-use/audio/references/tts-to-captions.md +1 -1
- package/dist/skills/media-use/audio/references/tts.md +6 -6
- package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +143 -2
- package/dist/skills/media-use/audio/scripts/lib/tts.mjs +12 -2
- package/dist/skills/media-use/scripts/lib/candidates.mjs +3 -2
- package/dist/skills/media-use/scripts/lib/terminal-text.d.mts +1 -0
- package/dist/skills/media-use/scripts/lib/terminal-text.mjs +12 -0
- package/dist/skills/media-use/scripts/resolve.mjs +21 -15
- package/dist/{skills-L3BXM7VJ.js → skills-HVIJD32X.js} +15 -17
- package/dist/{skillsUpdateCheck-VUENI5OR.js → skillsUpdateCheck-DD2NM36O.js} +5 -5
- package/dist/{snapshot-GI2GWIF6.js → snapshot-JKKROVMI.js} +97 -84
- package/dist/{src-ZXZO5RCJ.js → src-BBT6W66H.js} +29 -30
- package/dist/{src-B646B52O.js → src-IQKTGPPV.js} +17 -19
- package/dist/{start-ZNGKXRNE.js → start-A4KULXY2.js} +43 -37
- package/dist/{state-7CJBWHXJ.js → state-5LE7AN6F.js} +5 -6
- package/dist/{staticProjectServer-46T6YTPF.js → staticProjectServer-WH2SJFSD.js} +33 -34
- package/dist/{status-7SWTPLVI.js → status-ZL2XQWMR.js} +23 -25
- package/dist/studio/assets/{hyperframes-player-bya4hgms.js → hyperframes-player-CUQxAJaE.js} +1 -1
- package/dist/studio/assets/{index--dcfSUzI.js → index-D3rdYBVx.js} +1 -1
- package/dist/studio/assets/{index-Bxh5lW0C.js → index-DSrTQv-k.js} +204 -204
- package/dist/studio/assets/{pausedVideoDecoder-BKym1jA6.js → pausedVideoDecoder-BWllfjF-.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-4XKM5HDR.js → studio-api-FNZ62P67.js} +25 -21
- package/dist/{studioSelectionClient-S46TNAAZ.js → studioSelectionClient-PLBQBLCJ.js} +2 -2
- package/dist/{studioServer-4TWRIZNU.js → studioServer-BBVHB7A6.js} +260 -117
- package/dist/subCompositionWorker.js +60 -54
- package/dist/{sync-R3K6LYB3.js → sync-UW6N6ORX.js} +21 -23
- package/dist/{synthesize-OZ3SJTOF.js → synthesize-NGU4DRKC.js} +10 -9
- package/dist/{system-LZ4PMOJD.js → system-PKL4Y4MX.js} +3 -3
- package/dist/{telemetry-WSBY25O3.js → telemetry-OJ2XS46A.js} +10 -12
- package/dist/{templates-ITP6ISAF.js → templates-GH4ZOTLA.js} +24 -26
- package/dist/{timeline-U7GJMYKV.js → timeline-MABFMT2U.js} +36 -37
- package/dist/{tokens-3YTSUU27.js → tokens-XE3K3AJF.js} +15 -5
- package/dist/{transcribe-QHHY5M3G.js → transcribe-IRYGXKOQ.js} +44 -46
- package/dist/{transcribe-ISCBYWN4.js → transcribe-TV5THKEM.js} +20 -22
- package/dist/{tts-24IJXIT2.js → tts-HRWZJFLJ.js} +20 -4
- package/dist/{update-SVEH2GOL.js → update-BLVL5JMT.js} +17 -19
- package/dist/{updateCheck-MDG7N7VO.js → updateCheck-5QADMRBP.js} +4 -4
- package/dist/{upgrade-6CGAI4OR.js → upgrade-CBB7FP3D.js} +8 -9
- package/dist/{urlDownloader-VPQTIGEH.js → urlDownloader-ZJ423NLB.js} +13 -15
- package/dist/{validate-QUB4KCEQ.js → validate-PASIFGBU.js} +41 -42
- package/dist/{video-PUGZ5UHS.js → video-3MS2DCXZ.js} +17 -19
- package/dist/{voices-4UO5AYLS.js → voices-TXV5K5WI.js} +34 -36
- package/dist/warmCheck.js +62 -63
- package/dist/warmCheckClient.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-6VY6WTY5.js +0 -279
- package/dist/chunk-NI7JVGOE.js +0 -5083
- package/dist/chunk-NLN5NY3P.js +0 -34
- package/dist/chunk-UVZIABYZ.js +0 -40
- package/dist/chunk-VC76R6W2.js +0 -27
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
splitElementInHtml,
|
|
20
20
|
unwrapElementsFromHtml,
|
|
21
21
|
wrapElementsInHtml
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VHDT4EME.js";
|
|
23
23
|
import {
|
|
24
24
|
DEFAULT_TARGET_LUFS,
|
|
25
25
|
absoluteLoudnessPlan,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
requestedProjectPath,
|
|
29
29
|
requiredFfmpeg,
|
|
30
30
|
resolveLocalAudioPath
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CZYQR7VM.js";
|
|
32
32
|
import {
|
|
33
33
|
MEDIA_LINK_ATTR,
|
|
34
34
|
relinkSplitHalves
|
|
@@ -40,6 +40,7 @@ import {
|
|
|
40
40
|
ProxyCapacityError,
|
|
41
41
|
ProxyTranscodeError,
|
|
42
42
|
ProxyWaitTimeoutError,
|
|
43
|
+
StillPastEndError,
|
|
43
44
|
createMediaCodecProbeCache,
|
|
44
45
|
decideMediaProxyEligibility,
|
|
45
46
|
isProxyVariantRequest,
|
|
@@ -56,11 +57,11 @@ import {
|
|
|
56
57
|
scanProjectMedia,
|
|
57
58
|
shouldPrewarmProxy,
|
|
58
59
|
waitForProxy
|
|
59
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-VSCJ76AM.js";
|
|
60
61
|
import {
|
|
61
62
|
probeAudioTrack,
|
|
62
63
|
probeMediaMetadata
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-SOIOB7FF.js";
|
|
64
65
|
import {
|
|
65
66
|
HistoryBusyError,
|
|
66
67
|
MAX_WINDOW_IDLE_MS,
|
|
@@ -75,7 +76,7 @@ import {
|
|
|
75
76
|
resolveProjectSignature,
|
|
76
77
|
serveWhileOpen,
|
|
77
78
|
settledFileTag
|
|
78
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-5T2LNQAH.js";
|
|
79
80
|
import {
|
|
80
81
|
findTimelineScript,
|
|
81
82
|
parseGsapScriptAcorn
|
|
@@ -96,24 +97,26 @@ import {
|
|
|
96
97
|
isAudioFile
|
|
97
98
|
} from "./chunk-P2ZMVHTF.js";
|
|
98
99
|
import {
|
|
99
|
-
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
mediaInputArgs
|
|
101
|
+
} from "./chunk-TRQDC2UC.js";
|
|
101
102
|
import {
|
|
102
103
|
isInHiddenOrVendorDir,
|
|
103
104
|
isLinkFreeWithinProject,
|
|
104
105
|
isPrivateProjectFile,
|
|
105
106
|
isPrivateProjectPath,
|
|
107
|
+
isProjectCacheFile,
|
|
106
108
|
isWritableProjectFile,
|
|
107
109
|
mkdirOwnedWithinProject,
|
|
108
110
|
pinWithinProject,
|
|
109
111
|
pinWritableWithinProject,
|
|
110
112
|
projectRelativePath,
|
|
113
|
+
readProjectCacheFile,
|
|
111
114
|
realFilePath,
|
|
112
115
|
resolveWithinProject as resolveWithinProject2,
|
|
113
116
|
resolveWritableWithinProject,
|
|
114
117
|
toolTrustedFileWithin,
|
|
115
118
|
walkDir
|
|
116
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-WTO3A7ET.js";
|
|
117
120
|
import {
|
|
118
121
|
PREVIEW_FOR_ANOTHER_SITE_META,
|
|
119
122
|
STUDIO_PREVIEW_CAPTURE_MODE,
|
|
@@ -121,8 +124,9 @@ import {
|
|
|
121
124
|
STUDIO_PREVIEW_ERROR_KINDS,
|
|
122
125
|
STUDIO_PREVIEW_LAZY_ATTR,
|
|
123
126
|
STUDIO_PREVIEW_MARK_META,
|
|
124
|
-
refusedPreviewMessage
|
|
125
|
-
|
|
127
|
+
refusedPreviewMessage,
|
|
128
|
+
serviceWorkerScriptFetch
|
|
129
|
+
} from "./chunk-LKHH4BUW.js";
|
|
126
130
|
import {
|
|
127
131
|
decodableAudioStream
|
|
128
132
|
} from "./chunk-D54ZDCZR.js";
|
|
@@ -131,7 +135,10 @@ import {
|
|
|
131
135
|
ensureHfIds,
|
|
132
136
|
stampHfIdsInPlace,
|
|
133
137
|
stripSdrPngColourTags
|
|
134
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-PLI7YT5S.js";
|
|
139
|
+
import {
|
|
140
|
+
RENDER_VARIABLES_FILE
|
|
141
|
+
} from "./chunk-F6PI5O3H.js";
|
|
135
142
|
import {
|
|
136
143
|
atomicTempPath,
|
|
137
144
|
catchHeldRename,
|
|
@@ -139,7 +146,7 @@ import {
|
|
|
139
146
|
createStagingDir,
|
|
140
147
|
replaceFileAtomically,
|
|
141
148
|
retryWindowsHold
|
|
142
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-LYTELQL2.js";
|
|
143
150
|
import {
|
|
144
151
|
GSAP_BASE_URL_META,
|
|
145
152
|
PREVIEW_PROXY_BOX_PARAM,
|
|
@@ -157,7 +164,7 @@ import {
|
|
|
157
164
|
normalizeGsapLocalRoot,
|
|
158
165
|
parseFps,
|
|
159
166
|
parsePreviewProxyBox
|
|
160
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-BJMW2GYO.js";
|
|
161
168
|
import {
|
|
162
169
|
AFTER_FONTS_SCRIPT_TYPE,
|
|
163
170
|
RUNTIME_BOOTSTRAP_ATTR,
|
|
@@ -172,7 +179,7 @@ import {
|
|
|
172
179
|
resolveRateSpec,
|
|
173
180
|
sourceTimeAt,
|
|
174
181
|
stripEmbeddedRuntimeScripts
|
|
175
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-TZ6M2LEV.js";
|
|
176
183
|
import {
|
|
177
184
|
ProjectRootMissingError,
|
|
178
185
|
folderGone,
|
|
@@ -181,11 +188,11 @@ import {
|
|
|
181
188
|
mkdirWithinProject,
|
|
182
189
|
realpath,
|
|
183
190
|
resolveWithinProject
|
|
184
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-3GF72UPC.js";
|
|
185
192
|
import {
|
|
186
193
|
isWithinProjectRoot,
|
|
187
194
|
readProjectFile
|
|
188
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-S35RUNXJ.js";
|
|
189
196
|
import {
|
|
190
197
|
decodeCssEscapes,
|
|
191
198
|
decodeWellFormedEscapes,
|
|
@@ -217,7 +224,7 @@ import {
|
|
|
217
224
|
FFPROBE_PATH_ENV,
|
|
218
225
|
findFfBinary,
|
|
219
226
|
requireFfBinary
|
|
220
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-VM2VBJRC.js";
|
|
221
228
|
|
|
222
229
|
// ../studio-server/dist/chunk-UEEXAVOA.js
|
|
223
230
|
function findUnsafeMutationValues(value, path = "body", options = {}) {
|
|
@@ -244,7 +251,7 @@ function findUnsafeDomPatchValues(value) {
|
|
|
244
251
|
});
|
|
245
252
|
}
|
|
246
253
|
|
|
247
|
-
// ../studio-server/dist/chunk-
|
|
254
|
+
// ../studio-server/dist/chunk-P7XQOBFZ.js
|
|
248
255
|
import { hostname, networkInterfaces } from "os";
|
|
249
256
|
function isLoopbackHost(host) {
|
|
250
257
|
if (!host) return false;
|
|
@@ -328,6 +335,10 @@ function requestFromAnotherSite(headers) {
|
|
|
328
335
|
if (!host || isLoopbackHost(host)) return false;
|
|
329
336
|
return !refererNamesHost(headers.referer, host);
|
|
330
337
|
}
|
|
338
|
+
function documentFromAnotherSite(headers) {
|
|
339
|
+
if (headers.fetchSite !== void 0 || !headers.host) return requestFromAnotherSite(headers);
|
|
340
|
+
return !refererNamesHost(headers.referer, headers.host);
|
|
341
|
+
}
|
|
331
342
|
function firstForwarded(value) {
|
|
332
343
|
const first = value?.split(",")[0]?.trim();
|
|
333
344
|
return first === "" ? void 0 : first;
|
|
@@ -352,7 +363,7 @@ function sameOriginPost(headers) {
|
|
|
352
363
|
return originMatches(headers.origin, host, proto);
|
|
353
364
|
}
|
|
354
365
|
|
|
355
|
-
// ../studio-server/dist/chunk-
|
|
366
|
+
// ../studio-server/dist/chunk-MFIHKG5J.js
|
|
356
367
|
import { createHash } from "crypto";
|
|
357
368
|
import { closeSync, constants, fstatSync, openSync, readFileSync } from "fs";
|
|
358
369
|
import { dirname, join } from "path";
|
|
@@ -638,7 +649,7 @@ function studioMotionRenderRuntime(manifestContent, activeCompositionPath) {
|
|
|
638
649
|
applyManifest();
|
|
639
650
|
}
|
|
640
651
|
|
|
641
|
-
// ../studio-server/dist/chunk-
|
|
652
|
+
// ../studio-server/dist/chunk-2ZSUGK2Q.js
|
|
642
653
|
import { resolve } from "path";
|
|
643
654
|
function isAutoProxyEnabled(adapter) {
|
|
644
655
|
return adapter.autoProxy !== false;
|
|
@@ -685,7 +696,7 @@ async function injectMediaCodecMap(html, adapter, projectDir, compSrcPath, probe
|
|
|
685
696
|
return injectMediaCodecMapIntoHtml(html, projectDir, [{ html, compSrcPath }], probeCache, false);
|
|
686
697
|
}
|
|
687
698
|
|
|
688
|
-
// ../studio-server/dist/chunk-
|
|
699
|
+
// ../studio-server/dist/chunk-DRQHYTL6.js
|
|
689
700
|
import { existsSync, readFileSync as readFileSync2 } from "fs";
|
|
690
701
|
import { join as join2 } from "path";
|
|
691
702
|
import { readlinkSync } from "fs";
|
|
@@ -1269,7 +1280,13 @@ var JobAbandonedError = class extends Error {
|
|
|
1269
1280
|
this.name = "JobAbandonedError";
|
|
1270
1281
|
}
|
|
1271
1282
|
};
|
|
1272
|
-
|
|
1283
|
+
var JobQueueFullError = class extends Error {
|
|
1284
|
+
constructor() {
|
|
1285
|
+
super("job queue is full; retry shortly");
|
|
1286
|
+
this.name = "JobQueueFullError";
|
|
1287
|
+
}
|
|
1288
|
+
};
|
|
1289
|
+
function createJobSlots(limit, maxWaiting = Number.POSITIVE_INFINITY) {
|
|
1273
1290
|
let running = 0;
|
|
1274
1291
|
const waiting = [];
|
|
1275
1292
|
const acquire = (signal) => new Promise((resolve33, reject) => {
|
|
@@ -1278,6 +1295,7 @@ function createJobSlots(limit) {
|
|
|
1278
1295
|
running++;
|
|
1279
1296
|
return resolve33();
|
|
1280
1297
|
}
|
|
1298
|
+
if (waiting.length >= maxWaiting) return reject(new JobQueueFullError());
|
|
1281
1299
|
const leave = () => {
|
|
1282
1300
|
waiting.splice(waiting.indexOf(start), 1);
|
|
1283
1301
|
reject(new JobAbandonedError());
|
|
@@ -1304,7 +1322,7 @@ function createJobSlots(limit) {
|
|
|
1304
1322
|
};
|
|
1305
1323
|
}
|
|
1306
1324
|
var PROJECT_SIGNATURE_META = "hyperframes-project-signature";
|
|
1307
|
-
var runStillJob = createJobSlots(4);
|
|
1325
|
+
var runStillJob = createJobSlots(4, 16);
|
|
1308
1326
|
function escapeGsapUrl(url) {
|
|
1309
1327
|
return url.replace(/&/g, "&").replace(/"/g, """);
|
|
1310
1328
|
}
|
|
@@ -1478,6 +1496,7 @@ function previewVariablesFromRequest(rawVariables) {
|
|
|
1478
1496
|
return { raw: rawVariables, values: parse22.values };
|
|
1479
1497
|
}
|
|
1480
1498
|
var PREVIEW_CAPTURE_PARAM = "hf-capture";
|
|
1499
|
+
var PREVIEW_PROXY_PARAM = "hf-proxy";
|
|
1481
1500
|
function scriptJson(value) {
|
|
1482
1501
|
return JSON.stringify(value).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
1483
1502
|
}
|
|
@@ -1776,7 +1795,7 @@ ${etag}`;
|
|
|
1776
1795
|
}
|
|
1777
1796
|
const contentType = getMimeType(subPath);
|
|
1778
1797
|
const isText2 = /\.(html|css|js|json|svg|txt|md|cube)$/i.test(subPath);
|
|
1779
|
-
const proxyParam = c.req.query(
|
|
1798
|
+
const proxyParam = c.req.query(PREVIEW_PROXY_PARAM);
|
|
1780
1799
|
const boxParam = c.req.query(PREVIEW_PROXY_BOX_PARAM);
|
|
1781
1800
|
const proxyBox = boxParam === void 0 ? void 0 : parsePreviewProxyBox(boxParam);
|
|
1782
1801
|
const lightRequested = c.req.query(PREVIEW_PROXY_LIGHT_PARAM) !== void 0;
|
|
@@ -1815,6 +1834,10 @@ ${etag}`;
|
|
|
1815
1834
|
headers: { "Content-Type": "image/jpeg", "Cache-Control": "private, max-age=3600" }
|
|
1816
1835
|
});
|
|
1817
1836
|
} catch (err) {
|
|
1837
|
+
if (err instanceof JobQueueFullError) {
|
|
1838
|
+
return c.text(err.message, 503, { "Retry-After": "5" });
|
|
1839
|
+
}
|
|
1840
|
+
if (err instanceof StillPastEndError) return c.text("not found", 404);
|
|
1818
1841
|
if (isProjectRootMissing(err)) throw err;
|
|
1819
1842
|
return c.text("media still failed", 502);
|
|
1820
1843
|
}
|
|
@@ -1967,7 +1990,7 @@ import {
|
|
|
1967
1990
|
statSync as statSync3,
|
|
1968
1991
|
fstatSync as fstatSync2,
|
|
1969
1992
|
renameSync as renameSync2,
|
|
1970
|
-
readdirSync as
|
|
1993
|
+
readdirSync as readdirSync3,
|
|
1971
1994
|
realpathSync
|
|
1972
1995
|
} from "fs";
|
|
1973
1996
|
import { resolve as resolve23, dirname as dirname3, join as join52, sep as sep2 } from "path";
|
|
@@ -1982,16 +2005,18 @@ import {
|
|
|
1982
2005
|
writeFileSync,
|
|
1983
2006
|
mkdirSync,
|
|
1984
2007
|
lstatSync,
|
|
2008
|
+
readdirSync,
|
|
1985
2009
|
renameSync,
|
|
1986
2010
|
rmSync,
|
|
1987
|
-
statSync as statSync2
|
|
2011
|
+
statSync as statSync2,
|
|
2012
|
+
utimesSync
|
|
1988
2013
|
} from "fs";
|
|
1989
2014
|
import { dirname as dirname23, join as join23 } from "path";
|
|
1990
2015
|
import { spawnSync } from "child_process";
|
|
1991
2016
|
import { mkdtempSync, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
1992
2017
|
import { tmpdir } from "os";
|
|
1993
2018
|
import { basename, join as join32 } from "path";
|
|
1994
|
-
import { readdirSync, readFileSync as readFileSync23, unlinkSync, writeFileSync as writeFileSync3 } from "fs";
|
|
2019
|
+
import { readdirSync as readdirSync2, readFileSync as readFileSync23, unlinkSync, writeFileSync as writeFileSync3 } from "fs";
|
|
1995
2020
|
import { Buffer as Buffer2 } from "buffer";
|
|
1996
2021
|
import { createHash as createHash22 } from "crypto";
|
|
1997
2022
|
import { join as join42, relative as relative22 } from "path";
|
|
@@ -5247,7 +5272,7 @@ import {
|
|
|
5247
5272
|
lstatSync as lstatSync3,
|
|
5248
5273
|
readFileSync as readFileSync6,
|
|
5249
5274
|
unlinkSync as unlinkSync3,
|
|
5250
|
-
readdirSync as
|
|
5275
|
+
readdirSync as readdirSync4,
|
|
5251
5276
|
statSync as statSync4
|
|
5252
5277
|
} from "fs";
|
|
5253
5278
|
import { dirname as dirname42, join as join7 } from "path";
|
|
@@ -5260,7 +5285,7 @@ import {
|
|
|
5260
5285
|
fstatSync as fstatSync22,
|
|
5261
5286
|
openSync as openSync22,
|
|
5262
5287
|
readFileSync as readFileSync7,
|
|
5263
|
-
readdirSync as
|
|
5288
|
+
readdirSync as readdirSync5,
|
|
5264
5289
|
renameSync as renameSync3,
|
|
5265
5290
|
rmSync as rmSync4,
|
|
5266
5291
|
statSync as statSync5,
|
|
@@ -5270,29 +5295,29 @@ import {
|
|
|
5270
5295
|
import { dirname as dirname5, join as join8 } from "path";
|
|
5271
5296
|
import { createHash as createHash4, randomUUID as randomUUID2 } from "crypto";
|
|
5272
5297
|
import { isIP } from "net";
|
|
5273
|
-
import {
|
|
5298
|
+
import { statSync as statSync6 } from "fs";
|
|
5274
5299
|
import { join as join9, relative as relative3, resolve as resolve32 } from "path";
|
|
5275
5300
|
import { execFile } from "child_process";
|
|
5276
|
-
import { readFileSync as
|
|
5301
|
+
import { readFileSync as readFileSync8, rmSync as rmSync5, statSync as statSync7 } from "fs";
|
|
5277
5302
|
import { basename as basename2, dirname as dirname6, join as join10, relative as relative4, sep as sep3 } from "path";
|
|
5278
5303
|
import { createHash as createHash5, randomBytes } from "crypto";
|
|
5279
|
-
import { existsSync as
|
|
5280
|
-
import {
|
|
5304
|
+
import { existsSync as existsSync5 } from "fs";
|
|
5305
|
+
import { statSync as statSync8 } from "fs";
|
|
5281
5306
|
import { join as join11, relative as relative5, resolve as resolve4 } from "path";
|
|
5282
5307
|
import { spawn as spawn2 } from "child_process";
|
|
5283
5308
|
import { closeSync as closeSync3, constants as constants2, fstatSync as fstatSync3, openSync as openSync3, readSync } from "fs";
|
|
5284
5309
|
import { createHash as createHash6 } from "crypto";
|
|
5285
|
-
import { closeSync as closeSync4, constants as constants22, fstatSync as fstatSync4, openSync as openSync4, readFileSync as
|
|
5310
|
+
import { closeSync as closeSync4, constants as constants22, fstatSync as fstatSync4, openSync as openSync4, readFileSync as readFileSync9, rmSync as rmSync6 } from "fs";
|
|
5286
5311
|
import { join as join12 } from "path";
|
|
5287
5312
|
import { streamSSE as streamSSE2 } from "hono/streaming";
|
|
5288
|
-
import { existsSync as
|
|
5313
|
+
import { existsSync as existsSync6, statSync as statSync9 } from "fs";
|
|
5289
5314
|
import { basename as basename3, dirname as dirname7, extname, join as join13, posix } from "path";
|
|
5290
|
-
import { existsSync as
|
|
5315
|
+
import { existsSync as existsSync7, readFileSync as readFileSync10 } from "fs";
|
|
5291
5316
|
import { homedir } from "os";
|
|
5292
5317
|
import { join as join14 } from "path";
|
|
5293
5318
|
import { createHmac, randomBytes as randomBytes2, timingSafeEqual } from "crypto";
|
|
5294
|
-
import { createHash as createHash7 } from "crypto";
|
|
5295
|
-
import {
|
|
5319
|
+
import { createHash as createHash7, createHmac as createHmac2, timingSafeEqual as timingSafeEqual2 } from "crypto";
|
|
5320
|
+
import { readdirSync as readdirSync6, rmSync as rmSync7 } from "fs";
|
|
5296
5321
|
import { join as join15 } from "path";
|
|
5297
5322
|
async function filterCompositionFiles(projectDir, files) {
|
|
5298
5323
|
const htmlFiles = files.filter((f) => f.endsWith(".html") && !isInHiddenOrVendorDir(f));
|
|
@@ -5635,6 +5660,8 @@ function compositionsAffectedBy(projectDir, changedPath) {
|
|
|
5635
5660
|
var SAMPLE_RATE = 4e3;
|
|
5636
5661
|
var PEAK_COUNT = 4e3;
|
|
5637
5662
|
var WAVEFORM_CACHE_VERSION = "v2";
|
|
5663
|
+
var WAVEFORM_CACHE_LIMITS = { entries: 500, bytes: 256 * 1024 * 1024 };
|
|
5664
|
+
var SAMPLE_BIN_CAPACITY = 1 << 16;
|
|
5638
5665
|
function buildWaveformCacheKey(assetPath, fingerprint) {
|
|
5639
5666
|
const name = assetPath.replace(/[/\\]/g, "_");
|
|
5640
5667
|
if (!fingerprint) return `${WAVEFORM_CACHE_VERSION}_${name}.json`;
|
|
@@ -5657,15 +5684,48 @@ function computePeaks(floats, count) {
|
|
|
5657
5684
|
const maxPeak = Math.max(...peaks, 1e-3);
|
|
5658
5685
|
return peaks.map((p) => p / maxPeak);
|
|
5659
5686
|
}
|
|
5660
|
-
|
|
5687
|
+
function createSampleBins(capacity = SAMPLE_BIN_CAPACITY) {
|
|
5688
|
+
return {
|
|
5689
|
+
peaks: new Float32Array(capacity),
|
|
5690
|
+
length: 0,
|
|
5691
|
+
samplesPerBin: 1,
|
|
5692
|
+
inBin: 0,
|
|
5693
|
+
carry: Buffer.alloc(0)
|
|
5694
|
+
};
|
|
5695
|
+
}
|
|
5696
|
+
function mergeNeighbouringBins(bins) {
|
|
5697
|
+
const half = bins.length / 2;
|
|
5698
|
+
for (let i = 0; i < half; i++) {
|
|
5699
|
+
bins.peaks[i] = Math.max(bins.peaks[2 * i] ?? 0, bins.peaks[2 * i + 1] ?? 0);
|
|
5700
|
+
}
|
|
5701
|
+
bins.length = half;
|
|
5702
|
+
bins.samplesPerBin *= 2;
|
|
5703
|
+
}
|
|
5704
|
+
function addSamples(bins, chunk) {
|
|
5705
|
+
const data = bins.carry.length > 0 ? Buffer.concat([bins.carry, chunk]) : chunk;
|
|
5706
|
+
const whole = data.length - data.length % 4;
|
|
5707
|
+
for (let offset = 0; offset < whole; offset += 4) {
|
|
5708
|
+
const abs = Math.abs(data.readFloatLE(offset));
|
|
5709
|
+
if (bins.inBin === 0) {
|
|
5710
|
+
if (bins.length === bins.peaks.length) mergeNeighbouringBins(bins);
|
|
5711
|
+
bins.peaks[bins.length++] = abs;
|
|
5712
|
+
} else if (abs > (bins.peaks[bins.length - 1] ?? 0)) {
|
|
5713
|
+
bins.peaks[bins.length - 1] = abs;
|
|
5714
|
+
}
|
|
5715
|
+
bins.inBin = (bins.inBin + 1) % bins.samplesPerBin;
|
|
5716
|
+
}
|
|
5717
|
+
bins.carry = Buffer.from(data.subarray(whole));
|
|
5718
|
+
}
|
|
5719
|
+
async function decodeAudioPeaks(audioPath, signal) {
|
|
5661
5720
|
const track2 = await probeAudioTrack(audioPath);
|
|
5662
5721
|
if (!track2) throw new Error("no audio stream");
|
|
5722
|
+
signal?.throwIfAborted();
|
|
5663
5723
|
const ffmpeg = requireFfBinary("ffmpeg");
|
|
5664
5724
|
return new Promise((resolvePromise, reject) => {
|
|
5665
5725
|
const proc = spawn(
|
|
5666
5726
|
ffmpeg,
|
|
5667
5727
|
[
|
|
5668
|
-
...
|
|
5728
|
+
...mediaInputArgs(audioPath),
|
|
5669
5729
|
"-i",
|
|
5670
5730
|
audioPath,
|
|
5671
5731
|
"-map",
|
|
@@ -5681,23 +5741,20 @@ async function decodeAudioPeaks(audioPath) {
|
|
|
5681
5741
|
"-vn",
|
|
5682
5742
|
"pipe:1"
|
|
5683
5743
|
],
|
|
5684
|
-
{ stdio: ["ignore", "pipe", "ignore"], windowsHide: true }
|
|
5744
|
+
{ stdio: ["ignore", "pipe", "ignore"], windowsHide: true, signal }
|
|
5685
5745
|
);
|
|
5686
|
-
const
|
|
5687
|
-
proc.stdout?.on("data", (chunk) =>
|
|
5746
|
+
const bins = createSampleBins();
|
|
5747
|
+
proc.stdout?.on("data", (chunk) => addSamples(bins, chunk));
|
|
5688
5748
|
proc.on("close", (code) => {
|
|
5689
|
-
if (code !== 0 &&
|
|
5749
|
+
if (code !== 0 && bins.length === 0) {
|
|
5690
5750
|
reject(new Error(`ffmpeg exited with code ${code}`));
|
|
5691
5751
|
return;
|
|
5692
5752
|
}
|
|
5693
|
-
|
|
5694
|
-
const numSamples = Math.floor(buf.length / 4);
|
|
5695
|
-
if (numSamples === 0) {
|
|
5753
|
+
if (bins.length === 0) {
|
|
5696
5754
|
reject(new Error("ffmpeg produced no audio samples"));
|
|
5697
5755
|
return;
|
|
5698
5756
|
}
|
|
5699
|
-
|
|
5700
|
-
resolvePromise(computePeaks(new Float32Array(ab), PEAK_COUNT));
|
|
5757
|
+
resolvePromise(computePeaks(bins.peaks.subarray(0, bins.length), PEAK_COUNT));
|
|
5701
5758
|
});
|
|
5702
5759
|
proc.on("error", reject);
|
|
5703
5760
|
});
|
|
@@ -5708,14 +5765,14 @@ async function generateWaveformCache(projectDir, assetPath) {
|
|
|
5708
5765
|
const stats = statSync2(audioPath);
|
|
5709
5766
|
const cacheDir = join23(projectDir, ".waveform-cache");
|
|
5710
5767
|
const cachePath = join23(cacheDir, buildWaveformCacheKey(assetPath, stats));
|
|
5711
|
-
if (
|
|
5768
|
+
if (isProjectCacheFile(projectDir, cachePath)) return;
|
|
5712
5769
|
const peaks = await decodeAudioPeaks(audioPath);
|
|
5713
5770
|
writeWaveformCache(cachePath, peaks);
|
|
5714
5771
|
}
|
|
5715
5772
|
function isWaveformCacheDirectory(cacheDir) {
|
|
5716
5773
|
return lstatSync(cacheDir, { throwIfNoEntry: false })?.isDirectory() ?? false;
|
|
5717
5774
|
}
|
|
5718
|
-
function writeWaveformCache(cachePath, peaks) {
|
|
5775
|
+
function writeWaveformCache(cachePath, peaks, limits = WAVEFORM_CACHE_LIMITS) {
|
|
5719
5776
|
const cacheDir = dirname23(cachePath);
|
|
5720
5777
|
try {
|
|
5721
5778
|
mkdirSync(cacheDir, { mode: 448 });
|
|
@@ -5733,10 +5790,46 @@ function writeWaveformCache(cachePath, peaks) {
|
|
|
5733
5790
|
} finally {
|
|
5734
5791
|
try {
|
|
5735
5792
|
rmSync(stagingDir, { recursive: true, force: true });
|
|
5793
|
+
dropEntriesPastCacheLimit(cacheDir, limits);
|
|
5736
5794
|
} catch {
|
|
5737
5795
|
}
|
|
5738
5796
|
}
|
|
5739
5797
|
}
|
|
5798
|
+
var PEAKS_CACHE_MAX_BYTES = 64 * 1024 * 1024;
|
|
5799
|
+
function readCachedPeaks(projectDir, cachePath) {
|
|
5800
|
+
const bytes = readProjectCacheFile(projectDir, cachePath, PEAKS_CACHE_MAX_BYTES);
|
|
5801
|
+
if (!bytes) return null;
|
|
5802
|
+
try {
|
|
5803
|
+
const parsed = JSON.parse(bytes.toString("utf-8"));
|
|
5804
|
+
if (!Array.isArray(parsed) || !parsed.every((n) => typeof n === "number")) return null;
|
|
5805
|
+
markWaveformCacheUsed(cachePath);
|
|
5806
|
+
return parsed;
|
|
5807
|
+
} catch {
|
|
5808
|
+
return null;
|
|
5809
|
+
}
|
|
5810
|
+
}
|
|
5811
|
+
function markWaveformCacheUsed(cachePath) {
|
|
5812
|
+
try {
|
|
5813
|
+
const now = /* @__PURE__ */ new Date();
|
|
5814
|
+
utimesSync(cachePath, now, now);
|
|
5815
|
+
} catch {
|
|
5816
|
+
}
|
|
5817
|
+
}
|
|
5818
|
+
function dropEntriesPastCacheLimit(cacheDir, limits) {
|
|
5819
|
+
const entries = readdirSync(cacheDir, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => {
|
|
5820
|
+
const path = join23(cacheDir, entry.name);
|
|
5821
|
+
const stats = lstatSync(path, { throwIfNoEntry: false });
|
|
5822
|
+
return { path, mtimeMs: stats?.mtimeMs ?? 0, size: stats?.size ?? 0 };
|
|
5823
|
+
}).sort((a, b) => a.mtimeMs - b.mtimeMs);
|
|
5824
|
+
let count = entries.length;
|
|
5825
|
+
let bytes = entries.reduce((sum, entry) => sum + entry.size, 0);
|
|
5826
|
+
for (const entry of entries) {
|
|
5827
|
+
if (count <= limits.entries && bytes <= limits.bytes) return;
|
|
5828
|
+
rmSync(entry.path, { force: true });
|
|
5829
|
+
count--;
|
|
5830
|
+
bytes -= entry.size;
|
|
5831
|
+
}
|
|
5832
|
+
}
|
|
5740
5833
|
var VIDEO_EXT = /\.(mp4|webm|mov|mkv|avi|m4v|mxf|mts|m2ts|ts)$/i;
|
|
5741
5834
|
var AUDIO_EXT = /\.(mp3|wav|ogg|m4a|aac|flac)$/i;
|
|
5742
5835
|
var defaultRunner = spawnSync;
|
|
@@ -5758,7 +5851,7 @@ function validateUploadedMedia(filePath, runner = defaultRunner) {
|
|
|
5758
5851
|
"stream=codec_type,codec_name",
|
|
5759
5852
|
"-of",
|
|
5760
5853
|
"json",
|
|
5761
|
-
...
|
|
5854
|
+
...mediaInputArgs(filePath),
|
|
5762
5855
|
"--",
|
|
5763
5856
|
filePath
|
|
5764
5857
|
],
|
|
@@ -5858,7 +5951,7 @@ function nextBackupPath(backupDir, backupKey) {
|
|
|
5858
5951
|
}
|
|
5859
5952
|
function backupsNewestFirst(backupDir, backupKeys) {
|
|
5860
5953
|
const suffix = new RegExp(`-(?:${backupKeys.join("|")})(?:-\\d+)?$`);
|
|
5861
|
-
return
|
|
5954
|
+
return readdirSync2(backupDir).filter((name) => suffix.test(name)).map((name) => join42(backupDir, name)).sort((a, b) => b.localeCompare(a));
|
|
5862
5955
|
}
|
|
5863
5956
|
function pruneBackups(backupDir, backupKeys, keepPerFile) {
|
|
5864
5957
|
const keep = Math.max(1, Math.floor(keepPerFile));
|
|
@@ -6333,7 +6426,7 @@ function skippable(error) {
|
|
|
6333
6426
|
}
|
|
6334
6427
|
function readableEntries(dir) {
|
|
6335
6428
|
try {
|
|
6336
|
-
return
|
|
6429
|
+
return readdirSync3(dir, { withFileTypes: true });
|
|
6337
6430
|
} catch (error) {
|
|
6338
6431
|
if (skippable(error)) return [];
|
|
6339
6432
|
throw error;
|
|
@@ -6911,7 +7004,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
|
6911
7004
|
let block = extractGsapScriptBlock(html);
|
|
6912
7005
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
6913
7006
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
6914
|
-
const { GSAP_CDN } = await import("./dist-
|
|
7007
|
+
const { GSAP_CDN } = await import("./dist-A65PCIEN.js");
|
|
6915
7008
|
const bootstrap = [
|
|
6916
7009
|
`<script src="${GSAP_CDN}"></script>`,
|
|
6917
7010
|
"<script>",
|
|
@@ -9015,6 +9108,20 @@ function registerRenderRoutes(api, adapter) {
|
|
|
9015
9108
|
ensureCleanupTimer();
|
|
9016
9109
|
return c.json({ jobId, status: "rendering" });
|
|
9017
9110
|
});
|
|
9111
|
+
api.put("/projects/:id/render-variables", async (c) => {
|
|
9112
|
+
const project = await adapter.resolveProject(c.req.param("id"));
|
|
9113
|
+
if (!project) return c.json({ error: "not found" }, 404);
|
|
9114
|
+
const values = await c.req.json().catch(() => void 0);
|
|
9115
|
+
if (!isVariablesPayload(values)) return c.json({ error: VARIABLES_PAYLOAD_ERROR }, 400);
|
|
9116
|
+
if (folderGone(project.dir)) return projectDirMissing(c);
|
|
9117
|
+
const path = join7(project.dir, RENDER_VARIABLES_FILE);
|
|
9118
|
+
if (!isLinkFreeWithinProject(project.dir, dirname42(path))) {
|
|
9119
|
+
return c.json({ error: "forbidden", why: "link" }, 403);
|
|
9120
|
+
}
|
|
9121
|
+
mkdirWithinProject(project.dir, dirname42(path));
|
|
9122
|
+
replaceFileAtomically(path, JSON.stringify(values, null, 2) + "\n", 420);
|
|
9123
|
+
return c.json({ path: RENDER_VARIABLES_FILE });
|
|
9124
|
+
});
|
|
9018
9125
|
api.get("/render/:jobId/progress", (c) => {
|
|
9019
9126
|
const { jobId } = c.req.param();
|
|
9020
9127
|
const job = renderJobs.get(jobId);
|
|
@@ -9130,7 +9237,7 @@ function registerRenderRoutes(api, adapter) {
|
|
|
9130
9237
|
if (!project) return c.json({ error: "not found" }, 404);
|
|
9131
9238
|
const rendersDir = adapter.rendersDir(project);
|
|
9132
9239
|
if (!existsSync42(rendersDir)) return c.json({ renders: [] });
|
|
9133
|
-
const files =
|
|
9240
|
+
const files = readdirSync4(rendersDir).filter((f) => RENDER_EXTENSIONS.some((extension) => f.endsWith(extension))).flatMap((f) => {
|
|
9134
9241
|
const fp = resolveWithinProject2(rendersDir, f);
|
|
9135
9242
|
return fp && !isPrivateProjectFile(project.dir, fp) ? [{ f, fp }] : [];
|
|
9136
9243
|
}).map(({ f, fp }) => {
|
|
@@ -9297,7 +9404,7 @@ function pruneThumbnailCache(cacheDir, protectedPaths, now = Date.now()) {
|
|
|
9297
9404
|
if (!isLinkFreeWithinProject(dirname5(cacheDir), cacheDir)) return;
|
|
9298
9405
|
let entries;
|
|
9299
9406
|
try {
|
|
9300
|
-
entries =
|
|
9407
|
+
entries = readdirSync5(cacheDir, { withFileTypes: true });
|
|
9301
9408
|
} catch (err) {
|
|
9302
9409
|
if (err.code === "ENOENT") return;
|
|
9303
9410
|
throw err;
|
|
@@ -9364,7 +9471,7 @@ function manifestKey(file) {
|
|
|
9364
9471
|
const hash = createHash4("sha1").update(manifest.data).digest("hex").slice(0, 16);
|
|
9365
9472
|
return { key: `_${hash}`, mtimeMs: Math.round(manifest.mtimeMs) };
|
|
9366
9473
|
}
|
|
9367
|
-
function registerThumbnailRoutes(api, adapter) {
|
|
9474
|
+
function registerThumbnailRoutes(api, adapter, frameTokenForCapture) {
|
|
9368
9475
|
api.get("/projects/:id/thumbnail/*", async (c) => {
|
|
9369
9476
|
if (!adapter.generateThumbnail) {
|
|
9370
9477
|
return c.json({ error: "Thumbnails not available" }, 501);
|
|
@@ -9414,7 +9521,8 @@ function registerThumbnailRoutes(api, adapter) {
|
|
|
9414
9521
|
const origin = thumbnailPreviewOrigin(adapter.serverOrigin?.(), c.req.header("host"));
|
|
9415
9522
|
if (!origin) return c.json({ error: "thumbnail needs a loopback Host" }, 400);
|
|
9416
9523
|
const projectUrl = `${origin}/api/projects/${encodeURIComponent(project.id)}`;
|
|
9417
|
-
const
|
|
9524
|
+
const preview = frameTokenForCapture ? `preview/~${frameTokenForCapture(project.id)}` : "preview";
|
|
9525
|
+
const previewPath = compPath === "index.html" ? `${projectUrl}/${preview}` : `${projectUrl}/${preview}/comp/${compPath.split("/").map(encodeURIComponent).join("/")}`;
|
|
9418
9526
|
const previewUrl = `${previewPath}?${PREVIEW_CAPTURE_PARAM}=1`;
|
|
9419
9527
|
const cacheDir = join8(project.dir, ".thumbnails");
|
|
9420
9528
|
const selectorKey = selector ? `_${createHash4("sha1").update(selector).digest("hex").slice(0, 16)}_${selectorIndex ?? 0}` : "";
|
|
@@ -9432,9 +9540,9 @@ function registerThumbnailRoutes(api, adapter) {
|
|
|
9432
9540
|
/* @__PURE__ */ new Set([...thumbnailGenerationCoordinator.protectedKeys(), cachePath])
|
|
9433
9541
|
);
|
|
9434
9542
|
}
|
|
9435
|
-
const cached =
|
|
9436
|
-
if (
|
|
9437
|
-
return new Response(new Uint8Array(cached
|
|
9543
|
+
const cached = readProjectCacheFile(project.dir, cachePath, THUMBNAIL_CACHE_MAX_BYTES);
|
|
9544
|
+
if (cached) {
|
|
9545
|
+
return new Response(new Uint8Array(cached), {
|
|
9438
9546
|
headers: { "Content-Type": contentType, "Cache-Control": "no-cache" }
|
|
9439
9547
|
});
|
|
9440
9548
|
}
|
|
@@ -9493,6 +9601,65 @@ function registerThumbnailRoutes(api, adapter) {
|
|
|
9493
9601
|
}
|
|
9494
9602
|
});
|
|
9495
9603
|
}
|
|
9604
|
+
var AUDIO_DECODE_LIMIT = 4;
|
|
9605
|
+
var AUDIO_DECODE_TIMEOUT_MS = 10 * 6e4;
|
|
9606
|
+
var AudioDecodeTimeoutError = class extends Error {
|
|
9607
|
+
constructor() {
|
|
9608
|
+
super("audio decode took too long");
|
|
9609
|
+
this.name = "AudioDecodeTimeoutError";
|
|
9610
|
+
}
|
|
9611
|
+
};
|
|
9612
|
+
var runDecode = createJobSlots(AUDIO_DECODE_LIMIT);
|
|
9613
|
+
var inFlight = /* @__PURE__ */ new Map();
|
|
9614
|
+
function decodeWithTimeout(mediaPath, decode, stop) {
|
|
9615
|
+
const timedOut = new AbortController();
|
|
9616
|
+
const timer = setTimeout(
|
|
9617
|
+
() => timedOut.abort(new AudioDecodeTimeoutError()),
|
|
9618
|
+
AUDIO_DECODE_TIMEOUT_MS
|
|
9619
|
+
);
|
|
9620
|
+
return decode(mediaPath, AbortSignal.any([stop, timedOut.signal])).finally(
|
|
9621
|
+
() => clearTimeout(timer)
|
|
9622
|
+
);
|
|
9623
|
+
}
|
|
9624
|
+
function startDecode(key, mediaPath, decode) {
|
|
9625
|
+
const stop = new AbortController();
|
|
9626
|
+
const result = runDecode(
|
|
9627
|
+
() => decodeWithTimeout(mediaPath, decode, stop.signal),
|
|
9628
|
+
stop.signal
|
|
9629
|
+
).finally(() => {
|
|
9630
|
+
if (inFlight.get(key) === shared) inFlight.delete(key);
|
|
9631
|
+
});
|
|
9632
|
+
result.catch(() => void 0);
|
|
9633
|
+
const shared = { result, waiting: 0, stop };
|
|
9634
|
+
inFlight.set(key, shared);
|
|
9635
|
+
return shared;
|
|
9636
|
+
}
|
|
9637
|
+
function decodeShared(key, mediaPath, decode, signal) {
|
|
9638
|
+
const shared = inFlight.get(key) ?? startDecode(key, mediaPath, decode);
|
|
9639
|
+
shared.waiting++;
|
|
9640
|
+
return new Promise((resolve5, reject) => {
|
|
9641
|
+
const leave = () => {
|
|
9642
|
+
shared.waiting--;
|
|
9643
|
+
if (shared.waiting === 0) {
|
|
9644
|
+
if (inFlight.get(key) === shared) inFlight.delete(key);
|
|
9645
|
+
shared.stop.abort();
|
|
9646
|
+
}
|
|
9647
|
+
reject(new JobAbandonedError());
|
|
9648
|
+
};
|
|
9649
|
+
if (signal?.aborted) return leave();
|
|
9650
|
+
signal?.addEventListener("abort", leave, { once: true });
|
|
9651
|
+
shared.result.then(
|
|
9652
|
+
(peaks) => {
|
|
9653
|
+
signal?.removeEventListener("abort", leave);
|
|
9654
|
+
resolve5(peaks);
|
|
9655
|
+
},
|
|
9656
|
+
(error) => {
|
|
9657
|
+
signal?.removeEventListener("abort", leave);
|
|
9658
|
+
reject(error);
|
|
9659
|
+
}
|
|
9660
|
+
);
|
|
9661
|
+
});
|
|
9662
|
+
}
|
|
9496
9663
|
function registerWaveformRoutes(api, adapter) {
|
|
9497
9664
|
api.get("/projects/:id/waveform/*", async (c) => {
|
|
9498
9665
|
const project = await adapter.resolveProject(c.req.param("id"));
|
|
@@ -9509,16 +9676,11 @@ function registerWaveformRoutes(api, adapter) {
|
|
|
9509
9676
|
cacheDir,
|
|
9510
9677
|
buildWaveformCacheKey(relative3(project.dir, audioPath), stats)
|
|
9511
9678
|
);
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
const peaks2 = JSON.parse(readFileSync8(cachePath, "utf-8"));
|
|
9515
|
-
return c.json({ peaks: peaks2 });
|
|
9516
|
-
}
|
|
9517
|
-
} catch {
|
|
9518
|
-
}
|
|
9679
|
+
const cached = readCachedPeaks(project.dir, cachePath);
|
|
9680
|
+
if (cached) return c.json({ peaks: cached });
|
|
9519
9681
|
let peaks;
|
|
9520
9682
|
try {
|
|
9521
|
-
peaks = await
|
|
9683
|
+
peaks = await decodeShared(cachePath, audioPath, decodeAudioPeaks, c.req.raw.signal);
|
|
9522
9684
|
} catch {
|
|
9523
9685
|
return c.json({ error: "failed to decode audio" }, 500);
|
|
9524
9686
|
}
|
|
@@ -9550,7 +9712,7 @@ function freezeExtractArgs(src, mediaTime, output) {
|
|
|
9550
9712
|
"-y",
|
|
9551
9713
|
"-ss",
|
|
9552
9714
|
String(round3(mediaTime)),
|
|
9553
|
-
...
|
|
9715
|
+
...mediaInputArgs(src),
|
|
9554
9716
|
"-i",
|
|
9555
9717
|
src,
|
|
9556
9718
|
"-frames:v",
|
|
@@ -9722,7 +9884,7 @@ var FREEZE_DIR = ["assets", "freeze"];
|
|
|
9722
9884
|
function readExpected(absPath, expectedVersion) {
|
|
9723
9885
|
let content;
|
|
9724
9886
|
try {
|
|
9725
|
-
content =
|
|
9887
|
+
content = readFileSync8(absPath, "utf-8");
|
|
9726
9888
|
} catch {
|
|
9727
9889
|
return { error: "not found", status: 404 };
|
|
9728
9890
|
}
|
|
@@ -9730,7 +9892,7 @@ function readExpected(absPath, expectedVersion) {
|
|
|
9730
9892
|
}
|
|
9731
9893
|
function readFrame(path) {
|
|
9732
9894
|
try {
|
|
9733
|
-
return
|
|
9895
|
+
return readFileSync8(path);
|
|
9734
9896
|
} catch (error) {
|
|
9735
9897
|
if (error.code === "ENOENT") return null;
|
|
9736
9898
|
throw error;
|
|
@@ -9783,7 +9945,7 @@ async function extractStill(projectDir, absPath, source, playhead, tools) {
|
|
|
9783
9945
|
return { imageSrc: `${"../".repeat(depth)}${stillPath}`, stillPath, imagePath };
|
|
9784
9946
|
}
|
|
9785
9947
|
function writeFolded(projectDir, absPath, path, before, after, options) {
|
|
9786
|
-
if (
|
|
9948
|
+
if (readFileSync8(absPath, "utf-8") !== before) {
|
|
9787
9949
|
return { error: `file conflict: ${path}`, status: 409 };
|
|
9788
9950
|
}
|
|
9789
9951
|
const backup = snapshotBeforeWrite(projectDir, absPath);
|
|
@@ -9900,7 +10062,7 @@ function registerLoudnessRoutes(api, adapter, measure = defaultMeasure) {
|
|
|
9900
10062
|
} catch (error) {
|
|
9901
10063
|
return c.json({ error: error instanceof Error ? error.message : String(error) }, 400);
|
|
9902
10064
|
}
|
|
9903
|
-
if (!
|
|
10065
|
+
if (!existsSync5(file)) return c.json({ error: "file not found" }, 404);
|
|
9904
10066
|
try {
|
|
9905
10067
|
const measurement = await measure(file, request.window);
|
|
9906
10068
|
const plan = absoluteLoudnessPlan(
|
|
@@ -9948,9 +10110,10 @@ function accumulatePeaks(acc, chunk) {
|
|
|
9948
10110
|
function finishPeaks(acc) {
|
|
9949
10111
|
return acc.bins.map((peak) => Number(peak.toFixed(4)));
|
|
9950
10112
|
}
|
|
9951
|
-
async function decodePeakMap(mediaPath) {
|
|
10113
|
+
async function decodePeakMap(mediaPath, signal) {
|
|
9952
10114
|
const track2 = await probeAudioTrack(mediaPath);
|
|
9953
10115
|
if (!track2 || track2.channels < 1) throw new Error("no audio stream");
|
|
10116
|
+
signal?.throwIfAborted();
|
|
9954
10117
|
const { stream, channels } = track2;
|
|
9955
10118
|
const ffmpeg = requireFfBinary("ffmpeg");
|
|
9956
10119
|
return new Promise((resolvePromise, reject) => {
|
|
@@ -9959,7 +10122,7 @@ async function decodePeakMap(mediaPath) {
|
|
|
9959
10122
|
[
|
|
9960
10123
|
"-v",
|
|
9961
10124
|
"error",
|
|
9962
|
-
...
|
|
10125
|
+
...mediaInputArgs(mediaPath),
|
|
9963
10126
|
"-i",
|
|
9964
10127
|
mediaPath,
|
|
9965
10128
|
"-map",
|
|
@@ -9971,7 +10134,7 @@ async function decodePeakMap(mediaPath) {
|
|
|
9971
10134
|
"f32le",
|
|
9972
10135
|
"pipe:1"
|
|
9973
10136
|
],
|
|
9974
|
-
{ stdio: ["ignore", "pipe", "ignore"], windowsHide: true }
|
|
10137
|
+
{ stdio: ["ignore", "pipe", "ignore"], windowsHide: true, signal }
|
|
9975
10138
|
);
|
|
9976
10139
|
const acc = createPeakAccumulator(PEAK_SAMPLE_RATE, PEAK_BIN_SECONDS, channels);
|
|
9977
10140
|
proc.stdout?.on("data", (chunk) => accumulatePeaks(acc, chunk));
|
|
@@ -9993,23 +10156,6 @@ function buildPeakMapCacheKey(assetPath, fingerprint) {
|
|
|
9993
10156
|
const name = assetPath.replace(/[/\\]/g, "_");
|
|
9994
10157
|
return `${PEAK_MAP_CACHE_VERSION}_${name}_${fingerprint.size}-${Math.round(fingerprint.mtimeMs)}.json`;
|
|
9995
10158
|
}
|
|
9996
|
-
var decodesInFlight = /* @__PURE__ */ new Map();
|
|
9997
|
-
function decodeOnce(cachePath, mediaPath, decode) {
|
|
9998
|
-
const pending2 = decodesInFlight.get(cachePath);
|
|
9999
|
-
if (pending2) return pending2;
|
|
10000
|
-
const started = decode(mediaPath).finally(() => decodesInFlight.delete(cachePath));
|
|
10001
|
-
decodesInFlight.set(cachePath, started);
|
|
10002
|
-
return started;
|
|
10003
|
-
}
|
|
10004
|
-
function readCachedBins(cacheDir, cachePath) {
|
|
10005
|
-
try {
|
|
10006
|
-
if (!isWaveformCacheDirectory(cacheDir) || !existsSync7(cachePath)) return null;
|
|
10007
|
-
const parsed = JSON.parse(readFileSync10(cachePath, "utf-8"));
|
|
10008
|
-
return Array.isArray(parsed) && parsed.every((n) => typeof n === "number") ? parsed : null;
|
|
10009
|
-
} catch {
|
|
10010
|
-
return null;
|
|
10011
|
-
}
|
|
10012
|
-
}
|
|
10013
10159
|
function registerPeakRoutes(api, adapter, decode = decodePeakMap) {
|
|
10014
10160
|
api.get("/projects/:id/peaks/*", async (c) => {
|
|
10015
10161
|
const project = await adapter.resolveProject(c.req.param("id"));
|
|
@@ -10022,11 +10168,11 @@ function registerPeakRoutes(api, adapter, decode = decodePeakMap) {
|
|
|
10022
10168
|
if (!stats?.isFile()) return c.json({ error: "file not found" }, 404);
|
|
10023
10169
|
const cacheDir = join11(project.dir, ".waveform-cache");
|
|
10024
10170
|
const cachePath = join11(cacheDir, buildPeakMapCacheKey(relative5(project.dir, mediaPath), stats));
|
|
10025
|
-
const cached =
|
|
10171
|
+
const cached = readCachedPeaks(project.dir, cachePath);
|
|
10026
10172
|
if (cached) return c.json({ binSeconds: PEAK_BIN_SECONDS, bins: cached });
|
|
10027
10173
|
let bins;
|
|
10028
10174
|
try {
|
|
10029
|
-
bins = await
|
|
10175
|
+
bins = await decodeShared(cachePath, mediaPath, decode, c.req.raw.signal);
|
|
10030
10176
|
} catch {
|
|
10031
10177
|
return c.json({ error: "failed to decode audio" }, 500);
|
|
10032
10178
|
}
|
|
@@ -10307,7 +10453,7 @@ function readDraft(file) {
|
|
|
10307
10453
|
try {
|
|
10308
10454
|
const stat2 = fstatSync4(fd);
|
|
10309
10455
|
if (!stat2.isFile() || stat2.size > MAX_DRAFT_BYTES) return null;
|
|
10310
|
-
return JSON.parse(
|
|
10456
|
+
return JSON.parse(readFileSync9(fd, "utf-8"));
|
|
10311
10457
|
} catch {
|
|
10312
10458
|
return null;
|
|
10313
10459
|
} finally {
|
|
@@ -10386,7 +10532,7 @@ function uniqueAssetPath(projectDir, assetPath, taken) {
|
|
|
10386
10532
|
const ext = extname(assetPath);
|
|
10387
10533
|
const withoutExt = assetPath.slice(0, -ext.length);
|
|
10388
10534
|
let candidate = assetPath;
|
|
10389
|
-
for (let index = 2; taken.has(candidate) ||
|
|
10535
|
+
for (let index = 2; taken.has(candidate) || existsSync6(join13(projectDir, candidate)); index++) {
|
|
10390
10536
|
candidate = `${withoutExt}-${index}${ext}`;
|
|
10391
10537
|
}
|
|
10392
10538
|
return candidate;
|
|
@@ -10472,7 +10618,7 @@ function registerMediaRoutes(api, adapter, options = {}) {
|
|
|
10472
10618
|
}
|
|
10473
10619
|
const inputPath = resolveWithinProject2(project.dir, inputAssetPath);
|
|
10474
10620
|
if (!inputPath) return c.json({ error: "forbidden" }, 403);
|
|
10475
|
-
if (!
|
|
10621
|
+
if (!existsSync6(inputPath)) return c.json({ error: "input media not found" }, 404);
|
|
10476
10622
|
const inputIsVideo = isVideoPath(inputAssetPath);
|
|
10477
10623
|
const inputIsImage = isImagePath(inputAssetPath);
|
|
10478
10624
|
if (!inputIsVideo && !inputIsImage) {
|
|
@@ -10565,9 +10711,9 @@ function registerMediaRoutes(api, adapter, options = {}) {
|
|
|
10565
10711
|
}
|
|
10566
10712
|
function readGlobalAssets(home = homedir()) {
|
|
10567
10713
|
const manifestPath = join14(home, ".media", "manifest.jsonl");
|
|
10568
|
-
if (!
|
|
10714
|
+
if (!existsSync7(manifestPath)) return [];
|
|
10569
10715
|
const out = [];
|
|
10570
|
-
for (const line of
|
|
10716
|
+
for (const line of readFileSync10(manifestPath, "utf8").split("\n")) {
|
|
10571
10717
|
if (!line.trim()) continue;
|
|
10572
10718
|
try {
|
|
10573
10719
|
const rec = JSON.parse(line);
|
|
@@ -10789,6 +10935,14 @@ function registerHistoryRoutes(api, adapter) {
|
|
|
10789
10935
|
})
|
|
10790
10936
|
);
|
|
10791
10937
|
}
|
|
10938
|
+
async function refuseServiceWorkerScripts(c, next) {
|
|
10939
|
+
const headers = {
|
|
10940
|
+
serviceWorker: c.req.header("service-worker"),
|
|
10941
|
+
fetchDest: c.req.header("sec-fetch-dest")
|
|
10942
|
+
};
|
|
10943
|
+
if (serviceWorkerScriptFetch(headers)) return c.text("Forbidden", 403);
|
|
10944
|
+
await next();
|
|
10945
|
+
}
|
|
10792
10946
|
function previewErrorPage(status) {
|
|
10793
10947
|
const message = refusedPreviewMessage(status);
|
|
10794
10948
|
return `<!doctype html><meta charset="utf-8"><script>window.${STUDIO_PREVIEW_ERRORS}=[${JSON.stringify(message)}]</script><p>${message}</p>`;
|
|
@@ -10932,6 +11086,8 @@ async function underToken(res, headers, projectId, token) {
|
|
|
10932
11086
|
const html = (await res.text()).replaceAll(base, `${base}~${token}/`);
|
|
10933
11087
|
return new Response(html, { status: res.status, headers });
|
|
10934
11088
|
}
|
|
11089
|
+
var frameTokenLoads = /* @__PURE__ */ new WeakSet();
|
|
11090
|
+
var loadedThroughFrameToken = (request) => frameTokenLoads.has(request);
|
|
10935
11091
|
function serveTokenPreviewPaths(api, tokens, resolveProjectId) {
|
|
10936
11092
|
return async (c, next) => {
|
|
10937
11093
|
const url = new URL(c.req.url);
|
|
@@ -10945,6 +11101,7 @@ function serveTokenPreviewPaths(api, tokens, resolveProjectId) {
|
|
|
10945
11101
|
if (answersProxyPreflight(c, url))
|
|
10946
11102
|
return new Response(null, { status: 204, headers: PROXY_PREFLIGHT_ANSWER });
|
|
10947
11103
|
const req = new Request(url, { method: c.req.method, headers: c.req.raw.headers });
|
|
11104
|
+
frameTokenLoads.add(req);
|
|
10948
11105
|
const res = await api.fetch(req);
|
|
10949
11106
|
return underToken(res, tokenPathHeaders(c, res, url.pathname), projectId, token);
|
|
10950
11107
|
};
|
|
@@ -10960,11 +11117,13 @@ async function answerRefusedFrameWithPage(c, next) {
|
|
|
10960
11117
|
headers
|
|
10961
11118
|
});
|
|
10962
11119
|
}
|
|
10963
|
-
var
|
|
11120
|
+
var siteHeaders = (c) => ({
|
|
10964
11121
|
fetchSite: c.req.header("sec-fetch-site"),
|
|
10965
11122
|
host: c.req.header("host") ?? urlHost(c.req.url),
|
|
10966
11123
|
referer: c.req.header("referer")
|
|
10967
11124
|
});
|
|
11125
|
+
var fromAnotherSite = (c) => requestFromAnotherSite(siteHeaders(c));
|
|
11126
|
+
var documentForAnotherSite = (c) => documentFromAnotherSite(siteHeaders(c));
|
|
10968
11127
|
var isThumbnailCapture = (c) => c.req.query(PREVIEW_CAPTURE_PARAM) !== void 0;
|
|
10969
11128
|
async function markPreviewForAnotherSite(c) {
|
|
10970
11129
|
if (c.res.status !== 200 || !c.res.headers.get("content-type")?.startsWith("text/html")) return;
|
|
@@ -10980,7 +11139,7 @@ async function markPreviewForAnotherSite(c) {
|
|
|
10980
11139
|
}
|
|
10981
11140
|
var FRAMED_DESTS = /* @__PURE__ */ new Set(["document", "iframe", "frame", "embed", "object", "fencedframe"]);
|
|
10982
11141
|
var framedByAnotherSite = (c) => {
|
|
10983
|
-
if (!
|
|
11142
|
+
if (!documentForAnotherSite(c)) return false;
|
|
10984
11143
|
const dest = c.req.header("sec-fetch-dest");
|
|
10985
11144
|
return dest === void 0 || FRAMED_DESTS.has(dest);
|
|
10986
11145
|
};
|
|
@@ -10993,12 +11152,18 @@ function withoutValidators(request) {
|
|
|
10993
11152
|
var sandboxPreviewForAnotherSiteOrCapture = (sandboxCaptures) => async (c, next) => {
|
|
10994
11153
|
if (framedByAnotherSite(c)) c.req.raw = withoutValidators(c.req.raw);
|
|
10995
11154
|
await next();
|
|
10996
|
-
c.header("Vary", "Sec-Fetch-Site", { append: true });
|
|
10997
|
-
const anotherSite =
|
|
11155
|
+
c.header("Vary", "Sec-Fetch-Site, Referer", { append: true });
|
|
11156
|
+
const anotherSite = documentForAnotherSite(c);
|
|
10998
11157
|
if (anotherSite || sandboxCaptures && isThumbnailCapture(c))
|
|
10999
11158
|
c.header("Content-Security-Policy", "sandbox allow-scripts");
|
|
11000
11159
|
if (anotherSite) await markPreviewForAnotherSite(c);
|
|
11001
11160
|
};
|
|
11161
|
+
async function refuseProxyWorkForAnotherSite(c, next) {
|
|
11162
|
+
const proxyWork = c.req.query(PREVIEW_PROXY_PARAM) !== void 0;
|
|
11163
|
+
if (proxyWork && fromAnotherSite(c) && !loadedThroughFrameToken(c.req.raw))
|
|
11164
|
+
return c.text("forbidden: media proxy requested by another site", 403);
|
|
11165
|
+
return next();
|
|
11166
|
+
}
|
|
11002
11167
|
var refuseForAnotherSite = (what) => async (c, next) => {
|
|
11003
11168
|
if (fromAnotherSite(c))
|
|
11004
11169
|
return c.json({ error: `forbidden: ${what} requested by another site` }, 403);
|
|
@@ -11020,6 +11185,7 @@ function urlScheme(url) {
|
|
|
11020
11185
|
}
|
|
11021
11186
|
function createStudioApi(adapter, options = {}) {
|
|
11022
11187
|
const api = new Hono();
|
|
11188
|
+
api.use(refuseServiceWorkerScripts);
|
|
11023
11189
|
const sandboxThumbnailCaptures = options.sandboxThumbnailCaptures ?? false;
|
|
11024
11190
|
const frameTokens = createFrameTokens();
|
|
11025
11191
|
const resolveProjectId = (id) => Promise.resolve().then(() => adapter.resolveProject(id)).then(
|
|
@@ -11027,6 +11193,7 @@ function createStudioApi(adapter, options = {}) {
|
|
|
11027
11193
|
() => void 0
|
|
11028
11194
|
);
|
|
11029
11195
|
api.use("/projects/:id/preview/*", serveTokenPreviewPaths(api, frameTokens, resolveProjectId));
|
|
11196
|
+
api.use("/projects/:id/preview/*", refuseProxyWorkForAnotherSite);
|
|
11030
11197
|
api.use(
|
|
11031
11198
|
"/projects/:id/preview/*",
|
|
11032
11199
|
sandboxPreviewForAnotherSiteOrCapture(sandboxThumbnailCaptures)
|
|
@@ -11107,7 +11274,11 @@ function createStudioApi(adapter, options = {}) {
|
|
|
11107
11274
|
});
|
|
11108
11275
|
registerLintRoutes(api, adapter);
|
|
11109
11276
|
registerRenderRoutes(api, adapter);
|
|
11110
|
-
registerThumbnailRoutes(
|
|
11277
|
+
registerThumbnailRoutes(
|
|
11278
|
+
api,
|
|
11279
|
+
adapter,
|
|
11280
|
+
sandboxThumbnailCaptures ? frameTokens.tokenFor : void 0
|
|
11281
|
+
);
|
|
11111
11282
|
registerImageThumbnailRoutes(api, adapter);
|
|
11112
11283
|
registerSelectionRoutes(api, adapter);
|
|
11113
11284
|
registerRecoveryDraftRoutes(api, adapter);
|
|
@@ -11172,24 +11343,33 @@ function numericAttribute(element, name) {
|
|
|
11172
11343
|
const value = Number(element.getAttribute(name));
|
|
11173
11344
|
return Number.isFinite(value) ? value : null;
|
|
11174
11345
|
}
|
|
11175
|
-
|
|
11346
|
+
var MAX_DOCUMENT_BYTES = 256 * 1024 * 1024;
|
|
11347
|
+
var MAC_HEX_LENGTH = 64;
|
|
11348
|
+
function createPreviewDocumentStore(projectDir, salt, secret) {
|
|
11349
|
+
if (!secret) return { read: () => null, write: () => {
|
|
11350
|
+
} };
|
|
11176
11351
|
const dir = join15(projectDir, ".hyperframes", "preview");
|
|
11177
11352
|
const fileFor = (key) => join15(dir, `${createHash7("sha256").update(`${salt}
|
|
11178
11353
|
${key}`).digest("hex").slice(0, 32)}.html`);
|
|
11354
|
+
const macFor = (key, html) => createHmac2("sha256", secret).update(`preview-document
|
|
11355
|
+
${salt}
|
|
11356
|
+
${key}
|
|
11357
|
+
`).update(html).digest("hex");
|
|
11179
11358
|
return {
|
|
11180
11359
|
read(key) {
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11360
|
+
const stored = readProjectCacheFile(projectDir, fileFor(key), MAX_DOCUMENT_BYTES);
|
|
11361
|
+
if (!stored || stored.length <= MAC_HEX_LENGTH) return null;
|
|
11362
|
+
const html = stored.subarray(MAC_HEX_LENGTH + 1).toString("utf-8");
|
|
11363
|
+
const mac = stored.subarray(0, MAC_HEX_LENGTH);
|
|
11364
|
+
return timingSafeEqual2(mac, Buffer.from(macFor(key, html))) ? html : null;
|
|
11186
11365
|
},
|
|
11187
11366
|
write(key, html) {
|
|
11188
11367
|
try {
|
|
11189
11368
|
mkdirOwnedWithinProject(projectDir, dir);
|
|
11190
11369
|
const file = fileFor(key);
|
|
11191
|
-
replaceFileAtomically(file,
|
|
11192
|
-
|
|
11370
|
+
replaceFileAtomically(file, `${macFor(key, html)}
|
|
11371
|
+
${html}`, 420);
|
|
11372
|
+
for (const name of readdirSync6(dir)) {
|
|
11193
11373
|
if (join15(dir, name) !== file) rmSync7(join15(dir, name), { force: true });
|
|
11194
11374
|
}
|
|
11195
11375
|
} catch {
|
|
@@ -11269,6 +11449,7 @@ export {
|
|
|
11269
11449
|
hostHeaderAllowed,
|
|
11270
11450
|
wildcardBindHostAllowed,
|
|
11271
11451
|
requestFromAnotherSite,
|
|
11452
|
+
documentFromAnotherSite,
|
|
11272
11453
|
sameOriginPost,
|
|
11273
11454
|
stampProjectHfIds,
|
|
11274
11455
|
stampProjectHfIdsAsync,
|
|
@@ -11284,6 +11465,7 @@ export {
|
|
|
11284
11465
|
applyFileMutations,
|
|
11285
11466
|
MAX_UPLOAD_BYTES,
|
|
11286
11467
|
originForListeningAddress,
|
|
11468
|
+
refuseServiceWorkerScripts,
|
|
11287
11469
|
captureLoadGrant,
|
|
11288
11470
|
grantCaptureLoads,
|
|
11289
11471
|
createStudioApi,
|