hyperframes 0.8.150 → 0.8.152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-3ZIFEN2U.js → add-SA33REHW.js} +14 -14
- package/dist/{animatedGifPrep-77LPFLKJ.js → animatedGifPrep-3YXJQZ7L.js} +9 -9
- package/dist/api.js +19 -19
- package/dist/{asset-EYSZEHM6.js → asset-PUVPTWPD.js} +2 -2
- package/dist/{assetCataloger-KX3HD7ZI.js → assetCataloger-VWE2PLBX.js} +4 -4
- package/dist/{auth-L6IWNRXY.js → auth-PS3M6AI7.js} +1 -1
- package/dist/{autoUpdate-2O3HZB65.js → autoUpdate-CMO4SHWU.js} +2 -2
- package/dist/{backgroundChecks-BH2LMJYE.js → backgroundChecks-EDZ2A55J.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-ZBKAYLWU.js → batchRender-7PLJISCN.js} +5 -5
- package/dist/{beats-IVLF2566.js → beats-2MDSIOE7.js} +15 -15
- package/dist/{benchmark-SYZFW2G7.js → benchmark-KBBXAPI4.js} +10 -10
- package/dist/{browser-OSW3L25S.js → browser-OMWKZRSW.js} +5 -5
- package/dist/{bundleWithLocalizedFonts-I4CWOXLK.js → bundleWithLocalizedFonts-76DMCRIW.js} +2 -2
- package/dist/{capture-AZOQ57TM.js → capture-LRUUXH5Q.js} +2 -2
- package/dist/{capture-V5ICGSVJ.js → capture-YGDC7GN3.js} +13 -13
- package/dist/{catalog-VBJOA2Y5.js → catalog-SMEBKEVO.js} +14 -14
- package/dist/{catch-up-TKSEDNJK.js → catch-up-OMILX3WE.js} +4 -4
- package/dist/{check-3HFISKDB.js → check-NUZ62LIW.js} +288 -64
- package/dist/{checkBrowser-MXBDNZJB.js → checkBrowser-MSTVEL4V.js} +181 -38
- package/dist/{chunk-73RBX2E7.js → chunk-3DZBQ7MH.js} +3 -3
- package/dist/{chunk-6QB7F2II.js → chunk-3E4OCOC5.js} +1 -1
- package/dist/{chunk-OQ7XMM3S.js → chunk-3HPJM5IQ.js} +1 -1
- package/dist/{chunk-UJB7356Y.js → chunk-3LO7BBJX.js} +3 -3
- package/dist/{chunk-APDLWWFG.js → chunk-3VGU2SH7.js} +1 -1
- package/dist/{chunk-DUUFDLC4.js → chunk-4MLYMDQ4.js} +1 -1
- package/dist/{chunk-AXPNVC3N.js → chunk-4UMKAUZI.js} +1 -1
- package/dist/{chunk-XPQSL5VS.js → chunk-54DMWFQZ.js} +8 -1
- package/dist/chunk-57GN6KWT.js +179 -0
- package/dist/{chunk-374QQGBQ.js → chunk-5CS4T6C6.js} +63 -12
- package/dist/{chunk-PCWOSS7G.js → chunk-5ERVRJMV.js} +3 -3
- package/dist/{chunk-TZPZE5PS.js → chunk-5VMSUW4Z.js} +6 -3
- package/dist/{chunk-M6UDJ2E7.js → chunk-6Z4YJ5Q3.js} +3 -3
- package/dist/{chunk-FJWEYVEM.js → chunk-7FYFEXD2.js} +658 -198
- package/dist/{chunk-UQYQ7TBA.js → chunk-7NPSXBIN.js} +2 -2
- package/dist/chunk-7TASSBN2.js +215 -0
- package/dist/{chunk-F2RLIE7P.js → chunk-ANS56TPS.js} +11 -11
- package/dist/{chunk-DOVJRUFM.js → chunk-BQK3J7XO.js} +1 -1
- package/dist/{chunk-FPAT5HTI.js → chunk-BYJYQWEX.js} +10 -10
- package/dist/{chunk-XXPYZBZ3.js → chunk-C6TPGUWD.js} +2 -2
- package/dist/{chunk-XQMEGSHG.js → chunk-D6RJXQLD.js} +1 -1
- package/dist/{chunk-RW7NLGPD.js → chunk-DFXK7KUO.js} +25 -17
- package/dist/{chunk-6SFPQ2RZ.js → chunk-E6EYZ33P.js} +2 -2
- package/dist/{chunk-AKYQGZLU.js → chunk-EVTHG34H.js} +2 -2
- package/dist/{chunk-5NAYNDBT.js → chunk-EXH6L2XZ.js} +6 -2
- package/dist/{chunk-AIJS74LG.js → chunk-FFDC5OWV.js} +8 -2
- package/dist/{chunk-4WFNTWKZ.js → chunk-FNN5QINS.js} +2 -2
- package/dist/{chunk-DMKI64EZ.js → chunk-FSZAFCU7.js} +1 -1
- package/dist/{chunk-S5F26DUL.js → chunk-GQETH4PE.js} +3 -3
- package/dist/{chunk-3UAIVF4L.js → chunk-H2SGM2V2.js} +1 -1
- package/dist/{chunk-O4DC5CHF.js → chunk-H7FXBK3Q.js} +1 -1
- package/dist/{chunk-UVVI2NJQ.js → chunk-HBCRRCTX.js} +109 -31
- package/dist/{chunk-NFQY7EIC.js → chunk-IBYC3VUA.js} +1 -1
- package/dist/{chunk-2KAL22B5.js → chunk-IEDT4EXE.js} +1 -1
- package/dist/{chunk-I6DATIHC.js → chunk-IZIRIDJH.js} +2 -2
- package/dist/{chunk-Z6WZDGCS.js → chunk-IZKXUYZE.js} +2 -2
- package/dist/chunk-KCFF4ENE.js +24 -0
- package/dist/{chunk-6KWA3XPS.js → chunk-KZ3L3W4Q.js} +1 -1
- package/dist/{chunk-7IEGPJ4P.js → chunk-LBT4AMSF.js} +1 -1
- package/dist/{chunk-7JTFPUMA.js → chunk-LECTCGGS.js} +1 -1
- package/dist/{chunk-7E4VHPKJ.js → chunk-LVPSWUS6.js} +5 -5
- package/dist/{chunk-6NPFJ255.js → chunk-MNHPG2UO.js} +1 -1
- package/dist/{chunk-FN6KAS7A.js → chunk-NHAG2KCE.js} +7 -7
- package/dist/{chunk-423DJVX2.js → chunk-PKO2EWO7.js} +1 -1
- package/dist/{chunk-ZNHAJCEA.js → chunk-PRXAOZWZ.js} +28 -13
- package/dist/{chunk-VQ7YIURZ.js → chunk-PTXZDSW5.js} +5 -5
- package/dist/{chunk-XANZ4R4P.js → chunk-QECEOV6W.js} +3 -3
- package/dist/{chunk-BLRJKBKP.js → chunk-QESSGUKX.js} +1 -1
- package/dist/{chunk-WLIUULZQ.js → chunk-RN5I2DP5.js} +29 -15
- package/dist/chunk-S3RCK56N.js +3795 -0
- package/dist/{chunk-UAIUVPZE.js → chunk-SWCSL6WS.js} +6 -6
- package/dist/{chunk-2PSPARWP.js → chunk-TYXH3EKP.js} +4 -0
- package/dist/{chunk-FMNVTKX2.js → chunk-U3BCDVZO.js} +1 -1
- package/dist/{chunk-LW5VFBSY.js → chunk-VS732BUG.js} +1 -1
- package/dist/{chunk-LFNQDTSH.js → chunk-VYKPBRCB.js} +63 -12
- package/dist/{chunk-M5B42RL5.js → chunk-WUUOFMHU.js} +3 -3
- package/dist/{chunk-A6ZO4BX7.js → chunk-XEFFJRYX.js} +2 -2
- package/dist/{chunk-EL5QVJEG.js → chunk-XINGD6MS.js} +4 -4
- package/dist/chunk-XSEGMQYA.js +30 -0
- package/dist/{chunk-CZQLCBWY.js → chunk-YG2Y55KF.js} +1 -1
- package/dist/{chunk-B3XLIBFL.js → chunk-YIJMVFEJ.js} +1 -1
- package/dist/{chunk-JDB65PPT.js → chunk-YOEGUBBY.js} +13 -12
- package/dist/{chunk-AFRXL75S.js → chunk-YYEYOFHW.js} +1 -1
- package/dist/{chunk-R5A7454P.js → chunk-ZTM3RMAD.js} +2 -2
- package/dist/{clean-7HU7S7DT.js → clean-F75G45BI.js} +56 -35
- package/dist/cli.js +53 -53
- package/dist/{cloud-HAXHBO25.js → cloud-KVJAOUWH.js} +4 -4
- package/dist/{cloudrun-A3PIJ6DX.js → cloudrun-Q7Q7O4GY.js} +6 -6
- package/dist/{compare-6IPSQMSM.js → compare-DGUJ4QWU.js} +30 -30
- package/dist/{compiler-UQP2VXN6.js → compiler-NCN6PTVH.js} +6 -6
- package/dist/{component-FF3AU24M.js → component-PSYGT3JV.js} +3 -3
- package/dist/{compositions-JSH4MZXB.js → compositions-J3GAETIC.js} +13 -13
- package/dist/{delete-G763SW64.js → delete-MR7LRGRP.js} +2 -2
- package/dist/{deterministicFonts-C5JQLCTS.js → deterministicFonts-EOMDR6ZF.js} +3 -3
- package/dist/{dist-HUMFCJ6T.js → dist-2YYJYYPY.js} +3 -3
- package/dist/{dist-Z7Q3JS7K.js → dist-3MHXG6EJ.js} +4 -4
- package/dist/{doctor-WZB6WMBY.js → doctor-JOUGR5UK.js} +15 -15
- package/dist/{events-T4YFQC5G.js → events-63BKDWVO.js} +3 -3
- package/dist/{events-MUWJJCC7.js → events-FZFBJCIH.js} +2 -2
- package/dist/{feedback-AUTHQNN2.js → feedback-QLKWUDXR.js} +8 -8
- package/dist/{ffmpeg-TZB5WAYE.js → ffmpeg-MJFMBBSF.js} +2 -2
- package/dist/{figma-NBG6WBI7.js → figma-YJ7HGVQC.js} +3 -3
- package/dist/fontLocalizeCli.js +12 -12
- package/dist/{get-OXBJLKLV.js → get-54MUUXMR.js} +2 -2
- package/dist/{gpuPolicy-HBCCEQUS.js → gpuPolicy-5OVNR75D.js} +9 -9
- package/dist/{grade-compare-2LX4FDH7.js → grade-compare-7IDUF673.js} +32 -32
- package/dist/{gsapParserAcorn-VXZ3ZIF2.js → gsapParserAcorn-7NCK2LVT.js} +2 -2
- package/dist/{help-LJI46EDO.js → help-GQFYO5LU.js} +1 -1
- package/dist/{history-MFKAQEHU.js → history-UI3O7CSO.js} +77 -205
- package/dist/hyperframe-runtime.js +54 -54
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +54 -54
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-D6Y5O2QE.js → info-VQV3APEX.js} +9 -9
- package/dist/{init-47NZPEBI.js → init-2UBFV5D7.js} +31 -31
- package/dist/{inspect-U5UXJK5D.js → inspect-36ACJ3CO.js} +31 -31
- package/dist/{installer-AW7VFVTQ.js → installer-GDUZDJG4.js} +7 -7
- package/dist/{keyframes-5G334NWB.js → keyframes-GPBU34BG.js} +227 -82
- package/dist/{lambda-GASGXN3A.js → lambda-CBJVLTHY.js} +7 -7
- package/dist/{layout-OXAQFLJS.js → layout-2IHFV6EI.js} +31 -31
- package/dist/{lint-F36QFSNF.js → lint-IR6IYCEO.js} +9 -9
- package/dist/{lintProject-SSEXWCH6.js → lintProject-XQWXJYSC.js} +3 -3
- package/dist/{list-TR6QCI53.js → list-UAGKWARH.js} +2 -2
- package/dist/{login-6LA2RWTC.js → login-2GYCNCZF.js} +4 -4
- package/dist/{manager-ES2UFT4X.js → manager-X44GKUEL.js} +3 -3
- package/dist/{manager-GWU5J6RJ.js → manager-ZLJD3EAY.js} +2 -2
- package/dist/{media-treatment-BOHYDWVY.js → media-treatment-Z553F7XI.js} +14 -14
- package/dist/{models-6GW5Q3IW.js → models-6AZTNNSO.js} +15 -15
- package/dist/{motionShot-O7AOMPUN.js → motionShot-ARRL7WXT.js} +29 -16
- package/dist/{normalize-audio-UO5B4O76.js → normalize-audio-CME4NUB6.js} +6 -6
- package/dist/{open-JV2EHVKM.js → open-HU2VXUFD.js} +4 -4
- package/dist/{parakeetRunner-23DZUF6G.js → parakeetRunner-X5MKFMCB.js} +16 -16
- package/dist/{pipeline-KTICSIK7.js → pipeline-MNFTEBJU.js} +11 -11
- package/dist/{play-CMUYPXBC.js → play-2BBJDDAZ.js} +24 -24
- package/dist/{preflight-JOD4OXGC.js → preflight-JYOX64YP.js} +4 -4
- package/dist/{present-ZDT5FM2H.js → present-OE2WL2NY.js} +20 -20
- package/dist/{preview-ASHLGKDD.js → preview-RYSCCAWJ.js} +21 -21
- package/dist/{producer-FFH2KUAZ.js → producer-SQWNRO66.js} +1 -1
- package/dist/{projectConfig-FHIAOPKW.js → projectConfig-B55Z7YKQ.js} +9 -9
- package/dist/{publication-WO5ZXURT.js → publication-MDZCOBJP.js} +4 -4
- package/dist/{publish-QWO2W7FB.js → publish-AILV36BO.js} +12 -12
- package/dist/{remove-background-BO5MQR25.js → remove-background-6F72LKHG.js} +12 -12
- package/dist/{render-XTJKGT3G.js → render-2MZKU3L5.js} +10 -10
- package/dist/{render-SDHFXL3Y.js → render-5EREH6YD.js} +95 -37
- package/dist/{render-HS3YOLSD.js → render-6GH5FSXU.js} +5 -5
- package/dist/{render-batch-J64AJHQY.js → render-batch-UMBUQWWS.js} +5 -5
- package/dist/renderSetupWorker.js +6 -6
- package/dist/{resolver-IHNWMDJA.js → resolver-KO6WWO5P.js} +6 -6
- package/dist/{sherpa-FXBBYMDR.js → sherpa-DADGYWNR.js} +15 -15
- package/dist/skills/hyperframes/references/frame-worker-core.md +11 -9
- package/dist/skills/hyperframes/references/subagent-dispatch.md +1 -1
- package/dist/skills/hyperframes-cli/SKILL.md +3 -0
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +5 -1
- package/dist/skills/media-use/audio/scripts/lib/tts.cleanup.test.mjs +175 -0
- package/dist/skills/media-use/audio/scripts/lib/tts.mjs +24 -19
- package/dist/skills/media-use/references/grading.md +1 -2
- package/dist/skills/media-use/references/meta.md +17 -17
- package/dist/skills/media-use/references/operations.md +6 -6
- package/dist/skills/media-use/references/setup-providers.md +3 -4
- package/dist/skills/media-use/scripts/lib/cutlist.mjs +9 -2
- package/dist/skills/media-use/scripts/lib/cutlist.test.mjs +12 -0
- package/dist/skills/media-use/scripts/lib/telemetry.mjs +4 -1
- package/dist/skills/media-use/scripts/lib/telemetry.test.mjs +20 -0
- package/dist/skills/media-use/scripts/transcript-cut.mjs +23 -4
- package/dist/skills/media-use/scripts/transcript-cut.test.mjs +224 -0
- package/dist/{skills-ALLSN7TB.js → skills-QLKSNU4Y.js} +5 -5
- package/dist/{skillsUpdateCheck-EIT5NWM6.js → skillsUpdateCheck-Z2QQGF2W.js} +3 -3
- package/dist/{snapshot-Y3I76OIZ.js → snapshot-D5BBFXOS.js} +342 -154
- package/dist/{src-7V6LBC56.js → src-AVQBAECC.js} +10 -8
- package/dist/{src-S5IZVJUX.js → src-V7263E47.js} +11 -11
- package/dist/{staticProjectServer-QLWWGHZE.js → staticProjectServer-HNWSVEWN.js} +20 -20
- package/dist/studio/assets/{hyperframes-player-kup62bDR.js → hyperframes-player-0BY7-PK7.js} +1 -1
- package/dist/studio/assets/{index-B8BBYY8L.js → index-COrWdzlj.js} +1 -1
- package/dist/studio/assets/{index-CS_m0TkX.js → index-p-VXwuJ2.js} +132 -132
- package/dist/studio/assets/{index-DQ5jGodF.js → index-rmD5k_ES.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-UBFLZ3DA.js → studio-api-UXKTDWLT.js} +30 -16
- package/dist/{studioServer-REOVCIFP.js → studioServer-JOVR24O3.js} +51 -51
- package/dist/{synthesize-22B7L5GX.js → synthesize-MBDVUSH3.js} +2 -1
- package/dist/{telemetry-C3GDIXHO.js → telemetry-UW7XAM5W.js} +3 -3
- package/dist/{timeline-H42EGLMT.js → timeline-JSGTZ3AN.js} +73 -20
- package/dist/{tokens-2K7ISTKV.js → tokens-ADDBGTQ7.js} +2 -2
- package/dist/{transcribe-NUPASAUP.js → transcribe-FEHOK626.js} +14 -14
- package/dist/{transcribe-DVM7UFZZ.js → transcribe-P6MJGSZJ.js} +20 -20
- package/dist/{tts-QSAQZVEZ.js → tts-POI553RG.js} +1 -1
- package/dist/{updateCheck-3RWFSEZD.js → updateCheck-IBWMLXQ4.js} +2 -2
- package/dist/{upgrade-YKKL36N7.js → upgrade-NHZ7AYPO.js} +2 -2
- package/dist/{urlDownloader-6JNJYLPN.js → urlDownloader-ULDRBWS5.js} +8 -8
- package/dist/{validate-Z7KQT7GO.js → validate-NVWNXNBV.js} +25 -25
- package/dist/{video-EXL2JDSL.js → video-74DRD2DN.js} +9 -9
- package/package.json +1 -1
- package/dist/chunk-CEND6BLF.js +0 -3795
- package/dist/chunk-WBLXWOYK.js +0 -15
|
@@ -10,22 +10,22 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
launchManagedBrowser,
|
|
12
12
|
resolveManagedGpuMode
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4UMKAUZI.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveDiagnosticNavigationTimeoutMs,
|
|
16
16
|
windowsChromeCrashRemediation
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PKO2EWO7.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveLocalBrowserGpuMode,
|
|
20
20
|
resolveLocalWebGpu
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EVTHG34H.js";
|
|
22
22
|
import {
|
|
23
23
|
c
|
|
24
24
|
} from "./chunk-ZTZA4UWZ.js";
|
|
25
25
|
import {
|
|
26
26
|
assertWebGpuAdapterAvailable,
|
|
27
27
|
compositionRequiresWebGpu
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-EXH6L2XZ.js";
|
|
29
29
|
import {
|
|
30
30
|
normalizeErrorMessage
|
|
31
31
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -104,10 +104,10 @@ async function installPageFunctionGuard(page) {
|
|
|
104
104
|
}
|
|
105
105
|
async function openSettledCompositionPage(html, url, options) {
|
|
106
106
|
const viewport = resolveCompositionViewportFromHtml(html);
|
|
107
|
-
const { ensureBrowser, findSystemBrowser } = await import("./manager-
|
|
107
|
+
const { ensureBrowser, findSystemBrowser } = await import("./manager-ZLJD3EAY.js");
|
|
108
108
|
const browser = await ensureBrowser();
|
|
109
109
|
const puppeteer = await import("puppeteer-core");
|
|
110
|
-
const { buildChromeArgs } = await import("./src-
|
|
110
|
+
const { buildChromeArgs } = await import("./src-AVQBAECC.js");
|
|
111
111
|
const requestedGpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
|
|
112
112
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
113
113
|
let softwareWebGpu = false;
|
|
@@ -5691,6 +5691,9 @@ Parser.acorn = {
|
|
|
5691
5691
|
function parse3(input, options) {
|
|
5692
5692
|
return Parser.parse(input, options);
|
|
5693
5693
|
}
|
|
5694
|
+
function parseExpressionAt2(input, pos, options) {
|
|
5695
|
+
return Parser.parseExpressionAt(input, pos, options);
|
|
5696
|
+
}
|
|
5694
5697
|
|
|
5695
5698
|
// ../../node_modules/.bun/acorn-walk@8.3.5/node_modules/acorn-walk/dist/walk.mjs
|
|
5696
5699
|
function simple(node, visitors, baseVisitor, state, override) {
|
|
@@ -6052,6 +6055,7 @@ base.MethodDefinition = base.PropertyDefinition = base.Property = function(node,
|
|
|
6052
6055
|
|
|
6053
6056
|
export {
|
|
6054
6057
|
parse3 as parse,
|
|
6058
|
+
parseExpressionAt2 as parseExpressionAt,
|
|
6055
6059
|
simple,
|
|
6056
6060
|
ancestor,
|
|
6057
6061
|
full
|
|
@@ -15,8 +15,9 @@ import {
|
|
|
15
15
|
ancestor,
|
|
16
16
|
full,
|
|
17
17
|
parse,
|
|
18
|
+
parseExpressionAt,
|
|
18
19
|
simple
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TYXH3EKP.js";
|
|
20
21
|
import {
|
|
21
22
|
__toESM
|
|
22
23
|
} from "./chunk-M2WBOQ2Q.js";
|
|
@@ -2195,19 +2196,19 @@ function collectIdentifierBindingIndex(ast) {
|
|
|
2195
2196
|
}
|
|
2196
2197
|
}
|
|
2197
2198
|
function addBinding(bindings, scopeNode, name, selector) {
|
|
2198
|
-
let scoped = bindings.get(scopeNode);
|
|
2199
|
+
let scoped = bindings.byScope.get(scopeNode);
|
|
2199
2200
|
if (!scoped) {
|
|
2200
2201
|
scoped = /* @__PURE__ */ new Map();
|
|
2201
|
-
bindings.set(scopeNode, scoped);
|
|
2202
|
+
bindings.byScope.set(scopeNode, scoped);
|
|
2202
2203
|
}
|
|
2203
2204
|
if (!scoped.has(name)) scoped.set(name, selector);
|
|
2204
2205
|
}
|
|
2205
2206
|
function lookupBindingFromAncestors(name, ancestors, bindings) {
|
|
2206
2207
|
for (const scopeNode of scopeChainFromAncestors(ancestors)) {
|
|
2207
|
-
const selector = bindings.get(scopeNode)?.get(name);
|
|
2208
|
+
const selector = bindings.byScope.get(scopeNode)?.get(name);
|
|
2208
2209
|
if (selector !== void 0) return selector;
|
|
2209
2210
|
}
|
|
2210
|
-
return bindings.get(null)?.get(name) ?? null;
|
|
2211
|
+
return bindings.byScope.get(null)?.get(name) ?? null;
|
|
2211
2212
|
}
|
|
2212
2213
|
function isFunctionNode2(node) {
|
|
2213
2214
|
return node?.type === "ArrowFunctionExpression" || node?.type === "FunctionExpression" || node?.type === "FunctionDeclaration";
|
|
@@ -2246,7 +2247,7 @@ function collectScopeBindings(ast) {
|
|
|
2246
2247
|
return bindings;
|
|
2247
2248
|
}
|
|
2248
2249
|
function collectTargetBindings(ast, scope, identifierBindings) {
|
|
2249
|
-
const bindings = /* @__PURE__ */ new Map();
|
|
2250
|
+
const bindings = { byScope: /* @__PURE__ */ new Map(), identifiers: identifierBindings };
|
|
2250
2251
|
ancestor(ast, {
|
|
2251
2252
|
VariableDeclarator(node, _, ancestors) {
|
|
2252
2253
|
const name = node.id?.name;
|
|
@@ -2327,7 +2328,18 @@ function resolveTargetSelector(node, ancestors, scope, bindings) {
|
|
|
2327
2328
|
return typeof node.value === "string" ? node.value : null;
|
|
2328
2329
|
}
|
|
2329
2330
|
if (node.type === "Identifier") {
|
|
2330
|
-
|
|
2331
|
+
const bound = lookupBindingFromAncestors(node.name, ancestors, bindings);
|
|
2332
|
+
if (bound) return bound;
|
|
2333
|
+
const declaration = findVisibleIdentifierDeclaration(
|
|
2334
|
+
node.name,
|
|
2335
|
+
ancestors,
|
|
2336
|
+
bindings.identifiers,
|
|
2337
|
+
node.start
|
|
2338
|
+
);
|
|
2339
|
+
if (declaration?.kind !== "const" || bindings.identifiers.reassignedDeclarations.has(declaration.node))
|
|
2340
|
+
return null;
|
|
2341
|
+
const literal = resolveNode(declaration.node.init, scope);
|
|
2342
|
+
return typeof literal === "string" ? literal : null;
|
|
2331
2343
|
}
|
|
2332
2344
|
if (node.type === "CallExpression") {
|
|
2333
2345
|
return selectorFromQueryCall(node, scope);
|
|
@@ -2352,7 +2364,7 @@ function describeProxyTarget(targetNode, varsNode, scope) {
|
|
|
2352
2364
|
const onUpdate = findPropertyNode(varsNode, "onUpdate");
|
|
2353
2365
|
const driven = onUpdate ? drivenDomChannel(onUpdate) : void 0;
|
|
2354
2366
|
if (driven) return `proxy \u2192 ${driven}`;
|
|
2355
|
-
return "dwell/hold";
|
|
2367
|
+
return objNode.properties.length === 0 && !onUpdate ? "dwell/hold" : "proxy (unresolved DOM association)";
|
|
2356
2368
|
}
|
|
2357
2369
|
function isStyleAssignmentTarget(left) {
|
|
2358
2370
|
return left?.type === "MemberExpression" && left.object?.type === "MemberExpression" && left.object.property?.name === "style" && !!left.property?.name;
|
|
@@ -2871,6 +2883,8 @@ function tweenCallToAnimation(call, scope, source, identifierBindings) {
|
|
|
2871
2883
|
duration,
|
|
2872
2884
|
ease
|
|
2873
2885
|
};
|
|
2886
|
+
if (["stagger", "repeat", "repeatDelay", "delay"].some((key) => findPropertyNode(call.varsArg, key)))
|
|
2887
|
+
anim.inspectionTiming = inspectionTiming(call.varsArg, scope);
|
|
2874
2888
|
if (targetIdentity) anim.targetIdentity = targetIdentity;
|
|
2875
2889
|
if (!hasPositionArg) anim.implicitPosition = true;
|
|
2876
2890
|
let group = classifyTweenPropertyGroup(properties);
|
|
@@ -2893,14 +2907,51 @@ function tweenCallToAnimation(call, scope, source, identifierBindings) {
|
|
|
2893
2907
|
if (provenance) anim.provenance = provenance;
|
|
2894
2908
|
return anim;
|
|
2895
2909
|
}
|
|
2910
|
+
function inspectionTiming(varsNode, scope) {
|
|
2911
|
+
const numeric2 = (key) => {
|
|
2912
|
+
const node2 = findPropertyNode(varsNode, key);
|
|
2913
|
+
if (!node2) return 0;
|
|
2914
|
+
const value = resolveNode(node2, scope);
|
|
2915
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
2916
|
+
};
|
|
2917
|
+
const node = findPropertyNode(varsNode, "stagger");
|
|
2918
|
+
let stagger = { each: 0 };
|
|
2919
|
+
if (node) {
|
|
2920
|
+
const value = resolveNode(node, scope);
|
|
2921
|
+
stagger = typeof value === "number" ? { each: value } : null;
|
|
2922
|
+
if (node.type === "ObjectExpression" && !(node.properties ?? []).some(
|
|
2923
|
+
(p) => !["each", "amount", "from", "ease", "axis", "grid"].includes(propKeyName(p) ?? "")
|
|
2924
|
+
)) {
|
|
2925
|
+
const each = resolveNode(findPropertyNode(node, "each"), scope);
|
|
2926
|
+
const amount = resolveNode(findPropertyNode(node, "amount"), scope);
|
|
2927
|
+
if (!findPropertyNode(node, "grid") && !findPropertyNode(node, "axis")) {
|
|
2928
|
+
if (typeof amount === "number") stagger = { amount };
|
|
2929
|
+
else if (typeof each === "number") stagger = { each };
|
|
2930
|
+
}
|
|
2931
|
+
}
|
|
2932
|
+
}
|
|
2933
|
+
return {
|
|
2934
|
+
repeat: numeric2("repeat"),
|
|
2935
|
+
repeatDelay: numeric2("repeatDelay"),
|
|
2936
|
+
delay: numeric2("delay"),
|
|
2937
|
+
stagger
|
|
2938
|
+
};
|
|
2939
|
+
}
|
|
2896
2940
|
function staggerAmount(raw) {
|
|
2897
2941
|
if (typeof raw === "number") return raw;
|
|
2898
2942
|
if (typeof raw !== "string") return void 0;
|
|
2899
2943
|
const src = raw.startsWith("__raw:") ? raw.slice(6) : raw;
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2944
|
+
try {
|
|
2945
|
+
const node = parseExpressionAt(src, 0, { ecmaVersion: "latest" });
|
|
2946
|
+
if (src.slice(node.end).trim()) return void 0;
|
|
2947
|
+
const value = resolveNode(
|
|
2948
|
+
node.type === "ObjectExpression" ? findPropertyNode(node, "each") : node,
|
|
2949
|
+
/* @__PURE__ */ new Map()
|
|
2950
|
+
);
|
|
2951
|
+
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
2952
|
+
} catch {
|
|
2953
|
+
return void 0;
|
|
2954
|
+
}
|
|
2904
2955
|
}
|
|
2905
2956
|
function restValue(prop) {
|
|
2906
2957
|
return prop === "opacity" || prop.startsWith("scale") ? 1 : 0;
|
|
@@ -10,17 +10,17 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
ensureBrowser,
|
|
12
12
|
findBrowser
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LBT4AMSF.js";
|
|
14
14
|
import {
|
|
15
15
|
chromeDepsInstallCommand,
|
|
16
16
|
detectLinuxDistro,
|
|
17
17
|
distroLabel,
|
|
18
18
|
getFFmpegInstallHint,
|
|
19
19
|
parseLddMissingLibs
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4MLYMDQ4.js";
|
|
21
21
|
import {
|
|
22
22
|
runCancellableProcess
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-54DMWFQZ.js";
|
|
24
24
|
import {
|
|
25
25
|
FFMPEG_PATH_ENV,
|
|
26
26
|
FFPROBE_PATH_ENV,
|
|
@@ -6,10 +6,10 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
getMimeType
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HBCRRCTX.js";
|
|
10
10
|
import {
|
|
11
11
|
injectTagsAtHeadStart
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-S3RCK56N.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/compositionServer.ts
|
|
15
15
|
import { createHash } from "crypto";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
formatPreviewProxyBox,
|
|
10
10
|
hdrToSdrToneMapFilter,
|
|
11
11
|
parseFirstFrameColour
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5ERVRJMV.js";
|
|
13
13
|
import {
|
|
14
14
|
decodeAuthoredAttribute,
|
|
15
15
|
scanHtmlOpeningTags
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VYKPBRCB.js";
|
|
17
17
|
import {
|
|
18
18
|
mkdirWithinProject,
|
|
19
19
|
realProjectRoot,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
rewriteAssetPath
|
|
33
33
|
} from "./chunk-BSQ7XANM.js";
|
|
34
34
|
|
|
35
|
-
// ../studio-server/dist/chunk-
|
|
35
|
+
// ../studio-server/dist/chunk-FKJBNFWA.js
|
|
36
36
|
import { statSync } from "fs";
|
|
37
37
|
import { sep } from "path";
|
|
38
38
|
import { execFile } from "child_process";
|
|
@@ -336,7 +336,7 @@ async function scanProjectMediaCodecMap(projectDir, htmlSources, options = {}) {
|
|
|
336
336
|
return map;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
// ../studio-server/dist/chunk-
|
|
339
|
+
// ../studio-server/dist/chunk-JTPV2T3F.js
|
|
340
340
|
import { spawn } from "child_process";
|
|
341
341
|
import { createHash, randomUUID } from "crypto";
|
|
342
342
|
import { existsSync as existsSync2, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, utimesSync } from "fs";
|
|
@@ -0,0 +1,30 @@
|
|
|
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/utils/checkSnapshotDirectory.ts
|
|
9
|
+
import { randomUUID } from "crypto";
|
|
10
|
+
import { join, resolve } from "path";
|
|
11
|
+
var runDirectories = /* @__PURE__ */ new Map();
|
|
12
|
+
function checkSnapshotDirectory(projectDir) {
|
|
13
|
+
const project = resolve(projectDir);
|
|
14
|
+
let directory = runDirectories.get(project);
|
|
15
|
+
if (!directory) {
|
|
16
|
+
directory = join(project, ".hyperframes", "artifacts", "snapshots", randomUUID());
|
|
17
|
+
runDirectories.set(project, directory);
|
|
18
|
+
}
|
|
19
|
+
return directory;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// src/utils/checkTypes.ts
|
|
23
|
+
function rectToBbox(rect) {
|
|
24
|
+
return { x: rect.left, y: rect.top, width: rect.width, height: rect.height };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
checkSnapshotDirectory,
|
|
29
|
+
rectToBbox
|
|
30
|
+
};
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
extractMediaSrcMutations,
|
|
26
26
|
isSafeMediaUrl,
|
|
27
27
|
resolveAliasDisplayName
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-3VGU2SH7.js";
|
|
29
29
|
import {
|
|
30
30
|
findFfBinary
|
|
31
31
|
} from "./chunk-VAS6HQX3.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
parse,
|
|
51
51
|
simple
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-TYXH3EKP.js";
|
|
53
53
|
import {
|
|
54
54
|
isSceneLikeCompositionId,
|
|
55
55
|
parseSlideshowManifest,
|
|
@@ -7437,18 +7437,18 @@ function deriveDurationFromClips(tags, rootTag) {
|
|
|
7437
7437
|
return resolveCompositionDuration({ authoredDurationSeconds: null, clipEndsSeconds: clipEnds });
|
|
7438
7438
|
}
|
|
7439
7439
|
async function loadParseGsapScript() {
|
|
7440
|
-
const mod = await import("./gsapParserAcorn-
|
|
7440
|
+
const mod = await import("./gsapParserAcorn-7NCK2LVT.js");
|
|
7441
7441
|
return mod.parseGsapScriptAcorn;
|
|
7442
7442
|
}
|
|
7443
7443
|
async function loadGsapScriptMotionPathFirstUseIndex() {
|
|
7444
|
-
const mod = await import("./gsapParserAcorn-
|
|
7444
|
+
const mod = await import("./gsapParserAcorn-7NCK2LVT.js");
|
|
7445
7445
|
return mod.gsapScriptMotionPathFirstUseIndex;
|
|
7446
7446
|
}
|
|
7447
7447
|
var SCENE_BOUNDARY_EPSILON_SECONDS = 0.05;
|
|
7448
7448
|
var UNRESOLVED_TARGET = "__unresolved__";
|
|
7449
7449
|
function targetHasNoStableIdentity(selector, identity) {
|
|
7450
7450
|
if (identity) return false;
|
|
7451
|
-
return selector === UNRESOLVED_TARGET || selector === "dwell/hold" || selector.startsWith("proxy
|
|
7451
|
+
return selector === UNRESOLVED_TARGET || selector === "dwell/hold" || selector.startsWith("proxy ");
|
|
7452
7452
|
}
|
|
7453
7453
|
function unwrapRaw(value) {
|
|
7454
7454
|
if (typeof value === "number") return value;
|
|
@@ -10390,6 +10390,9 @@ var MASK_IMAGE_URL_RE = /\b(?:-webkit-)?mask-image\s*:\s*[^;{}]*url\(\s*(?:"([^"
|
|
|
10390
10390
|
function isLocalStylesheetHref(href) {
|
|
10391
10391
|
return !!href && !/^(https?:|data:|blob:|\/\/)/i.test(href);
|
|
10392
10392
|
}
|
|
10393
|
+
function staysInsideProjectRoot(href) {
|
|
10394
|
+
return !href.startsWith("/") && !href.split("/").includes("..");
|
|
10395
|
+
}
|
|
10393
10396
|
function collectLocalStylesheets(projectDir, document, compSrcPath) {
|
|
10394
10397
|
const styles = [];
|
|
10395
10398
|
for (const link of querySelectorAllIncludingTemplates(document, "link")) {
|
|
@@ -10397,14 +10400,12 @@ function collectLocalStylesheets(projectDir, document, compSrcPath) {
|
|
|
10397
10400
|
if (!rel.split(/\s+/).some((part) => part.toLowerCase() === "stylesheet")) continue;
|
|
10398
10401
|
const href = link.getAttribute("href") ?? "";
|
|
10399
10402
|
if (!isLocalStylesheetHref(href)) continue;
|
|
10400
|
-
const
|
|
10401
|
-
const stylesheet = resolveExistingLocalAsset(projectDir,
|
|
10403
|
+
const besideFile = compSrcPath ? join2(dirname(compSrcPath), href) : href;
|
|
10404
|
+
const stylesheet = resolveExistingLocalAsset(projectDir, besideFile) ?? (compSrcPath && staysInsideProjectRoot(href) ? resolveExistingLocalAsset(projectDir, href) : null);
|
|
10402
10405
|
if (!stylesheet) continue;
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
rootRelativePath: stylesheet.rootRelativePath
|
|
10407
|
-
});
|
|
10406
|
+
const read = readProjectFile(stylesheet.resolved);
|
|
10407
|
+
if (read.kind !== "file") continue;
|
|
10408
|
+
styles.push({ href, content: read.text, rootRelativePath: stylesheet.rootRelativePath });
|
|
10408
10409
|
}
|
|
10409
10410
|
return styles;
|
|
10410
10411
|
}
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
DEFAULT_VP9_CPU_USED,
|
|
9
9
|
isHttpUrl,
|
|
10
10
|
runFfmpeg
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EXH6L2XZ.js";
|
|
12
12
|
import {
|
|
13
13
|
parseAnimatedGifMetadata
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5ERVRJMV.js";
|
|
15
15
|
import {
|
|
16
16
|
parseHTML
|
|
17
17
|
} from "./chunk-SDYDNHEE.js";
|
|
@@ -6,30 +6,30 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
redactHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PTXZDSW5.js";
|
|
10
10
|
import "./chunk-Z27A7NUB.js";
|
|
11
11
|
import "./chunk-5ETJX6WM.js";
|
|
12
12
|
import {
|
|
13
13
|
loadProducer
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-3E4OCOC5.js";
|
|
15
|
+
import "./chunk-HBCRRCTX.js";
|
|
16
|
+
import "./chunk-PRXAOZWZ.js";
|
|
17
|
+
import "./chunk-C6TPGUWD.js";
|
|
17
18
|
import {
|
|
18
19
|
DEFAULT_HISTORY_ROOT,
|
|
19
20
|
listProjectHistories,
|
|
20
21
|
pruneGoneProjectHistories
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-XXPYZBZ3.js";
|
|
22
|
+
} from "./chunk-7FYFEXD2.js";
|
|
23
23
|
import {
|
|
24
24
|
CACHE_DIR_NAME,
|
|
25
25
|
cleanupProxyCache
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-XINGD6MS.js";
|
|
27
|
+
import "./chunk-FFDC5OWV.js";
|
|
28
28
|
import {
|
|
29
29
|
formatBytes
|
|
30
30
|
} from "./chunk-K2FLNJVB.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-WUUOFMHU.js";
|
|
32
|
+
import "./chunk-5CS4T6C6.js";
|
|
33
33
|
import "./chunk-XBSPQ52S.js";
|
|
34
34
|
import {
|
|
35
35
|
defineCommand
|
|
@@ -42,49 +42,49 @@ import {
|
|
|
42
42
|
} from "./chunk-ZTZA4UWZ.js";
|
|
43
43
|
import "./chunk-EOOEC32M.js";
|
|
44
44
|
import "./chunk-TJSTGSAW.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-LBT4AMSF.js";
|
|
46
46
|
import {
|
|
47
47
|
withMeta
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-YYEYOFHW.js";
|
|
49
49
|
import "./chunk-K4WIOZFP.js";
|
|
50
50
|
import "./chunk-XUXGIA7H.js";
|
|
51
51
|
import "./chunk-WERLJGIC.js";
|
|
52
52
|
import "./chunk-ISN5GRYI.js";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-IZIRIDJH.js";
|
|
54
54
|
import "./chunk-3DKN5WKL.js";
|
|
55
55
|
import "./chunk-EOVYQ3IG.js";
|
|
56
56
|
import "./chunk-6BEFEWFB.js";
|
|
57
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-4MLYMDQ4.js";
|
|
58
58
|
import "./chunk-AMKC3AXA.js";
|
|
59
59
|
import {
|
|
60
60
|
EXTRACT_CACHE_MIN_AGE_MS,
|
|
61
61
|
directorySizeBytes,
|
|
62
62
|
gcExtractionCache,
|
|
63
63
|
resolveExtractCacheDir
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import "./chunk-
|
|
64
|
+
} from "./chunk-EXH6L2XZ.js";
|
|
65
|
+
import "./chunk-RN5I2DP5.js";
|
|
66
66
|
import "./chunk-NE55C6S5.js";
|
|
67
67
|
import "./chunk-JYVGYKXG.js";
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
68
|
+
import "./chunk-5ERVRJMV.js";
|
|
69
|
+
import "./chunk-S3RCK56N.js";
|
|
70
70
|
import "./chunk-VC76R6W2.js";
|
|
71
71
|
import "./chunk-UJKQWGFF.js";
|
|
72
|
-
import "./chunk-
|
|
72
|
+
import "./chunk-VYKPBRCB.js";
|
|
73
73
|
import "./chunk-OFQWTKPW.js";
|
|
74
74
|
import "./chunk-DPVXBVLL.js";
|
|
75
75
|
import "./chunk-T76PLPD6.js";
|
|
76
76
|
import "./chunk-FXMKHHPO.js";
|
|
77
77
|
import "./chunk-RQVDTPGD.js";
|
|
78
|
-
import "./chunk-
|
|
78
|
+
import "./chunk-54DMWFQZ.js";
|
|
79
79
|
import "./chunk-TWWSYAKJ.js";
|
|
80
|
-
import "./chunk-
|
|
80
|
+
import "./chunk-YOEGUBBY.js";
|
|
81
81
|
import "./chunk-IWFLMU2N.js";
|
|
82
|
-
import "./chunk-
|
|
82
|
+
import "./chunk-3VGU2SH7.js";
|
|
83
83
|
import "./chunk-VAS6HQX3.js";
|
|
84
84
|
import "./chunk-3RM2ETQT.js";
|
|
85
85
|
import "./chunk-BSQ7XANM.js";
|
|
86
86
|
import "./chunk-SDYDNHEE.js";
|
|
87
|
-
import "./chunk-
|
|
87
|
+
import "./chunk-TYXH3EKP.js";
|
|
88
88
|
import "./chunk-IXLUTE6N.js";
|
|
89
89
|
import "./chunk-KNU5COPB.js";
|
|
90
90
|
import "./chunk-KGPLIH7B.js";
|
|
@@ -94,11 +94,11 @@ import "./chunk-M2WBOQ2Q.js";
|
|
|
94
94
|
// src/commands/clean.ts
|
|
95
95
|
import { existsSync, readFileSync, realpathSync, rmSync } from "fs";
|
|
96
96
|
import { tmpdir } from "os";
|
|
97
|
-
import { join, resolve } from "path";
|
|
97
|
+
import { isAbsolute, join, relative, resolve } from "path";
|
|
98
98
|
var examples = [
|
|
99
99
|
["See what HyperFrames left on disk, remove nothing", "hyperframes clean --dry-run"],
|
|
100
100
|
["Remove it", "hyperframes clean"],
|
|
101
|
-
["Also remove
|
|
101
|
+
["Also remove snapshots and saved check reports", "hyperframes clean --snapshots"],
|
|
102
102
|
["For agents", "hyperframes clean --json"]
|
|
103
103
|
];
|
|
104
104
|
var OWNERLESS_IDLE_MS = 6 * 60 * 60 * 1e3;
|
|
@@ -160,16 +160,33 @@ function sweepProxies(sweep, project) {
|
|
|
160
160
|
bytes: swept.bytesBefore - swept.bytesAfter
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
+
var SNAPSHOT_FOLDERS = [
|
|
164
|
+
{ what: "Snapshots", path: ["snapshots"] },
|
|
165
|
+
{ what: "Snapshots", path: [".hyperframes", "artifacts", "snapshots"] },
|
|
166
|
+
{ what: "Check reports", path: [".hyperframes", "artifacts", "checks"] }
|
|
167
|
+
];
|
|
168
|
+
function staysUnderArtifacts(project, path, folder) {
|
|
169
|
+
try {
|
|
170
|
+
const allowed = join(realpathSync(project), ...folder);
|
|
171
|
+
const target = realpathSync(path);
|
|
172
|
+
const fromAllowed = relative(allowed, target);
|
|
173
|
+
return fromAllowed === "" || !fromAllowed.startsWith("..") && !isAbsolute(fromAllowed);
|
|
174
|
+
} catch {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
163
178
|
function sweepSnapshots(sweep, project, remove) {
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
179
|
+
for (const folder of SNAPSHOT_FOLDERS) {
|
|
180
|
+
const path = join(project, ...folder.path);
|
|
181
|
+
if (!existsSync(path) || !staysUnderArtifacts(project, path, folder.path)) continue;
|
|
182
|
+
if (remove) drop(sweep, folder.what, path);
|
|
183
|
+
else
|
|
184
|
+
sweep.result.alsoReclaimable.push({
|
|
185
|
+
what: folder.what,
|
|
186
|
+
path,
|
|
187
|
+
bytes: directorySizeBytes(path)
|
|
188
|
+
});
|
|
189
|
+
}
|
|
173
190
|
}
|
|
174
191
|
async function sweepHistories(sweep, historyRoot, tempDir) {
|
|
175
192
|
const pruned = await pruneGoneProjectHistories(historyRoot, {
|
|
@@ -256,7 +273,11 @@ var clean_default = defineCommand({
|
|
|
256
273
|
description: "List what would be removed, remove nothing",
|
|
257
274
|
default: false
|
|
258
275
|
},
|
|
259
|
-
snapshots: {
|
|
276
|
+
snapshots: {
|
|
277
|
+
type: "boolean",
|
|
278
|
+
description: "Also remove snapshots/ and .hyperframes/artifacts/{snapshots,checks}/ folders",
|
|
279
|
+
default: false
|
|
280
|
+
},
|
|
260
281
|
json: { type: "boolean", description: "Output as JSON", default: false }
|
|
261
282
|
},
|
|
262
283
|
async run({ args }) {
|