hyperframes 0.9.20 → 0.9.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-6U3Y7DEN.js → add-VQVP3JPZ.js} +11 -11
- package/dist/{agentPromptGenerator-2U62YSRT.js → agentPromptGenerator-PAFWQGHU.js} +6 -6
- package/dist/{animatedGifPrep-RC6CYTRI.js → animatedGifPrep-AK26JDVM.js} +6 -6
- package/dist/api.js +29 -29
- package/dist/{asset-ER2CUS6B.js → asset-N6RZSN44.js} +2 -2
- package/dist/{assetCataloger-425SRTPW.js → assetCataloger-GWF6II54.js} +7 -7
- package/dist/{audio-JUAMPMWA.js → audio-ZHVBBQRA.js} +15 -15
- package/dist/{auth-DQ52RE6K.js → auth-AJM3YSN6.js} +2 -2
- package/dist/{autoUpdate-YUZGZ5ZI.js → autoUpdate-GV4LPAJX.js} +2 -2
- package/dist/{avatars-F4HNQISE.js → avatars-5EKOR2DW.js} +10 -10
- package/dist/{backgroundChecks-MSOJBGL7.js → backgroundChecks-J4XJD4ET.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-33AZEDWV.js → batchRender-UKQ36JT2.js} +3 -3
- package/dist/{beats-WI3UU5KD.js → beats-LXYHFVPP.js} +8 -8
- package/dist/{benchmark-ZE5Y75YM.js → benchmark-KXR56MIT.js} +8 -8
- package/dist/{billing-N4BCUG7R.js → billing-3XQYSAKP.js} +10 -10
- package/dist/{browser-HUOPVD2U.js → browser-P52FDITF.js} +5 -5
- package/dist/{bundleWithLocalizedFonts-PRR3UAJT.js → bundleWithLocalizedFonts-I3KWYN6X.js} +1 -1
- package/dist/{capture-2QNE2DEY.js → capture-2PSBIAL2.js} +3 -3
- package/dist/{capture-UWQ2GBML.js → capture-SMWSGGMG.js} +13 -13
- package/dist/{captureCompositionFrame-S2A5KJUT.js → captureCompositionFrame-WRY5ATM7.js} +12 -12
- package/dist/{catalog-BQZ55PQP.js → catalog-JIO6RXSR.js} +11 -11
- package/dist/{catch-up-JFII6DVC.js → catch-up-A73H7VGC.js} +6 -6
- package/dist/{check-KPFCL46S.js → check-FI7SUTK7.js} +37 -37
- package/dist/{checkAudio-NTES344V.js → checkAudio-73DDBXXJ.js} +9 -9
- package/dist/{checkBrowser-WQWRQO2X.js → checkBrowser-X5VVYQES.js} +31 -31
- package/dist/{chunk-IY4I7TV4.js → chunk-2HRKRRQH.js} +2 -2
- package/dist/{chunk-4XOQILDV.js → chunk-3FG3YAHZ.js} +1 -1
- package/dist/{chunk-UXEUKILH.js → chunk-3OIUJOIR.js} +1 -1
- package/dist/{chunk-MQFX4OD3.js → chunk-3TLAQU62.js} +1 -1
- package/dist/{chunk-3WLJMGCI.js → chunk-3ZXKEGKV.js} +1 -1
- package/dist/{chunk-35APUSDP.js → chunk-4EL5RKLS.js} +1 -1
- package/dist/{chunk-IBXWPFGK.js → chunk-4EMQHF3T.js} +2 -2
- package/dist/{chunk-KPCCWI5Q.js → chunk-4FNJ2QNP.js} +2 -2
- package/dist/{chunk-NZ6JYCGU.js → chunk-4NLG5TO6.js} +3 -3
- package/dist/{chunk-CKZQQ2DO.js → chunk-4UXCWPHU.js} +1 -1
- package/dist/{chunk-JXGFZG73.js → chunk-4ZLMVX3O.js} +1 -1
- package/dist/{chunk-QSOIL3EE.js → chunk-5PY66UGZ.js} +3 -3
- package/dist/{chunk-HCUEMQB4.js → chunk-7ETNIXIN.js} +1 -1
- package/dist/{chunk-4EUUYYB3.js → chunk-7EUZAQD6.js} +2 -2
- package/dist/{chunk-LNHMJ555.js → chunk-A2NL7HGF.js} +1 -1
- package/dist/{chunk-FY2QFPEK.js → chunk-A4JU6QUG.js} +1 -1
- package/dist/{chunk-BA3FUJOU.js → chunk-BABCRBAO.js} +38 -4
- package/dist/{chunk-WNPIJ7UG.js → chunk-BUCJXB6D.js} +1 -1
- package/dist/{chunk-3KJW4NNP.js → chunk-C4KYJSSF.js} +8 -8
- package/dist/{chunk-OWBXXAYQ.js → chunk-CFOJE3VR.js} +2 -2
- package/dist/{chunk-RPSR5YSD.js → chunk-CZK7A5IB.js} +4 -4
- package/dist/{chunk-3XJM7XZN.js → chunk-D3NWGOXW.js} +30 -0
- package/dist/{chunk-P2DAWEPF.js → chunk-D7C6NOOO.js} +2 -2
- package/dist/{chunk-TGSBNJYV.js → chunk-DXIGIMRP.js} +2 -2
- package/dist/{chunk-LDV6P3DG.js → chunk-DYPAXBNK.js} +1 -1
- package/dist/{chunk-GNY2WZKA.js → chunk-DZQEPGNY.js} +3 -3
- package/dist/{chunk-VM6PDH32.js → chunk-F4XUCHQQ.js} +1 -1
- package/dist/{chunk-LEVO6XYF.js → chunk-FASKJUYU.js} +33 -22
- package/dist/{chunk-NSNT4DNY.js → chunk-FET6WMTX.js} +2 -2
- package/dist/{chunk-YVFJWUSI.js → chunk-FOX7LXZ2.js} +1 -1
- package/dist/chunk-FRBQYFUV.js +481 -0
- package/dist/{chunk-WMZHESNZ.js → chunk-G5UZHDEZ.js} +2 -2
- package/dist/{chunk-5ECZJECP.js → chunk-G77Z4GWC.js} +1 -1
- package/dist/{chunk-KKNAM57Z.js → chunk-GG7RYSIU.js} +1 -1
- package/dist/{chunk-7PG57ERE.js → chunk-GH6GWAID.js} +1 -1
- package/dist/{chunk-4HWNUBW2.js → chunk-GKOSN3Q6.js} +3 -3
- package/dist/chunk-GREVQ2SM.js +5035 -0
- package/dist/{chunk-POKB2QVF.js → chunk-H7N3J7Y3.js} +2 -2
- package/dist/{chunk-DNWZ66ND.js → chunk-HCFBCEJT.js} +1 -1
- package/dist/{chunk-RFG4XUMQ.js → chunk-I7WVS7WN.js} +1 -1
- package/dist/{chunk-7CGSZ3OR.js → chunk-IFY5ACTF.js} +13 -13
- package/dist/{chunk-Q6DA3X34.js → chunk-IQR26ZJD.js} +3 -3
- package/dist/{chunk-PWP4W2PF.js → chunk-IRWQMKV7.js} +1 -1
- package/dist/{chunk-USRF4NA6.js → chunk-ITO3VCCW.js} +10 -10
- package/dist/{chunk-76HDNQDL.js → chunk-JNN2CTGU.js} +2 -2
- package/dist/{chunk-XACDCHJF.js → chunk-JT6LFFYK.js} +1 -1
- package/dist/{chunk-QUYTXJLE.js → chunk-L2SQTHMP.js} +1 -1
- package/dist/{chunk-OAQTFIWB.js → chunk-L4C4F4O3.js} +3 -3
- package/dist/{chunk-UH6JF4TY.js → chunk-LDO7SB4J.js} +2 -2
- package/dist/{chunk-TKHWUM6J.js → chunk-LGSSYJS2.js} +2 -2
- package/dist/{chunk-XU5LAY46.js → chunk-LIFQONFJ.js} +1 -1
- package/dist/{chunk-5WKW4P6P.js → chunk-LLUKDUVS.js} +28 -15
- package/dist/{chunk-FXPBFARU.js → chunk-LMUF3BGR.js} +1 -1
- package/dist/{chunk-FPM6B5X5.js → chunk-LQBZCXMR.js} +2 -2
- package/dist/{chunk-Y5ZW3BRK.js → chunk-M32FE7JZ.js} +3 -3
- package/dist/{chunk-76IGIELW.js → chunk-M7Z2SEQG.js} +2 -2
- package/dist/{chunk-D3ZYDQMH.js → chunk-MERPHIUD.js} +2 -2
- package/dist/{chunk-JWORQ5WQ.js → chunk-MFDNMTOP.js} +1 -1
- package/dist/{chunk-C2PQTWAH.js → chunk-MNMIIDOX.js} +1 -1
- package/dist/{chunk-N2I2YUL7.js → chunk-NBHVLN5J.js} +7 -7
- package/dist/{chunk-ZNUMTYBZ.js → chunk-NTNNGWKO.js} +3 -3
- package/dist/{chunk-L6XUDQW6.js → chunk-ONBYVA2L.js} +18 -7
- package/dist/{chunk-4J2Y6G2X.js → chunk-OQ6VGBQV.js} +1 -1
- package/dist/{chunk-UECTSXVZ.js → chunk-OXMEC34G.js} +1 -1
- package/dist/{chunk-MHW4MMV4.js → chunk-OXUX73RX.js} +10 -10
- package/dist/{chunk-7DGAJ7RY.js → chunk-P7WDQTQZ.js} +1 -1
- package/dist/{chunk-6FI5JRM3.js → chunk-PJNDSYJV.js} +301 -97
- package/dist/{chunk-M5CDC3VO.js → chunk-PPOJMJR5.js} +25 -15
- package/dist/{chunk-QYWOP6MH.js → chunk-Q2LO2ZF6.js} +3 -3
- package/dist/{chunk-5V3R5ZMY.js → chunk-QAES6F2D.js} +7 -7
- package/dist/{chunk-BQ2U65ZF.js → chunk-QXVJ33BP.js} +99 -13
- package/dist/{chunk-A457YCWN.js → chunk-RLY4LECT.js} +2 -2
- package/dist/{chunk-NHV3G6JH.js → chunk-RQIR2BOG.js} +1 -1
- package/dist/{chunk-5KJWA22L.js → chunk-RYRSI623.js} +5 -5
- package/dist/{chunk-Z745SNN4.js → chunk-TERSCNBN.js} +19 -8
- package/dist/{chunk-X254MPK3.js → chunk-TLNKHH52.js} +1 -1
- package/dist/{chunk-HIT72LVX.js → chunk-UFMWWEL3.js} +7 -7
- package/dist/{chunk-RONKIDIW.js → chunk-W62DJ5ZK.js} +5 -5
- package/dist/{chunk-PGNE33QK.js → chunk-WFEKL42K.js} +33 -15
- package/dist/{chunk-G2C7OTXI.js → chunk-WZCSU7ZP.js} +1 -1
- package/dist/{chunk-7ISXVZHB.js → chunk-XC5PF4T4.js} +4 -4
- package/dist/{chunk-SVOUYNKZ.js → chunk-XQUO3BOS.js} +37 -20
- package/dist/{chunk-XID37ELP.js → chunk-XRNXGF7I.js} +2 -2
- package/dist/{chunk-PAFAOFZZ.js → chunk-YALKIB2K.js} +1 -1
- package/dist/{chunk-SH6P5CMQ.js → chunk-YQV44DRO.js} +1 -1
- package/dist/{chunk-S6MXHF7C.js → chunk-YZKRMBYH.js} +1 -1
- package/dist/{chunk-S45SR3TL.js → chunk-ZEQOP7XA.js} +2 -2
- package/dist/{chunk-TCW3ALLF.js → chunk-ZFYCYUVY.js} +2 -2
- package/dist/{chunk-GH4QTKBM.js → chunk-ZH3SXWCV.js} +7 -7
- package/dist/{chunk-P2GR4V7S.js → chunk-ZNFYQMFN.js} +1 -1
- package/dist/{clean-5FFXB5MF.js → clean-PILJFGU2.js} +16 -16
- package/dist/cli.js +60 -60
- package/dist/{cloud-CINLC3NP.js → cloud-D7DFYONW.js} +2 -2
- package/dist/{cloud-XC5OSAE2.js → cloud-HBMQH4EU.js} +4 -4
- package/dist/{cloudrun-VVU4XERK.js → cloudrun-JZQMF5DS.js} +4 -4
- package/dist/commands/layout-audit.browser.js +287 -23
- package/dist/{compare-6ZVA7JDY.js → compare-5RSAPYJI.js} +28 -28
- package/dist/{compiler-4WKTHUPH.js → compiler-T4BPLRFY.js} +3 -3
- package/dist/{component-CYXNZPHM.js → component-DMHFV7BD.js} +3 -3
- package/dist/{compositions-Z53CMRFQ.js → compositions-OW776OLK.js} +10 -10
- package/dist/{curve-ZLVHONKG.js → curve-4GNM7DWM.js} +10 -10
- package/dist/{cuts-JGHDX4ND.js → cuts-M5R2LKDZ.js} +11 -11
- package/dist/{delete-C6KCUXEV.js → delete-MYG77L66.js} +5 -5
- package/dist/{deploy-3W4FAFBU.js → deploy-FGHE4FID.js} +1 -1
- package/dist/{describeProject-NB7JQQRZ.js → describeProject-SLAKVOOS.js} +7 -7
- package/dist/{diff-77IF7ZGC.js → diff-TNHEXG72.js} +29 -29
- package/dist/{dist-PVM257OR.js → dist-23VTYBIX.js} +9 -9
- package/dist/{dist-LPVHFSCW.js → dist-5ITUK4AA.js} +5 -3
- package/dist/{dist-2MTQQEZT.js → dist-PEDQQRFU.js} +2 -2
- package/dist/{doctor-7ARBZ2FZ.js → doctor-ILCPSC6S.js} +10 -10
- package/dist/{energy-2I6O5IQY.js → energy-SCJII6HC.js} +11 -11
- package/dist/{events-MCXWDE3G.js → events-D2QORX35.js} +2 -2
- package/dist/{events-CG6ZFBPQ.js → events-OHIGKF4W.js} +5 -5
- package/dist/{events-CXZTEW5W.js → events-ZMK5VRA2.js} +13 -13
- package/dist/{extract-NSSKZ7EO.js → extract-OD3LI3YL.js} +11 -11
- package/dist/{face-CZBXJIJD.js → face-SFQDTQXC.js} +11 -11
- package/dist/{feedback-3ZZQHXQA.js → feedback-N3JK4ULK.js} +8 -8
- package/dist/{ffmpeg-KOJQXOMH.js → ffmpeg-E55HQX7V.js} +6 -6
- package/dist/{figma-T77MIMMN.js → figma-JYVZPN5L.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -9
- package/dist/{frames-GMXMQ7DQ.js → frames-BLCIN32Q.js} +12 -12
- package/dist/{generate-PN2N6MQV.js → generate-B7MUYYON.js} +21 -21
- package/dist/{get-AMP7GO2J.js → get-VQWG2NY4.js} +5 -5
- package/dist/{gpuPolicy-336CZTOI.js → gpuPolicy-3TMFL6TM.js} +6 -6
- package/dist/{grade-compare-XHR7XCIJ.js → grade-compare-LCS5CBNW.js} +29 -29
- package/dist/{heifImagePrep-GAATPFZJ.js → heifImagePrep-VHAJEZGL.js} +7 -7
- package/dist/{help-QLT7Q5CF.js → help-GSE5DFSB.js} +1 -1
- package/dist/{history-IBK4ICX6.js → history-RSB65UN3.js} +8 -8
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +73 -73
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-IF6TAH4N.js → info-FLLONVY5.js} +12 -12
- package/dist/{init-7TY3OJ6O.js → init-EAKY3LFR.js} +26 -26
- package/dist/{ink-PGZ7QSBH.js → ink-ZDZVD5CD.js} +11 -11
- package/dist/{inspect-LHLSKDYO.js → inspect-LFEK6HOL.js} +29 -29
- package/dist/{installer-DBTP7YGS.js → installer-5NJVGV6X.js} +4 -4
- package/dist/{keyframes-4M4776JR.js → keyframes-TZBDB442.js} +8 -8
- package/dist/{lambda-FFMB6Y76.js → lambda-RYX5NXX5.js} +10 -10
- package/dist/{layout-LJHS7HFD.js → layout-VATFBERH.js} +29 -29
- package/dist/{lint-2J5AVK6D.js → lint-QAGBHUXZ.js} +22 -12
- package/dist/{lintProject-2OD4CDTW.js → lintProject-BC5ISNKQ.js} +1 -1
- package/dist/{list-MAYBNZEL.js → list-VQZOLGEO.js} +5 -5
- package/dist/{localPage-EKPNDJ27.js → localPage-ZEJ7ZKIE.js} +6 -6
- package/dist/{login-CEU43XKU.js → login-7BL2N6JG.js} +4 -4
- package/dist/{look-IYTF5GLD.js → look-OKDV2W4W.js} +11 -11
- package/dist/{manager-DILAI3UF.js → manager-QPEMMSLW.js} +7 -7
- package/dist/{measure-2WZGYPYI.js → measure-WJ6TR545.js} +11 -11
- package/dist/{media-treatment-NEY3KFIE.js → media-treatment-QYQVLCYP.js} +12 -12
- package/dist/{media-use-3RF5K7J2.js → media-use-OWKQQSPJ.js} +3 -3
- package/dist/{models-JG3K3WHB.js → models-FZ4HL5BX.js} +10 -10
- package/dist/{motionShot-BXTTHXNC.js → motionShot-IHZ544WM.js} +15 -15
- package/dist/{normalize-audio-V42ORWPJ.js → normalize-audio-77ZTAPPL.js} +8 -8
- package/dist/{open-TIGOP4UL.js → open-Q7AAAYVN.js} +66 -15
- package/dist/{parakeetRunner-ECBLSKPA.js → parakeetRunner-TAMKXXNN.js} +11 -11
- package/dist/{pipeline-NAQKFYVO.js → pipeline-MK7LCHQD.js} +9 -9
- package/dist/{play-OCUIRYGT.js → play-WBLWBDBS.js} +19 -19
- package/dist/{preflight-FXN2DIKX.js → preflight-O2EH2LOC.js} +7 -7
- package/dist/{present-EIPGUFX2.js → present-3GW46ZYF.js} +15 -15
- package/dist/{preview-D3DGM36N.js → preview-MPAHNXEJ.js} +53 -499
- package/dist/{probe-LHGNRPYJ.js → probe-4F2PK26B.js} +11 -11
- package/dist/{producer-MUSGQJB5.js → producer-T462QJC7.js} +1 -1
- package/dist/{projectConfig-5XHCXAR2.js → projectConfig-T3WVF6H4.js} +6 -6
- package/dist/{publication-YHI2M2PN.js → publication-DX3VDYCI.js} +2 -2
- package/dist/{publish-DD4ZAHEH.js → publish-VNMKJMAK.js} +10 -10
- package/dist/{remove-background-AJBLAXSV.js → remove-background-7LE4IIOE.js} +10 -10
- package/dist/{render-32BRUXZK.js → render-5PTZ5VLW.js} +5 -5
- package/dist/{render-AKGMPEQ4.js → render-JKUR7OI2.js} +26 -26
- package/dist/{render-LCH7X3UA.js → render-RPHNBD4F.js} +31 -31
- package/dist/{render-batch-BGZ4XDDA.js → render-batch-X2QMZUYH.js} +5 -5
- package/dist/renderSetupWorker.js +1 -1
- package/dist/{resolver-M64IRWRP.js → resolver-AXDCEJ77.js} +4 -4
- package/dist/{reverse-HLLQAI77.js → reverse-DQSOSC5W.js} +1 -1
- package/dist/{run-Q4IUMQIY.js → run-IQLZHH6D.js} +3 -3
- package/dist/{screenshotCapture-INHISXPC.js → screenshotCapture-EAATIOT3.js} +7 -7
- package/dist/{sherpa-MQLZFNTX.js → sherpa-NPPB3DTN.js} +10 -10
- package/dist/skills/hyperframes-cli/references/preview-render.md +1 -1
- package/dist/skills/media-use/audio/scripts/audio.mjs +56 -26
- package/dist/skills/media-use/audio/scripts/lib/media-record.mjs +3 -3
- package/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +16 -1
- package/dist/skills/media-use/audio/scripts/lib/recording.mjs +53 -0
- package/dist/skills/media-use/audio/scripts/lib/voice-credit.mjs +17 -0
- package/dist/skills/media-use/audio/scripts/lib/voice-credit.test.mjs +21 -0
- package/dist/skills/media-use/audio/scripts/recording.test.mjs +139 -0
- package/dist/skills/media-use/references/audio.md +2 -1
- package/dist/{skills-W4F5AJ2K.js → skills-S2ODBBMC.js} +8 -8
- package/dist/{skillsUpdateCheck-GVFHBX3G.js → skillsUpdateCheck-AOCZDRXM.js} +3 -3
- package/dist/{snapshot-34FUMOEG.js → snapshot-SS6WDSZ5.js} +36 -36
- package/dist/{src-M3NYEBA7.js → src-HHRR3UTF.js} +8 -8
- package/dist/{src-VL6XKFAA.js → src-MYVZPRHS.js} +5 -5
- package/dist/{start-A3YWCGDG.js → start-OYIXMJKF.js} +18 -18
- package/dist/{staticProjectServer-6NQWZP3Q.js → staticProjectServer-65X4MWEN.js} +17 -17
- package/dist/{status-ZBUL7MPB.js → status-JEYVWANY.js} +10 -10
- package/dist/studio/assets/{hyperframes-player-ZQZslutT.js → hyperframes-player-DqxUNa9H.js} +3 -3
- package/dist/studio/assets/{index-Bn5atbhb.js → index-CFUJyYA1.js} +1 -1
- package/dist/studio/assets/{index-Bz2pYyGM.js → index-Cq43Ovkf.js} +17 -17
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-CIDVEQUP.js → studio-api-GJGFGQQW.js} +9 -9
- package/dist/{studioServer-4FEM4AAL.js → studioServer-IS27DJNF.js} +48 -48
- package/dist/{sync-PXQD6JNH.js → sync-NLK2RFSR.js} +11 -11
- package/dist/{telemetry-W7PZ4E2A.js → telemetry-BPPPHER2.js} +5 -5
- package/dist/templates/_shared/AGENTS.md +3 -1
- package/dist/templates/_shared/CLAUDE.md +3 -1
- package/dist/{templates-ELZU33UU.js → templates-YWBAFFI4.js} +10 -10
- package/dist/{timeline-O7BR3IKC.js → timeline-FAFHG2G4.js} +17 -17
- package/dist/{tokens-RNFI6LFF.js → tokens-QCZBFNMS.js} +2 -2
- package/dist/{transcribe-GUUUSHHL.js → transcribe-2P6GMYWR.js} +23 -23
- package/dist/{transcribe-XQOGYK6P.js → transcribe-VL3YKFMY.js} +9 -9
- package/dist/{update-J37ZLNH7.js → update-NWDCG6JG.js} +9 -9
- package/dist/{updateCheck-ALBUZ6YM.js → updateCheck-PX4XSKDO.js} +2 -2
- package/dist/{upgrade-NVG73VIE.js → upgrade-VWETDZDT.js} +3 -3
- package/dist/{upload-HBALN6HE.js → upload-PEY7EYFV.js} +3 -2
- package/dist/{urlDownloader-TKEHDA5W.js → urlDownloader-7TVBPNBG.js} +5 -5
- package/dist/{validate-3TFHU3MJ.js → validate-HCJAHDTZ.js} +23 -23
- package/dist/{video-PBNQGPQO.js → video-JDUB5IFM.js} +7 -7
- package/dist/{voices-PF7EV4O4.js → voices-YBKCBC6K.js} +19 -19
- package/dist/warmCheck.js +37 -37
- package/package.json +1 -1
- package/dist/chunk-7DS3STTY.js +0 -5035
|
@@ -20,20 +20,20 @@ import {
|
|
|
20
20
|
idleWindow,
|
|
21
21
|
preResolveHostileMediaProxies,
|
|
22
22
|
rectToBbox
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XQUO3BOS.js";
|
|
24
24
|
import {
|
|
25
25
|
collectProjectMedia,
|
|
26
26
|
mediaPath
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-4NLG5TO6.js";
|
|
28
28
|
import {
|
|
29
29
|
captureArtifactRevision,
|
|
30
30
|
readToolContext,
|
|
31
31
|
reportArtifacts,
|
|
32
32
|
withProjectLock
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-F4XUCHQQ.js";
|
|
34
34
|
import {
|
|
35
35
|
trackLintRun
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-5PY66UGZ.js";
|
|
37
37
|
import {
|
|
38
38
|
CONTENT_OVERLAP_HELD_ERROR_MS,
|
|
39
39
|
DEFAULT_MAX_STATIC_SEC,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
mergeSampleTimes,
|
|
55
55
|
parseAt,
|
|
56
56
|
readMotionSpec
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-ITO3VCCW.js";
|
|
58
58
|
import {
|
|
59
59
|
findingAtRoot,
|
|
60
60
|
findingElementKey,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
} from "./chunk-TQBQYO4L.js";
|
|
64
64
|
import {
|
|
65
65
|
resolveProject
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-JT6LFFYK.js";
|
|
67
67
|
import {
|
|
68
68
|
recordArtifacts
|
|
69
69
|
} from "./chunk-US2SO6O4.js";
|
|
@@ -71,14 +71,14 @@ import {
|
|
|
71
71
|
BrowserCleanupError,
|
|
72
72
|
onStopSignal,
|
|
73
73
|
registerBrowserSessionCleanup
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-LGSSYJS2.js";
|
|
75
75
|
import {
|
|
76
76
|
resolveLocalBrowserGpuMode
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-JNN2CTGU.js";
|
|
78
78
|
import {
|
|
79
79
|
trackCheckReport,
|
|
80
80
|
trackCommandFailure
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-7EUZAQD6.js";
|
|
82
82
|
import {
|
|
83
83
|
swallowedFlagUsageError
|
|
84
84
|
} from "./chunk-7PZLR2JZ.js";
|
|
@@ -99,13 +99,14 @@ import {
|
|
|
99
99
|
extractMediaMetadata,
|
|
100
100
|
findHdrAutoPromotion,
|
|
101
101
|
gradingKeepsSdr
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-WFEKL42K.js";
|
|
103
103
|
import {
|
|
104
|
-
lintProject
|
|
105
|
-
|
|
104
|
+
lintProject,
|
|
105
|
+
unmountedNotice
|
|
106
|
+
} from "./chunk-LLUKDUVS.js";
|
|
106
107
|
import {
|
|
107
108
|
withMeta
|
|
108
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-DYPAXBNK.js";
|
|
109
110
|
import {
|
|
110
111
|
recordLastCheck
|
|
111
112
|
} from "./chunk-CMQZP52Y.js";
|
|
@@ -1786,7 +1787,11 @@ async function runCheckPipeline(project, options, dependencies = DEFAULT_DEPENDE
|
|
|
1786
1787
|
let lintResult;
|
|
1787
1788
|
const lintStartedAt = Date.now();
|
|
1788
1789
|
try {
|
|
1789
|
-
lintResult = await dependencies.lintProject(project.dir
|
|
1790
|
+
lintResult = await dependencies.lintProject(project.dir, {
|
|
1791
|
+
includeUnmounted: options.includeUnmounted === true
|
|
1792
|
+
});
|
|
1793
|
+
const unmounted = lintResult.unmountedCompositions?.length ?? 0;
|
|
1794
|
+
if (unmounted > 0) console.error(`[hyperframes] check: ${unmountedNotice(unmounted)}`);
|
|
1790
1795
|
} catch (error) {
|
|
1791
1796
|
return failureReport(options, runtimeFailure(error, "check_lint_failure"));
|
|
1792
1797
|
}
|
|
@@ -2281,7 +2286,7 @@ function resolveMotionSpec(projectDir) {
|
|
|
2281
2286
|
};
|
|
2282
2287
|
}
|
|
2283
2288
|
async function runBrowserCheck(project, options, motion, deadline, prelaunched) {
|
|
2284
|
-
const module = await import("./checkBrowser-
|
|
2289
|
+
const module = await import("./checkBrowser-X5VVYQES.js");
|
|
2285
2290
|
return module.runBrowserCheck(project, options, motion, runAuditGrid, deadline, prelaunched);
|
|
2286
2291
|
}
|
|
2287
2292
|
var adoptedBrowser;
|
|
@@ -2295,7 +2300,7 @@ async function prelaunchBrowser(project, options) {
|
|
|
2295
2300
|
if (adopted) return adopted;
|
|
2296
2301
|
const html = await readFile(project.indexPath, "utf8").catch(() => void 0);
|
|
2297
2302
|
if (html === void 0) return void 0;
|
|
2298
|
-
const { prelaunchCompositionBrowser } = await import("./captureCompositionFrame-
|
|
2303
|
+
const { prelaunchCompositionBrowser } = await import("./captureCompositionFrame-WRY5ATM7.js");
|
|
2299
2304
|
return prelaunchCompositionBrowser(html, options.browserGpuMode);
|
|
2300
2305
|
}
|
|
2301
2306
|
async function writeSnapshot(projectDir, index, time, pngBase64) {
|
|
@@ -2307,11 +2312,11 @@ async function writeSnapshot(projectDir, index, time, pngBase64) {
|
|
|
2307
2312
|
return relative(projectDir, path);
|
|
2308
2313
|
}
|
|
2309
2314
|
async function captureFindingFrames(project, options, requests, deadline) {
|
|
2310
|
-
const module = await import("./checkBrowser-
|
|
2315
|
+
const module = await import("./checkBrowser-X5VVYQES.js");
|
|
2311
2316
|
return module.captureFindingFrames(project, options, requests, deadline);
|
|
2312
2317
|
}
|
|
2313
2318
|
async function captureFindingCrops(project, options, requests, deadline) {
|
|
2314
|
-
const module = await import("./checkBrowser-
|
|
2319
|
+
const module = await import("./checkBrowser-X5VVYQES.js");
|
|
2315
2320
|
return module.captureFindingCrops(project, options, requests, deadline);
|
|
2316
2321
|
}
|
|
2317
2322
|
async function inspectProjectMedia(project, dependencies) {
|
|
@@ -2333,7 +2338,7 @@ function collectMedia(project) {
|
|
|
2333
2338
|
return collectProjectMedia(project.dir);
|
|
2334
2339
|
}
|
|
2335
2340
|
async function inspectAudio(project, media) {
|
|
2336
|
-
const module = await import("./checkAudio-
|
|
2341
|
+
const module = await import("./checkAudio-73DDBXXJ.js");
|
|
2337
2342
|
return module.inspectAudio(project.dir, relative(project.dir, project.indexPath), media);
|
|
2338
2343
|
}
|
|
2339
2344
|
function audioCheckFailure(project, error) {
|
|
@@ -2347,7 +2352,7 @@ function audioCheckFailure(project, error) {
|
|
|
2347
2352
|
];
|
|
2348
2353
|
}
|
|
2349
2354
|
var DEFAULT_DEPENDENCIES = {
|
|
2350
|
-
lintProject,
|
|
2355
|
+
lintProject: (projectDir, options) => lintProject(projectDir, void 0, {}, options),
|
|
2351
2356
|
resolveMotionSpec,
|
|
2352
2357
|
runBrowserCheck,
|
|
2353
2358
|
prelaunchBrowser,
|
|
@@ -2411,7 +2416,7 @@ var DEFAULT_COMMAND_DEPENDENCIES = {
|
|
|
2411
2416
|
}
|
|
2412
2417
|
},
|
|
2413
2418
|
async prepareMedia(project, options) {
|
|
2414
|
-
const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-
|
|
2419
|
+
const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-I3KWYN6X.js");
|
|
2415
2420
|
const html = await bundleWithLocalizedFonts(project.dir);
|
|
2416
2421
|
return (await preResolveHostileMediaProxies(project.dir, html, options.autoProxy)).files;
|
|
2417
2422
|
},
|
|
@@ -2570,6 +2575,11 @@ var CHECK_COMMAND_ARGS = {
|
|
|
2570
2575
|
description: "Save contrast-pass PNGs under .hyperframes/artifacts/snapshots/",
|
|
2571
2576
|
default: false
|
|
2572
2577
|
},
|
|
2578
|
+
"include-unmounted": {
|
|
2579
|
+
type: "boolean",
|
|
2580
|
+
description: "Also lint compositions/ files that index.html never mounts",
|
|
2581
|
+
default: false
|
|
2582
|
+
},
|
|
2573
2583
|
"caption-zone": {
|
|
2574
2584
|
type: "string",
|
|
2575
2585
|
description: 'Caption band "x0=0;y0=.82;x1=1;y1=1[;severity=warning|error][;seek=.5,1]" (fractions 0-1; defaults: warning, seek=1)'
|
|
@@ -2739,7 +2749,8 @@ function parseCheckOptions(args) {
|
|
|
2739
2749
|
frameCheck: parseFrameCheck(args["frame-check"]),
|
|
2740
2750
|
layout: parseLayout(args.layout),
|
|
2741
2751
|
autoProxy: args.proxy,
|
|
2742
|
-
browserGpuMode: resolveLocalBrowserGpuMode(args["browser-gpu"])
|
|
2752
|
+
browserGpuMode: resolveLocalBrowserGpuMode(args["browser-gpu"]),
|
|
2753
|
+
includeUnmounted: args["include-unmounted"] === true
|
|
2743
2754
|
};
|
|
2744
2755
|
}
|
|
2745
2756
|
function prelaunchBrowserForCheck(rawArgs) {
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
probeAudioTrack
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3FG3YAHZ.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveWithinProject
|
|
12
12
|
} from "./chunk-ALVXFXUG.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
MAX_AUDIO_GAIN_DB,
|
|
15
15
|
formatAudioGain,
|
|
16
16
|
isAudibleVideoElement
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GREVQ2SM.js";
|
|
18
18
|
import {
|
|
19
19
|
findFfBinary
|
|
20
20
|
} from "./chunk-HYRPH6LL.js";
|
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
windowsLocalAppData
|
|
9
|
+
} from "./chunk-CXUT4XVT.js";
|
|
10
|
+
import {
|
|
11
|
+
MAX_PORT_SCAN,
|
|
12
|
+
PreviewServerPortMismatchError,
|
|
13
|
+
activeServerOnPort,
|
|
14
|
+
scanActiveServers
|
|
15
|
+
} from "./chunk-3L2POG2J.js";
|
|
16
|
+
import {
|
|
17
|
+
isProcessDescendant,
|
|
18
|
+
processIdentity
|
|
19
|
+
} from "./chunk-PV4XID2A.js";
|
|
20
|
+
import {
|
|
21
|
+
terminateProcessTree
|
|
22
|
+
} from "./chunk-KGPLIH7B.js";
|
|
23
|
+
import {
|
|
24
|
+
namedCacheDir
|
|
25
|
+
} from "./chunk-JOQR4AP6.js";
|
|
26
|
+
|
|
27
|
+
// src/commands/previewLifecycle.ts
|
|
28
|
+
import { spawn as nodeSpawn } from "child_process";
|
|
29
|
+
import { createHash } from "crypto";
|
|
30
|
+
import {
|
|
31
|
+
closeSync,
|
|
32
|
+
existsSync,
|
|
33
|
+
mkdirSync,
|
|
34
|
+
openSync,
|
|
35
|
+
readFileSync,
|
|
36
|
+
readdirSync,
|
|
37
|
+
renameSync,
|
|
38
|
+
rmSync,
|
|
39
|
+
writeFileSync
|
|
40
|
+
} from "fs";
|
|
41
|
+
import { devNull, homedir } from "os";
|
|
42
|
+
import { dirname, join, resolve } from "path";
|
|
43
|
+
import { stripVTControlCharacters } from "util";
|
|
44
|
+
var PreviewPortUnavailableError = class extends Error {
|
|
45
|
+
requestedPort;
|
|
46
|
+
boundPort;
|
|
47
|
+
constructor(requestedPort, boundPort) {
|
|
48
|
+
super(
|
|
49
|
+
`Port ${requestedPort} is already in use; the background preview would have started on port ${boundPort} instead. Free port ${requestedPort}, pick another --port, or omit --port to accept the next free port.`
|
|
50
|
+
);
|
|
51
|
+
this.name = "PreviewPortUnavailableError";
|
|
52
|
+
this.requestedPort = requestedPort;
|
|
53
|
+
this.boundPort = boundPort;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
function defaultStateHome() {
|
|
57
|
+
return namedCacheDir("state") || process.env.XDG_STATE_HOME || windowsLocalAppData() || join(homedir(), ".local", "state");
|
|
58
|
+
}
|
|
59
|
+
function normalized(path) {
|
|
60
|
+
const resolved = resolve(path).replace(/\\/g, "/");
|
|
61
|
+
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
|
|
62
|
+
}
|
|
63
|
+
function sessionDirectory(stateHome = defaultStateHome()) {
|
|
64
|
+
return join(stateHome, "hyperframes", "previews");
|
|
65
|
+
}
|
|
66
|
+
function previewSessionPath(projectDir, stateHome = defaultStateHome()) {
|
|
67
|
+
const key = createHash("sha256").update(normalized(projectDir)).digest("hex").slice(0, 16);
|
|
68
|
+
return join(sessionDirectory(stateHome), `${key}.json`);
|
|
69
|
+
}
|
|
70
|
+
function previewLogPath(projectDir, stateHome = defaultStateHome()) {
|
|
71
|
+
return previewSessionPath(projectDir, stateHome).replace(/\.json$/, ".log");
|
|
72
|
+
}
|
|
73
|
+
function writePreviewSession(session, stateHome = defaultStateHome()) {
|
|
74
|
+
const path = previewSessionPath(session.projectDir, stateHome);
|
|
75
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
76
|
+
const temporary = `${path}.${process.pid}.tmp`;
|
|
77
|
+
try {
|
|
78
|
+
writeFileSync(temporary, `${JSON.stringify(session, null, 2)}
|
|
79
|
+
`, { mode: 384 });
|
|
80
|
+
renameSync(temporary, path);
|
|
81
|
+
} finally {
|
|
82
|
+
rmSync(temporary, { force: true });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function readPreviewSession(projectDir, stateHome = defaultStateHome()) {
|
|
86
|
+
const path = previewSessionPath(projectDir, stateHome);
|
|
87
|
+
if (!existsSync(path)) return null;
|
|
88
|
+
try {
|
|
89
|
+
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
90
|
+
if (!Number.isInteger(parsed.pid) || parsed.pid <= 0 || normalized(parsed.projectDir) !== normalized(projectDir)) {
|
|
91
|
+
throw new Error("invalid preview session");
|
|
92
|
+
}
|
|
93
|
+
return parsed;
|
|
94
|
+
} catch {
|
|
95
|
+
rmSync(path, { force: true });
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function hasValidPreviewProcess(session) {
|
|
100
|
+
return Number.isInteger(session.pid) && session.pid > 0;
|
|
101
|
+
}
|
|
102
|
+
function hasValidPreviewEndpoint(session) {
|
|
103
|
+
return Number.isInteger(session.port) && session.port > 0 && session.port <= 65535;
|
|
104
|
+
}
|
|
105
|
+
function matchesPreviewSessionFile(session, path, stateHome) {
|
|
106
|
+
return typeof session.projectDir === "string" && typeof session.logPath === "string" && previewSessionPath(session.projectDir, stateHome) === path;
|
|
107
|
+
}
|
|
108
|
+
function readPreviewSessionFile(path, stateHome) {
|
|
109
|
+
try {
|
|
110
|
+
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
111
|
+
if (!hasValidPreviewProcess(parsed) || !hasValidPreviewEndpoint(parsed) || !matchesPreviewSessionFile(parsed, path, stateHome)) {
|
|
112
|
+
throw new Error("invalid preview session");
|
|
113
|
+
}
|
|
114
|
+
return parsed;
|
|
115
|
+
} catch {
|
|
116
|
+
rmSync(path, { force: true });
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function removePreviewSession(projectDir, stateHome = defaultStateHome()) {
|
|
121
|
+
rmSync(previewSessionPath(projectDir, stateHome), { force: true });
|
|
122
|
+
}
|
|
123
|
+
function matchingServer(servers, projectDir, browserGpuMode) {
|
|
124
|
+
return policyMatchingServers(servers, projectDir, browserGpuMode)[0] ?? null;
|
|
125
|
+
}
|
|
126
|
+
function policyMatchingServers(servers, projectDir, browserGpuMode) {
|
|
127
|
+
return sameProjectServers(servers, projectDir).filter(
|
|
128
|
+
(server) => browserGpuMode === void 0 || server.browserGpuMode === browserGpuMode
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
function matchingServerAtPort(servers, projectDir, port) {
|
|
132
|
+
return matchingServer(
|
|
133
|
+
servers.filter((server) => server.port === port),
|
|
134
|
+
projectDir
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
function sameProjectServers(servers, projectDir) {
|
|
138
|
+
const project = normalized(projectDir);
|
|
139
|
+
return servers.filter((server) => normalized(server.projectDir) === project);
|
|
140
|
+
}
|
|
141
|
+
function sameProjectPorts(servers, projectDir) {
|
|
142
|
+
return new Set(sameProjectServers(servers, projectDir).map((server) => server.port));
|
|
143
|
+
}
|
|
144
|
+
async function stopProcess(pid) {
|
|
145
|
+
await terminateProcessTree(pid);
|
|
146
|
+
}
|
|
147
|
+
var delay = (ms) => new Promise((done) => setTimeout(done, ms));
|
|
148
|
+
function openLog(logPath) {
|
|
149
|
+
try {
|
|
150
|
+
mkdirSync(dirname(logPath), { recursive: true });
|
|
151
|
+
return openSync(logPath, "a", 384);
|
|
152
|
+
} catch (error) {
|
|
153
|
+
console.warn(
|
|
154
|
+
`[hyperframes] background preview log not written: cannot open ${logPath} (${error})`
|
|
155
|
+
);
|
|
156
|
+
return openSync(devNull, "a");
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function spawnDetachedPreview(projectDir, stateHome, dependencies) {
|
|
160
|
+
const logPath = previewLogPath(projectDir, stateHome);
|
|
161
|
+
const logFd = openLog(logPath);
|
|
162
|
+
const spawn = dependencies.spawn ?? nodeSpawn;
|
|
163
|
+
let child;
|
|
164
|
+
try {
|
|
165
|
+
child = spawn(
|
|
166
|
+
dependencies.execPath ?? process.execPath,
|
|
167
|
+
buildBackgroundPreviewArgs(dependencies.argv ?? process.argv.slice(1)),
|
|
168
|
+
{
|
|
169
|
+
detached: true,
|
|
170
|
+
windowsHide: true,
|
|
171
|
+
stdio: ["ignore", logFd, logFd],
|
|
172
|
+
env: process.env
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
} finally {
|
|
176
|
+
closeSync(logFd);
|
|
177
|
+
}
|
|
178
|
+
if (!child.pid) throw new Error("background preview child did not report a PID");
|
|
179
|
+
let exit = null;
|
|
180
|
+
child.once?.("exit", (code, signal) => {
|
|
181
|
+
exit = signal ? `signal ${signal}` : `exit code ${code}`;
|
|
182
|
+
});
|
|
183
|
+
child.unref();
|
|
184
|
+
return {
|
|
185
|
+
pid: child.pid,
|
|
186
|
+
wrapperIdentity: (dependencies.identity ?? processIdentity)(child.pid) ?? void 0,
|
|
187
|
+
logPath,
|
|
188
|
+
exitedWith: () => exit
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function startedServer(servers, projectDir, preLaunchPorts, launchedPid, dependencies) {
|
|
192
|
+
const isDescendant = dependencies.isDescendant ?? isProcessDescendant;
|
|
193
|
+
const ours = (server) => {
|
|
194
|
+
const pid = Number(server.pid);
|
|
195
|
+
return pid === launchedPid || isDescendant(pid, launchedPid);
|
|
196
|
+
};
|
|
197
|
+
const candidates = servers.filter((server) => !preLaunchPorts.has(server.port) && ours(server));
|
|
198
|
+
return matchingServer(candidates, projectDir, dependencies.browserGpuMode);
|
|
199
|
+
}
|
|
200
|
+
function buildBackgroundPreviewArgs(argv) {
|
|
201
|
+
const filtered = argv.filter(
|
|
202
|
+
(arg) => arg !== "--background" && !arg.startsWith("--background=") && arg !== "--foreground" && !arg.startsWith("--foreground=") && arg !== "--open" && arg !== "--no-open" && arg !== "--force-new" && arg !== "--json"
|
|
203
|
+
);
|
|
204
|
+
return [...filtered, "--foreground", "--no-open", "--force-new"];
|
|
205
|
+
}
|
|
206
|
+
function statusServer(servers, projectDir, saved, preferredPort) {
|
|
207
|
+
const candidates = sameProjectServers(servers, projectDir);
|
|
208
|
+
return candidates.find((server) => server.port === preferredPort) ?? candidates.find((server) => server.port === saved?.port) ?? candidates[0] ?? null;
|
|
209
|
+
}
|
|
210
|
+
function isCurrentPreviewWrapper(saved, dependencies) {
|
|
211
|
+
return !!saved.wrapperIdentity && (dependencies.identity ?? processIdentity)(saved.pid) === saved.wrapperIdentity;
|
|
212
|
+
}
|
|
213
|
+
function managedStatusLogPath(server, saved, pid, dependencies) {
|
|
214
|
+
if (!saved || saved.port !== server.port || server.pidSource !== "os") {
|
|
215
|
+
return void 0;
|
|
216
|
+
}
|
|
217
|
+
if (!isCurrentPreviewWrapper(saved, dependencies)) {
|
|
218
|
+
return void 0;
|
|
219
|
+
}
|
|
220
|
+
const isDescendant = dependencies.isDescendant ?? isProcessDescendant;
|
|
221
|
+
return pid === saved.pid || isDescendant(pid, saved.pid) ? saved.logPath : void 0;
|
|
222
|
+
}
|
|
223
|
+
async function readBackgroundPreviewStatus(projectDir, startPort, dependencies = {}) {
|
|
224
|
+
const { stateHome, saved, scanned } = await readPreviewLifecycleState(
|
|
225
|
+
projectDir,
|
|
226
|
+
startPort,
|
|
227
|
+
dependencies
|
|
228
|
+
);
|
|
229
|
+
const server = statusServer(scanned, projectDir, saved, dependencies.preferredPort);
|
|
230
|
+
if (server) {
|
|
231
|
+
const listenerPid = Number(server.pid);
|
|
232
|
+
const pid = Number.isInteger(listenerPid) && listenerPid > 0 ? listenerPid : null;
|
|
233
|
+
const logPath = pid === null ? void 0 : managedStatusLogPath(server, saved, pid, dependencies);
|
|
234
|
+
return {
|
|
235
|
+
pid,
|
|
236
|
+
port: server.port,
|
|
237
|
+
projectDir: resolve(projectDir),
|
|
238
|
+
...logPath ? { logPath } : {}
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
if (saved && wrapperProcessIsAlive(saved, dependencies)) return null;
|
|
242
|
+
removePreviewSession(projectDir, stateHome);
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
function processIsSignalable(pid) {
|
|
246
|
+
try {
|
|
247
|
+
process.kill(pid, 0);
|
|
248
|
+
return true;
|
|
249
|
+
} catch (error) {
|
|
250
|
+
return error?.code === "EPERM";
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
function wrapperProcessIsAlive(saved, dependencies) {
|
|
254
|
+
if (!saved.wrapperIdentity) return false;
|
|
255
|
+
const signalable = dependencies.isSignalable ?? processIsSignalable;
|
|
256
|
+
if (!signalable(saved.pid)) return false;
|
|
257
|
+
const identity = (dependencies.identity ?? processIdentity)(saved.pid);
|
|
258
|
+
if (identity === null) return true;
|
|
259
|
+
return identity === saved.wrapperIdentity;
|
|
260
|
+
}
|
|
261
|
+
async function listBackgroundPreviewStatuses(dependencies = {}) {
|
|
262
|
+
const stateHome = dependencies.stateHome ?? defaultStateHome();
|
|
263
|
+
const directory = sessionDirectory(stateHome);
|
|
264
|
+
let files;
|
|
265
|
+
try {
|
|
266
|
+
files = readdirSync(directory).filter((name) => name.endsWith(".json")).map((name) => join(directory, name));
|
|
267
|
+
} catch {
|
|
268
|
+
return [];
|
|
269
|
+
}
|
|
270
|
+
const saved = files.map((path) => readPreviewSessionFile(path, stateHome)).filter((session) => session !== null);
|
|
271
|
+
const statuses = await Promise.all(
|
|
272
|
+
saved.map(
|
|
273
|
+
(session) => readBackgroundPreviewStatus(session.projectDir, session.port, {
|
|
274
|
+
...dependencies,
|
|
275
|
+
stateHome
|
|
276
|
+
})
|
|
277
|
+
)
|
|
278
|
+
);
|
|
279
|
+
return statuses.filter((status) => status !== null);
|
|
280
|
+
}
|
|
281
|
+
function readyPreviewSession(server, pid, wrapperIdentity, projectDir, logPath, dependencies) {
|
|
282
|
+
const identity = wrapperIdentity ?? (dependencies.identity ?? processIdentity)(pid) ?? void 0;
|
|
283
|
+
const liveServerPid = Number(server.pid);
|
|
284
|
+
return {
|
|
285
|
+
session: {
|
|
286
|
+
pid,
|
|
287
|
+
wrapperIdentity: identity,
|
|
288
|
+
port: server.port,
|
|
289
|
+
projectDir: resolve(projectDir),
|
|
290
|
+
logPath
|
|
291
|
+
},
|
|
292
|
+
publicPid: Number.isInteger(liveServerPid) && liveServerPid > 0 ? liveServerPid : pid
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
function ownedStopTargetPid(saved, liveServerPid, dependencies) {
|
|
296
|
+
if (!saved?.wrapperIdentity) return liveServerPid;
|
|
297
|
+
const identity = dependencies.identity ?? processIdentity;
|
|
298
|
+
if (identity(saved.pid) !== saved.wrapperIdentity) return liveServerPid;
|
|
299
|
+
if (saved.pid === liveServerPid) return saved.pid;
|
|
300
|
+
const isDescendant = dependencies.isDescendant ?? isProcessDescendant;
|
|
301
|
+
return isDescendant(liveServerPid, saved.pid) ? saved.pid : liveServerPid;
|
|
302
|
+
}
|
|
303
|
+
async function stopOwnedPreviewBeforeReplacement(owned, projectDir, dependencies) {
|
|
304
|
+
if (!owned) return;
|
|
305
|
+
await stopBackgroundPreview(projectDir, owned.port, dependencies);
|
|
306
|
+
}
|
|
307
|
+
function savedOwnedPreview(servers, saved, projectDir) {
|
|
308
|
+
if (!saved) return null;
|
|
309
|
+
const savedPortServers = servers.filter((server) => server.port === saved.port);
|
|
310
|
+
return matchingServer(savedPortServers, projectDir);
|
|
311
|
+
}
|
|
312
|
+
function isPortInScanRange(port, scanStart) {
|
|
313
|
+
return port >= scanStart && port < scanStart + MAX_PORT_SCAN;
|
|
314
|
+
}
|
|
315
|
+
async function addSavedPortServer(scanned, savedPort, scanStart, dependencies) {
|
|
316
|
+
if (savedPort === void 0 || isPortInScanRange(savedPort, scanStart)) return;
|
|
317
|
+
const server = await (dependencies.probe ?? activeServerOnPort)(savedPort);
|
|
318
|
+
if (server) scanned.push(server);
|
|
319
|
+
}
|
|
320
|
+
async function readPreviewLifecycleState(projectDir, startPort, dependencies) {
|
|
321
|
+
const scan = dependencies.scan ?? scanActiveServers;
|
|
322
|
+
const stateHome = dependencies.stateHome ?? defaultStateHome();
|
|
323
|
+
const saved = readPreviewSession(projectDir, stateHome);
|
|
324
|
+
const scanStart = dependencies.preferredPort ?? saved?.port ?? startPort;
|
|
325
|
+
const scanned = await scan(scanStart);
|
|
326
|
+
await addSavedPortServer(scanned, saved?.port, scanStart, dependencies);
|
|
327
|
+
return { scan, stateHome, saved, scanned };
|
|
328
|
+
}
|
|
329
|
+
function unmetPreferredPort(port, preferredPort) {
|
|
330
|
+
return preferredPort !== void 0 && port !== preferredPort ? preferredPort : void 0;
|
|
331
|
+
}
|
|
332
|
+
function reuseExistingPreview(reusableExisting, candidates, dependencies) {
|
|
333
|
+
if (!reusableExisting || dependencies.forceNew) return null;
|
|
334
|
+
const unmet = unmetPreferredPort(reusableExisting.port, dependencies.preferredPort);
|
|
335
|
+
if (unmet !== void 0) {
|
|
336
|
+
throw new PreviewServerPortMismatchError(
|
|
337
|
+
unmet,
|
|
338
|
+
candidates,
|
|
339
|
+
` To start one on port ${unmet} instead, add --force-new or run --stop first.`
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
return {
|
|
343
|
+
type: "reused",
|
|
344
|
+
port: reusableExisting.port,
|
|
345
|
+
pid: reusableExisting.pid ? Number(reusableExisting.pid) : null,
|
|
346
|
+
logPath: null
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
async function startBackgroundPreview(projectDir, startPort, dependencies = {}) {
|
|
350
|
+
const launchStart = dependencies.preferredPort ?? startPort;
|
|
351
|
+
const { scan, stateHome, saved, scanned } = await readPreviewLifecycleState(
|
|
352
|
+
projectDir,
|
|
353
|
+
startPort,
|
|
354
|
+
dependencies
|
|
355
|
+
);
|
|
356
|
+
const candidates = policyMatchingServers(scanned, projectDir, dependencies.browserGpuMode);
|
|
357
|
+
const onPreferredPort = candidates.find((server2) => server2.port === dependencies.preferredPort) ?? null;
|
|
358
|
+
const requestedExisting = candidates[0] ?? null;
|
|
359
|
+
const ownedExisting = savedOwnedPreview(scanned, saved, projectDir);
|
|
360
|
+
const reusableOwned = ownedExisting ? matchingServer([ownedExisting], projectDir, dependencies.browserGpuMode) : null;
|
|
361
|
+
const reusableExisting = onPreferredPort ?? reusableOwned ?? (ownedExisting ? null : requestedExisting);
|
|
362
|
+
const reused = reuseExistingPreview(reusableExisting, candidates, dependencies);
|
|
363
|
+
if (reused) return reused;
|
|
364
|
+
await stopOwnedPreviewBeforeReplacement(ownedExisting, projectDir, dependencies);
|
|
365
|
+
const preLaunchPorts = sameProjectPorts(await scan(launchStart), projectDir);
|
|
366
|
+
const { pid, wrapperIdentity, logPath, exitedWith } = spawnDetachedPreview(
|
|
367
|
+
projectDir,
|
|
368
|
+
stateHome,
|
|
369
|
+
dependencies
|
|
370
|
+
);
|
|
371
|
+
const kill = dependencies.kill ?? stopProcess;
|
|
372
|
+
const server = await awaitStartedServer(
|
|
373
|
+
projectDir,
|
|
374
|
+
launchStart,
|
|
375
|
+
preLaunchPorts,
|
|
376
|
+
pid,
|
|
377
|
+
exitedWith,
|
|
378
|
+
dependencies
|
|
379
|
+
);
|
|
380
|
+
if (!server) {
|
|
381
|
+
const exit = exitedWith();
|
|
382
|
+
if (exit) {
|
|
383
|
+
throw new Error(
|
|
384
|
+
`background preview exited (${exit}) before it was ready; see ${logPath}${logTail(logPath)}`
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
await kill(pid);
|
|
388
|
+
throw new Error(`background preview did not become ready; see ${logPath}`);
|
|
389
|
+
}
|
|
390
|
+
const unmet = unmetPreferredPort(server.port, dependencies.preferredPort);
|
|
391
|
+
if (unmet !== void 0) {
|
|
392
|
+
await kill(pid);
|
|
393
|
+
if (!await awaitServerGone(projectDir, server.port, dependencies)) {
|
|
394
|
+
throw new Error(
|
|
395
|
+
`background preview on port ${server.port} did not stop after failing to bind port ${unmet}; see ${logPath}`
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
throw new PreviewPortUnavailableError(unmet, server.port);
|
|
399
|
+
}
|
|
400
|
+
const ready = readyPreviewSession(
|
|
401
|
+
server,
|
|
402
|
+
pid,
|
|
403
|
+
wrapperIdentity,
|
|
404
|
+
projectDir,
|
|
405
|
+
logPath,
|
|
406
|
+
dependencies
|
|
407
|
+
);
|
|
408
|
+
writePreviewSession(ready.session, stateHome);
|
|
409
|
+
return {
|
|
410
|
+
type: "started",
|
|
411
|
+
...ready.session,
|
|
412
|
+
pid: ready.publicPid
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
function logTail(logPath) {
|
|
416
|
+
try {
|
|
417
|
+
const text = stripVTControlCharacters(readFileSync(logPath, "utf8"));
|
|
418
|
+
const lines = text.trimEnd().split("\n").slice(-5);
|
|
419
|
+
return lines.join("").trim() ? `
|
|
420
|
+
${lines.join("\n")}` : "";
|
|
421
|
+
} catch {
|
|
422
|
+
return "";
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
async function awaitStartedServer(projectDir, startPort, preLaunchPorts, launchedPid, exitedWith, dependencies) {
|
|
426
|
+
const scan = dependencies.scan ?? scanActiveServers;
|
|
427
|
+
const sleep = dependencies.sleep ?? delay;
|
|
428
|
+
for (let attempt = 0; attempt < 50 && !exitedWith(); attempt++) {
|
|
429
|
+
const server = startedServer(
|
|
430
|
+
await scan(startPort),
|
|
431
|
+
projectDir,
|
|
432
|
+
preLaunchPorts,
|
|
433
|
+
launchedPid,
|
|
434
|
+
dependencies
|
|
435
|
+
);
|
|
436
|
+
if (server) return server;
|
|
437
|
+
await sleep(200);
|
|
438
|
+
}
|
|
439
|
+
return null;
|
|
440
|
+
}
|
|
441
|
+
async function stopBackgroundPreview(projectDir, startPort, dependencies = {}) {
|
|
442
|
+
const stateHome = dependencies.stateHome ?? defaultStateHome();
|
|
443
|
+
const saved = readPreviewSession(projectDir, stateHome);
|
|
444
|
+
const scan = dependencies.scan ?? scanActiveServers;
|
|
445
|
+
const server = saved ? await probeMatchingServerAtPort(projectDir, saved.port, dependencies) : matchingServer(await scan(dependencies.preferredPort ?? startPort), projectDir);
|
|
446
|
+
if (!server) {
|
|
447
|
+
removePreviewSession(projectDir, stateHome);
|
|
448
|
+
return false;
|
|
449
|
+
}
|
|
450
|
+
const pid = Number(server.pid);
|
|
451
|
+
if (!Number.isInteger(pid) || pid <= 0) {
|
|
452
|
+
throw new Error(`preview ownership could not be proven for ${resolve(projectDir)}`);
|
|
453
|
+
}
|
|
454
|
+
const kill = dependencies.kill ?? stopProcess;
|
|
455
|
+
await kill(ownedStopTargetPid(saved, pid, dependencies));
|
|
456
|
+
if (!await awaitServerGone(projectDir, server.port, dependencies)) {
|
|
457
|
+
throw new Error(`background preview did not stop for ${resolve(projectDir)}`);
|
|
458
|
+
}
|
|
459
|
+
removePreviewSession(projectDir, stateHome);
|
|
460
|
+
return true;
|
|
461
|
+
}
|
|
462
|
+
async function probeMatchingServerAtPort(projectDir, port, dependencies) {
|
|
463
|
+
const server = await (dependencies.probe ?? activeServerOnPort)(port);
|
|
464
|
+
return matchingServerAtPort(server ? [server] : [], projectDir, port);
|
|
465
|
+
}
|
|
466
|
+
async function awaitServerGone(projectDir, port, dependencies) {
|
|
467
|
+
const sleep = dependencies.sleep ?? delay;
|
|
468
|
+
for (let attempt = 0; attempt < 25; attempt++) {
|
|
469
|
+
if (!await probeMatchingServerAtPort(projectDir, port, dependencies)) return true;
|
|
470
|
+
await sleep(100);
|
|
471
|
+
}
|
|
472
|
+
return false;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export {
|
|
476
|
+
PreviewPortUnavailableError,
|
|
477
|
+
readBackgroundPreviewStatus,
|
|
478
|
+
listBackgroundPreviewStatuses,
|
|
479
|
+
startBackgroundPreview,
|
|
480
|
+
stopBackgroundPreview
|
|
481
|
+
};
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
normalizeRelPath,
|
|
9
9
|
resolveLocalImageSourcePath,
|
|
10
10
|
splitUrlSuffix
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2HRKRRQH.js";
|
|
12
12
|
import {
|
|
13
13
|
runFfmpeg,
|
|
14
14
|
runFfprobe
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WFEKL42K.js";
|
|
16
16
|
import {
|
|
17
17
|
renameWithRetry
|
|
18
18
|
} from "./chunk-YWRUQ7XZ.js";
|