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
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
|
|
14
|
+
// src/utils/compositionEntry.ts
|
|
15
|
+
import { realpathSync } from "fs";
|
|
16
|
+
import { isAbsolute, relative, resolve, sep } from "path";
|
|
17
|
+
function normalizeCompositionEntryArg(raw) {
|
|
18
|
+
const trimmed = raw?.trim().replace(/^\.\//, "") || void 0;
|
|
19
|
+
return !trimmed || trimmed === "." ? void 0 : trimmed;
|
|
20
|
+
}
|
|
21
|
+
function hasExplicitCompositionArg(raw) {
|
|
22
|
+
return normalizeCompositionEntryArg(raw) !== void 0;
|
|
23
|
+
}
|
|
24
|
+
function parseCompositionEntryArg(raw, projectDir, stat, real = realpathOrSame) {
|
|
25
|
+
const trimmed = normalizeCompositionEntryArg(raw);
|
|
26
|
+
if (!trimmed) return { ok: true, value: void 0 };
|
|
27
|
+
const absProjectDir = resolve(projectDir);
|
|
28
|
+
const entryPath = resolve(absProjectDir, trimmed);
|
|
29
|
+
const relativeEntry = [absProjectDir, real(absProjectDir)].flatMap((root) => [entryPath, real(entryPath)].map((path) => relative(root, path))).find((rel) => rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel));
|
|
30
|
+
const fail = (kind) => ({
|
|
31
|
+
ok: false,
|
|
32
|
+
error: { kind, entryFile: trimmed, entryPath, projectDir: absProjectDir }
|
|
33
|
+
});
|
|
34
|
+
if (relativeEntry === void 0) return fail("outside-project");
|
|
35
|
+
let entryStat;
|
|
36
|
+
try {
|
|
37
|
+
entryStat = stat(entryPath);
|
|
38
|
+
} catch {
|
|
39
|
+
return fail("not-found");
|
|
40
|
+
}
|
|
41
|
+
if (!entryStat.isFile()) {
|
|
42
|
+
return fail("not-a-file");
|
|
43
|
+
}
|
|
44
|
+
return { ok: true, value: relativeEntry.split(sep).join("/") };
|
|
45
|
+
}
|
|
46
|
+
function realpathOrSame(path) {
|
|
47
|
+
try {
|
|
48
|
+
return realpathSync(path);
|
|
49
|
+
} catch {
|
|
50
|
+
return path;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function compositionEntryErrorMessage(error) {
|
|
54
|
+
const resolved = `"${error.entryFile}" resolves to ${error.entryPath}`;
|
|
55
|
+
switch (error.kind) {
|
|
56
|
+
case "outside-project":
|
|
57
|
+
return {
|
|
58
|
+
title: "Invalid composition path",
|
|
59
|
+
message: `${resolved}, outside the project directory ${error.projectDir}.`,
|
|
60
|
+
hint: "Pass a .html file inside the project directory, relative to it (e.g. compositions/intro.html)."
|
|
61
|
+
};
|
|
62
|
+
case "not-found":
|
|
63
|
+
return {
|
|
64
|
+
title: "Composition not found",
|
|
65
|
+
message: `${resolved}, which does not exist in the project directory ${error.projectDir}.`,
|
|
66
|
+
hint: "Pass a path to a .html file relative to the project root (e.g. compositions/intro.html)."
|
|
67
|
+
};
|
|
68
|
+
case "not-a-file":
|
|
69
|
+
return {
|
|
70
|
+
title: "Invalid composition path",
|
|
71
|
+
message: `${resolved}, a directory, not an .html file (project directory ${error.projectDir}).`,
|
|
72
|
+
hint: "Pass a path to a .html file (e.g. compositions/intro.html), or omit --composition to render index.html."
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function resolveCompositionEntryArg(raw, projectDir, stat) {
|
|
77
|
+
const result = parseCompositionEntryArg(raw, projectDir, stat);
|
|
78
|
+
if (!result.ok) {
|
|
79
|
+
const { title, message, hint } = compositionEntryErrorMessage(result.error);
|
|
80
|
+
errorBox(title, message, hint);
|
|
81
|
+
failUsage();
|
|
82
|
+
}
|
|
83
|
+
return result.value;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
hasExplicitCompositionArg,
|
|
88
|
+
parseCompositionEntryArg,
|
|
89
|
+
compositionEntryErrorMessage,
|
|
90
|
+
resolveCompositionEntryArg
|
|
91
|
+
};
|
|
@@ -4,10 +4,18 @@ 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
|
+
captureUpstreamProxy,
|
|
9
|
+
connectAuthority,
|
|
10
|
+
openUpstreamTunnel
|
|
11
|
+
} from "./chunk-TSYRN646.js";
|
|
12
|
+
import {
|
|
13
|
+
fetchLocalPageUrl
|
|
14
|
+
} from "./chunk-DROFHVQD.js";
|
|
7
15
|
import {
|
|
8
16
|
ensureCaptureDirSync,
|
|
9
17
|
writeCaptureFileSync
|
|
10
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EQBDKYXR.js";
|
|
11
19
|
import {
|
|
12
20
|
loadSharp
|
|
13
21
|
} from "./chunk-EXAX37XR.js";
|
|
@@ -17,7 +25,7 @@ import {
|
|
|
17
25
|
} from "./chunk-AWDFDFI3.js";
|
|
18
26
|
import {
|
|
19
27
|
isBlockedNetworkHost
|
|
20
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MPO25DQW.js";
|
|
21
29
|
import {
|
|
22
30
|
DOMParser,
|
|
23
31
|
parseHTML
|
|
@@ -33,6 +41,7 @@ import { readFile } from "fs/promises";
|
|
|
33
41
|
import { isIP } from "net";
|
|
34
42
|
import { request as httpRequest } from "http";
|
|
35
43
|
import { request as httpsRequest } from "https";
|
|
44
|
+
import { connect as tlsConnect } from "tls";
|
|
36
45
|
var DNS_TIMEOUT_MS = 1e4;
|
|
37
46
|
var CARES_TIMEOUT_MS = 5e3;
|
|
38
47
|
function ipv4Number(address) {
|
|
@@ -62,7 +71,7 @@ function isPublicIPv4(address) {
|
|
|
62
71
|
const value = ipv4Number(address);
|
|
63
72
|
return !NON_PUBLIC_RANGES.some(({ start, end }) => value >= start && value < end);
|
|
64
73
|
}
|
|
65
|
-
|
|
74
|
+
function assertPublicHostname(hostname) {
|
|
66
75
|
const host = hostname.toLowerCase().replace(/\.$/, "");
|
|
67
76
|
if (isIP(host) === 4) {
|
|
68
77
|
if (!isPublicIPv4(host)) throw new Error("Capture requires a public IPv4 address");
|
|
@@ -71,6 +80,11 @@ async function resolvePublicAddress(hostname) {
|
|
|
71
80
|
if (!host.includes(".") || !/^[a-z0-9.-]+$/.test(host) || /(?:^|\.)(?:localhost|local|internal|home|lan|test|invalid|example)$/.test(host) || host.split(".").some((label) => !label || label.startsWith("-") || label.endsWith("-"))) {
|
|
72
81
|
throw new Error("Capture requires a public hostname");
|
|
73
82
|
}
|
|
83
|
+
return host;
|
|
84
|
+
}
|
|
85
|
+
async function resolvePublicAddress(hostname) {
|
|
86
|
+
const host = assertPublicHostname(hostname);
|
|
87
|
+
if (isIP(host) === 4) return host;
|
|
74
88
|
const answers = await resolveIPv4(host);
|
|
75
89
|
const first = answers[0];
|
|
76
90
|
if (!first || !answers.every(isPublicIPv4)) {
|
|
@@ -163,6 +177,38 @@ function systemLookupInKillableChild(host, timeoutMs) {
|
|
|
163
177
|
function killLiveLookups() {
|
|
164
178
|
for (const child of liveLookups) child.kill("SIGKILL");
|
|
165
179
|
}
|
|
180
|
+
async function pinnedRoute(target, signal) {
|
|
181
|
+
const address = await new Promise((resolve, reject) => {
|
|
182
|
+
const onAbort = () => reject(signal.reason);
|
|
183
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
184
|
+
resolvePublicAddress(target.hostname).then(resolve, reject).finally(() => signal.removeEventListener("abort", onAbort));
|
|
185
|
+
});
|
|
186
|
+
signal.throwIfAborted();
|
|
187
|
+
return {
|
|
188
|
+
options: {
|
|
189
|
+
hostname: address,
|
|
190
|
+
port: target.port || void 0,
|
|
191
|
+
agent: false,
|
|
192
|
+
servername: target.hostname,
|
|
193
|
+
rejectUnauthorized: true
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
async function upstreamRoute(target, proxy, headers, signal) {
|
|
198
|
+
assertPublicHostname(target.hostname);
|
|
199
|
+
if (target.protocol === "http:") {
|
|
200
|
+
if (proxy.authorization) headers.set("proxy-authorization", proxy.authorization);
|
|
201
|
+
const path = `${target.origin}${target.pathname}${target.search}`;
|
|
202
|
+
return { options: { hostname: proxy.host, port: proxy.port, agent: false, path } };
|
|
203
|
+
}
|
|
204
|
+
const tunnel = await openUpstreamTunnel(proxy, connectAuthority(target), { signal });
|
|
205
|
+
return {
|
|
206
|
+
tunnel,
|
|
207
|
+
options: {
|
|
208
|
+
createConnection: () => tlsConnect({ socket: tunnel, servername: target.hostname, rejectUnauthorized: true })
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
}
|
|
166
212
|
async function publicRequest(url, init = {}) {
|
|
167
213
|
const target = new URL(url);
|
|
168
214
|
if (!["http:", "https:"].includes(target.protocol) || target.username || target.password) {
|
|
@@ -174,12 +220,6 @@ async function publicRequest(url, init = {}) {
|
|
|
174
220
|
}
|
|
175
221
|
const signal = init.signal ?? AbortSignal.timeout(3e4);
|
|
176
222
|
signal.throwIfAborted();
|
|
177
|
-
const address = await new Promise((resolve, reject) => {
|
|
178
|
-
const onAbort = () => reject(signal.reason);
|
|
179
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
180
|
-
resolvePublicAddress(target.hostname).then(resolve, reject).finally(() => signal.removeEventListener("abort", onAbort));
|
|
181
|
-
});
|
|
182
|
-
signal.throwIfAborted();
|
|
183
223
|
const headers = new Headers(init.headers);
|
|
184
224
|
for (const name of [
|
|
185
225
|
"connection",
|
|
@@ -192,19 +232,17 @@ async function publicRequest(url, init = {}) {
|
|
|
192
232
|
headers.delete(name);
|
|
193
233
|
headers.set("host", target.host);
|
|
194
234
|
headers.set("accept-encoding", "identity");
|
|
235
|
+
const proxy = captureUpstreamProxy();
|
|
236
|
+
const { options, tunnel } = proxy ? await upstreamRoute(target, proxy, headers, signal) : await pinnedRoute(target, signal);
|
|
195
237
|
return new Promise((resolve, reject) => {
|
|
196
238
|
const request = target.protocol === "https:" ? httpsRequest : httpRequest;
|
|
197
239
|
const req = request(
|
|
198
240
|
{
|
|
199
241
|
protocol: target.protocol,
|
|
200
|
-
hostname: address,
|
|
201
|
-
port: target.port || void 0,
|
|
202
242
|
path: `${target.pathname}${target.search}`,
|
|
243
|
+
...options,
|
|
203
244
|
method,
|
|
204
245
|
headers: Object.fromEntries(headers),
|
|
205
|
-
agent: false,
|
|
206
|
-
servername: target.hostname,
|
|
207
|
-
rejectUnauthorized: true,
|
|
208
246
|
signal
|
|
209
247
|
},
|
|
210
248
|
(incoming) => {
|
|
@@ -216,7 +254,10 @@ async function publicRequest(url, init = {}) {
|
|
|
216
254
|
}
|
|
217
255
|
}
|
|
218
256
|
);
|
|
219
|
-
req.once("error",
|
|
257
|
+
req.once("error", (error) => {
|
|
258
|
+
tunnel?.destroy();
|
|
259
|
+
reject(error);
|
|
260
|
+
});
|
|
220
261
|
req.end();
|
|
221
262
|
});
|
|
222
263
|
}
|
|
@@ -1039,6 +1080,8 @@ function isPrivateUrl(url) {
|
|
|
1039
1080
|
}
|
|
1040
1081
|
var MAX_FETCH_REDIRECTS = 5;
|
|
1041
1082
|
async function safeFetch(url, init) {
|
|
1083
|
+
const local = fetchLocalPageUrl(url, init);
|
|
1084
|
+
if (local) return local;
|
|
1042
1085
|
let current = url;
|
|
1043
1086
|
for (let hop = 0; hop <= MAX_FETCH_REDIRECTS; hop++) {
|
|
1044
1087
|
if (isPrivateUrl(current)) return null;
|
|
@@ -1115,6 +1158,7 @@ function deriveAssetName(parsedUrl, catalog, isPoster, idx, usedNames) {
|
|
|
1115
1158
|
}
|
|
1116
1159
|
|
|
1117
1160
|
export {
|
|
1161
|
+
assertPublicHostname,
|
|
1118
1162
|
resolvePublicAddress,
|
|
1119
1163
|
CAPTURE_USER_AGENT,
|
|
1120
1164
|
noDrops,
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
runCancellableProcess,
|
|
9
9
|
runRenderSetupWorker
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q43YUROE.js";
|
|
11
11
|
import {
|
|
12
12
|
getFreeDiskMb
|
|
13
13
|
} from "./chunk-QSFWGZG6.js";
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
browserPathFromEnv,
|
|
16
16
|
managedChromeVersion,
|
|
17
17
|
pickSharedShell
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ERUQ3S6D.js";
|
|
19
19
|
import {
|
|
20
20
|
normalizeErrorMessage
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EU7MVORF.js";
|
|
22
22
|
|
|
23
23
|
// src/browser/manager.ts
|
|
24
24
|
import { execSync, spawnSync } from "child_process";
|
|
@@ -469,11 +469,36 @@ Install Chromium manually and point hyperframes to it:
|
|
|
469
469
|
Then re-run your command. The HYPERFRAMES_BROWSER_PATH env var persists for the session.`
|
|
470
470
|
);
|
|
471
471
|
}
|
|
472
|
+
var BROWSER_WAIT_NOTICE_MS = 15e3;
|
|
473
|
+
async function withBrowserWaitNotice(task, notify = console.warn, everyMs = BROWSER_WAIT_NOTICE_MS) {
|
|
474
|
+
const timer = setInterval(
|
|
475
|
+
() => notify(
|
|
476
|
+
"[hyperframes] Still getting Chrome ready; the first use downloads it. Set HYPERFRAMES_BROWSER_PATH to use an installed Chrome instead."
|
|
477
|
+
),
|
|
478
|
+
everyMs
|
|
479
|
+
);
|
|
480
|
+
timer.unref();
|
|
481
|
+
try {
|
|
482
|
+
return await task;
|
|
483
|
+
} finally {
|
|
484
|
+
clearInterval(timer);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
472
487
|
async function ensureBrowser(options) {
|
|
473
|
-
|
|
474
|
-
|
|
488
|
+
const resolved = {
|
|
489
|
+
...options,
|
|
490
|
+
downloadAttempts: options?.downloadAttempts ?? (process.stdout.isTTY ? DOWNLOAD_ATTEMPTS : 1)
|
|
491
|
+
};
|
|
492
|
+
const task = resolved.signal ? ensureBrowserInOwnedProcess(resolved) : ensureBrowserInCurrentProcess(resolved);
|
|
493
|
+
return resolved.onProgress ? task : withBrowserWaitNotice(task);
|
|
475
494
|
}
|
|
476
495
|
async function ensureBrowserInCurrentProcess(options) {
|
|
496
|
+
const configured = browserPathFromEnv();
|
|
497
|
+
if (configured && !existsSync(configured.path)) {
|
|
498
|
+
throw new Error(
|
|
499
|
+
`${configured.name} is set to ${configured.path}, which does not exist. Fix the path or unset it.`
|
|
500
|
+
);
|
|
501
|
+
}
|
|
477
502
|
const fromEnv = findFromEnv();
|
|
478
503
|
if (fromEnv) return fromEnv;
|
|
479
504
|
if (!options?.force) {
|
|
@@ -510,7 +535,8 @@ async function ensureBrowserInOwnedProcess(options) {
|
|
|
510
535
|
"browser",
|
|
511
536
|
{
|
|
512
537
|
force: options.force,
|
|
513
|
-
preferManagedChrome: options.preferManagedChrome
|
|
538
|
+
preferManagedChrome: options.preferManagedChrome,
|
|
539
|
+
downloadAttempts: options.downloadAttempts
|
|
514
540
|
},
|
|
515
541
|
{
|
|
516
542
|
signal,
|
|
@@ -555,18 +581,18 @@ Point hyperframes at an already-installed Chrome/Chromium instead:
|
|
|
555
581
|
|
|
556
582
|
export HYPERFRAMES_BROWSER_PATH="${example}"
|
|
557
583
|
|
|
558
|
-
Then re-run your command. Any Chrome build works for the screenshot capture path; install a real chrome-headless-shell later if you need the perf-optimized BeginFrame path. Alternatively, run inside the hyperframes Docker image which ships a compatible headless-shell.`;
|
|
584
|
+
Run \`hyperframes doctor\` to see which Chrome was found. Then re-run your command. Any Chrome build works for the screenshot capture path; install a real chrome-headless-shell later if you need the perf-optimized BeginFrame path. Alternatively, run inside the hyperframes Docker image which ships a compatible headless-shell.`;
|
|
559
585
|
return new Error(message, { cause: cause instanceof Error ? cause : void 0 });
|
|
560
586
|
}
|
|
561
587
|
var DOWNLOAD_STALL_MS = 6e4;
|
|
562
588
|
var DOWNLOAD_ATTEMPTS = 3;
|
|
563
|
-
async function retryOnStall(run, clear) {
|
|
589
|
+
async function retryOnStall(run, clear, attempts = DOWNLOAD_ATTEMPTS) {
|
|
564
590
|
for (let attempt = 1; ; attempt++) {
|
|
565
591
|
try {
|
|
566
592
|
return await run();
|
|
567
593
|
} catch (err) {
|
|
568
|
-
if (!(err instanceof BrowserDownloadStalledError) || attempt >=
|
|
569
|
-
console.warn(`[hyperframes] ${err.message} Retrying (${attempt}/${
|
|
594
|
+
if (!(err instanceof BrowserDownloadStalledError) || attempt >= attempts) throw err;
|
|
595
|
+
console.warn(`[hyperframes] ${err.message} Retrying (${attempt}/${attempts - 1}).`);
|
|
570
596
|
clear();
|
|
571
597
|
}
|
|
572
598
|
}
|
|
@@ -642,7 +668,8 @@ async function downloadBrowser(options) {
|
|
|
642
668
|
`[hyperframes] Downloaded browser archive was corrupt (${normalizeErrorMessage(err)}); re-downloading.`
|
|
643
669
|
)
|
|
644
670
|
),
|
|
645
|
-
clearStaging
|
|
671
|
+
clearStaging,
|
|
672
|
+
options?.downloadAttempts
|
|
646
673
|
);
|
|
647
674
|
assertExecutableUnpacked(stagingDir, staged.executablePath);
|
|
648
675
|
unzipLog.lines = [];
|
|
@@ -733,9 +760,11 @@ export {
|
|
|
733
760
|
_resetSystemFallbackWarnForTests,
|
|
734
761
|
findSystemBrowser,
|
|
735
762
|
findBrowser,
|
|
763
|
+
withBrowserWaitNotice,
|
|
736
764
|
ensureBrowser,
|
|
737
765
|
isCorruptArchiveError,
|
|
738
766
|
installWithCorruptArchiveRecovery,
|
|
767
|
+
retryOnStall,
|
|
739
768
|
sweepKilledInstalls,
|
|
740
769
|
clearBrowser,
|
|
741
770
|
isLinuxArm
|
|
@@ -6,12 +6,12 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
setHostHandlesSigint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MPO25DQW.js";
|
|
10
10
|
import {
|
|
11
11
|
processAncestorSnapshot,
|
|
12
12
|
processIdentity,
|
|
13
13
|
processParentPid
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D2CE2J2A.js";
|
|
15
15
|
import {
|
|
16
16
|
processIsAlive
|
|
17
17
|
} from "./chunk-KGPLIH7B.js";
|
|
@@ -7,6 +7,11 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
ensureDOMParser
|
|
9
9
|
} from "./chunk-ZBAF6L74.js";
|
|
10
|
+
import {
|
|
11
|
+
JsonFlagReadError,
|
|
12
|
+
inlineJsonHint,
|
|
13
|
+
readJsonFlagText
|
|
14
|
+
} from "./chunk-XFMO3BEN.js";
|
|
10
15
|
import {
|
|
11
16
|
errorBox
|
|
12
17
|
} from "./chunk-K2FLNJVB.js";
|
|
@@ -19,36 +24,26 @@ import {
|
|
|
19
24
|
import {
|
|
20
25
|
formatVariableValidationIssue,
|
|
21
26
|
validateVariables
|
|
22
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-QWBVPWUI.js";
|
|
23
28
|
import {
|
|
24
29
|
extractCompositionMetadata
|
|
25
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NHA4NRBE.js";
|
|
26
31
|
|
|
27
32
|
// src/utils/variables.ts
|
|
28
33
|
import { readFileSync } from "fs";
|
|
29
|
-
|
|
30
|
-
function parseVariablesArg(inline, filePath, readFile = (p) => readFileSync(resolve(p), "utf8")) {
|
|
34
|
+
function parseVariablesArg(inline, filePath, readFile, readStdin) {
|
|
31
35
|
if (inline != null && filePath != null) {
|
|
32
36
|
return { ok: false, error: { kind: "conflict" } };
|
|
33
37
|
}
|
|
38
|
+
const value = inline ?? filePath;
|
|
39
|
+
const source = inline != null ? "inline" : "file";
|
|
34
40
|
let raw;
|
|
35
|
-
|
|
36
|
-
if (inline != null) {
|
|
37
|
-
raw = inline;
|
|
38
|
-
source = "inline";
|
|
39
|
-
} else if (filePath != null) {
|
|
41
|
+
if (value != null) {
|
|
40
42
|
try {
|
|
41
|
-
raw = readFile
|
|
42
|
-
source = "file";
|
|
43
|
+
raw = readJsonFlagText(value, { readFile, readStdin });
|
|
43
44
|
} catch (error) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
error: {
|
|
47
|
-
kind: "read-error",
|
|
48
|
-
path: filePath,
|
|
49
|
-
cause: error instanceof Error ? error.message : String(error)
|
|
50
|
-
}
|
|
51
|
-
};
|
|
45
|
+
if (!(error instanceof JsonFlagReadError)) throw error;
|
|
46
|
+
return { ok: false, error: { kind: "read-error", path: error.path, cause: error.cause } };
|
|
52
47
|
}
|
|
53
48
|
}
|
|
54
49
|
if (raw == null) return { ok: true, value: void 0 };
|
|
@@ -60,7 +55,7 @@ function parseVariablesArg(inline, filePath, readFile = (p) => readFileSync(reso
|
|
|
60
55
|
ok: false,
|
|
61
56
|
error: {
|
|
62
57
|
kind: "parse-error",
|
|
63
|
-
source
|
|
58
|
+
source,
|
|
64
59
|
cause: error instanceof Error ? error.message : String(error)
|
|
65
60
|
}
|
|
66
61
|
};
|
|
@@ -79,13 +74,13 @@ function variablesErrorMessage(error) {
|
|
|
79
74
|
};
|
|
80
75
|
case "read-error":
|
|
81
76
|
return {
|
|
82
|
-
title: "Could not read
|
|
77
|
+
title: "Could not read the variables JSON",
|
|
83
78
|
message: `${error.path}: ${error.cause}`
|
|
84
79
|
};
|
|
85
80
|
case "parse-error":
|
|
86
81
|
return {
|
|
87
82
|
title: error.source === "file" ? "Invalid JSON in --variables-file" : "Invalid JSON in --variables",
|
|
88
|
-
message: error.cause
|
|
83
|
+
message: error.source === "inline" ? `${error.cause} (${inlineJsonHint("--variables")})` : error.cause
|
|
89
84
|
};
|
|
90
85
|
case "shape-error":
|
|
91
86
|
return {
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
VALID_CANVAS_RESOLUTIONS,
|
|
9
9
|
resolveResolutionFlagPair
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NHA4NRBE.js";
|
|
11
11
|
|
|
12
12
|
// src/utils/parseOutputResolution.ts
|
|
13
13
|
function parseOutputResolutionFlag(raw, options) {
|