hyperframes 0.9.19 → 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-YT7BMWZB.js → add-VQVP3JPZ.js} +14 -15
- package/dist/{agentPromptGenerator-VKOL4XCD.js → agentPromptGenerator-PAFWQGHU.js} +10 -11
- package/dist/{animatedGifPrep-MD4BNSPH.js → animatedGifPrep-AK26JDVM.js} +10 -11
- package/dist/api.js +36 -37
- package/dist/{appHistory-WXJ4STHX.js → appHistory-FVDSCS64.js} +1 -1
- package/dist/{asset-J42DGWPQ.js → asset-N6RZSN44.js} +2 -2
- package/dist/{assetCataloger-XDZB53RE.js → assetCataloger-GWF6II54.js} +11 -12
- package/dist/{audio-6EV56WMQ.js → audio-ZHVBBQRA.js} +70 -26
- package/dist/{auth-ECYU3HT4.js → auth-AJM3YSN6.js} +4 -4
- package/dist/{autoUpdate-HIKCPXQA.js → autoUpdate-GV4LPAJX.js} +2 -2
- package/dist/{avatars-X7DEU57Y.js → avatars-5EKOR2DW.js} +16 -17
- package/dist/{backgroundChecks-IYWWBPTC.js → backgroundChecks-J4XJD4ET.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-3TAV6XQQ.js → batchRender-UKQ36JT2.js} +5 -6
- package/dist/{beats-IFJBCISA.js → beats-LXYHFVPP.js} +11 -12
- package/dist/{benchmark-OS6LVCAY.js → benchmark-KXR56MIT.js} +11 -12
- package/dist/{billing-4NRHG5FO.js → billing-3XQYSAKP.js} +15 -16
- package/dist/{browser-CFI3GKFB.js → browser-P52FDITF.js} +16 -4
- package/dist/{bundleWithLocalizedFonts-6YHKES5G.js → bundleWithLocalizedFonts-I3KWYN6X.js} +1 -1
- package/dist/{capture-SNHDWW7W.js → capture-2PSBIAL2.js} +3 -3
- package/dist/{capture-4H3W3FNF.js → capture-SMWSGGMG.js} +22 -23
- package/dist/{captureCompositionFrame-BH4UMGJP.js → captureCompositionFrame-WRY5ATM7.js} +16 -17
- package/dist/{catalog-RZOQ54KZ.js → catalog-JIO6RXSR.js} +14 -15
- package/dist/{catch-up-PA4QGVNL.js → catch-up-A73H7VGC.js} +18 -7
- package/dist/{check-J2TCCJL5.js → check-FI7SUTK7.js} +43 -42
- package/dist/{checkAudio-RIFMEOQI.js → checkAudio-73DDBXXJ.js} +13 -14
- package/dist/{checkBrowser-M4YCLLDJ.js → checkBrowser-X5VVYQES.js} +35 -36
- package/dist/{chunk-E3GBPA37.js → chunk-2HRKRRQH.js} +2 -2
- package/dist/{chunk-OR2FAQFS.js → chunk-3FG3YAHZ.js} +1 -1
- package/dist/{chunk-BJUPV6I3.js → chunk-3OIUJOIR.js} +1 -1
- package/dist/{chunk-FSTINYWN.js → chunk-3TLAQU62.js} +1 -1
- package/dist/{chunk-DTJV7ST5.js → chunk-3ZXKEGKV.js} +1 -1
- package/dist/{chunk-ABT7WBZZ.js → chunk-4EL5RKLS.js} +1 -1
- package/dist/{chunk-TOD5PQJF.js → chunk-4EMQHF3T.js} +2 -2
- package/dist/{chunk-6OBCXHIF.js → chunk-4FNJ2QNP.js} +4 -4
- package/dist/{chunk-3QIHS5V3.js → chunk-4NLG5TO6.js} +3 -3
- package/dist/{chunk-63LNVITK.js → chunk-4UXCWPHU.js} +1 -1
- package/dist/{chunk-UPURJC4I.js → chunk-4ZLMVX3O.js} +1 -1
- package/dist/{chunk-IV2R3NET.js → chunk-5PY66UGZ.js} +3 -3
- package/dist/{chunk-ZPJYWAAS.js → chunk-7ETNIXIN.js} +1 -1
- package/dist/{chunk-HNGHIX26.js → chunk-7EUZAQD6.js} +35 -2
- package/dist/{chunk-BEAEO4OV.js → chunk-A2NL7HGF.js} +1 -1
- package/dist/{chunk-JWQHGM3V.js → chunk-A4JU6QUG.js} +1 -1
- package/dist/{chunk-WMRHEI4N.js → chunk-ADJCNH7M.js} +1 -1
- package/dist/{chunk-ENVFGBRD.js → chunk-AXFYCH7S.js} +12 -0
- package/dist/{chunk-RRGH76QX.js → chunk-BABCRBAO.js} +38 -4
- package/dist/{chunk-SVT6FCQX.js → chunk-BUCJXB6D.js} +1 -1
- package/dist/{chunk-3UYQMVJS.js → chunk-C4KYJSSF.js} +9 -9
- package/dist/{chunk-N7D6YUGR.js → chunk-CFOJE3VR.js} +2 -2
- package/dist/{chunk-GKLZMLX3.js → chunk-CXUT4XVT.js} +22 -1
- package/dist/{chunk-2DPQ347C.js → chunk-CZK7A5IB.js} +4 -4
- package/dist/{chunk-3XJM7XZN.js → chunk-D3NWGOXW.js} +30 -0
- package/dist/{chunk-PTIOZJMF.js → chunk-D7C6NOOO.js} +2 -2
- package/dist/{chunk-H3YZRS32.js → chunk-DXIGIMRP.js} +2 -2
- package/dist/{chunk-T655WZ4R.js → chunk-DYPAXBNK.js} +1 -1
- package/dist/{chunk-4FFKOLNM.js → chunk-DZQEPGNY.js} +3 -3
- package/dist/{chunk-RKRJAQFI.js → chunk-F4XUCHQQ.js} +1 -1
- package/dist/{chunk-URGLY5QV.js → chunk-FASKJUYU.js} +98 -35
- package/dist/{chunk-7EN7RIPV.js → chunk-FET6WMTX.js} +2 -2
- package/dist/{chunk-WRBUQRJJ.js → chunk-FOX7LXZ2.js} +1 -1
- package/dist/chunk-FRBQYFUV.js +481 -0
- package/dist/{chunk-XPIP5ZV3.js → chunk-G5UZHDEZ.js} +2 -2
- package/dist/{chunk-AKEZ2BEE.js → chunk-G77Z4GWC.js} +1 -1
- package/dist/{chunk-6AYTP32B.js → chunk-GG7RYSIU.js} +1 -1
- package/dist/{chunk-KXZD37E5.js → chunk-GH6GWAID.js} +1 -1
- package/dist/{chunk-2LZO4FX3.js → chunk-GKOSN3Q6.js} +3 -3
- package/dist/chunk-GREVQ2SM.js +5035 -0
- package/dist/{chunk-J3QW55W5.js → chunk-H6676SHA.js} +1 -1
- package/dist/{chunk-SJUFAZV5.js → chunk-H7N3J7Y3.js} +2 -2
- package/dist/{chunk-RWJFNJUE.js → chunk-HCFBCEJT.js} +1 -1
- package/dist/{chunk-NKK2FRY7.js → chunk-I7WVS7WN.js} +1 -1
- package/dist/{chunk-UIUILBMB.js → chunk-IFY5ACTF.js} +13 -13
- package/dist/{chunk-M3EGX3ID.js → chunk-IQR26ZJD.js} +5 -5
- package/dist/{chunk-XYHAXHOH.js → chunk-IRWQMKV7.js} +1 -1
- package/dist/{chunk-HY5KQ4KT.js → chunk-ITO3VCCW.js} +10 -10
- package/dist/{chunk-XKYXENEP.js → chunk-JNN2CTGU.js} +2 -2
- package/dist/{chunk-6KBDQAZC.js → chunk-JT6LFFYK.js} +1 -1
- package/dist/{chunk-L24NAUBS.js → chunk-KBHBSWEE.js} +64 -19
- package/dist/{chunk-XQD6XWE3.js → chunk-L2SQTHMP.js} +1 -1
- package/dist/{chunk-ZVDYDMQA.js → chunk-L4C4F4O3.js} +3 -3
- package/dist/{chunk-RLXUABCX.js → chunk-LDO7SB4J.js} +12 -5
- package/dist/{chunk-IPXNWK7O.js → chunk-LGSSYJS2.js} +2 -2
- package/dist/{chunk-ATUCYH5L.js → chunk-LIFQONFJ.js} +1 -1
- package/dist/{chunk-NTMMUK6Q.js → chunk-LLUKDUVS.js} +38 -20
- package/dist/{chunk-IDNKBZNX.js → chunk-LMUF3BGR.js} +1 -1
- package/dist/{chunk-5PC5FMF4.js → chunk-LQBZCXMR.js} +3 -3
- package/dist/{chunk-L6YCPDRH.js → chunk-M32FE7JZ.js} +3 -3
- package/dist/{chunk-BYVDFTG6.js → chunk-M7Z2SEQG.js} +2 -2
- package/dist/{chunk-RL3CNZAX.js → chunk-MERPHIUD.js} +2 -2
- package/dist/{chunk-JWORQ5WQ.js → chunk-MFDNMTOP.js} +1 -1
- package/dist/{chunk-CBHNARFI.js → chunk-MNMIIDOX.js} +1 -1
- package/dist/{chunk-PMAGFCRB.js → chunk-NBHVLN5J.js} +7 -7
- package/dist/{chunk-Z2BBCW57.js → chunk-NTNNGWKO.js} +3 -3
- package/dist/{chunk-VXZOWF6M.js → chunk-ONBYVA2L.js} +62 -25
- package/dist/{chunk-G2HKE5CX.js → chunk-OQ6VGBQV.js} +1 -1
- package/dist/{chunk-GNING3UV.js → chunk-OXMEC34G.js} +1 -1
- package/dist/{chunk-VGAKHIDG.js → chunk-OXUX73RX.js} +10 -10
- package/dist/{chunk-A5MTIN4M.js → chunk-P7WDQTQZ.js} +1 -1
- package/dist/chunk-PJNDSYJV.js +525 -0
- package/dist/{chunk-X2TDLUIK.js → chunk-PPOJMJR5.js} +51 -16
- package/dist/{chunk-67JLV22D.js → chunk-Q2LO2ZF6.js} +3 -3
- package/dist/{chunk-CPFG5QSQ.js → chunk-QAES6F2D.js} +7 -7
- package/dist/{chunk-FJXBDFH6.js → chunk-QXVJ33BP.js} +362 -190
- package/dist/{chunk-WAY7TXDD.js → chunk-RLY4LECT.js} +2 -2
- package/dist/{chunk-JDAYOJGJ.js → chunk-RQIR2BOG.js} +1 -1
- package/dist/{chunk-YCXW65RT.js → chunk-RYRSI623.js} +5 -5
- package/dist/{chunk-BUIZAY4L.js → chunk-TERSCNBN.js} +19 -8
- package/dist/{chunk-I4G55F5J.js → chunk-TLNKHH52.js} +1 -1
- package/dist/{chunk-I2L7KR3N.js → chunk-UFMWWEL3.js} +7 -7
- package/dist/{chunk-GZK32KOL.js → chunk-W62DJ5ZK.js} +5 -5
- package/dist/{chunk-TLZCUWHQ.js → chunk-WFEKL42K.js} +266 -61
- package/dist/{chunk-LDFI55LW.js → chunk-WZCSU7ZP.js} +1 -1
- package/dist/{chunk-7HROKMNQ.js → chunk-XC5PF4T4.js} +4 -4
- package/dist/{chunk-2752JKE6.js → chunk-XQUO3BOS.js} +65 -21
- package/dist/{chunk-2AL2DME3.js → chunk-XRNXGF7I.js} +2 -2
- package/dist/{chunk-QEFMUD5U.js → chunk-YALKIB2K.js} +1 -1
- package/dist/{chunk-W6Q7Q7BS.js → chunk-YQV44DRO.js} +77 -2
- package/dist/{chunk-WBXUGXZP.js → chunk-YZKRMBYH.js} +1 -1
- package/dist/{chunk-D33DCBBM.js → chunk-ZEQOP7XA.js} +2 -2
- package/dist/{chunk-YBUZQGMX.js → chunk-ZFYCYUVY.js} +2 -2
- package/dist/{chunk-LFSSI7W3.js → chunk-ZH3SXWCV.js} +42 -15
- package/dist/{chunk-TJUJJYJC.js → chunk-ZNFYQMFN.js} +2 -2
- package/dist/{clean-PMM6YUQ3.js → clean-PILJFGU2.js} +20 -21
- package/dist/cli.js +62 -62
- package/dist/{cloud-D3WTNTF2.js → cloud-D7DFYONW.js} +4 -4
- package/dist/{cloud-OIPASJZZ.js → cloud-HBMQH4EU.js} +4 -4
- package/dist/{cloudrun-3TXJ2QOV.js → cloudrun-JZQMF5DS.js} +6 -7
- package/dist/commands/layout-audit.browser.js +287 -23
- package/dist/{compare-NC7JQXZH.js → compare-5RSAPYJI.js} +32 -33
- package/dist/{compiler-C2HCN5CA.js → compiler-T4BPLRFY.js} +4 -4
- package/dist/{component-M2VJD3QI.js → component-DMHFV7BD.js} +3 -3
- package/dist/{compositions-3QMQV5OS.js → compositions-OW776OLK.js} +14 -15
- package/dist/{curve-S3VZXTYX.js → curve-4GNM7DWM.js} +14 -15
- package/dist/{cuts-O3OKZGPU.js → cuts-M5R2LKDZ.js} +15 -16
- package/dist/{delete-RFDRT4K6.js → delete-MYG77L66.js} +7 -7
- package/dist/{deploy-LIQXICPP.js → deploy-FGHE4FID.js} +1 -1
- package/dist/{describeProject-IUAV4C55.js → describeProject-SLAKVOOS.js} +11 -12
- package/dist/{deterministicFonts-DQDB47K3.js → deterministicFonts-IXXU76SA.js} +1 -1
- package/dist/{diff-F434Y7GL.js → diff-TNHEXG72.js} +35 -36
- package/dist/{dist-KA45Z5SZ.js → dist-23VTYBIX.js} +11 -12
- package/dist/{dist-URQMS2HM.js → dist-5ITUK4AA.js} +6 -4
- package/dist/{dist-6N5S5326.js → dist-PEDQQRFU.js} +17 -17
- package/dist/docs/motion-blur.md +3 -5
- package/dist/{doctor-VAEAFW3N.js → doctor-ILCPSC6S.js} +14 -15
- package/dist/{energy-HQG367CH.js → energy-SCJII6HC.js} +15 -16
- package/dist/{events-R55FOR6B.js → events-D2QORX35.js} +2 -2
- package/dist/{events-M457QJCL.js → events-OHIGKF4W.js} +16 -4
- package/dist/{events-3HQKXGJN.js → events-ZMK5VRA2.js} +17 -18
- package/dist/{extract-KSYOILWX.js → extract-OD3LI3YL.js} +15 -16
- package/dist/{face-IOYVA3KO.js → face-SFQDTQXC.js} +15 -16
- package/dist/{feedback-OLY2Y2HB.js → feedback-N3JK4ULK.js} +18 -19
- package/dist/{ffmpeg-POWBUKIU.js → ffmpeg-E55HQX7V.js} +10 -11
- package/dist/{figma-PYAOGAQ7.js → figma-JYVZPN5L.js} +3 -3
- package/dist/fontLocalizeCli.js +14 -15
- package/dist/{frames-RIUU6JZF.js → frames-BLCIN32Q.js} +16 -17
- package/dist/{generate-TVFTFEHB.js → generate-B7MUYYON.js} +27 -28
- package/dist/{get-ASVUBVPU.js → get-VQWG2NY4.js} +7 -7
- package/dist/{gpuPolicy-QDYHFIDS.js → gpuPolicy-3TMFL6TM.js} +10 -11
- package/dist/{grade-compare-2TVGR2WJ.js → grade-compare-LCS5CBNW.js} +33 -34
- package/dist/{heifImagePrep-ZDQ6FE6L.js → heifImagePrep-VHAJEZGL.js} +11 -12
- package/dist/{help-MZHLMNGB.js → help-GSE5DFSB.js} +1 -1
- package/dist/{history-CCPMGESN.js → history-RSB65UN3.js} +19 -8
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +65 -65
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-5CRW7PXR.js → info-FLLONVY5.js} +16 -17
- package/dist/{init-6U5JDVOC.js → init-EAKY3LFR.js} +30 -31
- package/dist/{ink-BVK6K2CB.js → ink-ZDZVD5CD.js} +15 -16
- package/dist/{inspect-NUGGYSLQ.js → inspect-LFEK6HOL.js} +33 -34
- package/dist/{installer-TBUJ66L6.js → installer-5NJVGV6X.js} +6 -7
- package/dist/{keyframes-N5637YSK.js → keyframes-TZBDB442.js} +16 -8
- package/dist/{lambda-VPSI7MTF.js → lambda-RYX5NXX5.js} +14 -15
- package/dist/{layout-FHJ2SQTW.js → layout-VATFBERH.js} +33 -34
- package/dist/{lint-XPRHASUK.js → lint-QAGBHUXZ.js} +27 -13
- package/dist/{lintProject-6TML32JZ.js → lintProject-BC5ISNKQ.js} +2 -2
- package/dist/{list-TST4Z4GR.js → list-VQZOLGEO.js} +7 -7
- package/dist/{localPage-NR4NBUTZ.js → localPage-ZEJ7ZKIE.js} +10 -11
- package/dist/{login-64KOPWVK.js → login-7BL2N6JG.js} +6 -6
- package/dist/{logout-EQ2HJDL4.js → logout-EKDVIU6Y.js} +2 -2
- package/dist/{look-VBHITYXG.js → look-OKDV2W4W.js} +15 -16
- package/dist/{manager-OAK67I5F.js → manager-QPEMMSLW.js} +11 -12
- package/dist/{measure-NNQ6XXH2.js → measure-WJ6TR545.js} +11 -11
- package/dist/{media-treatment-M2X3Q5NV.js → media-treatment-QYQVLCYP.js} +16 -17
- package/dist/{media-use-ZGJJL6KV.js → media-use-OWKQQSPJ.js} +4 -4
- package/dist/{models-Y24YJJ6P.js → models-FZ4HL5BX.js} +14 -15
- package/dist/{motionShot-KMU2SMX6.js → motionShot-IHZ544WM.js} +19 -20
- package/dist/{normalize-audio-27XH53UL.js → normalize-audio-77ZTAPPL.js} +11 -12
- package/dist/{open-6MLQR2BC.js → open-Q7AAAYVN.js} +70 -20
- package/dist/{parakeetRunner-BMK7KY7W.js → parakeetRunner-TAMKXXNN.js} +15 -16
- package/dist/{pipeline-AILSBZUB.js → pipeline-MK7LCHQD.js} +13 -14
- package/dist/{play-VTM2B4CS.js → play-WBLWBDBS.js} +22 -23
- package/dist/{preflight-IRQCF5ZW.js → preflight-O2EH2LOC.js} +11 -12
- package/dist/{present-JQH4CETR.js → present-3GW46ZYF.js} +18 -19
- package/dist/{preview-KGMCKLBI.js → preview-MPAHNXEJ.js} +57 -504
- package/dist/{probe-IP6W7U4A.js → probe-4F2PK26B.js} +15 -16
- package/dist/{producer-PRYLGX6W.js → producer-T462QJC7.js} +1 -1
- package/dist/{projectConfig-6WPGQGI3.js → projectConfig-T3WVF6H4.js} +8 -9
- package/dist/{publication-25E6ZMLB.js → publication-DX3VDYCI.js} +4 -5
- package/dist/{publish-6QT26AMU.js → publish-VNMKJMAK.js} +15 -16
- package/dist/{refresh-ARZZRKMP.js → refresh-ZHLUUENK.js} +2 -2
- package/dist/{remove-background-CVQQZNQQ.js → remove-background-7LE4IIOE.js} +14 -15
- package/dist/{render-3VHULZTP.js → render-5PTZ5VLW.js} +7 -8
- package/dist/{render-PUXPIIGJ.js → render-JKUR7OI2.js} +76 -39
- package/dist/{render-VMHF2RVD.js → render-RPHNBD4F.js} +42 -39
- package/dist/{render-batch-UKWKZUJM.js → render-batch-X2QMZUYH.js} +7 -8
- package/dist/renderSetupWorker.js +11 -8
- package/dist/{resolver-KEMGGVU7.js → resolver-AXDCEJ77.js} +6 -7
- package/dist/{reverse-4BCCUHPA.js → reverse-DQSOSC5W.js} +1 -1
- package/dist/{run-WZP6HXIH.js → run-IQLZHH6D.js} +5 -5
- package/dist/{screenshotCapture-VGOH65YU.js → screenshotCapture-EAATIOT3.js} +11 -12
- package/dist/{sherpa-AQJGVMWJ.js → sherpa-NPPB3DTN.js} +14 -15
- package/dist/skills/hyperframes/references/motion.md +1 -1
- package/dist/skills/hyperframes/references/storyboard.md +1 -1
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
- 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/media-use/references/heygen.md +9 -9
- package/dist/{skills-VB4OXS7B.js → skills-S2ODBBMC.js} +19 -7
- package/dist/{skillsUpdateCheck-HMGBIR2Z.js → skillsUpdateCheck-AOCZDRXM.js} +3 -3
- package/dist/{snapshot-SXWIDOD3.js → snapshot-SS6WDSZ5.js} +40 -41
- package/dist/{src-IEVHZX7S.js → src-HHRR3UTF.js} +13 -14
- package/dist/{src-RETKK67M.js → src-MYVZPRHS.js} +20 -19
- package/dist/{start-PDD5527T.js → start-OYIXMJKF.js} +24 -25
- package/dist/{staticProjectServer-GJQCWV7Y.js → staticProjectServer-65X4MWEN.js} +21 -22
- package/dist/{status-N6FGW6E2.js → status-JEYVWANY.js} +16 -17
- package/dist/studio/assets/{hyperframes-player-Dszy0WKm.js → hyperframes-player-DqxUNa9H.js} +1 -1
- package/dist/studio/assets/index-Bgfyny02.css +1 -0
- package/dist/studio/assets/{index-CWYuXWlI.js → index-CFUJyYA1.js} +1 -1
- package/dist/studio/assets/{index-BeR5xCi5.js → index-Cq43Ovkf.js} +196 -196
- package/dist/studio/index.html +2 -2
- package/dist/{studio-api-IAELPUY4.js → studio-api-GJGFGQQW.js} +11 -12
- package/dist/{studioServer-XTVVJA3E.js → studioServer-IS27DJNF.js} +66 -59
- package/dist/{sync-SDUSYR4M.js → sync-NLK2RFSR.js} +15 -16
- package/dist/{telemetry-IXOTZW4E.js → telemetry-BMPRZBBX.js} +22 -2
- package/dist/{telemetry-U4VJBESU.js → telemetry-BPPPHER2.js} +16 -4
- package/dist/templates/_shared/AGENTS.md +3 -1
- package/dist/templates/_shared/CLAUDE.md +3 -1
- package/dist/{templates-VFKKDFCR.js → templates-YWBAFFI4.js} +25 -26
- package/dist/{timeline-62HYU4LF.js → timeline-FAFHG2G4.js} +21 -22
- package/dist/{tokens-XJUQMDBP.js → tokens-QCZBFNMS.js} +2 -2
- package/dist/{transcribe-7IPTYLH2.js → transcribe-2P6GMYWR.js} +29 -30
- package/dist/{transcribe-RRGMCQBP.js → transcribe-VL3YKFMY.js} +13 -14
- package/dist/{update-EAL42IMG.js → update-NWDCG6JG.js} +20 -8
- package/dist/{updateCheck-CCDI422O.js → updateCheck-PX4XSKDO.js} +2 -2
- package/dist/{upgrade-A73PJHPY.js → upgrade-VWETDZDT.js} +3 -3
- package/dist/{upload-YQMBLKH5.js → upload-PEY7EYFV.js} +7 -2
- package/dist/{urlDownloader-JZIEE3AD.js → urlDownloader-7TVBPNBG.js} +9 -10
- package/dist/{validate-N6F4N34T.js → validate-HCJAHDTZ.js} +27 -28
- package/dist/{video-6LPKR7VA.js → video-JDUB5IFM.js} +11 -12
- package/dist/{voices-LFPLTLKV.js → voices-YBKCBC6K.js} +30 -29
- package/dist/warmCheck.js +41 -42
- package/package.json +1 -1
- package/dist/chunk-GDQQ4U3L.js +0 -226
- package/dist/chunk-TK7THLRO.js +0 -65
- package/dist/chunk-X7SYA4OP.js +0 -5035
- package/dist/studio/assets/index-CNZk2EFC.css +0 -1
|
@@ -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";
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
findCompositionDimensions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RQIR2BOG.js";
|
|
10
10
|
import {
|
|
11
11
|
outputResolutionForSize
|
|
12
12
|
} from "./chunk-CUCP7FKH.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
jsonArg,
|
|
9
9
|
runMeasure,
|
|
10
10
|
videoArg
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZFYCYUVY.js";
|
|
12
12
|
import {
|
|
13
13
|
makeOutputFolder
|
|
14
14
|
} from "./chunk-3S27CPV7.js";
|
|
@@ -18,13 +18,13 @@ import {
|
|
|
18
18
|
probeVideo,
|
|
19
19
|
round,
|
|
20
20
|
runFfmpeg
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-I7WVS7WN.js";
|
|
22
22
|
import {
|
|
23
23
|
defineCommand
|
|
24
24
|
} from "./chunk-DL4OD7IA.js";
|
|
25
25
|
import {
|
|
26
26
|
toneMapReferenceNits
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-YQV44DRO.js";
|
|
28
28
|
|
|
29
29
|
// src/commands/measure/probe.ts
|
|
30
30
|
import { execFileSync } from "child_process";
|