hyperframes 0.9.15 → 0.9.16
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/README.md +9 -0
- package/dist/{add-S3QTEUUZ.js → add-GEGI5ERI.js} +15 -14
- package/dist/{agentPromptGenerator-7FNPHUHJ.js → agentPromptGenerator-VV7UQDGL.js} +7 -8
- package/dist/{animatedGifPrep-NFT2NCNX.js → animatedGifPrep-JTPCKJ44.js} +7 -8
- package/dist/api.js +36 -36
- package/dist/{appHistory-BCWH6XYH.js → appHistory-WXJ4STHX.js} +2 -1
- package/dist/{asset-2BBOP7JZ.js → asset-ZTXZ6HGB.js} +2 -2
- package/dist/{assetCataloger-IY3XEIOP.js → assetCataloger-ATGUE5IY.js} +9 -10
- package/dist/{audio-QJUSICGQ.js → audio-5SBZBNSP.js} +19 -19
- package/dist/{auth-VDFPA4VH.js → auth-NDUIJ4HS.js} +4 -4
- package/dist/{autoUpdate-XUQK5WGH.js → autoUpdate-PZTBUAA5.js} +25 -16
- package/dist/{avatars-KCRRY6FB.js → avatars-YY7FU76E.js} +16 -16
- package/dist/{backgroundChecks-QAR4J3EA.js → backgroundChecks-6KERI5QL.js} +5 -4
- package/dist/backgroundChecksWorker.js +5 -4
- package/dist/{batchRender-IHSCRPWL.js → batchRender-L3IIY2FT.js} +5 -4
- package/dist/{beats-KHLBORQV.js → beats-UBUJBSVD.js} +11 -11
- package/dist/{benchmark-7OK27YVS.js → benchmark-YJ2U5KE3.js} +11 -11
- package/dist/{billing-CZWTUT4T.js → billing-YN35KTEH.js} +79 -36
- package/dist/{browser-R4ZG7RVY.js → browser-NRDSXRX7.js} +8 -7
- package/dist/{bundleWithLocalizedFonts-F3TAMJ2J.js → bundleWithLocalizedFonts-5T25BRZU.js} +1 -1
- package/dist/{capture-2TL7VL2K.js → capture-7K7VWXBQ.js} +17 -18
- package/dist/{capture-LRBDPPKP.js → capture-MP46JHB7.js} +3 -3
- package/dist/{captureCompositionFrame-2XH2Z4RY.js → captureCompositionFrame-4VZCJGGD.js} +13 -14
- package/dist/{catalog-PTVMH3GV.js → catalog-32CQF7IT.js} +23 -21
- package/dist/{catch-up-WRIIXOZE.js → catch-up-IVBUCPZM.js} +9 -7
- package/dist/{check-XHB7IC3B.js → check-U5PPKHG5.js} +43 -43
- package/dist/{checkAudio-LETXIMCO.js → checkAudio-ZCRRON4E.js} +10 -11
- package/dist/{checkBrowser-YHD3NILB.js → checkBrowser-MS5NKDXR.js} +36 -36
- package/dist/{chunk-DCLZEI2C.js → chunk-344RFO72.js} +2 -2
- package/dist/{chunk-US4BCRYB.js → chunk-3L2POG2J.js} +23 -1
- package/dist/{chunk-SUFHFBNO.js → chunk-4ECLIUTB.js} +2 -2
- package/dist/{chunk-HCTHKNMZ.js → chunk-4FHTWYDZ.js} +1 -1
- package/dist/{chunk-RLPTQF5E.js → chunk-5IVECOVN.js} +2 -2
- package/dist/{chunk-4W5NIHYU.js → chunk-5L2CII4L.js} +1 -1
- package/dist/{chunk-OO6AETRF.js → chunk-65XOIIBM.js} +1 -1
- package/dist/{chunk-D3B76FBE.js → chunk-6H5KN7CJ.js} +5 -5
- package/dist/{chunk-EWAPC74T.js → chunk-6H5NILM5.js} +1 -1
- package/dist/{chunk-76AJS2LI.js → chunk-6M3TQUDF.js} +9 -3
- package/dist/{chunk-X5FSMQEJ.js → chunk-6RPKPL22.js} +1 -1
- package/dist/{chunk-76GLTXI5.js → chunk-72PVZ2A4.js} +2 -2
- package/dist/{chunk-AVOYOW2Y.js → chunk-75PTCQAO.js} +1 -1
- package/dist/{chunk-7YCF2F5M.js → chunk-77E2UIIR.js} +1 -1
- package/dist/{chunk-G4L4JU4I.js → chunk-A4OX3TI6.js} +2 -2
- package/dist/{chunk-LQ74BSBR.js → chunk-AD2T3VAJ.js} +2 -2
- package/dist/{chunk-BRHSN2TH.js → chunk-AGQNRDYJ.js} +2 -2
- package/dist/{chunk-CIWX5UKC.js → chunk-ALQAHCK5.js} +14 -5
- package/dist/{chunk-UWZ2OIWM.js → chunk-AZO2YY3U.js} +1 -1
- package/dist/{chunk-XD7LQWTU.js → chunk-B2W2CPXF.js} +2 -2
- package/dist/{chunk-G7XKDDWE.js → chunk-BB5CZTGW.js} +1 -1
- package/dist/{chunk-W7ITBVJE.js → chunk-BJAESOYP.js} +12 -9
- package/dist/{chunk-N4KVW3ZI.js → chunk-BSPE37DP.js} +4 -4
- package/dist/{chunk-IVIVAE6U.js → chunk-CAD6G75K.js} +2 -2
- package/dist/{chunk-CKEOCCMK.js → chunk-CMQZP52Y.js} +22 -18
- package/dist/{chunk-3CHUQRFX.js → chunk-DM7WRHB5.js} +1 -1
- package/dist/{chunk-MRJRAAB2.js → chunk-DV7RLE6B.js} +3 -3
- package/dist/{chunk-EOCFNE53.js → chunk-ENVFGBRD.js} +1 -1
- package/dist/chunk-EXA6R6SW.js +24 -0
- package/dist/{chunk-MB2NPHAS.js → chunk-G4OGVFUJ.js} +1 -1
- package/dist/{chunk-3YIOLQ2Y.js → chunk-G54QPS3F.js} +5 -5
- package/dist/{chunk-P77AJDIN.js → chunk-GGSTJZQL.js} +3 -3
- package/dist/{chunk-XQ26I3PL.js → chunk-GKLZMLX3.js} +4 -2
- package/dist/chunk-GR2E54E6.js +31 -0
- package/dist/{chunk-6CXFFUL5.js → chunk-HK4AN44J.js} +2 -2
- package/dist/{chunk-DJTC4NK7.js → chunk-IR3JMMFT.js} +55 -4
- package/dist/{chunk-7WAEV3OM.js → chunk-IX5QY54Q.js} +2 -2
- package/dist/{chunk-XWFPP6LC.js → chunk-J2I2LTJM.js} +2 -2
- package/dist/chunk-J3G5KEPY.js +5035 -0
- package/dist/{chunk-BY7PZB6H.js → chunk-J3QW55W5.js} +2 -2
- package/dist/{chunk-TRA75UKG.js → chunk-JCIPZMKD.js} +3 -3
- package/dist/{chunk-CZ5NNJ6H.js → chunk-JFUXZERX.js} +2 -2
- package/dist/{chunk-766MOTIZ.js → chunk-JOQR4AP6.js} +5 -1
- package/dist/{chunk-FBQKUBMD.js → chunk-JPODNK2G.js} +2 -2
- package/dist/{chunk-AWV4F5TS.js → chunk-JWCMOC7O.js} +3 -3
- package/dist/{chunk-HQOJ5ZBI.js → chunk-K2JGJUMR.js} +3 -3
- package/dist/{chunk-RL5VZ4Y2.js → chunk-KWORPYKW.js} +1 -1
- package/dist/{chunk-ZFZXGZTX.js → chunk-L24NAUBS.js} +1 -1
- package/dist/{chunk-5G5YR4P3.js → chunk-L4ZMCB52.js} +29 -18
- package/dist/{chunk-WM7JSUK2.js → chunk-L6X4ONBM.js} +7 -7
- package/dist/{chunk-6KQHLLKI.js → chunk-LHRQP7TF.js} +7 -7
- package/dist/{chunk-72K35GRP.js → chunk-LIUJRACZ.js} +1 -1
- package/dist/{chunk-OWZAG6N4.js → chunk-LOKTVSTM.js} +1 -1
- package/dist/{chunk-BVAPHHMQ.js → chunk-LP7B3JLC.js} +4 -2
- package/dist/{chunk-44HJCTWN.js → chunk-M2Y245ET.js} +2 -2
- package/dist/{chunk-YEE4A3IV.js → chunk-N32TVQYQ.js} +2 -2
- package/dist/{chunk-5UT3R43E.js → chunk-NL4RCLQF.js} +1 -1
- package/dist/{chunk-HXQO2Q6T.js → chunk-NNXS4VBX.js} +1 -1
- package/dist/{chunk-IODESAJT.js → chunk-NPDBBMXX.js} +1 -1
- package/dist/{chunk-QNE3NJO5.js → chunk-O2B3YNUH.js} +3 -3
- package/dist/{chunk-4VOK4IOF.js → chunk-OIJHKOV2.js} +26 -9
- package/dist/{chunk-XLNV66JK.js → chunk-OK3IQC32.js} +1 -1
- package/dist/{chunk-V2BRRTED.js → chunk-P2AOKCAC.js} +16 -9
- package/dist/{chunk-MT2Z5YBM.js → chunk-P7DCQJ6N.js} +1 -1
- package/dist/{chunk-2VYQ62PP.js → chunk-PC662ORN.js} +8 -3
- package/dist/{chunk-Z6AERD5Q.js → chunk-PGM5YXBA.js} +1 -1
- package/dist/{chunk-4VYPICIA.js → chunk-PJEXCOCR.js} +12 -4
- package/dist/{chunk-Q5QMH5QA.js → chunk-PLVIN7X6.js} +1 -1
- package/dist/{chunk-NB2AEFNM.js → chunk-PNZD5LZL.js} +29 -16
- package/dist/{chunk-UCQ7ZF47.js → chunk-PWOMLJFV.js} +2 -2
- package/dist/{chunk-6QP3ZSJN.js → chunk-PWTWZF3F.js} +1 -1
- package/dist/{chunk-KJSCMUST.js → chunk-Q5M3JAME.js} +14 -14
- package/dist/{chunk-RXFKSZN2.js → chunk-QCHPM3C2.js} +1 -1
- package/dist/{chunk-ATRSQXUV.js → chunk-QXGT6KRX.js} +49 -10
- package/dist/{chunk-KIGPWWIE.js → chunk-R5LSL2C7.js} +1 -1
- package/dist/{chunk-XRKQJADF.js → chunk-S6AMEEGZ.js} +3 -3
- package/dist/{chunk-6KZAQHWH.js → chunk-S7UUJ77M.js} +3 -3
- package/dist/{chunk-6P2ZRIKN.js → chunk-SE4WJJ43.js} +1 -1
- package/dist/{chunk-QBDOEJX2.js → chunk-SOQNCHO5.js} +170 -175
- package/dist/{chunk-FU5TXQAN.js → chunk-SPJX4LQR.js} +11 -11
- package/dist/{chunk-MYQ4NH3E.js → chunk-SREJU7NR.js} +1 -1
- package/dist/{chunk-Q3IYSP4G.js → chunk-TEEPLD64.js} +2 -2
- package/dist/{chunk-B3CSMKM7.js → chunk-TJUJJYJC.js} +1 -1
- package/dist/{chunk-DTWIC6JZ.js → chunk-TTEOPEJJ.js} +1 -1
- package/dist/{chunk-GPLINKEE.js → chunk-U7LBN2BQ.js} +7 -7
- package/dist/{chunk-422TEJIX.js → chunk-U7MRV4RM.js} +7 -7
- package/dist/{chunk-SIAPGZ4S.js → chunk-UGYQBRHG.js} +4 -4
- package/dist/{chunk-TMAFZJAP.js → chunk-UK5DBUJX.js} +7 -7
- package/dist/{chunk-XLPCBE2Q.js → chunk-US2SO6O4.js} +1 -1
- package/dist/{chunk-ZFDKOTN4.js → chunk-VPBE4USM.js} +25 -20
- package/dist/{chunk-5UXMG5CM.js → chunk-W2BP25U5.js} +1 -1
- package/dist/{chunk-7X3UDKJK.js → chunk-WMRHEI4N.js} +2 -2
- package/dist/{chunk-PMVFBCE5.js → chunk-WWEFNXQI.js} +2 -2
- package/dist/{chunk-UWB44MM4.js → chunk-XDT2DMH6.js} +2 -2
- package/dist/{chunk-V5UBOBEG.js → chunk-XS27ELRN.js} +3 -3
- package/dist/{chunk-AQZZLJY7.js → chunk-YFHOTWWE.js} +2 -2
- package/dist/{chunk-SM4DG7SR.js → chunk-YKAK4ALT.js} +3 -3
- package/dist/{chunk-IL5CYE3O.js → chunk-YNAKUHSJ.js} +5 -5
- package/dist/{chunk-OMOBWXJL.js → chunk-YQ4LB3XC.js} +2 -2
- package/dist/{chunk-CHRHMT6W.js → chunk-ZAD422DC.js} +6 -6
- package/dist/{chunk-JMUHTEAS.js → chunk-ZEOPRYFK.js} +42 -27
- package/dist/{chunk-QK4HTIXK.js → chunk-ZLWRAHBZ.js} +11 -11
- package/dist/{chunk-WE6SM4HJ.js → chunk-ZO5QD2FA.js} +2 -2
- package/dist/{chunk-SUCTCDDY.js → chunk-ZUZPIM6R.js} +8 -5
- package/dist/{clean-F7Y2JBO5.js → clean-5K2KTH5M.js} +22 -22
- package/dist/cli.js +65 -64
- package/dist/{cloud-SQSYDRCJ.js → cloud-7O2Q7IHJ.js} +4 -4
- package/dist/{cloud-RFM3PYTR.js → cloud-D3WTNTF2.js} +5 -4
- package/dist/{cloudrun-3NSTX3CE.js → cloudrun-3HRDMWIS.js} +10 -8
- package/dist/{compare-J2K3SBGQ.js → compare-D22HJO5V.js} +35 -35
- package/dist/{compiler-DMRQ44TO.js → compiler-RY6IVESI.js} +3 -3
- package/dist/{component-FDWARSYD.js → component-B7V7A5AP.js} +3 -3
- package/dist/{compositions-CVCE2GJN.js → compositions-HFBRVNYW.js} +14 -14
- package/dist/{contactSheet-RJTY6IIV.js → contactSheet-RWRMLRZI.js} +3 -3
- package/dist/{curve-C7MZIWFU.js → curve-7PLN35CZ.js} +13 -13
- package/dist/{cuts-PN574VHO.js → cuts-ZG7TBYVD.js} +14 -14
- package/dist/{delete-V6U3W4CS.js → delete-YL4IMJJZ.js} +8 -7
- package/dist/{deploy-R33MSCVV.js → deploy-A6CDKFQZ.js} +2 -2
- package/dist/{describeProject-ARFPRWDZ.js → describeProject-VZCHDSWT.js} +8 -9
- package/dist/{deterministicFonts-HY5GWGQQ.js → deterministicFonts-DQDB47K3.js} +2 -2
- package/dist/{diff-QFMI6N6P.js → diff-PBVZRS5Z.js} +40 -40
- package/dist/{dist-XVVBUFOD.js → dist-BU547SVG.js} +2 -3
- package/dist/{dist-TI44VPHO.js → dist-FPRADDH6.js} +1 -1
- package/dist/{dist-BYY3JRG2.js → dist-HRK4GWLN.js} +11 -12
- package/dist/docs/examples.md +4 -0
- package/dist/{doctor-CREGMXCV.js → doctor-IFTYCM3E.js} +15 -15
- package/dist/{energy-7G2AX2CC.js → energy-ENGAT6Z5.js} +14 -14
- package/dist/{events-ISILMISS.js → events-A6SBEKVH.js} +5 -4
- package/dist/{events-Y47D7LCD.js → events-AZ5XEDBE.js} +16 -16
- package/dist/{events-LF3JDEMV.js → events-CMAXQTDX.js} +6 -5
- package/dist/{extract-NXHUAZJQ.js → extract-IE74J44O.js} +15 -15
- package/dist/{face-52FKXAW6.js → face-JAPTS7VJ.js} +14 -14
- package/dist/{feedback-LDYDOVKP.js → feedback-QCFWXJCD.js} +13 -13
- package/dist/{ffmpeg-4YTCWYMO.js → ffmpeg-4YMUUJP7.js} +7 -8
- package/dist/{figma-K3XDEK3K.js → figma-C36IECKZ.js} +3 -3
- package/dist/fontLocalizeCli.js +11 -12
- package/dist/{frames-ZR3SBSEJ.js → frames-ZW26G4UP.js} +16 -16
- package/dist/{generate-DDFMXJZV.js → generate-ZXR73M22.js} +27 -27
- package/dist/{get-YLVWTD7K.js → get-3KICFW3X.js} +8 -7
- package/dist/{gpuPolicy-5L45UYI4.js → gpuPolicy-SBYZLOAU.js} +7 -8
- package/dist/{grade-compare-U22AZXLQ.js → grade-compare-DCL3OPKF.js} +35 -35
- package/dist/{heifImagePrep-E5UHLK7F.js → heifImagePrep-YQWEIVTC.js} +8 -9
- package/dist/{help-6UBS7VEC.js → help-PUL7OS7X.js} +1 -1
- package/dist/{history-NQ57D6BT.js → history-GPBKC5DE.js} +12 -11
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +68 -68
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-VMAWCCR7.js → info-7I6ZVJ64.js} +10 -10
- package/dist/{init-E3E5O4BO.js → init-5MCEGVHR.js} +77 -42
- package/dist/{ink-JP2JIJ7O.js → ink-NLYWOBTK.js} +14 -14
- package/dist/{inspect-PB7AQSWP.js → inspect-52COR3TB.js} +34 -34
- package/dist/{installer-DXVPAZI5.js → installer-ARMP4WLF.js} +5 -5
- package/dist/{keyframes-WU52W4WC.js → keyframes-3UMSTEYW.js} +9 -8
- package/dist/{lambda-EPKOKH3F.js → lambda-FYHLXH4H.js} +11 -12
- package/dist/{layout-QYDZ3OWK.js → layout-QKWAPDPV.js} +34 -34
- package/dist/{lint-HA2BXUCU.js → lint-WJCUB2CR.js} +18 -11
- package/dist/{lintProject-Z2TEXMY4.js → lintProject-FPLCK7VP.js} +1 -1
- package/dist/{list-P4PHY54O.js → list-4FQ4BDXW.js} +8 -7
- package/dist/{localPage-GJQ2KHOH.js → localPage-YINL6OV7.js} +7 -8
- package/dist/{login-FZ224A3F.js → login-P74VBTVA.js} +8 -7
- package/dist/{logout-YACQMRZN.js → logout-EQ2HJDL4.js} +4 -3
- package/dist/{look-OMZ2QZO5.js → look-QCOMYMSD.js} +14 -14
- package/dist/{manager-5V4O7DY3.js → manager-MKDNQ5KZ.js} +2 -2
- package/dist/{manager-PFURXZN7.js → manager-V2ZJSF3Q.js} +8 -9
- package/dist/{measure-5UEQ3Z35.js → measure-7IODZ7VY.js} +11 -11
- package/dist/{media-treatment-TD6MD2AQ.js → media-treatment-UJIFSAXV.js} +16 -16
- package/dist/{media-use-WM7OZFIU.js → media-use-4Y5XRY6B.js} +6 -5
- package/dist/{models-RWXD6PFC.js → models-WPBGJ7K6.js} +11 -12
- package/dist/{motionShot-VI4JADFG.js → motionShot-DZZXLIIT.js} +17 -18
- package/dist/{normalize-audio-BS27PUKV.js → normalize-audio-QS2GZ5IT.js} +11 -11
- package/dist/{open-UMB23DN6.js → open-SIWIC52J.js} +16 -15
- package/dist/{parakeetRunner-2QB5ZG35.js → parakeetRunner-YUUCCA3S.js} +13 -14
- package/dist/{pipeline-3P5DX3DB.js → pipeline-AJKIZGUM.js} +11 -12
- package/dist/{play-CF73RCMH.js → play-4EF3JLTU.js} +24 -24
- package/dist/{preflight-JQS3EL4O.js → preflight-LSDOTWZ5.js} +9 -10
- package/dist/{present-RPBRZSP2.js → present-AOLHT3YC.js} +20 -20
- package/dist/{preview-XT5SK5IE.js → preview-WP5VAX3M.js} +28 -26
- package/dist/{probe-OPBECP2X.js → probe-WZ3OWMKG.js} +14 -14
- package/dist/{producer-YY7LXKRQ.js → producer-C72VSLBR.js} +1 -1
- package/dist/{projectConfig-JA6XEBSL.js → projectConfig-LPC7WK4W.js} +7 -7
- package/dist/{publication-EOYYVFJS.js → publication-QGBUXKB2.js} +2 -3
- package/dist/{publish-TPBXTYN2.js → publish-KA2LPVL7.js} +16 -15
- package/dist/{refresh-L5C2HPMC.js → refresh-ARZZRKMP.js} +4 -3
- package/dist/{remove-background-DMV2HTVF.js → remove-background-MC6HXEAW.js} +12 -13
- package/dist/{render-RXQUFM2X.js → render-2STR3XR5.js} +62 -43
- package/dist/{render-WQQ7ZPS5.js → render-IQUQ7EKS.js} +30 -30
- package/dist/{render-P5745VYG.js → render-RPMLSL7M.js} +5 -6
- package/dist/{render-batch-I6OHT72Q.js → render-batch-2AWWGFNK.js} +5 -6
- package/dist/renderSetupWorker.js +3 -3
- package/dist/{resolver-CMFVVODA.js → resolver-D3Q6LTIO.js} +5 -5
- package/dist/{reverse-5CNVGBVP.js → reverse-62TKSQ7Q.js} +1 -1
- package/dist/{run-65M6ECM2.js → run-GQNVIYMD.js} +6 -5
- package/dist/{screenshotCapture-HTGXPA7D.js → screenshotCapture-MM5V4H7M.js} +37 -4
- package/dist/{sherpa-BPJWQXFB.js → sherpa-ZHAABYE3.js} +12 -13
- package/dist/skills/hyperframes/SKILL.md +1 -1
- package/dist/skills/hyperframes/references/format.md +1 -1
- package/dist/skills/hyperframes/references/path-tracing.md +36 -0
- package/dist/skills/hyperframes/references/runtimes.md +1 -1
- package/dist/skills/hyperframes/references/storyboard.md +1 -1
- package/dist/skills/hyperframes/references/types/3d.md +1 -1
- package/dist/skills/media-use/SKILL.md +1 -1
- package/dist/skills/media-use/references/media-treatments.md +1 -1
- package/dist/skills/media-use/references/setup-providers.md +1 -1
- package/dist/skills/media-use/scripts/lib/local-media-search.mjs +6 -2
- package/dist/skills/media-use/scripts/lib/local-media-search.test.mjs +23 -0
- package/dist/skills/media-use/scripts/lib/telemetry.mjs +6 -1
- package/dist/skills/media-use/scripts/lib/telemetry.test.mjs +34 -0
- package/dist/{skills-2Z2E7TX7.js → skills-BYABSOL3.js} +10 -9
- package/dist/{skillsUpdateCheck-TQHSQ26D.js → skillsUpdateCheck-FKOS3ME7.js} +5 -4
- package/dist/{snapshot-NR3BZVZK.js → snapshot-N5O5VEBT.js} +48 -57
- package/dist/{src-VZIS3GRG.js → src-272JLFKW.js} +8 -7
- package/dist/{src-LIR2WBQL.js → src-O6ITP7WU.js} +10 -11
- package/dist/{start-FDWHVOMC.js → start-K2LGEUB5.js} +43 -28
- package/dist/{staticProjectServer-L5O2GBZH.js → staticProjectServer-C7A4W2B4.js} +19 -20
- package/dist/{status-SMFFS6LS.js → status-USHH6OD5.js} +19 -16
- package/dist/studio/assets/{hyperframes-player-bkb0-LEY.js → hyperframes-player-Bb-Fbf5k.js} +1 -1
- package/dist/studio/assets/{index-DfsIam9M.js → index-BZuKog_A.js} +137 -137
- package/dist/studio/assets/{index-RUPGNyct.css → index-CNZk2EFC.css} +1 -1
- package/dist/studio/assets/{index-D5zessN9.js → index-Cap2SGKw.js} +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/{studio-api-VLBZZ4IB.js → studio-api-FVBB2MVZ.js} +11 -12
- package/dist/{studioSelectionClient-FA6XPVIL.js → studioSelectionClient-W2S3H2VO.js} +3 -1
- package/dist/{studioServer-CP5HGR3W.js → studioServer-SFN7YUNV.js} +59 -60
- package/dist/{sync-NBM7J3IT.js → sync-JUDSPP46.js} +14 -14
- package/dist/{synthesize-S3FF5KXC.js → synthesize-GX74JPPZ.js} +2 -2
- package/dist/{telemetry-B5OJHH2C.js → telemetry-3DEZK5Q3.js} +6 -5
- package/dist/{telemetry-5WZGQCKA.js → telemetry-IXOTZW4E.js} +2 -1
- package/dist/{templates-PQZCZZUG.js → templates-3FJRJ6KB.js} +16 -15
- package/dist/{timeline-X27NA7UH.js → timeline-P4CS4INR.js} +40 -25
- package/dist/{tokens-XS2LOTWB.js → tokens-EFAVVV56.js} +2 -2
- package/dist/{transcribe-7M33PLAV.js → transcribe-JKV42B3Q.js} +29 -29
- package/dist/{transcribe-YPWD4E63.js → transcribe-YTBSMCFG.js} +10 -11
- package/dist/{tts-QRQEYR3Q.js → tts-QW53FBKW.js} +3 -3
- package/dist/{update-BRTUI6AI.js → update-6QVOSVBW.js} +11 -10
- package/dist/{updateCheck-IW37C7XV.js → updateCheck-2FWJ2X62.js} +4 -3
- package/dist/{upgrade-7EF5SHLD.js → upgrade-AUHNDKNP.js} +5 -4
- package/dist/{urlDownloader-L6HYQHNK.js → urlDownloader-6ZSSYTOY.js} +6 -7
- package/dist/{validate-PQJBBBBK.js → validate-DKEWYJ3V.js} +28 -28
- package/dist/{video-DO6SLUPI.js → video-N6AEYBUW.js} +9 -10
- package/dist/{voices-VP5LLP5V.js → voices-MT7CM6O5.js} +24 -24
- package/dist/warmCheck.js +44 -44
- package/dist/warmCheckClient.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-AFYIYW5D.js +0 -5035
- package/dist/chunk-MEJH7VEA.js +0 -63
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
iterateFontFamilyDeclarations,
|
|
12
12
|
normalizeSystemFontPrimaryFamilies,
|
|
13
13
|
resolveFontFamilyDeclarationFamilies
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ENVFGBRD.js";
|
|
15
15
|
import {
|
|
16
16
|
Semaphore,
|
|
17
17
|
prepareHeifImageInputs,
|
|
18
18
|
withMediaProbeSlot
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WWEFNXQI.js";
|
|
20
20
|
import {
|
|
21
21
|
EncoderInterruptedError,
|
|
22
22
|
encoderFailureError,
|
|
23
23
|
prepareAnimatedGifInputs
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JPODNK2G.js";
|
|
25
25
|
import {
|
|
26
26
|
openRangeEnd,
|
|
27
27
|
parseEncoderOptions
|
|
@@ -92,6 +92,7 @@ import {
|
|
|
92
92
|
deriveBeginFrameProbeTimeTicks,
|
|
93
93
|
describeFfmpegFailure,
|
|
94
94
|
detectTransfer,
|
|
95
|
+
displaySize,
|
|
95
96
|
distributeFrames,
|
|
96
97
|
distributeFramesInterleaved,
|
|
97
98
|
downloadToTemp,
|
|
@@ -185,7 +186,7 @@ import {
|
|
|
185
186
|
videoAudioId,
|
|
186
187
|
videoStartOnMediaTimeline,
|
|
187
188
|
writeCapturedFrame
|
|
188
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-QXGT6KRX.js";
|
|
189
190
|
import {
|
|
190
191
|
assignBundledRuntimeCompositionIds,
|
|
191
192
|
emitMountedModuleScripts,
|
|
@@ -197,7 +198,7 @@ import {
|
|
|
197
198
|
parsesAsScript,
|
|
198
199
|
prepareFlattenedInnerRoot,
|
|
199
200
|
stripSdrPngColourTags
|
|
200
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-TEEPLD64.js";
|
|
201
202
|
import {
|
|
202
203
|
collectScratchLeftovers,
|
|
203
204
|
removeScratch,
|
|
@@ -211,16 +212,14 @@ import {
|
|
|
211
212
|
fpsToFfmpegArg,
|
|
212
213
|
fpsToNumber,
|
|
213
214
|
gifClearsAfterLeavingFrameInPlace,
|
|
215
|
+
gsapCdnDist,
|
|
214
216
|
isDistributedFps,
|
|
217
|
+
normalizeGsapBaseUrl,
|
|
215
218
|
parseFps,
|
|
216
219
|
parseVfxChain,
|
|
217
220
|
resolveAuthoredTimingWindow,
|
|
218
221
|
toFps
|
|
219
|
-
} from "./chunk-
|
|
220
|
-
import {
|
|
221
|
-
gsapCdnDist,
|
|
222
|
-
normalizeGsapBaseUrl
|
|
223
|
-
} from "./chunk-MEJH7VEA.js";
|
|
222
|
+
} from "./chunk-IR3JMMFT.js";
|
|
224
223
|
import {
|
|
225
224
|
COMPOSITION_SOURCE_URL,
|
|
226
225
|
HF_COLOR_GRADING_ATTR,
|
|
@@ -255,7 +254,7 @@ import {
|
|
|
255
254
|
sourceTimeAt,
|
|
256
255
|
styleElementsFor,
|
|
257
256
|
timeAtSourceTime
|
|
258
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-J3G5KEPY.js";
|
|
259
258
|
import {
|
|
260
259
|
TRANSITIONS,
|
|
261
260
|
convertTransfer,
|
|
@@ -271,7 +270,7 @@ import {
|
|
|
271
270
|
import {
|
|
272
271
|
lintHyperframeHtml,
|
|
273
272
|
resolveReferencedStart
|
|
274
|
-
} from "./chunk-
|
|
273
|
+
} from "./chunk-JFUXZERX.js";
|
|
275
274
|
import {
|
|
276
275
|
isUnresolvedAssetPlaceholder,
|
|
277
276
|
readProjectFile,
|
|
@@ -317,12 +316,12 @@ import {
|
|
|
317
316
|
|
|
318
317
|
// ../producer/src/services/renderOrchestrator.ts
|
|
319
318
|
import {
|
|
320
|
-
existsSync as
|
|
319
|
+
existsSync as existsSync19,
|
|
321
320
|
mkdirSync as mkdirSync8,
|
|
322
321
|
readdirSync as readdirSync5,
|
|
323
322
|
rmSync as rmSync8,
|
|
324
323
|
statSync as statSync6,
|
|
325
|
-
writeFileSync as
|
|
324
|
+
writeFileSync as writeFileSync6,
|
|
326
325
|
copyFileSync as copyFileSync3,
|
|
327
326
|
appendFileSync
|
|
328
327
|
} from "fs";
|
|
@@ -6002,6 +6001,7 @@ function countAuthoredTimedClips(html) {
|
|
|
6002
6001
|
}
|
|
6003
6002
|
|
|
6004
6003
|
// ../producer/src/services/render/stages/compileStage.ts
|
|
6004
|
+
import { existsSync as existsSync10, writeFileSync as writeFileSync4 } from "fs";
|
|
6005
6005
|
import { join as join14 } from "path";
|
|
6006
6006
|
|
|
6007
6007
|
// ../producer/src/services/htmlCompiler.ts
|
|
@@ -6150,7 +6150,7 @@ function placeAudio(audio, window2) {
|
|
|
6150
6150
|
}
|
|
6151
6151
|
|
|
6152
6152
|
// ../core/dist/generated/position-edits-render-inline.js
|
|
6153
|
-
var POSITION_EDITS_RENDER_IIFE = '"use strict";(()=>{function x(){return globalThis}function
|
|
6153
|
+
var POSITION_EDITS_RENDER_IIFE = '"use strict";(()=>{function x(){return globalThis}function R(e,t){if(typeof window>"u")return;let o=x(),r=o.__hf?.onSwallowed;if(r)try{r({label:e,error:t})}catch(s){}(o.__hfDebug||o.__HYPERFRAMES_DEBUG)&&console.debug(`[hyperframes] ${e} swallowed:`,t)}var T=null;function P(e,t){if(T)try{T({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch(o){R("runtime.analytics.site1",o)}}var I="http://www.w3.org/1999/xhtml";function N(e){return e!=null&&e.nodeType===1}function k(e){return N(e)&&(e.namespaceURI===I||e.namespaceURI==="http://www.w3.org/2000/svg")}var w="data-hf-edit-base-x",y="data-hf-edit-base-y",m="data-hf-edit-original-translate",_=e=>{let t=parseFloat(e??"");return Number.isFinite(t)?t:0},C=e=>{let t=[],o=0,r="";for(let s of e.trim())s==="("&&(o+=1),s===")"&&(o=Math.max(0,o-1)),/\\s/.test(s)&&o===0?(r&&t.push(r),r=""):r+=s;return r&&t.push(r),t},$=/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)px$/,E=(e,t)=>$.test(e)&&$.test(t)?`${parseFloat(e)+parseFloat(t)}px`:`calc(${e} + ${t})`,O=(e,t,o)=>{if(!e||e==="none")return`${t} ${o}`;let[r,s,a]=C(e);if(r===void 0)return`${t} ${o}`;if(s===void 0)return`${E(r,t)} ${o}`;let i=a===void 0?"":` ${a}`;return`${E(r,t)} ${E(s,o)}${i}`},j=e=>{try{e.ownerDocument.defaultView?.gsap?.getProperty?.(e,"x")}catch{}},B=e=>{let t=e.style.getPropertyValue("translate").trim();if(t)return t==="none"?"":t;try{let o=e.ownerDocument.defaultView,r=o?o.getComputedStyle(e).getPropertyValue("translate").trim():"";return r==="none"?"":r}catch{return""}},b=new WeakMap;function V(e,t){let o=b.get(e);if(!t?.force&&o!==void 0&&e.style.getPropertyValue("translate")!==o){P("position_edit_fold_skipped",{hfId:e.getAttribute("data-hf-id")});return}let r=_(e.getAttribute("data-x"))-_(e.getAttribute(w)),s=_(e.getAttribute("data-y"))-_(e.getAttribute(y));e.hasAttribute(m)||e.setAttribute(m,B(e)),o===void 0&&j(e);let a=e.getAttribute(m)??"",i=O(a,`${r}px`,`${s}px`);e.style.setProperty("translate",i),b.set(e,e.style.getPropertyValue("translate"))}function h(e,t){let o=e.querySelectorAll(`[${m}]:not([${w}]):not([${y}])`);for(let a=0;a<o.length;a++){let i=o[a];if(i===void 0||!k(i))continue;let g=i.getAttribute(m)??"";g===""?i.style.removeProperty("translate"):i.style.setProperty("translate",g),i.removeAttribute(m),b.delete(i)}let r=e.querySelectorAll(`[${w}], [${y}]`),s=0;for(let a=0;a<r.length;a++){let i=r[a];i===void 0||!k(i)||(V(i,t),s+=1)}return s}var L="__hfPositionEditsSeekReapplyWrapped",D=new WeakSet,F=new WeakMap,H=new WeakMap;function W(e){let t=e,o=()=>{try{h(t.document)}catch{}},r=n=>typeof n=="function"&&(D.has(n)||!!n[L]),s=n=>{D.add(n);try{Object.defineProperty(n,L,{value:!0})}catch{}},a=n=>{if(typeof n!="function"||r(n))return n;let l=function(...u){let d=n.apply(this,u);return o(),d};return s(l),l},i=(n,l)=>{let u=F.get(n);if(u?.has(l))return!0;let d=Object.getOwnPropertyDescriptor(n,l);if(d?.configurable===!1){let c=n[l];return typeof c=="function"&&(n[l]=a(c),o()),!1}let p=n[l],f=d?.set;return Object.defineProperty(n,l,{configurable:!0,enumerable:d?.enumerable??!0,get:()=>p,set:c=>{p=a(c),f?.call(n,c)}}),p=a(p),u??(u=new Set),u.add(l),F.set(n,u),o(),!0},g=(n,l)=>{let u=H.get(t),d=Object.getOwnPropertyDescriptor(t,n);if(!u?.has(n)){if(d?.configurable===!1){let c=t[n];return c?i(c,l):!1}let f=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:d?.enumerable??!0,get:()=>f,set:c=>{f=c,f&&i(f,l)}}),u??(u=new Set),u.add(n),H.set(t,u)}let p=t[n];return p?i(p,l):!1},S=()=>{let n=g("__hf","seek"),l=g("__player","renderSeek");return n&&l};if(S())return;let v=120,A=t.setInterval(()=>{if(S()){t.clearInterval(A);return}v-=1,v<=0&&t.clearInterval(A)},50)}function M(){document.querySelector(`[${w}], [${y}]`)&&(h(document),W(window))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",M,{once:!0}):M();})();\n';
|
|
6154
6154
|
function getPositionEditsRenderScript() {
|
|
6155
6155
|
return POSITION_EDITS_RENDER_IIFE;
|
|
6156
6156
|
}
|
|
@@ -7324,7 +7324,7 @@ async function readLocalFont(absPath) {
|
|
|
7324
7324
|
return { kind: "inline", buffer: Buffer.concat(chunks, totalBytes) };
|
|
7325
7325
|
}
|
|
7326
7326
|
async function embedLocalFontFaces(html, projectDir) {
|
|
7327
|
-
const { fontToDataUri: toDataUri } = await import("./deterministicFonts-
|
|
7327
|
+
const { fontToDataUri: toDataUri } = await import("./deterministicFonts-DQDB47K3.js");
|
|
7328
7328
|
const styleBlockRe = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
|
|
7329
7329
|
const fontFaceRe = /@font-face\s*\{([^}]*)\}/gi;
|
|
7330
7330
|
let result = html;
|
|
@@ -7970,11 +7970,36 @@ function adaptAspectAgnosticResolution(requested, aspectAgnostic, width, height,
|
|
|
7970
7970
|
});
|
|
7971
7971
|
return flipped;
|
|
7972
7972
|
}
|
|
7973
|
+
function resolveEntryHtmlPath(input) {
|
|
7974
|
+
const { projectDir, workDir, entryFile, log } = input;
|
|
7975
|
+
const htmlPath = join14(projectDir, entryFile);
|
|
7976
|
+
const rawEntry = readTextFile(htmlPath);
|
|
7977
|
+
if (entryFile === "index.html" || !isTemplateEntry(rawEntry)) return htmlPath;
|
|
7978
|
+
const projectIndexPath = join14(projectDir, "index.html");
|
|
7979
|
+
if (!existsSync10(projectIndexPath)) {
|
|
7980
|
+
throw new Error(
|
|
7981
|
+
`Template entry file "${entryFile}" requires a project index.html to extract its render shell.`
|
|
7982
|
+
);
|
|
7983
|
+
}
|
|
7984
|
+
const standaloneHtml = extractStandaloneEntryFromIndex(
|
|
7985
|
+
readTextFile(projectIndexPath),
|
|
7986
|
+
entryFile,
|
|
7987
|
+
rawEntry
|
|
7988
|
+
);
|
|
7989
|
+
if (!standaloneHtml) {
|
|
7990
|
+
throw new Error(
|
|
7991
|
+
`Entry file "${entryFile}" is not mounted from index.html via data-composition-src, so it cannot be rendered independently.`
|
|
7992
|
+
);
|
|
7993
|
+
}
|
|
7994
|
+
const wrapperPath = join14(workDir, "standalone-entry.html");
|
|
7995
|
+
writeFileSync4(wrapperPath, standaloneHtml, "utf-8");
|
|
7996
|
+
log.info("Extracted standalone entry from index.html host context", { entryFile });
|
|
7997
|
+
return wrapperPath;
|
|
7998
|
+
}
|
|
7973
7999
|
async function runCompileStage(input) {
|
|
7974
8000
|
const {
|
|
7975
8001
|
projectDir,
|
|
7976
8002
|
workDir,
|
|
7977
|
-
htmlPath,
|
|
7978
8003
|
entryFile,
|
|
7979
8004
|
job,
|
|
7980
8005
|
cfg,
|
|
@@ -7985,6 +8010,7 @@ async function runCompileStage(input) {
|
|
|
7985
8010
|
allowSystemFontCapture,
|
|
7986
8011
|
abortSignal
|
|
7987
8012
|
} = input;
|
|
8013
|
+
const htmlPath = resolveEntryHtmlPath({ projectDir, workDir, entryFile, log });
|
|
7988
8014
|
const compileStart = Date.now();
|
|
7989
8015
|
const compiled = await compileForRender(projectDir, htmlPath, join14(workDir, "downloads"), {
|
|
7990
8016
|
log,
|
|
@@ -8783,7 +8809,7 @@ function validateDistributedDuration(input) {
|
|
|
8783
8809
|
}
|
|
8784
8810
|
|
|
8785
8811
|
// ../producer/src/services/render/stages/extractVideosStage.ts
|
|
8786
|
-
import { existsSync as
|
|
8812
|
+
import { existsSync as existsSync11 } from "fs";
|
|
8787
8813
|
import { join as join16 } from "path";
|
|
8788
8814
|
|
|
8789
8815
|
// ../producer/src/services/render/extractionFailureMetadata.ts
|
|
@@ -9040,7 +9066,7 @@ async function runExtractVideosStage(input) {
|
|
|
9040
9066
|
const probeFailures = await Promise.all(
|
|
9041
9067
|
composition.videos.map(async (v) => {
|
|
9042
9068
|
const videoPath = resolveProjectRelativeSrc(v.src, projectDir, compiledDir);
|
|
9043
|
-
if (!
|
|
9069
|
+
if (!existsSync11(videoPath)) return null;
|
|
9044
9070
|
try {
|
|
9045
9071
|
const attempted = extractionPolicy.maxTransientRetries === 0 ? { result: await extractMediaMetadata(videoPath), retries: 0 } : await runVideoExtractionWithRetry(() => extractMediaMetadata(videoPath), {
|
|
9046
9072
|
signal: abortSignal,
|
|
@@ -9078,7 +9104,7 @@ async function runExtractVideosStage(input) {
|
|
|
9078
9104
|
const probed = await Promise.all(
|
|
9079
9105
|
composition.images.map(async (img) => {
|
|
9080
9106
|
const imgPath = resolveProjectRelativeSrc(img.src, projectDir, compiledDir);
|
|
9081
|
-
if (!
|
|
9107
|
+
if (!existsSync11(imgPath)) return null;
|
|
9082
9108
|
const colorSpace = await probeColorSpaceSafely(imgPath, log);
|
|
9083
9109
|
if (isHdrColorSpace(colorSpace)) {
|
|
9084
9110
|
nativeHdrImageIds.add(img.id);
|
|
@@ -9198,7 +9224,7 @@ async function appendVideoAudioFromProbe(input) {
|
|
|
9198
9224
|
videos.map(async (video) => {
|
|
9199
9225
|
const path = isHttpUrl(video.src) ? video.src : resolveProjectRelativeSrc(video.src, projectDir, compiledDir);
|
|
9200
9226
|
const readFrom = urlByAbsentLocalPath?.get(path) ?? path;
|
|
9201
|
-
if (!isHttpUrl(readFrom) && !
|
|
9227
|
+
if (!isHttpUrl(readFrom) && !existsSync11(readFrom)) return null;
|
|
9202
9228
|
const metadata = await extractMediaMetadata(readFrom);
|
|
9203
9229
|
const window2 = await resolveFinalFrameExtractionWindow(
|
|
9204
9230
|
readFrom,
|
|
@@ -9218,7 +9244,7 @@ async function appendVideoAudioFromProbe(input) {
|
|
|
9218
9244
|
}
|
|
9219
9245
|
|
|
9220
9246
|
// ../producer/src/services/render/videoLayerPassthroughPlan.ts
|
|
9221
|
-
import { existsSync as
|
|
9247
|
+
import { existsSync as existsSync12 } from "fs";
|
|
9222
9248
|
var SAMPLES = 9;
|
|
9223
9249
|
function inspectVideoLayout(id, w, h, time) {
|
|
9224
9250
|
window.__hf?.seek?.(time);
|
|
@@ -9280,7 +9306,7 @@ async function planVideoLayerPassthrough(input) {
|
|
|
9280
9306
|
const { video } = q;
|
|
9281
9307
|
if (isHttpUrl(video.src)) return { reason: "remote_source" };
|
|
9282
9308
|
const path = resolveProjectRelativeSrc(video.src, input.projectDir, input.compiledDir);
|
|
9283
|
-
if (!
|
|
9309
|
+
if (!existsSync12(path)) return { reason: "source_missing" };
|
|
9284
9310
|
const layout = await probeVideoLayout(input.page, video.id, input.canvas, input.duration);
|
|
9285
9311
|
if ("reason" in layout) return layout;
|
|
9286
9312
|
const layer = await buildVideoLayerInput(
|
|
@@ -9295,11 +9321,11 @@ async function planVideoLayerPassthrough(input) {
|
|
|
9295
9321
|
}
|
|
9296
9322
|
|
|
9297
9323
|
// ../producer/src/services/render/stages/audioStage.ts
|
|
9298
|
-
import { existsSync as
|
|
9324
|
+
import { existsSync as existsSync14 } from "fs";
|
|
9299
9325
|
import { join as join19 } from "path";
|
|
9300
9326
|
|
|
9301
9327
|
// ../producer/src/services/render/audioDeliveryLimit.ts
|
|
9302
|
-
import { existsSync as
|
|
9328
|
+
import { existsSync as existsSync13 } from "fs";
|
|
9303
9329
|
import { dirname as dirname7, join as join18 } from "path";
|
|
9304
9330
|
|
|
9305
9331
|
// ../producer/src/services/render/audioPadTrim.ts
|
|
@@ -9781,7 +9807,7 @@ async function limitDeliveryPeaks(input, deps = {
|
|
|
9781
9807
|
applyChain: applyAudioFxChain,
|
|
9782
9808
|
encode: encodeAac,
|
|
9783
9809
|
rename: renameWithRetry,
|
|
9784
|
-
sourceExists:
|
|
9810
|
+
sourceExists: existsSync13
|
|
9785
9811
|
}) {
|
|
9786
9812
|
const { audioPath, sourcePath, signal, timeoutMs } = input;
|
|
9787
9813
|
if (!deps.sourceExists(sourcePath)) return { success: true };
|
|
@@ -9851,7 +9877,7 @@ async function runAudioStageScoped(input) {
|
|
|
9851
9877
|
);
|
|
9852
9878
|
audioLoweredDb = guard.loweredDb;
|
|
9853
9879
|
input.log?.info("[audio] phases", { ...result.audioPhaseMs, guard: Date.now() - guardStart });
|
|
9854
|
-
if (input.keepDeliverySource && !guard.sourceStale &&
|
|
9880
|
+
if (input.keepDeliverySource && !guard.sourceStale && existsSync14(pcmSourcePath)) {
|
|
9855
9881
|
deliverySourcePath = pcmSourcePath;
|
|
9856
9882
|
}
|
|
9857
9883
|
}
|
|
@@ -9979,7 +10005,7 @@ async function mixAudioForDelivery(input, duration, pcmSourcePath) {
|
|
|
9979
10005
|
}
|
|
9980
10006
|
|
|
9981
10007
|
// ../producer/src/services/render/stages/captureStage.ts
|
|
9982
|
-
import { existsSync as
|
|
10008
|
+
import { existsSync as existsSync15, readdirSync as readdirSync3, statfsSync as statfsSync2 } from "fs";
|
|
9983
10009
|
import { join as join20 } from "path";
|
|
9984
10010
|
function shouldAllowAdaptiveCaptureRetry(workerCount, _explicitlyConfigured) {
|
|
9985
10011
|
return workerCount > 1;
|
|
@@ -10036,7 +10062,7 @@ function diskCaptureShortfallError(needBytes, freeBytes, framesDir, basis, remed
|
|
|
10036
10062
|
}
|
|
10037
10063
|
function measureCaptureFrameBytes(workDir, framesDir) {
|
|
10038
10064
|
let total = sampleDirectoryBytes(framesDir);
|
|
10039
|
-
if (!
|
|
10065
|
+
if (!existsSync15(workDir)) return total;
|
|
10040
10066
|
for (const attempt of readdirSync3(workDir)) {
|
|
10041
10067
|
if (/^retry-\d+-batch-\d+-worker-\d+$/.test(attempt)) {
|
|
10042
10068
|
total += sampleDirectoryBytes(join20(workDir, attempt));
|
|
@@ -10339,7 +10365,7 @@ async function captureSessionFrames(session, { input, rangeStart, rangeEnd, resu
|
|
|
10339
10365
|
}
|
|
10340
10366
|
|
|
10341
10367
|
// ../producer/src/services/render/stages/captureHdrStage.ts
|
|
10342
|
-
import { existsSync as
|
|
10368
|
+
import { existsSync as existsSync17, mkdirSync as mkdirSync6 } from "fs";
|
|
10343
10369
|
import { join as join24 } from "path";
|
|
10344
10370
|
|
|
10345
10371
|
// ../producer/src/services/hdrImageTransferCache.ts
|
|
@@ -10562,7 +10588,7 @@ import { Worker } from "worker_threads";
|
|
|
10562
10588
|
import { fileURLToPath as fileURLToPath3, pathToFileURL } from "url";
|
|
10563
10589
|
import { dirname as dirname8, join as join22 } from "path";
|
|
10564
10590
|
import { createRequire } from "module";
|
|
10565
|
-
import { existsSync as
|
|
10591
|
+
import { existsSync as existsSync16 } from "fs";
|
|
10566
10592
|
import { cpus as cpus2 } from "os";
|
|
10567
10593
|
function resolveWorkerEntry(explicit) {
|
|
10568
10594
|
if (explicit && explicit.length > 0) {
|
|
@@ -10575,7 +10601,7 @@ function resolveWorkerEntry(explicit) {
|
|
|
10575
10601
|
}
|
|
10576
10602
|
const moduleDir = dirname8(fileURLToPath3(import.meta.url));
|
|
10577
10603
|
const jsPath = join22(moduleDir, "shaderTransitionWorker.js");
|
|
10578
|
-
if (
|
|
10604
|
+
if (existsSync16(jsPath)) return { path: jsPath, isTs: false };
|
|
10579
10605
|
const tsPath = join22(moduleDir, "shaderTransitionWorker.ts");
|
|
10580
10606
|
return { path: tsPath, isTs: true };
|
|
10581
10607
|
}
|
|
@@ -11136,7 +11162,7 @@ async function runCaptureHdrStage(input) {
|
|
|
11136
11162
|
}
|
|
11137
11163
|
const debugDumpEnabled = process.env.KEEP_TEMP === "1";
|
|
11138
11164
|
const debugDumpDir = debugDumpEnabled ? join24(framesDir, "debug-composite") : null;
|
|
11139
|
-
if (debugDumpDir && !
|
|
11165
|
+
if (debugDumpDir && !existsSync17(debugDumpDir)) {
|
|
11140
11166
|
mkdirSync6(debugDumpDir, { recursive: true });
|
|
11141
11167
|
}
|
|
11142
11168
|
const compositeTransfer = resolveCompositeTransfer(hasHdrContent, effectiveHdr);
|
|
@@ -11293,13 +11319,13 @@ async function runCaptureHdrStage(input) {
|
|
|
11293
11319
|
// ../producer/src/services/render/stages/encodeStage.ts
|
|
11294
11320
|
import {
|
|
11295
11321
|
copyFileSync as copyFileSync2,
|
|
11296
|
-
existsSync as
|
|
11322
|
+
existsSync as existsSync18,
|
|
11297
11323
|
mkdirSync as mkdirSync7,
|
|
11298
11324
|
readdirSync as readdirSync4,
|
|
11299
11325
|
readFileSync as readFileSync6,
|
|
11300
11326
|
rmSync as rmSync7,
|
|
11301
11327
|
statSync as statSync5,
|
|
11302
|
-
writeFileSync as
|
|
11328
|
+
writeFileSync as writeFileSync5
|
|
11303
11329
|
} from "fs";
|
|
11304
11330
|
import { readFile as readFile2 } from "fs/promises";
|
|
11305
11331
|
import { dirname as dirname9, join as join25 } from "path";
|
|
@@ -11380,7 +11406,7 @@ async function reencodeWithClearedWholeFrames(argsInput, run, startTime) {
|
|
|
11380
11406
|
const error = "[FFmpeg] GIF output could not be parsed to clear its frames";
|
|
11381
11407
|
return gifEncodeFailure(startTime, outputPath, error);
|
|
11382
11408
|
}
|
|
11383
|
-
|
|
11409
|
+
writeFileSync5(outputPath, gif);
|
|
11384
11410
|
return null;
|
|
11385
11411
|
}
|
|
11386
11412
|
async function encodeGifFromDir(framesDir, framePattern, outputPath, input) {
|
|
@@ -11412,7 +11438,7 @@ async function encodeGifFromDir(framesDir, framePattern, outputPath, input) {
|
|
|
11412
11438
|
const failure = await reencodeWithClearedWholeFrames(argsInput, run, startTime);
|
|
11413
11439
|
if (failure) return failure;
|
|
11414
11440
|
}
|
|
11415
|
-
const fileSize =
|
|
11441
|
+
const fileSize = existsSync18(outputPath) ? statSync5(outputPath).size : 0;
|
|
11416
11442
|
return {
|
|
11417
11443
|
success: true,
|
|
11418
11444
|
outputPath,
|
|
@@ -11573,7 +11599,7 @@ async function runEncodeStage(input) {
|
|
|
11573
11599
|
const stage5Start = Date.now();
|
|
11574
11600
|
if (isPngSequence) {
|
|
11575
11601
|
const encoded = startEncodeProgress(job, "Writing PNG sequence", onProgress);
|
|
11576
|
-
if (!
|
|
11602
|
+
if (!existsSync18(outputPath)) mkdirSync7(outputPath, { recursive: true });
|
|
11577
11603
|
const captured = readdirSync4(framesDir).filter((name) => name.endsWith(".png")).sort();
|
|
11578
11604
|
if (captured.length === 0) {
|
|
11579
11605
|
throw new Error(
|
|
@@ -11584,7 +11610,7 @@ async function runEncodeStage(input) {
|
|
|
11584
11610
|
const dst = join25(outputPath, formatExportFrameName(i, "png"));
|
|
11585
11611
|
copyFileSync2(join25(framesDir, name), dst);
|
|
11586
11612
|
});
|
|
11587
|
-
if (hasAudio && audioOutputPath &&
|
|
11613
|
+
if (hasAudio && audioOutputPath && existsSync18(audioOutputPath)) {
|
|
11588
11614
|
copyFileSync2(audioOutputPath, join25(outputPath, MIXED_AUDIO_FILENAME));
|
|
11589
11615
|
log.info(
|
|
11590
11616
|
`[Render] png-sequence: ${MIXED_AUDIO_FILENAME} sidecar written to ${outputPath}/${MIXED_AUDIO_FILENAME}`
|
|
@@ -11965,18 +11991,14 @@ function hasUsableVideoDimensions(metadata) {
|
|
|
11965
11991
|
return Number.isFinite(metadata.width) && Number.isFinite(metadata.height) && metadata.width > 0 && metadata.height > 0;
|
|
11966
11992
|
}
|
|
11967
11993
|
function collectVideoMetadataHints(extractedVideos) {
|
|
11968
|
-
return extractedVideos.filter((video) => hasUsableVideoDimensions(video.metadata)).map((video) => ({
|
|
11969
|
-
id: video.videoId,
|
|
11970
|
-
width: video.metadata.width,
|
|
11971
|
-
height: video.metadata.height
|
|
11972
|
-
})).sort((a, b) => a.id.localeCompare(b.id));
|
|
11994
|
+
return extractedVideos.filter((video) => hasUsableVideoDimensions(video.metadata)).map((video) => ({ id: video.videoId, ...displaySize(video.metadata) })).sort((a, b) => a.id.localeCompare(b.id));
|
|
11973
11995
|
}
|
|
11974
11996
|
function findMissingFrameRanges(totalFrames, framesDir, frameExt) {
|
|
11975
11997
|
const ranges = [];
|
|
11976
11998
|
let rangeStart = null;
|
|
11977
11999
|
for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
|
|
11978
12000
|
const framePath = join26(framesDir, formatCaptureFrameName(frameIndex, frameExt));
|
|
11979
|
-
const missing = !
|
|
12001
|
+
const missing = !existsSync19(framePath) || statSync6(framePath).size <= 8;
|
|
11980
12002
|
if (missing && rangeStart === null) {
|
|
11981
12003
|
rangeStart = frameIndex;
|
|
11982
12004
|
} else if (!missing && rangeStart !== null) {
|
|
@@ -12101,7 +12123,7 @@ function countCapturedFrames(totalFrames, framesDir, frameExt) {
|
|
|
12101
12123
|
let captured = 0;
|
|
12102
12124
|
for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
|
|
12103
12125
|
const framePath = join26(framesDir, formatCaptureFrameName(frameIndex, frameExt));
|
|
12104
|
-
if (
|
|
12126
|
+
if (existsSync19(framePath)) captured++;
|
|
12105
12127
|
}
|
|
12106
12128
|
return captured;
|
|
12107
12129
|
}
|
|
@@ -12766,7 +12788,7 @@ async function executeRenderJob(job, projectDir, outputPath, progressSink, abort
|
|
|
12766
12788
|
validateDeliveryEncoderConfig(job.config);
|
|
12767
12789
|
const debugDir = resolveRenderDebugDir();
|
|
12768
12790
|
const outputDir = dirname10(outputPath);
|
|
12769
|
-
if (!
|
|
12791
|
+
if (!existsSync19(outputDir)) mkdirSync8(outputDir, { recursive: true });
|
|
12770
12792
|
const workDir = job.config.debug ? join26(debugDir, job.id) : createRenderWorkDir(resolveRenderWorkDirPrefix(outputPath, job.id), outputDir);
|
|
12771
12793
|
const pipelineStart = Date.now();
|
|
12772
12794
|
const baseLog = job.config.logger ?? defaultLogger;
|
|
@@ -12908,7 +12930,7 @@ async function executeRenderPipeline(input) {
|
|
|
12908
12930
|
job.startedAt = /* @__PURE__ */ new Date();
|
|
12909
12931
|
assertNotAborted();
|
|
12910
12932
|
assertConfiguredFfmpegBinariesExist();
|
|
12911
|
-
if (!
|
|
12933
|
+
if (!existsSync19(workDir)) mkdirSync8(workDir, { recursive: true });
|
|
12912
12934
|
if (job.config.debug) {
|
|
12913
12935
|
log.info("[Render] Debug artifacts enabled", { workDir, logPath });
|
|
12914
12936
|
}
|
|
@@ -12937,36 +12959,11 @@ async function executeRenderPipeline(input) {
|
|
|
12937
12959
|
requestedWorkers: job.config.workers ?? "auto"
|
|
12938
12960
|
});
|
|
12939
12961
|
const entryFile = job.config.entryFile || "index.html";
|
|
12940
|
-
|
|
12941
|
-
if (!
|
|
12962
|
+
const htmlPath = join26(projectDir, entryFile);
|
|
12963
|
+
if (!existsSync19(htmlPath)) {
|
|
12942
12964
|
throw new Error(`Entry file not found: ${htmlPath}`);
|
|
12943
12965
|
}
|
|
12944
12966
|
assertNotAborted();
|
|
12945
|
-
const rawEntry = readTextFile(htmlPath);
|
|
12946
|
-
if (entryFile !== "index.html" && isTemplateEntry(rawEntry)) {
|
|
12947
|
-
const wrapperPath = join26(workDir, "standalone-entry.html");
|
|
12948
|
-
const projectIndexPath = join26(projectDir, "index.html");
|
|
12949
|
-
if (!existsSync18(projectIndexPath)) {
|
|
12950
|
-
throw new Error(
|
|
12951
|
-
`Template entry file "${entryFile}" requires a project index.html to extract its render shell.`
|
|
12952
|
-
);
|
|
12953
|
-
}
|
|
12954
|
-
const standaloneHtml = extractStandaloneEntryFromIndex(
|
|
12955
|
-
readTextFile(projectIndexPath),
|
|
12956
|
-
entryFile,
|
|
12957
|
-
rawEntry
|
|
12958
|
-
);
|
|
12959
|
-
if (!standaloneHtml) {
|
|
12960
|
-
throw new Error(
|
|
12961
|
-
`Entry file "${entryFile}" is not mounted from index.html via data-composition-src, so it cannot be rendered independently.`
|
|
12962
|
-
);
|
|
12963
|
-
}
|
|
12964
|
-
writeFileSync5(wrapperPath, standaloneHtml, "utf-8");
|
|
12965
|
-
htmlPath = wrapperPath;
|
|
12966
|
-
log.info("Extracted standalone entry from index.html host context", {
|
|
12967
|
-
entryFile
|
|
12968
|
-
});
|
|
12969
|
-
}
|
|
12970
12967
|
const stage1Start = Date.now();
|
|
12971
12968
|
updateJobStatus(job, "preprocessing", "Compiling composition", 5, onProgress, {
|
|
12972
12969
|
code: "compile"
|
|
@@ -12978,7 +12975,6 @@ async function executeRenderPipeline(input) {
|
|
|
12978
12975
|
() => runCompileStage({
|
|
12979
12976
|
projectDir,
|
|
12980
12977
|
workDir,
|
|
12981
|
-
htmlPath,
|
|
12982
12978
|
entryFile,
|
|
12983
12979
|
job,
|
|
12984
12980
|
cfg,
|
|
@@ -13290,7 +13286,7 @@ async function executeRenderPipeline(input) {
|
|
|
13290
13286
|
throw new Error("File server failed to initialize before frame capture");
|
|
13291
13287
|
}
|
|
13292
13288
|
const framesDir = join26(workDir, "captured-frames");
|
|
13293
|
-
if (!
|
|
13289
|
+
if (!existsSync19(framesDir)) mkdirSync8(framesDir, { recursive: true });
|
|
13294
13290
|
updateJobStatus(job, "rendering", "Checking browser GPU", 25, onProgress, {
|
|
13295
13291
|
code: "start_browsers"
|
|
13296
13292
|
});
|
|
@@ -14618,7 +14614,7 @@ async function executeRenderPipeline(input) {
|
|
|
14618
14614
|
})
|
|
14619
14615
|
);
|
|
14620
14616
|
const totalElapsed = Date.now() - pipelineStart;
|
|
14621
|
-
const tmpPeakBytes =
|
|
14617
|
+
const tmpPeakBytes = existsSync19(workDir) ? sampleDirectoryBytes(workDir) : 0;
|
|
14622
14618
|
recordTransientRetryObservability();
|
|
14623
14619
|
observability.checkpoint("pipeline", "artifact validated", { totalElapsedMs: totalElapsed });
|
|
14624
14620
|
const observabilitySummary = observability.summary({
|
|
@@ -14690,7 +14686,7 @@ async function executeRenderPipeline(input) {
|
|
|
14690
14686
|
job.perfSummary = perfSummary;
|
|
14691
14687
|
if (job.config.debug) {
|
|
14692
14688
|
try {
|
|
14693
|
-
|
|
14689
|
+
writeFileSync6(perfOutputPath, JSON.stringify(perfSummary, null, 2), "utf-8");
|
|
14694
14690
|
} catch (err) {
|
|
14695
14691
|
log.debug("Failed to write perf summary", {
|
|
14696
14692
|
perfOutputPath,
|
|
@@ -14699,7 +14695,7 @@ async function executeRenderPipeline(input) {
|
|
|
14699
14695
|
}
|
|
14700
14696
|
}
|
|
14701
14697
|
if (job.config.debug) {
|
|
14702
|
-
if (!isPngSequence && !isHls &&
|
|
14698
|
+
if (!isPngSequence && !isHls && existsSync19(stagedOutputPath)) {
|
|
14703
14699
|
const debugOutput = join26(workDir, `output${videoExt}`);
|
|
14704
14700
|
copyFileSync3(stagedOutputPath, debugOutput);
|
|
14705
14701
|
}
|
|
@@ -15200,11 +15196,11 @@ async function writeStitchedMp4(chunkPaths, outputPath, audioPath) {
|
|
|
15200
15196
|
import {
|
|
15201
15197
|
copyFileSync as copyFileSync4,
|
|
15202
15198
|
cpSync as cpSync2,
|
|
15203
|
-
existsSync as
|
|
15199
|
+
existsSync as existsSync24,
|
|
15204
15200
|
linkSync,
|
|
15205
15201
|
mkdirSync as mkdirSync12,
|
|
15206
15202
|
rmSync as rmSync10,
|
|
15207
|
-
writeFileSync as
|
|
15203
|
+
writeFileSync as writeFileSync9
|
|
15208
15204
|
} from "fs";
|
|
15209
15205
|
import { extname as extname6, isAbsolute as isAbsolute2, join as join35, relative as relative5, sep as sep2 } from "path";
|
|
15210
15206
|
|
|
@@ -15212,13 +15208,13 @@ import { extname as extname6, isAbsolute as isAbsolute2, join as join35, relativ
|
|
|
15212
15208
|
import { join as join30 } from "path";
|
|
15213
15209
|
|
|
15214
15210
|
// ../producer/src/services/distributed/chunkFrames.ts
|
|
15215
|
-
import { existsSync as
|
|
15211
|
+
import { existsSync as existsSync21, readdirSync as readdirSync6 } from "fs";
|
|
15216
15212
|
import { extname as extname4, join as join29 } from "path";
|
|
15217
15213
|
|
|
15218
15214
|
// ../producer/src/services/distributed/shared.ts
|
|
15219
15215
|
import { execFile as execFileCallback } from "child_process";
|
|
15220
15216
|
import { dirname as dirname12, join as join28 } from "path";
|
|
15221
|
-
import { existsSync as
|
|
15217
|
+
import { existsSync as existsSync20, readFileSync as readFileSync7 } from "fs";
|
|
15222
15218
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
15223
15219
|
import { promisify as promisify2 } from "util";
|
|
15224
15220
|
var PLAN_VIDEOS_META_RELATIVE_PATH = "meta/videos.json";
|
|
@@ -15230,7 +15226,7 @@ function isPlanAudioArtifactPath(path) {
|
|
|
15230
15226
|
function resolvePlanAudioPath(planDir) {
|
|
15231
15227
|
for (const name of [PLAN_AUDIO_RELATIVE_PATH, PLAN_AUDIO_LEGACY_RELATIVE_PATH]) {
|
|
15232
15228
|
const candidate = join28(planDir, name);
|
|
15233
|
-
if (
|
|
15229
|
+
if (existsSync20(candidate)) return candidate;
|
|
15234
15230
|
}
|
|
15235
15231
|
return null;
|
|
15236
15232
|
}
|
|
@@ -15491,7 +15487,7 @@ function readProducerVersion() {
|
|
|
15491
15487
|
let current = startDir;
|
|
15492
15488
|
for (let i = 0; i < 10; i++) {
|
|
15493
15489
|
const candidate = join28(current, "package.json");
|
|
15494
|
-
if (
|
|
15490
|
+
if (existsSync20(candidate)) {
|
|
15495
15491
|
try {
|
|
15496
15492
|
const pkg = JSON.parse(readFileSync7(candidate, "utf-8"));
|
|
15497
15493
|
if (pkg.name === "@hyperframes/producer" && typeof pkg.version === "string") {
|
|
@@ -15545,7 +15541,7 @@ function rebuildExtractedFramesFromPlanDir(planDir, videos, indexMode = "dense-v
|
|
|
15545
15541
|
const result = [];
|
|
15546
15542
|
for (const v of videos) {
|
|
15547
15543
|
const outputDir = join29(planDir, "video-frames", v.videoId);
|
|
15548
|
-
if (!
|
|
15544
|
+
if (!existsSync21(outputDir)) {
|
|
15549
15545
|
throw new Error(
|
|
15550
15546
|
`[renderChunk] planDir missing extracted video frames for ${JSON.stringify(v.videoId)}: ${outputDir} not present. plan() should have written frames here; the planDir is malformed.`
|
|
15551
15547
|
);
|
|
@@ -15661,7 +15657,7 @@ async function extractDeferredVideoFramesForChunk(input) {
|
|
|
15661
15657
|
const range = video.deferredRange;
|
|
15662
15658
|
const remoteUrl = remoteSources[range.sourcePath];
|
|
15663
15659
|
const sourcePath = remoteUrl ?? join29(input.planDir, ...range.sourcePath.split("/"));
|
|
15664
|
-
if (remoteUrl === void 0 && !
|
|
15660
|
+
if (remoteUrl === void 0 && !existsSync21(sourcePath)) {
|
|
15665
15661
|
throw new RenderChunkValidationError(
|
|
15666
15662
|
MISSING_PLAN_ARTIFACT,
|
|
15667
15663
|
`[renderChunk] planDir is missing the source for video ${JSON.stringify(video.videoId)}: ${range.sourcePath}`
|
|
@@ -15872,7 +15868,7 @@ async function readPlanReferenceBackground(input) {
|
|
|
15872
15868
|
}
|
|
15873
15869
|
|
|
15874
15870
|
// ../producer/src/services/render/stages/freezePlan.ts
|
|
15875
|
-
import { existsSync as
|
|
15871
|
+
import { existsSync as existsSync22, mkdirSync as mkdirSync10, readFileSync as readFileSync8, readdirSync as readdirSync7, writeFileSync as writeFileSync7 } from "fs";
|
|
15876
15872
|
import { join as join32, relative as relative3, resolve as resolve7 } from "path";
|
|
15877
15873
|
|
|
15878
15874
|
// ../producer/src/services/distributed/planProtocol.ts
|
|
@@ -16062,7 +16058,7 @@ function planFileSha256(absolutePath, digests) {
|
|
|
16062
16058
|
return sha256;
|
|
16063
16059
|
}
|
|
16064
16060
|
async function prehashPlanFiles(dir, digests) {
|
|
16065
|
-
if (!
|
|
16061
|
+
if (!existsSync22(dir)) return;
|
|
16066
16062
|
for (const { absolutePath } of listPlanFiles(dir)) {
|
|
16067
16063
|
if (!digests.has(absolutePath)) digests.set(absolutePath, await sha256FileAsync(absolutePath));
|
|
16068
16064
|
}
|
|
@@ -16128,19 +16124,19 @@ var PLAN_REMOTE_FILES_RELATIVE_PATH = "meta/remote-files.json";
|
|
|
16128
16124
|
function writePlanRemoteFiles(planDir, files) {
|
|
16129
16125
|
if (files.length === 0) return;
|
|
16130
16126
|
const sorted = [...files].sort((a, b) => a.path < b.path ? -1 : 1);
|
|
16131
|
-
|
|
16127
|
+
writeFileSync7(join32(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH), JSON.stringify(sorted), "utf-8");
|
|
16132
16128
|
}
|
|
16133
16129
|
function readPlanRemoteFiles(planDir) {
|
|
16134
16130
|
const path = join32(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH);
|
|
16135
|
-
return
|
|
16131
|
+
return existsSync22(path) ? JSON.parse(readFileSync8(path, "utf-8")) : [];
|
|
16136
16132
|
}
|
|
16137
16133
|
function recomputePlanHashFromPlanDir(planDir, digests) {
|
|
16138
16134
|
const planJsonPath = join32(planDir, "plan.json");
|
|
16139
16135
|
const encoderJsonPath = join32(planDir, "meta", "encoder.json");
|
|
16140
|
-
if (!
|
|
16136
|
+
if (!existsSync22(planJsonPath)) {
|
|
16141
16137
|
throw new Error(`[freezePlan] plan.json missing: ${planJsonPath}`);
|
|
16142
16138
|
}
|
|
16143
|
-
if (!
|
|
16139
|
+
if (!existsSync22(encoderJsonPath)) {
|
|
16144
16140
|
throw new Error(`[freezePlan] meta/encoder.json missing: ${encoderJsonPath}`);
|
|
16145
16141
|
}
|
|
16146
16142
|
const planJson = JSON.parse(readFileSync8(planJsonPath, "utf-8"));
|
|
@@ -16170,12 +16166,12 @@ async function freezePlan(input) {
|
|
|
16170
16166
|
hasAudio,
|
|
16171
16167
|
digests
|
|
16172
16168
|
} = input;
|
|
16173
|
-
if (!
|
|
16169
|
+
if (!existsSync22(planDir)) {
|
|
16174
16170
|
throw new Error(`[freezePlan] planDir does not exist: ${planDir}`);
|
|
16175
16171
|
}
|
|
16176
16172
|
const metaDir = join32(planDir, "meta");
|
|
16177
|
-
if (!
|
|
16178
|
-
|
|
16173
|
+
if (!existsSync22(metaDir)) mkdirSync10(metaDir, { recursive: true });
|
|
16174
|
+
writeFileSync7(
|
|
16179
16175
|
join32(metaDir, "composition.json"),
|
|
16180
16176
|
`${JSON.stringify(composition, null, 2)}
|
|
16181
16177
|
`,
|
|
@@ -16183,8 +16179,8 @@ async function freezePlan(input) {
|
|
|
16183
16179
|
);
|
|
16184
16180
|
const encoderForCanonical = stripUndefined(encoder);
|
|
16185
16181
|
const encoderConfigCanonicalJson = canonicalJsonStringify(encoderForCanonical);
|
|
16186
|
-
|
|
16187
|
-
|
|
16182
|
+
writeFileSync7(join32(metaDir, "encoder.json"), encoderConfigCanonicalJson, "utf-8");
|
|
16183
|
+
writeFileSync7(join32(metaDir, "chunks.json"), `${JSON.stringify(chunks, null, 2)}
|
|
16188
16184
|
`, "utf-8");
|
|
16189
16185
|
const { compositionHtml, assets } = collectPlanAssetShas(planDir, digests);
|
|
16190
16186
|
const planHash = computePlanHash({
|
|
@@ -16210,7 +16206,7 @@ async function freezePlan(input) {
|
|
|
16210
16206
|
hasAudio
|
|
16211
16207
|
};
|
|
16212
16208
|
const planJsonPath = join32(planDir, "plan.json");
|
|
16213
|
-
|
|
16209
|
+
writeFileSync7(planJsonPath, `${JSON.stringify(planJson, null, 2)}
|
|
16214
16210
|
`, "utf-8");
|
|
16215
16211
|
return { planJsonPath, planHash };
|
|
16216
16212
|
}
|
|
@@ -16251,8 +16247,8 @@ function applyRuntimeEnvSnapshot(snapshot, env = process.env) {
|
|
|
16251
16247
|
}
|
|
16252
16248
|
|
|
16253
16249
|
// ../producer/src/services/distributed/chunkAudio.ts
|
|
16254
|
-
import { closeSync as closeSync5, existsSync as
|
|
16255
|
-
import { writeFileSync as
|
|
16250
|
+
import { closeSync as closeSync5, existsSync as existsSync23, ftruncateSync, mkdirSync as mkdirSync11, openSync as openSync5, readFileSync as readFileSync9 } from "fs";
|
|
16251
|
+
import { writeFileSync as writeFileSync8, writeSync } from "fs";
|
|
16256
16252
|
import { join as join33 } from "path";
|
|
16257
16253
|
function audioCutForChunk(grid, chunks, index, fps) {
|
|
16258
16254
|
const firstPacketAt = (frame) => Math.min(
|
|
@@ -16348,15 +16344,15 @@ async function writeChunkAudioSlices(input) {
|
|
|
16348
16344
|
const start = offsets[cut.firstPacket];
|
|
16349
16345
|
layout.partStarts[index] = start;
|
|
16350
16346
|
const end = offsets[last] + track.sizes[last];
|
|
16351
|
-
|
|
16347
|
+
writeFileSync8(join33(input.planDir, chunkAudioSlicePath(index)), bytes.subarray(start, end));
|
|
16352
16348
|
});
|
|
16353
16349
|
const frame = [bytes.subarray(0, payloadStart), bytes.subarray(payloadEnd)];
|
|
16354
|
-
|
|
16355
|
-
|
|
16350
|
+
writeFileSync8(join33(input.planDir, SLICE_FRAME), Buffer.concat(frame));
|
|
16351
|
+
writeFileSync8(join33(input.planDir, SLICE_LAYOUT), JSON.stringify(layout));
|
|
16356
16352
|
}
|
|
16357
16353
|
function chunkAudioSource(planDir, chunkIndex, scratchPath) {
|
|
16358
16354
|
const layoutPath = join33(planDir, SLICE_LAYOUT);
|
|
16359
|
-
if (!
|
|
16355
|
+
if (!existsSync23(layoutPath)) return resolvePlanAudioPath(planDir);
|
|
16360
16356
|
const layout = JSON.parse(readFileSync9(layoutPath, "utf-8"));
|
|
16361
16357
|
const frame = readFileSync9(join33(planDir, SLICE_FRAME));
|
|
16362
16358
|
const fd = openSync5(scratchPath, "w");
|
|
@@ -16916,7 +16912,7 @@ function createVideoSourceShipper(input) {
|
|
|
16916
16912
|
let result = null;
|
|
16917
16913
|
for (const root of stagedRel === null ? [input.workCompiledDir, input.projectDir] : []) {
|
|
16918
16914
|
const rel = pathInside(root, srcPath);
|
|
16919
|
-
if (rel !== null && (
|
|
16915
|
+
if (rel !== null && (existsSync24(join35(input.planDir, "compiled", rel)) || input.isRemote(srcPath))) {
|
|
16920
16916
|
result = ["compiled", ...rel.split(sep2)].join("/");
|
|
16921
16917
|
break;
|
|
16922
16918
|
}
|
|
@@ -16944,7 +16940,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
16944
16940
|
useGpu: false,
|
|
16945
16941
|
browserGpuMode: "software"
|
|
16946
16942
|
});
|
|
16947
|
-
if (!
|
|
16943
|
+
if (!existsSync24(planDir)) mkdirSync12(planDir, { recursive: true });
|
|
16948
16944
|
const log = config.logger ?? defaultLogger;
|
|
16949
16945
|
const sizeLimitBytes = options.executionPlanSizeLimitBytes ?? config.planDirSizeLimitBytes ?? PLAN_DIR_SIZE_LIMIT_BYTES;
|
|
16950
16946
|
const abortSignal = config.abortSignal;
|
|
@@ -16974,7 +16970,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
16974
16970
|
});
|
|
16975
16971
|
const entryFile = config.entryFile ?? "index.html";
|
|
16976
16972
|
const htmlPath = join35(projectDir, entryFile);
|
|
16977
|
-
if (!
|
|
16973
|
+
if (!existsSync24(htmlPath)) {
|
|
16978
16974
|
throw new Error(`[plan] entry file not found: ${htmlPath}`);
|
|
16979
16975
|
}
|
|
16980
16976
|
const workDir = join35(planDir, ".plan-work");
|
|
@@ -17018,7 +17014,6 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
17018
17014
|
urlByAbsentLocalPath,
|
|
17019
17015
|
projectDir,
|
|
17020
17016
|
workDir,
|
|
17021
|
-
htmlPath,
|
|
17022
17017
|
entryFile,
|
|
17023
17018
|
job,
|
|
17024
17019
|
cfg,
|
|
@@ -17094,7 +17089,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
17094
17089
|
if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
|
|
17095
17090
|
if (probeResult.probeSession) {
|
|
17096
17091
|
try {
|
|
17097
|
-
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-
|
|
17092
|
+
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-272JLFKW.js");
|
|
17098
17093
|
await closeCaptureSession2(probeResult.probeSession);
|
|
17099
17094
|
} catch (err) {
|
|
17100
17095
|
log.warn("[plan] probe session close failed", {
|
|
@@ -17203,15 +17198,15 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
|
|
|
17203
17198
|
logPlanStage(log, "extract", stageStarted);
|
|
17204
17199
|
const stagedVideoFrames = join35(compiledDir, "__hyperframes_video_frames");
|
|
17205
17200
|
const videoFramesDst = join35(planDir, "video-frames");
|
|
17206
|
-
if (
|
|
17201
|
+
if (existsSync24(videoFramesDst)) rmSync10(videoFramesDst, { recursive: true, force: true });
|
|
17207
17202
|
const videoSourcesDir = join35(planDir, "video-sources");
|
|
17208
17203
|
rmSync10(videoSourcesDir, { recursive: true, force: true });
|
|
17209
|
-
if (
|
|
17204
|
+
if (existsSync24(stagedVideoFrames)) {
|
|
17210
17205
|
renameWithRetry(stagedVideoFrames, videoFramesDst);
|
|
17211
17206
|
} else {
|
|
17212
17207
|
mkdirSync12(videoFramesDst, { recursive: true });
|
|
17213
17208
|
}
|
|
17214
|
-
if (
|
|
17209
|
+
if (existsSync24(finalCompiledDir)) rmSync10(finalCompiledDir, { recursive: true, force: true });
|
|
17215
17210
|
renameWithRetry(compiledDir, finalCompiledDir);
|
|
17216
17211
|
const shipVideoSource = createVideoSourceShipper({
|
|
17217
17212
|
planDir,
|
|
@@ -17250,7 +17245,7 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
|
|
|
17250
17245
|
sizeBytes
|
|
17251
17246
|
}))
|
|
17252
17247
|
);
|
|
17253
|
-
|
|
17248
|
+
writeFileSync9(
|
|
17254
17249
|
join35(planDir, PLAN_VIDEOS_META_RELATIVE_PATH),
|
|
17255
17250
|
JSON.stringify(planVideosJson, null, 2),
|
|
17256
17251
|
"utf-8"
|
|
@@ -17331,10 +17326,10 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
|
|
|
17331
17326
|
applyDistributedAudioWarningPolicy(job, audioResult.audioError, audioResult.audioFailures, log);
|
|
17332
17327
|
}
|
|
17333
17328
|
const planAudioPath = join35(planDir, PLAN_AUDIO_RELATIVE_PATH);
|
|
17334
|
-
if (audioResult?.hasAudio &&
|
|
17329
|
+
if (audioResult?.hasAudio && existsSync24(audioResult.audioOutputPath)) {
|
|
17335
17330
|
renameWithRetry(audioResult.audioOutputPath, planAudioPath);
|
|
17336
17331
|
}
|
|
17337
|
-
if (chunksCarryAudio &&
|
|
17332
|
+
if (chunksCarryAudio && existsSync24(planAudioPath)) {
|
|
17338
17333
|
if (options.sliceChunkAudio) {
|
|
17339
17334
|
stageStarted = Date.now();
|
|
17340
17335
|
await writeChunkAudioSlices({
|
|
@@ -17452,14 +17447,14 @@ async function plan(projectDir, config, planDir, options = {}) {
|
|
|
17452
17447
|
|
|
17453
17448
|
// ../producer/src/services/distributed/renderChunk.ts
|
|
17454
17449
|
import { randomBytes } from "crypto";
|
|
17455
|
-
import { existsSync as
|
|
17450
|
+
import { existsSync as existsSync27, mkdirSync as mkdirSync15, readFileSync as readFileSync11, readdirSync as readdirSync10, rmSync as rmSync13, writeFileSync as writeFileSync12 } from "fs";
|
|
17456
17451
|
import { cpus as cpus3 } from "os";
|
|
17457
17452
|
import { join as join39 } from "path";
|
|
17458
17453
|
|
|
17459
17454
|
// ../producer/src/services/distributed/planV2.ts
|
|
17460
17455
|
import {
|
|
17461
17456
|
copyFileSync as copyFileSync6,
|
|
17462
|
-
existsSync as
|
|
17457
|
+
existsSync as existsSync26,
|
|
17463
17458
|
lstatSync as lstatSync3,
|
|
17464
17459
|
mkdirSync as mkdirSync14,
|
|
17465
17460
|
mkdtempSync as mkdtempSync6,
|
|
@@ -17467,7 +17462,7 @@ import {
|
|
|
17467
17462
|
readdirSync as readdirSync9,
|
|
17468
17463
|
rmSync as rmSync12,
|
|
17469
17464
|
statSync as statSync8,
|
|
17470
|
-
writeFileSync as
|
|
17465
|
+
writeFileSync as writeFileSync11
|
|
17471
17466
|
} from "fs";
|
|
17472
17467
|
import { tmpdir as tmpdir3 } from "os";
|
|
17473
17468
|
import { dirname as dirname14, isAbsolute as isAbsolute3, join as join38, relative as relative6, resolve as resolve8, sep as sep3 } from "path";
|
|
@@ -17475,13 +17470,13 @@ import { dirname as dirname14, isAbsolute as isAbsolute3, join as join38, relati
|
|
|
17475
17470
|
// ../producer/src/services/distributed/planV2Publisher.ts
|
|
17476
17471
|
import {
|
|
17477
17472
|
copyFileSync as copyFileSync5,
|
|
17478
|
-
existsSync as
|
|
17473
|
+
existsSync as existsSync25,
|
|
17479
17474
|
linkSync as linkSync2,
|
|
17480
17475
|
mkdirSync as mkdirSync13,
|
|
17481
17476
|
mkdtempSync as mkdtempSync5,
|
|
17482
17477
|
rmSync as rmSync11,
|
|
17483
17478
|
statSync as statSync7,
|
|
17484
|
-
writeFileSync as
|
|
17479
|
+
writeFileSync as writeFileSync10
|
|
17485
17480
|
} from "fs";
|
|
17486
17481
|
import { dirname as dirname13, join as join37 } from "path";
|
|
17487
17482
|
|
|
@@ -17543,7 +17538,7 @@ var LocalPlanV2ArtifactPublisher = class {
|
|
|
17543
17538
|
#linkFile;
|
|
17544
17539
|
#committed = false;
|
|
17545
17540
|
constructor(destinationDir, options = {}) {
|
|
17546
|
-
if (
|
|
17541
|
+
if (existsSync25(destinationDir)) {
|
|
17547
17542
|
throw new PlanV2IntegrityError(`output directory already exists: ${destinationDir}`);
|
|
17548
17543
|
}
|
|
17549
17544
|
this.destinationDir = destinationDir;
|
|
@@ -17560,7 +17555,7 @@ var LocalPlanV2ArtifactPublisher = class {
|
|
|
17560
17555
|
);
|
|
17561
17556
|
}
|
|
17562
17557
|
const destinationPath = planV2BlobPath(this.temporaryDir, digest);
|
|
17563
|
-
if (
|
|
17558
|
+
if (existsSync25(destinationPath)) return;
|
|
17564
17559
|
mkdirSync13(dirname13(destinationPath), { recursive: true });
|
|
17565
17560
|
const stagingDir = mkdtempSync5(join37(dirname13(destinationPath), ".plan-v2-blob-"));
|
|
17566
17561
|
const temporaryPath = join37(stagingDir, "blob");
|
|
@@ -17578,13 +17573,13 @@ var LocalPlanV2ArtifactPublisher = class {
|
|
|
17578
17573
|
}
|
|
17579
17574
|
async commitManifest(manifestBytes) {
|
|
17580
17575
|
for (const digest of new Set(manifestDigests(manifestBytes))) {
|
|
17581
|
-
if (!
|
|
17576
|
+
if (!existsSync25(planV2BlobPath(this.temporaryDir, digest))) {
|
|
17582
17577
|
throw new PlanV2IntegrityError(
|
|
17583
17578
|
`cannot commit manifest before referenced blob is durable: ${digest}`
|
|
17584
17579
|
);
|
|
17585
17580
|
}
|
|
17586
17581
|
}
|
|
17587
|
-
|
|
17582
|
+
writeFileSync10(join37(this.temporaryDir, "plan.json"), manifestBytes, "utf-8");
|
|
17588
17583
|
renameWithRetry(this.temporaryDir, this.destinationDir);
|
|
17589
17584
|
this.#committed = true;
|
|
17590
17585
|
}
|
|
@@ -17657,7 +17652,7 @@ function assertValidExtractionCacheCompleteSentinel(path) {
|
|
|
17657
17652
|
}
|
|
17658
17653
|
function validateExtractionCacheCompleteSentinels(executionPlanDir) {
|
|
17659
17654
|
const videoRoot = join38(executionPlanDir, "video-frames");
|
|
17660
|
-
if (!
|
|
17655
|
+
if (!existsSync26(videoRoot)) return;
|
|
17661
17656
|
for (const videoEntry of readdirSync9(videoRoot, { withFileTypes: true })) {
|
|
17662
17657
|
if (!videoEntry.isDirectory()) continue;
|
|
17663
17658
|
const videoDir = join38(videoRoot, videoEntry.name);
|
|
@@ -17758,7 +17753,7 @@ function parsePlanVideosJson2(value) {
|
|
|
17758
17753
|
}
|
|
17759
17754
|
function materializeExtractedVideoDirectories(planDir) {
|
|
17760
17755
|
const videosPath = join38(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
|
|
17761
|
-
if (!
|
|
17756
|
+
if (!existsSync26(videosPath)) return;
|
|
17762
17757
|
const videos = parsePlanVideosJson2(readJsonFile(videosPath, PLAN_VIDEOS_META_RELATIVE_PATH));
|
|
17763
17758
|
for (const video of videos.extracted) {
|
|
17764
17759
|
mkdirSync14(resolveExtractedVideoOutputDir(planDir, video.videoId), { recursive: true });
|
|
@@ -17792,9 +17787,9 @@ function parseChunkSlices(value) {
|
|
|
17792
17787
|
}
|
|
17793
17788
|
function buildVideoChunkDependencies(executionPlanDir, dimensions) {
|
|
17794
17789
|
const videoRoot = join38(executionPlanDir, "video-frames");
|
|
17795
|
-
const hasExtractedFrames =
|
|
17790
|
+
const hasExtractedFrames = existsSync26(videoRoot) && listFiles(videoRoot).length > 0;
|
|
17796
17791
|
const videosPath = join38(executionPlanDir, PLAN_VIDEOS_META_RELATIVE_PATH);
|
|
17797
|
-
if (!
|
|
17792
|
+
if (!existsSync26(videosPath)) {
|
|
17798
17793
|
return hasExtractedFrames ? { mode: "full-source-pack", dependencies: null } : { mode: "exact-rendered-frames", dependencies: /* @__PURE__ */ new Map() };
|
|
17799
17794
|
}
|
|
17800
17795
|
const chunksPath = join38(executionPlanDir, "meta", "chunks.json");
|
|
@@ -17851,7 +17846,7 @@ function computeManifestHash(manifest) {
|
|
|
17851
17846
|
return sha256Hex(`${PLAN_V2_HASH_PREFIX}${canonicalJsonStringify(manifestPayload(manifest))}`);
|
|
17852
17847
|
}
|
|
17853
17848
|
function writeBlob(sourcePath, destinationPath) {
|
|
17854
|
-
if (
|
|
17849
|
+
if (existsSync26(destinationPath)) return;
|
|
17855
17850
|
mkdirSync14(dirname14(destinationPath), { recursive: true });
|
|
17856
17851
|
const temporaryDir = mkdtempSync6(join38(dirname14(destinationPath), ".plan-v2-blob-"));
|
|
17857
17852
|
const temporaryPath = join38(temporaryDir, "blob");
|
|
@@ -17891,7 +17886,7 @@ async function putTasks(tasks) {
|
|
|
17891
17886
|
}
|
|
17892
17887
|
function buildPlanV2Publication(executionPlanDir, digests) {
|
|
17893
17888
|
const executionPlanPath = join38(executionPlanDir, "plan.json");
|
|
17894
|
-
if (!
|
|
17889
|
+
if (!existsSync26(executionPlanPath)) {
|
|
17895
17890
|
throw new PlanV2IntegrityError(`execution plan is missing plan.json: ${executionPlanPath}`);
|
|
17896
17891
|
}
|
|
17897
17892
|
const executionPlanValue = readJsonFile(executionPlanPath, "execution plan.json");
|
|
@@ -17971,7 +17966,7 @@ function buildPlanV2Publication(executionPlanDir, digests) {
|
|
|
17971
17966
|
};
|
|
17972
17967
|
}
|
|
17973
17968
|
function createPlanV2FromExecutionPlan(executionPlanDir, planV2Dir) {
|
|
17974
|
-
if (
|
|
17969
|
+
if (existsSync26(planV2Dir)) {
|
|
17975
17970
|
throw new PlanV2IntegrityError(`output directory already exists: ${planV2Dir}`);
|
|
17976
17971
|
}
|
|
17977
17972
|
const publication = buildPlanV2Publication(executionPlanDir);
|
|
@@ -17984,7 +17979,7 @@ function createPlanV2FromExecutionPlan(executionPlanDir, planV2Dir) {
|
|
|
17984
17979
|
for (const blob of publication.blobs) {
|
|
17985
17980
|
writeBlob(blob.sourcePath, planV2BlobPath(tempDir, blob.sha256));
|
|
17986
17981
|
}
|
|
17987
|
-
|
|
17982
|
+
writeFileSync11(
|
|
17988
17983
|
join38(tempDir, "plan.json"),
|
|
17989
17984
|
canonicalJsonStringify(publication.manifest),
|
|
17990
17985
|
"utf-8"
|
|
@@ -18057,7 +18052,7 @@ async function planV2WithPublisher(projectDir, config, publisher, options = {})
|
|
|
18057
18052
|
}
|
|
18058
18053
|
}
|
|
18059
18054
|
async function planV2(projectDir, config, planV2Dir) {
|
|
18060
|
-
if (
|
|
18055
|
+
if (existsSync26(planV2Dir)) {
|
|
18061
18056
|
throw new PlanV2IntegrityError(`output directory already exists: ${planV2Dir}`);
|
|
18062
18057
|
}
|
|
18063
18058
|
const publisher = new LocalPlanV2ArtifactPublisher(planV2Dir);
|
|
@@ -18211,7 +18206,7 @@ function parsePlanV2Manifest(value) {
|
|
|
18211
18206
|
}
|
|
18212
18207
|
function readPlanV2Manifest(planV2Dir) {
|
|
18213
18208
|
const manifestPath = join38(planV2Dir, "plan.json");
|
|
18214
|
-
if (!
|
|
18209
|
+
if (!existsSync26(manifestPath)) {
|
|
18215
18210
|
throw new PlanV2IntegrityError(`missing v2 manifest: ${manifestPath}`);
|
|
18216
18211
|
}
|
|
18217
18212
|
const value = readJsonFile(manifestPath, "v2 manifest");
|
|
@@ -18230,7 +18225,7 @@ function listPlanV2ArtifactsForTarget(manifest, target) {
|
|
|
18230
18225
|
}
|
|
18231
18226
|
function verifyBlob(planV2Dir, artifact) {
|
|
18232
18227
|
const sourcePath = planV2BlobPath(planV2Dir, artifact.sha256);
|
|
18233
|
-
if (!
|
|
18228
|
+
if (!existsSync26(sourcePath)) {
|
|
18234
18229
|
throw new PlanV2IntegrityError(`missing content-addressed artifact ${artifact.sha256}`);
|
|
18235
18230
|
}
|
|
18236
18231
|
const stats = statSync8(sourcePath);
|
|
@@ -18243,7 +18238,7 @@ function verifyBlob(planV2Dir, artifact) {
|
|
|
18243
18238
|
return sourcePath;
|
|
18244
18239
|
}
|
|
18245
18240
|
function materializePlanV2Target(planV2Dir, target, destinationDir, options = {}) {
|
|
18246
|
-
if (
|
|
18241
|
+
if (existsSync26(destinationDir)) {
|
|
18247
18242
|
throw new PlanV2IntegrityError(`materialization destination already exists: ${destinationDir}`);
|
|
18248
18243
|
}
|
|
18249
18244
|
const manifest = readPlanV2Manifest(planV2Dir);
|
|
@@ -18264,7 +18259,7 @@ function materializePlanV2Target(planV2Dir, target, destinationDir, options = {}
|
|
|
18264
18259
|
copyFileSync6(sourcePath, destinationPath);
|
|
18265
18260
|
}
|
|
18266
18261
|
if (target.role === "chunk") materializeExtractedVideoDirectories(tempDir);
|
|
18267
|
-
|
|
18262
|
+
writeFileSync11(
|
|
18268
18263
|
join38(tempDir, PLAN_V2_MATERIALIZATION_MARKER),
|
|
18269
18264
|
canonicalJsonStringify({
|
|
18270
18265
|
manifest,
|
|
@@ -18308,7 +18303,7 @@ function validatePlanV2MaterializedTarget(planDir, expectedTarget) {
|
|
|
18308
18303
|
}
|
|
18309
18304
|
function readValidatedPlanV2Materialization(planDir, expectedTarget) {
|
|
18310
18305
|
const markerPath = join38(planDir, PLAN_V2_MATERIALIZATION_MARKER);
|
|
18311
|
-
if (!
|
|
18306
|
+
if (!existsSync26(markerPath)) return null;
|
|
18312
18307
|
const marker = readJsonFile(markerPath, "materialization marker");
|
|
18313
18308
|
if (!isRecord3(marker) || !isRecord3(marker.manifest) || !isRecord3(marker.target)) {
|
|
18314
18309
|
throw new PlanV2IntegrityError("malformed materialization marker");
|
|
@@ -18326,7 +18321,7 @@ function readValidatedPlanV2Materialization(planDir, expectedTarget) {
|
|
|
18326
18321
|
for (const artifact of required) {
|
|
18327
18322
|
if (Object.hasOwn(remoteSources, artifact.path)) continue;
|
|
18328
18323
|
const path = join38(planDir, ...artifact.path.split("/"));
|
|
18329
|
-
if (!
|
|
18324
|
+
if (!existsSync26(path) || statSync8(path).size !== artifact.sizeBytes) {
|
|
18330
18325
|
throw new PlanV2IntegrityError(
|
|
18331
18326
|
`materialized artifact missing or truncated: ${artifact.path}`
|
|
18332
18327
|
);
|
|
@@ -18465,7 +18460,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
18465
18460
|
const planJsonPath = join39(planDir, "plan.json");
|
|
18466
18461
|
const encoderJsonPath = join39(planDir, "meta", "encoder.json");
|
|
18467
18462
|
const chunksJsonPath = join39(planDir, "meta", "chunks.json");
|
|
18468
|
-
if (!
|
|
18463
|
+
if (!existsSync27(planJsonPath)) {
|
|
18469
18464
|
throw new RenderChunkValidationError(
|
|
18470
18465
|
MISSING_PLAN_ARTIFACT,
|
|
18471
18466
|
`[renderChunk] planDir is missing required artifact: ${planJsonPath}`
|
|
@@ -18481,7 +18476,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
18481
18476
|
const v2Manifest = v2Materialization?.manifest ?? null;
|
|
18482
18477
|
const remoteSources = v2Materialization?.remoteSources ?? {};
|
|
18483
18478
|
for (const required of [encoderJsonPath, chunksJsonPath]) {
|
|
18484
|
-
if (!
|
|
18479
|
+
if (!existsSync27(required)) {
|
|
18485
18480
|
throw new RenderChunkValidationError(
|
|
18486
18481
|
MISSING_PLAN_ARTIFACT,
|
|
18487
18482
|
`[renderChunk] planDir is missing required artifact: ${required}`
|
|
@@ -18492,7 +18487,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
18492
18487
|
const chunks = JSON.parse(readFileSync11(chunksJsonPath, "utf-8"));
|
|
18493
18488
|
const videosJsonPath = join39(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
|
|
18494
18489
|
let planVideos = null;
|
|
18495
|
-
if (
|
|
18490
|
+
if (existsSync27(videosJsonPath)) {
|
|
18496
18491
|
try {
|
|
18497
18492
|
planVideos = validatePlanVideosForChunk(JSON.parse(readFileSync11(videosJsonPath, "utf-8")));
|
|
18498
18493
|
} catch (err) {
|
|
@@ -18523,7 +18518,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
18523
18518
|
const range = resolveChunkFrameRange(slice, chunkIndex, options?.frameRange);
|
|
18524
18519
|
const framesInChunk = range.endFrame - range.startFrame;
|
|
18525
18520
|
const compiledDir = join39(planDir, "compiled");
|
|
18526
|
-
if (!
|
|
18521
|
+
if (!existsSync27(compiledDir)) {
|
|
18527
18522
|
throw new RenderChunkValidationError(
|
|
18528
18523
|
MISSING_PLAN_ARTIFACT,
|
|
18529
18524
|
`[renderChunk] planDir missing compiled/ directory: ${compiledDir}`
|
|
@@ -18773,10 +18768,10 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
18773
18768
|
const effectiveBitrate = encoder.crf != null ? void 0 : encoder.bitrate;
|
|
18774
18769
|
const videoOnlyPath = encoder.chunksCarryAudio ? `${outputChunkPath}.video.mp4` : outputChunkPath;
|
|
18775
18770
|
if (isPngSequence) {
|
|
18776
|
-
if (!
|
|
18771
|
+
if (!existsSync27(outputChunkPath)) mkdirSync15(outputChunkPath, { recursive: true });
|
|
18777
18772
|
} else {
|
|
18778
18773
|
const outDir = join39(outputChunkPath, "..");
|
|
18779
|
-
if (!
|
|
18774
|
+
if (!existsSync27(outDir)) mkdirSync15(outDir, { recursive: true });
|
|
18780
18775
|
}
|
|
18781
18776
|
const encodeInput = {
|
|
18782
18777
|
job,
|
|
@@ -18986,7 +18981,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
18986
18981
|
producerVersion: plan2.producerVersion,
|
|
18987
18982
|
ffmpegVersion
|
|
18988
18983
|
};
|
|
18989
|
-
|
|
18984
|
+
writeFileSync12(perfPath, `${JSON.stringify(perfPayload, null, 2)}
|
|
18990
18985
|
`, "utf-8");
|
|
18991
18986
|
try {
|
|
18992
18987
|
rmSync13(workDir, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });
|
|
@@ -19636,11 +19631,11 @@ function renderRequestFromDistributedConfig(input) {
|
|
|
19636
19631
|
|
|
19637
19632
|
// ../producer/src/server.ts
|
|
19638
19633
|
import {
|
|
19639
|
-
existsSync as
|
|
19634
|
+
existsSync as existsSync30,
|
|
19640
19635
|
mkdirSync as mkdirSync17,
|
|
19641
19636
|
statSync as statSync10,
|
|
19642
19637
|
mkdtempSync as mkdtempSync8,
|
|
19643
|
-
writeFileSync as
|
|
19638
|
+
writeFileSync as writeFileSync13,
|
|
19644
19639
|
rmSync as rmSync15,
|
|
19645
19640
|
createReadStream as createReadStream5
|
|
19646
19641
|
} from "fs";
|
|
@@ -19654,7 +19649,7 @@ import { serve as serve2 } from "@hono/node-server";
|
|
|
19654
19649
|
|
|
19655
19650
|
// ../producer/src/services/hyperframeLint.ts
|
|
19656
19651
|
import {
|
|
19657
|
-
existsSync as
|
|
19652
|
+
existsSync as existsSync28,
|
|
19658
19653
|
readFileSync as readFileSync13,
|
|
19659
19654
|
statSync as statSync9,
|
|
19660
19655
|
openSync as openSync6,
|
|
@@ -19707,7 +19702,7 @@ function readEntryHtml(filePath) {
|
|
|
19707
19702
|
}
|
|
19708
19703
|
function readProjectEntryFile(projectDir, preferredEntryFile) {
|
|
19709
19704
|
const absProjectDir = resolve9(projectDir);
|
|
19710
|
-
if (!
|
|
19705
|
+
if (!existsSync28(absProjectDir) || !statSync9(absProjectDir).isDirectory()) {
|
|
19711
19706
|
return { error: `Project directory not found: ${absProjectDir}` };
|
|
19712
19707
|
}
|
|
19713
19708
|
const entryCandidates = [preferredEntryFile, "index.html", "src/index.html"].filter(
|
|
@@ -19776,7 +19771,7 @@ async function runHyperframeLint(prepared) {
|
|
|
19776
19771
|
import { Worker as Worker2 } from "worker_threads";
|
|
19777
19772
|
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
19778
19773
|
import { dirname as dirname15, join as join42 } from "path";
|
|
19779
|
-
import { existsSync as
|
|
19774
|
+
import { existsSync as existsSync29 } from "fs";
|
|
19780
19775
|
var DEFAULT_HEALTH_PORT = 9848;
|
|
19781
19776
|
async function startHealthWorker(options = {}) {
|
|
19782
19777
|
const log = options.logger ?? defaultLogger2();
|
|
@@ -19853,7 +19848,7 @@ function resolveWorkerEntry2() {
|
|
|
19853
19848
|
const here = dirname15(fileURLToPath6(import.meta.url));
|
|
19854
19849
|
const candidates = [join42(here, "healthWorkerThread.js"), join42(here, "healthWorkerThread.ts")];
|
|
19855
19850
|
for (const candidate of candidates) {
|
|
19856
|
-
if (
|
|
19851
|
+
if (existsSync29(candidate)) return candidate;
|
|
19857
19852
|
}
|
|
19858
19853
|
return void 0;
|
|
19859
19854
|
}
|
|
@@ -19993,7 +19988,7 @@ function resolvePreparedRenderOutput(prepared, rendersDir, log) {
|
|
|
19993
19988
|
const { input, cleanupProjectDir } = prepared;
|
|
19994
19989
|
const absoluteOutputPath = resolveOutputPath(input.projectDir, input.outputPath, rendersDir, log);
|
|
19995
19990
|
const outputDir = dirname16(absoluteOutputPath);
|
|
19996
|
-
if (!
|
|
19991
|
+
if (!existsSync30(outputDir)) mkdirSync17(outputDir, { recursive: true });
|
|
19997
19992
|
return { input, cleanupProjectDir, absoluteOutputPath };
|
|
19998
19993
|
}
|
|
19999
19994
|
function validateRenderOverrides(body) {
|
|
@@ -20034,11 +20029,11 @@ function prepareProjectDirectory(projectDir, options) {
|
|
|
20034
20029
|
const candidate = nonEmptyString(projectDir);
|
|
20035
20030
|
if (!candidate) return null;
|
|
20036
20031
|
const absProjectDir = resolve10(candidate);
|
|
20037
|
-
if (!
|
|
20032
|
+
if (!existsSync30(absProjectDir) || !statSync10(absProjectDir).isDirectory()) {
|
|
20038
20033
|
return { error: `Project directory not found: ${absProjectDir}` };
|
|
20039
20034
|
}
|
|
20040
20035
|
const entry = options.entryFile || "index.html";
|
|
20041
|
-
if (!
|
|
20036
|
+
if (!existsSync30(resolve10(absProjectDir, entry))) {
|
|
20042
20037
|
return { error: `Entry file "${entry}" not found in project directory: ${absProjectDir}` };
|
|
20043
20038
|
}
|
|
20044
20039
|
return { prepared: { input: { projectDir: absProjectDir, ...options } } };
|
|
@@ -20060,7 +20055,7 @@ async function resolveInlineRenderHtml(body) {
|
|
|
20060
20055
|
function materializeInlineProject(html, options) {
|
|
20061
20056
|
const tempRoot = process.env.PRODUCER_TMP_PROJECT_DIR || tmpdir5();
|
|
20062
20057
|
const tempProjectDir = mkdtempSync8(join43(tempRoot, "producer-project-"));
|
|
20063
|
-
|
|
20058
|
+
writeFileSync13(join43(tempProjectDir, "index.html"), html, "utf-8");
|
|
20064
20059
|
return {
|
|
20065
20060
|
prepared: {
|
|
20066
20061
|
input: { projectDir: tempProjectDir, ...options },
|
|
@@ -20130,7 +20125,7 @@ function cleanupTempDir(dir, log) {
|
|
|
20130
20125
|
}
|
|
20131
20126
|
}
|
|
20132
20127
|
function outputFileSize(path) {
|
|
20133
|
-
return
|
|
20128
|
+
return existsSync30(path) ? statSync10(path).size : 0;
|
|
20134
20129
|
}
|
|
20135
20130
|
function createBlockingProgressReporter(log, requestId) {
|
|
20136
20131
|
let lastLoggedPct = -10;
|
|
@@ -20434,7 +20429,7 @@ function createRenderHandlers(options = {}) {
|
|
|
20434
20429
|
if (!artifact) {
|
|
20435
20430
|
return c.json({ success: false, error: "Output artifact not found or expired" }, 404);
|
|
20436
20431
|
}
|
|
20437
|
-
if (!
|
|
20432
|
+
if (!existsSync30(artifact.path)) {
|
|
20438
20433
|
store.delete(token);
|
|
20439
20434
|
return c.json({ success: false, error: "Output artifact file missing" }, 404);
|
|
20440
20435
|
}
|
|
@@ -20481,7 +20476,7 @@ function startServer(options = {}) {
|
|
|
20481
20476
|
});
|
|
20482
20477
|
async function shutdown(signal) {
|
|
20483
20478
|
log.info(`Received ${signal}, shutting down`);
|
|
20484
|
-
const { drainBrowserPool } = await import("./src-
|
|
20479
|
+
const { drainBrowserPool } = await import("./src-272JLFKW.js");
|
|
20485
20480
|
await drainBrowserPool().catch(() => {
|
|
20486
20481
|
});
|
|
20487
20482
|
const handle = await Promise.race([
|
|
@@ -20524,14 +20519,14 @@ import { join as join45 } from "path";
|
|
|
20524
20519
|
// ../producer/src/services/distributed/assemble.ts
|
|
20525
20520
|
import {
|
|
20526
20521
|
cpSync as cpSync3,
|
|
20527
|
-
existsSync as
|
|
20522
|
+
existsSync as existsSync31,
|
|
20528
20523
|
mkdirSync as mkdirSync18,
|
|
20529
20524
|
mkdtempSync as mkdtempSync9,
|
|
20530
20525
|
readFileSync as readFileSync14,
|
|
20531
20526
|
readdirSync as readdirSync11,
|
|
20532
20527
|
rmSync as rmSync16,
|
|
20533
20528
|
statSync as statSync11,
|
|
20534
|
-
writeFileSync as
|
|
20529
|
+
writeFileSync as writeFileSync14
|
|
20535
20530
|
} from "fs";
|
|
20536
20531
|
import { dirname as dirname17, join as join44 } from "path";
|
|
20537
20532
|
function cfrRateControlArgs(locked) {
|
|
@@ -20566,7 +20561,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
20566
20561
|
}
|
|
20567
20562
|
const format = plan2.dimensions.format;
|
|
20568
20563
|
const cfrEncoder = cfr ? readCfrEncoder(planDir, format) : null;
|
|
20569
|
-
if (!
|
|
20564
|
+
if (!existsSync31(dirname17(outputPath))) {
|
|
20570
20565
|
mkdirSync18(dirname17(outputPath), { recursive: true });
|
|
20571
20566
|
}
|
|
20572
20567
|
const workDir = mkdtempSync9(`${outputPath}.assemble-work-`);
|
|
@@ -20590,7 +20585,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
20590
20585
|
try {
|
|
20591
20586
|
const videoSources = cfrEncoder ? [await reencodeCfr(ctx, chunkPaths, cfrEncoder)] : chunkPaths;
|
|
20592
20587
|
const finalPath = join44(workDir, `output.${format}`);
|
|
20593
|
-
const audio = audioPath !== null &&
|
|
20588
|
+
const audio = audioPath !== null && existsSync31(audioPath) ? audioPath : null;
|
|
20594
20589
|
await writeJoined(ctx, videoSources, audio, finalPath);
|
|
20595
20590
|
renameWithRetry(finalPath, outputPath);
|
|
20596
20591
|
log.info("[assemble] stage timings", {
|
|
@@ -20608,7 +20603,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
20608
20603
|
});
|
|
20609
20604
|
}
|
|
20610
20605
|
}
|
|
20611
|
-
const fileSize =
|
|
20606
|
+
const fileSize = existsSync31(outputPath) ? statSync11(outputPath).size : 0;
|
|
20612
20607
|
return {
|
|
20613
20608
|
...referenceBackgroundResult(plan2[REFERENCE_BACKGROUND_FIELD]),
|
|
20614
20609
|
outputPath,
|
|
@@ -20620,13 +20615,13 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
20620
20615
|
function readAssemblePlan(planDir, chunkPaths) {
|
|
20621
20616
|
const planJsonPath = join44(planDir, "plan.json");
|
|
20622
20617
|
const chunksJsonPath = join44(planDir, "meta", "chunks.json");
|
|
20623
|
-
if (!
|
|
20618
|
+
if (!existsSync31(planJsonPath)) {
|
|
20624
20619
|
throw new Error(`[assemble] planDir missing plan.json: ${planJsonPath}`);
|
|
20625
20620
|
}
|
|
20626
20621
|
const plan2 = JSON.parse(readFileSync14(planJsonPath, "utf-8"));
|
|
20627
20622
|
readPlanProtocolV1(plan2, DISTRIBUTED_RENDER_CAPABILITIES.roles.assembler);
|
|
20628
20623
|
validatePlanV2MaterializedTarget(planDir, { role: "assembler" });
|
|
20629
|
-
if (!
|
|
20624
|
+
if (!existsSync31(chunksJsonPath)) {
|
|
20630
20625
|
throw new Error(`[assemble] planDir missing meta/chunks.json: ${chunksJsonPath}`);
|
|
20631
20626
|
}
|
|
20632
20627
|
const chunks = JSON.parse(readFileSync14(chunksJsonPath, "utf-8"));
|
|
@@ -20641,7 +20636,7 @@ function readAssemblePlan(planDir, chunkPaths) {
|
|
|
20641
20636
|
}
|
|
20642
20637
|
}
|
|
20643
20638
|
for (const path of chunkPaths.flat()) {
|
|
20644
|
-
if (!
|
|
20639
|
+
if (!existsSync31(path)) {
|
|
20645
20640
|
throw new Error(`[assemble] chunk path does not exist: ${path}`);
|
|
20646
20641
|
}
|
|
20647
20642
|
}
|
|
@@ -20739,7 +20734,7 @@ async function writeJoined(ctx, videoSources, audioPath, finalPath) {
|
|
|
20739
20734
|
function concatDemuxerInput(chunkPaths, workDir, fpsArg) {
|
|
20740
20735
|
const listPath = join44(workDir, "concat-list.txt");
|
|
20741
20736
|
const body = chunkPaths.map((path) => `file '${path.replace(/'/g, "'\\''")}'`).join("\n");
|
|
20742
|
-
|
|
20737
|
+
writeFileSync14(listPath, `${body}
|
|
20743
20738
|
`, "utf-8");
|
|
20744
20739
|
return ["-r", fpsArg, "-f", "concat", "-safe", "0", "-i", listPath];
|
|
20745
20740
|
}
|
|
@@ -20780,7 +20775,7 @@ function planFormat(planDir) {
|
|
|
20780
20775
|
}
|
|
20781
20776
|
function lockedAudio(planDir) {
|
|
20782
20777
|
const encoderJsonPath = join44(planDir, "meta", "encoder.json");
|
|
20783
|
-
if (!
|
|
20778
|
+
if (!existsSync31(encoderJsonPath)) return {};
|
|
20784
20779
|
return JSON.parse(readFileSync14(encoderJsonPath, "utf-8"));
|
|
20785
20780
|
}
|
|
20786
20781
|
function readCfrEncoder(planDir, format) {
|
|
@@ -20790,7 +20785,7 @@ function readCfrEncoder(planDir, format) {
|
|
|
20790
20785
|
);
|
|
20791
20786
|
}
|
|
20792
20787
|
const encoderJsonPath = join44(planDir, "meta", "encoder.json");
|
|
20793
|
-
if (!
|
|
20788
|
+
if (!existsSync31(encoderJsonPath)) {
|
|
20794
20789
|
throw new Error(`[assemble] planDir missing meta/encoder.json: ${encoderJsonPath}`);
|
|
20795
20790
|
}
|
|
20796
20791
|
const encoderJson = JSON.parse(readFileSync14(encoderJsonPath, "utf-8"));
|
|
@@ -20802,7 +20797,7 @@ function readCfrEncoder(planDir, format) {
|
|
|
20802
20797
|
return encoderJson;
|
|
20803
20798
|
}
|
|
20804
20799
|
function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, startTimeMs) {
|
|
20805
|
-
if (
|
|
20800
|
+
if (existsSync31(outputPath)) rmSync16(outputPath, { recursive: true, force: true });
|
|
20806
20801
|
mkdirSync18(outputPath, { recursive: true });
|
|
20807
20802
|
let globalIdx = 0;
|
|
20808
20803
|
for (const chunkDir of chunkPaths) {
|
|
@@ -20826,7 +20821,7 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
|
|
|
20826
20821
|
`[assemble] png-sequence frame count mismatch: merged ${globalIdx} frames vs plan.totalFrames=${totalFrames}. Using on-disk count.`
|
|
20827
20822
|
);
|
|
20828
20823
|
}
|
|
20829
|
-
if (audioPath !== null &&
|
|
20824
|
+
if (audioPath !== null && existsSync31(audioPath)) {
|
|
20830
20825
|
const sidecar = join44(outputPath, MIXED_AUDIO_FILENAME);
|
|
20831
20826
|
cpSync3(audioPath, sidecar);
|
|
20832
20827
|
}
|
|
@@ -20888,7 +20883,7 @@ import { extname as extname7 } from "path";
|
|
|
20888
20883
|
var AUDIO_SIDECAR_MIN_BYTES = 32 * 1024 * 1024;
|
|
20889
20884
|
|
|
20890
20885
|
// ../producer/src/services/distributed/probeFacts.ts
|
|
20891
|
-
import { writeFileSync as
|
|
20886
|
+
import { writeFileSync as writeFileSync15 } from "fs";
|
|
20892
20887
|
import { extname as extname8 } from "path";
|
|
20893
20888
|
|
|
20894
20889
|
export {
|