hyperframes 0.8.205 → 0.8.207
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/hyperframes.mjs +1 -0
- package/dist/{add-BA4AU262.js → add-LXFWHBE3.js} +19 -18
- package/dist/{agentPromptGenerator-KYO5MKTW.js → agentPromptGenerator-D2E62ZP5.js} +1 -1
- package/dist/{animatedGifPrep-UNUCFGLQ.js → animatedGifPrep-VBPJZKFT.js} +21 -15
- package/dist/api.js +31 -31
- package/dist/{appHistory-QVCSAOI4.js → appHistory-HIBH6XZW.js} +3 -1
- package/dist/{asset-KCDVTNC3.js → asset-JX4RW3GO.js} +2 -2
- package/dist/{assetCataloger-5FCVQ3N6.js → assetCataloger-JKKOPBCF.js} +15 -14
- package/dist/{audio-KDBPEHRS.js → audio-OXQ3L6DW.js} +24 -24
- package/dist/{auth-IMPBZZXJ.js → auth-JAL7P7ZA.js} +1 -1
- package/dist/{autoUpdate-YE2RKCAG.js → autoUpdate-MRI2AICE.js} +2 -2
- package/dist/{backgroundChecks-OWY2UFSR.js → backgroundChecks-ORR46PBY.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-AN4HWKET.js → batchRender-IFZYPGIW.js} +9 -9
- package/dist/{beats-VTQJ4JH6.js → beats-UDLOEW6U.js} +21 -21
- package/dist/{benchmark-PBEWHJ5K.js → benchmark-VTVDNKSO.js} +14 -14
- package/dist/{browser-E7ANEHNU.js → browser-QJC4BL2Y.js} +6 -6
- package/dist/{bundleWithLocalizedFonts-I3BWMRSP.js → bundleWithLocalizedFonts-Z2JTBNDS.js} +2 -2
- package/dist/{capture-MP7R72WU.js → capture-2P4JERSX.js} +14 -3
- package/dist/{capture-XODFC4S4.js → capture-GLM2ACPM.js} +81 -41
- package/dist/{captureCompositionFrame-2OYGVDI3.js → captureCompositionFrame-A2A5MGQB.js} +19 -19
- package/dist/{captureFile-LYOJOUIE.js → captureFile-RPUEOZO6.js} +1 -1
- package/dist/{catalog-ORVCCEQR.js → catalog-5ZLVUQVJ.js} +25 -24
- package/dist/{catch-up-SYAQOXTT.js → catch-up-FRMVYJHZ.js} +5 -5
- package/dist/{check-6SQR6SSA.js → check-WVY7SM7C.js} +50 -48
- package/dist/checkAudio-PLEQY3SZ.js +201 -0
- package/dist/{checkBrowser-HOTD3CDE.js → checkBrowser-XSZUA2DQ.js} +42 -41
- package/dist/{chunk-JFNB4CMI.js → chunk-526VSRZ4.js} +20 -8
- package/dist/{chunk-DQBY7FRR.js → chunk-543U46OR.js} +4 -1
- package/dist/{chunk-CUGADCIV.js → chunk-5KBMYSF2.js} +54 -15
- package/dist/{chunk-2ST4WAFY.js → chunk-5PCALX6G.js} +13 -1
- package/dist/{chunk-TZ7MTRVJ.js → chunk-5PYRU5DT.js} +13 -13
- package/dist/{chunk-AYH5ANVS.js → chunk-5YHQBCWH.js} +52 -3
- package/dist/{chunk-KBZSMKKD.js → chunk-63DP5CB2.js} +29 -3
- package/dist/{chunk-GLBEBBS2.js → chunk-6IYIS2U7.js} +2 -2
- package/dist/{chunk-GSTFETKE.js → chunk-6KCFVLO6.js} +5 -5
- package/dist/{chunk-EXRHI43B.js → chunk-6KOHY5EP.js} +10 -9
- package/dist/{chunk-CU76YDPX.js → chunk-6Z7XDUUJ.js} +1 -1
- package/dist/{chunk-XNAIYEKD.js → chunk-7PJ3AJB2.js} +1 -1
- package/dist/{chunk-6GAYBX5C.js → chunk-7RWUY3BJ.js} +64 -62
- package/dist/{chunk-3CISA3OS.js → chunk-AF3L5JJX.js} +1 -1
- package/dist/chunk-BDJIQZN2.js +4830 -0
- package/dist/{chunk-75WNFDRU.js → chunk-C53ZNJDZ.js} +4 -4
- package/dist/{chunk-GBQCTZON.js → chunk-CVZO6TFE.js} +13 -43
- package/dist/{chunk-RQDVTUVD.js → chunk-DJQZ7DEH.js} +15 -15
- package/dist/{chunk-KAIQPYCM.js → chunk-DML6BD4K.js} +2 -2
- package/dist/{chunk-BTYT3RT3.js → chunk-EG3B2VWK.js} +2 -2
- package/dist/{chunk-OB7QARSN.js → chunk-EGRIVMCQ.js} +1 -1
- package/dist/{chunk-V4K4BSCM.js → chunk-EHFZEKQM.js} +57 -5
- package/dist/{chunk-H4MSJ2NZ.js → chunk-FEO7YW7V.js} +8 -8
- package/dist/{chunk-FNBEYIZH.js → chunk-FVAI7AHF.js} +13 -12
- package/dist/{chunk-PLGGKTCB.js → chunk-GXUONASF.js} +13 -20
- package/dist/{chunk-L6N2TLXR.js → chunk-H3LQ5X6Q.js} +84 -79
- package/dist/{chunk-MVXOY5RC.js → chunk-HA3V4XAF.js} +6 -6
- package/dist/{chunk-WB55EQNJ.js → chunk-HM7SUIQD.js} +38 -9
- package/dist/{chunk-G445Y3YG.js → chunk-HVOTYAS4.js} +15 -7
- package/dist/{chunk-IKYXXIMP.js → chunk-I2TDHVFV.js} +3 -3
- package/dist/{chunk-3N4T6I3O.js → chunk-I3TYUQLB.js} +1 -1
- package/dist/{chunk-AECL3B23.js → chunk-IBZHSU2J.js} +1 -1
- package/dist/{chunk-2FEOM3ZT.js → chunk-ID766OZB.js} +12 -12
- package/dist/{chunk-4UIEQIF4.js → chunk-IK4JY2LI.js} +2 -2
- package/dist/{chunk-C4LV6L4Q.js → chunk-IW5P4KK7.js} +3 -3
- package/dist/{chunk-N7VQD4WB.js → chunk-IYZT62UR.js} +1 -1
- package/dist/chunk-JKE24AG7.js +62 -0
- package/dist/chunk-JLCAHJUO.js +91 -0
- package/dist/{chunk-EUFBE5BW.js → chunk-JLGVBK5M.js} +1 -1
- package/dist/{chunk-6NC4KBS2.js → chunk-JQ32262N.js} +1 -1
- package/dist/{chunk-J2E3VVOS.js → chunk-KDHHPJOG.js} +4 -4
- package/dist/{chunk-A42PDANH.js → chunk-LCCYYTEK.js} +1 -1
- package/dist/{chunk-T2UR3T4L.js → chunk-LK6KPVX2.js} +263 -74
- package/dist/{chunk-RWOWD3PW.js → chunk-LPI7HX4G.js} +2 -2
- package/dist/{chunk-UR6BAPOD.js → chunk-LXP6XWJL.js} +2 -2
- package/dist/{chunk-4RPCYGZG.js → chunk-MAUGXKSI.js} +4 -4
- package/dist/{chunk-AII6P2TC.js → chunk-MMJAHBH2.js} +1 -1
- package/dist/{chunk-LFGJWOVA.js → chunk-MNNK7RV5.js} +11 -8
- package/dist/{chunk-26OI2B2X.js → chunk-MSHL6CF2.js} +1 -1
- package/dist/{chunk-SVVAUJPL.js → chunk-NHA4NRBE.js} +136 -25
- package/dist/{chunk-5F6B6KMK.js → chunk-NHL5CMO2.js} +18 -3
- package/dist/{chunk-NF6KI46X.js → chunk-NJNC2DQV.js} +31 -28
- package/dist/{chunk-I7IXUCKL.js → chunk-NSC5A4IR.js} +1 -1
- package/dist/{chunk-MRF4AMKD.js → chunk-NWGXTUYS.js} +32 -10
- package/dist/{chunk-57I5KNTL.js → chunk-PL36HK3U.js} +3 -3
- package/dist/{chunk-TOEIJ4WF.js → chunk-PUIG6DHT.js} +5 -5
- package/dist/{chunk-BA7MQJXG.js → chunk-QE4WRS3N.js} +3 -3
- package/dist/{chunk-7V7OUKTU.js → chunk-QTWXVOZI.js} +1 -1
- package/dist/{chunk-V2XXV2EH.js → chunk-QZ2JQ6O4.js} +6 -6
- package/dist/{chunk-BHOGXIBO.js → chunk-RPZNQV6D.js} +58 -826
- package/dist/{chunk-2BGOB2QK.js → chunk-SE2MXV2N.js} +136 -25
- package/dist/{chunk-HADQPG7O.js → chunk-SXOD5J7T.js} +2 -2
- package/dist/{chunk-32R2AFZ3.js → chunk-T4JGFCXU.js} +3 -3
- package/dist/chunk-TQBQYO4L.js +55 -0
- package/dist/{chunk-ZSUWGNIT.js → chunk-TSTONNOD.js} +2 -2
- package/dist/chunk-TSYRN646.js +84 -0
- package/dist/{chunk-BZ727KLT.js → chunk-U32PA6DI.js} +1 -1
- package/dist/{chunk-5PVPGWMH.js → chunk-UAT2UMTP.js} +1 -1
- package/dist/{chunk-TGS33LDU.js → chunk-UKM3JYNB.js} +5 -71
- package/dist/{chunk-UEOGIZ3Q.js → chunk-UUOIH4RW.js} +3 -3
- package/dist/{chunk-MASFRPCB.js → chunk-UYPWH7PH.js} +10 -10
- package/dist/{chunk-LSQM3NBR.js → chunk-VAVDAOUA.js} +1 -1
- package/dist/chunk-VBPNCOD7.js +355 -0
- package/dist/{chunk-HQ3CFNHL.js → chunk-VH4PNYOS.js} +1 -1
- package/dist/{chunk-IXXVS2Z4.js → chunk-VQB7G5BM.js} +1 -1
- package/dist/{chunk-FLREUEHW.js → chunk-W4DMQZL5.js} +1 -1
- package/dist/{chunk-RXATE6FZ.js → chunk-WC4MTXGN.js} +22 -0
- package/dist/{chunk-F2ASNL2K.js → chunk-WL263XM2.js} +1 -1
- package/dist/{chunk-ZB6SCA4J.js → chunk-XAGBSYIQ.js} +9 -2
- package/dist/{chunk-LQUMMPGK.js → chunk-XKW4Z7BU.js} +1 -1
- package/dist/chunk-XMRA7CQG.js +22 -0
- package/dist/{chunk-6YYFNGCS.js → chunk-XULJBZ7K.js} +7 -4
- package/dist/chunk-YJK6HOL5.js +29 -0
- package/dist/{chunk-KVNXEAVT.js → chunk-ZCJ5EGLU.js} +30 -10
- package/dist/{chunk-ERUINDRT.js → chunk-ZF3R2IPC.js} +184 -183
- package/dist/{chunk-AECSY5LT.js → chunk-ZYGIDXAK.js} +569 -378
- package/dist/{clean-BW7NHQS5.js → clean-TL3IPJDN.js} +28 -28
- package/dist/cli.js +55 -55
- package/dist/{cloud-TZVXTWZO.js → cloud-EYMRPJNY.js} +4 -4
- package/dist/{cloudrun-KRIETALO.js → cloudrun-TOJ36NLX.js} +11 -11
- package/dist/commands/layout-audit.browser.js +3 -15
- package/dist/{compare-WYWHJ4CR.js → compare-MP5EOW4D.js} +40 -40
- package/dist/{compiler-ANIPXLJ7.js → compiler-NOPVLJ2S.js} +15 -15
- package/dist/{component-CY7DCX56.js → component-ASACDCZK.js} +3 -3
- package/dist/{compositions-5YEB24E3.js → compositions-WKNZJY34.js} +19 -19
- package/dist/{contactSheet-5APX35L3.js → contactSheet-YOBPATEM.js} +2 -2
- package/dist/{delete-6642PDON.js → delete-DQTFHP3G.js} +2 -2
- package/dist/{deploy-NZP6TZLS.js → deploy-HHCFOUFM.js} +4 -4
- package/dist/{deterministicFonts-HQYCUUAL.js → deterministicFonts-LKAGUNE5.js} +3 -3
- package/dist/{dist-V2BGP46S.js → dist-L4Z4ZEYW.js} +7 -4
- package/dist/{dist-DGFC75NC.js → dist-NQEYA4ZX.js} +44 -36
- package/dist/docs/rendering.md +3 -0
- package/dist/{doctor-ZW4A2FS3.js → doctor-JDM65CP7.js} +20 -20
- package/dist/{events-NJU4VFDA.js → events-MBRNA3UF.js} +3 -3
- package/dist/{events-XRCHY2F6.js → events-RKRHRLJD.js} +2 -2
- package/dist/{feedback-NQLSZMES.js → feedback-LZWIWV5J.js} +17 -17
- package/dist/{ffmpeg-RYDQLG3G.js → ffmpeg-4PZKSIGE.js} +15 -15
- package/dist/{figma-TJAMP2CI.js → figma-QFNYUT3F.js} +3 -3
- package/dist/fontLocalizeCli.js +20 -18
- package/dist/{get-RRZ3O26X.js → get-2B5ENJOH.js} +2 -2
- package/dist/{gpuPolicy-4WLHUUS3.js → gpuPolicy-E5FB2GFR.js} +13 -13
- package/dist/{grade-compare-P7PE3NAA.js → grade-compare-4GUAPJHE.js} +40 -40
- package/dist/{gsapParser-IEUSLYDJ.js → gsapParser-3H7ON3DO.js} +1 -1
- package/dist/{gsapParserAcorn-LZJKCFQI.js → gsapParserAcorn-5YD4N6HQ.js} +2 -2
- package/dist/hangReport.js +47 -0
- package/dist/heifImagePrep-C2RYIEER.js +53 -0
- package/dist/{help-6RELRVIW.js → help-XGDAXV67.js} +1 -1
- package/dist/{history-GIIDYND3.js → history-WNFF6HGU.js} +108 -60
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +75 -68
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/hyperframes-slideshow.global.js +16 -16
- package/dist/{info-LBUA2DXE.js → info-BR2LKGJD.js} +16 -16
- package/dist/{init-QUPXBONY.js → init-P6UWPUY3.js} +59 -58
- package/dist/{inspect-CL42DJZ4.js → inspect-MSRPF7ZO.js} +40 -39
- package/dist/inspection.js +4 -4
- package/dist/{installer-VR7XDLR3.js → installer-MPUQS3ZX.js} +10 -10
- package/dist/{keyframes-LELLROMA.js → keyframes-J6K66QTO.js} +11 -11
- package/dist/{lambda-I6KFXWOO.js → lambda-LJ2OSWFJ.js} +32 -13
- package/dist/{layout-NR6SNRZE.js → layout-CDY65XGA.js} +40 -39
- package/dist/{lint-DYEMSEQR.js → lint-CAUNBGPX.js} +13 -10
- package/dist/{lintProject-EA4NPL2X.js → lintProject-ZTSX3AWT.js} +7 -4
- package/dist/{list-RDURYO5U.js → list-33BYQNRZ.js} +2 -2
- package/dist/{login-VKLET5OL.js → login-5QMRKOHK.js} +4 -4
- package/dist/{manager-IYT3THJN.js → manager-3JOHHPVR.js} +17 -17
- package/dist/{manager-7TSUZKXU.js → manager-RMYSZ3KI.js} +7 -3
- package/dist/{media-treatment-I4AFEQZ3.js → media-treatment-4WP22CFN.js} +23 -23
- package/dist/{models-LLPVGC2E.js → models-HPWCHAZX.js} +28 -28
- package/dist/{motionShot-6A6HH6IK.js → motionShot-I7GDIROQ.js} +23 -23
- package/dist/{normalize-audio-KVQJBYLT.js → normalize-audio-VTMXPSC7.js} +14 -14
- package/dist/{open-J4ZT4X3C.js → open-SAO7OQTT.js} +19 -19
- package/dist/{parakeetRunner-FLUCIDIZ.js → parakeetRunner-ZYPBIA73.js} +25 -25
- package/dist/{pipeline-RRVLGALQ.js → pipeline-VNBMR6QU.js} +16 -16
- package/dist/{play-QGJSXUVM.js → play-7VI6A7KN.js} +42 -32
- package/dist/{preflight-SP2ZERBE.js → preflight-VWV7L45J.js} +17 -17
- package/dist/{present-UR4YBHMX.js → present-CSJGYOFF.js} +37 -27
- package/dist/{preview-6ENCRU4C.js → preview-B246ZTVO.js} +60 -45
- package/dist/{producer-OMHZRY6A.js → producer-WJLFDVQJ.js} +1 -1
- package/dist/{projectConfig-NGS7GJ47.js → projectConfig-OMR46ZWQ.js} +14 -13
- package/dist/{publication-6NYQA22Y.js → publication-AA7NNYET.js} +8 -8
- package/dist/{publish-E6RE5VHB.js → publish-TJ4QVVSP.js} +18 -17
- package/dist/{remove-background-66PQRA7R.js → remove-background-LQ2V7W7N.js} +20 -20
- package/dist/{render-ZLRJUFMX.js → render-AWEEPG3F.js} +39 -37
- package/dist/{render-SBAZWXPO.js → render-E5QJG74D.js} +14 -11
- package/dist/{render-IMSGS6BD.js → render-JLTNZ36U.js} +83 -51
- package/dist/{render-batch-MO7LYZSP.js → render-batch-U4T4VSCM.js} +14 -11
- package/dist/renderSetupWorker.js +11 -8
- package/dist/{resolver-QMBVTAKT.js → resolver-GXCTUKPV.js} +10 -10
- package/dist/{screenshotCapture-I5EDCITF.js → screenshotCapture-X6OKIXCB.js} +1 -1
- package/dist/{sherpa-JZRDL3OE.js → sherpa-4VZWVHWZ.js} +24 -24
- package/dist/skills/hyperframes-cli/references/init-and-scaffold.md +1 -0
- package/dist/skills/hyperframes-cli/references/lambda.md +3 -0
- package/dist/skills/hyperframes-cli/references/preview-render.md +3 -0
- package/dist/{skills-YBTEWFYS.js → skills-WUKR7SUE.js} +8 -8
- package/dist/{skillsUpdateCheck-Z4HTDZJN.js → skillsUpdateCheck-YXRBY3JC.js} +3 -3
- package/dist/{snapshot-5F5UV6H5.js → snapshot-Q7S2FTNG.js} +143 -77
- package/dist/{src-WWXYV2TS.js → src-CLAALR5W.js} +26 -19
- package/dist/{src-UTW3F2PM.js → src-ZOXUSGAP.js} +24 -12
- package/dist/{staticProjectServer-UHZ63C5O.js → staticProjectServer-DQ7PIDPA.js} +26 -26
- package/dist/studio/assets/hyperframes-player-Cm5aBiKq.js +478 -0
- package/dist/studio/assets/{index-dy6GQJn4.js → index-BF9YeBnC.js} +142 -142
- package/dist/studio/assets/{index-C8hp9Y7c.js → index-BrqAmMRt.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-BHZ3PHL2.js → studio-api-NUE227JM.js} +18 -18
- package/dist/{studioSelectionClient-IUUPKUHZ.js → studioSelectionClient-D6VMGTKQ.js} +1 -1
- package/dist/{studioServer-AFUXWRB5.js → studioServer-HVOKP4VI.js} +81 -70
- package/dist/{synthesize-PKTB5ATG.js → synthesize-QZHRXGRY.js} +30 -8
- package/dist/{telemetry-UYKOT4OJ.js → telemetry-2Y5JXLDB.js} +3 -3
- package/dist/{timeline-K5NLEMH4.js → timeline-WOQGXFRV.js} +28 -28
- package/dist/{tokens-FCOSWE2O.js → tokens-T3OHTWUC.js} +2 -2
- package/dist/{transcribe-SIFMTW5W.js → transcribe-4U74P5TG.js} +22 -22
- package/dist/{transcribe-K2QTXDQR.js → transcribe-JZ3BO546.js} +32 -32
- package/dist/{tts-5I2AJNLM.js → tts-AY4JO5NQ.js} +2 -2
- package/dist/{updateCheck-JZ6TBZVE.js → updateCheck-6EUAGAM4.js} +2 -2
- package/dist/{upgrade-TUPAJXQQ.js → upgrade-55K6F4MP.js} +2 -2
- package/dist/upstreamProxy-W5FWAT5Z.js +17 -0
- package/dist/{urlDownloader-L4775QID.js → urlDownloader-47JMOLNN.js} +12 -12
- package/dist/{validate-4HVVMEBV.js → validate-QBJ3SBS4.js} +32 -32
- package/dist/{video-4OGPF3IE.js → video-3ZAUNAR3.js} +17 -15
- package/dist/warmCheck.js +50 -48
- package/package.json +2 -1
- package/dist/chunk-4YYJOFKS.js +0 -28
- package/dist/chunk-ZUQZP6QD.js +0 -3986
- package/dist/studio/assets/hyperframes-player-DzdSmJdB.js +0 -478
|
@@ -6,13 +6,13 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
runRenderSetupWorker
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
HYPERFRAMES_BROWSER_MARKER_ARG
|
|
12
|
-
} from "./chunk-K4MJX7SR.js";
|
|
9
|
+
} from "./chunk-EHFZEKQM.js";
|
|
13
10
|
import {
|
|
14
11
|
terminateProcessTree
|
|
15
12
|
} from "./chunk-KGPLIH7B.js";
|
|
13
|
+
import {
|
|
14
|
+
HYPERFRAMES_BROWSER_MARKER_ARG
|
|
15
|
+
} from "./chunk-K4MJX7SR.js";
|
|
16
16
|
|
|
17
17
|
// src/utils/orphanCleanup.ts
|
|
18
18
|
import { execFileSync } from "child_process";
|
|
@@ -4,29 +4,32 @@ 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
|
+
formatFindingTimes
|
|
9
|
+
} from "./chunk-TQBQYO4L.js";
|
|
7
10
|
import {
|
|
8
11
|
resolveProject
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XAGBSYIQ.js";
|
|
10
13
|
import {
|
|
11
14
|
serveStaticProjectHtml
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-526VSRZ4.js";
|
|
13
16
|
import {
|
|
14
17
|
AUDIT_SEEK_OPTIONS,
|
|
15
18
|
installPageFunctionGuard,
|
|
16
19
|
seekCompositionTimeline,
|
|
17
20
|
waitForCompositionFonts,
|
|
18
21
|
waitForRuntimeReady
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-UYPWH7PH.js";
|
|
20
23
|
import {
|
|
21
24
|
launchManagedBrowser,
|
|
22
25
|
resolveManagedGpuMode
|
|
23
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MAUGXKSI.js";
|
|
24
27
|
import {
|
|
25
28
|
gotoWhenSent
|
|
26
29
|
} from "./chunk-MOEGCMKI.js";
|
|
27
30
|
import {
|
|
28
31
|
pageNavigationTimeoutMs
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-UKM3JYNB.js";
|
|
30
33
|
import {
|
|
31
34
|
defineCommand
|
|
32
35
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -40,7 +43,7 @@ import {
|
|
|
40
43
|
import {
|
|
41
44
|
printDeprecationNotice,
|
|
42
45
|
withMeta
|
|
43
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-EGRIVMCQ.js";
|
|
44
47
|
import {
|
|
45
48
|
normalizeErrorMessage
|
|
46
49
|
} from "./chunk-T2EUWCJE.js";
|
|
@@ -50,36 +53,6 @@ import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
|
50
53
|
import { dirname, join as join2 } from "path";
|
|
51
54
|
import { fileURLToPath } from "url";
|
|
52
55
|
|
|
53
|
-
// src/utils/checkFindings.ts
|
|
54
|
-
var SEVERITY = { info: 0, warning: 1, error: 2 };
|
|
55
|
-
function findingElementKey(finding) {
|
|
56
|
-
return JSON.stringify([finding.sourceFile, finding.selector]);
|
|
57
|
-
}
|
|
58
|
-
function groupSampledFindings(findings, compareEvidence = () => 0) {
|
|
59
|
-
const groups = /* @__PURE__ */ new Map();
|
|
60
|
-
for (const finding of findings) {
|
|
61
|
-
const key = JSON.stringify([findingElementKey(finding), finding.code]);
|
|
62
|
-
const times = finding.times ?? [finding.time];
|
|
63
|
-
const group = groups.get(key);
|
|
64
|
-
if (!group) {
|
|
65
|
-
groups.set(key, { finding, times: new Set(times) });
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
for (const time of times) group.times.add(time);
|
|
69
|
-
const severity = SEVERITY[finding.severity] - SEVERITY[group.finding.severity];
|
|
70
|
-
if (severity > 0 || severity === 0 && compareEvidence(finding, group.finding) > 0) {
|
|
71
|
-
group.finding = finding;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return [...groups.values()].map(({ finding, times }) => ({
|
|
75
|
-
...finding,
|
|
76
|
-
times: [...times].sort((a, b) => a - b)
|
|
77
|
-
}));
|
|
78
|
-
}
|
|
79
|
-
function formatFindingTimes(finding) {
|
|
80
|
-
return `t=${(finding.times ?? [finding.time]).join(", ")}s`;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
56
|
// src/utils/layoutAudit.ts
|
|
84
57
|
function buildLayoutSampleTimes({ duration, samples, at }) {
|
|
85
58
|
if (at?.length) {
|
|
@@ -717,7 +690,7 @@ async function collectTweenBoundaries(page) {
|
|
|
717
690
|
});
|
|
718
691
|
}
|
|
719
692
|
async function bundleProjectHtml(projectDir) {
|
|
720
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
693
|
+
const { bundleToSingleHtml } = await import("./compiler-NOPVLJ2S.js");
|
|
721
694
|
return bundleToSingleHtml(projectDir);
|
|
722
695
|
}
|
|
723
696
|
async function alignViewportToComposition(page, url) {
|
|
@@ -734,15 +707,15 @@ async function alignViewportToComposition(page, url) {
|
|
|
734
707
|
await gotoWhenSent(page, url, pageNavigationTimeoutMs());
|
|
735
708
|
}
|
|
736
709
|
async function runLayoutAudit(projectDir, opts) {
|
|
737
|
-
const { ensureBrowser } = await import("./manager-
|
|
710
|
+
const { ensureBrowser } = await import("./manager-RMYSZ3KI.js");
|
|
738
711
|
const puppeteer = await import("puppeteer-core");
|
|
739
|
-
const { buildChromeArgs } = await import("./src-
|
|
712
|
+
const { buildChromeArgs } = await import("./src-ZOXUSGAP.js");
|
|
740
713
|
const {
|
|
741
714
|
assertWebGpuAdapterAvailable,
|
|
742
715
|
compositionRequiresWebGpu,
|
|
743
716
|
resolveLocalBrowserGpuMode,
|
|
744
717
|
resolveLocalWebGpu
|
|
745
|
-
} = await import("./gpuPolicy-
|
|
718
|
+
} = await import("./gpuPolicy-E5FB2GFR.js");
|
|
746
719
|
const html = await bundleProjectHtml(projectDir);
|
|
747
720
|
const server = await serveStaticProjectHtml(
|
|
748
721
|
projectDir,
|
|
@@ -1106,9 +1079,6 @@ function createInspectCommand(commandName) {
|
|
|
1106
1079
|
var layout_default = createInspectCommand("layout");
|
|
1107
1080
|
|
|
1108
1081
|
export {
|
|
1109
|
-
findingElementKey,
|
|
1110
|
-
groupSampledFindings,
|
|
1111
|
-
formatFindingTimes,
|
|
1112
1082
|
buildLayoutSampleTimes,
|
|
1113
1083
|
formatLayoutIssue,
|
|
1114
1084
|
dedupeLayoutIssues,
|
|
@@ -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-XAGBSYIQ.js";
|
|
10
10
|
import {
|
|
11
11
|
installPageFunctionGuard,
|
|
12
12
|
resolveCliChromeGpuMode,
|
|
13
13
|
seekCompositionTimeline,
|
|
14
14
|
waitForRuntimeReady
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UYPWH7PH.js";
|
|
16
16
|
import {
|
|
17
17
|
launchManagedBrowser,
|
|
18
18
|
resolveManagedGpuMode
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MAUGXKSI.js";
|
|
20
20
|
import {
|
|
21
21
|
pageNavigationTimeoutMs
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-UKM3JYNB.js";
|
|
23
23
|
import {
|
|
24
24
|
resolveCompositionViewportFromHtml
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-IBZHSU2J.js";
|
|
26
26
|
import {
|
|
27
27
|
defineCommand
|
|
28
28
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -35,14 +35,14 @@ import {
|
|
|
35
35
|
} from "./chunk-ZTZA4UWZ.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveNaturalMediaTimelineDuration
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-BDJIQZN2.js";
|
|
39
39
|
import {
|
|
40
40
|
decodeWellFormedEscapes
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-SE2MXV2N.js";
|
|
42
42
|
import {
|
|
43
43
|
printDeprecationNotice,
|
|
44
44
|
withMeta
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-EGRIVMCQ.js";
|
|
46
46
|
import {
|
|
47
47
|
normalizeErrorMessage
|
|
48
48
|
} from "./chunk-T2EUWCJE.js";
|
|
@@ -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-WJLFDVQJ.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-NOPVLJ2S.js");
|
|
273
|
+
const { ensureBrowser } = await import("./manager-RMYSZ3KI.js");
|
|
274
|
+
const { serveStaticProjectHtml } = await import("./staticProjectServer-DQ7PIDPA.js");
|
|
275
|
+
const { lintProject } = await import("./lintProject-ZTSX3AWT.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-ZOXUSGAP.js");
|
|
297
297
|
const requestedGpuMode = resolveCliChromeGpuMode();
|
|
298
|
-
const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-
|
|
298
|
+
const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-E5FB2GFR.js");
|
|
299
299
|
const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, browser.executablePath);
|
|
300
300
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
301
301
|
const { gpuConfig, softwareWebGpu } = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
|
|
@@ -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.207" : "0.0.0-dev";
|
|
10
|
+
var PRODUCER_VERSION = true ? "0.8.207" : "0.0.0-dev";
|
|
11
11
|
|
|
12
12
|
export {
|
|
13
13
|
VERSION,
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
formatVariableValidationIssue,
|
|
21
21
|
validateVariables
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7RWUY3BJ.js";
|
|
23
23
|
import {
|
|
24
24
|
extractCompositionMetadata
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-NHA4NRBE.js";
|
|
26
26
|
|
|
27
27
|
// src/utils/variables.ts
|
|
28
28
|
import { readFileSync } from "fs";
|
|
@@ -4,12 +4,12 @@ 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
|
-
normalizeErrorMessage
|
|
9
|
-
} from "./chunk-T2EUWCJE.js";
|
|
10
7
|
import {
|
|
11
8
|
terminateProcessTree
|
|
12
9
|
} from "./chunk-KGPLIH7B.js";
|
|
10
|
+
import {
|
|
11
|
+
normalizeErrorMessage
|
|
12
|
+
} from "./chunk-T2EUWCJE.js";
|
|
13
13
|
|
|
14
14
|
// src/renderSetupWorkerLifecycle.ts
|
|
15
15
|
var RENDER_SETUP_SIGNALS = ["SIGINT", "SIGTERM", "SIGHUP"];
|
|
@@ -63,9 +63,59 @@ function renderSetupFailureFrom(stderr) {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// src/utils/cancellableProcess.ts
|
|
66
|
-
import { spawn } from "child_process";
|
|
66
|
+
import { spawn as spawn2 } from "child_process";
|
|
67
67
|
import { StringDecoder } from "string_decoder";
|
|
68
68
|
import { fileURLToPath } from "url";
|
|
69
|
+
|
|
70
|
+
// src/utils/childReaper.ts
|
|
71
|
+
import { spawn } from "child_process";
|
|
72
|
+
var REAPER = `const held = new Map();
|
|
73
|
+
let rest = "";
|
|
74
|
+
const kill = (pid, group) => {
|
|
75
|
+
try {
|
|
76
|
+
if (process.platform === "win32")
|
|
77
|
+
require("node:child_process").spawnSync("taskkill", ["/PID", pid, "/T", "/F"], { windowsHide: true, timeout: 10000 });
|
|
78
|
+
else process.kill(group ? -Number(pid) : Number(pid), "SIGKILL");
|
|
79
|
+
} catch {}
|
|
80
|
+
};
|
|
81
|
+
process.stdin.on("data", (data) => {
|
|
82
|
+
const lines = (rest + data).split("\\n");
|
|
83
|
+
rest = lines.pop();
|
|
84
|
+
for (const [op, pid, group] of lines.map((line) => line.split(" ")))
|
|
85
|
+
op === "+" ? held.set(pid, group === "g") : held.delete(pid);
|
|
86
|
+
});
|
|
87
|
+
const done = () => {
|
|
88
|
+
for (const [pid, group] of held) kill(pid, group);
|
|
89
|
+
process.exit(0);
|
|
90
|
+
};
|
|
91
|
+
process.stdin.on("end", done);
|
|
92
|
+
process.stdin.on("error", done);`;
|
|
93
|
+
var reaper;
|
|
94
|
+
function lifeline() {
|
|
95
|
+
if (!reaper) {
|
|
96
|
+
reaper = spawn(process.execPath, ["-e", REAPER], {
|
|
97
|
+
detached: true,
|
|
98
|
+
stdio: ["pipe", "ignore", "ignore"],
|
|
99
|
+
windowsHide: true
|
|
100
|
+
});
|
|
101
|
+
reaper.on("error", () => {
|
|
102
|
+
});
|
|
103
|
+
reaper.stdin?.on("error", () => {
|
|
104
|
+
});
|
|
105
|
+
reaper.unref();
|
|
106
|
+
reaper.stdin?.unref?.();
|
|
107
|
+
}
|
|
108
|
+
return reaper.stdin;
|
|
109
|
+
}
|
|
110
|
+
function killWithThisProcess(pid, group) {
|
|
111
|
+
const stdin = lifeline();
|
|
112
|
+
stdin?.write(`+ ${pid} ${group ? "g" : "p"}
|
|
113
|
+
`);
|
|
114
|
+
return () => void stdin?.write(`- ${pid}
|
|
115
|
+
`);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// src/utils/cancellableProcess.ts
|
|
69
119
|
var CancellableProcessError = class extends Error {
|
|
70
120
|
code;
|
|
71
121
|
status;
|
|
@@ -98,11 +148,12 @@ function runCancellableProcess(command, args, options = {}) {
|
|
|
98
148
|
windowsHide: true,
|
|
99
149
|
detached
|
|
100
150
|
};
|
|
101
|
-
child =
|
|
151
|
+
child = spawn2(command, [...args], spawnOptions);
|
|
102
152
|
} catch (error) {
|
|
103
153
|
reject(error);
|
|
104
154
|
return;
|
|
105
155
|
}
|
|
156
|
+
const release = child.pid ? killWithThisProcess(child.pid, detached) : void 0;
|
|
106
157
|
if (child.pid) options.onSpawn?.(child.pid);
|
|
107
158
|
let stdout = "";
|
|
108
159
|
let stderr = "";
|
|
@@ -158,6 +209,7 @@ function runCancellableProcess(command, args, options = {}) {
|
|
|
158
209
|
});
|
|
159
210
|
child.once("error", (error) => void finishReject(error));
|
|
160
211
|
child.once("close", async (status, closeSignal) => {
|
|
212
|
+
release?.();
|
|
161
213
|
if (settled) return;
|
|
162
214
|
const trailingStdout = stdoutDecoder.end();
|
|
163
215
|
stdout += trailingStdout;
|
|
@@ -6,35 +6,32 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
parakeetRunner
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LCCYYTEK.js";
|
|
10
10
|
import {
|
|
11
11
|
DecodeCancelled,
|
|
12
12
|
prepareSherpaWav,
|
|
13
13
|
sherpaUnsupportedReason,
|
|
14
14
|
transcribeWithSherpa
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QE4WRS3N.js";
|
|
16
16
|
import {
|
|
17
17
|
initialModelForLanguage,
|
|
18
18
|
transcribe
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-PL36HK3U.js";
|
|
20
20
|
import {
|
|
21
21
|
createRenderCancellationScope,
|
|
22
22
|
stoppedByCancelSignal
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-6IYIS2U7.js";
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_MODEL,
|
|
26
26
|
findWhisper,
|
|
27
27
|
isWhisperUnavailable
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JQ32262N.js";
|
|
29
29
|
import {
|
|
30
30
|
formatSrt,
|
|
31
31
|
formatVtt,
|
|
32
32
|
loadTranscript,
|
|
33
33
|
patchCaptionHtml
|
|
34
34
|
} from "./chunk-6MUI2H6P.js";
|
|
35
|
-
import {
|
|
36
|
-
normalizeErrorMessage
|
|
37
|
-
} from "./chunk-T2EUWCJE.js";
|
|
38
35
|
import {
|
|
39
36
|
PARAKEET_INSTALL_COMMAND,
|
|
40
37
|
PARAKEET_LANGUAGES,
|
|
@@ -44,6 +41,9 @@ import {
|
|
|
44
41
|
import {
|
|
45
42
|
TRANSCRIPT_FILE
|
|
46
43
|
} from "./chunk-IR35BCLK.js";
|
|
44
|
+
import {
|
|
45
|
+
normalizeErrorMessage
|
|
46
|
+
} from "./chunk-T2EUWCJE.js";
|
|
47
47
|
|
|
48
48
|
// src/api/transcribe.ts
|
|
49
49
|
import { existsSync, realpathSync, rmSync, statSync, writeFileSync } from "fs";
|
|
@@ -11,36 +11,31 @@ import {
|
|
|
11
11
|
findSyncPartner,
|
|
12
12
|
readLinkTiming,
|
|
13
13
|
syncOffsetFrames
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VQB7G5BM.js";
|
|
15
15
|
import {
|
|
16
16
|
readCompositionFps
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7PJ3AJB2.js";
|
|
18
18
|
import {
|
|
19
19
|
HF_AUDIO_GROUP_ATTR,
|
|
20
20
|
extractAudioMetadata,
|
|
21
21
|
extractMediaMetadata
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LK6KPVX2.js";
|
|
23
23
|
import {
|
|
24
24
|
byStart,
|
|
25
25
|
fpsToNumber,
|
|
26
26
|
parseFpsWithDefault
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7RWUY3BJ.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-
|
|
35
|
-
import {
|
|
36
|
-
isSubCompositionHost,
|
|
37
|
-
topLevelElements,
|
|
38
|
-
trackKindOf
|
|
39
|
-
} from "./chunk-SVVAUJPL.js";
|
|
34
|
+
} from "./chunk-BDJIQZN2.js";
|
|
40
35
|
import {
|
|
41
36
|
resolveReferencedDuration,
|
|
42
37
|
resolveReferencedStart
|
|
43
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-ZCJ5EGLU.js";
|
|
44
39
|
import {
|
|
45
40
|
resolveAuthoredAssetFile
|
|
46
41
|
} from "./chunk-PBNWRWKA.js";
|
|
@@ -53,7 +48,12 @@ import {
|
|
|
53
48
|
readPlaybackRate,
|
|
54
49
|
resolveMediaDuration,
|
|
55
50
|
resolveMediaStartSeconds
|
|
56
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-SE2MXV2N.js";
|
|
52
|
+
import {
|
|
53
|
+
isSubCompositionHost,
|
|
54
|
+
topLevelElements,
|
|
55
|
+
trackKindOf
|
|
56
|
+
} from "./chunk-NHA4NRBE.js";
|
|
57
57
|
|
|
58
58
|
// src/timeline/describeProject.ts
|
|
59
59
|
import { readFileSync, realpathSync, statSync } from "fs";
|
|
@@ -355,6 +355,7 @@ async function describeProject(indexPath, measure = measureWithFfprobe, sourceOv
|
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
export {
|
|
358
|
+
createProbeGate,
|
|
358
359
|
NEVER_VISIBLE,
|
|
359
360
|
describeProject
|
|
360
361
|
};
|
|
@@ -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
|
+
createFileAtomically
|
|
9
|
+
} from "./chunk-EOVYQ3IG.js";
|
|
7
10
|
|
|
8
11
|
// src/utils/pngDimensions.ts
|
|
9
12
|
import { readFileSync } from "fs";
|
|
@@ -91,7 +94,7 @@ function reportArtifacts(command, role, paths, context = readToolContext()) {
|
|
|
91
94
|
}
|
|
92
95
|
|
|
93
96
|
// src/utils/projectLock.ts
|
|
94
|
-
import {
|
|
97
|
+
import { mkdirSync, readFileSync as readFileSync2, unlinkSync } from "fs";
|
|
95
98
|
import { dirname, join } from "path";
|
|
96
99
|
import { setTimeout as sleep } from "timers/promises";
|
|
97
100
|
var ProjectLockTimeout = class extends Error {
|
|
@@ -116,16 +119,8 @@ function alive(pid) {
|
|
|
116
119
|
var sameHolder = (a, b) => a?.pid === b.pid && a.startedAt === b.startedAt && a.command === b.command;
|
|
117
120
|
function breakStaleHolder(path, current, holder) {
|
|
118
121
|
const breakPath = `${path}.break`;
|
|
119
|
-
|
|
120
|
-
let acquired = false;
|
|
121
|
-
writeFileSync(breakDraft, JSON.stringify(holder), { flag: "wx" });
|
|
122
|
+
if (!createNew(breakPath, holder)) return false;
|
|
122
123
|
try {
|
|
123
|
-
try {
|
|
124
|
-
linkSync(breakDraft, breakPath);
|
|
125
|
-
} catch (error) {
|
|
126
|
-
if (error.code === "EEXIST") return false;
|
|
127
|
-
throw error;
|
|
128
|
-
}
|
|
129
124
|
if (sameHolder(readHolder(path), current)) {
|
|
130
125
|
try {
|
|
131
126
|
unlinkSync(path);
|
|
@@ -133,24 +128,22 @@ function breakStaleHolder(path, current, holder) {
|
|
|
133
128
|
if (error.code !== "ENOENT") throw error;
|
|
134
129
|
}
|
|
135
130
|
}
|
|
136
|
-
|
|
131
|
+
return tryAcquire(path, holder);
|
|
137
132
|
} finally {
|
|
138
|
-
unlinkSync(breakDraft);
|
|
139
133
|
if (sameHolder(readHolder(breakPath), holder)) unlinkSync(breakPath);
|
|
140
134
|
}
|
|
141
|
-
return acquired;
|
|
142
135
|
}
|
|
143
|
-
function
|
|
144
|
-
const draft = `${path}.${holder.pid}.${holder.startedAt}`;
|
|
145
|
-
writeFileSync(draft, JSON.stringify(holder), { flag: "wx" });
|
|
136
|
+
function createNew(path, holder) {
|
|
146
137
|
try {
|
|
147
|
-
|
|
138
|
+
createFileAtomically(path, JSON.stringify(holder));
|
|
148
139
|
return true;
|
|
149
140
|
} catch (error) {
|
|
150
|
-
if (error.code
|
|
151
|
-
|
|
152
|
-
unlinkSync(draft);
|
|
141
|
+
if (error.code === "EEXIST") return false;
|
|
142
|
+
throw error;
|
|
153
143
|
}
|
|
144
|
+
}
|
|
145
|
+
function tryAcquire(path, holder) {
|
|
146
|
+
if (createNew(path, holder)) return true;
|
|
154
147
|
const current = readHolder(path);
|
|
155
148
|
if (current && !alive(current.pid)) return breakStaleHolder(path, current, holder);
|
|
156
149
|
return false;
|