hyperframes 0.8.167 → 0.8.169
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-2FUXQRJJ.js → add-7GLP4BPM.js} +13 -13
- package/dist/{animatedGifPrep-LJ4MZ55T.js → animatedGifPrep-NEBEGVSO.js} +8 -8
- package/dist/api.js +14 -14
- package/dist/{asset-WJ4RZBOZ.js → asset-RORTT5HS.js} +2 -2
- package/dist/{assetCataloger-YEOLIVRC.js → assetCataloger-RLJ6MDGF.js} +8 -8
- package/dist/{audio-BMQGWYBM.js → audio-OKDGU7TY.js} +14 -14
- package/dist/{auth-2N7I575Y.js → auth-QWYNCU5U.js} +1 -1
- package/dist/{autoUpdate-QNWSYJTZ.js → autoUpdate-EDJJPWAU.js} +2 -2
- package/dist/{backgroundChecks-7XFS3DIS.js → backgroundChecks-KQR6FGVU.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-H5NAWIHY.js → batchRender-YKTTAIHH.js} +4 -4
- package/dist/{beats-YPFOOARR.js → beats-I6AGLTLW.js} +5 -5
- package/dist/{benchmark-HPF6KC73.js → benchmark-NBSV7PNB.js} +9 -9
- package/dist/{browser-326JM225.js → browser-FPEL5FGW.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-4L7VGKHX.js → bundleWithLocalizedFonts-TYQXMNSU.js} +2 -2
- package/dist/{capture-R5AUVH3R.js → capture-5BRJJMZB.js} +2 -2
- package/dist/{capture-62S3EEMN.js → capture-FXGOI23U.js} +12 -11
- package/dist/{catalog-GLYTZLPC.js → catalog-SG3ZIS45.js} +13 -13
- package/dist/{catch-up-F7X7ITIH.js → catch-up-ETXUT6Q5.js} +4 -4
- package/dist/{check-ZTQ4E5YO.js → check-KXNNIEUR.js} +100 -43
- package/dist/{checkBrowser-OGMICBTZ.js → checkBrowser-546UMI3N.js} +39 -31
- package/dist/{chunk-G7HJCDEI.js → chunk-2F4HJFGW.js} +2 -2
- package/dist/{chunk-EN4ZEUT3.js → chunk-5ETJPA5Z.js} +10 -9
- package/dist/{chunk-PYKY63GT.js → chunk-5FWVFCQM.js} +3 -3
- package/dist/{chunk-2TD4V5YU.js → chunk-5SQHHBAR.js} +1 -1
- package/dist/{chunk-BGPZWFYO.js → chunk-7635SDI5.js} +2 -2
- package/dist/{chunk-4U5FN6FY.js → chunk-7FHFPHEM.js} +24 -16
- package/dist/{chunk-35GLXVUG.js → chunk-A6K7M46D.js} +1 -1
- package/dist/{chunk-IDVQ5AH7.js → chunk-AP5AVVAB.js} +1 -1
- package/dist/chunk-BIV5HVTQ.js +3803 -0
- package/dist/{chunk-LF6E6N2U.js → chunk-BNEKKUPG.js} +2 -2
- package/dist/{chunk-6RSBA4XV.js → chunk-CESKA6VO.js} +1 -1
- package/dist/{chunk-2INCSLFS.js → chunk-CNP6AMFM.js} +2 -2
- package/dist/{chunk-JK2AETXO.js → chunk-DCG22HKT.js} +10 -7
- package/dist/{chunk-EMHFQAFH.js → chunk-EELTMBCC.js} +1 -1
- package/dist/{chunk-CBNI34SD.js → chunk-EEP5Y5IE.js} +1 -1
- package/dist/{chunk-WPNE5NEP.js → chunk-EFP25BUY.js} +19 -5
- package/dist/{chunk-Y5HGSWD6.js → chunk-FQJDV2RI.js} +1 -1
- package/dist/{chunk-C6XFNWHU.js → chunk-FSX7GTBB.js} +1 -1
- package/dist/{chunk-FETB6SFI.js → chunk-GVX2443P.js} +2 -2
- package/dist/{chunk-J4OSFRO6.js → chunk-J5Z56PU3.js} +1 -1
- package/dist/{chunk-MZSP2FH7.js → chunk-JPN7SVWC.js} +7 -7
- package/dist/{chunk-5HKZOQEV.js → chunk-K5PU5ISL.js} +1 -1
- package/dist/{chunk-55IKX25I.js → chunk-KA4LSAD5.js} +1 -1
- package/dist/{chunk-OZJ4L6SJ.js → chunk-M4N6IHCQ.js} +1 -1
- package/dist/{chunk-ZWZFBVMS.js → chunk-MCPDZWZY.js} +4 -4
- package/dist/{chunk-DWMCUUAQ.js → chunk-NKG3LTPI.js} +10 -5
- package/dist/{chunk-Q2WGWWJ5.js → chunk-O3J7BHBU.js} +10 -2
- package/dist/{chunk-3VGU2SH7.js → chunk-OYLO6TYK.js} +8 -1
- package/dist/{chunk-AATVO56S.js → chunk-P24X6CGY.js} +14 -10
- package/dist/{chunk-W3B37KCA.js → chunk-PLWORQFC.js} +36 -33
- package/dist/{chunk-7DJLJH2Y.js → chunk-PVTHDNDZ.js} +1 -1
- package/dist/{chunk-BNH73WSR.js → chunk-Q5K73VW3.js} +2 -2
- package/dist/{chunk-KIWXOYBU.js → chunk-QD5VJOQK.js} +3 -3
- package/dist/{chunk-5XNGYXPW.js → chunk-QLHXC4E6.js} +1 -1
- package/dist/{chunk-VZG6DZ5O.js → chunk-RUYYAL3T.js} +3 -3
- package/dist/{chunk-CXUV24HM.js → chunk-RZKQ3G6B.js} +2 -2
- package/dist/{chunk-J53OCC2V.js → chunk-S6U7YLPJ.js} +1 -1
- package/dist/{chunk-Q2RNXOAQ.js → chunk-SJPNVLYS.js} +2 -2
- package/dist/{chunk-P7H2MOWB.js → chunk-T4HL3SZH.js} +2 -2
- package/dist/{chunk-YQ5NJCC4.js → chunk-TEFHMDVR.js} +2 -2
- package/dist/{chunk-YKMJPYNJ.js → chunk-TVDXMJ43.js} +11 -5
- package/dist/{chunk-4PCIW2XN.js → chunk-U7P2XTRY.js} +2 -2
- package/dist/{chunk-OI3K7RJZ.js → chunk-UCNQE52B.js} +2843 -2673
- package/dist/{chunk-QQCZVVUZ.js → chunk-UISU4SYG.js} +1 -1
- package/dist/{chunk-LJ7BKHGT.js → chunk-VCXVZRR2.js} +1 -1
- package/dist/{chunk-QCRKQ6BY.js → chunk-WAVFNZB7.js} +27 -2
- package/dist/chunk-WICIV6R3.js +42 -0
- package/dist/{chunk-AURMZPQ4.js → chunk-XJQ6NN2L.js} +13 -11
- package/dist/{chunk-FJ6SHMJW.js → chunk-XK5SZNYE.js} +10 -10
- package/dist/{chunk-HAQ4PMF6.js → chunk-XZNHVWDD.js} +37 -15
- package/dist/{chunk-5GMAX6HC.js → chunk-YLAREDAU.js} +1 -1
- package/dist/{chunk-ALLKNYC3.js → chunk-YMS5FOMC.js} +31 -18
- package/dist/{chunk-Q4ZMV6RN.js → chunk-YT6TFGIS.js} +7 -7
- package/dist/{chunk-NA7LBT7C.js → chunk-YZRS3COO.js} +1 -1
- package/dist/{chunk-N6HMVHOI.js → chunk-ZFJ5RI7A.js} +3 -3
- package/dist/{clean-TZVC4SUY.js → clean-ARH23EGW.js} +14 -14
- package/dist/cli.js +53 -53
- package/dist/{cloud-G4Z54NRA.js → cloud-GBY7MRZM.js} +4 -4
- package/dist/{cloudrun-ZKWTTLXC.js → cloudrun-HBVA5UZB.js} +16 -11
- package/dist/commands/layout-audit.browser.js +16 -1
- package/dist/{compare-HING5JY7.js → compare-Z4YNESYN.js} +27 -26
- package/dist/{compiler-E37DHG6R.js → compiler-6WJ5SVTD.js} +5 -5
- package/dist/{component-3Y6DSDDQ.js → component-AR4MS4R7.js} +3 -3
- package/dist/{compositions-7PCJJOSO.js → compositions-ERZVZBYW.js} +12 -12
- package/dist/{delete-C5SIXVQK.js → delete-NWSW3BET.js} +2 -2
- package/dist/{deploy-5G4Z6LPA.js → deploy-4MK3Y67M.js} +1 -0
- package/dist/{deterministicFonts-35AC2PM5.js → deterministicFonts-KXVO7QEL.js} +2 -2
- package/dist/{dist-4PRLFYDO.js → dist-OTCFZEKF.js} +2 -2
- package/dist/{dist-KGU4NOEC.js → dist-VKLSNKRZ.js} +7 -3
- package/dist/{doctor-6LFPX5YC.js → doctor-P4QZQRCB.js} +10 -10
- package/dist/{events-27DBZEP2.js → events-F2UVJQIC.js} +2 -2
- package/dist/{events-YS3ENMS3.js → events-SV46AWMI.js} +3 -3
- package/dist/{feedback-62AUX5Q6.js → feedback-XS4IK6SW.js} +7 -7
- package/dist/{figma-5CYPKHNK.js → figma-DELISEUP.js} +3 -3
- package/dist/fontLocalizeCli.js +11 -11
- package/dist/{get-HC5BWFCU.js → get-DNGXCEFB.js} +2 -2
- package/dist/{gpuPolicy-VGSKTQFS.js → gpuPolicy-JG5PUOJP.js} +8 -8
- package/dist/{grade-compare-DASDOOLU.js → grade-compare-F46JWE4O.js} +27 -26
- package/dist/{help-7MQDFXVN.js → help-XVEBMX3U.js} +1 -1
- package/dist/{history-JV2YA7L3.js → history-NS4PKG4S.js} +6 -6
- package/dist/hyperframe-runtime.js +73 -71
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +73 -71
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-63STYEXL.js → info-DJ6VNESS.js} +8 -8
- package/dist/{init-KBDCFLPO.js → init-TSRTMVRN.js} +23 -23
- package/dist/{inspect-NZ7UNTDK.js → inspect-VTZXXDJ4.js} +28 -27
- package/dist/{installer-T4SRTKAU.js → installer-3ERHU4CD.js} +6 -6
- package/dist/{keyframes-3UIA2BOO.js → keyframes-6DN7BOYJ.js} +6 -6
- package/dist/{lambda-X6XMGMTI.js → lambda-RCOIEGL6.js} +31 -18
- package/dist/{layout-V2M6NI2A.js → layout-FFGRLVK4.js} +28 -27
- package/dist/{lint-26QGRXLI.js → lint-MBYIDFKS.js} +8 -8
- package/dist/{lintProject-HV3FBMTU.js → lintProject-PXB5Y6TX.js} +2 -2
- package/dist/{list-RVNMXLPY.js → list-KEZDFW5R.js} +2 -2
- package/dist/{login-M2YCAF3T.js → login-7ZV374QL.js} +4 -4
- package/dist/{media-treatment-6BYVQUWN.js → media-treatment-LGWWRXAX.js} +11 -11
- package/dist/{models-4UWTBP2J.js → models-TC4K6UQP.js} +11 -11
- package/dist/{motionShot-UZV3LG77.js → motionShot-4E3RTV5O.js} +16 -15
- package/dist/{normalize-audio-UR6UPRSM.js → normalize-audio-XCGB2IQP.js} +4 -4
- package/dist/{open-K4N4KEFK.js → open-JNNJSNTH.js} +4 -4
- package/dist/{parakeetRunner-TH572YPQ.js → parakeetRunner-S3DG4BJB.js} +11 -11
- package/dist/{pipeline-4OUHSCE5.js → pipeline-3SIYCBLU.js} +8 -8
- package/dist/{play-GSGWTHJT.js → play-LBPOOD3V.js} +19 -19
- package/dist/{present-GWODJH4A.js → present-PWEN5SDL.js} +15 -15
- package/dist/{preview-UUP7CTJM.js → preview-IS32RLKM.js} +18 -18
- package/dist/{producer-F3LUI2LX.js → producer-4UUUEPPS.js} +1 -1
- package/dist/{projectConfig-LBESGIM6.js → projectConfig-K347VIO3.js} +8 -8
- package/dist/{publication-IGLVPFKB.js → publication-4CQS532O.js} +3 -3
- package/dist/{publish-GVDRYMZG.js → publish-OJYF37FY.js} +10 -10
- package/dist/{remove-background-3UDPJWO3.js → remove-background-HO6YL2HU.js} +9 -9
- package/dist/{render-5VSZHPI5.js → render-L76SEAMC.js} +11 -6
- package/dist/{render-C2MSWN5Q.js → render-Q6QAXJCN.js} +9 -9
- package/dist/{render-QRPLO4OB.js → render-QBQYF2NC.js} +33 -25
- package/dist/{render-batch-YHCKNGLG.js → render-batch-JLANN5Y2.js} +10 -6
- package/dist/renderSetupWorker.js +2 -2
- package/dist/{resolver-K7Q63AW3.js → resolver-EDUM4DHG.js} +5 -5
- package/dist/{sherpa-OEIK4HXX.js → sherpa-QEM5XYHD.js} +10 -10
- package/dist/skills/hyperframes/references/skill-lifecycle.md +2 -0
- package/dist/{skills-ISZSXESC.js → skills-FSZK6FIG.js} +30 -5
- package/dist/{skillsUpdateCheck-2B3CBX4A.js → skillsUpdateCheck-3354HXDJ.js} +3 -3
- package/dist/{snapshot-J3JKFCYO.js → snapshot-5VVMFEMM.js} +30 -29
- package/dist/{src-ICUQBWEX.js → src-RYILCNU7.js} +10 -10
- package/dist/{src-MWQCXKWJ.js → src-ZGMLMQ3B.js} +7 -7
- package/dist/{staticProjectServer-2HPLMJLH.js → staticProjectServer-PIVSGEAO.js} +15 -15
- package/dist/studio/assets/{hyperframes-player-CJibUtA8.js → hyperframes-player-B04Yx96S.js} +1 -1
- package/dist/studio/assets/{index-BS3d2Qdc.js → index-D2e0J6kh.js} +4 -4
- package/dist/studio/assets/{index-CDE2YLhz.js → index-D9CDX_Rr.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-AHUWLJBD.js → studio-api-PHADR6VB.js} +9 -9
- package/dist/{studioServer-IBAIGIJD.js → studioServer-5AVDKN5V.js} +41 -40
- package/dist/{telemetry-BSURLTGR.js → telemetry-JCTHMPSB.js} +3 -3
- package/dist/{timeline-YTVVCN6P.js → timeline-QU2F6R2M.js} +34 -21
- package/dist/{tokens-EIXAERED.js → tokens-YYK4G36C.js} +2 -2
- package/dist/{transcribe-2CYSICME.js → transcribe-7ORH7R6O.js} +9 -9
- package/dist/{transcribe-TE7EPNEM.js → transcribe-PRG4FLLA.js} +15 -15
- package/dist/{updateCheck-BI3OKPO4.js → updateCheck-NV7QNANK.js} +2 -2
- package/dist/{upgrade-JU4JXYBU.js → upgrade-UZXN36J2.js} +2 -2
- package/dist/{urlDownloader-IVYOAE6Q.js → urlDownloader-AW57H722.js} +7 -7
- package/dist/{validate-I4PVO46Y.js → validate-QD53ABUM.js} +22 -21
- package/dist/{video-WXQT3G5A.js → video-VLVPYQQR.js} +8 -8
- package/package.json +1 -1
- package/dist/chunk-DJ6L4NZU.js +0 -3795
|
@@ -4,9 +4,16 @@ 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
|
+
inAgentSandbox,
|
|
9
|
+
isOneProcessOverPipe,
|
|
10
|
+
machServiceDenied,
|
|
11
|
+
oneProcessOverPipe,
|
|
12
|
+
sandboxDeniedRemediation
|
|
13
|
+
} from "./chunk-WICIV6R3.js";
|
|
7
14
|
import {
|
|
8
15
|
resolveCaptureBrowserGpuMode
|
|
9
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Q5K73VW3.js";
|
|
10
17
|
import {
|
|
11
18
|
isNavigationTimeoutError,
|
|
12
19
|
withRemainingBudget
|
|
@@ -56,7 +63,7 @@ async function resolveManagedGpuMode(requestedMode, chromePath, context = {}) {
|
|
|
56
63
|
context.signal?.throwIfAborted();
|
|
57
64
|
const browser = await launchManagedBrowser(puppeteer, {
|
|
58
65
|
...options,
|
|
59
|
-
...context.noListen ?
|
|
66
|
+
...context.noListen ? oneProcessOverPipe(options) : {},
|
|
60
67
|
signal: context.signal
|
|
61
68
|
});
|
|
62
69
|
try {
|
|
@@ -70,6 +77,24 @@ async function resolveManagedGpuMode(requestedMode, chromePath, context = {}) {
|
|
|
70
77
|
});
|
|
71
78
|
}
|
|
72
79
|
async function launchManagedBrowser(puppeteer, options) {
|
|
80
|
+
const sandboxed = isOneProcessOverPipe(options) || inAgentSandbox();
|
|
81
|
+
try {
|
|
82
|
+
return await launchOwnedBrowser(puppeteer, sandboxed ? oneProcessOverPipe(options) : options);
|
|
83
|
+
} catch (error) {
|
|
84
|
+
const unnamedSeatbelt = !sandboxed && machServiceDenied(normalizeErrorMessage(error));
|
|
85
|
+
if (!unnamedSeatbelt) throw withRemediation(error);
|
|
86
|
+
return launchOwnedBrowser(puppeteer, oneProcessOverPipe(options)).catch(
|
|
87
|
+
(retryError) => {
|
|
88
|
+
throw withRemediation(retryError);
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function withRemediation(error) {
|
|
94
|
+
const remediation = sandboxDeniedRemediation(normalizeErrorMessage(error));
|
|
95
|
+
return remediation ? new Error(remediation, { cause: error }) : error;
|
|
96
|
+
}
|
|
97
|
+
async function launchOwnedBrowser(puppeteer, options) {
|
|
73
98
|
if (shutdown) throw new Error("The CLI is stopping; no browser can start.");
|
|
74
99
|
ownSignals();
|
|
75
100
|
const abort = new AbortController();
|
|
@@ -0,0 +1,42 @@
|
|
|
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/browser/sandboxDenied.ts
|
|
9
|
+
var MACH_SERVICE_DENIED = /bootstrap_check_in\b[^\n]*Permission denied/;
|
|
10
|
+
var SINGLE_PROCESS = "--single-process";
|
|
11
|
+
function machServiceDenied(errorMessage) {
|
|
12
|
+
return MACH_SERVICE_DENIED.test(errorMessage);
|
|
13
|
+
}
|
|
14
|
+
function inAgentSandbox(env = process.env, platform = process.platform) {
|
|
15
|
+
return platform === "darwin" && env.CODEX_SANDBOX === "seatbelt";
|
|
16
|
+
}
|
|
17
|
+
function oneProcessOverPipe(options) {
|
|
18
|
+
const args = options.args ?? [];
|
|
19
|
+
return {
|
|
20
|
+
...options,
|
|
21
|
+
pipe: true,
|
|
22
|
+
args: args.includes(SINGLE_PROCESS) ? args : [...args, SINGLE_PROCESS]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function isOneProcessOverPipe(options) {
|
|
26
|
+
return options.pipe === true && (options.args ?? []).includes(SINGLE_PROCESS);
|
|
27
|
+
}
|
|
28
|
+
function sandboxDeniedRemediation(errorMessage) {
|
|
29
|
+
if (!machServiceDenied(errorMessage)) return void 0;
|
|
30
|
+
return [
|
|
31
|
+
"The browser can't start inside this sandbox: macOS refused Chrome's mach service (bootstrap_check_in: Permission denied).",
|
|
32
|
+
"Rerun this command with escalation, outside the sandbox."
|
|
33
|
+
].join("\n");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
machServiceDenied,
|
|
38
|
+
inAgentSandbox,
|
|
39
|
+
oneProcessOverPipe,
|
|
40
|
+
isOneProcessOverPipe,
|
|
41
|
+
sandboxDeniedRemediation
|
|
42
|
+
};
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
splitElementInHtml,
|
|
20
20
|
unwrapElementsFromHtml,
|
|
21
21
|
wrapElementsInHtml
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TVDXMJ43.js";
|
|
23
23
|
import {
|
|
24
24
|
MEDIA_LINK_ATTR,
|
|
25
25
|
relinkSplitHalves
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
scanProjectMediaCodecMap,
|
|
55
55
|
shouldPrewarmProxy,
|
|
56
56
|
waitForProxy
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-T4HL3SZH.js";
|
|
58
58
|
import {
|
|
59
59
|
MAX_WINDOW_IDLE_MS,
|
|
60
60
|
STUDIO_SIGNATURE_MANIFEST_PATHS,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
} from "./chunk-EOVYQ3IG.js";
|
|
104
104
|
import {
|
|
105
105
|
addScenePartsManifest
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-P24X6CGY.js";
|
|
107
107
|
import {
|
|
108
108
|
ensureHfIds,
|
|
109
109
|
stampHfIdsInPlace
|
|
@@ -117,7 +117,7 @@ import {
|
|
|
117
117
|
parseFps,
|
|
118
118
|
parsePreviewProxyBox,
|
|
119
119
|
sameInstant
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-O3J7BHBU.js";
|
|
121
121
|
import {
|
|
122
122
|
AFTER_FONTS_SCRIPT_TYPE,
|
|
123
123
|
RUNTIME_BOOTSTRAP_ATTR,
|
|
@@ -131,7 +131,7 @@ import {
|
|
|
131
131
|
resolveRateSpec,
|
|
132
132
|
sourceTimeAt,
|
|
133
133
|
stripEmbeddedRuntimeScripts
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-BIV5HVTQ.js";
|
|
135
135
|
import {
|
|
136
136
|
HTML_ATTRIBUTE_ENTITIES,
|
|
137
137
|
MagicString,
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
decodeAuthoredAttribute,
|
|
140
140
|
scanHtmlOpeningTags,
|
|
141
141
|
unrollComputedTimeline
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-YMS5FOMC.js";
|
|
143
143
|
import {
|
|
144
144
|
ProjectRootMissingError,
|
|
145
145
|
folderGone,
|
|
@@ -4067,8 +4067,8 @@ function resolveTrack(root, desiredTrack, start, duration) {
|
|
|
4067
4067
|
}
|
|
4068
4068
|
function uniqueHostId(root, base) {
|
|
4069
4069
|
const ids = /* @__PURE__ */ new Set([
|
|
4070
|
-
...descendants(root, "[id]").map((element) => element.id),
|
|
4071
|
-
...descendants(root, "[data-composition-id]").flatMap((element) => {
|
|
4070
|
+
...[root, ...descendants(root, "[id]")].map((element) => element.id),
|
|
4071
|
+
...[root, ...descendants(root, "[data-composition-id]")].flatMap((element) => {
|
|
4072
4072
|
const id = element.getAttribute("data-composition-id");
|
|
4073
4073
|
return id ? [id] : [];
|
|
4074
4074
|
})
|
|
@@ -4096,7 +4096,8 @@ function insertCompositionIntoSource(input) {
|
|
|
4096
4096
|
const height = positiveAttribute(sourceComposition, "data-height");
|
|
4097
4097
|
const { document: document2, root } = compositionRoot(input.parentSource);
|
|
4098
4098
|
const parentDuration = positiveAttribute(root, "data-duration", "data-composition-duration");
|
|
4099
|
-
const
|
|
4099
|
+
const sourceCompositionId = sourceComposition.getAttribute("data-composition-id") ?? "";
|
|
4100
|
+
const base = (sourceCompositionId || "composition").replace(/[^a-zA-Z0-9_-]+/g, "-").replace(/^-+|-+$/g, "") || "composition";
|
|
4100
4101
|
const hostId = uniqueHostId(root, base);
|
|
4101
4102
|
const track = resolveTrack(
|
|
4102
4103
|
root,
|
|
@@ -4115,7 +4116,8 @@ function insertCompositionIntoSource(input) {
|
|
|
4115
4116
|
host.id = hostId;
|
|
4116
4117
|
host.className = "clip";
|
|
4117
4118
|
host.setAttribute("data-hf-id", `hf-${randomUUID()}`);
|
|
4118
|
-
|
|
4119
|
+
const mountedRootId = sourceCompositionId || hostId;
|
|
4120
|
+
host.setAttribute("data-composition-id", mountedRootId);
|
|
4119
4121
|
host.setAttribute("data-composition-src", relativeSourcePath(targetAbs, sourceAbs));
|
|
4120
4122
|
host.setAttribute("data-start", String(Math.round(input.start * 100) / 100));
|
|
4121
4123
|
host.setAttribute("data-duration", String(duration));
|
|
@@ -5495,7 +5497,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
|
5495
5497
|
let block = extractGsapScriptBlock(html);
|
|
5496
5498
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
5497
5499
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
5498
|
-
const { GSAP_CDN } = await import("./dist-
|
|
5500
|
+
const { GSAP_CDN } = await import("./dist-VKLSNKRZ.js");
|
|
5499
5501
|
const bootstrap = [
|
|
5500
5502
|
`<script src="${GSAP_CDN}"></script>`,
|
|
5501
5503
|
"<script>",
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
resolveCliChromeGpuMode,
|
|
10
10
|
seekCompositionTimeline,
|
|
11
11
|
waitForRuntimeReady
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DCG22HKT.js";
|
|
13
13
|
import {
|
|
14
14
|
launchManagedBrowser,
|
|
15
15
|
resolveManagedGpuMode
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WAVFNZB7.js";
|
|
17
17
|
import {
|
|
18
18
|
resolveCompositionViewportFromHtml
|
|
19
19
|
} from "./chunk-FH7WODJH.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveProject
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AP5AVVAB.js";
|
|
23
23
|
import {
|
|
24
24
|
defineCommand
|
|
25
25
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
printDeprecationNotice,
|
|
35
35
|
withMeta
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-K5PU5ISL.js";
|
|
37
37
|
import {
|
|
38
38
|
decodeWellFormedEscapes
|
|
39
39
|
} from "./chunk-BSQ7XANM.js";
|
|
@@ -228,7 +228,7 @@ function extractCompositionErrorsFromLint(lintResult) {
|
|
|
228
228
|
async function localizeRemoteAssets(html) {
|
|
229
229
|
let dir;
|
|
230
230
|
try {
|
|
231
|
-
const { loadProducer } = await import("./producer-
|
|
231
|
+
const { loadProducer } = await import("./producer-4UUUEPPS.js");
|
|
232
232
|
const { localizeRemoteMediaSources, localizeRemoteImageSources, localizeRemoteFontFaces } = await loadProducer();
|
|
233
233
|
dir = mkdtempSync(join(tmpdir(), "hf-validate-assets-"));
|
|
234
234
|
const assetDir = dir;
|
|
@@ -249,10 +249,10 @@ async function localizeRemoteAssets(html) {
|
|
|
249
249
|
}
|
|
250
250
|
async function validateInBrowser(project, opts) {
|
|
251
251
|
const projectDir = project.dir;
|
|
252
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
252
|
+
const { bundleToSingleHtml } = await import("./compiler-6WJ5SVTD.js");
|
|
253
253
|
const { ensureBrowser } = await import("./manager-HEUPD2YB.js");
|
|
254
|
-
const { serveStaticProjectHtml } = await import("./staticProjectServer-
|
|
255
|
-
const { lintProject } = await import("./lintProject-
|
|
254
|
+
const { serveStaticProjectHtml } = await import("./staticProjectServer-PIVSGEAO.js");
|
|
255
|
+
const { lintProject } = await import("./lintProject-PXB5Y6TX.js");
|
|
256
256
|
const lintResult = await lintProject(projectDir);
|
|
257
257
|
const compositionErrors = extractCompositionErrorsFromLint(lintResult);
|
|
258
258
|
const html = await bundleToSingleHtml(projectDir);
|
|
@@ -273,9 +273,9 @@ async function validateInBrowser(project, opts) {
|
|
|
273
273
|
try {
|
|
274
274
|
const browser = await ensureBrowser();
|
|
275
275
|
const puppeteer = await import("puppeteer-core");
|
|
276
|
-
const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-
|
|
276
|
+
const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-ZGMLMQ3B.js");
|
|
277
277
|
const requestedGpuMode = resolveCliChromeGpuMode();
|
|
278
|
-
const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-
|
|
278
|
+
const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-JG5PUOJP.js");
|
|
279
279
|
const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, browser.executablePath);
|
|
280
280
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
281
281
|
const { gpuConfig, softwareWebGpu } = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
readCompositionFps
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EFP25BUY.js";
|
|
10
10
|
import {
|
|
11
11
|
findSyncPartner,
|
|
12
12
|
readLinkTiming,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
extractMediaMetadata,
|
|
19
19
|
resolveReferencedDuration,
|
|
20
20
|
resolveReferencedStart
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7FHFPHEM.js";
|
|
22
22
|
import {
|
|
23
23
|
byStart,
|
|
24
24
|
compositionOriginSeconds,
|
|
@@ -27,18 +27,19 @@ import {
|
|
|
27
27
|
hostInPointSeconds,
|
|
28
28
|
parseFpsWithDefault,
|
|
29
29
|
resolveMediaStartSeconds
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-O3J7BHBU.js";
|
|
31
31
|
import {
|
|
32
32
|
HF_AUDIO_AUTOMATION_ATTR,
|
|
33
33
|
HF_AUDIO_FX_ATTR,
|
|
34
34
|
parseAudioFxChain,
|
|
35
35
|
parseAutomation,
|
|
36
36
|
resolveAutomation
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-BIV5HVTQ.js";
|
|
38
38
|
import {
|
|
39
|
+
isSubCompositionHost,
|
|
39
40
|
topLevelElements,
|
|
40
41
|
trackKindOf
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-YMS5FOMC.js";
|
|
42
43
|
import {
|
|
43
44
|
parseNumeric
|
|
44
45
|
} from "./chunk-3RM2ETQT.js";
|
|
@@ -167,9 +168,10 @@ async function resolveRowTiming(scope, node, depth) {
|
|
|
167
168
|
const absStart = mainTimelineStart(scope, el, start);
|
|
168
169
|
const slots = hostInPointSeconds(el) > 0 ? [{ start: absStart, end: absStart + (authored ?? Infinity) }] : [];
|
|
169
170
|
const children = host && depth === 0 ? await readSubComposition(host, scope, compositionOriginSeconds(absStart, el), slots) : [];
|
|
171
|
+
const inside = isSubCompositionHost(node) ? [] : await Promise.all(topLevelElements(node).map((inner) => describeRow(scope, inner, depth)));
|
|
170
172
|
const kind = el.tagName.toLowerCase();
|
|
171
173
|
const duration = MEDIA_TAG.test(kind) ? await resolveMediaRowDuration(scope, el, kind, authored) : resolveContainerDuration(authored, children);
|
|
172
|
-
return { start, authored, absStart, children, duration };
|
|
174
|
+
return { start, authored, absStart, children, inside, duration };
|
|
173
175
|
}
|
|
174
176
|
function describeRowFields(scope, node, timing) {
|
|
175
177
|
const { el } = node;
|
|
@@ -199,6 +201,7 @@ function describeRowFields(scope, node, timing) {
|
|
|
199
201
|
durationSource: timing.duration.durationSource,
|
|
200
202
|
pendingReason: timing.duration.pendingReason,
|
|
201
203
|
children: timing.children,
|
|
204
|
+
inside: timing.inside,
|
|
202
205
|
ref: "",
|
|
203
206
|
warnings: [],
|
|
204
207
|
elementId: el.id || null,
|
|
@@ -246,7 +249,8 @@ function cutRow(row, slots) {
|
|
|
246
249
|
if (kept.end === kept.start && row.absEnd > row.absStart) return [];
|
|
247
250
|
const skipped = (kept.start - row.absStart) * (row.playbackRate ?? 1);
|
|
248
251
|
const mediaStart = row.mediaStart === null ? null : roundMs(row.mediaStart + skipped);
|
|
249
|
-
|
|
252
|
+
const inside = row.inside.flatMap((inner) => cutRow(inner, slots));
|
|
253
|
+
return [{ ...row, absStart: roundMs(kept.start), absEnd: roundMs(kept.end), mediaStart, inside }];
|
|
250
254
|
}
|
|
251
255
|
function realFileInside(projectDir, path) {
|
|
252
256
|
try {
|
|
@@ -259,10 +263,13 @@ function realFileInside(projectDir, path) {
|
|
|
259
263
|
}
|
|
260
264
|
}
|
|
261
265
|
function flatten(top) {
|
|
262
|
-
const entries = [
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
+
const entries = [];
|
|
267
|
+
const add = (clip, host, parent) => {
|
|
268
|
+
entries.push({ clip, host, parent });
|
|
269
|
+
for (const inner of clip.inside) add(inner, host, clip);
|
|
270
|
+
for (const child of clip.children) add(child, clip, null);
|
|
271
|
+
};
|
|
272
|
+
for (const clip of top) add(clip, null, null);
|
|
266
273
|
const byKind = TRACK_ORDER.map((kind) => ({
|
|
267
274
|
kind,
|
|
268
275
|
entries: entries.filter((e) => e.clip.trackKind === kind).sort((a, b) => a.clip.absStart - b.clip.absStart)
|
|
@@ -282,11 +289,14 @@ function flatten(top) {
|
|
|
282
289
|
}
|
|
283
290
|
return byKind.map(({ kind, entries: kindEntries }) => ({
|
|
284
291
|
kind,
|
|
285
|
-
rows: kindEntries.map(({ clip, host }, index) => {
|
|
292
|
+
rows: kindEntries.map(({ clip, host, parent }, index) => {
|
|
286
293
|
const uniqueId = clip.elementId && fileIds.get(clip.file)?.get(clip.elementId) === 1;
|
|
287
294
|
const ref = uniqueId ? `#${clip.elementId}` : clip.hfId ? `hf:${clip.hfId}` : `${kind}/${index}`;
|
|
288
|
-
const warnings =
|
|
289
|
-
|
|
295
|
+
const warnings = [
|
|
296
|
+
...uniqueId || clip.hfId ? [] : [
|
|
297
|
+
'row has no stable name; add id="<name>" to the element in this file, then retry with #<name>'
|
|
298
|
+
],
|
|
299
|
+
...neverVisibleWarning(clip, parent)
|
|
290
300
|
];
|
|
291
301
|
return {
|
|
292
302
|
...clip,
|
|
@@ -296,11 +306,22 @@ function flatten(top) {
|
|
|
296
306
|
nested: host !== null,
|
|
297
307
|
host: host && host.id,
|
|
298
308
|
hostRow: host && at(host),
|
|
299
|
-
children: clip.children.map(at)
|
|
309
|
+
children: [...clip.children, ...clip.inside].map(at),
|
|
310
|
+
parentRow: parent && at(parent)
|
|
300
311
|
};
|
|
301
312
|
})
|
|
302
313
|
}));
|
|
303
314
|
}
|
|
315
|
+
var NEVER_VISIBLE = "never visible";
|
|
316
|
+
function neverVisibleWarning(clip, parent) {
|
|
317
|
+
if (!parent || clip.kind === "audio") return [];
|
|
318
|
+
if (clip.absEnd <= clip.absStart || parent.absEnd <= parent.absStart) return [];
|
|
319
|
+
if (clip.absEnd > parent.absStart && clip.absStart < parent.absEnd) return [];
|
|
320
|
+
const name = parent.elementId ? `#${parent.elementId}` : `its parent <${parent.kind}>`;
|
|
321
|
+
return [
|
|
322
|
+
`${NEVER_VISIBLE}: plays ${clip.absStart}-${clip.absEnd}s, but ${name} only shows ${parent.absStart}-${parent.absEnd}s; a nested data-start counts from the composition, not from ${name}`
|
|
323
|
+
];
|
|
324
|
+
}
|
|
304
325
|
function projectFps(source) {
|
|
305
326
|
const parsed = parseFpsWithDefault(readCompositionFps(source) ?? void 0);
|
|
306
327
|
return fpsToNumber(parsed.ok ? parsed.value : { num: 30, den: 1 });
|
|
@@ -332,5 +353,6 @@ async function describeProject(indexPath, measure = measureWithFfprobe, sourceOv
|
|
|
332
353
|
}
|
|
333
354
|
|
|
334
355
|
export {
|
|
356
|
+
NEVER_VISIBLE,
|
|
335
357
|
describeProject
|
|
336
358
|
};
|
|
@@ -1106,7 +1106,14 @@ var CANVAS_DIMENSIONS = {
|
|
|
1106
1106
|
"landscape-4k": { width: 3840, height: 2160 },
|
|
1107
1107
|
"portrait-4k": { width: 2160, height: 3840 },
|
|
1108
1108
|
square: { width: 1080, height: 1080 },
|
|
1109
|
-
"square-4k": { width: 2160, height: 2160 }
|
|
1109
|
+
"square-4k": { width: 2160, height: 2160 },
|
|
1110
|
+
"landscape-720p": { width: 1280, height: 720 },
|
|
1111
|
+
"portrait-720p": { width: 720, height: 1280 },
|
|
1112
|
+
"square-720p": { width: 720, height: 720 },
|
|
1113
|
+
// 480 tall at 16:9 is 853.33 wide: 854 keeps both sides even for 4:2:0 encoders.
|
|
1114
|
+
"landscape-480p": { width: 854, height: 480 },
|
|
1115
|
+
"portrait-480p": { width: 480, height: 854 },
|
|
1116
|
+
"square-480p": { width: 480, height: 480 }
|
|
1110
1117
|
};
|
|
1111
1118
|
var VALID_CANVAS_RESOLUTIONS = Object.keys(
|
|
1112
1119
|
CANVAS_DIMENSIONS
|
|
@@ -1121,13 +1128,21 @@ var RESOLUTION_ALIASES = {
|
|
|
1121
1128
|
"4k-portrait": "portrait-4k",
|
|
1122
1129
|
"1080p-square": "square",
|
|
1123
1130
|
"square-1080p": "square",
|
|
1124
|
-
"4k-square": "square-4k"
|
|
1131
|
+
"4k-square": "square-4k",
|
|
1132
|
+
"720p": "landscape-720p",
|
|
1133
|
+
"720p-portrait": "portrait-720p",
|
|
1134
|
+
"720p-square": "square-720p",
|
|
1135
|
+
"480p": "landscape-480p",
|
|
1136
|
+
"480p-portrait": "portrait-480p",
|
|
1137
|
+
"480p-square": "square-480p"
|
|
1125
1138
|
};
|
|
1126
1139
|
var ASPECT_AGNOSTIC_RESOLUTION_ALIASES = /* @__PURE__ */ new Set([
|
|
1127
1140
|
"1080p",
|
|
1128
1141
|
"hd",
|
|
1129
1142
|
"4k",
|
|
1130
|
-
"uhd"
|
|
1143
|
+
"uhd",
|
|
1144
|
+
"720p",
|
|
1145
|
+
"480p"
|
|
1131
1146
|
]);
|
|
1132
1147
|
function normalizeResolutionFlag(input) {
|
|
1133
1148
|
if (!input) return void 0;
|
|
@@ -4388,14 +4403,17 @@ function extractGsapScripts(doc) {
|
|
|
4388
4403
|
}
|
|
4389
4404
|
var OK = { ok: true };
|
|
4390
4405
|
function suggestMatchingPreset(compositionWidth, compositionHeight, chosen) {
|
|
4391
|
-
const aspectMatches = VALID_CANVAS_RESOLUTIONS.filter(
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
});
|
|
4406
|
+
const aspectMatches = VALID_CANVAS_RESOLUTIONS.filter(
|
|
4407
|
+
(preset) => fitsAspect(CANVAS_DIMENSIONS[preset], compositionWidth, compositionHeight)
|
|
4408
|
+
);
|
|
4395
4409
|
if (aspectMatches.length === 0) return void 0;
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4410
|
+
return aspectMatches.find((preset) => tierOf(preset) === tierOf(chosen));
|
|
4411
|
+
}
|
|
4412
|
+
var tierOf = (preset) => preset.includes("-") ? preset.slice(preset.indexOf("-")) : "";
|
|
4413
|
+
function fitsAspect(target, compositionWidth, compositionHeight) {
|
|
4414
|
+
const drift = Math.abs(target.width * compositionHeight - target.height * compositionWidth);
|
|
4415
|
+
if (drift === 0) return true;
|
|
4416
|
+
return target.width < compositionWidth && drift < Math.min(compositionWidth, compositionHeight);
|
|
4399
4417
|
}
|
|
4400
4418
|
function describeOrientation(width, height) {
|
|
4401
4419
|
if (width > height) return "landscape";
|
|
@@ -4427,17 +4445,11 @@ function checkOutputResolutionCompatibility(input) {
|
|
|
4427
4445
|
};
|
|
4428
4446
|
}
|
|
4429
4447
|
const target = CANVAS_DIMENSIONS[outputResolution];
|
|
4430
|
-
if (target
|
|
4448
|
+
if (!fitsAspect(target, compositionWidth, compositionHeight)) {
|
|
4431
4449
|
return buildAspectMismatch(compositionWidth, compositionHeight, outputResolution, target);
|
|
4432
4450
|
}
|
|
4433
4451
|
const widthRatio = target.width / compositionWidth;
|
|
4434
|
-
if (widthRatio < 1)
|
|
4435
|
-
return {
|
|
4436
|
-
ok: false,
|
|
4437
|
-
kind: "downsampling",
|
|
4438
|
-
message: `outputResolution ${outputResolution} (${target.width}\xD7${target.height}) is smaller than the composition (${compositionWidth}\xD7${compositionHeight}). Downsampling via --resolution is not supported.`
|
|
4439
|
-
};
|
|
4440
|
-
}
|
|
4452
|
+
if (widthRatio < 1) return OK;
|
|
4441
4453
|
if (!Number.isInteger(widthRatio)) {
|
|
4442
4454
|
return {
|
|
4443
4455
|
ok: false,
|
|
@@ -5000,6 +5012,7 @@ export {
|
|
|
5000
5012
|
HTML_BODY_CSS_WIDTH_FIRST_RE,
|
|
5001
5013
|
HTML_BODY_CSS_HEIGHT_FIRST_RE,
|
|
5002
5014
|
VIEWPORT_META_SIZE_RE,
|
|
5015
|
+
isSubCompositionHost,
|
|
5003
5016
|
topLevelElements,
|
|
5004
5017
|
trackKindOf,
|
|
5005
5018
|
decodeUrlPathVariants,
|
|
@@ -6,7 +6,7 @@ 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-AP5AVVAB.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_HISTORY_ROOT,
|
|
12
12
|
HistoryBusyError,
|
|
@@ -113,14 +113,14 @@ function previewOwner(route) {
|
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
async function directOwner(projectDir) {
|
|
116
|
+
async function directOwner(projectDir, ownerWaitMs = historyDeps.ownerWaitMs) {
|
|
117
117
|
let turn = null;
|
|
118
118
|
const history = await openProjectHistory({
|
|
119
119
|
projectDir,
|
|
120
120
|
historyRoot: historyDeps.historyRoot,
|
|
121
121
|
now: () => historyDeps.now(),
|
|
122
122
|
pruneGoneProjectsBudgetMs: 1e3,
|
|
123
|
-
ownerWaitMs
|
|
123
|
+
ownerWaitMs,
|
|
124
124
|
closedWindowAfterOwnership: () => {
|
|
125
125
|
turn = readTurn(projectDir);
|
|
126
126
|
return turn ? {
|
|
@@ -151,7 +151,7 @@ async function directOwner(projectDir) {
|
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
async function connect(projectDir) {
|
|
154
|
+
async function connect(projectDir, ownerWaitMs) {
|
|
155
155
|
const server = await historyDeps.findServer(projectDir);
|
|
156
156
|
if (server) {
|
|
157
157
|
const route = (path) => studioApiUrl(server, `history${path}`);
|
|
@@ -161,11 +161,11 @@ async function connect(projectDir) {
|
|
|
161
161
|
);
|
|
162
162
|
if (status !== 404) return { owner: previewOwner(route), turn: readTurn(projectDir) };
|
|
163
163
|
}
|
|
164
|
-
return directOwner(projectDir);
|
|
164
|
+
return directOwner(projectDir, ownerWaitMs);
|
|
165
165
|
}
|
|
166
|
-
async function withOwner(dir, task) {
|
|
166
|
+
async function withOwner(dir, task, { ownerWaitMs } = {}) {
|
|
167
167
|
const { dir: projectDir } = resolveProject(dir);
|
|
168
|
-
const { owner, turn } = await connect(projectDir);
|
|
168
|
+
const { owner, turn } = await connect(projectDir, ownerWaitMs);
|
|
169
169
|
try {
|
|
170
170
|
return await task(owner, turn, projectDir);
|
|
171
171
|
} finally {
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
VERSION
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BNEKKUPG.js";
|
|
10
10
|
|
|
11
11
|
// src/registry/compatibility.ts
|
|
12
12
|
import { compareVersions } from "compare-versions";
|
|
@@ -32,21 +32,21 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
getUpdateMeta,
|
|
34
34
|
withMeta
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-K5PU5ISL.js";
|
|
36
36
|
import {
|
|
37
37
|
CONFIG_PATH,
|
|
38
38
|
withFileLock
|
|
39
39
|
} from "./chunk-XUXGIA7H.js";
|
|
40
40
|
import {
|
|
41
41
|
VERSION
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-BNEKKUPG.js";
|
|
43
43
|
import {
|
|
44
44
|
OPTIONAL_PACKAGES,
|
|
45
45
|
installedOptionalPackageVersion
|
|
46
46
|
} from "./chunk-3DKN5WKL.js";
|
|
47
47
|
import {
|
|
48
48
|
resolveExtractCacheDir
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-7FHFPHEM.js";
|
|
50
50
|
import {
|
|
51
51
|
normalizeErrorMessage
|
|
52
52
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -6,23 +6,23 @@ 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-ZFJ5RI7A.js";
|
|
10
10
|
import "./chunk-Z27A7NUB.js";
|
|
11
11
|
import "./chunk-5ETJX6WM.js";
|
|
12
12
|
import {
|
|
13
13
|
loadProducer
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CESKA6VO.js";
|
|
15
15
|
import {
|
|
16
16
|
formatBytes
|
|
17
17
|
} from "./chunk-K2FLNJVB.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-XJQ6NN2L.js";
|
|
19
|
+
import "./chunk-TVDXMJ43.js";
|
|
20
20
|
import "./chunk-6JR2XUEE.js";
|
|
21
21
|
import "./chunk-C6TPGUWD.js";
|
|
22
22
|
import {
|
|
23
23
|
CACHE_DIR_NAME,
|
|
24
24
|
cleanupProxyCache
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-T4HL3SZH.js";
|
|
26
26
|
import {
|
|
27
27
|
DEFAULT_HISTORY_ROOT,
|
|
28
28
|
listProjectHistories,
|
|
@@ -47,12 +47,12 @@ import "./chunk-TJSTGSAW.js";
|
|
|
47
47
|
import "./chunk-XRKMITSS.js";
|
|
48
48
|
import {
|
|
49
49
|
withMeta
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-K5PU5ISL.js";
|
|
51
51
|
import "./chunk-K4WIOZFP.js";
|
|
52
52
|
import "./chunk-XUXGIA7H.js";
|
|
53
53
|
import "./chunk-WERLJGIC.js";
|
|
54
54
|
import "./chunk-ISN5GRYI.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-BNEKKUPG.js";
|
|
56
56
|
import "./chunk-3DKN5WKL.js";
|
|
57
57
|
import "./chunk-EOVYQ3IG.js";
|
|
58
58
|
import "./chunk-6BEFEWFB.js";
|
|
@@ -63,16 +63,16 @@ import {
|
|
|
63
63
|
directorySizeBytes,
|
|
64
64
|
gcExtractionCache,
|
|
65
65
|
resolveExtractCacheDir
|
|
66
|
-
} from "./chunk-
|
|
67
|
-
import "./chunk-
|
|
66
|
+
} from "./chunk-7FHFPHEM.js";
|
|
67
|
+
import "./chunk-P24X6CGY.js";
|
|
68
68
|
import "./chunk-KCF6GHJP.js";
|
|
69
69
|
import "./chunk-JYVGYKXG.js";
|
|
70
70
|
import "./chunk-7KDQAD2W.js";
|
|
71
|
-
import "./chunk-
|
|
72
|
-
import "./chunk-
|
|
71
|
+
import "./chunk-O3J7BHBU.js";
|
|
72
|
+
import "./chunk-BIV5HVTQ.js";
|
|
73
73
|
import "./chunk-VC76R6W2.js";
|
|
74
74
|
import "./chunk-UJKQWGFF.js";
|
|
75
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-YMS5FOMC.js";
|
|
76
76
|
import "./chunk-OFQWTKPW.js";
|
|
77
77
|
import "./chunk-DPVXBVLL.js";
|
|
78
78
|
import "./chunk-T76PLPD6.js";
|
|
@@ -80,9 +80,9 @@ import "./chunk-FXMKHHPO.js";
|
|
|
80
80
|
import "./chunk-RQVDTPGD.js";
|
|
81
81
|
import "./chunk-D3ZWBHZP.js";
|
|
82
82
|
import "./chunk-TWWSYAKJ.js";
|
|
83
|
-
import "./chunk-
|
|
83
|
+
import "./chunk-PLWORQFC.js";
|
|
84
84
|
import "./chunk-IWFLMU2N.js";
|
|
85
|
-
import "./chunk-
|
|
85
|
+
import "./chunk-OYLO6TYK.js";
|
|
86
86
|
import "./chunk-VAS6HQX3.js";
|
|
87
87
|
import "./chunk-3RM2ETQT.js";
|
|
88
88
|
import "./chunk-BSQ7XANM.js";
|