hyperframes 0.9.32 → 0.9.34
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/bin/hyperframes.mjs +10 -0
- package/dist/{add-HYI4YJC5.js → add-NBOJ2UA3.js} +18 -17
- package/dist/{agentPromptGenerator-JAQNBEUZ.js → agentPromptGenerator-3JOLQXTX.js} +11 -11
- package/dist/{animatedGifPrep-DVYRCZVR.js → animatedGifPrep-VI5CFYCR.js} +10 -10
- package/dist/api.js +49 -48
- package/dist/{appHistory-WZIHFCPK.js → appHistory-535MKSWI.js} +2 -2
- package/dist/{asset-7FG3M3FQ.js → asset-NYULKN5A.js} +2 -2
- package/dist/{assetCataloger-QDQZYHUC.js → assetCataloger-AWJMEMX7.js} +12 -12
- package/dist/{audio-R6ZG62DU.js → audio-QN5YYFOA.js} +31 -30
- package/dist/{auth-IPDYZXOG.js → auth-LHUBRGIH.js} +4 -4
- package/dist/{autoUpdate-GAEDDZRN.js → autoUpdate-5M3JGEFS.js} +3 -3
- package/dist/{avatars-A45VFUZ4.js → avatars-DAB2KILV.js} +19 -18
- package/dist/{backgroundChecks-US74BS6V.js → backgroundChecks-3NQOCEDM.js} +4 -4
- package/dist/backgroundChecksWorker.js +4 -4
- package/dist/{batchRender-VBSYVQA7.js → batchRender-EPRIJZVT.js} +4 -4
- package/dist/{beats-UPJ3KANG.js → beats-ZCPQEIFG.js} +14 -14
- package/dist/{benchmark-2RWYJGL2.js → benchmark-7OVOBGQX.js} +11 -11
- package/dist/{billing-MD66MJTA.js → billing-7K6S23FP.js} +19 -18
- package/dist/{browser-JXCS62NX.js → browser-CP76THCA.js} +10 -9
- package/dist/{bundleWithLocalizedFonts-RAD7BNJF.js → bundleWithLocalizedFonts-MRCRI676.js} +1 -1
- package/dist/{capture-M6DT5WZT.js → capture-B4B72PIK.js} +4 -4
- package/dist/{capture-DJ4WRP62.js → capture-VAE27MNW.js} +51 -31
- package/dist/{captureCompositionFrame-IRXG7ZFU.js → captureCompositionFrame-YAOQTG6R.js} +18 -18
- package/dist/{captureFile-Y2ZMB7HK.js → captureFile-P4BDKVJH.js} +2 -2
- package/dist/{catalog-GW45OWKU.js → catalog-TUZGNHN6.js} +18 -17
- package/dist/{catch-up-YKJQ4IYC.js → catch-up-GMUF3JXI.js} +11 -11
- package/dist/{check-7QTKMPGA.js → check-CHCV573Z.js} +51 -51
- package/dist/{checkAudio-7WHUYGUZ.js → checkAudio-JJZN37WT.js} +19 -19
- package/dist/{checkBrowser-USAOWTAF.js → checkBrowser-SK7GFN7U.js} +44 -44
- package/dist/{chunk-X6DWLN55.js → chunk-2HDVXVUA.js} +8 -4
- package/dist/{chunk-JMV63CNH.js → chunk-2JXJQ3ZQ.js} +2 -2
- package/dist/{chunk-6BI6URO2.js → chunk-2JZU6DYH.js} +5 -4
- package/dist/{chunk-SXOIG6VG.js → chunk-2OP5HU5S.js} +284 -192
- package/dist/{chunk-KRWPTZBY.js → chunk-3FQYFVWA.js} +99 -25
- package/dist/{chunk-G7NKYELQ.js → chunk-3K4THQHY.js} +4 -4
- package/dist/{chunk-SIRYW7SY.js → chunk-3P4OYIBA.js} +2 -2
- package/dist/{chunk-WTO4DHBH.js → chunk-3XJ42WUG.js} +1 -1
- package/dist/{chunk-XPT4GC6X.js → chunk-45IPAGED.js} +7 -7
- package/dist/{chunk-HWMNSWEA.js → chunk-4MVWA7NJ.js} +6 -6
- package/dist/{chunk-WAXPM7TK.js → chunk-4RPIEGL3.js} +2 -2
- package/dist/{chunk-6MTSP2XE.js → chunk-4TQS6ZSL.js} +7 -7
- package/dist/{chunk-5GXMZIQZ.js → chunk-4WXLBRT5.js} +31 -22
- package/dist/{chunk-YIE5FU73.js → chunk-4Y4VYZRO.js} +37 -3
- package/dist/{chunk-K72X2YXR.js → chunk-52CUHVEA.js} +4 -4
- package/dist/{chunk-TLUDJLBN.js → chunk-55I56MXF.js} +1 -1
- package/dist/{chunk-2T7EDEKE.js → chunk-5QPYUTV3.js} +8 -8
- package/dist/{chunk-WLNQAJQC.js → chunk-5SXAEHZT.js} +2 -2
- package/dist/{chunk-77UB5EHM.js → chunk-5WK76INI.js} +1 -1
- package/dist/{chunk-5VN7ZXJR.js → chunk-5ZTB6QIJ.js} +3 -3
- package/dist/{chunk-ZIYXPDKY.js → chunk-65PFUPLX.js} +1 -1
- package/dist/{chunk-LHFBKUVY.js → chunk-6FP6HBG4.js} +2 -2
- package/dist/{chunk-YCTWMO3G.js → chunk-6HG3XABE.js} +1 -1
- package/dist/{chunk-LJMTEZOP.js → chunk-6K5KVYOQ.js} +16 -16
- package/dist/{chunk-34S7GYVK.js → chunk-6OYPVALW.js} +15 -8
- package/dist/{chunk-G2XAFJ2B.js → chunk-74PKHC3W.js} +1 -1
- package/dist/{chunk-N6Y645MX.js → chunk-7C6K5WFB.js} +1 -1
- package/dist/{chunk-M6FNCANA.js → chunk-7E5HPNMD.js} +1 -1
- package/dist/{chunk-CHJGVW5W.js → chunk-7YBRRU5W.js} +4 -11
- package/dist/{chunk-2NMBD5AH.js → chunk-7YOJPNDT.js} +1 -1
- package/dist/{chunk-GCJRV7LU.js → chunk-A2YCAF35.js} +23 -37
- package/dist/{chunk-E5S4QMX7.js → chunk-AG6L5CUE.js} +2 -2
- package/dist/{chunk-SVI2CJ6R.js → chunk-AOTAYP5E.js} +1 -1
- package/dist/{chunk-VB3JZKMN.js → chunk-ASORF7UJ.js} +31 -10
- package/dist/{chunk-XB7HE2R5.js → chunk-AUM475MS.js} +3 -3
- package/dist/{chunk-7NDF2MO3.js → chunk-BAWGEGKD.js} +216 -344
- package/dist/{chunk-I3QXWJ7V.js → chunk-BDFD3C3V.js} +7 -7
- package/dist/{chunk-YAS347ZS.js → chunk-BLII22FU.js} +1 -1
- package/dist/{chunk-CMYUPVMI.js → chunk-BX4GM3IV.js} +2 -2
- package/dist/{chunk-D7NNNL2K.js → chunk-BZPRG5N5.js} +18 -18
- package/dist/{chunk-H4C3P2KV.js → chunk-C3TYMGWE.js} +3 -3
- package/dist/{chunk-6NNLDCX4.js → chunk-C62LSZVJ.js} +1 -1
- package/dist/{chunk-C5JKRCSG.js → chunk-CHCMXYER.js} +1 -1
- package/dist/{chunk-CKJDY6EK.js → chunk-DC7AOIHN.js} +1 -1
- package/dist/{chunk-GBIASKIH.js → chunk-DH34XRVW.js} +1 -1
- package/dist/{chunk-6SNGKC6B.js → chunk-DLBFLOEU.js} +1 -1
- package/dist/{chunk-LP7B3JLC.js → chunk-DMW5SSUN.js} +2 -1
- package/dist/{chunk-Z6X64P6C.js → chunk-DTM7HGP4.js} +6 -6
- package/dist/{chunk-2W4VQ3YZ.js → chunk-E53F4CP6.js} +2 -2
- package/dist/{chunk-3R2X2VKB.js → chunk-ECKXTBRB.js} +6 -4
- package/dist/{chunk-RCRUWNQ4.js → chunk-EDQF36I7.js} +3 -3
- package/dist/{chunk-GWSCUFGL.js → chunk-EWBLIDHD.js} +11 -9
- package/dist/{chunk-BMDABBHG.js → chunk-FEWHHDFA.js} +5 -17
- package/dist/{chunk-EBG5RCPM.js → chunk-FILLRGVO.js} +4 -4
- package/dist/{chunk-3HT3UGF2.js → chunk-FRY73NRV.js} +1 -1
- package/dist/{chunk-KAG5KXNO.js → chunk-FS4XHCSU.js} +1 -1
- package/dist/{chunk-GOMTMQRT.js → chunk-G6ME77PU.js} +1 -1
- package/dist/{chunk-GTHRXU37.js → chunk-GJB5VR44.js} +18 -18
- package/dist/{chunk-G6JLFSII.js → chunk-GXGGPZXD.js} +4 -4
- package/dist/chunk-H6323NVP.js +453 -0
- package/dist/chunk-HYTD4CIO.js +57 -0
- package/dist/{chunk-P7TCIUP2.js → chunk-I2GYLBJJ.js} +4 -4
- package/dist/{chunk-BA3EQ2KL.js → chunk-IVMYWHFE.js} +3 -3
- package/dist/{chunk-HDCVU64B.js → chunk-IX6BFRED.js} +3 -2
- package/dist/{chunk-W3HNLDK6.js → chunk-JJUVQYXL.js} +2 -2
- package/dist/{chunk-HXQDDCGY.js → chunk-JQATOGQQ.js} +2 -2
- package/dist/{chunk-2Z42EUHG.js → chunk-JVDYIUFD.js} +2 -2
- package/dist/{chunk-WVRAFHJU.js → chunk-K2Z6OXEI.js} +33 -5
- package/dist/{chunk-SFPIVVUE.js → chunk-K4TEEYGN.js} +2 -2
- package/dist/{chunk-KFXHBP2E.js → chunk-K5BPLZOP.js} +2 -2
- package/dist/{chunk-H7AJLEBR.js → chunk-K6EOKQ6J.js} +8 -8
- package/dist/{chunk-Y3YHDU7T.js → chunk-KCL77FXI.js} +1 -1
- package/dist/{chunk-PXDRW3QN.js → chunk-LB6VJTM4.js} +1 -1
- package/dist/{chunk-EXW2LV4K.js → chunk-LCQT4S43.js} +248 -62
- package/dist/chunk-M3BJEZ7E.js +152 -0
- package/dist/{chunk-N7C7U3ZR.js → chunk-M425BL2U.js} +22 -11
- package/dist/{chunk-3YNJAXA5.js → chunk-MOR3H5FK.js} +1 -1
- package/dist/{chunk-M6LAGO6O.js → chunk-NAKQS3EJ.js} +3 -3
- package/dist/{chunk-TTSLKH63.js → chunk-NMMPHHN7.js} +3 -3
- package/dist/{chunk-UWMOMAYI.js → chunk-O2S5HR7Y.js} +49 -12
- package/dist/{chunk-D6BV6TTI.js → chunk-OKN7E77Z.js} +1 -1
- package/dist/{chunk-XH6LGDIB.js → chunk-PDE6XAIJ.js} +4 -4
- package/dist/{chunk-4FTJE22M.js → chunk-PNBWAA3E.js} +2 -2
- package/dist/{chunk-AOQRVS63.js → chunk-PVHNBJCI.js} +9 -7
- package/dist/{chunk-3PHCFSPD.js → chunk-PWSTB75B.js} +2 -2
- package/dist/{chunk-PVSRPNIV.js → chunk-PXWPBLEN.js} +2 -2
- package/dist/{chunk-IEEIPTDW.js → chunk-PYZVKGW5.js} +1 -1
- package/dist/{chunk-5FFYMVRD.js → chunk-Q2G4ERQU.js} +2 -2
- package/dist/{chunk-YMIEJZB6.js → chunk-QDSALYDV.js} +4 -4
- package/dist/{chunk-ZLDYDO64.js → chunk-QUUZ2BGC.js} +6 -4
- package/dist/{chunk-XDRSEU2I.js → chunk-R3C62AP3.js} +4 -4
- package/dist/{chunk-L72MPEM2.js → chunk-RJJ5NVSQ.js} +1 -1
- package/dist/{chunk-KXOKZJBZ.js → chunk-RSQTFDMS.js} +13 -13
- package/dist/{chunk-6RFCS4IU.js → chunk-RYJXT2AS.js} +9 -7
- package/dist/{chunk-GJUL3PRV.js → chunk-S3HTROSO.js} +3 -3
- package/dist/{chunk-AZ2QJETV.js → chunk-SAIPA3QY.js} +1 -1
- package/dist/{chunk-4CSZZXL6.js → chunk-SDBFTY6V.js} +3 -3
- package/dist/{chunk-TZH6HNZH.js → chunk-SG4OW2HV.js} +2 -2
- package/dist/{chunk-AWT5FHTN.js → chunk-T4YI2YLF.js} +1 -1
- package/dist/{chunk-TVQNABOI.js → chunk-T7O62YTY.js} +1 -1
- package/dist/chunk-TDOJW7Z2.js +5053 -0
- package/dist/{chunk-3367VNGK.js → chunk-TGGYHFTP.js} +2 -2
- package/dist/{chunk-NNOAOQLT.js → chunk-TGK7LUEV.js} +2 -2
- package/dist/chunk-TLU5DPES.js +560 -0
- package/dist/{chunk-LXIEKLAC.js → chunk-TOLY2QK2.js} +6 -6
- package/dist/chunk-UFKWSLJ5.js +392 -0
- package/dist/{chunk-PXY3JZP2.js → chunk-UGWY7PFQ.js} +2 -2
- package/dist/{chunk-REJ4NIBY.js → chunk-VJSKNQTM.js} +1 -1
- package/dist/{chunk-NXSKZE3C.js → chunk-VW35U2LJ.js} +2 -2
- package/dist/{chunk-JZIEZCQM.js → chunk-VZO3BUTW.js} +5 -12
- package/dist/{chunk-TFBPCJPG.js → chunk-W6AXNWGE.js} +1 -1
- package/dist/{chunk-262ADJJN.js → chunk-WC2XQ4NR.js} +1 -1
- package/dist/{chunk-WXOOAAT4.js → chunk-WLB2D2OJ.js} +36 -4
- package/dist/{chunk-P5E3RHW3.js → chunk-WWT32C2M.js} +3 -3
- package/dist/{chunk-ADP2GIBS.js → chunk-XEUTASNL.js} +2 -2
- package/dist/{chunk-MYFAVVA6.js → chunk-YCXNWQ3B.js} +32 -32
- package/dist/{chunk-JHX76QFC.js → chunk-YMTLKSXO.js} +1 -1
- package/dist/{chunk-KG3TONXU.js → chunk-Z222HDGC.js} +9 -9
- package/dist/chunk-Z3ZLN5VR.js +3890 -0
- package/dist/{chunk-EJPWGGPK.js → chunk-Z64I7KJZ.js} +5340 -5087
- package/dist/{chunk-LBQQNNRC.js → chunk-ZWLFWYHR.js} +1 -1
- package/dist/{clean-MJBET4EN.js → clean-N7RLS5LN.js} +29 -29
- package/dist/cli.js +70 -68
- package/dist/{cloud-Z4Q76MLS.js → cloud-4PO7BA26.js} +8 -7
- package/dist/{cloud-WEDQYHZE.js → cloud-W3DHH6EB.js} +4 -4
- package/dist/{cloudrun-2KGSRAKA.js → cloudrun-YIAPIPOG.js} +7 -7
- package/dist/{compare-MJKWQOD7.js → compare-GCWIIUGY.js} +43 -43
- package/dist/{compiler-ETXRTUQC.js → compiler-L3BJI43E.js} +8 -6
- package/dist/{component-PZGKEJ6L.js → component-C4VYDMZ4.js} +3 -3
- package/dist/{compositions-N3FEEWH7.js → compositions-5P4BZQJA.js} +16 -16
- package/dist/{contactSheet-HZMP42FZ.js → contactSheet-ROMTQQ6Y.js} +3 -3
- package/dist/contract/LICENSE-Unicode.txt +39 -0
- package/dist/contract/path-policy.json +311 -0
- package/dist/contract/unicode-15.1.0.json +6179 -0
- package/dist/{curve-MWABBM7Q.js → curve-IMXKUBAO.js} +15 -15
- package/dist/{cuts-BQFSSNY7.js → cuts-PRBLX5HH.js} +16 -16
- package/dist/{delete-HPHGJABK.js → delete-QYWDRFO3.js} +11 -10
- package/dist/{deploy-JY2QOB5F.js → deploy-DGEPSTOJ.js} +7 -7
- package/dist/{describeProject-S6AGYZWL.js → describeProject-WS4TR7VF.js} +11 -11
- package/dist/{destroy-AZK7J4IR.js → destroy-2KSDD4KU.js} +6 -6
- package/dist/{deterministicFonts-2ZPRAI3C.js → deterministicFonts-D3HTAAN2.js} +3 -3
- package/dist/{diff-XDNFCAU4.js → diff-AAWRGZLX.js} +47 -46
- package/dist/{dist-6EE3Y4M7.js → dist-DJQRHSKZ.js} +4 -4
- package/dist/{dist-EYEYDD4F.js → dist-GJSMSEEL.js} +22 -18
- package/dist/{dist-TYGDYK56.js → dist-V2TLDLQL.js} +3 -3
- package/dist/{doctor-6IRSMKZD.js → doctor-CARXZUFN.js} +18 -18
- package/dist/{energy-VCJ2FJEF.js → energy-VMNGG2ND.js} +16 -16
- package/dist/{events-DNTIMCUM.js → events-4XIJRQIJ.js} +18 -18
- package/dist/{events-QQYBD7JM.js → events-LOPLHMOT.js} +4 -4
- package/dist/{events-M6A7BT3V.js → events-XX3DYSU4.js} +8 -8
- package/dist/execute-U7JKJERV.js +109 -0
- package/dist/{extract-X3IVXYHX.js → extract-KYFUTYDD.js} +19 -19
- package/dist/{face-MZHXKBDB.js → face-VQGUHRQL.js} +18 -18
- package/dist/{feedback-TAMGYFUO.js → feedback-UPWYWOQ3.js} +19 -18
- package/dist/{ffmpeg-XWPYYYB6.js → ffmpeg-RUOPT3JH.js} +10 -10
- package/dist/{figma-WMD7AR2S.js → figma-TO57RICW.js} +3 -3
- package/dist/fontLocalizeCli.js +16 -16
- package/dist/{frames-OU2UOLBU.js → frames-4Y3X474I.js} +18 -18
- package/dist/{generate-6F6QEFXW.js → generate-BPID6U7D.js} +32 -31
- package/dist/{get-VVDO7DXG.js → get-JIJ46VI5.js} +11 -10
- package/dist/{gpuPolicy-CVNSHXHJ.js → gpuPolicy-5ZJNSR7D.js} +10 -10
- package/dist/{grade-compare-O6LY2U73.js → grade-compare-YTBW7C65.js} +44 -44
- package/dist/{heifImagePrep-J6TILZTM.js → heifImagePrep-OL7KF7SH.js} +11 -11
- package/dist/{help-XLSTTDHR.js → help-QPV26QI5.js} +2 -1
- package/dist/{history-DBCCWBDG.js → history-7UVGTZT3.js} +14 -14
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +61 -61
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-E46BWAQ7.js → info-2VFXR7LJ.js} +18 -18
- package/dist/{init-23TG5W7S.js → init-JZ7CJQJE.js} +35 -35
- package/dist/{ink-6UFSNJRW.js → ink-SS7XOD7Y.js} +16 -16
- package/dist/{inspect-RKI6XACH.js → inspect-D5MBKDZZ.js} +41 -41
- package/dist/{installer-JWPK75BR.js → installer-UNC4BAFO.js} +7 -7
- package/dist/{keyframes-J65V5A2G.js → keyframes-7T2CVOM6.js} +14 -12
- package/dist/{lambda-RZSXXBJU.js → lambda-QVJFVSXL.js} +16 -16
- package/dist/{layout-RJQUOYWB.js → layout-5DF7VFWS.js} +41 -41
- package/dist/{lint-4TUHKKA2.js → lint-EWJHJKAI.js} +14 -14
- package/dist/{lintProject-R6RTBSCZ.js → lintProject-KBJU3L4C.js} +4 -4
- package/dist/{list-HOD2N4VS.js → list-DDLH5ZG5.js} +13 -12
- package/dist/{localPage-TC4NC3VL.js → localPage-MHAXFUGI.js} +11 -11
- package/dist/{login-NTOS3HKD.js → login-BJ4QUZT4.js} +8 -7
- package/dist/{logout-7SMEH7JL.js → logout-QGNBUJKS.js} +14 -5
- package/dist/{look-GC63E2I7.js → look-HNK2K33N.js} +16 -16
- package/dist/{manager-FICBET24.js → manager-FFLFDJZ6.js} +11 -11
- package/dist/{manager-IAXYSRG5.js → manager-VLO3FZC4.js} +2 -1
- package/dist/{measure-WTQCSQ55.js → measure-SE346MGF.js} +11 -11
- package/dist/{media-treatment-KTZ6X2P2.js → media-treatment-KYPDRIBT.js} +18 -18
- package/dist/{media-use-K75FDXJ3.js → media-use-OJZHSNTK.js} +21 -10
- package/dist/{models-JKOA542M.js → models-KWSHPDZ5.js} +15 -15
- package/dist/{motionShot-A3TYKTQU.js → motionShot-HEROABIE.js} +24 -24
- package/dist/{normalize-audio-7JUM42YB.js → normalize-audio-ZD5W37ZO.js} +14 -14
- package/dist/oauth-SAVP2YM4.js +40 -0
- package/dist/{open-F6GI4TRA.js → open-7B6HT4EX.js} +19 -19
- package/dist/{parakeetRunner-6XIAKJLS.js → parakeetRunner-5AKE7TBH.js} +19 -19
- package/dist/{pipeline-7P7LGGQG.js → pipeline-UTVSWC4X.js} +13 -13
- package/dist/plan-SQ63IXQC.js +88 -0
- package/dist/{play-DYOZLKWX.js → play-NYBFE3GW.js} +32 -32
- package/dist/{preflight-VM4HSRBY.js → preflight-T23WHZP3.js} +12 -12
- package/dist/{present-IINIEZJC.js → present-FX22552Q.js} +26 -26
- package/dist/{preview-NJO2UXWJ.js → preview-ULBNMDXD.js} +63 -39
- package/dist/{probe-LQQHFX5Q.js → probe-62Z5C6VC.js} +16 -16
- package/dist/{producer-LH2SZHJ2.js → producer-X3KFL4QM.js} +1 -1
- package/dist/{projectConfig-BLACFLUW.js → projectConfig-JQ4IDYTU.js} +10 -10
- package/dist/{publication-NFF2BXIE.js → publication-YNIJIR6O.js} +5 -5
- package/dist/{publish-JST5Y4UR.js → publish-7TIGC7RV.js} +91 -31
- package/dist/{refresh-47T6Z2PK.js → refresh-6ONVQ3WV.js} +4 -3
- package/dist/{remove-background-WUBESLWN.js → remove-background-F3BD6WXD.js} +14 -14
- package/dist/{render-DA4V7CEE.js → render-BL6CAORF.js} +6 -6
- package/dist/{render-4KWUUC5H.js → render-CDWBVWJP.js} +91 -957
- package/dist/{render-R4VNR4E2.js → render-EOQOD2TJ.js} +54 -53
- package/dist/{render-batch-JMPG4RLT.js → render-batch-PDY2PXUZ.js} +6 -6
- package/dist/renderSetupWorker.js +5 -5
- package/dist/{resolver-PNIFIDIE.js → resolver-VBAVCFEP.js} +7 -7
- package/dist/{reverse-4NI7D2C3.js → reverse-3E6HUX5S.js} +1 -1
- package/dist/{run-FWBIBLYE.js → run-77Z3DLIP.js} +8 -7
- package/dist/{screenshotCapture-KOLNFU7W.js → screenshotCapture-XWWCRLGM.js} +13 -13
- package/dist/service-LJZQKQT6.js +68 -0
- package/dist/share-2CNP22KN.js +274 -0
- package/dist/{sherpa-W3BMN67E.js → sherpa-NPTMMQHQ.js} +18 -18
- package/dist/sherpaWorker.js +2 -1
- package/dist/skills/hyperframes/references/plugin-installation.md +5 -2
- package/dist/skills/hyperframes/scripts/plugin-cli.mjs +20 -3
- package/dist/skills/hyperframes/scripts/plugin-cli.test.mjs +61 -3
- package/dist/skills/hyperframes-cli/SKILL.md +3 -3
- package/dist/skills/hyperframes-cli/references/doctor-browser.md +1 -1
- package/dist/skills/hyperframes-cli/references/preview-render.md +20 -0
- package/dist/skills/media-use/audio/scripts/gemini-pipeline.test.mjs +6 -6
- package/dist/skills/media-use/audio/scripts/lib/tts.cleanup.test.mjs +12 -6
- package/dist/skills/media-use/audio/scripts/lib/tts.mjs +25 -6
- package/dist/skills/media-use/audio/scripts/lib/tts.spawn.test.mjs +37 -12
- package/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +54 -18
- package/dist/skills/media-use/references/audio.md +2 -0
- package/dist/skills/media-use/references/operations.md +2 -1
- package/dist/skills/media-use/scripts/lib/npx-sync.test.mjs +22 -31
- package/dist/skills/media-use/scripts/lib/tts-local-provider.mjs +16 -11
- package/dist/skills/media-use/scripts/lib/tts-local-provider.test.mjs +34 -78
- package/dist/skills/media-use/scripts/resolve-plugin.test.mjs +42 -18
- package/dist/skills/media-use/scripts/transcribe.test.mjs +60 -17
- package/dist/{skills-KQQVUFGO.js → skills-7MQBUOOX.js} +11 -11
- package/dist/{skillsUpdateCheck-VY5PS46S.js → skillsUpdateCheck-JAUXRXRH.js} +4 -4
- package/dist/{snapshot-VIEJQAUB.js → snapshot-D7DROQPF.js} +61 -61
- package/dist/{src-HHPRCLEW.js → src-26DWEOAT.js} +11 -9
- package/dist/{src-MQU5F7GJ.js → src-LJIVCW6M.js} +15 -15
- package/dist/{start-ZBNNVFMU.js → start-DF3U2VIG.js} +30 -29
- package/dist/{staticProjectServer-VPGZWJF4.js → staticProjectServer-NYH6MQHZ.js} +25 -25
- package/dist/{status-RBZJYT7T.js → status-5Q43GUYF.js} +26 -23
- package/dist/studio/assets/{codec-Bz1jsLs8.js → codec-OdIlx7W3.js} +1 -1
- package/dist/studio/assets/{hyperframes-player-cdH5Sz_t.js → hyperframes-player-XtPxZL3k.js} +1 -1
- package/dist/studio/assets/{index-dsfjBidg.css → index-BJTCbv8z.css} +1 -1
- package/dist/studio/assets/{index-D1l7izdf.js → index-DTU1D-zj.js} +166 -166
- package/dist/studio/assets/{index-DFRbcd5J.js → index-DWZWPFkU.js} +1 -1
- package/dist/studio/assets/{pausedVideoDecoder-CgV8YB6S.js → pausedVideoDecoder-NVr8gRm5.js} +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/{studio-api-EPZGLIWW.js → studio-api-ZYCEQPX2.js} +22 -18
- package/dist/{studioServer-YFQQ2ESJ.js → studioServer-W4RX3B7S.js} +451 -71
- package/dist/{sync-FRT55PVW.js → sync-LLH2GSSC.js} +16 -16
- package/dist/{synthesize-FR5KPBRP.js → synthesize-4A5ENXNO.js} +4 -3
- package/dist/{telemetry-HAPPFR7P.js → telemetry-RIQIM2PH.js} +8 -8
- package/dist/{templates-2IHYIWMA.js → templates-4HVTWNKO.js} +22 -21
- package/dist/{timeline-AY2F7BJF.js → timeline-ITIMTT27.js} +25 -25
- package/dist/{tokens-B3G257V3.js → tokens-ABTBM6UA.js} +2 -2
- package/dist/{transcribe-RJCILGPA.js → transcribe-6BA2MP2Y.js} +37 -36
- package/dist/{transcribe-EGQD32PT.js → transcribe-6LDBHZCZ.js} +14 -14
- package/dist/{tts-ZE776B4I.js → tts-P77F523Z.js} +1 -1
- package/dist/{update-XTFIGQKW.js → update-ODXFCK36.js} +13 -13
- package/dist/{updateCheck-M6YC52A4.js → updateCheck-E4U776B4.js} +5 -3
- package/dist/{upgrade-AKLIZKAO.js → upgrade-LSHVYMLH.js} +5 -5
- package/dist/{urlDownloader-57A7Q7FC.js → urlDownloader-PWQ2LDLE.js} +9 -9
- package/dist/{validate-YWSXJL54.js → validate-JHETNNBN.js} +33 -33
- package/dist/{video-I5DDNK3Y.js → video-D2D5YCDU.js} +12 -12
- package/dist/{voices-IBMJU73H.js → voices-34FMTOIX.js} +29 -28
- package/dist/warmCheck.js +51 -51
- package/package.json +2 -1
- package/dist/chunk-YAZQBB2S.js +0 -5049
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
iterateFontFamilyDeclarations,
|
|
12
12
|
normalizeSystemFontPrimaryFamilies,
|
|
13
13
|
resolveFontFamilyDeclarationFamilies
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PNBWAA3E.js";
|
|
15
15
|
import {
|
|
16
16
|
Semaphore,
|
|
17
17
|
prepareHeifImageInputs,
|
|
18
18
|
withMediaProbeSlot
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EDQF36I7.js";
|
|
20
20
|
import {
|
|
21
21
|
EncoderInterruptedError,
|
|
22
22
|
encoderFailureError,
|
|
23
23
|
prepareAnimatedGifInputs
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2HDVXVUA.js";
|
|
25
25
|
import {
|
|
26
26
|
openRangeEnd,
|
|
27
27
|
parseEncoderOptions
|
|
@@ -187,9 +187,10 @@ import {
|
|
|
187
187
|
videoAudioId,
|
|
188
188
|
videoStartOnMediaTimeline,
|
|
189
189
|
writeCapturedFrame
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-Z64I7KJZ.js";
|
|
191
191
|
import {
|
|
192
192
|
assignBundledRuntimeCompositionIds,
|
|
193
|
+
boundMediaSrc,
|
|
193
194
|
emitMountedModuleScripts,
|
|
194
195
|
emitRootCompositionVariableStyles,
|
|
195
196
|
ensureExternalLinkTag,
|
|
@@ -199,13 +200,13 @@ import {
|
|
|
199
200
|
parsesAsScript,
|
|
200
201
|
prepareFlattenedInnerRoot,
|
|
201
202
|
stripSdrPngColourTags
|
|
202
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-4Y4VYZRO.js";
|
|
203
204
|
import {
|
|
204
205
|
collectScratchLeftovers,
|
|
205
206
|
createStagingDir,
|
|
206
207
|
removeScratch,
|
|
207
208
|
renameWithRetry
|
|
208
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-PYZVKGW5.js";
|
|
209
210
|
import {
|
|
210
211
|
TRANSITIONS,
|
|
211
212
|
convertTransfer,
|
|
@@ -228,7 +229,7 @@ import {
|
|
|
228
229
|
redactTelemetryString,
|
|
229
230
|
resolveAuthoredTimingWindow,
|
|
230
231
|
toFps
|
|
231
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-TGGYHFTP.js";
|
|
232
233
|
import {
|
|
233
234
|
COMPOSITION_SOURCE_URL,
|
|
234
235
|
HF_COLOR_GRADING_ATTR,
|
|
@@ -263,20 +264,22 @@ import {
|
|
|
263
264
|
sourceTimeAt,
|
|
264
265
|
styleElementsFor,
|
|
265
266
|
timeAtSourceTime
|
|
266
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-TDOJW7Z2.js";
|
|
267
268
|
import {
|
|
268
269
|
chromeMajorCeiling
|
|
269
270
|
} from "./chunk-WE42NVH7.js";
|
|
270
271
|
import {
|
|
271
272
|
lintHyperframeHtml,
|
|
272
273
|
resolveReferencedStart
|
|
273
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-ASORF7UJ.js";
|
|
274
275
|
import {
|
|
275
276
|
isUnresolvedAssetPlaceholder,
|
|
277
|
+
namesAnotherNetworkRoot,
|
|
276
278
|
readProjectFile,
|
|
277
279
|
readTextFile,
|
|
280
|
+
resolveCompositionSrc,
|
|
278
281
|
resolveProjectRelativeSrc
|
|
279
|
-
} from "./chunk-
|
|
282
|
+
} from "./chunk-K2Z6OXEI.js";
|
|
280
283
|
import {
|
|
281
284
|
LOW_MEMORY_TOTAL_MB_THRESHOLD,
|
|
282
285
|
getCgroupMemoryLimitMb,
|
|
@@ -309,14 +312,14 @@ import {
|
|
|
309
312
|
isAspectAgnosticResolutionAlias,
|
|
310
313
|
normalizeResolutionFlag,
|
|
311
314
|
suggestMatchingPreset
|
|
312
|
-
} from "./chunk-
|
|
315
|
+
} from "./chunk-M425BL2U.js";
|
|
313
316
|
import {
|
|
314
317
|
parseHTML
|
|
315
318
|
} from "./chunk-GWTIFRF5.js";
|
|
316
319
|
|
|
317
320
|
// ../producer/src/services/renderOrchestrator.ts
|
|
318
321
|
import {
|
|
319
|
-
existsSync as
|
|
322
|
+
existsSync as existsSync20,
|
|
320
323
|
mkdirSync as mkdirSync10,
|
|
321
324
|
readdirSync as readdirSync6,
|
|
322
325
|
rmSync as rmSync10,
|
|
@@ -460,7 +463,9 @@ function createConsoleLogger(level = "info") {
|
|
|
460
463
|
}
|
|
461
464
|
};
|
|
462
465
|
}
|
|
463
|
-
var defaultLogger = createConsoleLogger(
|
|
466
|
+
var defaultLogger = createConsoleLogger(
|
|
467
|
+
process.env.HF_DEBUG_RENDER === "1" ? "debug" : "info"
|
|
468
|
+
);
|
|
464
469
|
|
|
465
470
|
// ../producer/src/services/fileServer.ts
|
|
466
471
|
var readFileAsync = promisify(readFile);
|
|
@@ -1258,7 +1263,7 @@ function assertChromaSubsamplingSdr(config, hasHdrContent) {
|
|
|
1258
1263
|
import {
|
|
1259
1264
|
copyFileSync,
|
|
1260
1265
|
cpSync,
|
|
1261
|
-
existsSync as
|
|
1266
|
+
existsSync as existsSync3,
|
|
1262
1267
|
mkdirSync,
|
|
1263
1268
|
rmSync,
|
|
1264
1269
|
symlinkSync,
|
|
@@ -1274,7 +1279,6 @@ import {
|
|
|
1274
1279
|
relative as nodeRelative,
|
|
1275
1280
|
isAbsolute as nodeIsAbsolute
|
|
1276
1281
|
} from "path";
|
|
1277
|
-
import { existsSync as existsSync3 } from "fs";
|
|
1278
1282
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
1279
1283
|
var DEFAULT_RENDERS_DIR = process.env.PRODUCER_RENDERS_DIR ?? // fileURLToPath (not URL.pathname): on Windows .pathname is "/D:/..." which
|
|
1280
1284
|
// resolves to a bogus renders dir.
|
|
@@ -1313,13 +1317,6 @@ function resolveRenderPaths(projectDir, outputPath, rendersDir = DEFAULT_RENDERS
|
|
|
1313
1317
|
const absoluteOutputPath = nodeResolve(resolvedOutputPath);
|
|
1314
1318
|
return { absoluteProjectDir, absoluteOutputPath };
|
|
1315
1319
|
}
|
|
1316
|
-
function resolveCompositionSrc(projectDir, src) {
|
|
1317
|
-
const rooted = (value) => nodeResolve(projectDir, value.replace(/^(?:\.?[\\/])+/, ""));
|
|
1318
|
-
const decoded = rooted(decodedUrlPath(src));
|
|
1319
|
-
if (!isPathInside2(decoded, projectDir)) return null;
|
|
1320
|
-
const raw = rooted(src);
|
|
1321
|
-
return !existsSync3(decoded) && isPathInside2(raw, projectDir) && existsSync3(raw) ? raw : decoded;
|
|
1322
|
-
}
|
|
1323
1320
|
|
|
1324
1321
|
// ../producer/src/services/render/shared.ts
|
|
1325
1322
|
var BROWSER_MEDIA_EPSILON = 1e-4;
|
|
@@ -1494,6 +1491,13 @@ var workerPhasesByJob = /* @__PURE__ */ new WeakMap();
|
|
|
1494
1491
|
function forgetWorkerPhases(job) {
|
|
1495
1492
|
workerPhasesByJob.delete(job);
|
|
1496
1493
|
}
|
|
1494
|
+
var staticDedupActivityByJob = /* @__PURE__ */ new WeakMap();
|
|
1495
|
+
function noteStaticDedupActivity(job) {
|
|
1496
|
+
staticDedupActivityByJob.set(job, (staticDedupActivityByJob.get(job) ?? 0) + 1);
|
|
1497
|
+
}
|
|
1498
|
+
function staticDedupActivity(job) {
|
|
1499
|
+
return staticDedupActivityByJob.get(job) ?? 0;
|
|
1500
|
+
}
|
|
1497
1501
|
function describeWorkerPhases(job) {
|
|
1498
1502
|
const phases = workerPhasesByJob.get(job);
|
|
1499
1503
|
if (!phases?.size) return void 0;
|
|
@@ -1527,7 +1531,7 @@ var materializePathModule = {
|
|
|
1527
1531
|
isAbsolute
|
|
1528
1532
|
};
|
|
1529
1533
|
var materializeFileSystem = {
|
|
1530
|
-
existsSync:
|
|
1534
|
+
existsSync: existsSync3,
|
|
1531
1535
|
mkdirSync,
|
|
1532
1536
|
symlinkSync,
|
|
1533
1537
|
cpSync,
|
|
@@ -1807,12 +1811,12 @@ var RenderExecutionContext = class {
|
|
|
1807
1811
|
};
|
|
1808
1812
|
|
|
1809
1813
|
// ../producer/src/services/render/artifactTransaction.ts
|
|
1810
|
-
import { closeSync as closeSync2, existsSync as
|
|
1814
|
+
import { closeSync as closeSync2, existsSync as existsSync5, fstatSync as fstatSync2, openSync as openSync2, readSync, readdirSync as readdirSync2, rmSync as rmSync3 } from "fs";
|
|
1811
1815
|
import { basename as basename4, dirname as dirname4, extname as extname2, join as join5, resolve as resolve4 } from "path";
|
|
1812
1816
|
|
|
1813
1817
|
// ../producer/src/services/render/renderDirOwner.ts
|
|
1814
1818
|
import {
|
|
1815
|
-
existsSync as
|
|
1819
|
+
existsSync as existsSync4,
|
|
1816
1820
|
lstatSync,
|
|
1817
1821
|
readFileSync as readFileSync2,
|
|
1818
1822
|
readdirSync,
|
|
@@ -1886,7 +1890,7 @@ function newestWriteMs(path) {
|
|
|
1886
1890
|
}
|
|
1887
1891
|
function isAbandoned(dir, ownerlessIdleMs, now) {
|
|
1888
1892
|
try {
|
|
1889
|
-
if (!lstatSync(dir).isDirectory() ||
|
|
1893
|
+
if (!lstatSync(dir).isDirectory() || existsSync4(join4(dir, TRANSACTION_BACKUP))) return false;
|
|
1890
1894
|
const owner = ownerState(dir);
|
|
1891
1895
|
if (owner === "gone") return true;
|
|
1892
1896
|
return owner === "none" && ownerlessIdleMs !== void 0 && now - newestWriteMs(dir) >= ownerlessIdleMs;
|
|
@@ -1918,7 +1922,7 @@ function createRenderWorkDir(prefix, outputDir) {
|
|
|
1918
1922
|
|
|
1919
1923
|
// ../producer/src/services/render/artifactTransaction.ts
|
|
1920
1924
|
var defaultFileSystem = {
|
|
1921
|
-
existsSync:
|
|
1925
|
+
existsSync: existsSync5,
|
|
1922
1926
|
renameSync: (source, destination) => renameWithRetry(source, destination),
|
|
1923
1927
|
rmSync: rmSync3
|
|
1924
1928
|
};
|
|
@@ -2072,7 +2076,7 @@ var ArtifactTransaction = class {
|
|
|
2072
2076
|
async assertDirectoryExpectation(expected, files) {
|
|
2073
2077
|
for (const required of expected.requiredFiles ?? []) {
|
|
2074
2078
|
const path = join5(this.stagingPath, required);
|
|
2075
|
-
if (!
|
|
2079
|
+
if (!existsSync5(path)) {
|
|
2076
2080
|
throw new Error(`Render artifact directory is missing ${required}: ${this.stagingPath}`);
|
|
2077
2081
|
}
|
|
2078
2082
|
assertReadableNonEmptyFile(path);
|
|
@@ -2321,7 +2325,7 @@ function replanAfterFailure(plan2, failure) {
|
|
|
2321
2325
|
}
|
|
2322
2326
|
|
|
2323
2327
|
// ../producer/src/services/render/stages/captureSegmentedStage.ts
|
|
2324
|
-
import { existsSync as
|
|
2328
|
+
import { existsSync as existsSync6, mkdirSync as mkdirSync3, rmSync as rmSync6, statSync as statSync3 } from "fs";
|
|
2325
2329
|
import { join as join9 } from "path";
|
|
2326
2330
|
|
|
2327
2331
|
// ../producer/src/services/render/perfSummary.ts
|
|
@@ -4591,7 +4595,7 @@ async function runCaptureStreamingStage(input) {
|
|
|
4591
4595
|
const session = probeSession ?? await openSession();
|
|
4592
4596
|
captureBeyondViewport = session.options.captureBeyondViewport;
|
|
4593
4597
|
if (probeSession) {
|
|
4594
|
-
prepareCaptureSessionForReuse(session, framesDir, videoInjector);
|
|
4598
|
+
await prepareCaptureSessionForReuse(session, framesDir, videoInjector);
|
|
4595
4599
|
probeSession = null;
|
|
4596
4600
|
}
|
|
4597
4601
|
let riskSession = null;
|
|
@@ -4849,7 +4853,7 @@ async function captureSegmentToEncoder(ctx, segment) {
|
|
|
4849
4853
|
path: segmentPath,
|
|
4850
4854
|
// Recorded so resume can prove the file on disk is the one that
|
|
4851
4855
|
// finished; absent only in unit tests, whose fake encoder writes none.
|
|
4852
|
-
bytes:
|
|
4856
|
+
bytes: existsSync6(segmentPath) ? statSync3(segmentPath).size : 0
|
|
4853
4857
|
});
|
|
4854
4858
|
return encodeResult;
|
|
4855
4859
|
} finally {
|
|
@@ -4896,8 +4900,13 @@ function defaultSessionFactory(input) {
|
|
|
4896
4900
|
};
|
|
4897
4901
|
const session = probeSession ?? await openSession();
|
|
4898
4902
|
if (probeSession) {
|
|
4899
|
-
|
|
4903
|
+
const reused = probeSession;
|
|
4900
4904
|
probeSession = null;
|
|
4905
|
+
await openSegmentedSessionReuse(input, reused, injector).catch(async (error) => {
|
|
4906
|
+
await closeCaptureSession(reused).catch(() => {
|
|
4907
|
+
});
|
|
4908
|
+
throw error;
|
|
4909
|
+
});
|
|
4901
4910
|
}
|
|
4902
4911
|
try {
|
|
4903
4912
|
if (!session.isInitialized) await withinInitBudget(initializeSession(session), session);
|
|
@@ -4911,8 +4920,8 @@ function defaultSessionFactory(input) {
|
|
|
4911
4920
|
}
|
|
4912
4921
|
};
|
|
4913
4922
|
}
|
|
4914
|
-
function openSegmentedSessionReuse(input, session, injector) {
|
|
4915
|
-
prepareCaptureSessionForReuse(session, input.framesDir, injector());
|
|
4923
|
+
async function openSegmentedSessionReuse(input, session, injector) {
|
|
4924
|
+
await prepareCaptureSessionForReuse(session, input.framesDir, injector());
|
|
4916
4925
|
}
|
|
4917
4926
|
async function openSegmentedSession(input, injector) {
|
|
4918
4927
|
const captureCfg = input.cfg.forceScreenshot === input.plan.forceScreenshot ? input.cfg : { ...input.cfg, forceScreenshot: input.plan.forceScreenshot };
|
|
@@ -5831,7 +5840,7 @@ function trackSegmentFramePeak(frames, rootDir, onPeak) {
|
|
|
5831
5840
|
|
|
5832
5841
|
// ../producer/src/services/render/segmentManifest.ts
|
|
5833
5842
|
import { createHash as createHash2 } from "crypto";
|
|
5834
|
-
import { existsSync as
|
|
5843
|
+
import { existsSync as existsSync7, mkdirSync as mkdirSync6, readFileSync as readFileSync4, statSync as statSync5, writeFileSync as writeFileSync3 } from "fs";
|
|
5835
5844
|
import { join as join14 } from "path";
|
|
5836
5845
|
var MANIFEST_FILENAME = "segments.json";
|
|
5837
5846
|
function computeSegmentPlanHash(input) {
|
|
@@ -5878,7 +5887,7 @@ function isManifest(value) {
|
|
|
5878
5887
|
}
|
|
5879
5888
|
function readSegmentManifest(segmentDir) {
|
|
5880
5889
|
const path = join14(segmentDir, MANIFEST_FILENAME);
|
|
5881
|
-
if (!
|
|
5890
|
+
if (!existsSync7(path)) return null;
|
|
5882
5891
|
try {
|
|
5883
5892
|
const parsed = JSON.parse(readFileSync4(path, "utf-8"));
|
|
5884
5893
|
return isManifest(parsed) ? parsed : null;
|
|
@@ -5907,7 +5916,7 @@ async function validateCompletedSegments(manifest, expectedHash, probeFrames) {
|
|
|
5907
5916
|
const ok = /* @__PURE__ */ new Set();
|
|
5908
5917
|
if (manifest.planHash !== expectedHash) return ok;
|
|
5909
5918
|
for (const entry of manifest.completed) {
|
|
5910
|
-
if (!
|
|
5919
|
+
if (!existsSync7(entry.path)) continue;
|
|
5911
5920
|
const size = statSync5(entry.path).size;
|
|
5912
5921
|
if (size <= 0 || size !== entry.bytes) continue;
|
|
5913
5922
|
const frames = await probeFrames(entry.path);
|
|
@@ -6265,26 +6274,26 @@ var STALL_POLL_MS = 5e3;
|
|
|
6265
6274
|
function watchStall(phase, rule) {
|
|
6266
6275
|
const detail = rule.detail ?? (() => void 0);
|
|
6267
6276
|
let last = rule.progress();
|
|
6277
|
+
let lastActivity = rule.activity?.();
|
|
6268
6278
|
let budgetMs = rule.firstProgressMs;
|
|
6269
6279
|
const silence = createStallClock();
|
|
6270
6280
|
const pollMs = Math.min(STALL_POLL_MS, rule.noProgressMs, rule.firstProgressMs);
|
|
6271
6281
|
let attempt;
|
|
6272
6282
|
let timer;
|
|
6273
6283
|
let inTail = false;
|
|
6284
|
+
const activityMoved = () => {
|
|
6285
|
+
const activity = rule.activity?.();
|
|
6286
|
+
if (activity === lastActivity) return false;
|
|
6287
|
+
lastActivity = activity;
|
|
6288
|
+
return true;
|
|
6289
|
+
};
|
|
6274
6290
|
const restartWindow = (ms) => {
|
|
6275
6291
|
last = rule.progress();
|
|
6276
6292
|
budgetMs = ms;
|
|
6277
6293
|
silence.reset();
|
|
6278
6294
|
};
|
|
6279
6295
|
const tripped = new Promise((_, reject) => {
|
|
6280
|
-
|
|
6281
|
-
const current = rule.progress();
|
|
6282
|
-
if (rule.complete?.() && !inTail) {
|
|
6283
|
-
inTail = true;
|
|
6284
|
-
return restartWindow(rule.tailMs ?? rule.noProgressMs);
|
|
6285
|
-
}
|
|
6286
|
-
if (current !== last) return restartWindow(rule.noProgressMs);
|
|
6287
|
-
if (silence.idle(pollMs) < budgetMs) return;
|
|
6296
|
+
const trip = (current) => {
|
|
6288
6297
|
const error = new RenderStageStalledError(phase, budgetMs, current, detail());
|
|
6289
6298
|
if (attempt && !attempt.signal.aborted) {
|
|
6290
6299
|
attempt.abort(error);
|
|
@@ -6292,6 +6301,16 @@ function watchStall(phase, rule) {
|
|
|
6292
6301
|
}
|
|
6293
6302
|
clearInterval(timer);
|
|
6294
6303
|
reject(error);
|
|
6304
|
+
};
|
|
6305
|
+
timer = setInterval(() => {
|
|
6306
|
+
const current = rule.progress();
|
|
6307
|
+
if (rule.complete?.() && !inTail) {
|
|
6308
|
+
inTail = true;
|
|
6309
|
+
return restartWindow(rule.tailMs ?? rule.noProgressMs);
|
|
6310
|
+
}
|
|
6311
|
+
if (current !== last) return restartWindow(rule.noProgressMs);
|
|
6312
|
+
if (activityMoved()) return silence.reset();
|
|
6313
|
+
if (silence.idle(pollMs) >= budgetMs) trip(current);
|
|
6295
6314
|
}, pollMs);
|
|
6296
6315
|
});
|
|
6297
6316
|
const openAttempt = (parent) => {
|
|
@@ -6465,23 +6484,23 @@ function countAuthoredTimedClips(html) {
|
|
|
6465
6484
|
}
|
|
6466
6485
|
|
|
6467
6486
|
// ../producer/src/services/render/stages/compileStage.ts
|
|
6468
|
-
import { existsSync as
|
|
6487
|
+
import { existsSync as existsSync11, writeFileSync as writeFileSync4 } from "fs";
|
|
6469
6488
|
import { join as join17 } from "path";
|
|
6470
6489
|
|
|
6471
6490
|
// ../producer/src/services/htmlCompiler.ts
|
|
6472
6491
|
import { createHash as createHash4 } from "crypto";
|
|
6473
|
-
import { createReadStream as createReadStream2, existsSync as
|
|
6492
|
+
import { createReadStream as createReadStream2, existsSync as existsSync10, mkdirSync as mkdirSync7, readFileSync as readFileSync6 } from "fs";
|
|
6474
6493
|
import { join as join16, dirname as dirname6, resolve as resolve5, basename as basename5, relative as relative2, sep as sep2 } from "path";
|
|
6475
6494
|
|
|
6476
6495
|
// ../producer/src/services/bundledScripts.ts
|
|
6477
|
-
import { existsSync as
|
|
6496
|
+
import { existsSync as existsSync8, readFileSync as readFileSync5 } from "fs";
|
|
6478
6497
|
import { join as join15 } from "path";
|
|
6479
6498
|
var GSAP_VENDOR_DIR_ENV = "HYPERFRAMES_GSAP_VENDOR_DIR";
|
|
6480
6499
|
function bundledScript(url) {
|
|
6481
6500
|
const dir = process.env[GSAP_VENDOR_DIR_ENV];
|
|
6482
6501
|
if (!dir || url !== `${gsapCdnDist()}gsap.min.js`) return null;
|
|
6483
6502
|
const file = join15(dir, "gsap.min.js");
|
|
6484
|
-
return
|
|
6503
|
+
return existsSync8(file) ? readFileSync5(file) : null;
|
|
6485
6504
|
}
|
|
6486
6505
|
|
|
6487
6506
|
// ../producer/src/services/renderMediaCollector.ts
|
|
@@ -6631,7 +6650,7 @@ function getPositionEditsRenderScript() {
|
|
|
6631
6650
|
}
|
|
6632
6651
|
|
|
6633
6652
|
// ../producer/src/services/assetMediaType.ts
|
|
6634
|
-
import { existsSync as
|
|
6653
|
+
import { existsSync as existsSync9 } from "fs";
|
|
6635
6654
|
var ASSET_MEDIA_TYPE_MISMATCH = "ASSET_MEDIA_TYPE_MISMATCH";
|
|
6636
6655
|
var AssetMediaTypeMismatchError = class extends Error {
|
|
6637
6656
|
code = ASSET_MEDIA_TYPE_MISMATCH;
|
|
@@ -6697,7 +6716,7 @@ async function preflightCompositionAssetMediaTypes(input) {
|
|
|
6697
6716
|
input.projectDir,
|
|
6698
6717
|
input.compiledDir
|
|
6699
6718
|
);
|
|
6700
|
-
if (!
|
|
6719
|
+
if (!existsSync9(resolvedPath)) continue;
|
|
6701
6720
|
byPath.set(resolvedPath, [...byPath.get(resolvedPath) ?? [], reference]);
|
|
6702
6721
|
}
|
|
6703
6722
|
const mismatches = [];
|
|
@@ -6737,7 +6756,7 @@ async function preflightCompositionAssetMediaTypes(input) {
|
|
|
6737
6756
|
|
|
6738
6757
|
// ../producer/src/services/htmlCompiler.ts
|
|
6739
6758
|
function logRemoteDownloadTelemetry(event) {
|
|
6740
|
-
defaultLogger.
|
|
6759
|
+
defaultLogger.debug("[Compiler] Remote asset download integrity", { ...event });
|
|
6741
6760
|
}
|
|
6742
6761
|
var INFERRED_MEDIA_DURATION_ATTR = "data-hf-inferred-duration";
|
|
6743
6762
|
function parseSubCompHtmlForValidity(html) {
|
|
@@ -6951,7 +6970,7 @@ async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, down
|
|
|
6951
6970
|
let filePath = src;
|
|
6952
6971
|
if (isHttpUrl(src)) {
|
|
6953
6972
|
const remoteDir = join16(downloadDir, REMOTE_MEDIA_SUBDIR);
|
|
6954
|
-
if (!
|
|
6973
|
+
if (!existsSync10(remoteDir)) mkdirSync7(remoteDir, { recursive: true });
|
|
6955
6974
|
try {
|
|
6956
6975
|
filePath = await downloadToTemp(src, remoteDir, void 0, void 0, void 0, {
|
|
6957
6976
|
onTelemetry: logRemoteDownloadTelemetry
|
|
@@ -6963,8 +6982,11 @@ async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, down
|
|
|
6963
6982
|
filePath = decodedUrlPath(src);
|
|
6964
6983
|
if (!filePath.startsWith("/")) filePath = join16(baseDir, filePath);
|
|
6965
6984
|
filePath = urlByAbsentLocalPath?.get(filePath) ?? filePath;
|
|
6985
|
+
if (!isHttpUrl(filePath) && namesAnotherNetworkRoot(baseDir, filePath)) {
|
|
6986
|
+
return { duration: null, resolvedPath: filePath };
|
|
6987
|
+
}
|
|
6966
6988
|
}
|
|
6967
|
-
if (!isHttpUrl(filePath) && !
|
|
6989
|
+
if (!isHttpUrl(filePath) && !existsSync10(filePath)) {
|
|
6968
6990
|
return { duration: null, resolvedPath: filePath };
|
|
6969
6991
|
}
|
|
6970
6992
|
const withSrcContext = (error) => {
|
|
@@ -7313,7 +7335,7 @@ function inlineSubCompositions2(html, subCompositions, projectDir, variableOverr
|
|
|
7313
7335
|
parseHtml: (htmlStr) => parseHTML(htmlStr).document,
|
|
7314
7336
|
// Mirrors the preview bundler: a sub-composition's SIBLING assets resolve
|
|
7315
7337
|
// against its own directory, project-root refs stay as authored.
|
|
7316
|
-
assetExists: (path) =>
|
|
7338
|
+
assetExists: (path) => existsSync10(resolve5(projectDir, path)),
|
|
7317
7339
|
// Preserve the authored root wrapper as a child of the host, matching
|
|
7318
7340
|
// the preview bundler's shape (htmlBundler.ts's prepareFlattenedInnerRoot,
|
|
7319
7341
|
// which the runtime compositionLoader mirrors with its own copy for the
|
|
@@ -7489,7 +7511,7 @@ ${safeText}
|
|
|
7489
7511
|
//# sourceURL=${new URL(src).href}
|
|
7490
7512
|
`;
|
|
7491
7513
|
el.replaceWith(inlineScript);
|
|
7492
|
-
defaultLogger.
|
|
7514
|
+
defaultLogger.debug(`[Compiler] Inlined CDN script: ${src}`);
|
|
7493
7515
|
} else {
|
|
7494
7516
|
if (download.reason instanceof ScriptIntegrityError) throw download.reason;
|
|
7495
7517
|
defaultLogger.warn(
|
|
@@ -7509,7 +7531,7 @@ function collectExternalAssets(html, projectDir) {
|
|
|
7509
7531
|
if (isPathInside2(absPath, absProjectDir)) {
|
|
7510
7532
|
return null;
|
|
7511
7533
|
}
|
|
7512
|
-
if (!
|
|
7534
|
+
if (!existsSync10(absPath)) return null;
|
|
7513
7535
|
const safeKey = toExternalAssetKey(absPath);
|
|
7514
7536
|
externalAssets.set(safeKey, absPath);
|
|
7515
7537
|
return safeKey;
|
|
@@ -7544,7 +7566,7 @@ function collectExternalAssets(html, projectDir) {
|
|
|
7544
7566
|
if (rewritten !== style) el.setAttribute("style", rewritten);
|
|
7545
7567
|
}
|
|
7546
7568
|
if (externalAssets.size > 0) {
|
|
7547
|
-
defaultLogger.
|
|
7569
|
+
defaultLogger.debug(
|
|
7548
7570
|
`[Compiler] Found ${externalAssets.size} asset(s) outside project directory, will copy to render output`
|
|
7549
7571
|
);
|
|
7550
7572
|
}
|
|
@@ -7559,7 +7581,7 @@ var REMOTE_SOURCE_TAG_RE = /<source\b[^>]*?\bsrc\s*=\s*["'](https?:\/\/[^"']+)["
|
|
|
7559
7581
|
var REMOTE_IMG_TAG_RE = /<img\b[^>]*?(?<![\w-])src\s*=\s*["'](https?:\/\/[^"']+)["'][^>]*>/gi;
|
|
7560
7582
|
async function downloadAndRewriteUrls(urlSet, html, remoteDir, warnLabel, logLabel, extraRewrite) {
|
|
7561
7583
|
if (urlSet.size === 0) return { html, remoteMediaAssets: /* @__PURE__ */ new Map() };
|
|
7562
|
-
if (!
|
|
7584
|
+
if (!existsSync10(remoteDir)) mkdirSync7(remoteDir, { recursive: true });
|
|
7563
7585
|
const urlToLocal = /* @__PURE__ */ new Map();
|
|
7564
7586
|
await Promise.all(
|
|
7565
7587
|
[...urlSet].map(async (url) => {
|
|
@@ -7591,7 +7613,7 @@ async function downloadAndRewriteUrls(urlSet, html, remoteDir, warnLabel, logLab
|
|
|
7591
7613
|
result = result.replaceAll(`"${url}"`, `"${relPath}"`).replaceAll(`'${url}'`, `'${relPath}'`);
|
|
7592
7614
|
if (extraRewrite) result = extraRewrite(result, url, relPath);
|
|
7593
7615
|
}
|
|
7594
|
-
defaultLogger.
|
|
7616
|
+
defaultLogger.debug(`[Compiler] ${logLabel} ${urlToLocal.size} to ${REMOTE_MEDIA_SUBDIR}/`);
|
|
7595
7617
|
return { html: result, remoteMediaAssets };
|
|
7596
7618
|
}
|
|
7597
7619
|
async function localizeRemoteMediaSources(html, downloadDir) {
|
|
@@ -7728,7 +7750,7 @@ async function inlineExternalFontStylesheets(html) {
|
|
|
7728
7750
|
${fontFaceBlocks.join("\n")}
|
|
7729
7751
|
</style>`;
|
|
7730
7752
|
result = result.replace(fullMatch, inlineStyle);
|
|
7731
|
-
defaultLogger.
|
|
7753
|
+
defaultLogger.debug("[Compiler] Inlined external @font-face rule(s)", {
|
|
7732
7754
|
count: fontFaceBlocks.length,
|
|
7733
7755
|
urlFingerprint: identity.urlFingerprint,
|
|
7734
7756
|
host: identity.host
|
|
@@ -7742,13 +7764,13 @@ function projectStylesheetFontFamilies(html, projectDir) {
|
|
|
7742
7764
|
const href = /\bhref=["']([^"']+)["']/i.exec(tag)?.[1];
|
|
7743
7765
|
if (!href || /^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(href)) continue;
|
|
7744
7766
|
const sheet = resolve5(projectDir, decodedUrlPath(href).replace(/^(?:\.?\/)+/, ""));
|
|
7745
|
-
if (!isPathInside2(sheet, projectDir) || !
|
|
7767
|
+
if (!isPathInside2(sheet, projectDir) || !existsSync10(sheet)) continue;
|
|
7746
7768
|
for (const face of extractFontFaceBlocks(readFileSync6(sheet, "utf8"))) {
|
|
7747
7769
|
const family = /font-family\s*:\s*([^;}]+)/i.exec(face)?.[1]?.trim().replace(/^['"]|['"]$/g, "");
|
|
7748
7770
|
const shipsFile = [...face.matchAll(LOCAL_FONTFACE_URL_RE)].some(([, url = ""]) => {
|
|
7749
7771
|
const path = decodedUrlPath(url);
|
|
7750
7772
|
const file = path.startsWith("/") ? resolve5(projectDir, `.${path}`) : resolve5(dirname6(sheet), path);
|
|
7751
|
-
return isPathInside2(file, projectDir) &&
|
|
7773
|
+
return isPathInside2(file, projectDir) && existsSync10(file);
|
|
7752
7774
|
});
|
|
7753
7775
|
if (family && shipsFile) families.push(family);
|
|
7754
7776
|
}
|
|
@@ -7818,7 +7840,7 @@ async function readLocalFont(absPath) {
|
|
|
7818
7840
|
return { kind: "inline", buffer: Buffer.concat(chunks, totalBytes) };
|
|
7819
7841
|
}
|
|
7820
7842
|
async function embedLocalFontFaces(html, projectDir) {
|
|
7821
|
-
const { fontToDataUri: toDataUri } = await import("./deterministicFonts-
|
|
7843
|
+
const { fontToDataUri: toDataUri } = await import("./deterministicFonts-D3HTAAN2.js");
|
|
7822
7844
|
const styleBlockRe = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
|
|
7823
7845
|
const fontFaceRe = /@font-face\s*\{([^}]*)\}/gi;
|
|
7824
7846
|
let result = html;
|
|
@@ -7850,7 +7872,7 @@ async function embedLocalFontFaces(html, projectDir) {
|
|
|
7850
7872
|
const font = await readLocalFont(absPath);
|
|
7851
7873
|
if (font.kind === "file-backed") {
|
|
7852
7874
|
fileBackedAbsolutePaths.add(absPath);
|
|
7853
|
-
defaultLogger.
|
|
7875
|
+
defaultLogger.debug(
|
|
7854
7876
|
`[Compiler] Kept large local font file-backed: ${localPath} (> ${(MAX_LOCAL_FONT_DATA_URI_BYTES / 1024 / 1024).toFixed(1)} MB)`
|
|
7855
7877
|
);
|
|
7856
7878
|
embeddedPaths.add(localPath);
|
|
@@ -7858,7 +7880,7 @@ async function embedLocalFontFaces(html, projectDir) {
|
|
|
7858
7880
|
}
|
|
7859
7881
|
dataUri = await toDataUri(font.buffer, ext, { compressToWoff2: false });
|
|
7860
7882
|
dataUriByAbsolutePath.set(absPath, dataUri);
|
|
7861
|
-
defaultLogger.
|
|
7883
|
+
defaultLogger.debug(
|
|
7862
7884
|
`[Compiler] Embedded local font file: ${localPath} (${(font.buffer.length / 1024).toFixed(0)} KB \u2192 data URI)`
|
|
7863
7885
|
);
|
|
7864
7886
|
}
|
|
@@ -7886,14 +7908,17 @@ function renderGsapDist() {
|
|
|
7886
7908
|
}
|
|
7887
7909
|
function rewriteUnresolvableGsapToCdn(html, projectDir, compSrcPath) {
|
|
7888
7910
|
let gsapDist;
|
|
7889
|
-
const exists = (path) =>
|
|
7911
|
+
const exists = (path) => {
|
|
7912
|
+
const file = resolve5(projectDir, path);
|
|
7913
|
+
return !namesAnotherNetworkRoot(projectDir, file) && existsSync10(file);
|
|
7914
|
+
};
|
|
7890
7915
|
return html.replace(
|
|
7891
7916
|
/(<script\b[^>]*\bsrc=["'])([^"']*gsap[^"']*\/dist\/([^"']+))(["'][^>]*>)/gi,
|
|
7892
7917
|
(full, prefix, src, file, suffix) => {
|
|
7893
7918
|
if (/^https?:\/\//i.test(src)) return full;
|
|
7894
7919
|
if (exists(compSrcPath ? rewriteAssetPath(compSrcPath, src, exists) : src)) return full;
|
|
7895
7920
|
gsapDist ??= renderGsapDist();
|
|
7896
|
-
defaultLogger.
|
|
7921
|
+
defaultLogger.debug(`[Compiler] Rewriting missing gsap script: ${src} \u2192 ${gsapDist}${file}`);
|
|
7897
7922
|
return `${prefix}${gsapDist}${file}${suffix}`;
|
|
7898
7923
|
}
|
|
7899
7924
|
);
|
|
@@ -7903,7 +7928,7 @@ function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath) {
|
|
|
7903
7928
|
const entryPath = relative2(projectDir, htmlPath).replace(/\\/g, "/");
|
|
7904
7929
|
if (!entryPath.includes("/")) return html;
|
|
7905
7930
|
const { document: document2 } = parseHTML(html);
|
|
7906
|
-
const assetExists = (path) =>
|
|
7931
|
+
const assetExists = (path) => existsSync10(resolve5(projectDir, path));
|
|
7907
7932
|
rewriteAssetPaths(
|
|
7908
7933
|
document2.querySelectorAll("[src], [href], [srcset]"),
|
|
7909
7934
|
entryPath,
|
|
@@ -7923,11 +7948,29 @@ function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath) {
|
|
|
7923
7948
|
}
|
|
7924
7949
|
return document2.toString();
|
|
7925
7950
|
}
|
|
7951
|
+
function bindVariableMediaSources(html, variables) {
|
|
7952
|
+
if (!html.includes("data-var-src")) return html;
|
|
7953
|
+
const { document: document2 } = parseHTML(html);
|
|
7954
|
+
const declared = {};
|
|
7955
|
+
for (const el of document2.querySelectorAll("[data-composition-variables]")) {
|
|
7956
|
+
Object.assign(declared, readDeclaredDefaults(el));
|
|
7957
|
+
}
|
|
7958
|
+
const values = { ...declared, ...variables };
|
|
7959
|
+
let changed = false;
|
|
7960
|
+
for (const el of document2.querySelectorAll("video[data-var-src], audio[data-var-src]")) {
|
|
7961
|
+
if (el.closest("[data-variable-values]")) continue;
|
|
7962
|
+
const src = boundMediaSrc(el, values);
|
|
7963
|
+
if (src === null || el.getAttribute("src") === src) continue;
|
|
7964
|
+
el.setAttribute("src", src);
|
|
7965
|
+
changed = true;
|
|
7966
|
+
}
|
|
7967
|
+
return changed ? document2.toString() : html;
|
|
7968
|
+
}
|
|
7926
7969
|
async function compileForRender(projectDir, htmlPath, downloadDir, options = {}) {
|
|
7927
7970
|
const entryHtml = rebaseDirectEntryAssetPaths(readTextFile(htmlPath), projectDir, htmlPath);
|
|
7928
|
-
const rawHtml =
|
|
7929
|
-
rewriteUnresolvableGsapToCdn(entryHtml, projectDir),
|
|
7930
|
-
|
|
7971
|
+
const rawHtml = bindVariableMediaSources(
|
|
7972
|
+
normalizeCompositionSrcs(rewriteUnresolvableGsapToCdn(entryHtml, projectDir), projectDir),
|
|
7973
|
+
options.variables ?? {}
|
|
7931
7974
|
);
|
|
7932
7975
|
assertSubCompositionsUsable(rawHtml, projectDir);
|
|
7933
7976
|
const probes = /* @__PURE__ */ new Map();
|
|
@@ -8011,7 +8054,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
8011
8054
|
timeoutMs: options.ffmpegProcessTimeout
|
|
8012
8055
|
});
|
|
8013
8056
|
if (preparedHeifImages.length > 0) {
|
|
8014
|
-
defaultLogger.
|
|
8057
|
+
defaultLogger.debug(`[Compiler] Converted ${preparedHeifImages.length} HEIC image(s) to JPEG`);
|
|
8015
8058
|
}
|
|
8016
8059
|
const gifSourceAssets = new Map(remoteImageAssets);
|
|
8017
8060
|
const {
|
|
@@ -8026,7 +8069,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
8026
8069
|
timeoutMs: options.ffmpegProcessTimeout
|
|
8027
8070
|
});
|
|
8028
8071
|
if (preparedGifs.length > 0) {
|
|
8029
|
-
defaultLogger.
|
|
8072
|
+
defaultLogger.debug(`[Compiler] Prepared ${preparedGifs.length} animated GIF input(s) as WebM`);
|
|
8030
8073
|
}
|
|
8031
8074
|
const embeddedHtml = await embedLocalFontFaces(htmlWithPreparedGifs, projectDir);
|
|
8032
8075
|
const { html, externalAssets } = collectExternalAssets(embeddedHtml, projectDir);
|
|
@@ -8054,7 +8097,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
8054
8097
|
for (const video of videos) {
|
|
8055
8098
|
if (isHttpUrl(video.src)) continue;
|
|
8056
8099
|
const videoPath = resolve5(projectDir, video.src);
|
|
8057
|
-
if (advised.has(videoPath)) continue;
|
|
8100
|
+
if (advised.has(videoPath) || namesAnotherNetworkRoot(projectDir, videoPath)) continue;
|
|
8058
8101
|
advised.add(videoPath);
|
|
8059
8102
|
const reencode = `ffmpeg -i "${video.src}" -c:v libx264 -r 30 -g 30 -keyint_min 30 -movflags +faststart -c:a copy output.mp4`;
|
|
8060
8103
|
(async () => {
|
|
@@ -8473,7 +8516,7 @@ function resolveEntryHtmlPath(input) {
|
|
|
8473
8516
|
const rawEntry = readTextFile(htmlPath);
|
|
8474
8517
|
if (entryFile === "index.html" || !isTemplateEntry(rawEntry)) return htmlPath;
|
|
8475
8518
|
const projectIndexPath = join17(projectDir, "index.html");
|
|
8476
|
-
if (!
|
|
8519
|
+
if (!existsSync11(projectIndexPath)) {
|
|
8477
8520
|
throw new Error(
|
|
8478
8521
|
`Template entry file "${entryFile}" requires a project index.html to extract its render shell.`
|
|
8479
8522
|
);
|
|
@@ -8757,8 +8800,15 @@ function hasRuntimeMediaChanges(html) {
|
|
|
8757
8800
|
}
|
|
8758
8801
|
return false;
|
|
8759
8802
|
}
|
|
8803
|
+
function checksVariablesInBrowser(config) {
|
|
8804
|
+
return config.strictVariables === true && Object.keys(config.variables ?? {}).length > 0;
|
|
8805
|
+
}
|
|
8806
|
+
function strictVariablesAttestation(config, probeSession) {
|
|
8807
|
+
if (config.strictVariables !== true) return void 0;
|
|
8808
|
+
return !checksVariablesInBrowser(config) || probeSession?.strictVariablesChecked === true;
|
|
8809
|
+
}
|
|
8760
8810
|
function probeRequiresBrowser(args) {
|
|
8761
|
-
return args.durationSeconds <= 0 || args.unresolvedCompositionCount > 0 || args.hasAutoStart || args.hasScriptedAudio || args.hasVariableMedia || args.hasInsertedMedia;
|
|
8811
|
+
return args.requiresVariablesCheck === true || args.durationSeconds <= 0 || args.unresolvedCompositionCount > 0 || args.hasAutoStart || args.hasScriptedAudio || args.hasVariableMedia || args.hasInsertedMedia;
|
|
8762
8812
|
}
|
|
8763
8813
|
function reportedLengthSource(source) {
|
|
8764
8814
|
if (!source) return null;
|
|
@@ -8782,7 +8832,8 @@ async function runProbeStage(input) {
|
|
|
8782
8832
|
height,
|
|
8783
8833
|
needsAlpha,
|
|
8784
8834
|
deviceScaleFactor,
|
|
8785
|
-
subTimelineWaitMemo
|
|
8835
|
+
subTimelineWaitMemo,
|
|
8836
|
+
staticDedupMemo
|
|
8786
8837
|
} = input;
|
|
8787
8838
|
let { compiled } = input;
|
|
8788
8839
|
const probeCfg = cfg.forceScreenshot === forceScreenshot ? cfg : { ...cfg, forceScreenshot };
|
|
@@ -8805,7 +8856,8 @@ async function runProbeStage(input) {
|
|
|
8805
8856
|
hasAutoStart,
|
|
8806
8857
|
hasScriptedAudio,
|
|
8807
8858
|
hasVariableMedia,
|
|
8808
|
-
hasInsertedMedia
|
|
8859
|
+
hasInsertedMedia,
|
|
8860
|
+
requiresVariablesCheck: checksVariablesInBrowser(job.config)
|
|
8809
8861
|
});
|
|
8810
8862
|
try {
|
|
8811
8863
|
if (needsBrowser) {
|
|
@@ -8839,11 +8891,16 @@ async function runProbeStage(input) {
|
|
|
8839
8891
|
job.config.quality
|
|
8840
8892
|
),
|
|
8841
8893
|
variables: job.config.variables,
|
|
8894
|
+
strictVariables: job.config.strictVariables,
|
|
8842
8895
|
deviceScaleFactor,
|
|
8843
8896
|
motionBlur,
|
|
8844
8897
|
pageMotionBlur: job.config.pageMotionBlur,
|
|
8845
8898
|
requiresWebGpu: compositionRequiresWebGpu(compiled.html),
|
|
8846
|
-
subTimelineWaitMemo
|
|
8899
|
+
subTimelineWaitMemo,
|
|
8900
|
+
staticDedupMemo,
|
|
8901
|
+
compositionHash: computeCompositionObservabilityHash(compiled.html),
|
|
8902
|
+
deferStaticDedup: true,
|
|
8903
|
+
onStaticDedupActivity: () => noteStaticDedupActivity(job)
|
|
8847
8904
|
};
|
|
8848
8905
|
const PROBE_MAX_ATTEMPTS = 2;
|
|
8849
8906
|
for (let attempt = 1; attempt <= PROBE_MAX_ATTEMPTS; attempt++) {
|
|
@@ -9240,6 +9297,7 @@ async function runProbeStage(input) {
|
|
|
9240
9297
|
}
|
|
9241
9298
|
}
|
|
9242
9299
|
return {
|
|
9300
|
+
strictVariablesChecked: strictVariablesAttestation(job.config, probeSession),
|
|
9243
9301
|
compiled,
|
|
9244
9302
|
fileServer,
|
|
9245
9303
|
probeSession,
|
|
@@ -9323,7 +9381,7 @@ function validateDistributedDuration(input) {
|
|
|
9323
9381
|
}
|
|
9324
9382
|
|
|
9325
9383
|
// ../producer/src/services/render/stages/extractVideosStage.ts
|
|
9326
|
-
import { existsSync as
|
|
9384
|
+
import { existsSync as existsSync12 } from "fs";
|
|
9327
9385
|
import { join as join19 } from "path";
|
|
9328
9386
|
|
|
9329
9387
|
// ../producer/src/services/render/extractionFailureMetadata.ts
|
|
@@ -9580,7 +9638,7 @@ async function runExtractVideosStage(input) {
|
|
|
9580
9638
|
const probeFailures = await Promise.all(
|
|
9581
9639
|
composition.videos.map(async (v) => {
|
|
9582
9640
|
const videoPath = resolveProjectRelativeSrc(v.src, projectDir, compiledDir);
|
|
9583
|
-
if (!
|
|
9641
|
+
if (!existsSync12(videoPath)) return null;
|
|
9584
9642
|
try {
|
|
9585
9643
|
const attempted = extractionPolicy.maxTransientRetries === 0 ? { result: await extractMediaMetadata(videoPath), retries: 0 } : await runVideoExtractionWithRetry(() => extractMediaMetadata(videoPath), {
|
|
9586
9644
|
signal: abortSignal,
|
|
@@ -9618,7 +9676,7 @@ async function runExtractVideosStage(input) {
|
|
|
9618
9676
|
const probed = await Promise.all(
|
|
9619
9677
|
composition.images.map(async (img) => {
|
|
9620
9678
|
const imgPath = resolveProjectRelativeSrc(img.src, projectDir, compiledDir);
|
|
9621
|
-
if (!
|
|
9679
|
+
if (!existsSync12(imgPath)) return null;
|
|
9622
9680
|
const colorSpace = await probeColorSpaceSafely(imgPath, log);
|
|
9623
9681
|
if (isHdrColorSpace(colorSpace)) {
|
|
9624
9682
|
nativeHdrImageIds.add(img.id);
|
|
@@ -9738,7 +9796,7 @@ async function appendVideoAudioFromProbe(input) {
|
|
|
9738
9796
|
videos.map(async (video) => {
|
|
9739
9797
|
const path = isHttpUrl(video.src) ? video.src : resolveProjectRelativeSrc(video.src, projectDir, compiledDir);
|
|
9740
9798
|
const readFrom = urlByAbsentLocalPath?.get(path) ?? path;
|
|
9741
|
-
if (!isHttpUrl(readFrom) && !
|
|
9799
|
+
if (!isHttpUrl(readFrom) && !existsSync12(readFrom)) return null;
|
|
9742
9800
|
const metadata = await extractMediaMetadata(readFrom);
|
|
9743
9801
|
const window2 = await resolveFinalFrameExtractionWindow(
|
|
9744
9802
|
readFrom,
|
|
@@ -9758,7 +9816,7 @@ async function appendVideoAudioFromProbe(input) {
|
|
|
9758
9816
|
}
|
|
9759
9817
|
|
|
9760
9818
|
// ../producer/src/services/render/videoLayerPassthroughPlan.ts
|
|
9761
|
-
import { existsSync as
|
|
9819
|
+
import { existsSync as existsSync13 } from "fs";
|
|
9762
9820
|
var SAMPLES = 9;
|
|
9763
9821
|
function inspectVideoLayout(id, w, h, time) {
|
|
9764
9822
|
window.__hf?.seek?.(time);
|
|
@@ -9820,7 +9878,7 @@ async function planVideoLayerPassthrough(input) {
|
|
|
9820
9878
|
const { video } = q;
|
|
9821
9879
|
if (isHttpUrl(video.src)) return { reason: "remote_source" };
|
|
9822
9880
|
const path = resolveProjectRelativeSrc(video.src, input.projectDir, input.compiledDir);
|
|
9823
|
-
if (!
|
|
9881
|
+
if (!existsSync13(path)) return { reason: "source_missing" };
|
|
9824
9882
|
const layout = await probeVideoLayout(input.page, video.id, input.canvas, input.duration);
|
|
9825
9883
|
if ("reason" in layout) return layout;
|
|
9826
9884
|
const layer = await buildVideoLayerInput(
|
|
@@ -9835,11 +9893,11 @@ async function planVideoLayerPassthrough(input) {
|
|
|
9835
9893
|
}
|
|
9836
9894
|
|
|
9837
9895
|
// ../producer/src/services/render/stages/audioStage.ts
|
|
9838
|
-
import { existsSync as
|
|
9896
|
+
import { existsSync as existsSync15 } from "fs";
|
|
9839
9897
|
import { join as join22 } from "path";
|
|
9840
9898
|
|
|
9841
9899
|
// ../producer/src/services/render/audioDeliveryLimit.ts
|
|
9842
|
-
import { existsSync as
|
|
9900
|
+
import { existsSync as existsSync14 } from "fs";
|
|
9843
9901
|
import { dirname as dirname8, join as join21 } from "path";
|
|
9844
9902
|
|
|
9845
9903
|
// ../producer/src/services/render/audioPadTrim.ts
|
|
@@ -10322,7 +10380,7 @@ async function limitDeliveryPeaks(input, deps = {
|
|
|
10322
10380
|
applyChain: applyAudioFxChain,
|
|
10323
10381
|
encode: encodeAac,
|
|
10324
10382
|
rename: renameWithRetry,
|
|
10325
|
-
sourceExists:
|
|
10383
|
+
sourceExists: existsSync14
|
|
10326
10384
|
}) {
|
|
10327
10385
|
const { audioPath, sourcePath, signal, timeoutMs } = input;
|
|
10328
10386
|
if (!deps.sourceExists(sourcePath)) return { success: true };
|
|
@@ -10417,7 +10475,7 @@ async function runAudioStageScoped(input) {
|
|
|
10417
10475
|
);
|
|
10418
10476
|
audioLoweredDb = guard.loweredDb;
|
|
10419
10477
|
input.log?.info("[audio] phases", { ...result.audioPhaseMs, guard: Date.now() - guardStart });
|
|
10420
|
-
if (input.keepDeliverySource && !guard.sourceStale &&
|
|
10478
|
+
if (input.keepDeliverySource && !guard.sourceStale && existsSync15(pcmSourcePath)) {
|
|
10421
10479
|
deliverySourcePath = pcmSourcePath;
|
|
10422
10480
|
}
|
|
10423
10481
|
}
|
|
@@ -10545,7 +10603,7 @@ async function mixAudioForDelivery(input, duration, pcmSourcePath) {
|
|
|
10545
10603
|
}
|
|
10546
10604
|
|
|
10547
10605
|
// ../producer/src/services/render/stages/captureStage.ts
|
|
10548
|
-
import { existsSync as
|
|
10606
|
+
import { existsSync as existsSync16, readdirSync as readdirSync4, statfsSync as statfsSync2 } from "fs";
|
|
10549
10607
|
import { join as join23 } from "path";
|
|
10550
10608
|
function shouldAllowAdaptiveCaptureRetry(workerCount, _explicitlyConfigured) {
|
|
10551
10609
|
return workerCount > 1;
|
|
@@ -10602,7 +10660,7 @@ function diskCaptureShortfallError(needBytes, freeBytes, framesDir, basis, remed
|
|
|
10602
10660
|
}
|
|
10603
10661
|
function measureCaptureFrameBytes(workDir, framesDir) {
|
|
10604
10662
|
let total = sampleDirectoryBytes(framesDir);
|
|
10605
|
-
if (!
|
|
10663
|
+
if (!existsSync16(workDir)) return total;
|
|
10606
10664
|
for (const attempt of readdirSync4(workDir)) {
|
|
10607
10665
|
if (/^retry-\d+-batch-\d+-worker-\d+$/.test(attempt)) {
|
|
10608
10666
|
total += sampleDirectoryBytes(join23(workDir, attempt));
|
|
@@ -10784,7 +10842,7 @@ async function runSequentialDiskCapture(input, captureOptions, captureCfg, check
|
|
|
10784
10842
|
captureBeyondViewport = session.options.captureBeyondViewport;
|
|
10785
10843
|
try {
|
|
10786
10844
|
if (probeSession) {
|
|
10787
|
-
prepareCaptureSessionForReuse(session, framesDir, videoInjector);
|
|
10845
|
+
await prepareCaptureSessionForReuse(session, framesDir, videoInjector);
|
|
10788
10846
|
probeSession = null;
|
|
10789
10847
|
}
|
|
10790
10848
|
await ensureSessionReady(session, {
|
|
@@ -10909,7 +10967,7 @@ async function captureSessionFrames(session, { input, rangeStart, rangeEnd, resu
|
|
|
10909
10967
|
}
|
|
10910
10968
|
|
|
10911
10969
|
// ../producer/src/services/render/stages/captureHdrStage.ts
|
|
10912
|
-
import { existsSync as
|
|
10970
|
+
import { existsSync as existsSync18, mkdirSync as mkdirSync8 } from "fs";
|
|
10913
10971
|
import { join as join27 } from "path";
|
|
10914
10972
|
|
|
10915
10973
|
// ../producer/src/services/hdrImageTransferCache.ts
|
|
@@ -11132,7 +11190,7 @@ import { Worker } from "worker_threads";
|
|
|
11132
11190
|
import { fileURLToPath as fileURLToPath3, pathToFileURL } from "url";
|
|
11133
11191
|
import { dirname as dirname9, join as join25 } from "path";
|
|
11134
11192
|
import { createRequire } from "module";
|
|
11135
|
-
import { existsSync as
|
|
11193
|
+
import { existsSync as existsSync17 } from "fs";
|
|
11136
11194
|
import { cpus as cpus2 } from "os";
|
|
11137
11195
|
function resolveWorkerEntry(explicit) {
|
|
11138
11196
|
if (explicit && explicit.length > 0) {
|
|
@@ -11145,7 +11203,7 @@ function resolveWorkerEntry(explicit) {
|
|
|
11145
11203
|
}
|
|
11146
11204
|
const moduleDir = dirname9(fileURLToPath3(import.meta.url));
|
|
11147
11205
|
const jsPath = join25(moduleDir, "shaderTransitionWorker.js");
|
|
11148
|
-
if (
|
|
11206
|
+
if (existsSync17(jsPath)) return { path: jsPath, isTs: false };
|
|
11149
11207
|
const tsPath = join25(moduleDir, "shaderTransitionWorker.ts");
|
|
11150
11208
|
return { path: tsPath, isTs: true };
|
|
11151
11209
|
}
|
|
@@ -11706,7 +11764,7 @@ async function runCaptureHdrStage(input) {
|
|
|
11706
11764
|
}
|
|
11707
11765
|
const debugDumpEnabled = process.env.KEEP_TEMP === "1";
|
|
11708
11766
|
const debugDumpDir = debugDumpEnabled ? join27(framesDir, "debug-composite") : null;
|
|
11709
|
-
if (debugDumpDir && !
|
|
11767
|
+
if (debugDumpDir && !existsSync18(debugDumpDir)) {
|
|
11710
11768
|
mkdirSync8(debugDumpDir, { recursive: true });
|
|
11711
11769
|
}
|
|
11712
11770
|
const compositeTransfer = resolveCompositeTransfer(hasHdrContent, effectiveHdr);
|
|
@@ -11863,7 +11921,7 @@ async function runCaptureHdrStage(input) {
|
|
|
11863
11921
|
// ../producer/src/services/render/stages/encodeStage.ts
|
|
11864
11922
|
import {
|
|
11865
11923
|
copyFileSync as copyFileSync2,
|
|
11866
|
-
existsSync as
|
|
11924
|
+
existsSync as existsSync19,
|
|
11867
11925
|
mkdirSync as mkdirSync9,
|
|
11868
11926
|
readdirSync as readdirSync5,
|
|
11869
11927
|
readFileSync as readFileSync7,
|
|
@@ -11982,7 +12040,7 @@ async function encodeGifFromDir(framesDir, framePattern, outputPath, input) {
|
|
|
11982
12040
|
const failure = await reencodeWithClearedWholeFrames(argsInput, run, startTime);
|
|
11983
12041
|
if (failure) return failure;
|
|
11984
12042
|
}
|
|
11985
|
-
const fileSize =
|
|
12043
|
+
const fileSize = existsSync19(outputPath) ? statSync6(outputPath).size : 0;
|
|
11986
12044
|
return {
|
|
11987
12045
|
success: true,
|
|
11988
12046
|
outputPath,
|
|
@@ -12143,7 +12201,7 @@ async function runEncodeStage(input) {
|
|
|
12143
12201
|
const stage5Start = Date.now();
|
|
12144
12202
|
if (isPngSequence) {
|
|
12145
12203
|
const encoded = startEncodeProgress(job, "Writing PNG sequence", onProgress);
|
|
12146
|
-
if (!
|
|
12204
|
+
if (!existsSync19(outputPath)) mkdirSync9(outputPath, { recursive: true });
|
|
12147
12205
|
const captured = readdirSync5(framesDir).filter((name) => name.endsWith(".png")).sort();
|
|
12148
12206
|
if (captured.length === 0) {
|
|
12149
12207
|
throw new Error(
|
|
@@ -12154,7 +12212,7 @@ async function runEncodeStage(input) {
|
|
|
12154
12212
|
const dst = join28(outputPath, formatExportFrameName(i, "png"));
|
|
12155
12213
|
copyFileSync2(join28(framesDir, name), dst);
|
|
12156
12214
|
});
|
|
12157
|
-
if (hasAudio && audioOutputPath &&
|
|
12215
|
+
if (hasAudio && audioOutputPath && existsSync19(audioOutputPath)) {
|
|
12158
12216
|
copyFileSync2(audioOutputPath, join28(outputPath, MIXED_AUDIO_FILENAME));
|
|
12159
12217
|
log.info(
|
|
12160
12218
|
`[Render] png-sequence: ${MIXED_AUDIO_FILENAME} sidecar written to ${outputPath}/${MIXED_AUDIO_FILENAME}`
|
|
@@ -12542,7 +12600,7 @@ function findMissingFrameRanges(totalFrames, framesDir, frameExt) {
|
|
|
12542
12600
|
let rangeStart = null;
|
|
12543
12601
|
for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
|
|
12544
12602
|
const framePath = join29(framesDir, formatCaptureFrameName(frameIndex, frameExt));
|
|
12545
|
-
const missing = !
|
|
12603
|
+
const missing = !existsSync20(framePath) || statSync7(framePath).size <= 8;
|
|
12546
12604
|
if (missing && rangeStart === null) {
|
|
12547
12605
|
rangeStart = frameIndex;
|
|
12548
12606
|
} else if (!missing && rangeStart !== null) {
|
|
@@ -12649,7 +12707,8 @@ function frameStallRule(job, totalFrames, probeStartupMs) {
|
|
|
12649
12707
|
complete: () => (job.framesRendered ?? 0) >= totalFrames,
|
|
12650
12708
|
tailMs: Math.max(TAIL_STALL_MS, noProgressMs),
|
|
12651
12709
|
detail: () => describeWorkerPhases(job),
|
|
12652
|
-
attemptOpened: () => forgetWorkerPhases(job)
|
|
12710
|
+
attemptOpened: () => forgetWorkerPhases(job),
|
|
12711
|
+
activity: () => staticDedupActivity(job)
|
|
12653
12712
|
};
|
|
12654
12713
|
}
|
|
12655
12714
|
function isRecoverableParallelCaptureError(error) {
|
|
@@ -12674,7 +12733,7 @@ function countCapturedFrames(totalFrames, framesDir, frameExt) {
|
|
|
12674
12733
|
let captured = 0;
|
|
12675
12734
|
for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
|
|
12676
12735
|
const framePath = join29(framesDir, formatCaptureFrameName(frameIndex, frameExt));
|
|
12677
|
-
if (
|
|
12736
|
+
if (existsSync20(framePath)) captured++;
|
|
12678
12737
|
}
|
|
12679
12738
|
return captured;
|
|
12680
12739
|
}
|
|
@@ -13340,7 +13399,7 @@ async function executeRenderJob(job, projectDir, outputPath, progressSink, abort
|
|
|
13340
13399
|
validateChromaSubsamplingConfig(job.config);
|
|
13341
13400
|
const debugDir = resolveRenderDebugDir();
|
|
13342
13401
|
const outputDir = dirname11(outputPath);
|
|
13343
|
-
if (!
|
|
13402
|
+
if (!existsSync20(outputDir)) mkdirSync10(outputDir, { recursive: true });
|
|
13344
13403
|
const workDir = job.config.debug ? join29(debugDir, job.id) : createRenderWorkDir(resolveRenderWorkDirPrefix(outputPath, job.id), outputDir);
|
|
13345
13404
|
const pipelineStart = Date.now();
|
|
13346
13405
|
const baseLog = job.config.logger ?? defaultLogger;
|
|
@@ -13482,7 +13541,7 @@ async function executeRenderPipeline(input) {
|
|
|
13482
13541
|
job.startedAt = /* @__PURE__ */ new Date();
|
|
13483
13542
|
assertNotAborted();
|
|
13484
13543
|
assertConfiguredFfmpegBinariesExist();
|
|
13485
|
-
if (!
|
|
13544
|
+
if (!existsSync20(workDir)) mkdirSync10(workDir, { recursive: true });
|
|
13486
13545
|
if (job.config.debug) {
|
|
13487
13546
|
log.info("[Render] Debug artifacts enabled", { workDir, logPath });
|
|
13488
13547
|
}
|
|
@@ -13512,7 +13571,7 @@ async function executeRenderPipeline(input) {
|
|
|
13512
13571
|
});
|
|
13513
13572
|
const entryFile = job.config.entryFile || "index.html";
|
|
13514
13573
|
const htmlPath = join29(projectDir, entryFile);
|
|
13515
|
-
if (!
|
|
13574
|
+
if (!existsSync20(htmlPath)) {
|
|
13516
13575
|
throw new Error(`Entry file not found: ${htmlPath}`);
|
|
13517
13576
|
}
|
|
13518
13577
|
assertNotAborted();
|
|
@@ -13604,6 +13663,7 @@ async function executeRenderPipeline(input) {
|
|
|
13604
13663
|
(result) => Object.assign(job, result)
|
|
13605
13664
|
);
|
|
13606
13665
|
const subTimelineWaitMemo = {};
|
|
13666
|
+
const staticDedupMemo = {};
|
|
13607
13667
|
const probeResult = await observeRenderStage(
|
|
13608
13668
|
observability,
|
|
13609
13669
|
"browser_probe",
|
|
@@ -13624,6 +13684,7 @@ async function executeRenderPipeline(input) {
|
|
|
13624
13684
|
needsAlpha,
|
|
13625
13685
|
deviceScaleFactor,
|
|
13626
13686
|
subTimelineWaitMemo,
|
|
13687
|
+
staticDedupMemo,
|
|
13627
13688
|
recordReferenceBackground
|
|
13628
13689
|
}),
|
|
13629
13690
|
// Browser probe is pre-capture; report `browser calibrating` so a
|
|
@@ -13635,6 +13696,7 @@ async function executeRenderPipeline(input) {
|
|
|
13635
13696
|
compositionHash = computeCompositionObservabilityHash(compiled.html);
|
|
13636
13697
|
fileServer = probeResult.fileServer;
|
|
13637
13698
|
probeSession = probeResult.probeSession;
|
|
13699
|
+
job.strictVariablesChecked = probeResult.strictVariablesChecked;
|
|
13638
13700
|
lastBrowserConsole = probeResult.lastBrowserConsole;
|
|
13639
13701
|
let resolvedCaptureBeyondViewport = probeSession?.options.captureBeyondViewport;
|
|
13640
13702
|
if (resolvedCaptureBeyondViewport !== void 0) {
|
|
@@ -13856,7 +13918,7 @@ async function executeRenderPipeline(input) {
|
|
|
13856
13918
|
throw new Error("File server failed to initialize before frame capture");
|
|
13857
13919
|
}
|
|
13858
13920
|
const framesDir = join29(workDir, "captured-frames");
|
|
13859
|
-
if (!
|
|
13921
|
+
if (!existsSync20(framesDir)) mkdirSync10(framesDir, { recursive: true });
|
|
13860
13922
|
updateJobStatus(job, "rendering", "Checking browser GPU", 25, onProgress, {
|
|
13861
13923
|
code: "start_browsers"
|
|
13862
13924
|
});
|
|
@@ -13915,6 +13977,9 @@ async function executeRenderPipeline(input) {
|
|
|
13915
13977
|
videoMetadataHints,
|
|
13916
13978
|
skipReadinessVideoIds: videoReadinessSkipIds,
|
|
13917
13979
|
subTimelineWaitMemo,
|
|
13980
|
+
staticDedupMemo,
|
|
13981
|
+
compositionHash,
|
|
13982
|
+
onStaticDedupActivity: () => noteStaticDedupActivity(job),
|
|
13918
13983
|
// Probe-resolved duration: drawElement self-verification derives its
|
|
13919
13984
|
// sample frame indices from this so they land inside the drained range.
|
|
13920
13985
|
compositionDurationSeconds: job.duration,
|
|
@@ -15261,7 +15326,7 @@ async function executeRenderPipeline(input) {
|
|
|
15261
15326
|
})
|
|
15262
15327
|
);
|
|
15263
15328
|
const totalElapsed = Date.now() - pipelineStart;
|
|
15264
|
-
const tmpPeakBytes =
|
|
15329
|
+
const tmpPeakBytes = existsSync20(workDir) ? sampleDirectoryBytes(workDir) : 0;
|
|
15265
15330
|
recordTransientRetryObservability();
|
|
15266
15331
|
observability.checkpoint("pipeline", "artifact validated", { totalElapsedMs: totalElapsed });
|
|
15267
15332
|
const observabilitySummary = observability.summary({
|
|
@@ -15342,7 +15407,7 @@ async function executeRenderPipeline(input) {
|
|
|
15342
15407
|
}
|
|
15343
15408
|
}
|
|
15344
15409
|
if (job.config.debug) {
|
|
15345
|
-
if (!isPngSequence && !isHls &&
|
|
15410
|
+
if (!isPngSequence && !isHls && existsSync20(stagedOutputPath)) {
|
|
15346
15411
|
const debugOutput = join29(workDir, `output${videoExt}`);
|
|
15347
15412
|
copyFileSync3(stagedOutputPath, debugOutput);
|
|
15348
15413
|
}
|
|
@@ -15843,7 +15908,7 @@ async function writeStitchedMp4(chunkPaths, outputPath, audioPath) {
|
|
|
15843
15908
|
import {
|
|
15844
15909
|
copyFileSync as copyFileSync4,
|
|
15845
15910
|
cpSync as cpSync2,
|
|
15846
|
-
existsSync as
|
|
15911
|
+
existsSync as existsSync25,
|
|
15847
15912
|
linkSync,
|
|
15848
15913
|
mkdirSync as mkdirSync14,
|
|
15849
15914
|
rmSync as rmSync12,
|
|
@@ -15855,13 +15920,13 @@ import { extname as extname6, isAbsolute as isAbsolute2, join as join38, relativ
|
|
|
15855
15920
|
import { join as join33 } from "path";
|
|
15856
15921
|
|
|
15857
15922
|
// ../producer/src/services/distributed/chunkFrames.ts
|
|
15858
|
-
import { existsSync as
|
|
15923
|
+
import { existsSync as existsSync22, readdirSync as readdirSync7 } from "fs";
|
|
15859
15924
|
import { extname as extname4, join as join32 } from "path";
|
|
15860
15925
|
|
|
15861
15926
|
// ../producer/src/services/distributed/shared.ts
|
|
15862
15927
|
import { execFile as execFileCallback } from "child_process";
|
|
15863
15928
|
import { dirname as dirname13, join as join31 } from "path";
|
|
15864
|
-
import { existsSync as
|
|
15929
|
+
import { existsSync as existsSync21, readFileSync as readFileSync8 } from "fs";
|
|
15865
15930
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
15866
15931
|
import { promisify as promisify2 } from "util";
|
|
15867
15932
|
var PLAN_VIDEOS_META_RELATIVE_PATH = "meta/videos.json";
|
|
@@ -15873,7 +15938,7 @@ function isPlanAudioArtifactPath(path) {
|
|
|
15873
15938
|
function resolvePlanAudioPath(planDir) {
|
|
15874
15939
|
for (const name of [PLAN_AUDIO_RELATIVE_PATH, PLAN_AUDIO_LEGACY_RELATIVE_PATH]) {
|
|
15875
15940
|
const candidate = join31(planDir, name);
|
|
15876
|
-
if (
|
|
15941
|
+
if (existsSync21(candidate)) return candidate;
|
|
15877
15942
|
}
|
|
15878
15943
|
return null;
|
|
15879
15944
|
}
|
|
@@ -16123,6 +16188,7 @@ function buildSyntheticRenderJob(input) {
|
|
|
16123
16188
|
strictness: input.strictness,
|
|
16124
16189
|
producerConfig: input.producerConfig,
|
|
16125
16190
|
variables: input.variables,
|
|
16191
|
+
strictVariables: input.strictVariables,
|
|
16126
16192
|
pageMotionBlur: input.pageMotionBlur
|
|
16127
16193
|
};
|
|
16128
16194
|
return createRenderJob(renderConfig);
|
|
@@ -16134,7 +16200,7 @@ function readProducerVersion() {
|
|
|
16134
16200
|
let current = startDir;
|
|
16135
16201
|
for (let i = 0; i < 10; i++) {
|
|
16136
16202
|
const candidate = join31(current, "package.json");
|
|
16137
|
-
if (
|
|
16203
|
+
if (existsSync21(candidate)) {
|
|
16138
16204
|
try {
|
|
16139
16205
|
const pkg = JSON.parse(readFileSync8(candidate, "utf-8"));
|
|
16140
16206
|
if (pkg.name === "@hyperframes/producer" && typeof pkg.version === "string") {
|
|
@@ -16189,7 +16255,7 @@ function rebuildExtractedFramesFromPlanDir(planDir, videos, indexMode = "dense-v
|
|
|
16189
16255
|
const result = [];
|
|
16190
16256
|
for (const v of videos) {
|
|
16191
16257
|
const outputDir = join32(planDir, "video-frames", mediaIdPathSegment(v.videoId));
|
|
16192
|
-
if (!
|
|
16258
|
+
if (!existsSync22(outputDir)) {
|
|
16193
16259
|
throw new Error(
|
|
16194
16260
|
`[renderChunk] planDir missing extracted video frames for ${JSON.stringify(v.videoId)}: ${outputDir} not present. plan() should have written frames here; the planDir is malformed.`
|
|
16195
16261
|
);
|
|
@@ -16288,7 +16354,7 @@ async function extractDeferredVideoFramesForChunk(input) {
|
|
|
16288
16354
|
const range = planned.get(video.videoId).deferredRange;
|
|
16289
16355
|
const remoteUrl = remoteSources[range.sourcePath];
|
|
16290
16356
|
const sourcePath = remoteUrl ?? join32(input.planDir, ...range.sourcePath.split("/"));
|
|
16291
|
-
if (remoteUrl === void 0 && !
|
|
16357
|
+
if (remoteUrl === void 0 && !existsSync22(sourcePath)) {
|
|
16292
16358
|
throw new RenderChunkValidationError(
|
|
16293
16359
|
MISSING_PLAN_ARTIFACT,
|
|
16294
16360
|
`[renderChunk] planDir is missing the source for video ${JSON.stringify(video.videoId)}: ${range.sourcePath}`
|
|
@@ -16481,7 +16547,7 @@ async function readPlanReferenceBackground(input) {
|
|
|
16481
16547
|
}
|
|
16482
16548
|
|
|
16483
16549
|
// ../producer/src/services/render/stages/freezePlan.ts
|
|
16484
|
-
import { existsSync as
|
|
16550
|
+
import { existsSync as existsSync23, mkdirSync as mkdirSync12, readFileSync as readFileSync9, readdirSync as readdirSync8, writeFileSync as writeFileSync7 } from "fs";
|
|
16485
16551
|
import { join as join35, relative as relative3, resolve as resolve7 } from "path";
|
|
16486
16552
|
|
|
16487
16553
|
// ../producer/src/services/distributed/planProtocol.ts
|
|
@@ -16671,7 +16737,7 @@ function planFileSha256(absolutePath, digests) {
|
|
|
16671
16737
|
return sha256;
|
|
16672
16738
|
}
|
|
16673
16739
|
async function prehashPlanFiles(dir, digests) {
|
|
16674
|
-
if (!
|
|
16740
|
+
if (!existsSync23(dir)) return;
|
|
16675
16741
|
for (const { absolutePath } of listPlanFiles(dir)) {
|
|
16676
16742
|
if (!digests.has(absolutePath)) digests.set(absolutePath, await sha256FileAsync(absolutePath));
|
|
16677
16743
|
}
|
|
@@ -16741,15 +16807,15 @@ function writePlanRemoteFiles(planDir, files) {
|
|
|
16741
16807
|
}
|
|
16742
16808
|
function readPlanRemoteFiles(planDir) {
|
|
16743
16809
|
const path = join35(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH);
|
|
16744
|
-
return
|
|
16810
|
+
return existsSync23(path) ? JSON.parse(readFileSync9(path, "utf-8")) : [];
|
|
16745
16811
|
}
|
|
16746
16812
|
function recomputePlanHashFromPlanDir(planDir, digests) {
|
|
16747
16813
|
const planJsonPath = join35(planDir, "plan.json");
|
|
16748
16814
|
const encoderJsonPath = join35(planDir, "meta", "encoder.json");
|
|
16749
|
-
if (!
|
|
16815
|
+
if (!existsSync23(planJsonPath)) {
|
|
16750
16816
|
throw new Error(`[freezePlan] plan.json missing: ${planJsonPath}`);
|
|
16751
16817
|
}
|
|
16752
|
-
if (!
|
|
16818
|
+
if (!existsSync23(encoderJsonPath)) {
|
|
16753
16819
|
throw new Error(`[freezePlan] meta/encoder.json missing: ${encoderJsonPath}`);
|
|
16754
16820
|
}
|
|
16755
16821
|
const planJson = JSON.parse(readFileSync9(planJsonPath, "utf-8"));
|
|
@@ -16779,11 +16845,11 @@ async function freezePlan(input) {
|
|
|
16779
16845
|
hasAudio,
|
|
16780
16846
|
digests
|
|
16781
16847
|
} = input;
|
|
16782
|
-
if (!
|
|
16848
|
+
if (!existsSync23(planDir)) {
|
|
16783
16849
|
throw new Error(`[freezePlan] planDir does not exist: ${planDir}`);
|
|
16784
16850
|
}
|
|
16785
16851
|
const metaDir = join35(planDir, "meta");
|
|
16786
|
-
if (!
|
|
16852
|
+
if (!existsSync23(metaDir)) mkdirSync12(metaDir, { recursive: true });
|
|
16787
16853
|
writeFileSync7(
|
|
16788
16854
|
join35(metaDir, "composition.json"),
|
|
16789
16855
|
`${JSON.stringify(composition, null, 2)}
|
|
@@ -16860,7 +16926,7 @@ function applyRuntimeEnvSnapshot(snapshot, env = process.env) {
|
|
|
16860
16926
|
}
|
|
16861
16927
|
|
|
16862
16928
|
// ../producer/src/services/distributed/chunkAudio.ts
|
|
16863
|
-
import { closeSync as closeSync5, existsSync as
|
|
16929
|
+
import { closeSync as closeSync5, existsSync as existsSync24, ftruncateSync, mkdirSync as mkdirSync13, openSync as openSync5, readFileSync as readFileSync10 } from "fs";
|
|
16864
16930
|
import { writeFileSync as writeFileSync8, writeSync } from "fs";
|
|
16865
16931
|
import { join as join36 } from "path";
|
|
16866
16932
|
function audioCutForChunk(grid, chunks, index, fps) {
|
|
@@ -16965,7 +17031,7 @@ async function writeChunkAudioSlices(input) {
|
|
|
16965
17031
|
}
|
|
16966
17032
|
function chunkAudioSource(planDir, chunkIndex, scratchPath) {
|
|
16967
17033
|
const layoutPath = join36(planDir, SLICE_LAYOUT);
|
|
16968
|
-
if (!
|
|
17034
|
+
if (!existsSync24(layoutPath)) return resolvePlanAudioPath(planDir);
|
|
16969
17035
|
const layout = JSON.parse(readFileSync10(layoutPath, "utf-8"));
|
|
16970
17036
|
const frame = readFileSync10(join36(planDir, SLICE_FRAME));
|
|
16971
17037
|
const fd = openSync5(scratchPath, "w");
|
|
@@ -17529,7 +17595,7 @@ function createVideoSourceShipper(input) {
|
|
|
17529
17595
|
let result = null;
|
|
17530
17596
|
for (const root of stagedRel === null ? [input.workCompiledDir, input.projectDir] : []) {
|
|
17531
17597
|
const rel = pathInside(root, srcPath);
|
|
17532
|
-
if (rel !== null && (
|
|
17598
|
+
if (rel !== null && (existsSync25(join38(input.planDir, "compiled", rel)) || input.isRemote(srcPath))) {
|
|
17533
17599
|
result = ["compiled", ...rel.split(sep3)].join("/");
|
|
17534
17600
|
break;
|
|
17535
17601
|
}
|
|
@@ -17557,7 +17623,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
17557
17623
|
useGpu: false,
|
|
17558
17624
|
browserGpuMode: "software"
|
|
17559
17625
|
});
|
|
17560
|
-
if (!
|
|
17626
|
+
if (!existsSync25(planDir)) mkdirSync14(planDir, { recursive: true });
|
|
17561
17627
|
const log = config.logger ?? defaultLogger;
|
|
17562
17628
|
const sizeLimitBytes = options.executionPlanSizeLimitBytes ?? config.planDirSizeLimitBytes ?? PLAN_DIR_SIZE_LIMIT_BYTES;
|
|
17563
17629
|
const abortSignal = config.abortSignal;
|
|
@@ -17584,11 +17650,12 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
17584
17650
|
logger: config.logger,
|
|
17585
17651
|
producerConfig: cfg,
|
|
17586
17652
|
variables: config.variables,
|
|
17653
|
+
strictVariables: config.strictVariables,
|
|
17587
17654
|
pageMotionBlur: config.pageMotionBlur
|
|
17588
17655
|
});
|
|
17589
17656
|
const entryFile = config.entryFile ?? "index.html";
|
|
17590
17657
|
const htmlPath = join38(projectDir, entryFile);
|
|
17591
|
-
if (!
|
|
17658
|
+
if (!existsSync25(htmlPath)) {
|
|
17592
17659
|
throw new Error(`[plan] entry file not found: ${htmlPath}`);
|
|
17593
17660
|
}
|
|
17594
17661
|
const workDir = join38(planDir, ".plan-work");
|
|
@@ -17696,6 +17763,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
17696
17763
|
logPlanStage(log, "reference_background", stageStarted);
|
|
17697
17764
|
}
|
|
17698
17765
|
compiled = probeResult.compiled;
|
|
17766
|
+
job.strictVariablesChecked = probeResult.strictVariablesChecked;
|
|
17699
17767
|
job.duration = probeResult.duration;
|
|
17700
17768
|
job.totalFrames = probeResult.totalFrames;
|
|
17701
17769
|
const totalFrames = probeResult.totalFrames;
|
|
@@ -17707,7 +17775,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
17707
17775
|
if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
|
|
17708
17776
|
if (probeResult.probeSession) {
|
|
17709
17777
|
try {
|
|
17710
|
-
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-
|
|
17778
|
+
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-26DWEOAT.js");
|
|
17711
17779
|
await closeCaptureSession2(probeResult.probeSession);
|
|
17712
17780
|
} catch (err) {
|
|
17713
17781
|
log.warn("[plan] probe session close failed", {
|
|
@@ -17816,15 +17884,15 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
|
|
|
17816
17884
|
logPlanStage(log, "extract", stageStarted);
|
|
17817
17885
|
const stagedVideoFrames = join38(compiledDir, "__hyperframes_video_frames");
|
|
17818
17886
|
const videoFramesDst = join38(planDir, "video-frames");
|
|
17819
|
-
if (
|
|
17887
|
+
if (existsSync25(videoFramesDst)) rmSync12(videoFramesDst, { recursive: true, force: true });
|
|
17820
17888
|
const videoSourcesDir = join38(planDir, "video-sources");
|
|
17821
17889
|
rmSync12(videoSourcesDir, { recursive: true, force: true });
|
|
17822
|
-
if (
|
|
17890
|
+
if (existsSync25(stagedVideoFrames)) {
|
|
17823
17891
|
renameWithRetry(stagedVideoFrames, videoFramesDst);
|
|
17824
17892
|
} else {
|
|
17825
17893
|
mkdirSync14(videoFramesDst, { recursive: true });
|
|
17826
17894
|
}
|
|
17827
|
-
if (
|
|
17895
|
+
if (existsSync25(finalCompiledDir)) rmSync12(finalCompiledDir, { recursive: true, force: true });
|
|
17828
17896
|
renameWithRetry(compiledDir, finalCompiledDir);
|
|
17829
17897
|
const shipVideoSource = createVideoSourceShipper({
|
|
17830
17898
|
planDir,
|
|
@@ -17945,10 +18013,10 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
|
|
|
17945
18013
|
applyDistributedAudioWarningPolicy(job, audioResult.audioError, audioResult.audioFailures, log);
|
|
17946
18014
|
}
|
|
17947
18015
|
const planAudioPath = join38(planDir, PLAN_AUDIO_RELATIVE_PATH);
|
|
17948
|
-
if (audioResult?.hasAudio &&
|
|
18016
|
+
if (audioResult?.hasAudio && existsSync25(audioResult.audioOutputPath)) {
|
|
17949
18017
|
renameWithRetry(audioResult.audioOutputPath, planAudioPath);
|
|
17950
18018
|
}
|
|
17951
|
-
if (chunksCarryAudio &&
|
|
18019
|
+
if (chunksCarryAudio && existsSync25(planAudioPath)) {
|
|
17952
18020
|
if (options.sliceChunkAudio) {
|
|
17953
18021
|
stageStarted = Date.now();
|
|
17954
18022
|
await writeChunkAudioSlices({
|
|
@@ -18043,7 +18111,8 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
|
|
|
18043
18111
|
height,
|
|
18044
18112
|
format: config.format,
|
|
18045
18113
|
ffmpegVersion,
|
|
18046
|
-
producerVersion
|
|
18114
|
+
producerVersion,
|
|
18115
|
+
...job.strictVariablesChecked === void 0 ? {} : { strictVariablesChecked: job.strictVariablesChecked }
|
|
18047
18116
|
};
|
|
18048
18117
|
}
|
|
18049
18118
|
async function plan(projectDir, config, planDir, options = {}) {
|
|
@@ -18060,20 +18129,21 @@ async function plan(projectDir, config, planDir, options = {}) {
|
|
|
18060
18129
|
height: executionPlan.height,
|
|
18061
18130
|
format: executionPlan.format,
|
|
18062
18131
|
ffmpegVersion: executionPlan.ffmpegVersion,
|
|
18063
|
-
producerVersion: executionPlan.producerVersion
|
|
18132
|
+
producerVersion: executionPlan.producerVersion,
|
|
18133
|
+
...executionPlan.strictVariablesChecked === void 0 ? {} : { strictVariablesChecked: executionPlan.strictVariablesChecked }
|
|
18064
18134
|
};
|
|
18065
18135
|
}
|
|
18066
18136
|
|
|
18067
18137
|
// ../producer/src/services/distributed/renderChunk.ts
|
|
18068
18138
|
import { randomBytes } from "crypto";
|
|
18069
|
-
import { existsSync as
|
|
18139
|
+
import { existsSync as existsSync28, mkdirSync as mkdirSync17, readFileSync as readFileSync12, readdirSync as readdirSync11, rmSync as rmSync15, writeFileSync as writeFileSync12 } from "fs";
|
|
18070
18140
|
import { cpus as cpus3 } from "os";
|
|
18071
18141
|
import { join as join42 } from "path";
|
|
18072
18142
|
|
|
18073
18143
|
// ../producer/src/services/distributed/planV2.ts
|
|
18074
18144
|
import {
|
|
18075
18145
|
copyFileSync as copyFileSync6,
|
|
18076
|
-
existsSync as
|
|
18146
|
+
existsSync as existsSync27,
|
|
18077
18147
|
lstatSync as lstatSync3,
|
|
18078
18148
|
mkdirSync as mkdirSync16,
|
|
18079
18149
|
readFileSync as readFileSync11,
|
|
@@ -18088,7 +18158,7 @@ import { dirname as dirname15, isAbsolute as isAbsolute3, join as join41, relati
|
|
|
18088
18158
|
// ../producer/src/services/distributed/planV2Publisher.ts
|
|
18089
18159
|
import {
|
|
18090
18160
|
copyFileSync as copyFileSync5,
|
|
18091
|
-
existsSync as
|
|
18161
|
+
existsSync as existsSync26,
|
|
18092
18162
|
linkSync as linkSync2,
|
|
18093
18163
|
mkdirSync as mkdirSync15,
|
|
18094
18164
|
rmSync as rmSync13,
|
|
@@ -18155,7 +18225,7 @@ var LocalPlanV2ArtifactPublisher = class {
|
|
|
18155
18225
|
#linkFile;
|
|
18156
18226
|
#committed = false;
|
|
18157
18227
|
constructor(destinationDir, options = {}) {
|
|
18158
|
-
if (
|
|
18228
|
+
if (existsSync26(destinationDir)) {
|
|
18159
18229
|
throw new PlanV2IntegrityError(`output directory already exists: ${destinationDir}`);
|
|
18160
18230
|
}
|
|
18161
18231
|
this.destinationDir = destinationDir;
|
|
@@ -18172,7 +18242,7 @@ var LocalPlanV2ArtifactPublisher = class {
|
|
|
18172
18242
|
);
|
|
18173
18243
|
}
|
|
18174
18244
|
const destinationPath = planV2BlobPath(this.temporaryDir, digest);
|
|
18175
|
-
if (
|
|
18245
|
+
if (existsSync26(destinationPath)) return;
|
|
18176
18246
|
mkdirSync15(dirname14(destinationPath), { recursive: true });
|
|
18177
18247
|
const stagingDir = createStagingDir(dirname14(destinationPath), ".plan-v2-blob-");
|
|
18178
18248
|
const temporaryPath = join40(stagingDir, "blob");
|
|
@@ -18190,7 +18260,7 @@ var LocalPlanV2ArtifactPublisher = class {
|
|
|
18190
18260
|
}
|
|
18191
18261
|
async commitManifest(manifestBytes) {
|
|
18192
18262
|
for (const digest of new Set(manifestDigests(manifestBytes))) {
|
|
18193
|
-
if (!
|
|
18263
|
+
if (!existsSync26(planV2BlobPath(this.temporaryDir, digest))) {
|
|
18194
18264
|
throw new PlanV2IntegrityError(
|
|
18195
18265
|
`cannot commit manifest before referenced blob is durable: ${digest}`
|
|
18196
18266
|
);
|
|
@@ -18269,7 +18339,7 @@ function assertValidExtractionCacheCompleteSentinel(path) {
|
|
|
18269
18339
|
}
|
|
18270
18340
|
function validateExtractionCacheCompleteSentinels(executionPlanDir) {
|
|
18271
18341
|
const videoRoot = join41(executionPlanDir, "video-frames");
|
|
18272
|
-
if (!
|
|
18342
|
+
if (!existsSync27(videoRoot)) return;
|
|
18273
18343
|
for (const videoEntry of readdirSync10(videoRoot, { withFileTypes: true })) {
|
|
18274
18344
|
if (!videoEntry.isDirectory()) continue;
|
|
18275
18345
|
const videoDir = join41(videoRoot, videoEntry.name);
|
|
@@ -18370,7 +18440,7 @@ function parsePlanVideosJson2(value) {
|
|
|
18370
18440
|
}
|
|
18371
18441
|
function materializeExtractedVideoDirectories(planDir) {
|
|
18372
18442
|
const videosPath = join41(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
|
|
18373
|
-
if (!
|
|
18443
|
+
if (!existsSync27(videosPath)) return;
|
|
18374
18444
|
const videos = parsePlanVideosJson2(readJsonFile(videosPath, PLAN_VIDEOS_META_RELATIVE_PATH));
|
|
18375
18445
|
for (const video of videos.extracted) {
|
|
18376
18446
|
mkdirSync16(resolveExtractedVideoOutputDir(planDir, video.videoId), { recursive: true });
|
|
@@ -18404,9 +18474,9 @@ function parseChunkSlices(value) {
|
|
|
18404
18474
|
}
|
|
18405
18475
|
function buildVideoChunkDependencies(executionPlanDir, dimensions) {
|
|
18406
18476
|
const videoRoot = join41(executionPlanDir, "video-frames");
|
|
18407
|
-
const hasExtractedFrames =
|
|
18477
|
+
const hasExtractedFrames = existsSync27(videoRoot) && listFiles(videoRoot).length > 0;
|
|
18408
18478
|
const videosPath = join41(executionPlanDir, PLAN_VIDEOS_META_RELATIVE_PATH);
|
|
18409
|
-
if (!
|
|
18479
|
+
if (!existsSync27(videosPath)) {
|
|
18410
18480
|
return hasExtractedFrames ? { mode: "full-source-pack", dependencies: null } : { mode: "exact-rendered-frames", dependencies: /* @__PURE__ */ new Map() };
|
|
18411
18481
|
}
|
|
18412
18482
|
const chunksPath = join41(executionPlanDir, "meta", "chunks.json");
|
|
@@ -18463,7 +18533,7 @@ function computeManifestHash(manifest) {
|
|
|
18463
18533
|
return sha256Hex(`${PLAN_V2_HASH_PREFIX}${canonicalJsonStringify(manifestPayload(manifest))}`);
|
|
18464
18534
|
}
|
|
18465
18535
|
function writeBlob(sourcePath, destinationPath) {
|
|
18466
|
-
if (
|
|
18536
|
+
if (existsSync27(destinationPath)) return;
|
|
18467
18537
|
mkdirSync16(dirname15(destinationPath), { recursive: true });
|
|
18468
18538
|
const temporaryDir = createStagingDir(dirname15(destinationPath), ".plan-v2-blob-");
|
|
18469
18539
|
const temporaryPath = join41(temporaryDir, "blob");
|
|
@@ -18503,7 +18573,7 @@ async function putTasks(tasks) {
|
|
|
18503
18573
|
}
|
|
18504
18574
|
function buildPlanV2Publication(executionPlanDir, digests) {
|
|
18505
18575
|
const executionPlanPath = join41(executionPlanDir, "plan.json");
|
|
18506
|
-
if (!
|
|
18576
|
+
if (!existsSync27(executionPlanPath)) {
|
|
18507
18577
|
throw new PlanV2IntegrityError(`execution plan is missing plan.json: ${executionPlanPath}`);
|
|
18508
18578
|
}
|
|
18509
18579
|
const executionPlanValue = readJsonFile(executionPlanPath, "execution plan.json");
|
|
@@ -18583,7 +18653,7 @@ function buildPlanV2Publication(executionPlanDir, digests) {
|
|
|
18583
18653
|
};
|
|
18584
18654
|
}
|
|
18585
18655
|
function createPlanV2FromExecutionPlan(executionPlanDir, planV2Dir) {
|
|
18586
|
-
if (
|
|
18656
|
+
if (existsSync27(planV2Dir)) {
|
|
18587
18657
|
throw new PlanV2IntegrityError(`output directory already exists: ${planV2Dir}`);
|
|
18588
18658
|
}
|
|
18589
18659
|
const publication = buildPlanV2Publication(executionPlanDir);
|
|
@@ -18641,7 +18711,7 @@ async function planV2WithPublisher(projectDir, config, publisher, options = {})
|
|
|
18641
18711
|
const stagingRoot = createStagingDir(options.stagingParentDir ?? tmpdir3(), ".execution-plan-");
|
|
18642
18712
|
const digests = /* @__PURE__ */ new Map();
|
|
18643
18713
|
try {
|
|
18644
|
-
await buildLocalExecutionPlan(projectDir, config, stagingRoot, {
|
|
18714
|
+
const planned = await buildLocalExecutionPlan(projectDir, config, stagingRoot, {
|
|
18645
18715
|
executionPlanSizeLimitBytes: Number.MAX_SAFE_INTEGER,
|
|
18646
18716
|
deferVideoExtraction: true,
|
|
18647
18717
|
remoteFiles: options.remoteFiles,
|
|
@@ -18657,6 +18727,7 @@ async function planV2WithPublisher(projectDir, config, publisher, options = {})
|
|
|
18657
18727
|
sliceChunkAudio: true,
|
|
18658
18728
|
deferAudio: options.deferAudio
|
|
18659
18729
|
});
|
|
18730
|
+
options.onPlanned?.({ strictVariablesChecked: planned.strictVariablesChecked });
|
|
18660
18731
|
return await publishExecutionPlan(stagingRoot, publisher, { digests, log: config.logger });
|
|
18661
18732
|
} catch (error) {
|
|
18662
18733
|
try {
|
|
@@ -18669,7 +18740,7 @@ async function planV2WithPublisher(projectDir, config, publisher, options = {})
|
|
|
18669
18740
|
}
|
|
18670
18741
|
}
|
|
18671
18742
|
async function planV2(projectDir, config, planV2Dir) {
|
|
18672
|
-
if (
|
|
18743
|
+
if (existsSync27(planV2Dir)) {
|
|
18673
18744
|
throw new PlanV2IntegrityError(`output directory already exists: ${planV2Dir}`);
|
|
18674
18745
|
}
|
|
18675
18746
|
const publisher = new LocalPlanV2ArtifactPublisher(planV2Dir);
|
|
@@ -18823,7 +18894,7 @@ function parsePlanV2Manifest(value) {
|
|
|
18823
18894
|
}
|
|
18824
18895
|
function readPlanV2Manifest(planV2Dir) {
|
|
18825
18896
|
const manifestPath = join41(planV2Dir, "plan.json");
|
|
18826
|
-
if (!
|
|
18897
|
+
if (!existsSync27(manifestPath)) {
|
|
18827
18898
|
throw new PlanV2IntegrityError(`missing v2 manifest: ${manifestPath}`);
|
|
18828
18899
|
}
|
|
18829
18900
|
const value = readJsonFile(manifestPath, "v2 manifest");
|
|
@@ -18842,7 +18913,7 @@ function listPlanV2ArtifactsForTarget(manifest, target) {
|
|
|
18842
18913
|
}
|
|
18843
18914
|
function verifyBlob(planV2Dir, artifact) {
|
|
18844
18915
|
const sourcePath = planV2BlobPath(planV2Dir, artifact.sha256);
|
|
18845
|
-
if (!
|
|
18916
|
+
if (!existsSync27(sourcePath)) {
|
|
18846
18917
|
throw new PlanV2IntegrityError(`missing content-addressed artifact ${artifact.sha256}`);
|
|
18847
18918
|
}
|
|
18848
18919
|
const stats = statSync9(sourcePath);
|
|
@@ -18855,7 +18926,7 @@ function verifyBlob(planV2Dir, artifact) {
|
|
|
18855
18926
|
return sourcePath;
|
|
18856
18927
|
}
|
|
18857
18928
|
function materializePlanV2Target(planV2Dir, target, destinationDir, options = {}) {
|
|
18858
|
-
if (
|
|
18929
|
+
if (existsSync27(destinationDir)) {
|
|
18859
18930
|
throw new PlanV2IntegrityError(`materialization destination already exists: ${destinationDir}`);
|
|
18860
18931
|
}
|
|
18861
18932
|
const manifest = readPlanV2Manifest(planV2Dir);
|
|
@@ -18920,7 +18991,7 @@ function validatePlanV2MaterializedTarget(planDir, expectedTarget) {
|
|
|
18920
18991
|
}
|
|
18921
18992
|
function readValidatedPlanV2Materialization(planDir, expectedTarget) {
|
|
18922
18993
|
const markerPath = join41(planDir, PLAN_V2_MATERIALIZATION_MARKER);
|
|
18923
|
-
if (!
|
|
18994
|
+
if (!existsSync27(markerPath)) return null;
|
|
18924
18995
|
const marker = readJsonFile(markerPath, "materialization marker");
|
|
18925
18996
|
if (!isRecord3(marker) || !isRecord3(marker.manifest) || !isRecord3(marker.target)) {
|
|
18926
18997
|
throw new PlanV2IntegrityError("malformed materialization marker");
|
|
@@ -18938,7 +19009,7 @@ function readValidatedPlanV2Materialization(planDir, expectedTarget) {
|
|
|
18938
19009
|
for (const artifact of required) {
|
|
18939
19010
|
if (Object.hasOwn(remoteSources, artifact.path)) continue;
|
|
18940
19011
|
const path = join41(planDir, ...artifact.path.split("/"));
|
|
18941
|
-
if (!
|
|
19012
|
+
if (!existsSync27(path) || statSync9(path).size !== artifact.sizeBytes) {
|
|
18942
19013
|
throw new PlanV2IntegrityError(
|
|
18943
19014
|
`materialized artifact missing or truncated: ${artifact.path}`
|
|
18944
19015
|
);
|
|
@@ -19088,7 +19159,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19088
19159
|
const planJsonPath = join42(planDir, "plan.json");
|
|
19089
19160
|
const encoderJsonPath = join42(planDir, "meta", "encoder.json");
|
|
19090
19161
|
const chunksJsonPath = join42(planDir, "meta", "chunks.json");
|
|
19091
|
-
if (!
|
|
19162
|
+
if (!existsSync28(planJsonPath)) {
|
|
19092
19163
|
throw new RenderChunkValidationError(
|
|
19093
19164
|
MISSING_PLAN_ARTIFACT,
|
|
19094
19165
|
`[renderChunk] planDir is missing required artifact: ${planJsonPath}`
|
|
@@ -19104,7 +19175,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19104
19175
|
const v2Manifest = v2Materialization?.manifest ?? null;
|
|
19105
19176
|
const remoteSources = v2Materialization?.remoteSources ?? {};
|
|
19106
19177
|
for (const required of [encoderJsonPath, chunksJsonPath]) {
|
|
19107
|
-
if (!
|
|
19178
|
+
if (!existsSync28(required)) {
|
|
19108
19179
|
throw new RenderChunkValidationError(
|
|
19109
19180
|
MISSING_PLAN_ARTIFACT,
|
|
19110
19181
|
`[renderChunk] planDir is missing required artifact: ${required}`
|
|
@@ -19115,7 +19186,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19115
19186
|
const chunks = JSON.parse(readFileSync12(chunksJsonPath, "utf-8"));
|
|
19116
19187
|
const videosJsonPath = join42(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
|
|
19117
19188
|
let planVideos = null;
|
|
19118
|
-
if (
|
|
19189
|
+
if (existsSync28(videosJsonPath)) {
|
|
19119
19190
|
try {
|
|
19120
19191
|
planVideos = validatePlanVideosForChunk(JSON.parse(readFileSync12(videosJsonPath, "utf-8")));
|
|
19121
19192
|
} catch (err) {
|
|
@@ -19146,7 +19217,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19146
19217
|
const range = resolveChunkFrameRange(slice, chunkIndex, options?.frameRange);
|
|
19147
19218
|
const framesInChunk = range.endFrame - range.startFrame;
|
|
19148
19219
|
const compiledDir = join42(planDir, "compiled");
|
|
19149
|
-
if (!
|
|
19220
|
+
if (!existsSync28(compiledDir)) {
|
|
19150
19221
|
throw new RenderChunkValidationError(
|
|
19151
19222
|
MISSING_PLAN_ARTIFACT,
|
|
19152
19223
|
`[renderChunk] planDir missing compiled/ directory: ${compiledDir}`
|
|
@@ -19238,6 +19309,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19238
19309
|
deferredVideos.filter((video) => remoteVideoIds.has(video.videoId))
|
|
19239
19310
|
)
|
|
19240
19311
|
});
|
|
19312
|
+
captureOptions.onStaticDedupActivity = () => noteStaticDedupActivity(job);
|
|
19241
19313
|
const captureFrames = effectiveChunkFrames(framesInChunk, slice.captureCost);
|
|
19242
19314
|
const chunkWorkerCount = resolveChunkCaptureWorkers(
|
|
19243
19315
|
captureFrames,
|
|
@@ -19397,10 +19469,10 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19397
19469
|
const effectiveBitrate = encoder.crf != null ? void 0 : encoder.bitrate;
|
|
19398
19470
|
const videoOnlyPath = encoder.chunksCarryAudio ? `${outputChunkPath}.video.mp4` : outputChunkPath;
|
|
19399
19471
|
if (isPngSequence) {
|
|
19400
|
-
if (!
|
|
19472
|
+
if (!existsSync28(outputChunkPath)) mkdirSync17(outputChunkPath, { recursive: true });
|
|
19401
19473
|
} else {
|
|
19402
19474
|
const outDir = join42(outputChunkPath, "..");
|
|
19403
|
-
if (!
|
|
19475
|
+
if (!existsSync28(outDir)) mkdirSync17(outDir, { recursive: true });
|
|
19404
19476
|
}
|
|
19405
19477
|
const encodeInput = {
|
|
19406
19478
|
job,
|
|
@@ -19730,7 +19802,8 @@ var SAFE_RENDER_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
|
19730
19802
|
"ENCODER_INTERRUPTED",
|
|
19731
19803
|
"RENDER_TOO_SLOW",
|
|
19732
19804
|
"RENDER_STAGE_STALLED",
|
|
19733
|
-
"PAGE_NEVER_READY"
|
|
19805
|
+
"PAGE_NEVER_READY",
|
|
19806
|
+
"VARIABLES_INVALID"
|
|
19734
19807
|
]);
|
|
19735
19808
|
function extractSafeRenderErrorCode(error) {
|
|
19736
19809
|
if (typeof error !== "object" || error === null || !("code" in error)) return void 0;
|
|
@@ -19931,6 +20004,9 @@ function validateDistributedRenderConfig(config) {
|
|
|
19931
20004
|
if (config.variables !== void 0) {
|
|
19932
20005
|
validateVariablesPayload(config.variables);
|
|
19933
20006
|
}
|
|
20007
|
+
if (config.strictVariables !== void 0 && typeof config.strictVariables !== "boolean") {
|
|
20008
|
+
throw new InvalidConfigError("config.strictVariables", "must be a boolean");
|
|
20009
|
+
}
|
|
19934
20010
|
if (config.engineConfig !== void 0) {
|
|
19935
20011
|
try {
|
|
19936
20012
|
validateEngineConfigSnapshot(config.engineConfig);
|
|
@@ -20125,6 +20201,9 @@ function assertRequestOptionObjects(options) {
|
|
|
20125
20201
|
if (options.variables !== void 0 && !isPlainObject(options.variables)) {
|
|
20126
20202
|
throw new Error("Render request variables must be a JSON object");
|
|
20127
20203
|
}
|
|
20204
|
+
if (options.strictVariables !== void 0 && typeof options.strictVariables !== "boolean") {
|
|
20205
|
+
throw new Error("Render request strictVariables must be a boolean");
|
|
20206
|
+
}
|
|
20128
20207
|
if (options.distributed !== void 0) assertDistributedOptions(options.distributed);
|
|
20129
20208
|
}
|
|
20130
20209
|
function assertRequestOptions(options) {
|
|
@@ -20237,7 +20316,8 @@ function distributedConfigFromRequest(request, runtime = {}) {
|
|
|
20237
20316
|
strictness: options.strictness,
|
|
20238
20317
|
abortSignal: runtime.abortSignal,
|
|
20239
20318
|
planDirSizeLimitBytes: distributed.planDirSizeLimitBytes,
|
|
20240
|
-
variables: options.variables
|
|
20319
|
+
variables: options.variables,
|
|
20320
|
+
strictVariables: options.strictVariables
|
|
20241
20321
|
};
|
|
20242
20322
|
}
|
|
20243
20323
|
function optionalProperty(key, value) {
|
|
@@ -20278,7 +20358,8 @@ function renderRequestFromDistributedConfig(input) {
|
|
|
20278
20358
|
...optionalProperty("hdrMode", config.hdrMode),
|
|
20279
20359
|
...optionalProperty("strictness", config.strictness),
|
|
20280
20360
|
...optionalProperty("entryFile", config.entryFile),
|
|
20281
|
-
...optionalProperty("variables", config.variables)
|
|
20361
|
+
...optionalProperty("variables", config.variables),
|
|
20362
|
+
...optionalProperty("strictVariables", config.strictVariables)
|
|
20282
20363
|
};
|
|
20283
20364
|
return createRenderRequest({
|
|
20284
20365
|
projectDir: input.projectDir,
|
|
@@ -20290,7 +20371,7 @@ function renderRequestFromDistributedConfig(input) {
|
|
|
20290
20371
|
|
|
20291
20372
|
// ../producer/src/server.ts
|
|
20292
20373
|
import {
|
|
20293
|
-
existsSync as
|
|
20374
|
+
existsSync as existsSync31,
|
|
20294
20375
|
mkdirSync as mkdirSync19,
|
|
20295
20376
|
statSync as statSync11,
|
|
20296
20377
|
mkdtempSync as mkdtempSync2,
|
|
@@ -20308,7 +20389,7 @@ import { serve as serve2 } from "@hono/node-server";
|
|
|
20308
20389
|
|
|
20309
20390
|
// ../producer/src/services/hyperframeLint.ts
|
|
20310
20391
|
import {
|
|
20311
|
-
existsSync as
|
|
20392
|
+
existsSync as existsSync29,
|
|
20312
20393
|
readFileSync as readFileSync14,
|
|
20313
20394
|
statSync as statSync10,
|
|
20314
20395
|
openSync as openSync6,
|
|
@@ -20361,7 +20442,7 @@ function readEntryHtml(filePath) {
|
|
|
20361
20442
|
}
|
|
20362
20443
|
function readProjectEntryFile(projectDir, preferredEntryFile) {
|
|
20363
20444
|
const absProjectDir = resolve9(projectDir);
|
|
20364
|
-
if (!
|
|
20445
|
+
if (!existsSync29(absProjectDir) || !statSync10(absProjectDir).isDirectory()) {
|
|
20365
20446
|
return { error: `Project directory not found: ${absProjectDir}` };
|
|
20366
20447
|
}
|
|
20367
20448
|
const entryCandidates = [preferredEntryFile, "index.html", "src/index.html"].filter(
|
|
@@ -20430,7 +20511,7 @@ async function runHyperframeLint(prepared) {
|
|
|
20430
20511
|
import { Worker as Worker2 } from "worker_threads";
|
|
20431
20512
|
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
20432
20513
|
import { dirname as dirname16, join as join45 } from "path";
|
|
20433
|
-
import { existsSync as
|
|
20514
|
+
import { existsSync as existsSync30 } from "fs";
|
|
20434
20515
|
var DEFAULT_HEALTH_PORT = 9848;
|
|
20435
20516
|
async function startHealthWorker(options = {}) {
|
|
20436
20517
|
const log = options.logger ?? defaultLogger2();
|
|
@@ -20507,7 +20588,7 @@ function resolveWorkerEntry2() {
|
|
|
20507
20588
|
const here = dirname16(fileURLToPath6(import.meta.url));
|
|
20508
20589
|
const candidates = [join45(here, "healthWorkerThread.js"), join45(here, "healthWorkerThread.ts")];
|
|
20509
20590
|
for (const candidate of candidates) {
|
|
20510
|
-
if (
|
|
20591
|
+
if (existsSync30(candidate)) return candidate;
|
|
20511
20592
|
}
|
|
20512
20593
|
return void 0;
|
|
20513
20594
|
}
|
|
@@ -20528,6 +20609,9 @@ function extractSafeRenderErrorMetadata(error) {
|
|
|
20528
20609
|
...isPlainObject2(publicMetadata) ? { errorMetadata: publicMetadata } : {}
|
|
20529
20610
|
};
|
|
20530
20611
|
}
|
|
20612
|
+
function strictVariablesResult(job) {
|
|
20613
|
+
return job.strictVariablesChecked === void 0 ? {} : { strictVariablesChecked: job.strictVariablesChecked };
|
|
20614
|
+
}
|
|
20531
20615
|
function parseServerFps(value) {
|
|
20532
20616
|
if (typeof value !== "number" && typeof value !== "string") return DEFAULT_SERVER_FPS;
|
|
20533
20617
|
const parsed = parseFps(value);
|
|
@@ -20586,7 +20670,7 @@ function parseRenderOptions(body) {
|
|
|
20586
20670
|
bufferSize,
|
|
20587
20671
|
chromaSubsampling
|
|
20588
20672
|
} = encoder.ok ? encoder.options : {};
|
|
20589
|
-
const { variables, outputResolution, outputResolutionAspectAgnostic } = parseRenderOverrides(body);
|
|
20673
|
+
const { variables, strictVariables, outputResolution, outputResolutionAspectAgnostic } = parseRenderOverrides(body);
|
|
20590
20674
|
return {
|
|
20591
20675
|
outputPath,
|
|
20592
20676
|
fps,
|
|
@@ -20607,6 +20691,7 @@ function parseRenderOptions(body) {
|
|
|
20607
20691
|
format,
|
|
20608
20692
|
outputDynamicRange,
|
|
20609
20693
|
variables,
|
|
20694
|
+
strictVariables,
|
|
20610
20695
|
outputResolution,
|
|
20611
20696
|
outputResolutionAspectAgnostic,
|
|
20612
20697
|
videoFrameFormat
|
|
@@ -20617,10 +20702,11 @@ function isPlainObject2(value) {
|
|
|
20617
20702
|
}
|
|
20618
20703
|
function parseRenderOverrides(body) {
|
|
20619
20704
|
const variables = isPlainObject2(body.variables) ? body.variables : void 0;
|
|
20705
|
+
const strictVariables = body.strictVariables === true ? true : void 0;
|
|
20620
20706
|
const rawOutputResolution = typeof body.outputResolution === "string" ? body.outputResolution : void 0;
|
|
20621
20707
|
const outputResolution = rawOutputResolution ? normalizeResolutionFlag(rawOutputResolution) : void 0;
|
|
20622
20708
|
const outputResolutionAspectAgnostic = outputResolution ? isAspectAgnosticResolutionAlias(rawOutputResolution) : void 0;
|
|
20623
|
-
return { variables, outputResolution, outputResolutionAspectAgnostic };
|
|
20709
|
+
return { variables, strictVariables, outputResolution, outputResolutionAspectAgnostic };
|
|
20624
20710
|
}
|
|
20625
20711
|
function buildRenderJobConfig(input, outputPath, log) {
|
|
20626
20712
|
const request = createRenderRequest({
|
|
@@ -20644,6 +20730,7 @@ function buildRenderJobConfig(input, outputPath, log) {
|
|
|
20644
20730
|
strictness: input.strictness,
|
|
20645
20731
|
entryFile: input.entryFile,
|
|
20646
20732
|
variables: input.variables,
|
|
20733
|
+
strictVariables: input.strictVariables,
|
|
20647
20734
|
outputResolution: input.outputResolution,
|
|
20648
20735
|
outputResolutionAspectAgnostic: input.outputResolutionAspectAgnostic,
|
|
20649
20736
|
videoFrameFormat: input.videoFrameFormat,
|
|
@@ -20657,7 +20744,7 @@ function resolvePreparedRenderOutput(prepared, rendersDir, log) {
|
|
|
20657
20744
|
const { input, cleanupProjectDir } = prepared;
|
|
20658
20745
|
const absoluteOutputPath = resolveOutputPath(input.projectDir, input.outputPath, rendersDir, log);
|
|
20659
20746
|
const outputDir = dirname17(absoluteOutputPath);
|
|
20660
|
-
if (!
|
|
20747
|
+
if (!existsSync31(outputDir)) mkdirSync19(outputDir, { recursive: true });
|
|
20661
20748
|
return { input, cleanupProjectDir, absoluteOutputPath };
|
|
20662
20749
|
}
|
|
20663
20750
|
function prepareRenderJob(prepared, rendersDir, log) {
|
|
@@ -20682,6 +20769,9 @@ function validateRenderOverrides(body) {
|
|
|
20682
20769
|
if (body.variables !== void 0 && !isPlainObject2(body.variables)) {
|
|
20683
20770
|
return 'variables must be a JSON object keyed by variable id (e.g. {"title":"Hello"})';
|
|
20684
20771
|
}
|
|
20772
|
+
if (body.strictVariables !== void 0 && typeof body.strictVariables !== "boolean") {
|
|
20773
|
+
return "strictVariables must be a boolean";
|
|
20774
|
+
}
|
|
20685
20775
|
if (body.outputDynamicRange !== void 0 && parseServerOutputDynamicRange(body.outputDynamicRange) === void 0) {
|
|
20686
20776
|
return 'outputDynamicRange must be one of: "auto", "hdr", "sdr"';
|
|
20687
20777
|
}
|
|
@@ -20714,11 +20804,11 @@ function prepareProjectDirectory(projectDir, options) {
|
|
|
20714
20804
|
const candidate = nonEmptyString(projectDir);
|
|
20715
20805
|
if (!candidate) return null;
|
|
20716
20806
|
const absProjectDir = resolve10(candidate);
|
|
20717
|
-
if (!
|
|
20807
|
+
if (!existsSync31(absProjectDir) || !statSync11(absProjectDir).isDirectory()) {
|
|
20718
20808
|
return { error: `Project directory not found: ${absProjectDir}` };
|
|
20719
20809
|
}
|
|
20720
20810
|
const entry = options.entryFile || "index.html";
|
|
20721
|
-
if (!
|
|
20811
|
+
if (!existsSync31(resolve10(absProjectDir, entry))) {
|
|
20722
20812
|
return { error: `Entry file "${entry}" not found in project directory: ${absProjectDir}` };
|
|
20723
20813
|
}
|
|
20724
20814
|
return { prepared: { input: { projectDir: absProjectDir, ...options } } };
|
|
@@ -20810,7 +20900,7 @@ function cleanupTempDir(dir, log) {
|
|
|
20810
20900
|
}
|
|
20811
20901
|
}
|
|
20812
20902
|
function outputFileSize(path) {
|
|
20813
|
-
return
|
|
20903
|
+
return existsSync31(path) ? statSync11(path).size : 0;
|
|
20814
20904
|
}
|
|
20815
20905
|
function createBlockingProgressReporter(log, requestId) {
|
|
20816
20906
|
let lastLoggedPct = -10;
|
|
@@ -21000,7 +21090,8 @@ function createRenderHandlers(options = {}) {
|
|
|
21000
21090
|
videoDurationSeconds: job.duration ?? null,
|
|
21001
21091
|
outcome: job.outcome ?? "completed",
|
|
21002
21092
|
warnings: job.warnings,
|
|
21003
|
-
perf: job.perfSummary ?? null
|
|
21093
|
+
perf: job.perfSummary ?? null,
|
|
21094
|
+
...strictVariablesResult(job)
|
|
21004
21095
|
});
|
|
21005
21096
|
} catch (error) {
|
|
21006
21097
|
const durationMs = Date.now() - t0;
|
|
@@ -21096,7 +21187,8 @@ function createRenderHandlers(options = {}) {
|
|
|
21096
21187
|
outcome: job.outcome ?? "completed",
|
|
21097
21188
|
warnings: job.warnings,
|
|
21098
21189
|
perf: job.perfSummary ?? null,
|
|
21099
|
-
producerVersion: readProducerVersion()
|
|
21190
|
+
producerVersion: readProducerVersion(),
|
|
21191
|
+
...strictVariablesResult(job)
|
|
21100
21192
|
})
|
|
21101
21193
|
});
|
|
21102
21194
|
} catch (error) {
|
|
@@ -21121,7 +21213,7 @@ function createRenderHandlers(options = {}) {
|
|
|
21121
21213
|
if (!artifact) {
|
|
21122
21214
|
return c.json({ success: false, error: "Output artifact not found or expired" }, 404);
|
|
21123
21215
|
}
|
|
21124
|
-
if (!
|
|
21216
|
+
if (!existsSync31(artifact.path)) {
|
|
21125
21217
|
store.delete(token);
|
|
21126
21218
|
return c.json({ success: false, error: "Output artifact file missing" }, 404);
|
|
21127
21219
|
}
|
|
@@ -21185,7 +21277,7 @@ function startServer(options = {}) {
|
|
|
21185
21277
|
});
|
|
21186
21278
|
async function shutdown(signal) {
|
|
21187
21279
|
log.info(`Received ${signal}, shutting down`);
|
|
21188
|
-
const { drainBrowserPool } = await import("./src-
|
|
21280
|
+
const { drainBrowserPool } = await import("./src-26DWEOAT.js");
|
|
21189
21281
|
await drainBrowserPool().catch(() => {
|
|
21190
21282
|
});
|
|
21191
21283
|
const handle = await Promise.race([
|
|
@@ -21228,7 +21320,7 @@ import { join as join48 } from "path";
|
|
|
21228
21320
|
// ../producer/src/services/distributed/assemble.ts
|
|
21229
21321
|
import {
|
|
21230
21322
|
cpSync as cpSync3,
|
|
21231
|
-
existsSync as
|
|
21323
|
+
existsSync as existsSync32,
|
|
21232
21324
|
mkdirSync as mkdirSync20,
|
|
21233
21325
|
readFileSync as readFileSync15,
|
|
21234
21326
|
readdirSync as readdirSync12,
|
|
@@ -21269,7 +21361,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
21269
21361
|
}
|
|
21270
21362
|
const format = plan2.dimensions.format;
|
|
21271
21363
|
const cfrEncoder = cfr ? readCfrEncoder(planDir, format) : null;
|
|
21272
|
-
if (!
|
|
21364
|
+
if (!existsSync32(dirname18(outputPath))) {
|
|
21273
21365
|
mkdirSync20(dirname18(outputPath), { recursive: true });
|
|
21274
21366
|
}
|
|
21275
21367
|
const workDir = createStagingDir(dirname18(outputPath), `${basename8(outputPath)}.assemble-work-`);
|
|
@@ -21293,7 +21385,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
21293
21385
|
try {
|
|
21294
21386
|
const videoSources = cfrEncoder ? [await reencodeCfr(ctx, chunkPaths, cfrEncoder)] : chunkPaths;
|
|
21295
21387
|
const finalPath = join47(workDir, `output.${format}`);
|
|
21296
|
-
const audio = audioPath !== null &&
|
|
21388
|
+
const audio = audioPath !== null && existsSync32(audioPath) ? audioPath : null;
|
|
21297
21389
|
await writeJoined(ctx, videoSources, audio, finalPath);
|
|
21298
21390
|
renameWithRetry(finalPath, outputPath);
|
|
21299
21391
|
log.info("[assemble] stage timings", {
|
|
@@ -21311,7 +21403,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
21311
21403
|
});
|
|
21312
21404
|
}
|
|
21313
21405
|
}
|
|
21314
|
-
const fileSize =
|
|
21406
|
+
const fileSize = existsSync32(outputPath) ? statSync12(outputPath).size : 0;
|
|
21315
21407
|
return {
|
|
21316
21408
|
...referenceBackgroundResult(plan2[REFERENCE_BACKGROUND_FIELD]),
|
|
21317
21409
|
outputPath,
|
|
@@ -21323,13 +21415,13 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
21323
21415
|
function readAssemblePlan(planDir, chunkPaths) {
|
|
21324
21416
|
const planJsonPath = join47(planDir, "plan.json");
|
|
21325
21417
|
const chunksJsonPath = join47(planDir, "meta", "chunks.json");
|
|
21326
|
-
if (!
|
|
21418
|
+
if (!existsSync32(planJsonPath)) {
|
|
21327
21419
|
throw new Error(`[assemble] planDir missing plan.json: ${planJsonPath}`);
|
|
21328
21420
|
}
|
|
21329
21421
|
const plan2 = JSON.parse(readFileSync15(planJsonPath, "utf-8"));
|
|
21330
21422
|
readPlanProtocolV1(plan2, DISTRIBUTED_RENDER_CAPABILITIES.roles.assembler);
|
|
21331
21423
|
validatePlanV2MaterializedTarget(planDir, { role: "assembler" });
|
|
21332
|
-
if (!
|
|
21424
|
+
if (!existsSync32(chunksJsonPath)) {
|
|
21333
21425
|
throw new Error(`[assemble] planDir missing meta/chunks.json: ${chunksJsonPath}`);
|
|
21334
21426
|
}
|
|
21335
21427
|
const chunks = JSON.parse(readFileSync15(chunksJsonPath, "utf-8"));
|
|
@@ -21344,7 +21436,7 @@ function readAssemblePlan(planDir, chunkPaths) {
|
|
|
21344
21436
|
}
|
|
21345
21437
|
}
|
|
21346
21438
|
for (const path of chunkPaths.flat()) {
|
|
21347
|
-
if (!
|
|
21439
|
+
if (!existsSync32(path)) {
|
|
21348
21440
|
throw new Error(`[assemble] chunk path does not exist: ${path}`);
|
|
21349
21441
|
}
|
|
21350
21442
|
}
|
|
@@ -21483,7 +21575,7 @@ function planFormat(planDir) {
|
|
|
21483
21575
|
}
|
|
21484
21576
|
function lockedAudio(planDir) {
|
|
21485
21577
|
const encoderJsonPath = join47(planDir, "meta", "encoder.json");
|
|
21486
|
-
if (!
|
|
21578
|
+
if (!existsSync32(encoderJsonPath)) return {};
|
|
21487
21579
|
return JSON.parse(readFileSync15(encoderJsonPath, "utf-8"));
|
|
21488
21580
|
}
|
|
21489
21581
|
function readCfrEncoder(planDir, format) {
|
|
@@ -21493,7 +21585,7 @@ function readCfrEncoder(planDir, format) {
|
|
|
21493
21585
|
);
|
|
21494
21586
|
}
|
|
21495
21587
|
const encoderJsonPath = join47(planDir, "meta", "encoder.json");
|
|
21496
|
-
if (!
|
|
21588
|
+
if (!existsSync32(encoderJsonPath)) {
|
|
21497
21589
|
throw new Error(`[assemble] planDir missing meta/encoder.json: ${encoderJsonPath}`);
|
|
21498
21590
|
}
|
|
21499
21591
|
const encoderJson = JSON.parse(readFileSync15(encoderJsonPath, "utf-8"));
|
|
@@ -21505,7 +21597,7 @@ function readCfrEncoder(planDir, format) {
|
|
|
21505
21597
|
return encoderJson;
|
|
21506
21598
|
}
|
|
21507
21599
|
function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, startTimeMs) {
|
|
21508
|
-
if (
|
|
21600
|
+
if (existsSync32(outputPath)) rmSync18(outputPath, { recursive: true, force: true });
|
|
21509
21601
|
mkdirSync20(outputPath, { recursive: true });
|
|
21510
21602
|
let globalIdx = 0;
|
|
21511
21603
|
for (const chunkDir of chunkPaths) {
|
|
@@ -21529,7 +21621,7 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
|
|
|
21529
21621
|
`[assemble] png-sequence frame count mismatch: merged ${globalIdx} frames vs plan.totalFrames=${totalFrames}. Using on-disk count.`
|
|
21530
21622
|
);
|
|
21531
21623
|
}
|
|
21532
|
-
if (audioPath !== null &&
|
|
21624
|
+
if (audioPath !== null && existsSync32(audioPath)) {
|
|
21533
21625
|
const sidecar = join47(outputPath, MIXED_AUDIO_FILENAME);
|
|
21534
21626
|
cpSync3(audioPath, sidecar);
|
|
21535
21627
|
}
|