hyperframes 0.8.207 → 0.8.209
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-LXFWHBE3.js → add-VZKUIZEH.js} +17 -15
- package/dist/{agentPromptGenerator-D2E62ZP5.js → agentPromptGenerator-4NJ252MR.js} +6 -2
- package/dist/{animatedGifPrep-VBPJZKFT.js → animatedGifPrep-PN4G4YPJ.js} +10 -7
- package/dist/api.js +24 -20
- package/dist/{appHistory-HIBH6XZW.js → appHistory-OHYU5ZBQ.js} +3 -2
- package/dist/{asset-JX4RW3GO.js → asset-I4PHGE57.js} +2 -2
- package/dist/{assetCataloger-JKKOPBCF.js → assetCataloger-LRAUXQ46.js} +12 -8
- package/dist/{audio-OXQ3L6DW.js → audio-T7SAVYED.js} +424 -133
- package/dist/{auth-JAL7P7ZA.js → auth-GP6HTQT3.js} +4 -4
- package/dist/{autoUpdate-MRI2AICE.js → autoUpdate-Z6GFPZAG.js} +4 -4
- package/dist/{backgroundChecks-ORR46PBY.js → backgroundChecks-ZJ7JV52S.js} +5 -5
- package/dist/backgroundChecksWorker.js +5 -5
- package/dist/{batchRender-IFZYPGIW.js → batchRender-J3ETE23Y.js} +5 -4
- package/dist/{beats-UDLOEW6U.js → beats-WF4FJCM5.js} +25 -15
- package/dist/{benchmark-VTVDNKSO.js → benchmark-B7UPP4PQ.js} +10 -10
- package/dist/{browser-QJC4BL2Y.js → browser-SIUYD43U.js} +8 -8
- package/dist/{bundleWithLocalizedFonts-Z2JTBNDS.js → bundleWithLocalizedFonts-RRGFY3XV.js} +3 -3
- package/dist/{capture-2P4JERSX.js → capture-J3GLHUKI.js} +52 -17
- package/dist/{capture-GLM2ACPM.js → capture-VYS4PCCJ.js} +66 -39
- package/dist/{captureCompositionFrame-A2A5MGQB.js → captureCompositionFrame-SVLMPQYC.js} +16 -14
- package/dist/{captureFile-RPUEOZO6.js → captureFile-VIVGKFY4.js} +2 -1
- package/dist/{catalog-5ZLVUQVJ.js → catalog-DVBNR422.js} +17 -15
- package/dist/{catch-up-FRMVYJHZ.js → catch-up-OBPMV7KG.js} +9 -8
- package/dist/{check-WVY7SM7C.js → check-MEALXNZK.js} +47 -44
- package/dist/{checkAudio-PLEQY3SZ.js → checkAudio-RZ7WQYVN.js} +23 -13
- package/dist/{checkBrowser-XSZUA2DQ.js → checkBrowser-2LEQ2LSX.js} +39 -36
- package/dist/{chunk-526VSRZ4.js → chunk-3A4SB326.js} +6 -6
- package/dist/{chunk-GXUONASF.js → chunk-3PTZ2TD4.js} +25 -2
- package/dist/{chunk-JQ32262N.js → chunk-3PUXUIWB.js} +1 -1
- package/dist/chunk-3RATCY3W.js +205 -0
- package/dist/{chunk-MAUGXKSI.js → chunk-4BXEPVSA.js} +113 -20
- package/dist/{chunk-C6KE4AFW.js → chunk-56ANHX5U.js} +1 -1
- package/dist/{chunk-VBPNCOD7.js → chunk-5T4DP25D.js} +5 -3
- package/dist/{chunk-IBZHSU2J.js → chunk-66PNSZ7K.js} +1 -1
- package/dist/{chunk-WL263XM2.js → chunk-6PWQH77E.js} +1 -1
- package/dist/chunk-7VZEOCUY.js +98 -0
- package/dist/{chunk-VAVDAOUA.js → chunk-A7GDBL6D.js} +1 -1
- package/dist/{chunk-UAT2UMTP.js → chunk-AQTODJWP.js} +1 -1
- package/dist/{chunk-5KBMYSF2.js → chunk-BYPDKF36.js} +7 -2
- package/dist/{chunk-EG3B2VWK.js → chunk-CA3PXWN4.js} +16 -21
- package/dist/{chunk-FEO7YW7V.js → chunk-CBM4ZUVN.js} +6 -6
- package/dist/{chunk-6KCFVLO6.js → chunk-CIDCNE2D.js} +21 -5
- package/dist/{chunk-C53ZNJDZ.js → chunk-D2CE2J2A.js} +1 -1
- package/dist/chunk-D3MUHMFG.js +16 -0
- package/dist/{chunk-5PYRU5DT.js → chunk-D6T5BNSK.js} +18 -17
- package/dist/{chunk-PUIG6DHT.js → chunk-DR47DSOY.js} +7 -7
- package/dist/chunk-DROFHVQD.js +240 -0
- package/dist/{chunk-YJK6HOL5.js → chunk-DVIX7UPH.js} +2 -2
- package/dist/{chunk-QTWXVOZI.js → chunk-EA5FUMJN.js} +2 -2
- package/dist/{chunk-NWGXTUYS.js → chunk-EQBDKYXR.js} +3 -30
- package/dist/{chunk-4UMPIPCQ.js → chunk-ERUQ3S6D.js} +2 -2
- package/dist/{chunk-T2EUWCJE.js → chunk-EU7MVORF.js} +13 -1
- package/dist/{chunk-IW5P4KK7.js → chunk-EVYDKSML.js} +3 -3
- package/dist/{chunk-FVAI7AHF.js → chunk-F4O4G4ZW.js} +5 -5
- package/dist/{chunk-6KOHY5EP.js → chunk-FB5BXGGF.js} +17 -11
- package/dist/{chunk-HTIUNMTP.js → chunk-GDZA4ALG.js} +8 -2
- package/dist/{chunk-DJQZ7DEH.js → chunk-GQZHLF5P.js} +15 -15
- package/dist/{chunk-ZYGIDXAK.js → chunk-H7B526GH.js} +114 -65
- package/dist/{chunk-P2I4RLJE.js → chunk-HTZJNQYI.js} +1 -1
- package/dist/{chunk-I2TDHVFV.js → chunk-I3ICHLHV.js} +2 -2
- package/dist/{chunk-CVZO6TFE.js → chunk-IJPFVMIE.js} +11 -11
- package/dist/{chunk-LK6KPVX2.js → chunk-IQNS7O4W.js} +403 -290
- package/dist/{chunk-XDMZY3H7.js → chunk-J7A73K2B.js} +43 -35
- package/dist/{chunk-RPZNQV6D.js → chunk-JC6BAQOG.js} +4 -10
- package/dist/{chunk-HA3V4XAF.js → chunk-JJRMN2RV.js} +63 -200
- package/dist/{chunk-XMRA7CQG.js → chunk-KCLBO65Y.js} +1 -1
- package/dist/{chunk-QE4WRS3N.js → chunk-KGBFHYHX.js} +4 -4
- package/dist/{chunk-HM7SUIQD.js → chunk-KTWGVEN6.js} +3 -3
- package/dist/{chunk-7PJ3AJB2.js → chunk-L5XVBFUM.js} +1 -1
- package/dist/{chunk-NSC5A4IR.js → chunk-L7MGVFR4.js} +7 -2
- package/dist/{chunk-I3TYUQLB.js → chunk-LJ7H2A2C.js} +1 -1
- package/dist/{chunk-VH4PNYOS.js → chunk-LV4NWCJS.js} +2 -2
- package/dist/{chunk-ELP5QZWL.js → chunk-M4QZFUMW.js} +1 -1
- package/dist/{chunk-7RWUY3BJ.js → chunk-MI4V4HPE.js} +1 -1
- package/dist/{chunk-SXOD5J7T.js → chunk-MKALOCDV.js} +1 -1
- package/dist/{chunk-UKM3JYNB.js → chunk-MVNTJGDX.js} +3 -3
- package/dist/{chunk-PSX5SF2N.js → chunk-NEASABW6.js} +1 -1
- package/dist/{chunk-H3LQ5X6Q.js → chunk-NJZRXELC.js} +68 -34
- package/dist/{chunk-EOVYQ3IG.js → chunk-NQ2INEHX.js} +17 -17
- package/dist/{chunk-LCCYYTEK.js → chunk-NXNDHV26.js} +1 -1
- package/dist/{chunk-JKE24AG7.js → chunk-OK3QLJSF.js} +1 -1
- package/dist/{chunk-63DP5CB2.js → chunk-OML6HQQN.js} +4 -4
- package/dist/{chunk-UUOIH4RW.js → chunk-P2FSCR5B.js} +2 -2
- package/dist/{chunk-ZCJ5EGLU.js → chunk-P327BIJR.js} +66 -1
- package/dist/{chunk-HVOTYAS4.js → chunk-P3OKYRGA.js} +3 -3
- package/dist/{chunk-U32PA6DI.js → chunk-PYVYF64E.js} +1 -1
- package/dist/{chunk-EHFZEKQM.js → chunk-Q43YUROE.js} +1 -1
- package/dist/{chunk-CZUAX3BV.js → chunk-QIDN4ML5.js} +1 -1
- package/dist/{chunk-NHL5CMO2.js → chunk-QIKZ2HZJ.js} +3 -3
- package/dist/{chunk-IK4JY2LI.js → chunk-R52YM6ZK.js} +2 -2
- package/dist/{chunk-DML6BD4K.js → chunk-RAONLDN5.js} +2 -2
- package/dist/{chunk-MSHL6CF2.js → chunk-RJO4X3AA.js} +1 -1
- package/dist/{chunk-6IYIS2U7.js → chunk-RVG2JNDU.js} +2 -2
- package/dist/{chunk-UYPWH7PH.js → chunk-SE6S4SGZ.js} +13 -15
- package/dist/{chunk-NJNC2DQV.js → chunk-SNLXWCET.js} +105 -46
- package/dist/{chunk-TSTONNOD.js → chunk-SOXQXX2M.js} +2 -2
- package/dist/{chunk-EGRIVMCQ.js → chunk-SPMKVI6H.js} +2 -2
- package/dist/{chunk-PL36HK3U.js → chunk-SWHCYFEF.js} +27 -5
- package/dist/{chunk-ID766OZB.js → chunk-TF7YE7J5.js} +3 -3
- package/dist/{chunk-XAGBSYIQ.js → chunk-TSM67ADU.js} +1 -1
- package/dist/{chunk-KDHHPJOG.js → chunk-U5IZUWBW.js} +4 -4
- package/dist/{chunk-T4JGFCXU.js → chunk-V4VXWOIF.js} +4 -4
- package/dist/{chunk-6N65ZMC5.js → chunk-VYRJAQGC.js} +1 -1
- package/dist/{chunk-LXP6XWJL.js → chunk-W32DVMX3.js} +2 -2
- package/dist/{chunk-LPI7HX4G.js → chunk-WLVHSGVL.js} +2 -2
- package/dist/chunk-XCIHCPJK.js +106 -0
- package/dist/chunk-XFMO3BEN.js +71 -0
- package/dist/{chunk-XKW4Z7BU.js → chunk-Y2EVJBR6.js} +1 -1
- package/dist/{chunk-QZ2JQ6O4.js → chunk-YCGLT5B4.js} +3 -3
- package/dist/{chunk-5PCALX6G.js → chunk-YIFEK3UD.js} +1 -1
- package/dist/{chunk-ZF3R2IPC.js → chunk-YRO3PXWU.js} +2 -85
- package/dist/chunk-Z5J67X44.js +40 -0
- package/dist/{chunk-XULJBZ7K.js → chunk-Z67J3TTU.js} +5 -3
- package/dist/{chunk-7JAD4MEW.js → chunk-ZA5TNF4R.js} +1 -0
- package/dist/{chunk-6Z7XDUUJ.js → chunk-ZMIRSWN6.js} +1 -1
- package/dist/{chunk-IYZT62UR.js → chunk-ZPILPVYU.js} +2 -2
- package/dist/chunk-ZXTSUXSL.js +4870 -0
- package/dist/{clean-TL3IPJDN.js → clean-VWCYLOVI.js} +26 -22
- package/dist/cli.js +58 -58
- package/dist/{cloud-EYMRPJNY.js → cloud-HU3RXCVE.js} +4 -4
- package/dist/{cloudrun-TOJ36NLX.js → cloudrun-OST6QBYD.js} +6 -5
- package/dist/commands/layout-audit.browser.js +1 -0
- package/dist/{compare-MP5EOW4D.js → compare-U2MJWZAH.js} +38 -35
- package/dist/{compiler-NOPVLJ2S.js → compiler-DSP4MVEC.js} +5 -3
- package/dist/{component-ASACDCZK.js → component-EC5XU6KR.js} +3 -3
- package/dist/{compositions-WKNZJY34.js → compositions-AKYCTF4G.js} +16 -13
- package/dist/{contactSheet-YOBPATEM.js → contactSheet-RYAE7Y5D.js} +3 -2
- package/dist/{delete-DQTFHP3G.js → delete-Z5MOEZM2.js} +10 -9
- package/dist/{deploy-HHCFOUFM.js → deploy-Y4LFVYXT.js} +6 -6
- package/dist/{dist-L4Z4ZEYW.js → dist-73YTUT3W.js} +1 -1
- package/dist/{dist-NQEYA4ZX.js → dist-JJL4QUDL.js} +2 -2
- package/dist/docker/Dockerfile.render +1 -1
- package/dist/{doctor-JDM65CP7.js → doctor-7234U557.js} +18 -15
- package/dist/{events-RKRHRLJD.js → events-RUIZNTG3.js} +4 -4
- package/dist/{events-MBRNA3UF.js → events-SII53QYO.js} +5 -5
- package/dist/{feedback-LZWIWV5J.js → feedback-6CCDDQ36.js} +12 -12
- package/dist/{ffmpeg-4PZKSIGE.js → ffmpeg-C4VWK4M2.js} +12 -9
- package/dist/{figma-QFNYUT3F.js → figma-GAN63U5U.js} +3 -3
- package/dist/fontLocalizeCli.js +13 -10
- package/dist/{get-2B5ENJOH.js → get-RZGUHZB4.js} +10 -9
- package/dist/{gpuPolicy-E5FB2GFR.js → gpuPolicy-BGJRCLP4.js} +10 -7
- package/dist/{grade-compare-4GUAPJHE.js → grade-compare-XOBN52WV.js} +38 -35
- package/dist/{heifImagePrep-C2RYIEER.js → heifImagePrep-DCHSYGW7.js} +11 -8
- package/dist/{help-XGDAXV67.js → help-O2IV6PUC.js} +1 -1
- package/dist/{history-WNFF6HGU.js → history-GPTEM4UX.js} +11 -10
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +67 -67
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-BR2LKGJD.js → info-7Y3JPN7C.js} +9 -9
- package/dist/{init-P6UWPUY3.js → init-L6W5WG5K.js} +40 -34
- package/dist/{inspect-MSRPF7ZO.js → inspect-MQZANGQY.js} +37 -34
- package/dist/{installer-MPUQS3ZX.js → installer-DCIMLYB6.js} +4 -4
- package/dist/{keyframes-J6K66QTO.js → keyframes-WNJIKL4G.js} +8 -8
- package/dist/{lambda-LJ2OSWFJ.js → lambda-FEA4SSFK.js} +16 -13
- package/dist/{layout-CDY65XGA.js → layout-AUQAYDJU.js} +37 -34
- package/dist/{lint-CAUNBGPX.js → lint-A33IHYID.js} +9 -9
- package/dist/{lintProject-ZTSX3AWT.js → lintProject-KCN7MRBN.js} +1 -1
- package/dist/{list-33BYQNRZ.js → list-56JHCET6.js} +10 -9
- package/dist/localPage-V3HBGM3Z.js +27 -0
- package/dist/{login-5QMRKOHK.js → login-HUOM4GNP.js} +7 -7
- package/dist/{logout-JYFWWUGK.js → logout-3IID4KXD.js} +3 -3
- package/dist/{manager-3JOHHPVR.js → manager-SDRJOMPR.js} +13 -10
- package/dist/{manager-RMYSZ3KI.js → manager-Z7W4GQGF.js} +4 -4
- package/dist/{media-treatment-4WP22CFN.js → media-treatment-5TGZOD67.js} +27 -22
- package/dist/{models-HPWCHAZX.js → models-ABDX6TXI.js} +17 -14
- package/dist/{motionShot-I7GDIROQ.js → motionShot-AV2WRH2C.js} +20 -18
- package/dist/{normalize-audio-VTMXPSC7.js → normalize-audio-M7T25DST.js} +12 -9
- package/dist/{open-SAO7OQTT.js → open-IRNZY5XN.js} +17 -16
- package/dist/{parakeetRunner-ZYPBIA73.js → parakeetRunner-2EJUIMOJ.js} +21 -17
- package/dist/{pipeline-VNBMR6QU.js → pipeline-QGKOJKXS.js} +13 -10
- package/dist/{play-7VI6A7KN.js → play-2SQLHM5B.js} +26 -23
- package/dist/{policies-GHVXA5PE.js → policies-PKLD4UW5.js} +1 -1
- package/dist/{preflight-VWV7L45J.js → preflight-ZHXMG2SM.js} +14 -11
- package/dist/{present-CSJGYOFF.js → present-RERVL6R7.js} +21 -18
- package/dist/{preview-B246ZTVO.js → preview-S6RQOMHE.js} +28 -25
- package/dist/{producer-WJLFDVQJ.js → producer-DBRGH2FI.js} +1 -1
- package/dist/{projectConfig-OMR46ZWQ.js → projectConfig-TUMDULTL.js} +9 -8
- package/dist/{publication-AA7NNYET.js → publication-7VGXIFVZ.js} +2 -2
- package/dist/{publish-TJ4QVVSP.js → publish-KJB2AGHL.js} +18 -15
- package/dist/{refresh-USSFPJAU.js → refresh-3IRHJEQA.js} +3 -3
- package/dist/{remove-background-LQ2V7W7N.js → remove-background-EFWXPLS4.js} +14 -11
- package/dist/{render-AWEEPG3F.js → render-5O5ARP6C.js} +65 -62
- package/dist/{render-JLTNZ36U.js → render-7S6UBLOE.js} +50 -48
- package/dist/{render-E5QJG74D.js → render-HV6AA22W.js} +6 -5
- package/dist/{render-batch-U4T4VSCM.js → render-batch-7UEOULJJ.js} +7 -6
- package/dist/renderSetupWorker.js +6 -6
- package/dist/{resolver-GXCTUKPV.js → resolver-HFTEER5V.js} +4 -4
- package/dist/{screenshotCapture-X6OKIXCB.js → screenshotCapture-HOW4VSV6.js} +3 -2
- package/dist/{sherpa-4VZWVHWZ.js → sherpa-HSSM76FL.js} +20 -16
- 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/media-use/references/grading.md +2 -0
- package/dist/skills/media-use/references/local.md +1 -0
- package/dist/{skills-WUKR7SUE.js → skills-RQO5K6WL.js} +7 -7
- package/dist/{skillsUpdateCheck-YXRBY3JC.js → skillsUpdateCheck-S5WL2YLZ.js} +5 -5
- package/dist/{snapshot-Q7S2FTNG.js → snapshot-4RGI235E.js} +119 -66
- package/dist/{src-ZOXUSGAP.js → src-ALOV4D57.js} +26 -10
- package/dist/{src-CLAALR5W.js → src-D75YYW2M.js} +12 -9
- package/dist/{staticProjectServer-DQ7PIDPA.js → staticProjectServer-DIHWPJ6B.js} +21 -18
- package/dist/{status-LR7VXITS.js → status-DTP6ZYDU.js} +3 -3
- package/dist/studio/assets/{hyperframes-player-Cm5aBiKq.js → hyperframes-player-CMH8OeX2.js} +3 -3
- package/dist/studio/assets/{index-BF9YeBnC.js → index-DQam8zzE.js} +71 -71
- package/dist/studio/assets/{index-BrqAmMRt.js → index-DjHzuJGR.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-NUE227JM.js → studio-api-A2VSWTVF.js} +13 -10
- package/dist/{studioServer-HVOKP4VI.js → studioServer-PECYWZHS.js} +60 -57
- package/dist/{synthesize-QZHRXGRY.js → synthesize-RVE7IUOJ.js} +3 -2
- package/dist/{telemetry-IHU4HL3R.js → telemetry-6BPSGY5W.js} +2 -2
- package/dist/{telemetry-2Y5JXLDB.js → telemetry-YDGXGOLH.js} +5 -5
- package/dist/{timeline-WOQGXFRV.js → timeline-5WUEEKZ3.js} +27 -23
- package/dist/{tokens-T3OHTWUC.js → tokens-XVFZPIUZ.js} +2 -2
- package/dist/{transcribe-JZ3BO546.js → transcribe-QWDUIJWK.js} +26 -22
- package/dist/{transcribe-4U74P5TG.js → transcribe-TTJ6CDQT.js} +17 -13
- package/dist/{tts-AY4JO5NQ.js → tts-AGMCPQXE.js} +1 -1
- package/dist/{updateCheck-6EUAGAM4.js → updateCheck-P7STSJ6Q.js} +4 -4
- package/dist/{upgrade-55K6F4MP.js → upgrade-NEIZ3KVL.js} +4 -4
- package/dist/{urlDownloader-47JMOLNN.js → urlDownloader-ZZFNGZNG.js} +9 -6
- package/dist/{validate-QBJ3SBS4.js → validate-T2SLBOXG.js} +30 -27
- package/dist/{video-3ZAUNAR3.js → video-7OHSBSRT.js} +12 -8
- package/dist/warmCheck.js +47 -44
- package/package.json +1 -1
- package/dist/chunk-BDJIQZN2.js +0 -4830
- package/dist/chunk-DKPNNYBZ.js +0 -44
- package/dist/{destroy-SSPAKADI.js → destroy-CGAZIL2C.js} +4 -4
|
@@ -0,0 +1,240 @@
|
|
|
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
|
+
writeCaptureFileSync
|
|
9
|
+
} from "./chunk-EQBDKYXR.js";
|
|
10
|
+
|
|
11
|
+
// src/capture/localPage.ts
|
|
12
|
+
import {
|
|
13
|
+
createReadStream,
|
|
14
|
+
readdirSync,
|
|
15
|
+
readFileSync,
|
|
16
|
+
realpathSync,
|
|
17
|
+
statSync
|
|
18
|
+
} from "fs";
|
|
19
|
+
import { realpath, stat } from "fs/promises";
|
|
20
|
+
import { createServer } from "http";
|
|
21
|
+
import { basename, dirname, extname, isAbsolute, join, relative, resolve, sep } from "path";
|
|
22
|
+
import { Readable } from "stream";
|
|
23
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
24
|
+
var CONTENT_TYPES = {
|
|
25
|
+
".html": "text/html; charset=utf-8",
|
|
26
|
+
".htm": "text/html; charset=utf-8",
|
|
27
|
+
".css": "text/css; charset=utf-8",
|
|
28
|
+
".js": "text/javascript; charset=utf-8",
|
|
29
|
+
".mjs": "text/javascript; charset=utf-8",
|
|
30
|
+
".json": "application/json",
|
|
31
|
+
".svg": "image/svg+xml",
|
|
32
|
+
".png": "image/png",
|
|
33
|
+
".jpg": "image/jpeg",
|
|
34
|
+
".jpeg": "image/jpeg",
|
|
35
|
+
".gif": "image/gif",
|
|
36
|
+
".webp": "image/webp",
|
|
37
|
+
".avif": "image/avif",
|
|
38
|
+
".ico": "image/x-icon",
|
|
39
|
+
".woff": "font/woff",
|
|
40
|
+
".woff2": "font/woff2",
|
|
41
|
+
".ttf": "font/ttf",
|
|
42
|
+
".otf": "font/otf",
|
|
43
|
+
".mp4": "video/mp4",
|
|
44
|
+
".webm": "video/webm",
|
|
45
|
+
".mov": "video/quicktime",
|
|
46
|
+
".mp3": "audio/mpeg",
|
|
47
|
+
".wav": "audio/wav",
|
|
48
|
+
".txt": "text/plain; charset=utf-8"
|
|
49
|
+
};
|
|
50
|
+
var activeSites = /* @__PURE__ */ new Map();
|
|
51
|
+
function localSiteName(entry) {
|
|
52
|
+
const stem = basename(entry, extname(entry));
|
|
53
|
+
const name = stem.toLowerCase() === "index" ? basename(dirname(entry)) : stem;
|
|
54
|
+
return name.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "local";
|
|
55
|
+
}
|
|
56
|
+
function captureSiteName(url) {
|
|
57
|
+
const parsed = new URL(url);
|
|
58
|
+
return activeSites.get(parsed.origin)?.name ?? parsed.hostname.replace(/^www\./, "");
|
|
59
|
+
}
|
|
60
|
+
function isInside(root, path) {
|
|
61
|
+
const rel = relative(root, path);
|
|
62
|
+
return rel === "" || !!rel && !rel.startsWith(`..${sep}`) && rel !== ".." && !isAbsolute(rel);
|
|
63
|
+
}
|
|
64
|
+
function resolveLocalCaptureTarget(target, root) {
|
|
65
|
+
const path = resolve(target.startsWith("file:") ? fileURLToPath(target) : target);
|
|
66
|
+
let entry;
|
|
67
|
+
let directory;
|
|
68
|
+
try {
|
|
69
|
+
entry = realpathSync.native(path);
|
|
70
|
+
directory = realpathSync.native(dirname(path));
|
|
71
|
+
if (statSync(entry).isDirectory()) {
|
|
72
|
+
directory = entry;
|
|
73
|
+
entry = realpathSync.native(join(entry, "index.html"));
|
|
74
|
+
}
|
|
75
|
+
} catch {
|
|
76
|
+
throw new Error(`Local file not found: ${target}`);
|
|
77
|
+
}
|
|
78
|
+
if (!statSync(entry).isFile()) throw new Error(`Local capture target is not a file: ${target}`);
|
|
79
|
+
let rootPath;
|
|
80
|
+
try {
|
|
81
|
+
rootPath = root === void 0 ? directory : realpathSync.native(resolve(root));
|
|
82
|
+
} catch {
|
|
83
|
+
throw new Error(`Local capture root not found: ${root}`);
|
|
84
|
+
}
|
|
85
|
+
if (!statSync(rootPath).isDirectory()) {
|
|
86
|
+
throw new Error(`Local capture root is not a directory: ${root}`);
|
|
87
|
+
}
|
|
88
|
+
if (!isInside(rootPath, entry)) {
|
|
89
|
+
throw new Error(`Local capture target ${entry} is outside the root ${rootPath}`);
|
|
90
|
+
}
|
|
91
|
+
return { root: rootPath, entry, fileUrl: pathToFileURL(entry).href };
|
|
92
|
+
}
|
|
93
|
+
async function servedFile(root, pathname) {
|
|
94
|
+
let decoded;
|
|
95
|
+
try {
|
|
96
|
+
decoded = decodeURIComponent(pathname);
|
|
97
|
+
} catch {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
if (decoded.includes("\0")) return null;
|
|
101
|
+
const candidate = resolve(root, `.${decoded}`);
|
|
102
|
+
if (!isInside(root, candidate)) return null;
|
|
103
|
+
try {
|
|
104
|
+
const real = await realpath(candidate);
|
|
105
|
+
if (!isInside(root, real) || !(await stat(real)).isFile()) return null;
|
|
106
|
+
return real;
|
|
107
|
+
} catch {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function contentType(file) {
|
|
112
|
+
return CONTENT_TYPES[extname(file).toLowerCase()] ?? "application/octet-stream";
|
|
113
|
+
}
|
|
114
|
+
function end(response, status) {
|
|
115
|
+
response.writeHead(status, { "Content-Length": 0, Connection: "close" });
|
|
116
|
+
response.end();
|
|
117
|
+
}
|
|
118
|
+
async function startLocalPageServer(target) {
|
|
119
|
+
const sockets = /* @__PURE__ */ new Set();
|
|
120
|
+
const server = createServer((request, response) => {
|
|
121
|
+
void (async () => {
|
|
122
|
+
if (request.method !== "GET" && request.method !== "HEAD") return end(response, 405);
|
|
123
|
+
const pathname = new URL(request.url ?? "/", "http://local").pathname;
|
|
124
|
+
const file = await servedFile(target.root, pathname);
|
|
125
|
+
if (!file) return end(response, 404);
|
|
126
|
+
response.writeHead(200, { "Content-Type": contentType(file), "Cache-Control": "no-store" });
|
|
127
|
+
if (request.method === "HEAD") return response.end();
|
|
128
|
+
const stream = createReadStream(file);
|
|
129
|
+
stream.on("error", () => response.destroy());
|
|
130
|
+
stream.pipe(response);
|
|
131
|
+
})().catch(() => response.destroy());
|
|
132
|
+
});
|
|
133
|
+
server.on("connection", (socket) => {
|
|
134
|
+
sockets.add(socket);
|
|
135
|
+
socket.once("close", () => sockets.delete(socket));
|
|
136
|
+
});
|
|
137
|
+
await new Promise((resolveListen, reject) => {
|
|
138
|
+
server.once("error", reject);
|
|
139
|
+
server.listen(0, "127.0.0.1", resolveListen);
|
|
140
|
+
});
|
|
141
|
+
const address = server.address();
|
|
142
|
+
if (!address || typeof address === "string") throw new Error("Local page server did not bind");
|
|
143
|
+
const origin = `http://127.0.0.1:${address.port}`;
|
|
144
|
+
const entryPath = relative(target.root, target.entry).split(sep).map(encodeURIComponent);
|
|
145
|
+
activeSites.set(origin, { root: target.root, name: localSiteName(target.entry) });
|
|
146
|
+
let closing;
|
|
147
|
+
return {
|
|
148
|
+
origin,
|
|
149
|
+
url: `${origin}/${entryPath.join("/")}`,
|
|
150
|
+
close() {
|
|
151
|
+
closing ??= new Promise((resolveClose) => {
|
|
152
|
+
activeSites.delete(origin);
|
|
153
|
+
server.close(() => resolveClose());
|
|
154
|
+
for (const socket of sockets) socket.destroy();
|
|
155
|
+
});
|
|
156
|
+
return closing;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
async function localResponse(root, pathname, method) {
|
|
161
|
+
if (method !== "GET" && method !== "HEAD") return new Response(null, { status: 405 });
|
|
162
|
+
const file = await servedFile(root, pathname);
|
|
163
|
+
if (!file) return new Response(null, { status: 404 });
|
|
164
|
+
const body = method === "HEAD" ? null : Readable.toWeb(createReadStream(file));
|
|
165
|
+
return new Response(body, { status: 200, headers: { "Content-Type": contentType(file) } });
|
|
166
|
+
}
|
|
167
|
+
function fetchLocalPageUrl(url, init) {
|
|
168
|
+
let parsed;
|
|
169
|
+
try {
|
|
170
|
+
parsed = new URL(url);
|
|
171
|
+
} catch {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
const site = activeSites.get(parsed.origin);
|
|
175
|
+
if (site === void 0) return null;
|
|
176
|
+
return localResponse(site.root, parsed.pathname, (init?.method ?? "GET").toUpperCase());
|
|
177
|
+
}
|
|
178
|
+
var TEXT_OUTPUTS = /* @__PURE__ */ new Set([".json", ".md", ".html", ".htm", ".css", ".txt", ".svg", ".js", ""]);
|
|
179
|
+
function localUrlRewriter(origin, root) {
|
|
180
|
+
const escapedOrigin = origin.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
181
|
+
const pattern = new RegExp(`${escapedOrigin}(?![0-9])(/[^\\s"'<>()\\\\]*)?`, "g");
|
|
182
|
+
return (text) => text.replace(pattern, (_match, path) => {
|
|
183
|
+
const url = new URL(path ?? "/", origin);
|
|
184
|
+
let decoded;
|
|
185
|
+
try {
|
|
186
|
+
decoded = decodeURIComponent(url.pathname);
|
|
187
|
+
} catch {
|
|
188
|
+
decoded = url.pathname;
|
|
189
|
+
}
|
|
190
|
+
return pathToFileURL(join(root, decoded)).href + url.search + url.hash;
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
function rewriteStrings(value, rewrite) {
|
|
194
|
+
if (typeof value === "string") return rewrite(value);
|
|
195
|
+
if (Array.isArray(value)) return value.map((item) => rewriteStrings(item, rewrite));
|
|
196
|
+
if (value && typeof value === "object") {
|
|
197
|
+
return Object.fromEntries(
|
|
198
|
+
Object.entries(value).map(([key, item]) => [key, rewriteStrings(item, rewrite)])
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
return value;
|
|
202
|
+
}
|
|
203
|
+
function rewriteLocalCaptureOutput(outputDir, rewrite, sourceUrl) {
|
|
204
|
+
const walk = (dir) => {
|
|
205
|
+
let entries;
|
|
206
|
+
try {
|
|
207
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
208
|
+
} catch {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
for (const entry of entries) {
|
|
212
|
+
const path = join(dir, entry.name);
|
|
213
|
+
if (entry.isDirectory()) walk(path);
|
|
214
|
+
else if (entry.isFile() && TEXT_OUTPUTS.has(extname(entry.name).toLowerCase())) {
|
|
215
|
+
const text = readFileSync(path, "utf8");
|
|
216
|
+
const next = rewrite(text);
|
|
217
|
+
if (next !== text) writeCaptureFileSync(path, next, "utf-8");
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
walk(outputDir);
|
|
222
|
+
const metaPath = join(outputDir, "meta.json");
|
|
223
|
+
try {
|
|
224
|
+
const meta = JSON.parse(readFileSync(metaPath, "utf8"));
|
|
225
|
+
if (meta && typeof meta === "object" && !Array.isArray(meta)) {
|
|
226
|
+
writeCaptureFileSync(metaPath, JSON.stringify({ ...meta, source: sourceUrl }, null, 2));
|
|
227
|
+
}
|
|
228
|
+
} catch {
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export {
|
|
233
|
+
captureSiteName,
|
|
234
|
+
resolveLocalCaptureTarget,
|
|
235
|
+
startLocalPageServer,
|
|
236
|
+
fetchLocalPageUrl,
|
|
237
|
+
localUrlRewriter,
|
|
238
|
+
rewriteStrings,
|
|
239
|
+
rewriteLocalCaptureOutput
|
|
240
|
+
};
|
|
@@ -6,14 +6,14 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
loadProducer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PYVYF64E.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProjectRelativeSrc
|
|
12
12
|
} from "./chunk-PBNWRWKA.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/projectMedia.ts
|
|
15
15
|
async function collectProjectMedia(projectDir) {
|
|
16
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
16
|
+
const { bundleToSingleHtml } = await import("./compiler-DSP4MVEC.js");
|
|
17
17
|
const html = await bundleToSingleHtml(projectDir);
|
|
18
18
|
const producer = await loadProducer();
|
|
19
19
|
if (!producer.collectRenderMedia) throw new Error("Render media collector unavailable");
|
|
@@ -34,10 +34,10 @@ import {
|
|
|
34
34
|
readConfig,
|
|
35
35
|
telemetryRuntimeOverride,
|
|
36
36
|
writeConfig
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-NEASABW6.js";
|
|
38
38
|
import {
|
|
39
39
|
VERSION
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-RAONLDN5.js";
|
|
41
41
|
|
|
42
42
|
// src/telemetry/transport.ts
|
|
43
43
|
import { spawn } from "child_process";
|
|
@@ -4,6 +4,9 @@ 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
|
+
removeTreeBestEffort
|
|
9
|
+
} from "./chunk-Z5J67X44.js";
|
|
7
10
|
|
|
8
11
|
// src/capture/captureFile.ts
|
|
9
12
|
import { mkdirSync, mkdtempSync, realpathSync, renameSync, statSync, writeFileSync } from "fs";
|
|
@@ -27,35 +30,6 @@ var CaptureDirRefusedError = class extends Error {
|
|
|
27
30
|
}
|
|
28
31
|
};
|
|
29
32
|
|
|
30
|
-
// ../core/dist/removeTree.js
|
|
31
|
-
import { rmSync } from "fs";
|
|
32
|
-
import { rm } from "fs/promises";
|
|
33
|
-
var RETRY = { recursive: true, force: true, maxRetries: 10, retryDelay: 100 };
|
|
34
|
-
function refusal(path, error) {
|
|
35
|
-
const reason = error instanceof Error ? error.message : String(error);
|
|
36
|
-
return `[cleanup] could not remove ${path}: ${reason}`;
|
|
37
|
-
}
|
|
38
|
-
function removeTreeWithRetry(path, remove = rmSync) {
|
|
39
|
-
remove(path, RETRY);
|
|
40
|
-
}
|
|
41
|
-
async function removeTreeWithRetryAsync(path, remove = rm) {
|
|
42
|
-
await remove(path, RETRY);
|
|
43
|
-
}
|
|
44
|
-
function removeTreeBestEffort(path, options = {}) {
|
|
45
|
-
try {
|
|
46
|
-
removeTreeWithRetry(path, options.remove);
|
|
47
|
-
} catch (error) {
|
|
48
|
-
(options.warn ?? console.warn)(refusal(path, error));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
async function removeTreeBestEffortAsync(path, options = {}) {
|
|
52
|
-
try {
|
|
53
|
-
await removeTreeWithRetryAsync(path, options.remove);
|
|
54
|
-
} catch (error) {
|
|
55
|
-
(options.warn ?? console.warn)(refusal(path, error));
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
33
|
// src/capture/captureFile.ts
|
|
60
34
|
function publishCaptureFileSync(path, data, options) {
|
|
61
35
|
const stagingDir = mkdtempSync(join(dirname(path), ".capture-"));
|
|
@@ -120,7 +94,6 @@ function ensureCaptureDirSync(root, dir) {
|
|
|
120
94
|
export {
|
|
121
95
|
NavigationDeadlineError,
|
|
122
96
|
CaptureDirRefusedError,
|
|
123
|
-
removeTreeBestEffortAsync,
|
|
124
97
|
writeCaptureFileSync,
|
|
125
98
|
ensureCaptureDirSync
|
|
126
99
|
};
|
|
@@ -47,11 +47,11 @@ function compareBrowserVersionsDescending(left, right) {
|
|
|
47
47
|
}
|
|
48
48
|
var starts = /* @__PURE__ */ new Map();
|
|
49
49
|
var debug = debuglog("hyperframes:browser");
|
|
50
|
-
function shellStarts(binary) {
|
|
50
|
+
function shellStarts(binary, timeoutMs = 1e4) {
|
|
51
51
|
let answer = starts.get(binary);
|
|
52
52
|
if (answer === void 0) {
|
|
53
53
|
const probe = ["--no-sandbox", "--dump-dom", "about:blank"];
|
|
54
|
-
answer = spawnSync(binary, probe, { stdio: "ignore", timeout:
|
|
54
|
+
answer = spawnSync(binary, probe, { stdio: "ignore", timeout: timeoutMs, killSignal: "SIGKILL" })?.status === 0;
|
|
55
55
|
if (!answer) debug("skipping %s: it did not start", binary);
|
|
56
56
|
starts.set(binary, answer);
|
|
57
57
|
}
|
|
@@ -23,7 +23,19 @@ function normalizeErrorMessage(error) {
|
|
|
23
23
|
}
|
|
24
24
|
return String(error ?? "unknown error");
|
|
25
25
|
}
|
|
26
|
+
var PROTOCOL_TIMEOUT_ADVICE = / Increase the 'protocolTimeout' setting in launch\/connect calls[^.]*\./;
|
|
27
|
+
async function atStep(step, run) {
|
|
28
|
+
try {
|
|
29
|
+
return await run();
|
|
30
|
+
} catch (error) {
|
|
31
|
+
if (error instanceof Error && !error.message.includes(` (while ${step})`)) {
|
|
32
|
+
error.message = error.message.replace(PROTOCOL_TIMEOUT_ADVICE, "") + ` (while ${step})`;
|
|
33
|
+
}
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
26
37
|
|
|
27
38
|
export {
|
|
28
|
-
normalizeErrorMessage
|
|
39
|
+
normalizeErrorMessage,
|
|
40
|
+
atStep
|
|
29
41
|
};
|
|
@@ -7,14 +7,14 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
trackLintReport,
|
|
9
9
|
trackLintRuleStreak
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-L7MGVFR4.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldTrack
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EA5FUMJN.js";
|
|
14
14
|
import {
|
|
15
15
|
LINT_RULE_COUNT,
|
|
16
16
|
LINT_RULE_GROUP_COUNTS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-P327BIJR.js";
|
|
18
18
|
|
|
19
19
|
// src/telemetry/lintStreaks.ts
|
|
20
20
|
import { createHash } from "crypto";
|
|
@@ -14,28 +14,28 @@ import {
|
|
|
14
14
|
} from "./chunk-VQB7G5BM.js";
|
|
15
15
|
import {
|
|
16
16
|
readCompositionFps
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L5XVBFUM.js";
|
|
18
18
|
import {
|
|
19
19
|
HF_AUDIO_GROUP_ATTR,
|
|
20
20
|
extractAudioMetadata,
|
|
21
21
|
extractMediaMetadata
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-IQNS7O4W.js";
|
|
23
23
|
import {
|
|
24
24
|
byStart,
|
|
25
25
|
fpsToNumber,
|
|
26
26
|
parseFpsWithDefault
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-MI4V4HPE.js";
|
|
28
28
|
import {
|
|
29
29
|
HF_AUDIO_AUTOMATION_ATTR,
|
|
30
30
|
HF_AUDIO_FX_ATTR,
|
|
31
31
|
parseAudioFxChain,
|
|
32
32
|
parseAutomation,
|
|
33
33
|
resolveAutomation
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-ZXTSUXSL.js";
|
|
35
35
|
import {
|
|
36
36
|
resolveReferencedDuration,
|
|
37
37
|
resolveReferencedStart
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-P327BIJR.js";
|
|
39
39
|
import {
|
|
40
40
|
resolveAuthoredAssetFile
|
|
41
41
|
} from "./chunk-PBNWRWKA.js";
|
|
@@ -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-ZMIRSWN6.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-W32DVMX3.js";
|
|
18
21
|
import {
|
|
19
22
|
resolveItemWithDependencies,
|
|
20
23
|
resolveItemsByTag
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-A7GDBL6D.js";
|
|
22
25
|
import {
|
|
23
26
|
InvalidVariableValuesError,
|
|
24
27
|
prepareItem,
|
|
25
28
|
publishItem
|
|
26
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-P2FSCR5B.js";
|
|
27
30
|
import {
|
|
28
31
|
DEFAULT_REGISTRY_URL
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-Y2EVJBR6.js";
|
|
30
33
|
import {
|
|
31
34
|
trackRegistryItemAdded
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-L7MGVFR4.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-MI4V4HPE.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",
|
|
@@ -35,8 +35,14 @@ function longFlagName(tok) {
|
|
|
35
35
|
const name = tok.slice(2).split("=")[0] ?? "";
|
|
36
36
|
return name.startsWith("no-") ? name.slice(3) : name;
|
|
37
37
|
}
|
|
38
|
+
function isNegativeNumber(tok) {
|
|
39
|
+
return /^-(\d+\.?\d*|\.\d+)$/.test(tok);
|
|
40
|
+
}
|
|
41
|
+
function canNameFlag(tok) {
|
|
42
|
+
return tok.startsWith("-") && tok !== "-" && !isNegativeNumber(tok);
|
|
43
|
+
}
|
|
38
44
|
function unknownFlagIn(tok, known) {
|
|
39
|
-
if (
|
|
45
|
+
if (!canNameFlag(tok)) return null;
|
|
40
46
|
if (tok.startsWith("--")) {
|
|
41
47
|
const name = longFlagName(tok);
|
|
42
48
|
return name && !known.has(name) ? `--${name}` : null;
|
|
@@ -94,7 +100,7 @@ function throwSwallowedFlagError(flagName, next) {
|
|
|
94
100
|
throw new CliUsageError(message, { presented: true });
|
|
95
101
|
}
|
|
96
102
|
function looksLikeSwallowedFlag(next, known) {
|
|
97
|
-
if (next === void 0 || next === "-") return false;
|
|
103
|
+
if (next === void 0 || next === "-" || isNegativeNumber(next)) return false;
|
|
98
104
|
return next === "--" || next.startsWith("-") && unknownFlagIn(next, known) === null;
|
|
99
105
|
}
|
|
100
106
|
function swallowingArgName(tok, next, owners, known) {
|
|
@@ -6,23 +6,23 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveProject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TSM67ADU.js";
|
|
10
10
|
import {
|
|
11
11
|
installPageFunctionGuard,
|
|
12
12
|
resolveCliChromeGpuMode,
|
|
13
13
|
seekCompositionTimeline,
|
|
14
14
|
waitForRuntimeReady
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SE6S4SGZ.js";
|
|
16
16
|
import {
|
|
17
17
|
launchManagedBrowser,
|
|
18
18
|
resolveManagedGpuMode
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4BXEPVSA.js";
|
|
20
20
|
import {
|
|
21
21
|
pageNavigationTimeoutMs
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MVNTJGDX.js";
|
|
23
23
|
import {
|
|
24
24
|
resolveCompositionViewportFromHtml
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-66PNSZ7K.js";
|
|
26
26
|
import {
|
|
27
27
|
defineCommand
|
|
28
28
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -35,17 +35,17 @@ import {
|
|
|
35
35
|
} from "./chunk-ZTZA4UWZ.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveNaturalMediaTimelineDuration
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-ZXTSUXSL.js";
|
|
39
39
|
import {
|
|
40
40
|
decodeWellFormedEscapes
|
|
41
41
|
} from "./chunk-SE2MXV2N.js";
|
|
42
42
|
import {
|
|
43
43
|
printDeprecationNotice,
|
|
44
44
|
withMeta
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-SPMKVI6H.js";
|
|
46
46
|
import {
|
|
47
47
|
normalizeErrorMessage
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-EU7MVORF.js";
|
|
49
49
|
|
|
50
50
|
// src/commands/validate.ts
|
|
51
51
|
import { existsSync, mkdtempSync, readFileSync, rmSync } from "fs";
|
|
@@ -248,7 +248,7 @@ function extractCompositionErrorsFromLint(lintResult) {
|
|
|
248
248
|
async function localizeRemoteAssets(html) {
|
|
249
249
|
let dir;
|
|
250
250
|
try {
|
|
251
|
-
const { loadProducer } = await import("./producer-
|
|
251
|
+
const { loadProducer } = await import("./producer-DBRGH2FI.js");
|
|
252
252
|
const { localizeRemoteMediaSources, localizeRemoteImageSources, localizeRemoteFontFaces } = await loadProducer();
|
|
253
253
|
dir = mkdtempSync(join(tmpdir(), "hf-validate-assets-"));
|
|
254
254
|
const assetDir = dir;
|
|
@@ -269,10 +269,10 @@ async function localizeRemoteAssets(html) {
|
|
|
269
269
|
}
|
|
270
270
|
async function validateInBrowser(project, opts) {
|
|
271
271
|
const projectDir = project.dir;
|
|
272
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
273
|
-
const { ensureBrowser } = await import("./manager-
|
|
274
|
-
const { serveStaticProjectHtml } = await import("./staticProjectServer-
|
|
275
|
-
const { lintProject } = await import("./lintProject-
|
|
272
|
+
const { bundleToSingleHtml } = await import("./compiler-DSP4MVEC.js");
|
|
273
|
+
const { ensureBrowser } = await import("./manager-Z7W4GQGF.js");
|
|
274
|
+
const { serveStaticProjectHtml } = await import("./staticProjectServer-DIHWPJ6B.js");
|
|
275
|
+
const { lintProject } = await import("./lintProject-KCN7MRBN.js");
|
|
276
276
|
const lintResult = await lintProject(projectDir);
|
|
277
277
|
const compositionErrors = extractCompositionErrorsFromLint(lintResult);
|
|
278
278
|
const html = await bundleToSingleHtml(projectDir);
|
|
@@ -293,9 +293,9 @@ async function validateInBrowser(project, opts) {
|
|
|
293
293
|
try {
|
|
294
294
|
const browser = await ensureBrowser();
|
|
295
295
|
const puppeteer = await import("puppeteer-core");
|
|
296
|
-
const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-
|
|
296
|
+
const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-ALOV4D57.js");
|
|
297
297
|
const requestedGpuMode = resolveCliChromeGpuMode();
|
|
298
|
-
const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-
|
|
298
|
+
const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-BGJRCLP4.js");
|
|
299
299
|
const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, browser.executablePath);
|
|
300
300
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
301
301
|
const { gpuConfig, softwareWebGpu } = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
|