hyperframes 0.8.206 → 0.8.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/hyperframes.mjs +1 -0
- package/dist/{add-FFMNAJXJ.js → add-XMWRBMBR.js} +22 -20
- package/dist/{agentPromptGenerator-KYO5MKTW.js → agentPromptGenerator-4NJ252MR.js} +6 -2
- package/dist/{animatedGifPrep-BIIIIVWL.js → animatedGifPrep-6XURJIPV.js} +14 -13
- package/dist/api.js +33 -32
- package/dist/{appHistory-QVCSAOI4.js → appHistory-HIBH6XZW.js} +3 -1
- package/dist/{asset-IPUHGZSL.js → asset-I5GGEOB2.js} +2 -2
- package/dist/{assetCataloger-M5FWXLAJ.js → assetCataloger-YBPXUNUP.js} +17 -14
- package/dist/{audio-VYWWM4DB.js → audio-GFJCHH5W.js} +420 -138
- package/dist/{auth-GZQZCUPL.js → auth-QOA55RYR.js} +4 -4
- package/dist/{autoUpdate-GJUDDLLO.js → autoUpdate-SPS4QPJU.js} +4 -4
- package/dist/{backgroundChecks-BTMSW34Z.js → backgroundChecks-HRJO7YK7.js} +5 -5
- package/dist/backgroundChecksWorker.js +5 -5
- package/dist/{batchRender-LI2BJRGO.js → batchRender-FBP3RKUF.js} +11 -10
- package/dist/{beats-H73CSYT4.js → beats-VNGJ7F6W.js} +32 -25
- package/dist/{benchmark-XT3A5REC.js → benchmark-NZ3N3MIV.js} +16 -16
- package/dist/{browser-VIOK66YK.js → browser-BD5BKRJ5.js} +9 -9
- package/dist/{bundleWithLocalizedFonts-PFRVWYOO.js → bundleWithLocalizedFonts-WXVNPAWD.js} +3 -3
- package/dist/{capture-KKD5GMAF.js → capture-CXWXKWS5.js} +120 -54
- package/dist/{capture-252WNPCD.js → capture-LMJ4TQRL.js} +63 -17
- package/dist/{captureCompositionFrame-YLYVGNN2.js → captureCompositionFrame-ZKVCRYYU.js} +21 -20
- package/dist/{captureFile-LYOJOUIE.js → captureFile-VIVGKFY4.js} +2 -1
- package/dist/{catalog-6IJGNN3T.js → catalog-WRXQSCAU.js} +28 -26
- package/dist/{catch-up-BFW7Z35W.js → catch-up-MDSPABFC.js} +7 -7
- package/dist/{check-XUWBZASR.js → check-SIBBK5HA.js} +53 -52
- package/dist/{checkAudio-2NRR3VHQ.js → checkAudio-QQBR4HR7.js} +19 -18
- package/dist/{checkBrowser-JW74KWTF.js → checkBrowser-4EBJLLIH.js} +45 -44
- package/dist/{chunk-XDMZY3H7.js → chunk-3O2E4Q66.js} +15 -20
- package/dist/{chunk-VEA7Z4PZ.js → chunk-43MW4SY7.js} +15 -7
- package/dist/{chunk-HJAJ6W4V.js → chunk-4F5NRJ6M.js} +2 -2
- package/dist/{chunk-2RT7MXFL.js → chunk-4HT2L6W2.js} +1 -1
- package/dist/{chunk-QVTCXN42.js → chunk-4KG3ESVO.js} +30 -4
- package/dist/{chunk-42KN6I6A.js → chunk-4LTBQEPD.js} +2 -2
- package/dist/{chunk-C6KE4AFW.js → chunk-56ANHX5U.js} +1 -1
- package/dist/{chunk-NVLPW3DG.js → chunk-5HB4JM7H.js} +2 -2
- package/dist/{chunk-2ST4WAFY.js → chunk-5PCALX6G.js} +13 -1
- package/dist/{chunk-AYH5ANVS.js → chunk-5YHQBCWH.js} +52 -3
- package/dist/{chunk-X5HHHFTX.js → chunk-6CWKORZO.js} +3 -3
- package/dist/{chunk-ZF3R2IPC.js → chunk-6DSYBW7Z.js} +1 -0
- package/dist/{chunk-VHVSBOZH.js → chunk-6JNSYFOH.js} +4 -4
- package/dist/{chunk-AJSU6KGS.js → chunk-6N7D2GUV.js} +15 -15
- package/dist/{chunk-F2ASNL2K.js → chunk-6PWQH77E.js} +1 -1
- package/dist/{chunk-ZNAOBFU5.js → chunk-6WRN4WC6.js} +1 -1
- package/dist/{chunk-GAV56VJL.js → chunk-7CPI2DWL.js} +2 -2
- package/dist/{chunk-CMDVJP4T.js → chunk-7PAK7LZ5.js} +11 -11
- package/dist/{chunk-3CISA3OS.js → chunk-AF3L5JJX.js} +1 -1
- package/dist/{chunk-X7RXXBYM.js → chunk-B5MPMIKQ.js} +2 -2
- package/dist/{chunk-RW4DMP2Y.js → chunk-BKDQFOKK.js} +4 -4
- package/dist/{chunk-DZG565OO.js → chunk-BLCKQPBE.js} +1 -1
- package/dist/chunk-BQMAPNDA.js +4830 -0
- package/dist/{chunk-CPSGXAYD.js → chunk-CP225S5H.js} +3 -3
- package/dist/{chunk-3R6SXPHD.js → chunk-CSWCZA6V.js} +3 -3
- package/dist/{chunk-4CY5RXXC.js → chunk-D2CE2J2A.js} +4 -4
- package/dist/{chunk-FMWACL3L.js → chunk-DHQSDCWD.js} +6 -2
- package/dist/chunk-DROFHVQD.js +240 -0
- package/dist/{chunk-OZUAVHFE.js → chunk-DXACKQ3F.js} +3 -3
- package/dist/{chunk-5QKJPCQ4.js → chunk-EGOXYG3M.js} +2 -2
- package/dist/{chunk-QL4ZYSIB.js → chunk-ENRFKCI6.js} +5 -71
- package/dist/{chunk-MRF4AMKD.js → chunk-EQBDKYXR.js} +5 -10
- package/dist/{chunk-4UMPIPCQ.js → chunk-ERUQ3S6D.js} +2 -2
- package/dist/{chunk-T2EUWCJE.js → chunk-EU7MVORF.js} +13 -1
- package/dist/{chunk-FULMZCDW.js → chunk-EYEEZXLI.js} +11 -11
- package/dist/{chunk-2MLMO25E.js → chunk-FC4WT5FX.js} +105 -7
- package/dist/{chunk-PLGGKTCB.js → chunk-FFDYRJBE.js} +37 -21
- package/dist/{chunk-7SXL476O.js → chunk-G2A6RC5R.js} +72 -28
- package/dist/{chunk-HTIUNMTP.js → chunk-GDZA4ALG.js} +8 -2
- package/dist/{chunk-CZYS6UKP.js → chunk-GEO6THL3.js} +61 -30
- package/dist/{chunk-MFHYBSJC.js → chunk-GHSO62LK.js} +3 -3
- package/dist/{chunk-P2I4RLJE.js → chunk-HTZJNQYI.js} +1 -1
- package/dist/{chunk-4DGLKB2H.js → chunk-HUKQW4YE.js} +1 -1
- package/dist/{chunk-WYB3VKLK.js → chunk-HZN7ICAF.js} +8 -8
- package/dist/{chunk-6ZFDNEMY.js → chunk-IIJVSCSH.js} +16 -16
- package/dist/{chunk-VDVVQNTK.js → chunk-IL2TMC6F.js} +5 -5
- package/dist/{chunk-L5MFWGGU.js → chunk-J67FSI3Q.js} +623 -376
- package/dist/chunk-JLCAHJUO.js +91 -0
- package/dist/{chunk-N7ZMDVAK.js → chunk-JLGVBK5M.js} +1 -1
- package/dist/{chunk-SFYLZX5C.js → chunk-K4PHB3YQ.js} +59 -15
- package/dist/{chunk-G6W55MTX.js → chunk-KTWGVEN6.js} +40 -11
- package/dist/{chunk-FNNGQ3DB.js → chunk-LSMFOZ4F.js} +2 -2
- package/dist/{chunk-ELP5QZWL.js → chunk-M4QZFUMW.js} +1 -1
- package/dist/{chunk-PNKLOMHQ.js → chunk-MBGM26P5.js} +17 -22
- package/dist/{chunk-ZTEKVSZ6.js → chunk-MMJAHBH2.js} +1 -1
- package/dist/{chunk-RDDVQSNQ.js → chunk-MPO25DQW.js} +451 -208
- package/dist/{chunk-E2ZZSDDQ.js → chunk-MW2NQQ6Z.js} +2 -2
- package/dist/{chunk-TSJVPPXT.js → chunk-MYO77JWR.js} +1 -1
- package/dist/{chunk-PSX5SF2N.js → chunk-NEASABW6.js} +1 -1
- package/dist/{chunk-OFRRUYBA.js → chunk-NHA4NRBE.js} +135 -24
- package/dist/{chunk-NNLQTG3M.js → chunk-NZ6G5YWZ.js} +2 -2
- package/dist/{chunk-WHD5IAHI.js → chunk-ORFRUZPB.js} +2 -2
- package/dist/{chunk-Z3XXLTVB.js → chunk-OTXXDONS.js} +3 -3
- package/dist/{chunk-2S263R6D.js → chunk-P7WGVXR7.js} +9 -9
- package/dist/{chunk-AXEEZKIL.js → chunk-PKVA6MPV.js} +6 -6
- package/dist/{chunk-FJW757TF.js → chunk-PSOAGSNO.js} +2 -2
- package/dist/{chunk-AEC4T4IF.js → chunk-PWEOSJ3E.js} +12 -12
- package/dist/{chunk-X7A7C4JS.js → chunk-Q43YUROE.js} +3 -3
- package/dist/{chunk-PQYWYBEQ.js → chunk-QP2MJYTJ.js} +1 -1
- package/dist/{chunk-VW2LVMKB.js → chunk-QWBVPWUI.js} +47 -55
- package/dist/{chunk-AAX2A7LQ.js → chunk-S2OLTAEL.js} +2 -2
- package/dist/{chunk-CNVHMLPI.js → chunk-S4KHJERB.js} +1 -1
- package/dist/{chunk-2BGOB2QK.js → chunk-SE2MXV2N.js} +136 -25
- package/dist/{chunk-3CS6QYL7.js → chunk-SI7QCT2J.js} +8 -8
- package/dist/{chunk-CIHW6VM2.js → chunk-SKKQMW5X.js} +1 -1
- package/dist/{chunk-3B2DBUQX.js → chunk-TNTGGDSD.js} +1 -1
- package/dist/chunk-TSYRN646.js +84 -0
- package/dist/{chunk-XOM3XTJ4.js → chunk-U6KN6OIP.js} +2 -2
- package/dist/{chunk-63DGZRZP.js → chunk-ULL3U6PV.js} +1 -1
- package/dist/{chunk-IXXVS2Z4.js → chunk-VQB7G5BM.js} +1 -1
- package/dist/{chunk-UMUVGNOH.js → chunk-VR3JLTZD.js} +3 -3
- package/dist/{chunk-DEVZJ4AL.js → chunk-VS4SK7BN.js} +17 -11
- package/dist/{chunk-6N65ZMC5.js → chunk-VYRJAQGC.js} +1 -1
- package/dist/{chunk-FLREUEHW.js → chunk-W4DMQZL5.js} +1 -1
- package/dist/chunk-WABB4LZS.js +62 -0
- package/dist/{chunk-RXATE6FZ.js → chunk-WC4MTXGN.js} +22 -0
- package/dist/{chunk-36QE3P6B.js → chunk-WNMVC3IT.js} +1 -1
- package/dist/{chunk-T6SD37JZ.js → chunk-X6MCIK7L.js} +103 -16
- package/dist/chunk-XFMO3BEN.js +71 -0
- package/dist/{chunk-BBUK6A7Q.js → chunk-XG3IZV62.js} +7 -7
- package/dist/chunk-XMRA7CQG.js +22 -0
- package/dist/{chunk-G6QDFWDN.js → chunk-XOFBXLMG.js} +2 -2
- package/dist/{chunk-H4JO7VSI.js → chunk-XUQYC5DD.js} +12 -12
- package/dist/chunk-Z5J67X44.js +40 -0
- package/dist/{chunk-HEP5XMXV.js → chunk-Z5TGBEPJ.js} +9 -2
- package/dist/{chunk-7JAD4MEW.js → chunk-ZA5TNF4R.js} +1 -0
- package/dist/{clean-N5VSKUVS.js → clean-6GX7WAEC.js} +32 -31
- package/dist/cli.js +58 -58
- package/dist/{cloud-74NF5FXC.js → cloud-6PFJKLNL.js} +4 -4
- package/dist/{cloudrun-7UOH335V.js → cloudrun-UGG3ZFH7.js} +13 -12
- package/dist/commands/layout-audit.browser.js +3 -15
- package/dist/{compare-AY2LS2TZ.js → compare-P4EBOP4B.js} +46 -45
- package/dist/{compiler-4MHMC777.js → compiler-PG4RKX6K.js} +8 -8
- package/dist/{component-CFWQOAZI.js → component-SQPMI3W7.js} +3 -3
- package/dist/{compositions-DXLJTDSP.js → compositions-KRIHY3IY.js} +20 -19
- package/dist/{contactSheet-5APX35L3.js → contactSheet-RYAE7Y5D.js} +3 -2
- package/dist/{delete-GB4MS7LM.js → delete-T5TO4SV6.js} +7 -7
- package/dist/{deploy-NXD3Q3KD.js → deploy-AO6LQR5G.js} +6 -6
- package/dist/{deterministicFonts-775YXAQ2.js → deterministicFonts-LKAGUNE5.js} +3 -3
- package/dist/{dist-3ZJMZU75.js → dist-23AAB5X2.js} +36 -36
- package/dist/{dist-ZY6IFESG.js → dist-6IMEDVMC.js} +6 -3
- package/dist/docker/Dockerfile.render +1 -1
- package/dist/docs/rendering.md +3 -0
- package/dist/{doctor-CVY2XXKS.js → doctor-QBUJQ655.js} +23 -22
- package/dist/{events-RYQYEWBV.js → events-J7CESLKQ.js} +4 -4
- package/dist/{events-T3CLIYRG.js → events-SIZO7YHI.js} +5 -5
- package/dist/{feedback-K5ZMMLTA.js → feedback-74WOJ5PN.js} +22 -22
- package/dist/{ffmpeg-UNDAJ2IC.js → ffmpeg-AKUP6U2S.js} +17 -16
- package/dist/{figma-MYYCX635.js → figma-GGMYRR4Q.js} +3 -3
- package/dist/fontLocalizeCli.js +21 -19
- package/dist/{get-JVIDYMVP.js → get-PLKAI6JM.js} +7 -7
- package/dist/{gpuPolicy-KEX7GDRJ.js → gpuPolicy-EYDAAPJF.js} +14 -13
- package/dist/{grade-compare-QEF6VASJ.js → grade-compare-UADJP4AV.js} +44 -43
- package/dist/{gsapParserAcorn-LZJKCFQI.js → gsapParserAcorn-5YD4N6HQ.js} +2 -2
- package/dist/hangReport.js +47 -0
- package/dist/{heifImagePrep-A3ZPVQGU.js → heifImagePrep-KDF3OPOK.js} +15 -14
- package/dist/{help-XPPSLIRY.js → help-WSQQ555Q.js} +1 -1
- package/dist/{history-OFOPRD27.js → history-VSQ2DQ3V.js} +110 -62
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +76 -71
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-7RF6FQX5.js → info-MOQ4LRC3.js} +18 -18
- package/dist/{init-NTIXWA3D.js → init-EONQSZJG.js} +62 -60
- package/dist/{inspect-MYMCV5E7.js → inspect-OLCVLHOU.js} +43 -42
- package/dist/{installer-PYJIJ3PJ.js → installer-GHISA75B.js} +10 -10
- package/dist/{keyframes-UJ52PYE4.js → keyframes-DGQYCY24.js} +13 -13
- package/dist/{lambda-SBNUYEQE.js → lambda-AMMWF2YH.js} +35 -15
- package/dist/{layout-IOMCOABO.js → layout-R6CAPGRO.js} +43 -42
- package/dist/{lint-AQWHHMPS.js → lint-QZJEYPHD.js} +14 -11
- package/dist/{lintProject-5A4SCW3S.js → lintProject-W3YVHAGP.js} +6 -3
- package/dist/{list-WKAJ5SP3.js → list-KCJID4SP.js} +7 -7
- package/dist/localPage-V3HBGM3Z.js +27 -0
- package/dist/{login-3ZDK5JOA.js → login-7HKBEPJS.js} +7 -7
- package/dist/{logout-JYFWWUGK.js → logout-3IID4KXD.js} +3 -3
- package/dist/{manager-QYFYWZOK.js → manager-6YSKJMVD.js} +19 -18
- package/dist/{manager-F2YREC5X.js → manager-Z7W4GQGF.js} +9 -5
- package/dist/{media-treatment-4OLWVHUY.js → media-treatment-E3DL6LEZ.js} +34 -31
- package/dist/{models-MR55FAUX.js → models-URWI7YEG.js} +30 -29
- package/dist/{motionShot-DC47S7BT.js → motionShot-27IXMDJK.js} +25 -24
- package/dist/{normalize-audio-M2TK4NG5.js → normalize-audio-WGRLPR3P.js} +16 -16
- package/dist/{open-YXWBWTKL.js → open-LQ35PLEN.js} +21 -21
- package/dist/{parakeetRunner-J6QR3GTG.js → parakeetRunner-XASVIDTI.js} +27 -26
- package/dist/{pipeline-7MJ5H4SW.js → pipeline-GA7QVCHS.js} +18 -17
- package/dist/{play-S562STR4.js → play-RYZP77CI.js} +31 -31
- package/dist/{policies-GHVXA5PE.js → policies-PKLD4UW5.js} +1 -1
- package/dist/{preflight-QWGXMISC.js → preflight-HJFSJXXF.js} +19 -18
- package/dist/{present-PGOHZT3L.js → present-YBMLOWZV.js} +26 -26
- package/dist/{preview-JU75H4QN.js → preview-QIRKJCRV.js} +52 -39
- package/dist/{producer-H66OMZLW.js → producer-524FDOLX.js} +1 -1
- package/dist/{projectConfig-COSP24YT.js → projectConfig-IDQN5ZRW.js} +14 -13
- package/dist/{publication-J3XYHPGB.js → publication-3X3IGSDO.js} +8 -8
- package/dist/{publish-7GCCEPJZ.js → publish-2BF7K6HX.js} +21 -20
- package/dist/{refresh-USSFPJAU.js → refresh-3IRHJEQA.js} +3 -3
- package/dist/{remove-background-WRCGIU32.js → remove-background-EZBCEFT6.js} +22 -21
- package/dist/{render-QS3YJCBR.js → render-EFUA2A6A.js} +15 -11
- package/dist/{render-VUVTK2JM.js → render-JFMTAXHD.js} +87 -53
- package/dist/{render-5J5PP3UK.js → render-TEEBI2UT.js} +49 -43
- package/dist/{render-batch-Q2LQ3D4P.js → render-batch-XTYNXVSW.js} +16 -12
- package/dist/renderSetupWorker.js +12 -9
- package/dist/{resolver-QCBWPRSC.js → resolver-FZS6TN6B.js} +10 -10
- package/dist/{screenshotCapture-I5EDCITF.js → screenshotCapture-HOW4VSV6.js} +3 -2
- package/dist/{sherpa-IZ22SC5W.js → sherpa-TQIAIKTH.js} +26 -25
- package/dist/skills/hyperframes/SKILL.md +1 -1
- package/dist/skills/hyperframes/references/format.md +1 -0
- package/dist/skills/hyperframes-cli/references/beats.md +2 -0
- package/dist/skills/hyperframes-cli/references/init-and-scaffold.md +1 -0
- package/dist/skills/hyperframes-cli/references/lambda.md +3 -0
- package/dist/skills/hyperframes-cli/references/preview-render.md +3 -0
- package/dist/skills/media-use/references/grading.md +2 -0
- package/dist/skills/media-use/references/local.md +1 -0
- package/dist/{skills-3RFMPMJA.js → skills-S6ZG5KKH.js} +10 -10
- package/dist/{skillsUpdateCheck-DWBFVUBT.js → skillsUpdateCheck-XC7JQL3F.js} +5 -5
- package/dist/{snapshot-5PHA43DK.js → snapshot-ERYZIM32.js} +152 -80
- package/dist/{src-4YJKYMNF.js → src-6XOMREMS.js} +21 -12
- package/dist/{src-36BQVJL3.js → src-OL6RHPE4.js} +22 -20
- package/dist/{staticProjectServer-3XFB76XS.js → staticProjectServer-JYDDGPAH.js} +26 -26
- package/dist/{status-LR7VXITS.js → status-DTP6ZYDU.js} +3 -3
- package/dist/studio/assets/hyperframes-player-5dRdMVOq.js +478 -0
- package/dist/studio/assets/{index-CwreIGoq.js → index-Bu3mJUU2.js} +131 -131
- package/dist/studio/assets/{index-BNuxGFZK.js → index-ZqyQ91pm.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-WL6EZ4KE.js → studio-api-GRU4SHKD.js} +18 -18
- package/dist/{studioServer-ZS5RA6U3.js → studioServer-OYPBEI5B.js} +76 -73
- package/dist/{synthesize-QCRP3NI7.js → synthesize-QZHRXGRY.js} +26 -4
- package/dist/{telemetry-IHU4HL3R.js → telemetry-6BPSGY5W.js} +2 -2
- package/dist/{telemetry-W3LRO3TB.js → telemetry-CPYINR63.js} +5 -5
- package/dist/{timeline-BDO5DYWP.js → timeline-RGK5BMPD.js} +34 -33
- package/dist/{tokens-47CEMYFV.js → tokens-EX4BOWRW.js} +2 -2
- package/dist/{transcribe-XF3NL6JI.js → transcribe-MK367I6A.js} +24 -23
- package/dist/{transcribe-GEPVJO3A.js → transcribe-RI52JMVW.js} +35 -34
- package/dist/{tts-QM4RFE7U.js → tts-AY4JO5NQ.js} +2 -2
- package/dist/{updateCheck-BON6ZFYP.js → updateCheck-BIEJKQI4.js} +4 -4
- package/dist/{upgrade-KIF5Z4J3.js → upgrade-ES3UUI7O.js} +4 -4
- package/dist/upstreamProxy-W5FWAT5Z.js +17 -0
- package/dist/{urlDownloader-UDRHVUWR.js → urlDownloader-XAGYSTAG.js} +13 -12
- package/dist/{validate-2OPSQT3W.js → validate-A6GZHNEI.js} +36 -35
- package/dist/{video-ECWXMY4F.js → video-OEMGR3MN.js} +19 -15
- package/dist/warmCheck.js +53 -52
- package/package.json +2 -1
- package/dist/chunk-4YYJOFKS.js +0 -28
- package/dist/chunk-KLIPVNCO.js +0 -4824
- package/dist/studio/assets/hyperframes-player-lCVwx9d3.js +0 -478
- package/dist/{destroy-SSPAKADI.js → destroy-CGAZIL2C.js} +4 -4
|
@@ -5,8 +5,9 @@ var require = __hf_createRequire(import.meta.url);
|
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
ancestor,
|
|
9
|
+
fullAncestor
|
|
10
|
+
} from "./chunk-WC4MTXGN.js";
|
|
10
11
|
|
|
11
12
|
// ../parsers/dist/compositionContract.js
|
|
12
13
|
var COMPOSITION_CONTRACT_VERSION = 1;
|
|
@@ -1299,43 +1300,152 @@ function parseProgram(script) {
|
|
|
1299
1300
|
}
|
|
1300
1301
|
function literalString(node) {
|
|
1301
1302
|
if (node?.type === "Literal" && typeof node.value === "string") return node.value;
|
|
1302
|
-
if (node?.type === "TemplateLiteral" && node.expressions
|
|
1303
|
-
return node.quasis
|
|
1303
|
+
if (node?.type === "TemplateLiteral" && node.expressions.length === 0) {
|
|
1304
|
+
return node.quasis[0]?.value.cooked ?? void 0;
|
|
1304
1305
|
}
|
|
1305
1306
|
return void 0;
|
|
1306
1307
|
}
|
|
1307
1308
|
function memberName(node) {
|
|
1308
1309
|
if (node?.type !== "MemberExpression") return void 0;
|
|
1309
|
-
if (!node.computed && node.property
|
|
1310
|
+
if (!node.computed && node.property.type === "Identifier") return node.property.name;
|
|
1310
1311
|
return literalString(node.property);
|
|
1311
1312
|
}
|
|
1312
|
-
function
|
|
1313
|
-
|
|
1314
|
-
|
|
1313
|
+
function isFunctionScope(node) {
|
|
1314
|
+
return node.type === "Program" || node.type === "FunctionDeclaration" || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression" || node.type === "StaticBlock";
|
|
1315
|
+
}
|
|
1316
|
+
function isScope(node) {
|
|
1317
|
+
return isFunctionScope(node) || node.type === "BlockStatement" || node.type === "CatchClause" || node.type === "ForStatement" || node.type === "ForInStatement" || node.type === "ForOfStatement" || node.type === "SwitchStatement" || node.type === "ClassDeclaration" || node.type === "ClassExpression";
|
|
1318
|
+
}
|
|
1319
|
+
function declarePattern(pattern, initializer, scope, initializerScope = scope) {
|
|
1320
|
+
switch (pattern.type) {
|
|
1321
|
+
case "Identifier":
|
|
1322
|
+
if (initializer || !scope.bindings.has(pattern.name)) {
|
|
1323
|
+
scope.bindings.set(pattern.name, { initializer, scope: initializerScope });
|
|
1324
|
+
}
|
|
1325
|
+
break;
|
|
1326
|
+
case "RestElement":
|
|
1327
|
+
declarePattern(pattern.argument, null, scope);
|
|
1328
|
+
break;
|
|
1329
|
+
case "AssignmentPattern":
|
|
1330
|
+
declarePattern(pattern.left, null, scope);
|
|
1331
|
+
break;
|
|
1332
|
+
case "ArrayPattern":
|
|
1333
|
+
case "ObjectPattern":
|
|
1334
|
+
declarePatterns(destructuredPatterns(pattern), scope);
|
|
1335
|
+
break;
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
function declarePatterns(patterns, scope) {
|
|
1339
|
+
for (const pattern of patterns) declarePattern(pattern, null, scope);
|
|
1340
|
+
}
|
|
1341
|
+
function destructuredPatterns(pattern) {
|
|
1342
|
+
if (pattern.type === "ObjectPattern") {
|
|
1343
|
+
return pattern.properties.map(
|
|
1344
|
+
(property) => property.type === "RestElement" ? property.argument : property.value
|
|
1345
|
+
);
|
|
1346
|
+
}
|
|
1347
|
+
return pattern.elements.filter((element) => element !== null);
|
|
1348
|
+
}
|
|
1349
|
+
function declareOptionalPattern(pattern, scope) {
|
|
1350
|
+
if (pattern) declarePattern(pattern, null, scope);
|
|
1351
|
+
}
|
|
1352
|
+
function declareScopedName(node, scope) {
|
|
1353
|
+
switch (node.type) {
|
|
1354
|
+
case "FunctionExpression":
|
|
1355
|
+
case "FunctionDeclaration":
|
|
1356
|
+
declareOptionalPattern(node.id, scope);
|
|
1357
|
+
declarePatterns(node.params, scope);
|
|
1358
|
+
break;
|
|
1359
|
+
case "ArrowFunctionExpression":
|
|
1360
|
+
declarePatterns(node.params, scope);
|
|
1361
|
+
break;
|
|
1362
|
+
case "ClassDeclaration":
|
|
1363
|
+
case "ClassExpression":
|
|
1364
|
+
declareOptionalPattern(node.id, scope);
|
|
1365
|
+
break;
|
|
1366
|
+
case "CatchClause":
|
|
1367
|
+
declareOptionalPattern(node.param, scope);
|
|
1368
|
+
break;
|
|
1369
|
+
case "ImportDeclaration":
|
|
1370
|
+
declarePatterns(
|
|
1371
|
+
node.specifiers.map((specifier) => specifier.local),
|
|
1372
|
+
scope
|
|
1373
|
+
);
|
|
1374
|
+
break;
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
function lookupBinding(name, scope) {
|
|
1378
|
+
for (let current = scope; current; current = current.parent) {
|
|
1379
|
+
const binding = current.bindings.get(name);
|
|
1380
|
+
if (binding) return binding;
|
|
1381
|
+
}
|
|
1382
|
+
return void 0;
|
|
1383
|
+
}
|
|
1384
|
+
function collectBindings(ast) {
|
|
1385
|
+
const root = { bindings: /* @__PURE__ */ new Map() };
|
|
1386
|
+
const scopes = new WeakMap([[ast, root]]);
|
|
1387
|
+
const scopeAt = (ancestors, functionOnly = false) => {
|
|
1388
|
+
let parent = root;
|
|
1389
|
+
let selected = root;
|
|
1390
|
+
for (const node of ancestors) {
|
|
1391
|
+
if (!isScope(node)) continue;
|
|
1392
|
+
let scope = scopes.get(node);
|
|
1393
|
+
if (!scope) {
|
|
1394
|
+
scope = { parent, bindings: /* @__PURE__ */ new Map() };
|
|
1395
|
+
scopes.set(node, scope);
|
|
1396
|
+
}
|
|
1397
|
+
parent = scope;
|
|
1398
|
+
if (!functionOnly || isFunctionScope(node)) selected = scope;
|
|
1399
|
+
}
|
|
1400
|
+
return selected;
|
|
1401
|
+
};
|
|
1402
|
+
fullAncestor(ast, (node, _state, ancestors) => {
|
|
1403
|
+
const scope = scopeAt(ancestors);
|
|
1404
|
+
if (node.type === "VariableDeclarator") {
|
|
1405
|
+
const declaration = ancestors.at(-2);
|
|
1406
|
+
const bindingScope = scopeAt(
|
|
1407
|
+
ancestors,
|
|
1408
|
+
declaration?.type === "VariableDeclaration" && declaration.kind === "var"
|
|
1409
|
+
);
|
|
1410
|
+
declarePattern(node.id, node.init ?? null, bindingScope, scope);
|
|
1411
|
+
return;
|
|
1412
|
+
}
|
|
1413
|
+
if ((node.type === "FunctionDeclaration" || node.type === "ClassDeclaration") && node.id) {
|
|
1414
|
+
declarePattern(node.id, null, scopeAt(ancestors.slice(0, -1)));
|
|
1415
|
+
}
|
|
1416
|
+
declareScopedName(node, scope);
|
|
1417
|
+
});
|
|
1418
|
+
return scopeAt;
|
|
1419
|
+
}
|
|
1420
|
+
function lookupSelector(node, scope, seen = /* @__PURE__ */ new Set()) {
|
|
1421
|
+
if (node?.type === "Identifier") {
|
|
1422
|
+
const binding = lookupBinding(node.name, scope);
|
|
1423
|
+
if (!binding || seen.has(binding)) return void 0;
|
|
1424
|
+
seen.add(binding);
|
|
1425
|
+
return lookupSelector(binding.initializer, binding.scope, seen);
|
|
1426
|
+
}
|
|
1427
|
+
return selectorFromDomLookup(node);
|
|
1428
|
+
}
|
|
1429
|
+
function selectorFromDomLookup(node) {
|
|
1430
|
+
if (node?.type !== "CallExpression" || node.callee.type !== "MemberExpression") {
|
|
1315
1431
|
return void 0;
|
|
1316
1432
|
}
|
|
1317
1433
|
const method = memberName(node.callee);
|
|
1318
1434
|
if (method !== "getElementById" && method !== "querySelector") return void 0;
|
|
1319
|
-
const value = literalString(node.arguments
|
|
1435
|
+
const value = literalString(node.arguments[0]);
|
|
1320
1436
|
if (!value) return void 0;
|
|
1321
1437
|
return method === "getElementById" ? `#${value}` : value;
|
|
1322
1438
|
}
|
|
1323
1439
|
function extractMediaSrcMutations(script) {
|
|
1324
1440
|
try {
|
|
1325
1441
|
const ast = parseProgram(script);
|
|
1326
|
-
const
|
|
1327
|
-
simple(ast, {
|
|
1328
|
-
VariableDeclarator(node) {
|
|
1329
|
-
if (node.id?.type !== "Identifier") return;
|
|
1330
|
-
const selector = lookupSelector(node.init, bindings);
|
|
1331
|
-
if (selector) bindings.set(node.id.name, selector);
|
|
1332
|
-
}
|
|
1333
|
-
});
|
|
1442
|
+
const scopeAt = collectBindings(ast);
|
|
1334
1443
|
const mutations = [];
|
|
1335
|
-
|
|
1336
|
-
AssignmentExpression(node) {
|
|
1337
|
-
if (node.operator !== "=" || memberName(node.left) !== "src")
|
|
1338
|
-
|
|
1444
|
+
ancestor(ast, {
|
|
1445
|
+
AssignmentExpression(node, _state, ancestors) {
|
|
1446
|
+
if (node.operator !== "=" || node.left.type !== "MemberExpression" || memberName(node.left) !== "src")
|
|
1447
|
+
return;
|
|
1448
|
+
const selector = lookupSelector(node.left.object, scopeAt(ancestors));
|
|
1339
1449
|
if (!selector) return;
|
|
1340
1450
|
mutations.push({
|
|
1341
1451
|
selector,
|
|
@@ -1343,10 +1453,11 @@ function extractMediaSrcMutations(script) {
|
|
|
1343
1453
|
raw: script.slice(node.start, node.end)
|
|
1344
1454
|
});
|
|
1345
1455
|
},
|
|
1346
|
-
CallExpression(node) {
|
|
1347
|
-
if (memberName(node.callee) !== "setAttribute")
|
|
1348
|
-
|
|
1349
|
-
|
|
1456
|
+
CallExpression(node, _state, ancestors) {
|
|
1457
|
+
if (node.callee.type !== "MemberExpression" || memberName(node.callee) !== "setAttribute")
|
|
1458
|
+
return;
|
|
1459
|
+
if (literalString(node.arguments[0])?.toLowerCase() !== "src") return;
|
|
1460
|
+
const selector = lookupSelector(node.callee.object, scopeAt(ancestors));
|
|
1350
1461
|
if (!selector) return;
|
|
1351
1462
|
mutations.push({
|
|
1352
1463
|
selector,
|
|
@@ -6,35 +6,32 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
parakeetRunner
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BLCKQPBE.js";
|
|
10
10
|
import {
|
|
11
11
|
DecodeCancelled,
|
|
12
12
|
prepareSherpaWav,
|
|
13
13
|
sherpaUnsupportedReason,
|
|
14
14
|
transcribeWithSherpa
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CP225S5H.js";
|
|
16
16
|
import {
|
|
17
17
|
initialModelForLanguage,
|
|
18
18
|
transcribe
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6CWKORZO.js";
|
|
20
20
|
import {
|
|
21
21
|
createRenderCancellationScope,
|
|
22
22
|
stoppedByCancelSignal
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-LSMFOZ4F.js";
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_MODEL,
|
|
26
26
|
findWhisper,
|
|
27
27
|
isWhisperUnavailable
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-4HT2L6W2.js";
|
|
29
29
|
import {
|
|
30
30
|
formatSrt,
|
|
31
31
|
formatVtt,
|
|
32
32
|
loadTranscript,
|
|
33
33
|
patchCaptionHtml
|
|
34
34
|
} from "./chunk-6MUI2H6P.js";
|
|
35
|
-
import {
|
|
36
|
-
normalizeErrorMessage
|
|
37
|
-
} from "./chunk-T2EUWCJE.js";
|
|
38
35
|
import {
|
|
39
36
|
PARAKEET_INSTALL_COMMAND,
|
|
40
37
|
PARAKEET_LANGUAGES,
|
|
@@ -44,6 +41,9 @@ import {
|
|
|
44
41
|
import {
|
|
45
42
|
TRANSCRIPT_FILE
|
|
46
43
|
} from "./chunk-IR35BCLK.js";
|
|
44
|
+
import {
|
|
45
|
+
normalizeErrorMessage
|
|
46
|
+
} from "./chunk-EU7MVORF.js";
|
|
47
47
|
|
|
48
48
|
// src/api/transcribe.ts
|
|
49
49
|
import { existsSync, realpathSync, rmSync, statSync, writeFileSync } from "fs";
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
VERSION
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MW2NQQ6Z.js";
|
|
10
10
|
|
|
11
11
|
// src/registry/compatibility.ts
|
|
12
12
|
import { compareVersions } from "compare-versions";
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
|
|
8
|
+
// src/capture/upstreamProxy.ts
|
|
9
|
+
import { request as httpRequest } from "http";
|
|
10
|
+
var CAPTURE_PROXY_ENV = "HYPERFRAMES_CAPTURE_PROXY";
|
|
11
|
+
var TUNNEL_TIMEOUT_MS = 15e3;
|
|
12
|
+
function defaultPort(target) {
|
|
13
|
+
return target.port || (target.protocol === "https:" ? "443" : "80");
|
|
14
|
+
}
|
|
15
|
+
function captureUpstreamProxy(env = process.env) {
|
|
16
|
+
const raw = env[CAPTURE_PROXY_ENV]?.trim();
|
|
17
|
+
if (!raw) return void 0;
|
|
18
|
+
let url;
|
|
19
|
+
let credentials;
|
|
20
|
+
try {
|
|
21
|
+
url = new URL(raw);
|
|
22
|
+
if (url.username || url.password) {
|
|
23
|
+
credentials = `${decodeURIComponent(url.username)}:${decodeURIComponent(url.password)}`;
|
|
24
|
+
}
|
|
25
|
+
} catch {
|
|
26
|
+
throw new Error(`${CAPTURE_PROXY_ENV} is not a valid proxy URL`);
|
|
27
|
+
}
|
|
28
|
+
if (url.protocol !== "http:") {
|
|
29
|
+
throw new Error(`${CAPTURE_PROXY_ENV} must be an http:// proxy URL`);
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
host: url.hostname.replace(/^\[(.*)\]$/, "$1"),
|
|
33
|
+
port: Number(url.port || 80),
|
|
34
|
+
authorization: credentials ? `Basic ${Buffer.from(credentials).toString("base64")}` : void 0
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function connectAuthority(target) {
|
|
38
|
+
return `${target.hostname}:${defaultPort(target)}`;
|
|
39
|
+
}
|
|
40
|
+
function openUpstreamTunnel(proxy, authority, options = {}) {
|
|
41
|
+
return new Promise((resolve, reject) => {
|
|
42
|
+
const req = httpRequest({
|
|
43
|
+
host: proxy.host,
|
|
44
|
+
port: proxy.port,
|
|
45
|
+
method: "CONNECT",
|
|
46
|
+
path: authority,
|
|
47
|
+
headers: {
|
|
48
|
+
host: authority,
|
|
49
|
+
...proxy.authorization ? { "proxy-authorization": proxy.authorization } : {}
|
|
50
|
+
},
|
|
51
|
+
agent: false,
|
|
52
|
+
signal: options.signal
|
|
53
|
+
});
|
|
54
|
+
req.once("socket", (socket) => options.onSocket?.(socket));
|
|
55
|
+
req.setTimeout(
|
|
56
|
+
TUNNEL_TIMEOUT_MS,
|
|
57
|
+
() => req.destroy(new Error("Upstream proxy CONNECT timed out"))
|
|
58
|
+
);
|
|
59
|
+
req.once("connect", (response, socket, head) => {
|
|
60
|
+
const status = response.statusCode ?? 0;
|
|
61
|
+
if (status < 200 || status >= 300) {
|
|
62
|
+
socket.destroy();
|
|
63
|
+
reject(new Error(`Upstream proxy refused CONNECT with HTTP ${status}`));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
socket.setTimeout(0);
|
|
67
|
+
if (head.length) socket.unshift(head);
|
|
68
|
+
resolve(socket);
|
|
69
|
+
});
|
|
70
|
+
req.once("response", (response) => {
|
|
71
|
+
response.resume();
|
|
72
|
+
req.destroy();
|
|
73
|
+
reject(new Error(`Upstream proxy refused CONNECT with HTTP ${response.statusCode}`));
|
|
74
|
+
});
|
|
75
|
+
req.once("error", reject);
|
|
76
|
+
req.end();
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
captureUpstreamProxy,
|
|
82
|
+
connectAuthority,
|
|
83
|
+
openUpstreamTunnel
|
|
84
|
+
};
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
readConfig,
|
|
12
12
|
readConfigFresh,
|
|
13
13
|
writeConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NEASABW6.js";
|
|
15
15
|
import {
|
|
16
16
|
isDevMode
|
|
17
17
|
} from "./chunk-ISN5GRYI.js";
|
|
18
18
|
import {
|
|
19
19
|
VERSION
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MW2NQQ6Z.js";
|
|
21
21
|
|
|
22
22
|
// src/utils/updateCheck.ts
|
|
23
23
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
readMediaOffsetSeconds
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SE2MXV2N.js";
|
|
10
10
|
|
|
11
11
|
// ../core/dist/mediaLink.js
|
|
12
12
|
var MEDIA_LINK_ATTR = "data-link";
|
|
@@ -7,14 +7,14 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
trackLintReport,
|
|
9
9
|
trackLintRuleStreak
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DHQSDCWD.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldTrack
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PSOAGSNO.js";
|
|
14
14
|
import {
|
|
15
15
|
LINT_RULE_COUNT,
|
|
16
16
|
LINT_RULE_GROUP_COUNTS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FC4WT5FX.js";
|
|
18
18
|
|
|
19
19
|
// src/telemetry/lintStreaks.ts
|
|
20
20
|
import { createHash } from "crypto";
|
|
@@ -4,32 +4,35 @@ import { dirname as __hf_dirname } from "node:path";
|
|
|
4
4
|
var require = __hf_createRequire(import.meta.url);
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
readJsonFlag
|
|
9
|
+
} from "./chunk-XFMO3BEN.js";
|
|
7
10
|
import {
|
|
8
11
|
RegistryCompatibilityError,
|
|
9
12
|
gateRegistryItemsCompatibility
|
|
10
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SKKQMW5X.js";
|
|
11
14
|
import {
|
|
12
15
|
DEFAULT_PROJECT_CONFIG,
|
|
13
16
|
createProjectConfig,
|
|
14
17
|
loadProjectConfig,
|
|
15
18
|
projectConfigPath,
|
|
16
19
|
recordProjectRegistryItems
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ORFRUZPB.js";
|
|
18
21
|
import {
|
|
19
22
|
resolveItemWithDependencies,
|
|
20
23
|
resolveItemsByTag
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-TNTGGDSD.js";
|
|
22
25
|
import {
|
|
23
26
|
InvalidVariableValuesError,
|
|
24
27
|
prepareItem,
|
|
25
28
|
publishItem
|
|
26
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-OTXXDONS.js";
|
|
27
30
|
import {
|
|
28
31
|
DEFAULT_REGISTRY_URL
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-HUKQW4YE.js";
|
|
30
33
|
import {
|
|
31
34
|
trackRegistryItemAdded
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-DHQSDCWD.js";
|
|
33
36
|
import {
|
|
34
37
|
defineCommand
|
|
35
38
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -41,7 +44,7 @@ import {
|
|
|
41
44
|
} from "./chunk-ZTZA4UWZ.js";
|
|
42
45
|
import {
|
|
43
46
|
ITEM_TYPE_DIRS
|
|
44
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-QWBVPWUI.js";
|
|
45
48
|
import {
|
|
46
49
|
isProjectRootMissing,
|
|
47
50
|
realpath
|
|
@@ -160,9 +163,12 @@ function parseVariableValues(raw) {
|
|
|
160
163
|
if (raw === void 0) return null;
|
|
161
164
|
let parsed;
|
|
162
165
|
try {
|
|
163
|
-
parsed =
|
|
164
|
-
} catch {
|
|
165
|
-
throw new AddError(
|
|
166
|
+
parsed = readJsonFlag("--vars", raw);
|
|
167
|
+
} catch (error) {
|
|
168
|
+
throw new AddError(
|
|
169
|
+
`--vars must be a JSON object of variable values (${error instanceof Error ? error.message : String(error)})`,
|
|
170
|
+
"invalid-vars"
|
|
171
|
+
);
|
|
166
172
|
}
|
|
167
173
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
168
174
|
throw new AddError("--vars must be a JSON object of variable values", "invalid-vars");
|
|
@@ -349,7 +355,7 @@ var add_default = defineCommand({
|
|
|
349
355
|
},
|
|
350
356
|
vars: {
|
|
351
357
|
type: "string",
|
|
352
|
-
description: "JSON of variable values to bake into the printed snippet, as copied from a catalog page"
|
|
358
|
+
description: "JSON of variable values to bake into the printed snippet, as copied from a catalog page; or a JSON file path, or - for stdin"
|
|
353
359
|
},
|
|
354
360
|
force: {
|
|
355
361
|
type: "boolean",
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
errorBox
|
|
9
|
+
} from "./chunk-K2FLNJVB.js";
|
|
10
|
+
import {
|
|
11
|
+
failUsage
|
|
12
|
+
} from "./chunk-JVBRJMOP.js";
|
|
13
|
+
import {
|
|
14
|
+
appendRateCapArgs
|
|
15
|
+
} from "./chunk-MPO25DQW.js";
|
|
16
|
+
|
|
17
|
+
// src/utils/deliveryFlags.ts
|
|
18
|
+
var deliveryFlagArgs = {
|
|
19
|
+
"keyframe-interval": {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "MP4 keyframe interval in seconds, such as 2 (a keyframe at least this often; default: encoder's choice)."
|
|
22
|
+
},
|
|
23
|
+
"max-bitrate": {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "MP4 peak video bitrate cap, such as 8M, kept alongside the quality target (default: uncapped)."
|
|
26
|
+
},
|
|
27
|
+
"buffer-size": {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "Buffer for --max-bitrate, such as 16M (default: twice --max-bitrate)."
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
function parseDeliveryFlags(args) {
|
|
33
|
+
const interval = args["keyframe-interval"]?.trim();
|
|
34
|
+
const maxBitrate = args["max-bitrate"]?.trim();
|
|
35
|
+
const bufferSize = args["buffer-size"]?.trim();
|
|
36
|
+
const values = {};
|
|
37
|
+
if (interval !== void 0) {
|
|
38
|
+
const seconds = Number(interval);
|
|
39
|
+
if (interval === "" || !Number.isFinite(seconds) || seconds <= 0) {
|
|
40
|
+
errorBox(
|
|
41
|
+
"Invalid keyframe-interval",
|
|
42
|
+
`Got "${interval}". Must be a positive number of seconds.`
|
|
43
|
+
);
|
|
44
|
+
failUsage();
|
|
45
|
+
}
|
|
46
|
+
values.keyframeIntervalSeconds = seconds;
|
|
47
|
+
}
|
|
48
|
+
if (maxBitrate !== void 0) values.maxBitrate = maxBitrate;
|
|
49
|
+
if (bufferSize !== void 0) values.bufferSize = bufferSize;
|
|
50
|
+
try {
|
|
51
|
+
appendRateCapArgs([], values);
|
|
52
|
+
} catch (error) {
|
|
53
|
+
errorBox("Invalid bitrate cap", error instanceof Error ? error.message : String(error));
|
|
54
|
+
failUsage();
|
|
55
|
+
}
|
|
56
|
+
return values;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
deliveryFlagArgs,
|
|
61
|
+
parseDeliveryFlags
|
|
62
|
+
};
|
|
@@ -58,6 +58,27 @@ function full(node, callback, baseVisitor, state, override) {
|
|
|
58
58
|
}
|
|
59
59
|
})(node, state, override);
|
|
60
60
|
}
|
|
61
|
+
function fullAncestor(node, callback, baseVisitor, state) {
|
|
62
|
+
if (!baseVisitor) {
|
|
63
|
+
baseVisitor = base;
|
|
64
|
+
}
|
|
65
|
+
var ancestors = [], last;
|
|
66
|
+
(function c(node2, st, override) {
|
|
67
|
+
var type = override || node2.type;
|
|
68
|
+
var isNew = node2 !== ancestors[ancestors.length - 1];
|
|
69
|
+
if (isNew) {
|
|
70
|
+
ancestors.push(node2);
|
|
71
|
+
}
|
|
72
|
+
visitNode(baseVisitor, type, node2, st, c);
|
|
73
|
+
if (last !== node2) {
|
|
74
|
+
callback(node2, st || ancestors, ancestors, type);
|
|
75
|
+
last = node2;
|
|
76
|
+
}
|
|
77
|
+
if (isNew) {
|
|
78
|
+
ancestors.pop();
|
|
79
|
+
}
|
|
80
|
+
})(node, state);
|
|
81
|
+
}
|
|
61
82
|
function make(funcs, baseVisitor) {
|
|
62
83
|
var visitor = Object.create(baseVisitor || base);
|
|
63
84
|
for (var type in funcs) {
|
|
@@ -381,5 +402,6 @@ export {
|
|
|
381
402
|
ancestor,
|
|
382
403
|
recursive,
|
|
383
404
|
full,
|
|
405
|
+
fullAncestor,
|
|
384
406
|
base
|
|
385
407
|
};
|