hyperframes 0.8.181 → 0.8.184
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-AWQ2EGBU.js → add-5ZTD3MUZ.js} +22 -22
- package/dist/{animatedGifPrep-SENXJ7TN.js → animatedGifPrep-AGASIWVA.js} +14 -13
- package/dist/api.js +29 -28
- package/dist/{asset-XBH3MN3Y.js → asset-LSTEMPIB.js} +3 -3
- package/dist/{assetCataloger-KH4X2CRO.js → assetCataloger-BKBMNL3A.js} +16 -13
- package/dist/{audio-Q7I473UN.js → audio-KGK44XE4.js} +31 -30
- package/dist/{auth-I7CBTEUS.js → auth-MJWKYK77.js} +4 -4
- package/dist/{autoUpdate-KY5TLSN7.js → autoUpdate-2GGDKYR2.js} +2 -2
- package/dist/{backgroundChecks-4Q3VVK5W.js → backgroundChecks-7GRX5VQY.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-3AYDQRBI.js → batchRender-BCV2LELR.js} +7 -7
- package/dist/{beats-P4LENNVT.js → beats-7BCFRBAL.js} +12 -12
- package/dist/{benchmark-AXOAECN3.js → benchmark-2R6CN5MQ.js} +24 -24
- package/dist/{browser-XZKB5HGJ.js → browser-6AFGOI7G.js} +20 -20
- package/dist/{bundleWithLocalizedFonts-2WCR57IN.js → bundleWithLocalizedFonts-2EGPA5ZO.js} +2 -2
- package/dist/{capture-NWARHRHR.js → capture-HA2UHLIU.js} +8 -5
- package/dist/{capture-4RN4APDF.js → capture-HOIAW6MO.js} +50 -41
- package/dist/{captureCompositionFrame-QOF5BRF4.js → captureCompositionFrame-4236FVWJ.js} +22 -20
- package/dist/{captureTimeout-K2JNVVCI.js → captureTimeout-RIMG6IYH.js} +1 -1
- package/dist/{catalog-CRPOPVD5.js → catalog-A6CZAWW4.js} +42 -42
- package/dist/{catch-up-MHWGUQ42.js → catch-up-TNA4DJOA.js} +15 -15
- package/dist/check-5E5U2EQZ.js +117 -0
- package/dist/checkBrowser-FNINXBMZ.js +118 -0
- package/dist/{chunk-OJTDUF4W.js → chunk-2PVE4WS2.js} +1 -1
- package/dist/{checkBrowser-VES2NF3K.js → chunk-2ULXZ4PG.js} +187 -114
- package/dist/{chunk-WITHUCCB.js → chunk-2XA7KXQO.js} +2 -2
- package/dist/{chunk-HODBPO4A.js → chunk-3MDJIWOV.js} +626 -328
- package/dist/{chunk-JBCU6NR5.js → chunk-3QVMJ7GX.js} +56 -55
- package/dist/{chunk-OR5WCFWZ.js → chunk-3TXNNBI2.js} +2 -2
- package/dist/{chunk-IZM562YJ.js → chunk-4KKKBEP3.js} +4 -4
- package/dist/{chunk-XEWHUPFS.js → chunk-4N4P3ZWL.js} +2 -2
- package/dist/{chunk-537IYAEE.js → chunk-4UMPIPCQ.js} +9 -1
- package/dist/{chunk-J4L5TPLS.js → chunk-5UDRPPN2.js} +48 -6
- package/dist/{chunk-L3YOGIPG.js → chunk-66LREXGS.js} +1 -1
- package/dist/{chunk-6I7V6Q7F.js → chunk-74JMKLVU.js} +103 -20
- package/dist/{chunk-3PULCIY5.js → chunk-7HJALUIO.js} +5 -5
- package/dist/{chunk-GZVP4TWN.js → chunk-7JAD4MEW.js} +1 -1
- package/dist/{chunk-NAMGMP3R.js → chunk-7KVVNF7B.js} +1 -1
- package/dist/{chunk-TO6JNTML.js → chunk-7MB2ZAQF.js} +13 -8
- package/dist/{chunk-55IG255C.js → chunk-7NRI7HYX.js} +1 -1
- package/dist/{chunk-VAJIPSN6.js → chunk-ABZYYUUH.js} +1 -1
- package/dist/{chunk-GK2FIKIQ.js → chunk-ADDHW2FS.js} +214 -37
- package/dist/{chunk-ZUOSILUE.js → chunk-BCHSTE7U.js} +1 -1
- package/dist/{chunk-AOWDVB2T.js → chunk-CXABAXB3.js} +1 -1
- package/dist/{chunk-E24HSMZV.js → chunk-CYBXXSC4.js} +65 -14
- package/dist/{chunk-NZZYJOMJ.js → chunk-CZUAX3BV.js} +6 -5
- package/dist/{chunk-GV5R5B7Q.js → chunk-DGECWPTL.js} +1 -1
- package/dist/{chunk-BRHI7EIA.js → chunk-DKPNNYBZ.js} +4 -0
- package/dist/{chunk-UIDZRCBG.js → chunk-DWUGKEHR.js} +1 -1
- package/dist/{chunk-D3ZWBHZP.js → chunk-DYAPHNV6.js} +3 -2
- package/dist/{chunk-T7UHTUUE.js → chunk-E32ZQ2WO.js} +9 -9
- package/dist/{chunk-RGHQID2E.js → chunk-EHSBBBR2.js} +5 -3
- package/dist/{chunk-DJJ7SK4F.js → chunk-EM7C7H7S.js} +8 -8
- package/dist/{chunk-XSRUVMXK.js → chunk-ES426XRJ.js} +4 -4
- package/dist/chunk-FG4BBFZI.js +122 -0
- package/dist/{chunk-JMFJI26U.js → chunk-FGJEUV4S.js} +2 -2
- package/dist/{check-DJCUOUDI.js → chunk-GDEV42FA.js} +198 -142
- package/dist/{chunk-RXQHSGAQ.js → chunk-HR23IKLZ.js} +2 -2
- package/dist/{chunk-KMAAOHLO.js → chunk-HRPWRZGF.js} +1 -1
- package/dist/{chunk-UPFUC4DB.js → chunk-HTIUNMTP.js} +1 -1
- package/dist/{chunk-V2UNZ7QP.js → chunk-ICJEAFPD.js} +25 -14
- package/dist/{chunk-EOADENKV.js → chunk-IWTNTUPQ.js} +16 -14
- package/dist/chunk-IZCW2NKT.js +29 -0
- package/dist/{chunk-XFCLWWL3.js → chunk-J36JVBLR.js} +11 -4
- package/dist/{chunk-LBQFLUIY.js → chunk-J3QM7AHP.js} +9 -49
- package/dist/{chunk-DUN63LHY.js → chunk-JB6ARMQS.js} +2 -2
- package/dist/{chunk-5E5EYPZO.js → chunk-JIUTXKWA.js} +7 -7
- package/dist/{chunk-YJDB4FLT.js → chunk-JQYJXUJW.js} +1 -1
- package/dist/{chunk-PBN6GBJE.js → chunk-JVBRJMOP.js} +14 -1
- package/dist/{chunk-RHWJKSGH.js → chunk-KANNRHY7.js} +1 -1
- package/dist/{chunk-IL3GTCQY.js → chunk-KN46TGHV.js} +72 -140
- package/dist/{chunk-OFY6JTZC.js → chunk-LLC4CS6I.js} +2 -2
- package/dist/{chunk-OJDXABUF.js → chunk-LRGYPXHF.js} +2 -2
- package/dist/{chunk-GNE57O7U.js → chunk-MFAETWIF.js} +1 -1
- 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-B4VT6YU2.js → chunk-OLZENUPI.js} +50 -7
- package/dist/{chunk-H4YZZ2VQ.js → chunk-PFD25NAC.js} +1 -1
- package/dist/{chunk-XH262OWN.js → chunk-PFYWVUHA.js} +1 -1
- package/dist/{chunk-S3RYRF3W.js → chunk-PSKEKWVU.js} +1 -1
- package/dist/{chunk-N5SXQCJL.js → chunk-Q33P4EAC.js} +3 -3
- package/dist/{chunk-3DKN5WKL.js → chunk-QH3T4WI2.js} +77 -6
- package/dist/{chunk-O5AE7HOP.js → chunk-QL2PNIXC.js} +37 -33
- package/dist/{chunk-WUUCEFL5.js → chunk-R2BFTECP.js} +5 -5
- package/dist/chunk-R2SQBPMH.js +3805 -0
- package/dist/{chunk-YPBIAONI.js → chunk-RGXVEYHI.js} +230 -162
- package/dist/{chunk-YMS6CJCD.js → chunk-SAX7HQ5E.js} +1 -1
- package/dist/{chunk-KIO3R4QN.js → chunk-SN7KI5JA.js} +27 -14
- package/dist/{chunk-4USWWI2Y.js → chunk-TE427YID.js} +2 -2
- package/dist/{chunk-ICMXC3MI.js → chunk-U6RXZNZE.js} +31 -18
- package/dist/{chunk-X7CCSMRR.js → chunk-UJKUB2LH.js} +16 -16
- package/dist/{chunk-K26FR4SM.js → chunk-UKOTVJFV.js} +12 -12
- package/dist/{chunk-4OT3FWVV.js → chunk-UNNXFKVG.js} +2 -2
- package/dist/{chunk-PF7OWVTL.js → chunk-VDM3FEDP.js} +2 -2
- package/dist/{chunk-Y5GY6Y7A.js → chunk-VNVQGDPC.js} +2 -2
- package/dist/{chunk-22QHO26F.js → chunk-W64L7IFS.js} +1 -1
- package/dist/{chunk-Y2RXRPL2.js → chunk-WHPN2TIT.js} +5 -5
- package/dist/{chunk-65WIUIHL.js → chunk-WTFUDNW2.js} +7 -15
- package/dist/{chunk-3XDOGSRD.js → chunk-X3CG5YQA.js} +3 -3
- package/dist/{chunk-UZOZ2W2E.js → chunk-XGHHVYC7.js} +96 -34
- package/dist/{chunk-4IEH6EAC.js → chunk-YALM6XN4.js} +203 -58
- package/dist/{chunk-B6JLCPT3.js → chunk-YOZPQCSR.js} +6 -6
- package/dist/{chunk-5JMZLQT6.js → chunk-YWHCXIMD.js} +16 -16
- package/dist/{chunk-UVEQLDKB.js → chunk-YWNJTZGN.js} +3 -2
- package/dist/{chunk-WUQUR33W.js → chunk-ZOCHDXDG.js} +1 -1
- package/dist/{chunk-IWTRHPTP.js → chunk-ZRHO6YMM.js} +8 -8
- package/dist/{clean-GJNDVVDI.js → clean-HGASSMWI.js} +41 -40
- package/dist/cli.js +68 -64
- package/dist/{cloud-JCWNMKXC.js → cloud-JPDVNXHN.js} +4 -4
- package/dist/{cloudrun-2BKGY53X.js → cloudrun-AMMGSDRP.js} +8 -8
- package/dist/commands/layout-audit.browser.js +15 -4
- package/dist/commands/motion-signature.browser.js +52 -0
- package/dist/{compare-XWM7FAYM.js → compare-LHHVHUN3.js} +51 -47
- package/dist/{compiler-U3W6CJW7.js → compiler-Q3N6QXMT.js} +6 -6
- package/dist/{component-CBRAE325.js → component-D72J32Q7.js} +4 -4
- package/dist/{compositions-EZYJEHQ3.js → compositions-UQRJ5ROG.js} +29 -29
- package/dist/{contactSheet-27SRU7A4.js → contactSheet-CAGMKI3E.js} +3 -1
- package/dist/{delete-JWWMOITI.js → delete-P42VIDDA.js} +9 -9
- package/dist/{deploy-UGOV76OH.js → deploy-WZTH57O4.js} +11 -11
- package/dist/{destroy-QBLMYDBF.js → destroy-4B5HW5FH.js} +5 -5
- package/dist/{deterministicFonts-L7YEEFGI.js → deterministicFonts-VQ5UBMXY.js} +2 -2
- package/dist/{dist-VO7OXOFK.js → dist-DYS24AMA.js} +5 -5
- package/dist/{dist-2FMTAVGL.js → dist-SENYPQGW.js} +4 -4
- package/dist/{docs-MPOM3PHH.js → docs-UEWLIP6D.js} +1 -1
- package/dist/{doctor-XSKSZRR7.js → doctor-KEJIG2SK.js} +28 -27
- package/dist/{events-RGS4MAH4.js → events-CYKSNR7N.js} +6 -6
- package/dist/{events-AIZODZMP.js → events-UZXFQPMT.js} +9 -9
- package/dist/{feedback-GE3VDZOH.js → feedback-LXNQF7CA.js} +35 -35
- package/dist/{ffmpeg-SCXZTR6X.js → ffmpeg-BYHON577.js} +16 -15
- package/dist/{figma-3R4XST4Y.js → figma-EIQ35PS6.js} +3 -3
- package/dist/fontLocalizeCli.js +24 -23
- package/dist/{get-4FKJP6IM.js → get-CC2YL7QO.js} +9 -9
- package/dist/{gpuPolicy-4NNXESM7.js → gpuPolicy-VFSACUQV.js} +14 -13
- package/dist/{grade-compare-FAYVPXUR.js → grade-compare-TUQL7IV2.js} +56 -50
- package/dist/{help-C3UQMYXK.js → help-ROROO5K6.js} +1 -1
- package/dist/{history-LDGQ2IZJ.js → history-PNELYLXX.js} +15 -15
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +59 -59
- package/dist/hyperframes-player.global.js +8 -3
- package/dist/{info-KMXFLD3Q.js → info-4FZTH6AS.js} +20 -20
- package/dist/{init-D7GYHSX5.js → init-I43GHHVP.js} +69 -68
- package/dist/{inspect-CUKWHCGS.js → inspect-IT4TYIZ3.js} +46 -44
- package/dist/{installer-EPRSH6QI.js → installer-CWOJVK5K.js} +7 -7
- package/dist/{keyframes-XCUPHBW3.js → keyframes-3FBOGVD4.js} +16 -16
- package/dist/{lambda-IMORFJHN.js → lambda-H3V32I7M.js} +15 -15
- package/dist/{layout-JD2IOBMS.js → layout-BZ5LYJ5C.js} +46 -44
- package/dist/{lint-FHLER36Y.js → lint-ZTNSGP2S.js} +23 -23
- package/dist/{lintProject-ARKJXDQF.js → lintProject-C2ONSH2U.js} +4 -4
- package/dist/{list-MGCFG5MA.js → list-XM4GWJYY.js} +10 -10
- package/dist/{login-QX6M4UTR.js → login-H6HYKMWX.js} +7 -7
- package/dist/{logout-DKJANASY.js → logout-DDC4QLVK.js} +3 -3
- package/dist/{manager-IETAVBZS.js → manager-TWVDSJXO.js} +17 -16
- package/dist/{manager-V2QCCPOJ.js → manager-UHWEKPXC.js} +8 -3
- package/dist/{media-treatment-MDAQRITV.js → media-treatment-N7MY5NXB.js} +34 -33
- package/dist/{media-use-4XXGABIL.js → media-use-JBN57JE3.js} +1 -1
- package/dist/{models-NZAOSI5A.js → models-WEMIMYBD.js} +25 -24
- package/dist/{motionShot-6ZDUM2K4.js → motionShot-RHICTVPU.js} +29 -26
- package/dist/{normalize-audio-7PRYX6QM.js → normalize-audio-ZFUZCJE3.js} +12 -12
- package/dist/{open-I254NY5J.js → open-IBJ4FL3G.js} +24 -24
- package/dist/{parakeetRunner-TL3TOGUS.js → parakeetRunner-XXO4WSLR.js} +26 -25
- package/dist/{pipeline-YPERVOQM.js → pipeline-6ML3LUVK.js} +19 -18
- package/dist/{play-MYI7BYKS.js → play-RV4NAVF5.js} +40 -38
- package/dist/{policies-5NTZOHJA.js → policies-XXNGXWHV.js} +1 -1
- package/dist/{preflight-HRCSZ52D.js → preflight-R3DEFMLA.js} +19 -18
- package/dist/{present-WYXQDV4Q.js → present-5TBJGE6B.js} +34 -33
- package/dist/{preview-535HTWQO.js → preview-FLKZ5CXJ.js} +56 -55
- package/dist/{producer-C76CRJ5O.js → producer-7XYSPVKH.js} +1 -1
- package/dist/{progress-I37JB7R4.js → progress-NHJIHAAG.js} +2 -2
- package/dist/{projectConfig-5QCNTGQT.js → projectConfig-TBU2VWZX.js} +9 -9
- package/dist/{publication-2QT7VVE2.js → publication-CWWUJYJ5.js} +5 -5
- package/dist/{publish-53EBL7OO.js → publish-FSNE4FEB.js} +28 -27
- package/dist/{refresh-MGCVWX56.js → refresh-RXTOPRBB.js} +3 -3
- package/dist/{remove-background-OBYHMPD4.js → remove-background-MDFWRWCT.js} +32 -31
- package/dist/render-DBGQZAZT.js +1516 -0
- package/dist/{render-3MELF6Y3.js → render-F4JQ553X.js} +102 -96
- package/dist/{render-75CRB3BW.js → render-LWZKXCLY.js} +8 -8
- package/dist/{render-batch-CEVWUYBP.js → render-batch-PU7NMLIJ.js} +8 -8
- package/dist/renderSetupWorker.js +12 -9
- package/dist/{resolver-4ICE2AT6.js → resolver-RUBGFXPC.js} +7 -7
- package/dist/{screenshotCapture-HXEZ3TNJ.js → screenshotCapture-UBY6TT75.js} +33 -6
- package/dist/{sherpa-L4UACXT3.js → sherpa-X2TBNO6P.js} +25 -24
- package/dist/{sites-3ZBYB5X4.js → sites-MAVH57MO.js} +2 -2
- package/dist/skills/hyperframes/references/review-loop.md +1 -1
- package/dist/{skills-DXTQPCAO.js → skills-WHKMWO2D.js} +17 -17
- package/dist/{skillsUpdateCheck-ULXRGLDU.js → skillsUpdateCheck-XQGZGJJG.js} +3 -3
- package/dist/{snapshot-PWFHQU5E.js → snapshot-M4NUUSNU.js} +73 -71
- package/dist/{src-RDSWHMJS.js → src-4UYM2K3S.js} +34 -26
- package/dist/{src-S7NVL5VF.js → src-6MSC62U2.js} +23 -19
- package/dist/{state-KAXGHF77.js → state-ORRPOLMQ.js} +2 -2
- package/dist/{staticProjectServer-GYPUQGI7.js → staticProjectServer-ERDTFP45.js} +21 -20
- package/dist/{status-BV7QAUQD.js → status-CM7IQTU2.js} +6 -6
- package/dist/studio/assets/{hyperframes-player-DcD3NXpX.js → hyperframes-player-DEncBxR7.js} +7 -2
- package/dist/studio/assets/{index-CFrZAwKo.js → index-BABXr78Q.js} +4 -4
- package/dist/studio/assets/{index-BIDKYk0h.js → index-Cc22mgvY.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-IXGX5ZFI.js → studio-api-SAKD3VKC.js} +18 -17
- package/dist/{studioServer-LA5Z7RSS.js → studioServer-IRI7EVOM.js} +91 -84
- package/dist/{telemetry-STEMAMAX.js → telemetry-F4XADVAF.js} +10 -10
- package/dist/{telemetry-CQYHCCPL.js → telemetry-QG5AANZ4.js} +1 -1
- package/dist/{timeline-KLD24EN6.js → timeline-5I444RRE.js} +42 -41
- package/dist/{tokens-ICLORAA4.js → tokens-LRRYM35A.js} +3 -3
- package/dist/{transcribe-A6IKK7VS.js → transcribe-44XDFNVU.js} +48 -47
- package/dist/{transcribe-CTHZLRXF.js → transcribe-WHYHWAB2.js} +20 -19
- package/dist/{tts-EDK3QS7M.js → tts-A2WILYGN.js} +6 -6
- package/dist/{updateCheck-FHCAAAXA.js → updateCheck-7CPH3CAZ.js} +2 -2
- package/dist/{upgrade-7EV4F2R7.js → upgrade-WW4GQ2RI.js} +3 -3
- package/dist/{urlDownloader-MIMGVASJ.js → urlDownloader-OHLLP45A.js} +13 -12
- package/dist/{validate-LZF46W3V.js → validate-VNCDH2LW.js} +40 -38
- package/dist/{video-ZC47NFOL.js → video-5OHTLL2D.js} +17 -14
- package/dist/warmCheck.js +228 -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/render-5BXTEEG7.js +0 -719
- package/dist/{synthesize-I2C24XJ5.js → synthesize-PKTB5ATG.js} +1 -1
|
@@ -19,7 +19,11 @@ import {
|
|
|
19
19
|
splitElementInHtml,
|
|
20
20
|
unwrapElementsFromHtml,
|
|
21
21
|
wrapElementsInHtml
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZRHO6YMM.js";
|
|
23
|
+
import {
|
|
24
|
+
MEDIA_LINK_ATTR,
|
|
25
|
+
relinkSplitHalves
|
|
26
|
+
} from "./chunk-6JR2XUEE.js";
|
|
23
27
|
import {
|
|
24
28
|
DEFAULT_TARGET_LUFS,
|
|
25
29
|
absoluteLoudnessPlan,
|
|
@@ -30,9 +34,19 @@ import {
|
|
|
30
34
|
resolveLocalAudioPath
|
|
31
35
|
} from "./chunk-TTVHYD5R.js";
|
|
32
36
|
import {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
HistoryBusyError,
|
|
38
|
+
MAX_WINDOW_IDLE_MS,
|
|
39
|
+
STUDIO_SIGNATURE_MANIFEST_PATHS,
|
|
40
|
+
UNDO_MODES,
|
|
41
|
+
clearFileWriteReceipt,
|
|
42
|
+
createProjectSignature,
|
|
43
|
+
createWriteToken,
|
|
44
|
+
fileContentVersion,
|
|
45
|
+
recordFileWriteReceipt,
|
|
46
|
+
resolveProjectAndSignature,
|
|
47
|
+
resolveProjectSignature,
|
|
48
|
+
settledFileTag
|
|
49
|
+
} from "./chunk-U6RXZNZE.js";
|
|
36
50
|
import {
|
|
37
51
|
PROXY_PARAMS_VERSION,
|
|
38
52
|
PROXY_PENDING_RETRY_AFTER_SECONDS,
|
|
@@ -54,21 +68,7 @@ import {
|
|
|
54
68
|
scanProjectMediaCodecMap,
|
|
55
69
|
shouldPrewarmProxy,
|
|
56
70
|
waitForProxy
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import {
|
|
59
|
-
HistoryBusyError,
|
|
60
|
-
MAX_WINDOW_IDLE_MS,
|
|
61
|
-
STUDIO_SIGNATURE_MANIFEST_PATHS,
|
|
62
|
-
UNDO_MODES,
|
|
63
|
-
clearFileWriteReceipt,
|
|
64
|
-
createProjectSignature,
|
|
65
|
-
createWriteToken,
|
|
66
|
-
fileContentVersion,
|
|
67
|
-
recordFileWriteReceipt,
|
|
68
|
-
resolveProjectAndSignature,
|
|
69
|
-
resolveProjectSignature,
|
|
70
|
-
settledFileTag
|
|
71
|
-
} from "./chunk-ICMXC3MI.js";
|
|
71
|
+
} from "./chunk-SN7KI5JA.js";
|
|
72
72
|
import {
|
|
73
73
|
STUDIO_MOTION_PATH,
|
|
74
74
|
createStudioMotionRenderBodyScript,
|
|
@@ -84,6 +84,11 @@ import {
|
|
|
84
84
|
findTimelineScript,
|
|
85
85
|
parseGsapScriptAcorn
|
|
86
86
|
} from "./chunk-5CS4T6C6.js";
|
|
87
|
+
import {
|
|
88
|
+
atomicTempPath,
|
|
89
|
+
createFileAtomically,
|
|
90
|
+
replaceFileAtomically
|
|
91
|
+
} from "./chunk-EOVYQ3IG.js";
|
|
87
92
|
import {
|
|
88
93
|
parseEncoderOptions
|
|
89
94
|
} from "./chunk-KLIKCX6Q.js";
|
|
@@ -96,16 +101,6 @@ import {
|
|
|
96
101
|
fontDirectories,
|
|
97
102
|
locateSystemFont
|
|
98
103
|
} from "./chunk-7FMUTGOH.js";
|
|
99
|
-
import {
|
|
100
|
-
atomicTempPath,
|
|
101
|
-
createFileAtomically,
|
|
102
|
-
replaceFileAtomically
|
|
103
|
-
} from "./chunk-EOVYQ3IG.js";
|
|
104
|
-
import {
|
|
105
|
-
addScenePartsManifest,
|
|
106
|
-
ensureHfIds,
|
|
107
|
-
stampHfIdsInPlace
|
|
108
|
-
} from "./chunk-4IEH6EAC.js";
|
|
109
104
|
import {
|
|
110
105
|
PREVIEW_PROXY_BOX_PARAM,
|
|
111
106
|
formatPreviewProxyBox,
|
|
@@ -114,7 +109,12 @@ import {
|
|
|
114
109
|
motionPathPluginUrl,
|
|
115
110
|
parseFps,
|
|
116
111
|
parsePreviewProxyBox
|
|
117
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-J3QM7AHP.js";
|
|
113
|
+
import {
|
|
114
|
+
addScenePartsManifest,
|
|
115
|
+
ensureHfIds,
|
|
116
|
+
stampHfIdsInPlace
|
|
117
|
+
} from "./chunk-YALM6XN4.js";
|
|
118
118
|
import {
|
|
119
119
|
AFTER_FONTS_SCRIPT_TYPE,
|
|
120
120
|
RUNTIME_BOOTSTRAP_ATTR,
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
resolveRateSpec,
|
|
129
129
|
sourceTimeAt,
|
|
130
130
|
stripEmbeddedRuntimeScripts
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-R2SQBPMH.js";
|
|
132
132
|
import {
|
|
133
133
|
HTML_ATTRIBUTE_ENTITIES,
|
|
134
134
|
MagicString,
|
|
@@ -145,17 +145,17 @@ import {
|
|
|
145
145
|
mkdirWithinProject,
|
|
146
146
|
realpath
|
|
147
147
|
} from "./chunk-OFQWTKPW.js";
|
|
148
|
-
import {
|
|
149
|
-
isWithinProjectRoot,
|
|
150
|
-
readProjectFile
|
|
151
|
-
} from "./chunk-6BNTGNGD.js";
|
|
152
148
|
import {
|
|
153
149
|
FFPROBE_PATH_ENV,
|
|
154
150
|
findFfBinary
|
|
155
151
|
} from "./chunk-VAS6HQX3.js";
|
|
152
|
+
import {
|
|
153
|
+
isWithinProjectRoot,
|
|
154
|
+
readProjectFile
|
|
155
|
+
} from "./chunk-6BNTGNGD.js";
|
|
156
156
|
import {
|
|
157
157
|
sameInstant
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-MMQ52NIZ.js";
|
|
159
159
|
import {
|
|
160
160
|
decodeCssEscapes,
|
|
161
161
|
decodeWellFormedEscapes,
|
|
@@ -306,7 +306,7 @@ function clearElementScreenshotIsolation() {
|
|
|
306
306
|
page.__hfThumbnailFaded = [];
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
// ../studio-server/dist/chunk-
|
|
309
|
+
// ../studio-server/dist/chunk-T5CGF7VZ.js
|
|
310
310
|
import { resolve } from "path";
|
|
311
311
|
function isAutoProxyEnabled(adapter) {
|
|
312
312
|
return adapter.autoProxy !== false;
|
|
@@ -3731,11 +3731,11 @@ function registerProjectRoutes(api, adapter) {
|
|
|
3731
3731
|
});
|
|
3732
3732
|
}
|
|
3733
3733
|
var MIME_TYPES = {
|
|
3734
|
-
".html": "text/html",
|
|
3735
|
-
".css": "text/css",
|
|
3736
|
-
".js": "text/javascript",
|
|
3737
|
-
".mjs": "text/javascript",
|
|
3738
|
-
".json": "application/json",
|
|
3734
|
+
".html": "text/html; charset=utf-8",
|
|
3735
|
+
".css": "text/css; charset=utf-8",
|
|
3736
|
+
".js": "text/javascript; charset=utf-8",
|
|
3737
|
+
".mjs": "text/javascript; charset=utf-8",
|
|
3738
|
+
".json": "application/json; charset=utf-8",
|
|
3739
3739
|
".svg": "image/svg+xml",
|
|
3740
3740
|
".png": "image/png",
|
|
3741
3741
|
".jpg": "image/jpeg",
|
|
@@ -5499,7 +5499,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
|
5499
5499
|
let block = extractGsapScriptBlock(html);
|
|
5500
5500
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
5501
5501
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
5502
|
-
const { GSAP_CDN } = await import("./dist-
|
|
5502
|
+
const { GSAP_CDN } = await import("./dist-DYS24AMA.js");
|
|
5503
5503
|
const bootstrap = [
|
|
5504
5504
|
`<script src="${GSAP_CDN}"></script>`,
|
|
5505
5505
|
"<script>",
|
|
@@ -8302,18 +8302,18 @@ var ThumbnailGenerationCoordinator = class {
|
|
|
8302
8302
|
var thumbnailGenerationCoordinator = new ThumbnailGenerationCoordinator(1);
|
|
8303
8303
|
var MAX_SOURCE_BYTES = 64 * 1024 * 1024;
|
|
8304
8304
|
var MAX_CACHE_BYTES = 8 * 1024 * 1024;
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8305
|
+
function retryingSharpLoader(adapter) {
|
|
8306
|
+
let loaded;
|
|
8307
|
+
let warned = false;
|
|
8308
|
+
const load = () => adapter.loadSharp?.() ?? import("sharp").then((module) => module.default);
|
|
8309
|
+
return () => loaded ??= load().catch((error) => {
|
|
8310
|
+
loaded = void 0;
|
|
8311
|
+
if (!warned) console.warn("[Studio] JPEG thumbnails are off: sharp could not load:", error);
|
|
8312
|
+
warned = true;
|
|
8313
|
+
throw error;
|
|
8314
|
+
});
|
|
8315
8315
|
}
|
|
8316
|
-
async function generateThumbnail(path, signal) {
|
|
8316
|
+
async function generateThumbnail(loadSharp, path, signal) {
|
|
8317
8317
|
const sharp = await loadSharp();
|
|
8318
8318
|
const file = await open(path, "r");
|
|
8319
8319
|
try {
|
|
@@ -8354,6 +8354,7 @@ async function resolveSource(adapter, id, url) {
|
|
|
8354
8354
|
}
|
|
8355
8355
|
function registerImageThumbnailRoutes(api, adapter) {
|
|
8356
8356
|
const coordinator = new ThumbnailGenerationCoordinator(2);
|
|
8357
|
+
const loadSharp = retryingSharpLoader(adapter);
|
|
8357
8358
|
const cache = /* @__PURE__ */ new Map();
|
|
8358
8359
|
let cacheBytes = 0;
|
|
8359
8360
|
const remember = (key, image) => {
|
|
@@ -8382,7 +8383,7 @@ function registerImageThumbnailRoutes(api, adapter) {
|
|
|
8382
8383
|
else {
|
|
8383
8384
|
if (coordinator.protectedKeys().size >= 32) return c.text("thumbnail queue full", 429);
|
|
8384
8385
|
result = await coordinator.acquire(key, c.req.raw.signal, async (signal) => {
|
|
8385
|
-
const image = await generateThumbnail(path, signal);
|
|
8386
|
+
const image = await generateThumbnail(loadSharp, path, signal);
|
|
8386
8387
|
remember(key, image);
|
|
8387
8388
|
return image;
|
|
8388
8389
|
}) ?? void 0;
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
} from "./chunk-442JNXRM.js";
|
|
13
13
|
import {
|
|
14
14
|
failCommand
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JVBRJMOP.js";
|
|
16
16
|
import {
|
|
17
17
|
c
|
|
18
18
|
} from "./chunk-ZTZA4UWZ.js";
|
|
19
19
|
import {
|
|
20
20
|
formatVariableValidationIssue,
|
|
21
21
|
validateVariables
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-J3QM7AHP.js";
|
|
23
23
|
import {
|
|
24
24
|
extractCompositionMetadata
|
|
25
25
|
} from "./chunk-YMS5FOMC.js";
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getMimeType,
|
|
9
9
|
injectMediaCodecMapIntoHtml
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3QVMJ7GX.js";
|
|
11
11
|
import {
|
|
12
12
|
PROXY_VARIANT_CONFIG,
|
|
13
13
|
ProxyCapacityError,
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
recordProxyRequest,
|
|
19
19
|
resolveProxy,
|
|
20
20
|
resolveProxyVariantRequest
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SN7KI5JA.js";
|
|
22
22
|
import {
|
|
23
23
|
resolveAutoProxy
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-PFYWVUHA.js";
|
|
25
25
|
import {
|
|
26
26
|
decodeWellFormedEscapes
|
|
27
27
|
} from "./chunk-BSQ7XANM.js";
|
|
@@ -183,7 +183,7 @@ async function serveStaticProjectHtml(projectDir, html, bindErrorMessage = "Fail
|
|
|
183
183
|
const server = createServer((req, res) => {
|
|
184
184
|
const url = req.url ?? "/";
|
|
185
185
|
if (url === "/" || url === "/index.html") {
|
|
186
|
-
res.writeHead(200, { "Content-Type": "
|
|
186
|
+
res.writeHead(200, { "Content-Type": getMimeType("index.html") });
|
|
187
187
|
res.end(servedHtml);
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
|
|
8
8
|
// src/version.ts
|
|
9
|
-
var VERSION = true ? "0.8.
|
|
10
|
-
var PRODUCER_VERSION = true ? "0.8.
|
|
9
|
+
var VERSION = true ? "0.8.184" : "0.0.0-dev";
|
|
10
|
+
var PRODUCER_VERSION = true ? "0.8.184" : "0.0.0-dev";
|
|
11
11
|
|
|
12
12
|
export {
|
|
13
13
|
VERSION,
|
|
@@ -69,6 +69,13 @@ function pickSharedShell(versions, shell) {
|
|
|
69
69
|
}
|
|
70
70
|
return void 0;
|
|
71
71
|
}
|
|
72
|
+
function browserPathFromEnv(env = process.env) {
|
|
73
|
+
for (const name of ["HYPERFRAMES_BROWSER_PATH", "PRODUCER_HEADLESS_SHELL_PATH"]) {
|
|
74
|
+
const path = env[name];
|
|
75
|
+
if (path) return { name, path };
|
|
76
|
+
}
|
|
77
|
+
return void 0;
|
|
78
|
+
}
|
|
72
79
|
|
|
73
80
|
export {
|
|
74
81
|
chromeMajorCeiling,
|
|
@@ -76,5 +83,6 @@ export {
|
|
|
76
83
|
managedChromeVersion,
|
|
77
84
|
isManagedChromeDir,
|
|
78
85
|
compareBrowserVersionsDescending,
|
|
79
|
-
pickSharedShell
|
|
86
|
+
pickSharedShell,
|
|
87
|
+
browserPathFromEnv
|
|
80
88
|
};
|
|
@@ -10,12 +10,21 @@ import {
|
|
|
10
10
|
|
|
11
11
|
// src/cloud/upload.ts
|
|
12
12
|
import { createHash } from "crypto";
|
|
13
|
+
import { createReadStream } from "fs";
|
|
14
|
+
import { request as httpRequest } from "http";
|
|
15
|
+
import { request as httpsRequest } from "https";
|
|
16
|
+
import { pipeline } from "stream/promises";
|
|
13
17
|
var COMPLETE_MAX_RETRIES = 5;
|
|
14
18
|
var COMPLETE_RETRY_BASE_MS = 500;
|
|
15
19
|
var CONTENT_TYPE_ZIP = "application/zip";
|
|
16
20
|
function sha256Hex(bytes) {
|
|
17
21
|
return createHash("sha256").update(bytes).digest("hex");
|
|
18
22
|
}
|
|
23
|
+
async function sha256OfFile(path) {
|
|
24
|
+
const hash = createHash("sha256");
|
|
25
|
+
for await (const chunk of createReadStream(path)) hash.update(chunk);
|
|
26
|
+
return hash.digest("hex");
|
|
27
|
+
}
|
|
19
28
|
function sleep(ms) {
|
|
20
29
|
return new Promise((r) => setTimeout(r, ms));
|
|
21
30
|
}
|
|
@@ -27,15 +36,16 @@ function normalizeUploadHeaders(raw) {
|
|
|
27
36
|
}
|
|
28
37
|
return out;
|
|
29
38
|
}
|
|
30
|
-
async function putBytesToPresignedUrl(fetchImpl, uploadUrl, uploadHeaders,
|
|
39
|
+
async function putBytesToPresignedUrl(fetchImpl, uploadUrl, uploadHeaders, body, contentType) {
|
|
31
40
|
const headers = {
|
|
32
41
|
"content-type": contentType,
|
|
33
42
|
...normalizeUploadHeaders(uploadHeaders)
|
|
34
43
|
};
|
|
44
|
+
if (!(body instanceof Uint8Array)) return putFileToPresignedUrl(uploadUrl, headers, body);
|
|
35
45
|
const res = await fetchImpl(uploadUrl, {
|
|
36
46
|
method: "PUT",
|
|
37
47
|
headers,
|
|
38
|
-
body
|
|
48
|
+
body
|
|
39
49
|
});
|
|
40
50
|
if (!res.ok) {
|
|
41
51
|
const detail = await res.text().catch(() => "");
|
|
@@ -44,6 +54,36 @@ async function putBytesToPresignedUrl(fetchImpl, uploadUrl, uploadHeaders, bytes
|
|
|
44
54
|
);
|
|
45
55
|
}
|
|
46
56
|
}
|
|
57
|
+
async function putFileToPresignedUrl(uploadUrl, headers, file) {
|
|
58
|
+
const send = new URL(uploadUrl).protocol === "https:" ? httpsRequest : httpRequest;
|
|
59
|
+
const req = send(uploadUrl, {
|
|
60
|
+
method: "PUT",
|
|
61
|
+
headers: { ...headers, "content-length": String(file.size) }
|
|
62
|
+
});
|
|
63
|
+
const response = new Promise((resolve, reject) => {
|
|
64
|
+
req.once("response", resolve).once("error", reject);
|
|
65
|
+
});
|
|
66
|
+
const sent = pipeline(createReadStream(file.path), req);
|
|
67
|
+
let res;
|
|
68
|
+
try {
|
|
69
|
+
res = await response;
|
|
70
|
+
} catch (err) {
|
|
71
|
+
await sent.catch(() => void 0);
|
|
72
|
+
throw err;
|
|
73
|
+
}
|
|
74
|
+
const status = res.statusCode ?? 0;
|
|
75
|
+
const ok = status >= 200 && status < 300;
|
|
76
|
+
await sent.catch((err) => {
|
|
77
|
+
if (ok) throw err;
|
|
78
|
+
});
|
|
79
|
+
let detail = "";
|
|
80
|
+
for await (const chunk of res) detail += String(chunk);
|
|
81
|
+
if (!ok) {
|
|
82
|
+
throw new Error(
|
|
83
|
+
`Direct upload PUT failed: ${status} ${res.statusMessage ?? ""}${detail ? ` \u2014 ${detail.slice(0, 300)}` : ""}`
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
47
87
|
async function completeWithRetry(client, asset_id, checksum_sha256) {
|
|
48
88
|
let lastErr;
|
|
49
89
|
for (let attempt = 0; attempt < COMPLETE_MAX_RETRIES; attempt++) {
|
|
@@ -65,9 +105,10 @@ async function completeWithRetry(client, asset_id, checksum_sha256) {
|
|
|
65
105
|
}
|
|
66
106
|
async function uploadAssetViaDirectUpload(opts) {
|
|
67
107
|
const start = Date.now();
|
|
68
|
-
const {
|
|
69
|
-
const
|
|
70
|
-
const
|
|
108
|
+
const { filename, idempotencyKey } = opts;
|
|
109
|
+
const body = "bytes" in opts ? opts.bytes : { path: opts.path, size: opts.size };
|
|
110
|
+
const size_bytes = body instanceof Uint8Array ? body.byteLength : body.size;
|
|
111
|
+
const checksum_sha256 = body instanceof Uint8Array ? sha256Hex(body) : await sha256OfFile(body.path);
|
|
71
112
|
const fetchImpl = opts.fetchImpl ?? fetch;
|
|
72
113
|
opts.onProgress?.({ phase: "initialize" });
|
|
73
114
|
const initialize = await opts.client.createAssetUpload({
|
|
@@ -79,7 +120,7 @@ async function uploadAssetViaDirectUpload(opts) {
|
|
|
79
120
|
fetchImpl,
|
|
80
121
|
initialize.upload_url,
|
|
81
122
|
initialize.upload_headers,
|
|
82
|
-
|
|
123
|
+
body,
|
|
83
124
|
opts.contentType
|
|
84
125
|
);
|
|
85
126
|
opts.onProgress?.({ phase: "upload", percent: 100 });
|
|
@@ -87,6 +128,7 @@ async function uploadAssetViaDirectUpload(opts) {
|
|
|
87
128
|
const completed = await completeWithRetry(opts.client, initialize.asset_id, checksum_sha256);
|
|
88
129
|
return {
|
|
89
130
|
asset_id: completed.asset_id,
|
|
131
|
+
url: completed.url,
|
|
90
132
|
size_bytes,
|
|
91
133
|
duration_ms: Date.now() - start
|
|
92
134
|
};
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
sanitizeSuccessfulExitCode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JVBRJMOP.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/render-success-state.ts
|
|
12
12
|
var renderSucceeded = false;
|
|
@@ -8,13 +8,16 @@ import {
|
|
|
8
8
|
ensureCaptureDirSync,
|
|
9
9
|
writeCaptureFileSync
|
|
10
10
|
} from "./chunk-MRF4AMKD.js";
|
|
11
|
+
import {
|
|
12
|
+
loadSharp
|
|
13
|
+
} from "./chunk-QH3T4WI2.js";
|
|
11
14
|
import {
|
|
12
15
|
createCaptureDownloadBudget,
|
|
13
16
|
readBoundedResponse
|
|
14
17
|
} from "./chunk-AWDFDFI3.js";
|
|
15
18
|
import {
|
|
16
19
|
isBlockedNetworkHost
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RGXVEYHI.js";
|
|
18
21
|
import {
|
|
19
22
|
DOMParser,
|
|
20
23
|
parseHTML
|
|
@@ -24,10 +27,14 @@ import {
|
|
|
24
27
|
var CAPTURE_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36";
|
|
25
28
|
|
|
26
29
|
// src/capture/publicNetwork.ts
|
|
27
|
-
import {
|
|
30
|
+
import { execFile } from "child_process";
|
|
31
|
+
import { promises as dns } from "dns";
|
|
32
|
+
import { readFile } from "fs/promises";
|
|
28
33
|
import { isIP } from "net";
|
|
29
34
|
import { request as httpRequest } from "http";
|
|
30
35
|
import { request as httpsRequest } from "https";
|
|
36
|
+
var DNS_TIMEOUT_MS = 1e4;
|
|
37
|
+
var CARES_TIMEOUT_MS = 5e3;
|
|
31
38
|
function ipv4Number(address) {
|
|
32
39
|
return address.split(".").reduce((value, octet) => value * 256 + Number(octet), 0);
|
|
33
40
|
}
|
|
@@ -64,25 +71,98 @@ async function resolvePublicAddress(hostname) {
|
|
|
64
71
|
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("-"))) {
|
|
65
72
|
throw new Error("Capture requires a public hostname");
|
|
66
73
|
}
|
|
74
|
+
const answers = await resolveIPv4(host);
|
|
75
|
+
const first = answers[0];
|
|
76
|
+
if (!first || !answers.every(isPublicIPv4)) {
|
|
77
|
+
throw new Error("Capture DNS returned a non-public address");
|
|
78
|
+
}
|
|
79
|
+
return first;
|
|
80
|
+
}
|
|
81
|
+
async function resolveIPv4(host) {
|
|
82
|
+
const fromHostsFile = (await hostsFileAnswers()).get(host);
|
|
83
|
+
if (fromHostsFile) return fromHostsFile;
|
|
84
|
+
const deadline = Date.now() + DNS_TIMEOUT_MS;
|
|
85
|
+
const fromSystem = systemAnswers.get(host);
|
|
86
|
+
if (fromSystem) return beforeDeadline(fromSystem, deadline);
|
|
87
|
+
return resolveWithCares(host).catch(
|
|
88
|
+
() => beforeDeadline(systemLookupInKillableChild(host, deadline - Date.now()), deadline)
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
var hostsFile;
|
|
92
|
+
function hostsFileAnswers() {
|
|
93
|
+
const path = process.platform === "win32" ? `${process.env.SystemRoot ?? "C:\\Windows"}\\System32\\drivers\\etc\\hosts` : "/etc/hosts";
|
|
94
|
+
hostsFile ??= readFile(path, "utf8").then(parseHostsFile, () => /* @__PURE__ */ new Map());
|
|
95
|
+
return hostsFile;
|
|
96
|
+
}
|
|
97
|
+
function parseHostsFile(text) {
|
|
98
|
+
const answers = /* @__PURE__ */ new Map();
|
|
99
|
+
for (const line of text.split(/\r?\n/)) {
|
|
100
|
+
const [address, ...names] = line.replace(/#.*/, "").trim().split(/\s+/);
|
|
101
|
+
if (!address || isIP(address) !== 4) continue;
|
|
102
|
+
for (const name of names) {
|
|
103
|
+
const key = name.toLowerCase().replace(/\.$/, "");
|
|
104
|
+
answers.set(key, [...answers.get(key) ?? [], address]);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return answers;
|
|
108
|
+
}
|
|
109
|
+
function beforeDeadline(work, deadline) {
|
|
67
110
|
let timer;
|
|
111
|
+
const late = new Promise((_resolve, reject) => {
|
|
112
|
+
timer = setTimeout(
|
|
113
|
+
() => reject(new Error("Capture DNS timed out")),
|
|
114
|
+
Math.max(0, deadline - Date.now())
|
|
115
|
+
);
|
|
116
|
+
});
|
|
117
|
+
return Promise.race([work, late]).finally(() => clearTimeout(timer));
|
|
118
|
+
}
|
|
119
|
+
async function resolveWithCares(host) {
|
|
120
|
+
const cancellableResolver = new dns.Resolver();
|
|
121
|
+
const timer = setTimeout(() => cancellableResolver.cancel(), CARES_TIMEOUT_MS);
|
|
68
122
|
try {
|
|
69
|
-
|
|
70
|
-
lookup(host, { all: true, family: 4, verbatim: true }),
|
|
71
|
-
new Promise((_resolve, reject) => {
|
|
72
|
-
timer = setTimeout(() => reject(new Error("Capture DNS timed out")), 1e4);
|
|
73
|
-
timer.unref();
|
|
74
|
-
})
|
|
75
|
-
]);
|
|
76
|
-
if (!answers[0] || answers.some((answer) => answer.family !== 4 || !isPublicIPv4(answer.address))) {
|
|
77
|
-
throw new Error("Capture DNS returned a non-public address");
|
|
78
|
-
}
|
|
79
|
-
const first = answers[0];
|
|
80
|
-
if (!first) throw new Error("Capture DNS returned no address");
|
|
81
|
-
return first.address;
|
|
123
|
+
return await cancellableResolver.resolve4(host);
|
|
82
124
|
} finally {
|
|
83
125
|
clearTimeout(timer);
|
|
84
126
|
}
|
|
85
127
|
}
|
|
128
|
+
var systemAnswers = /* @__PURE__ */ new Map();
|
|
129
|
+
var SYSTEM_LOOKUP = `require("node:dns").lookup(process.argv[1], { all: true, family: 4 }, (error, answers) =>
|
|
130
|
+
error ? process.stderr.write(String(error.code)) : process.stdout.write(JSON.stringify(answers.map((a) => a.address))))`;
|
|
131
|
+
var liveLookups = /* @__PURE__ */ new Set();
|
|
132
|
+
function systemLookupInKillableChild(host, timeoutMs) {
|
|
133
|
+
if (!process.listeners("exit").includes(killLiveLookups)) process.on("exit", killLiveLookups);
|
|
134
|
+
const answers = new Promise((resolve, reject) => {
|
|
135
|
+
const child = execFile(
|
|
136
|
+
process.execPath,
|
|
137
|
+
["-e", SYSTEM_LOOKUP, host],
|
|
138
|
+
{
|
|
139
|
+
timeout: Math.max(1, timeoutMs),
|
|
140
|
+
killSignal: "SIGKILL",
|
|
141
|
+
windowsHide: true,
|
|
142
|
+
env: { ...process.env, NODE_OPTIONS: "" }
|
|
143
|
+
},
|
|
144
|
+
(error, stdout, stderr) => {
|
|
145
|
+
if (error?.killed) reject(new Error("Capture DNS timed out"));
|
|
146
|
+
else if (!stdout) reject(new Error(`Capture DNS failed: ${stderr || error?.message}`));
|
|
147
|
+
else {
|
|
148
|
+
try {
|
|
149
|
+
resolve(JSON.parse(stdout));
|
|
150
|
+
} catch (parseError) {
|
|
151
|
+
reject(parseError);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
liveLookups.add(child);
|
|
157
|
+
child.once("exit", () => liveLookups.delete(child));
|
|
158
|
+
});
|
|
159
|
+
systemAnswers.set(host, answers);
|
|
160
|
+
answers.catch(() => systemAnswers.delete(host));
|
|
161
|
+
return answers;
|
|
162
|
+
}
|
|
163
|
+
function killLiveLookups() {
|
|
164
|
+
for (const child of liveLookups) child.kill("SIGKILL");
|
|
165
|
+
}
|
|
86
166
|
async function publicRequest(url, init = {}) {
|
|
87
167
|
const target = new URL(url);
|
|
88
168
|
if (!["http:", "https:"].includes(target.protocol) || target.username || target.password) {
|
|
@@ -245,7 +325,6 @@ function rankIconCandidates(candidates) {
|
|
|
245
325
|
}
|
|
246
326
|
|
|
247
327
|
// src/capture/iconClassifier.ts
|
|
248
|
-
import sharp from "sharp";
|
|
249
328
|
var NON_PAINTING = /* @__PURE__ */ new Set(["defs", "clippath", "mask", "style", "title", "desc", "metadata"]);
|
|
250
329
|
var PAINTING = /* @__PURE__ */ new Set(["rect", "circle", "ellipse", "path", "polygon", "image", "use"]);
|
|
251
330
|
function firstPaintedElement(root) {
|
|
@@ -317,6 +396,7 @@ var SAMPLE_EDGE = 32;
|
|
|
317
396
|
async function classifyRasterIcon(buffer) {
|
|
318
397
|
let data;
|
|
319
398
|
let channels;
|
|
399
|
+
const sharp = await loadSharp("website capture");
|
|
320
400
|
try {
|
|
321
401
|
const raw = await sharp(buffer).resize(SAMPLE_EDGE, SAMPLE_EDGE, { fit: "fill" }).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
|
|
322
402
|
data = raw.data;
|
|
@@ -399,7 +479,6 @@ function captureFontFilename(url, extension, used = /* @__PURE__ */ new Set()) {
|
|
|
399
479
|
}
|
|
400
480
|
|
|
401
481
|
// src/capture/captureImageValidation.ts
|
|
402
|
-
import sharp2 from "sharp";
|
|
403
482
|
import { parse, walk } from "css-tree";
|
|
404
483
|
var SVG_ELEMENTS = new Set(
|
|
405
484
|
"svg g defs title desc metadata path rect circle ellipse line polyline polygon text tspan textPath use symbol image clipPath mask pattern marker linearGradient radialGradient stop filter feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence style".toLowerCase().split(" ")
|
|
@@ -475,8 +554,9 @@ function validIconEntry(size, offset, directoryEnd, length) {
|
|
|
475
554
|
async function validIconImage(bytes) {
|
|
476
555
|
const png = bytes.subarray(0, 8).equals(Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]));
|
|
477
556
|
if (!png) return validIconBitmap(bytes);
|
|
557
|
+
const sharp = await loadSharp("website capture");
|
|
478
558
|
try {
|
|
479
|
-
await
|
|
559
|
+
await sharp(bytes, { limitInputPixels: 65536 }).resize(1, 1).raw().toBuffer();
|
|
480
560
|
return true;
|
|
481
561
|
} catch {
|
|
482
562
|
return false;
|
|
@@ -500,10 +580,11 @@ function validIconDimensions(width, height) {
|
|
|
500
580
|
}
|
|
501
581
|
async function captureImageExtension(bytes) {
|
|
502
582
|
if (await validIco(bytes)) return ".ico";
|
|
583
|
+
const sharp = await loadSharp("website capture");
|
|
503
584
|
try {
|
|
504
585
|
const embedded = /* @__PURE__ */ new Set();
|
|
505
586
|
if (/^\s*</.test(bytes.toString("utf8", 0, 256)) && !passiveSvg(bytes, embedded)) return null;
|
|
506
|
-
const image =
|
|
587
|
+
const image = sharp(bytes, { limitInputPixels: 4e7 });
|
|
507
588
|
const metadata = await image.metadata();
|
|
508
589
|
if (metadata.format === "svg") {
|
|
509
590
|
if (!passiveSvg(bytes, embedded) || !await validEmbeddedImages(embedded)) return null;
|
|
@@ -527,6 +608,7 @@ async function captureImageExtension(bytes) {
|
|
|
527
608
|
}
|
|
528
609
|
}
|
|
529
610
|
async function validEmbeddedImages(references) {
|
|
611
|
+
const sharp = await loadSharp("website capture");
|
|
530
612
|
let remainingBytes = 10 * 1024 * 1024;
|
|
531
613
|
let remainingPixels = 4e7;
|
|
532
614
|
for (const reference of references) {
|
|
@@ -537,7 +619,7 @@ async function validEmbeddedImages(references) {
|
|
|
537
619
|
const bytes = Buffer.from(encoded, "base64");
|
|
538
620
|
remainingBytes -= bytes.length;
|
|
539
621
|
if (remainingBytes < 0) return false;
|
|
540
|
-
const image =
|
|
622
|
+
const image = sharp(bytes, { limitInputPixels: remainingPixels });
|
|
541
623
|
const metadata = await image.metadata();
|
|
542
624
|
if (metadata.format !== type || !metadata.width || !metadata.height) return false;
|
|
543
625
|
const pixels = metadata.width * metadata.height * (metadata.pages ?? 1);
|
|
@@ -693,6 +775,7 @@ async function downloadDeclaredIcons(faviconLinks, outputDir, drops, options) {
|
|
|
693
775
|
return { assets, manifest };
|
|
694
776
|
}
|
|
695
777
|
async function downloadAssets(tokens, outputDir, catalogedAssets, faviconLinks, options = {}) {
|
|
778
|
+
await loadSharp("website capture");
|
|
696
779
|
options = { ...options, byteBudget: options.byteBudget ?? createCaptureDownloadBudget() };
|
|
697
780
|
const assetsDir = join(outputDir, "assets");
|
|
698
781
|
ensureCaptureDirSync(outputDir, assetsDir);
|
|
@@ -6,16 +6,16 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
detectGpuEncoder
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
detectWsl
|
|
12
|
-
} from "./chunk-W2LGJSEN.js";
|
|
9
|
+
} from "./chunk-RGXVEYHI.js";
|
|
13
10
|
import {
|
|
14
11
|
runCancellableProcess
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DYAPHNV6.js";
|
|
16
13
|
import {
|
|
17
14
|
findFfBinary
|
|
18
15
|
} from "./chunk-VAS6HQX3.js";
|
|
16
|
+
import {
|
|
17
|
+
detectWsl
|
|
18
|
+
} from "./chunk-W2LGJSEN.js";
|
|
19
19
|
|
|
20
20
|
// src/browser/linuxDeps.ts
|
|
21
21
|
import { execFileSync } from "child_process";
|