hyperframes 0.8.180 → 0.8.183
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 +3 -1
- package/dist/{add-HUVEWSVU.js → add-HW3ZGR36.js} +22 -22
- package/dist/{animatedGifPrep-V6GJQOEB.js → animatedGifPrep-EPLN37ZN.js} +13 -13
- package/dist/api.js +28 -28
- package/dist/{asset-ZGQHDMIO.js → asset-TOASKL3Z.js} +3 -3
- package/dist/{assetCataloger-MZWCOV6C.js → assetCataloger-PZN5HYG2.js} +15 -13
- package/dist/{audio-XDWHLNIW.js → audio-F5OIQVJO.js} +29 -29
- package/dist/{auth-VIV3M7S6.js → auth-YVQLRS3T.js} +4 -4
- package/dist/{autoUpdate-R32XDL42.js → autoUpdate-EG4ZFW4D.js} +2 -2
- package/dist/{backgroundChecks-A2N6EVCP.js → backgroundChecks-WINNQVR2.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-3AYDQRBI.js → batchRender-PASZTMEE.js} +7 -7
- package/dist/{beats-2O423Z6Q.js → beats-KGIOEBLW.js} +12 -12
- package/dist/{benchmark-YXP3PTZP.js → benchmark-ZNY2L7HN.js} +24 -24
- package/dist/{browser-M47BNOTJ.js → browser-REAO7RU4.js} +20 -20
- package/dist/{bundleWithLocalizedFonts-GCIHOMIU.js → bundleWithLocalizedFonts-OAYLYC4W.js} +2 -2
- package/dist/{capture-IV3Y2MT4.js → capture-IK6GWQDD.js} +8 -5
- package/dist/{capture-BT2ZXN5P.js → capture-WOSF276U.js} +49 -41
- package/dist/{captureCompositionFrame-BMZEKPOU.js → captureCompositionFrame-DDZNKYRE.js} +21 -20
- package/dist/{captureTimeout-K2JNVVCI.js → captureTimeout-RIMG6IYH.js} +1 -1
- package/dist/{catalog-GI6P22KI.js → catalog-AKTXS7OJ.js} +42 -42
- package/dist/{catch-up-QS6HUHAO.js → catch-up-O3VZMPVE.js} +15 -15
- package/dist/check-6E46NIWI.js +116 -0
- package/dist/checkBrowser-UNZHQFNH.js +117 -0
- package/dist/{chunk-ST2ARHQ5.js → chunk-3BA2GP4H.js} +5 -5
- package/dist/{chunk-7Z6AARJR.js → chunk-3OLIGYWN.js} +3 -3
- package/dist/{chunk-OR5WCFWZ.js → chunk-3Q47QC46.js} +2 -2
- package/dist/{chunk-Q2ASTBSG.js → chunk-4FQKS7BJ.js} +16 -14
- package/dist/{chunk-G2ZMCNRN.js → chunk-4UFJWRHG.js} +527 -283
- package/dist/{chunk-537IYAEE.js → chunk-4UMPIPCQ.js} +9 -1
- package/dist/{chunk-65CLIHK2.js → chunk-5MBLWFLM.js} +1 -1
- package/dist/{chunk-UVEQLDKB.js → chunk-5OGDBU4G.js} +3 -2
- package/dist/{chunk-L3YOGIPG.js → chunk-66LREXGS.js} +1 -1
- package/dist/{chunk-W4SLIGGM.js → chunk-73LTCCZI.js} +249 -161
- package/dist/{chunk-GZVP4TWN.js → chunk-7JAD4MEW.js} +1 -1
- package/dist/{chunk-NAMGMP3R.js → chunk-7KVVNF7B.js} +1 -1
- package/dist/{chunk-GK2FIKIQ.js → chunk-ADDHW2FS.js} +214 -37
- package/dist/{chunk-WUQUR33W.js → chunk-AKFADCMS.js} +1 -1
- package/dist/{chunk-2VJNKE7C.js → chunk-ANR6WOC3.js} +1 -1
- package/dist/{chunk-L527FLMV.js → chunk-ATMDOUNN.js} +2 -2
- package/dist/{chunk-ZJPCQBU7.js → chunk-B2SZZFWW.js} +4 -4
- package/dist/{chunk-TO6JNTML.js → chunk-BP4VNTZL.js} +13 -8
- package/dist/{chunk-3YXTFXT7.js → chunk-CAHTO62O.js} +8 -8
- package/dist/{chunk-MPWLGNM2.js → chunk-CGK4XZ2J.js} +1 -1
- package/dist/{chunk-NOXGG4C7.js → chunk-CJYAJ3QM.js} +37 -33
- package/dist/{chunk-F5VMPELS.js → chunk-COTLNID2.js} +16 -16
- package/dist/{chunk-E24HSMZV.js → chunk-CYBXXSC4.js} +65 -14
- package/dist/{chunk-NZZYJOMJ.js → chunk-CZUAX3BV.js} +6 -5
- package/dist/{chunk-K7RGIADJ.js → chunk-DEORFAWP.js} +12 -12
- package/dist/{chunk-GV5R5B7Q.js → chunk-DGECWPTL.js} +1 -1
- package/dist/{chunk-BRHI7EIA.js → chunk-DKPNNYBZ.js} +4 -0
- package/dist/{chunk-R46P7TGY.js → chunk-DLC2FICN.js} +7 -7
- package/dist/{chunk-D3ZWBHZP.js → chunk-DYAPHNV6.js} +3 -2
- package/dist/{chunk-RGHQID2E.js → chunk-EHSBBBR2.js} +5 -3
- package/dist/{chunk-IWTRHPTP.js → chunk-EVAQPW6O.js} +8 -8
- package/dist/{chunk-S3RYRF3W.js → chunk-F6WHPHLF.js} +1 -1
- package/dist/chunk-FG4BBFZI.js +122 -0
- package/dist/{chunk-V6MQP32U.js → chunk-GAGMLVCV.js} +2 -2
- package/dist/chunk-GMNHAOMJ.js +3805 -0
- package/dist/{chunk-KIO3R4QN.js → chunk-GPE3WWTO.js} +16 -6
- package/dist/{chunk-ULWZYLCV.js → chunk-GTE5WZAM.js} +72 -140
- package/dist/{chunk-2JDLESMS.js → chunk-HLBODNGW.js} +1 -1
- package/dist/{chunk-KMAAOHLO.js → chunk-HRPWRZGF.js} +1 -1
- package/dist/{chunk-UPFUC4DB.js → chunk-HTIUNMTP.js} +1 -1
- package/dist/{chunk-FCUTQM2P.js → chunk-IC2WYONA.js} +5 -5
- package/dist/{chunk-VE3OKVSD.js → chunk-ITSLKUQM.js} +2 -2
- package/dist/{chunk-YJDB4FLT.js → chunk-JQYJXUJW.js} +1 -1
- package/dist/{chunk-PBN6GBJE.js → chunk-JVBRJMOP.js} +14 -1
- package/dist/{chunk-XH262OWN.js → chunk-K2Z5DZBS.js} +1 -1
- package/dist/{chunk-RHWJKSGH.js → chunk-KANNRHY7.js} +1 -1
- package/dist/{chunk-Y5APFFMD.js → chunk-KRFAX5JK.js} +1 -1
- package/dist/{chunk-4J7DHVN2.js → chunk-LBWRQ4XA.js} +1 -1
- package/dist/{chunk-MQOE5RE4.js → chunk-MIZDJVPZ.js} +9 -9
- package/dist/{chunk-32GKETR7.js → chunk-MMQ52NIZ.js} +74 -0
- package/dist/chunk-MOEGCMKI.js +180 -0
- package/dist/{chunk-E6RPWJVC.js → chunk-NAUKCKCJ.js} +5 -1
- package/dist/{chunk-JBCU6NR5.js → chunk-NZ3BE2QE.js} +56 -55
- package/dist/{chunk-VKMP3IVR.js → chunk-O7N3A7PE.js} +2 -2
- package/dist/{chunk-3QENZQSL.js → chunk-OH56PXFH.js} +5 -5
- package/dist/{chunk-H4YZZ2VQ.js → chunk-PFD25NAC.js} +1 -1
- package/dist/{check-HE5E4Q7Q.js → chunk-Q6UYKWBG.js} +198 -142
- package/dist/{chunk-3DKN5WKL.js → chunk-QH3T4WI2.js} +77 -6
- package/dist/{chunk-RGXAN3YU.js → chunk-QX4GGPMY.js} +2 -2
- package/dist/{chunk-A3NFBMYX.js → chunk-R6OV4J4K.js} +6 -6
- package/dist/{chunk-LL5VQ4WS.js → chunk-RZXUQR42.js} +2 -2
- package/dist/{chunk-SEMOZNVE.js → chunk-SAQYJLI6.js} +1 -1
- package/dist/{chunk-55P7GDT6.js → chunk-TJB4GAV6.js} +2 -2
- package/dist/{checkBrowser-BHLYP3YW.js → chunk-TOHA5NAU.js} +187 -114
- package/dist/{chunk-RXQHSGAQ.js → chunk-TXGZZKDF.js} +2 -2
- package/dist/{chunk-KZ3VI5K6.js → chunk-U5YVWG5W.js} +3 -3
- package/dist/{chunk-ICMXC3MI.js → chunk-U6RXZNZE.js} +31 -18
- package/dist/{chunk-XO6CWU7D.js → chunk-UNOSCGBG.js} +2 -2
- package/dist/{chunk-NXYBR4QX.js → chunk-VAK7A2N6.js} +16 -16
- package/dist/{chunk-OFY6JTZC.js → chunk-VDJO4DJ7.js} +2 -2
- package/dist/{chunk-LBQFLUIY.js → chunk-VFBAKPRC.js} +9 -49
- package/dist/{chunk-K3KANDZQ.js → chunk-VH5KESLX.js} +1 -1
- package/dist/{chunk-22QHO26F.js → chunk-W64L7IFS.js} +1 -1
- package/dist/{chunk-4IEH6EAC.js → chunk-WT4PYV2J.js} +4 -6
- package/dist/{chunk-XFCLWWL3.js → chunk-X3IA5RYH.js} +2 -2
- package/dist/{chunk-UZOZ2W2E.js → chunk-XAQDR5Y5.js} +2 -2
- package/dist/{chunk-BI52RNRW.js → chunk-XJHKJXT4.js} +103 -20
- package/dist/{chunk-HFZ4UILX.js → chunk-XOVHO3TT.js} +25 -14
- package/dist/{chunk-VARUKXOZ.js → chunk-XR5BSEUF.js} +7 -15
- package/dist/{chunk-IZM562YJ.js → chunk-Z4R35NJS.js} +4 -4
- package/dist/{chunk-AMX53HVX.js → chunk-ZFO3A3QL.js} +2 -2
- package/dist/{clean-TQOW24OF.js → clean-WNEIVBF3.js} +40 -40
- package/dist/cli.js +68 -64
- package/dist/{cloud-7TOVPUMY.js → cloud-6GSSDCJL.js} +4 -4
- package/dist/{cloudrun-2BKGY53X.js → cloudrun-4NEJRE4T.js} +8 -8
- package/dist/commands/layout-audit.browser.js +15 -4
- package/dist/commands/motion-signature.browser.js +52 -0
- package/dist/{compare-WDV3Q6WC.js → compare-2JWQ5ABA.js} +50 -47
- package/dist/{compiler-U3W6CJW7.js → compiler-27KQD7KW.js} +6 -6
- package/dist/{component-U66GBIUO.js → component-HCRET3MH.js} +4 -4
- package/dist/{compositions-Y63YGLCE.js → compositions-HTSQ6SUJ.js} +28 -29
- package/dist/{contactSheet-27SRU7A4.js → contactSheet-CAGMKI3E.js} +3 -1
- package/dist/{delete-TBAIAD7M.js → delete-GHQ5UYM7.js} +9 -9
- package/dist/{deploy-BIWOSWS3.js → deploy-I3Z3NAVA.js} +11 -11
- package/dist/{destroy-QBLMYDBF.js → destroy-4B5HW5FH.js} +5 -5
- package/dist/{deterministicFonts-L7YEEFGI.js → deterministicFonts-JFLSSKRB.js} +2 -2
- package/dist/{dist-2FMTAVGL.js → dist-SENYPQGW.js} +4 -4
- package/dist/{dist-VO7OXOFK.js → dist-WRDLWRMS.js} +5 -5
- package/dist/{docs-MPOM3PHH.js → docs-UEWLIP6D.js} +1 -1
- package/dist/{doctor-GC4REGB6.js → doctor-UGFVQZHI.js} +27 -27
- package/dist/{events-PUUP24FT.js → events-BLJGWMNP.js} +9 -9
- package/dist/{events-4NMQVUZR.js → events-YS4OVX3I.js} +6 -6
- package/dist/{feedback-BIDXK7TE.js → feedback-AZ3SJ5HF.js} +35 -35
- package/dist/{ffmpeg-2VJDEWQQ.js → ffmpeg-2AECXG7V.js} +15 -15
- package/dist/{figma-THMXYLMU.js → figma-DRYIJQHV.js} +3 -3
- package/dist/fontLocalizeCli.js +23 -23
- package/dist/{get-5T4B7ERH.js → get-DDEAOFPB.js} +9 -9
- package/dist/{gpuPolicy-GLUATV5I.js → gpuPolicy-UDJT2MQK.js} +13 -13
- package/dist/{grade-compare-2A65YEHZ.js → grade-compare-LJKK5NSY.js} +55 -50
- package/dist/{help-JFBDXFRC.js → help-TQBGYOID.js} +1 -1
- package/dist/{history-OJEWFWMS.js → history-5TOOCF2Y.js} +15 -15
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +17 -17
- package/dist/hyperframes-player.global.js +8 -3
- package/dist/{info-KJZBU3SZ.js → info-ENI5MP4W.js} +20 -20
- package/dist/{init-6V4ELU4Z.js → init-JXPXWV3G.js} +68 -68
- package/dist/{inspect-WGBZZUZU.js → inspect-WZNYQ5AB.js} +45 -44
- package/dist/{installer-EPRSH6QI.js → installer-3SGRBLJW.js} +7 -7
- package/dist/{keyframes-57LYKC2M.js → keyframes-HEOC4CT4.js} +16 -16
- package/dist/{lambda-5P5X2X5E.js → lambda-2VHQ4AL2.js} +15 -15
- package/dist/{layout-PM2VAUT2.js → layout-7WEUNO6T.js} +45 -44
- package/dist/{lint-DXS6QRYZ.js → lint-5YMAF3L7.js} +23 -23
- package/dist/{lintProject-ARKJXDQF.js → lintProject-C2ONSH2U.js} +4 -4
- package/dist/{list-6IBSX7FU.js → list-BIE3X7CO.js} +10 -10
- package/dist/{login-RY3PWK44.js → login-YDIGJWCG.js} +7 -7
- package/dist/{logout-DKJANASY.js → logout-DDC4QLVK.js} +3 -3
- package/dist/{manager-N3COY6BJ.js → manager-D2UV6RDQ.js} +16 -16
- package/dist/{manager-V2QCCPOJ.js → manager-UHWEKPXC.js} +8 -3
- package/dist/{media-treatment-3HEZR7ZS.js → media-treatment-FSKHPMWA.js} +33 -33
- package/dist/{media-use-4XXGABIL.js → media-use-JBN57JE3.js} +1 -1
- package/dist/{models-FEULJWSX.js → models-COEK6LXG.js} +24 -24
- package/dist/{motionShot-BZTEIZEO.js → motionShot-HYZ2ZGJQ.js} +28 -26
- package/dist/{normalize-audio-O4X4LPLK.js → normalize-audio-UXR6WQ7Q.js} +12 -12
- package/dist/{open-H3MX4TI2.js → open-OFT2GIDG.js} +24 -24
- package/dist/{parakeetRunner-5ABMPCI6.js → parakeetRunner-4NZ3QXS3.js} +25 -25
- package/dist/{pipeline-RJ4DOVWX.js → pipeline-ZKE54JMG.js} +18 -18
- package/dist/{play-3PBKEZIX.js → play-2VG77FT6.js} +39 -38
- package/dist/{policies-5NTZOHJA.js → policies-XXNGXWHV.js} +1 -1
- package/dist/{preflight-3RABQJT3.js → preflight-QTWDIM5C.js} +18 -18
- package/dist/{present-6SNRG3GI.js → present-OONXQLJG.js} +33 -33
- package/dist/{preview-LSDFCJ3H.js → preview-6RZJFU76.js} +49 -49
- package/dist/{producer-SUZDRXHJ.js → producer-6YM3UH3B.js} +1 -1
- package/dist/{progress-I37JB7R4.js → progress-NHJIHAAG.js} +2 -2
- package/dist/{projectConfig-5QCNTGQT.js → projectConfig-YMW4P2X6.js} +9 -9
- package/dist/{publication-2QT7VVE2.js → publication-SEINUAPZ.js} +5 -5
- package/dist/{publish-53EBL7OO.js → publish-KZBTBWFO.js} +27 -27
- package/dist/{refresh-MGCVWX56.js → refresh-RXTOPRBB.js} +3 -3
- package/dist/{remove-background-4G4MX5WK.js → remove-background-BIQNMIR7.js} +31 -31
- package/dist/{render-RXKUYTYI.js → render-65K3K6SD.js} +31 -31
- package/dist/{render-SKY6FKYB.js → render-FIH37HJA.js} +101 -96
- package/dist/{render-75CRB3BW.js → render-LW76HOMJ.js} +8 -8
- package/dist/{render-batch-CEVWUYBP.js → render-batch-POLEEYD4.js} +8 -8
- package/dist/renderSetupWorker.js +12 -9
- package/dist/{resolver-4ICE2AT6.js → resolver-O2SED3XB.js} +7 -7
- package/dist/{screenshotCapture-HXEZ3TNJ.js → screenshotCapture-UBY6TT75.js} +33 -6
- package/dist/{sherpa-TMX3WBTM.js → sherpa-HTFFFTVQ.js} +24 -24
- package/dist/{sites-3ZBYB5X4.js → sites-MAVH57MO.js} +2 -2
- package/dist/skills/hyperframes/references/review-loop.md +1 -1
- package/dist/{skills-MCWFAGIP.js → skills-J6MBGS5O.js} +17 -17
- package/dist/{skillsUpdateCheck-NXOI35BW.js → skillsUpdateCheck-ZAXNLBF3.js} +3 -3
- package/dist/{snapshot-ESZMKQ6J.js → snapshot-TL7TTFS6.js} +72 -71
- package/dist/{src-XRTZOBO5.js → src-EL6HGIS4.js} +35 -26
- package/dist/{src-GYYWBQXJ.js → src-Z5H5N5T4.js} +19 -19
- package/dist/{state-KAXGHF77.js → state-ORRPOLMQ.js} +2 -2
- package/dist/{staticProjectServer-GYPUQGI7.js → staticProjectServer-EO7X7RAY.js} +20 -20
- package/dist/{status-BV7QAUQD.js → status-CM7IQTU2.js} +6 -6
- package/dist/studio/assets/{hyperframes-player-1wdLVP-x.js → hyperframes-player-hz_VqxBZ.js} +7 -2
- package/dist/studio/assets/{index-CaWPPTQ1.js → index-CV_ojgp5.js} +1 -1
- package/dist/studio/assets/{index-mdtW0Ug-.js → index-S1ceEagc.js} +71 -71
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-IXGX5ZFI.js → studio-api-CUZDC5B3.js} +17 -17
- package/dist/{studioServer-XVGYU6O3.js → studioServer-EZPRV43Y.js} +90 -84
- package/dist/{telemetry-E355EUDZ.js → telemetry-LFUVHARP.js} +10 -10
- package/dist/{telemetry-CQYHCCPL.js → telemetry-QG5AANZ4.js} +1 -1
- package/dist/{timeline-VWH6WSD7.js → timeline-GSH743JE.js} +41 -41
- package/dist/{tokens-IOAVF4UI.js → tokens-3ZMPSH7B.js} +3 -3
- package/dist/{transcribe-EGUXJGD4.js → transcribe-4SHNDPWW.js} +47 -47
- package/dist/{transcribe-EJA7OOHH.js → transcribe-TV7JBZQS.js} +19 -19
- package/dist/{tts-EDK3QS7M.js → tts-A2WILYGN.js} +6 -6
- package/dist/{updateCheck-U2CVTKPF.js → updateCheck-W7FTFOQF.js} +2 -2
- package/dist/{upgrade-CWEKQ4JO.js → upgrade-7YYYNAPF.js} +3 -3
- package/dist/{urlDownloader-DY5BLAFA.js → urlDownloader-PQSUS2CP.js} +12 -12
- package/dist/{validate-XOMNMKD6.js → validate-GCHAEVXM.js} +39 -38
- package/dist/{video-22NN6OEH.js → video-KGN7NJS5.js} +16 -14
- package/dist/warmCheck.js +227 -0
- package/dist/warmCheckClient.js +139 -0
- package/package.json +4 -2
- package/dist/chunk-BAZ5LCR3.js +0 -3805
- package/dist/hyperframe-runtime.js +0 -1125
- package/dist/{chunk-B4VT6YU2.js → chunk-QGOYNPQT.js} +3 -3
- package/dist/{synthesize-I2C24XJ5.js → synthesize-PKTB5ATG.js} +1 -1
|
@@ -16,37 +16,37 @@ import {
|
|
|
16
16
|
} from "./chunk-5ETJX6WM.js";
|
|
17
17
|
import {
|
|
18
18
|
runEnvironmentChecks
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MIZDJVPZ.js";
|
|
20
20
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
getSystemMeta
|
|
25
|
-
} from "./chunk-T6AGUTZJ.js";
|
|
21
|
+
OPTIONAL_PACKAGES,
|
|
22
|
+
installedOptionalPackageVersion
|
|
23
|
+
} from "./chunk-QH3T4WI2.js";
|
|
26
24
|
import {
|
|
27
25
|
defineCommand
|
|
28
26
|
} from "./chunk-S3S4TGEH.js";
|
|
29
27
|
import {
|
|
30
28
|
c
|
|
31
29
|
} from "./chunk-ZTZA4UWZ.js";
|
|
30
|
+
import {
|
|
31
|
+
resolveExtractCacheDir
|
|
32
|
+
} from "./chunk-73LTCCZI.js";
|
|
33
|
+
import {
|
|
34
|
+
getAvailableMemoryMb,
|
|
35
|
+
getFreeDiskMb,
|
|
36
|
+
getShmSizeMb,
|
|
37
|
+
getSystemMeta
|
|
38
|
+
} from "./chunk-T6AGUTZJ.js";
|
|
32
39
|
import {
|
|
33
40
|
getUpdateMeta,
|
|
34
41
|
withMeta
|
|
35
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-ANR6WOC3.js";
|
|
36
43
|
import {
|
|
37
44
|
CONFIG_PATH,
|
|
38
45
|
withFileLock
|
|
39
46
|
} from "./chunk-XUXGIA7H.js";
|
|
40
47
|
import {
|
|
41
48
|
VERSION
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import {
|
|
44
|
-
OPTIONAL_PACKAGES,
|
|
45
|
-
installedOptionalPackageVersion
|
|
46
|
-
} from "./chunk-3DKN5WKL.js";
|
|
47
|
-
import {
|
|
48
|
-
resolveExtractCacheDir
|
|
49
|
-
} from "./chunk-W4SLIGGM.js";
|
|
49
|
+
} from "./chunk-RZXUQR42.js";
|
|
50
50
|
import {
|
|
51
51
|
normalizeErrorMessage
|
|
52
52
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -232,7 +232,7 @@ function checkEnvironment() {
|
|
|
232
232
|
return { ok: true, detail: parts.join(" \xB7 ") };
|
|
233
233
|
}
|
|
234
234
|
async function checkWhisper() {
|
|
235
|
-
const { findWhisper, getInstallInstructions } = await import("./manager-
|
|
235
|
+
const { findWhisper, getInstallInstructions } = await import("./manager-D2UV6RDQ.js");
|
|
236
236
|
const result = findWhisper();
|
|
237
237
|
if (result) {
|
|
238
238
|
return { ok: true, detail: result.executablePath };
|
|
@@ -5,12 +5,17 @@ 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
|
+
runCancellableProcess,
|
|
8
9
|
runRenderSetupWorker
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DYAPHNV6.js";
|
|
10
11
|
import {
|
|
12
|
+
getFreeDiskMb
|
|
13
|
+
} from "./chunk-T6AGUTZJ.js";
|
|
14
|
+
import {
|
|
15
|
+
browserPathFromEnv,
|
|
11
16
|
managedChromeVersion,
|
|
12
17
|
pickSharedShell
|
|
13
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4UMPIPCQ.js";
|
|
14
19
|
import {
|
|
15
20
|
normalizeErrorMessage
|
|
16
21
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -31,7 +36,33 @@ import {
|
|
|
31
36
|
} from "fs";
|
|
32
37
|
import { homedir } from "os";
|
|
33
38
|
import { debuglog } from "util";
|
|
34
|
-
import { basename, dirname, join, relative } from "path";
|
|
39
|
+
import { basename, dirname as dirname2, join, relative } from "path";
|
|
40
|
+
|
|
41
|
+
// src/browser/unzipArchive.ts
|
|
42
|
+
import { mkdir } from "fs/promises";
|
|
43
|
+
import { dirname } from "path";
|
|
44
|
+
var UNZIP_DISK_FULL_STATUS = 50;
|
|
45
|
+
async function unzipArchive(archivePath, folderPath) {
|
|
46
|
+
await mkdir(dirname(folderPath), { recursive: true });
|
|
47
|
+
try {
|
|
48
|
+
await runCancellableProcess("unzip", ["-q", "-o", archivePath, "-d", folderPath], {
|
|
49
|
+
detached: false
|
|
50
|
+
});
|
|
51
|
+
return true;
|
|
52
|
+
} catch (err) {
|
|
53
|
+
if (err.code === "ENOENT") return false;
|
|
54
|
+
if (err.status === UNZIP_DISK_FULL_STATUS) {
|
|
55
|
+
throw new Error(
|
|
56
|
+
"Extraction failed: the disk filled up while unpacking Chrome. Free disk space, then retry.",
|
|
57
|
+
{ cause: err }
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
const said = err.stderr?.trim();
|
|
61
|
+
throw new Error(`Extraction failed: ${said || err.message}`, { cause: err });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// src/browser/manager.ts
|
|
35
66
|
async function loadPuppeteerBrowsers() {
|
|
36
67
|
try {
|
|
37
68
|
return await import("@puppeteer/browsers");
|
|
@@ -45,6 +76,7 @@ Fix: run \`npm install\` or \`bun install\` to restore missing packages, then re
|
|
|
45
76
|
}
|
|
46
77
|
var CACHE_ROOT_DIR = join(homedir(), ".cache", "hyperframes");
|
|
47
78
|
var CACHE_DIR = join(homedir(), ".cache", "hyperframes", "chrome");
|
|
79
|
+
var ARCHIVE_PLUS_UNPACKED_SHELL_MB = 512;
|
|
48
80
|
var PUPPETEER_CACHE_DIR = join(homedir(), ".cache", "puppeteer", "chrome-headless-shell");
|
|
49
81
|
var INSTALL_LOCK_DIR = join(CACHE_ROOT_DIR, ".chrome.install.lock");
|
|
50
82
|
var INSTALL_RECLAIM_LOCK_DIR = join(CACHE_ROOT_DIR, ".chrome.install.reclaim.lock");
|
|
@@ -206,7 +238,7 @@ function whichBinary(name) {
|
|
|
206
238
|
}
|
|
207
239
|
}
|
|
208
240
|
function findFromEnv() {
|
|
209
|
-
const envPath =
|
|
241
|
+
const envPath = browserPathFromEnv()?.path;
|
|
210
242
|
if (envPath && existsSync(envPath)) {
|
|
211
243
|
return { executablePath: envPath, source: "env" };
|
|
212
244
|
}
|
|
@@ -458,21 +490,28 @@ async function downloadBrowser(options) {
|
|
|
458
490
|
if (isLinuxArm()) {
|
|
459
491
|
return ensureLinuxArmBrowser(options);
|
|
460
492
|
}
|
|
461
|
-
|
|
493
|
+
removeInstallLeftovers();
|
|
494
|
+
const freeMb = getFreeDiskMb(CACHE_ROOT_DIR);
|
|
495
|
+
if (freeMb !== null && freeMb < ARCHIVE_PLUS_UNPACKED_SHELL_MB) {
|
|
496
|
+
throw new Error(
|
|
497
|
+
`Low disk space: Chrome Headless Shell needs about ${ARCHIVE_PLUS_UNPACKED_SHELL_MB} MB to download, ${freeMb} MB free at ${CACHE_ROOT_DIR}. Free disk space, then retry.`
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
const { Browser, Cache, detectBrowserPlatform, install } = await loadPuppeteerBrowsers();
|
|
462
501
|
const platform = detectBrowserPlatform();
|
|
463
502
|
if (!platform) {
|
|
464
503
|
throw new Error(`Unsupported platform: ${process.platform} ${process.arch}`);
|
|
465
504
|
}
|
|
466
|
-
removeInstallLeftovers();
|
|
467
505
|
const stagingDir = join(CACHE_ROOT_DIR, `${STAGING_PREFIX}${randomUUID()}`);
|
|
468
506
|
const clearStaging = () => rmSync(stagingDir, { recursive: true, force: true });
|
|
469
507
|
let unzipLog = [];
|
|
470
|
-
const
|
|
508
|
+
const buildId = managedChromeVersion();
|
|
509
|
+
const runInstall = async () => {
|
|
471
510
|
unzipLog = [];
|
|
472
|
-
|
|
511
|
+
const installOptions = {
|
|
473
512
|
cacheDir: stagingDir,
|
|
474
513
|
browser: Browser.CHROMEHEADLESSSHELL,
|
|
475
|
-
buildId
|
|
514
|
+
buildId,
|
|
476
515
|
platform,
|
|
477
516
|
downloadProgressCallback: options?.onProgress,
|
|
478
517
|
logger: (prefix) => {
|
|
@@ -485,7 +524,14 @@ async function downloadBrowser(options) {
|
|
|
485
524
|
if (debug.enabled) debug(line);
|
|
486
525
|
};
|
|
487
526
|
}
|
|
488
|
-
}
|
|
527
|
+
};
|
|
528
|
+
const unzipMayAskOnInput = process.platform !== "win32";
|
|
529
|
+
if (unzipMayAskOnInput) {
|
|
530
|
+
const archive = await install({ ...installOptions, unpack: false });
|
|
531
|
+
const into = new Cache(stagingDir).installationDir(installOptions.browser, platform, buildId);
|
|
532
|
+
await unzipArchive(archive, into);
|
|
533
|
+
}
|
|
534
|
+
return install(installOptions);
|
|
489
535
|
};
|
|
490
536
|
try {
|
|
491
537
|
const staged = await installWithCorruptArchiveRecovery(
|
|
@@ -527,7 +573,7 @@ function assertExecutableUnpacked(stagingDir, executablePath) {
|
|
|
527
573
|
function moveStagedInstallIntoCache(stagingDir, staged) {
|
|
528
574
|
const target = join(CACHE_DIR, relative(stagingDir, staged.path));
|
|
529
575
|
const aside = join(CACHE_ROOT_DIR, `${REPLACED_PREFIX}${randomUUID()}`);
|
|
530
|
-
mkdirSync(
|
|
576
|
+
mkdirSync(dirname2(target), { recursive: true });
|
|
531
577
|
let replaced = false;
|
|
532
578
|
try {
|
|
533
579
|
renameSync(target, aside);
|
|
@@ -546,6 +592,7 @@ function moveStagedInstallIntoCache(stagingDir, staged) {
|
|
|
546
592
|
}
|
|
547
593
|
var STAGING_PREFIX = ".chrome-staging-";
|
|
548
594
|
var REPLACED_PREFIX = ".chrome-replaced-";
|
|
595
|
+
var isInstallLeftover = (name) => name.startsWith(STAGING_PREFIX) || name.startsWith(REPLACED_PREFIX);
|
|
549
596
|
function removeInstallLeftovers() {
|
|
550
597
|
let names;
|
|
551
598
|
try {
|
|
@@ -554,13 +601,16 @@ function removeInstallLeftovers() {
|
|
|
554
601
|
if (isErrno(err, "ENOENT")) return false;
|
|
555
602
|
throw err;
|
|
556
603
|
}
|
|
557
|
-
const leftovers = names.filter(
|
|
558
|
-
(name) => name.startsWith(STAGING_PREFIX) || name.startsWith(REPLACED_PREFIX)
|
|
559
|
-
);
|
|
604
|
+
const leftovers = names.filter(isInstallLeftover);
|
|
560
605
|
for (const name of leftovers)
|
|
561
606
|
rmSync(join(CACHE_ROOT_DIR, name), { recursive: true, force: true });
|
|
562
607
|
return leftovers.length > 0;
|
|
563
608
|
}
|
|
609
|
+
async function sweepKilledInstalls() {
|
|
610
|
+
const names = existsSync(CACHE_ROOT_DIR) ? readdirSync(CACHE_ROOT_DIR) : [];
|
|
611
|
+
if (!names.some(isInstallLeftover)) return;
|
|
612
|
+
await withInstallLock(async () => removeInstallLeftovers());
|
|
613
|
+
}
|
|
564
614
|
function clearBrowser() {
|
|
565
615
|
const removedLeftovers = removeInstallLeftovers();
|
|
566
616
|
if (!existsSync(CACHE_DIR)) return removedLeftovers;
|
|
@@ -581,6 +631,7 @@ export {
|
|
|
581
631
|
ensureBrowser,
|
|
582
632
|
isCorruptArchiveError,
|
|
583
633
|
installWithCorruptArchiveRecovery,
|
|
634
|
+
sweepKilledInstalls,
|
|
584
635
|
clearBrowser,
|
|
585
636
|
isLinuxArm
|
|
586
637
|
};
|
|
@@ -18,10 +18,11 @@ var CONNECTIONS = 8;
|
|
|
18
18
|
var RETRIES = 3;
|
|
19
19
|
async function downloadToFile(url, destPath, options = {}) {
|
|
20
20
|
const fetchImpl = options.fetchImpl ?? fetch;
|
|
21
|
+
const partBytes = options.partBytes ?? PART_BYTES;
|
|
21
22
|
const failFast = new AbortController();
|
|
22
23
|
const signal = options.signal ? AbortSignal.any([options.signal, failFast.signal]) : failFast.signal;
|
|
23
24
|
const get = async (range) => fetchImpl(url, { signal, headers: range ? { range } : {} });
|
|
24
|
-
let first = await get(`bytes=0-${
|
|
25
|
+
let first = await get(`bytes=0-${partBytes - 1}`);
|
|
25
26
|
if (first.status === 416 || first.status === 206 && contentRangeTotal(first) === void 0) {
|
|
26
27
|
await first.body?.cancel();
|
|
27
28
|
first = await get();
|
|
@@ -74,10 +75,10 @@ async function downloadToFile(url, destPath, options = {}) {
|
|
|
74
75
|
};
|
|
75
76
|
const parts = [];
|
|
76
77
|
if (ranged && total !== void 0) {
|
|
77
|
-
parts.push(fetchRange(0, Math.min(
|
|
78
|
-
const rest = total -
|
|
79
|
-
const size = Math.ceil(rest / Math.min(CONNECTIONS - 1, Math.ceil(rest /
|
|
80
|
-
for (let start =
|
|
78
|
+
parts.push(fetchRange(0, Math.min(partBytes, total) - 1, first));
|
|
79
|
+
const rest = total - partBytes;
|
|
80
|
+
const size = Math.ceil(rest / Math.min(CONNECTIONS - 1, Math.ceil(rest / partBytes)));
|
|
81
|
+
for (let start = partBytes; start < total; start += size) {
|
|
81
82
|
parts.push(fetchRange(start, Math.min(start + size, total) - 1));
|
|
82
83
|
}
|
|
83
84
|
} else {
|
|
@@ -7,15 +7,23 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
diag
|
|
9
9
|
} from "./chunk-VWG7OQKU.js";
|
|
10
|
-
import {
|
|
11
|
-
getSystemMeta
|
|
12
|
-
} from "./chunk-T6AGUTZJ.js";
|
|
13
10
|
import {
|
|
14
11
|
getInvocationId
|
|
15
12
|
} from "./chunk-54HJ63Q2.js";
|
|
16
13
|
import {
|
|
17
14
|
c
|
|
18
15
|
} from "./chunk-ZTZA4UWZ.js";
|
|
16
|
+
import {
|
|
17
|
+
CANARIES,
|
|
18
|
+
canaryEnvVar,
|
|
19
|
+
canaryFeatureProperties,
|
|
20
|
+
evaluateCanary,
|
|
21
|
+
findCanary,
|
|
22
|
+
parseCanaryOverride
|
|
23
|
+
} from "./chunk-FXMKHHPO.js";
|
|
24
|
+
import {
|
|
25
|
+
getSystemMeta
|
|
26
|
+
} from "./chunk-T6AGUTZJ.js";
|
|
19
27
|
import {
|
|
20
28
|
hostAnswers
|
|
21
29
|
} from "./chunk-K4WIOZFP.js";
|
|
@@ -29,15 +37,7 @@ import {
|
|
|
29
37
|
} from "./chunk-XUXGIA7H.js";
|
|
30
38
|
import {
|
|
31
39
|
VERSION
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import {
|
|
34
|
-
CANARIES,
|
|
35
|
-
canaryEnvVar,
|
|
36
|
-
canaryFeatureProperties,
|
|
37
|
-
evaluateCanary,
|
|
38
|
-
findCanary,
|
|
39
|
-
parseCanaryOverride
|
|
40
|
-
} from "./chunk-FXMKHHPO.js";
|
|
40
|
+
} from "./chunk-RZXUQR42.js";
|
|
41
41
|
|
|
42
42
|
// src/telemetry/transport.ts
|
|
43
43
|
import { spawn } from "child_process";
|
|
@@ -12,6 +12,9 @@ var CPU_COMPOSITING = "--disable-gpu-compositing";
|
|
|
12
12
|
function machServiceDenied(errorMessage) {
|
|
13
13
|
return MACH_SERVICE_DENIED.test(errorMessage);
|
|
14
14
|
}
|
|
15
|
+
function pipeLaunchClosedOnMac(error, platform = process.platform) {
|
|
16
|
+
return platform === "darwin" && error instanceof Error && error.name === "TargetCloseError";
|
|
17
|
+
}
|
|
15
18
|
function inAgentSandbox(env = process.env, platform = process.platform) {
|
|
16
19
|
return platform === "darwin" && env.CODEX_SANDBOX === "seatbelt";
|
|
17
20
|
}
|
|
@@ -33,6 +36,7 @@ function sandboxDeniedRemediation(errorMessage) {
|
|
|
33
36
|
|
|
34
37
|
export {
|
|
35
38
|
machServiceDenied,
|
|
39
|
+
pipeLaunchClosedOnMac,
|
|
36
40
|
inAgentSandbox,
|
|
37
41
|
oneProcessOverPipe,
|
|
38
42
|
isOneProcessOverPipe,
|
|
@@ -8,19 +8,19 @@ import {
|
|
|
8
8
|
flush,
|
|
9
9
|
shouldTrack,
|
|
10
10
|
trackEvent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DEORFAWP.js";
|
|
12
|
+
import {
|
|
13
|
+
CliRuntimeError
|
|
14
|
+
} from "./chunk-JVBRJMOP.js";
|
|
15
|
+
import {
|
|
16
|
+
redactTelemetryString
|
|
17
|
+
} from "./chunk-634HSJ3J.js";
|
|
12
18
|
import {
|
|
13
19
|
getPowerState
|
|
14
20
|
} from "./chunk-T6AGUTZJ.js";
|
|
15
|
-
import {
|
|
16
|
-
CliRuntimeError
|
|
17
|
-
} from "./chunk-PBN6GBJE.js";
|
|
18
21
|
import {
|
|
19
22
|
readConfig
|
|
20
23
|
} from "./chunk-XUXGIA7H.js";
|
|
21
|
-
import {
|
|
22
|
-
redactTelemetryString
|
|
23
|
-
} from "./chunk-634HSJ3J.js";
|
|
24
24
|
|
|
25
25
|
// src/utils/feedbackRating.ts
|
|
26
26
|
var FEEDBACK_RATING_SCALE = 10;
|
|
@@ -86,6 +86,7 @@ var CancellableProcessError = class extends Error {
|
|
|
86
86
|
function runCancellableProcess(command, args, options = {}) {
|
|
87
87
|
const signal = options.signal;
|
|
88
88
|
signal?.throwIfAborted();
|
|
89
|
+
const detached = options.detached ?? process.platform !== "win32";
|
|
89
90
|
return new Promise((resolve, reject) => {
|
|
90
91
|
let child;
|
|
91
92
|
try {
|
|
@@ -94,7 +95,7 @@ function runCancellableProcess(command, args, options = {}) {
|
|
|
94
95
|
env: options.env,
|
|
95
96
|
stdio: ["ignore", "pipe", "pipe"],
|
|
96
97
|
windowsHide: true,
|
|
97
|
-
detached
|
|
98
|
+
detached
|
|
98
99
|
};
|
|
99
100
|
child = spawn(command, [...args], spawnOptions);
|
|
100
101
|
} catch (error) {
|
|
@@ -130,7 +131,7 @@ function runCancellableProcess(command, args, options = {}) {
|
|
|
130
131
|
terminationCode = code;
|
|
131
132
|
terminationSignal = "SIGTERM";
|
|
132
133
|
if (processTreePid) {
|
|
133
|
-
terminationTask = terminateProcessTree(processTreePid, { child, processGroup:
|
|
134
|
+
terminationTask = terminateProcessTree(processTreePid, { child, processGroup: detached });
|
|
134
135
|
void terminationTask.catch(() => void 0);
|
|
135
136
|
}
|
|
136
137
|
};
|
|
@@ -6,7 +6,6 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
|
|
8
8
|
// src/capture/captureTimeout.ts
|
|
9
|
-
import { TimeoutError } from "puppeteer-core";
|
|
10
9
|
var PUPPETEER_DEFAULT_PROTOCOL_TIMEOUT_MS = 18e4;
|
|
11
10
|
var StageBudgetTimeoutError = class extends Error {
|
|
12
11
|
budgetMs;
|
|
@@ -25,6 +24,9 @@ function captureProtocolTimeoutMs(navTimeoutMs, postNavBudgetMs) {
|
|
|
25
24
|
function errorMessage(err) {
|
|
26
25
|
return err instanceof Error ? err.message : String(err);
|
|
27
26
|
}
|
|
27
|
+
function isPuppeteerTimeoutError(err) {
|
|
28
|
+
return err instanceof Error && err.constructor.name === "TimeoutError";
|
|
29
|
+
}
|
|
28
30
|
function hasNavigationTimeoutMessage(msg) {
|
|
29
31
|
return /navigation timeout/i.test(msg);
|
|
30
32
|
}
|
|
@@ -32,7 +34,7 @@ function hasProtocolEvaluateTimeoutMessage(msg) {
|
|
|
32
34
|
return /Runtime\.evaluate timed out|protocolTimeout|protocol timeout/i.test(msg);
|
|
33
35
|
}
|
|
34
36
|
function isNavigationTimeoutError(err) {
|
|
35
|
-
if (err
|
|
37
|
+
if (isPuppeteerTimeoutError(err)) {
|
|
36
38
|
return hasNavigationTimeoutMessage(err.message);
|
|
37
39
|
}
|
|
38
40
|
return typeof err === "string" && hasNavigationTimeoutMessage(err);
|
|
@@ -41,7 +43,7 @@ function isStageBudgetTimeoutError(err) {
|
|
|
41
43
|
return err instanceof StageBudgetTimeoutError;
|
|
42
44
|
}
|
|
43
45
|
function isProtocolEvaluateTimeoutError(err) {
|
|
44
|
-
if (err
|
|
46
|
+
if (isPuppeteerTimeoutError(err)) {
|
|
45
47
|
return !hasNavigationTimeoutMessage(err.message);
|
|
46
48
|
}
|
|
47
49
|
return hasProtocolEvaluateTimeoutMessage(errorMessage(err));
|
|
@@ -7,28 +7,28 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
relinkSplitHalves
|
|
9
9
|
} from "./chunk-6JR2XUEE.js";
|
|
10
|
+
import {
|
|
11
|
+
isAllowedHtmlAttribute,
|
|
12
|
+
isSafeAttributeValue,
|
|
13
|
+
sanitizeRichTextChildren
|
|
14
|
+
} from "./chunk-VFBAKPRC.js";
|
|
10
15
|
import {
|
|
11
16
|
EXCLUDED_TAGS,
|
|
12
17
|
ensureHfIds,
|
|
13
18
|
mintHfId,
|
|
14
19
|
walkCompositionDescendants
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
isAllowedHtmlAttribute,
|
|
18
|
-
isSafeAttributeValue,
|
|
19
|
-
sanitizeRichTextChildren
|
|
20
|
-
} from "./chunk-LBQFLUIY.js";
|
|
20
|
+
} from "./chunk-WT4PYV2J.js";
|
|
21
21
|
import {
|
|
22
22
|
decodedUrlPath,
|
|
23
23
|
removeElementWithGsapCascade
|
|
24
24
|
} from "./chunk-YMS5FOMC.js";
|
|
25
25
|
import {
|
|
26
26
|
require_dist
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ADDHW2FS.js";
|
|
28
28
|
import {
|
|
29
29
|
readClipTiming,
|
|
30
30
|
writeClipTiming
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-MMQ52NIZ.js";
|
|
32
32
|
import {
|
|
33
33
|
readMediaOffsetSeconds,
|
|
34
34
|
readPlaybackRate
|
|
@@ -0,0 +1,122 @@
|
|
|
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/warmCheckProtocol.ts
|
|
9
|
+
import { createHash, createHmac, randomBytes, timingSafeEqual } from "crypto";
|
|
10
|
+
import { lstatSync, mkdirSync, readFileSync, statSync, writeFileSync } from "fs";
|
|
11
|
+
import { homedir } from "os";
|
|
12
|
+
import { join } from "path";
|
|
13
|
+
import { Writable } from "stream";
|
|
14
|
+
import { fileURLToPath } from "url";
|
|
15
|
+
var WARM_IDLE_MS = 5 * 6e4;
|
|
16
|
+
var HANDSHAKE_TIMEOUT_MS = 2e3;
|
|
17
|
+
var MAX_FRAME_BYTES = 64 * 1024 * 1024;
|
|
18
|
+
var Frame = {
|
|
19
|
+
Stdout: 1,
|
|
20
|
+
Stderr: 2,
|
|
21
|
+
Exit: 3,
|
|
22
|
+
Declined: 4,
|
|
23
|
+
Signal: 5,
|
|
24
|
+
Request: 6,
|
|
25
|
+
Hello: 7,
|
|
26
|
+
Proof: 8
|
|
27
|
+
};
|
|
28
|
+
var VOLATILE_ENV = /* @__PURE__ */ new Set(["_", "PWD", "OLDPWD"]);
|
|
29
|
+
function privateToMe(path, kind) {
|
|
30
|
+
const stat = lstatSync(path, { throwIfNoEntry: false });
|
|
31
|
+
if (!stat || stat.isSymbolicLink()) return false;
|
|
32
|
+
if (kind === "dir" ? !stat.isDirectory() : !stat.isFile()) return false;
|
|
33
|
+
if (process.platform === "win32") return true;
|
|
34
|
+
return stat.uid === process.getuid?.() && (stat.mode & 63) === 0;
|
|
35
|
+
}
|
|
36
|
+
function warmCheckDirectory(env = process.env) {
|
|
37
|
+
const dir = process.platform === "win32" ? join(env.LOCALAPPDATA ?? join(homedir(), "AppData", "Local"), "hyperframes", "warm") : env.XDG_RUNTIME_DIR ? join(env.XDG_RUNTIME_DIR, "hyperframes-warm") : join(homedir(), ".cache", "hyperframes", "warm");
|
|
38
|
+
try {
|
|
39
|
+
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
40
|
+
} catch {
|
|
41
|
+
return void 0;
|
|
42
|
+
}
|
|
43
|
+
return privateToMe(dir, "dir") ? dir : void 0;
|
|
44
|
+
}
|
|
45
|
+
function readToken(dir) {
|
|
46
|
+
const path = join(dir, "token");
|
|
47
|
+
try {
|
|
48
|
+
writeFileSync(path, randomBytes(32).toString("hex"), { flag: "wx", mode: 384 });
|
|
49
|
+
} catch {
|
|
50
|
+
}
|
|
51
|
+
if (!privateToMe(path, "file")) return void 0;
|
|
52
|
+
const token = readFileSync(path, "utf8");
|
|
53
|
+
return /^[0-9a-f]{64}$/.test(token) ? token : void 0;
|
|
54
|
+
}
|
|
55
|
+
function keyed(token, ...parts) {
|
|
56
|
+
return createHmac("sha256", token).update(parts.join("\0")).digest("hex");
|
|
57
|
+
}
|
|
58
|
+
function sameProof(expected, received) {
|
|
59
|
+
const a = Buffer.from(expected);
|
|
60
|
+
const b = Buffer.from(typeof received === "string" ? received : "");
|
|
61
|
+
return a.length === b.length && timingSafeEqual(a, b);
|
|
62
|
+
}
|
|
63
|
+
function envDigest(token, env) {
|
|
64
|
+
const entries = Object.keys(env).filter((key) => !VOLATILE_ENV.has(key) && env[key] !== void 0).sort().map((key) => `${key}=${env[key]}`);
|
|
65
|
+
return keyed(token, "env", ...entries);
|
|
66
|
+
}
|
|
67
|
+
function warmCheckEndpoint(env = process.env) {
|
|
68
|
+
const dir = warmCheckDirectory(env);
|
|
69
|
+
const token = dir && readToken(dir);
|
|
70
|
+
if (!dir || !token) return void 0;
|
|
71
|
+
const self = statSync(fileURLToPath(import.meta.url));
|
|
72
|
+
const build = createHash("sha256").update(
|
|
73
|
+
[import.meta.url, self.size, self.mtimeMs, process.execPath, process.version].join("\0")
|
|
74
|
+
).digest("hex").slice(0, 12);
|
|
75
|
+
const address = process.platform === "win32" ? `\\\\.\\pipe\\hyperframes-warm-${keyed(token, "pipe", build).slice(0, 32)}` : join(dir, `${build}.sock`);
|
|
76
|
+
return { address, token };
|
|
77
|
+
}
|
|
78
|
+
function encodeFrame(type, data) {
|
|
79
|
+
const body = typeof data === "string" ? Buffer.from(data) : Buffer.from(data);
|
|
80
|
+
const head = Buffer.alloc(5);
|
|
81
|
+
head.writeUInt8(type, 0);
|
|
82
|
+
head.writeUInt32BE(body.length, 1);
|
|
83
|
+
return Buffer.concat([head, body]);
|
|
84
|
+
}
|
|
85
|
+
function frameReader(onFrame) {
|
|
86
|
+
let pending = Buffer.alloc(0);
|
|
87
|
+
let refused = false;
|
|
88
|
+
return (chunk) => {
|
|
89
|
+
if (refused) return false;
|
|
90
|
+
pending = Buffer.concat([pending, chunk]);
|
|
91
|
+
while (pending.length >= 5) {
|
|
92
|
+
const length = pending.readUInt32BE(1);
|
|
93
|
+
if (length > MAX_FRAME_BYTES) return !(refused = true);
|
|
94
|
+
if (pending.length < 5 + length) return true;
|
|
95
|
+
onFrame(pending.readUInt8(0), pending.subarray(5, 5 + length));
|
|
96
|
+
pending = pending.subarray(5 + length);
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function frameForwarder(socket, type) {
|
|
102
|
+
const sink = new Writable({
|
|
103
|
+
write(chunk, _encoding, next) {
|
|
104
|
+
socket.write(encodeFrame(type, chunk));
|
|
105
|
+
next();
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
return sink.write.bind(sink);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export {
|
|
112
|
+
WARM_IDLE_MS,
|
|
113
|
+
HANDSHAKE_TIMEOUT_MS,
|
|
114
|
+
Frame,
|
|
115
|
+
keyed,
|
|
116
|
+
sameProof,
|
|
117
|
+
envDigest,
|
|
118
|
+
warmCheckEndpoint,
|
|
119
|
+
encodeFrame,
|
|
120
|
+
frameReader,
|
|
121
|
+
frameForwarder
|
|
122
|
+
};
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
typeDirPath,
|
|
21
21
|
updateRecord,
|
|
22
22
|
withFigmaErrors
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ITSLKUQM.js";
|
|
24
24
|
import {
|
|
25
25
|
defineCommand
|
|
26
26
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -229,7 +229,7 @@ var asset_default = defineCommand({
|
|
|
229
229
|
rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
|
|
230
230
|
);
|
|
231
231
|
}
|
|
232
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
232
|
+
const { trackFigmaImport } = await import("./telemetry-LFUVHARP.js");
|
|
233
233
|
trackFigmaImport({
|
|
234
234
|
phase: "asset",
|
|
235
235
|
reused: results.every((r) => r.reused),
|