hyperframes 0.8.161 → 0.8.163
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-7U5TQGSQ.js → add-Y7BGO2MK.js} +11 -11
- package/dist/{animatedGifPrep-YAJTDXB7.js → animatedGifPrep-NUU6VMFL.js} +5 -5
- package/dist/api.js +11 -11
- package/dist/{asset-N3JO5LHY.js → asset-OONPCZS5.js} +2 -2
- package/dist/{assetCataloger-BIDQA34M.js → assetCataloger-YWJRJK23.js} +2 -2
- package/dist/{audio-QNPSENQR.js → audio-KPTXNHDC.js} +47 -25
- package/dist/{auth-HINUM4A7.js → auth-UKXSZ4WA.js} +1 -1
- package/dist/{autoUpdate-AAMND4XK.js → autoUpdate-4MRUONUQ.js} +2 -2
- package/dist/{backgroundChecks-FXIEHPND.js → backgroundChecks-X5M7Z6L7.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-C2JCG5EK.js → batchRender-GJ65EZ26.js} +3 -3
- package/dist/{beats-UZNREIRU.js → beats-EQNT7OZE.js} +4 -4
- package/dist/{benchmark-YM3QXPH6.js → benchmark-WXWALVZJ.js} +8 -8
- package/dist/{browser-SD3T2XMH.js → browser-ZSNFVRC3.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-SLBVWQ7O.js → bundleWithLocalizedFonts-O3BXZLCD.js} +2 -2
- package/dist/{capture-GUO23PVN.js → capture-JFFYE7XM.js} +2 -2
- package/dist/{capture-M5ZAD3BI.js → capture-TKWJBFGC.js} +9 -9
- package/dist/{catalog-6PF7KZAZ.js → catalog-LK5MNUQY.js} +11 -11
- package/dist/{catch-up-5LTQTD3X.js → catch-up-ISTWIF6K.js} +4 -4
- package/dist/{check-NE2YXJR2.js → check-YVEBXKNY.js} +30 -30
- package/dist/{checkBrowser-XDTXDEYO.js → checkBrowser-OJAXYTRD.js} +28 -27
- package/dist/{chunk-VXVRPIJA.js → chunk-23IS5QVP.js} +69 -1
- package/dist/{chunk-B5FZ2CQM.js → chunk-2ALJMIFW.js} +1 -1
- package/dist/{chunk-KZPG4DXX.js → chunk-2XIPB4MP.js} +1 -1
- package/dist/{chunk-RTS7BGEC.js → chunk-3E3VMAAM.js} +1 -1
- package/dist/{chunk-MMV6IY6U.js → chunk-3KY7FUSS.js} +2 -2
- package/dist/{chunk-XTLV6UVP.js → chunk-3TKNBY6K.js} +2 -2
- package/dist/{chunk-LYIG2GZ5.js → chunk-42AER3PM.js} +1 -1
- package/dist/{chunk-AY2FEJDR.js → chunk-43H7XDO6.js} +2 -2
- package/dist/{chunk-B7RUGHBT.js → chunk-4LXWLCIX.js} +1 -1
- package/dist/{chunk-H4VXLZ6O.js → chunk-54E2ELUA.js} +9 -9
- package/dist/{chunk-4ID635FL.js → chunk-5K5YH6M7.js} +1 -1
- package/dist/{chunk-IYLHJV34.js → chunk-5UBZPG74.js} +1 -143
- package/dist/{chunk-GJQHHAAX.js → chunk-74H5SHQL.js} +3 -3
- package/dist/{chunk-PLEMSN3E.js → chunk-A356JY2J.js} +29 -19
- package/dist/{chunk-OMJA7JP6.js → chunk-AFPGUKMN.js} +4 -4
- package/dist/{chunk-RGYEL7QD.js → chunk-AXATVUCD.js} +3 -3
- package/dist/{chunk-GG37I7B3.js → chunk-BHGIBGUZ.js} +1 -1
- package/dist/{chunk-5YSHR4XC.js → chunk-CXVBPW5F.js} +6 -6
- package/dist/{chunk-GIPNECWL.js → chunk-D5PUMG2P.js} +1 -1
- package/dist/{chunk-D33YJZOH.js → chunk-DSXDYQQV.js} +1 -1
- package/dist/{chunk-PPF65XAF.js → chunk-GD7VU7CY.js} +1 -1
- package/dist/{chunk-ERTJPFCH.js → chunk-H3JGPRWA.js} +1 -1
- package/dist/{chunk-EVRUR7DW.js → chunk-H45RC6HN.js} +1 -1
- package/dist/{chunk-DJZEIVAP.js → chunk-H46R2BND.js} +1 -1
- package/dist/{chunk-HM4PLNTX.js → chunk-HQMWZNO2.js} +12 -1
- package/dist/chunk-J4L5TPLS.js +101 -0
- package/dist/{chunk-XWWYGXJ5.js → chunk-JEW5CCRU.js} +2 -2
- package/dist/{chunk-G5AZMSQP.js → chunk-JYR3YAAK.js} +1 -1
- package/dist/{chunk-CGOGEA62.js → chunk-LHETZ63N.js} +1 -1
- package/dist/{chunk-G642IIVK.js → chunk-LMHXUDSR.js} +1 -1
- package/dist/{chunk-SAS6XBY5.js → chunk-M4237QMQ.js} +1 -1
- package/dist/{chunk-WDUEIP22.js → chunk-NU4PDQ6G.js} +1 -1
- package/dist/{chunk-Q3TFX4OZ.js → chunk-NZ7K76Y2.js} +1 -1
- package/dist/{chunk-MP676E4B.js → chunk-O2CXBATN.js} +4 -3
- package/dist/{chunk-PBNV5V5G.js → chunk-OFD2XWIQ.js} +13 -2
- package/dist/{chunk-PYMYGIZ4.js → chunk-OGGPNDGO.js} +2 -2
- package/dist/{chunk-IL6C7T5X.js → chunk-OZUYK6IS.js} +1 -1
- package/dist/{chunk-N2NDDTYW.js → chunk-QGYAHDOR.js} +2 -2
- package/dist/{chunk-ON2HYNGB.js → chunk-QXAXCRK5.js} +6 -6
- package/dist/{chunk-2ZLYSXZC.js → chunk-R64V3KQN.js} +10 -9
- package/dist/{chunk-I6CVW5CA.js → chunk-SQN7N27A.js} +3 -3
- package/dist/chunk-TDPVEMBS.js +156 -0
- package/dist/{chunk-VYTGK5YA.js → chunk-TQMJKZS5.js} +18 -4
- package/dist/{chunk-P4QE7SSN.js → chunk-ULAB77ZO.js} +1 -1
- package/dist/{chunk-YU2QRNWN.js → chunk-UZOZ2W2E.js} +3 -2
- package/dist/{chunk-WNXVPPMV.js → chunk-VG3ZMY2H.js} +2 -2
- package/dist/{chunk-TXG6W4X4.js → chunk-WJVDUUH2.js} +2 -2
- package/dist/{chunk-PZH7FTRZ.js → chunk-WMXOKTGO.js} +7 -7
- package/dist/{chunk-7ZKEOQ5N.js → chunk-Z6P5OVCF.js} +1 -1
- package/dist/{chunk-SB5DX6AD.js → chunk-Z6VBXCYN.js} +2 -2
- package/dist/{chunk-P47XYVEQ.js → chunk-ZJO4SLHC.js} +1 -1
- package/dist/{chunk-AHNJMWMU.js → chunk-ZVOCFUPA.js} +9 -9
- package/dist/{clean-4Y4G3YV3.js → clean-PGEA3UPT.js} +11 -11
- package/dist/cli.js +53 -53
- package/dist/{cloud-BWXJB2B7.js → cloud-SAODZ2PK.js} +4 -4
- package/dist/{cloudrun-BIQXBUDO.js → cloudrun-RMBT2JQK.js} +3 -3
- package/dist/commands/layout-audit.browser.js +347 -20
- package/dist/{compare-OLLJBVNL.js → compare-R7X7LXCX.js} +22 -22
- package/dist/{compiler-57M6W5WY.js → compiler-RKH75FZH.js} +2 -2
- package/dist/{component-ULSAC45J.js → component-DTVCMTLX.js} +3 -3
- package/dist/{compositions-G2JTQBTJ.js → compositions-UXS2ISGS.js} +9 -9
- package/dist/{delete-BONV4XUI.js → delete-LIGHRH4L.js} +4 -3
- package/dist/{dist-4JFB3WAR.js → dist-P5OHBFEV.js} +2 -2
- package/dist/{doctor-EMLC4VZ4.js → doctor-6VR5JUWZ.js} +7 -7
- package/dist/{events-ZFGAA5UD.js → events-YP2MRCPP.js} +2 -2
- package/dist/{events-LF2J436R.js → events-ZQFIOH5Z.js} +3 -3
- package/dist/{feedback-WKCUQE6T.js → feedback-47UEIUOO.js} +7 -7
- package/dist/{figma-VJKG252Z.js → figma-ZTHHEDY5.js} +3 -3
- package/dist/fontLocalizeCli.js +7 -7
- package/dist/{get-OINAGI2B.js → get-EZGQNT7G.js} +4 -3
- package/dist/{gpuPolicy-VGE3I5J4.js → gpuPolicy-SYV7N237.js} +5 -5
- package/dist/{grade-compare-DY5VFXPK.js → grade-compare-SEFOAA4E.js} +22 -22
- package/dist/{help-HHB7JRZA.js → help-WIZONGVE.js} +1 -1
- package/dist/{history-D44JJBBC.js → history-PE45CSGA.js} +6 -6
- package/dist/hyperframe-runtime.js +23 -23
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +23 -23
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-2WZLISAR.js → info-WIRSMQKB.js} +7 -7
- package/dist/{init-UYZS2WXQ.js → init-N26RW4YN.js} +20 -20
- package/dist/{inspect-IEFCB4PT.js → inspect-XHQUASDV.js} +23 -23
- package/dist/{installer-T3STEB4U.js → installer-QWK7EA5M.js} +4 -4
- package/dist/{keyframes-FS43QHM2.js → keyframes-RNTYYHMK.js} +6 -6
- package/dist/{lambda-RAJA6ZNA.js → lambda-LQHGF3LK.js} +4 -4
- package/dist/{layout-AK2A7Q46.js → layout-YRCKPNAO.js} +23 -23
- package/dist/{lint-JRJUSZO7.js → lint-HLOZHJVM.js} +6 -6
- package/dist/{list-BKKGPT7E.js → list-X7NTQB32.js} +4 -3
- package/dist/{login-QJZTUDDO.js → login-S7PVNUEB.js} +4 -4
- package/dist/{media-treatment-473OM7G7.js → media-treatment-465Y6CWE.js} +8 -8
- package/dist/{models-OA4MXEYG.js → models-J2FZXHMD.js} +8 -8
- package/dist/{motionShot-C2YDYRNB.js → motionShot-K6OBEZ2N.js} +11 -11
- package/dist/{normalize-audio-M3KVTFTQ.js → normalize-audio-VODIXLAC.js} +4 -4
- package/dist/{open-363TDMEP.js → open-K5OZGYJ7.js} +4 -4
- package/dist/{parakeetRunner-DBLHMD5T.js → parakeetRunner-NDIU5PKO.js} +8 -8
- package/dist/{pipeline-FSY65OQ4.js → pipeline-UKGI44NN.js} +5 -5
- package/dist/{play-2UB33EGB.js → play-QOXKOZ6L.js} +16 -16
- package/dist/{present-F3ASSDJX.js → present-7CVCJIS3.js} +12 -12
- package/dist/{preview-EF76WIHK.js → preview-HX5F6RGT.js} +15 -15
- package/dist/{producer-C5V2A3YL.js → producer-66MQWVVQ.js} +1 -1
- package/dist/{projectConfig-X2IEHCSK.js → projectConfig-EVBNJKPS.js} +6 -6
- package/dist/{publication-JEANCWBW.js → publication-F6BOBZMI.js} +2 -2
- package/dist/{publish-VX5OH4ST.js → publish-6KTQDKL6.js} +8 -8
- package/dist/{remove-background-IXCISD26.js → remove-background-TJTKY3YM.js} +6 -6
- package/dist/{render-GUBYSVQD.js → render-TRU75TVB.js} +42 -29
- package/dist/{render-ISUT7Q3X.js → render-X4MWSR5L.js} +3 -3
- package/dist/{render-GL72Z2W2.js → render-XS22VQHC.js} +14 -89
- package/dist/{render-batch-2C6RUP3F.js → render-batch-VKFOIMV5.js} +3 -3
- package/dist/{resolver-KTNKZVIB.js → resolver-VGAM26OR.js} +4 -4
- package/dist/{sherpa-GFRG3TMM.js → sherpa-3OI5VMCY.js} +9 -7
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
- package/dist/{skills-7XI4DHLN.js → skills-RKDR4AXV.js} +5 -5
- package/dist/{skillsUpdateCheck-34WOCMHV.js → skillsUpdateCheck-QWIERB7M.js} +3 -3
- package/dist/{snapshot-SGTO2OQ4.js → snapshot-SSSF334Y.js} +25 -25
- package/dist/{src-GPUDUKY6.js → src-LZXECBBQ.js} +4 -4
- package/dist/{src-IMCQRH4P.js → src-RQPKPFRO.js} +6 -6
- package/dist/{staticProjectServer-4CQ3KDQK.js → staticProjectServer-DMG2CER4.js} +12 -12
- package/dist/studio/assets/{hyperframes-player-C8VFb4NS.js → hyperframes-player-oCk9rjq9.js} +1 -1
- package/dist/studio/assets/{index-RZnZPb-B.js → index-BOQPXBQ0.js} +1 -1
- package/dist/studio/assets/{index-J8Bpbg6o.js → index-DK2wgdLx.js} +4 -4
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-RYCDLEOR.js → studio-api-KRPBPUYQ.js} +6 -6
- package/dist/{studioServer-VIIVGFZH.js → studioServer-KWNULEM4.js} +54 -41
- package/dist/{telemetry-YKVYLJSB.js → telemetry-4G6CD3X7.js} +3 -3
- package/dist/{timeline-LDRA7QZ3.js → timeline-TKPBJ4EP.js} +13 -13
- package/dist/{tokens-ZAOFRU55.js → tokens-TX7THSB7.js} +2 -2
- package/dist/{transcribe-CJXUHTAS.js → transcribe-7DBONX4C.js} +12 -12
- package/dist/{transcribe-FL6NGWHF.js → transcribe-HOLKYWY5.js} +6 -6
- package/dist/{updateCheck-TIRFQBSI.js → updateCheck-64D7B73Z.js} +2 -2
- package/dist/{upgrade-7R5G3MNO.js → upgrade-MXQDGGYO.js} +2 -2
- package/dist/{urlDownloader-KDJGLR2Y.js → urlDownloader-Z435W35E.js} +4 -4
- package/dist/{validate-VGEPWGQO.js → validate-5ZNGP5QO.js} +17 -17
- package/dist/{video-AHO4CDCK.js → video-62JJK3XL.js} +5 -5
- package/package.json +1 -1
|
@@ -4,74 +4,6 @@ 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
|
-
forceRefreshCredentials,
|
|
9
|
-
resolveCloudAuthHeaders,
|
|
10
|
-
resolveCloudBaseUrl
|
|
11
|
-
} from "./chunk-KMAAOHLO.js";
|
|
12
|
-
import {
|
|
13
|
-
errorBox
|
|
14
|
-
} from "./chunk-K2FLNJVB.js";
|
|
15
|
-
import {
|
|
16
|
-
failCommand
|
|
17
|
-
} from "./chunk-PBN6GBJE.js";
|
|
18
|
-
|
|
19
|
-
// src/cloud/poll.ts
|
|
20
|
-
var DEFAULT_POLL_INTERVAL_MS = 1e4;
|
|
21
|
-
var DEFAULT_MAX_WAIT_MS = 60 * 60 * 1e3;
|
|
22
|
-
var TERMINAL_STATUSES = /* @__PURE__ */ new Set(["completed", "failed"]);
|
|
23
|
-
var PollTimeoutError = class extends Error {
|
|
24
|
-
lastDetail;
|
|
25
|
-
constructor(lastDetail, elapsedMs) {
|
|
26
|
-
super(
|
|
27
|
-
`Render ${lastDetail.render_id} did not reach a terminal state within ${Math.round(elapsedMs / 1e3)}s`
|
|
28
|
-
);
|
|
29
|
-
this.name = "PollTimeoutError";
|
|
30
|
-
this.lastDetail = lastDetail;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
function isTerminal(status) {
|
|
34
|
-
return TERMINAL_STATUSES.has(status);
|
|
35
|
-
}
|
|
36
|
-
async function pollUntilTerminal(client, renderId, options = {}) {
|
|
37
|
-
const intervalMs = options.intervalMs ?? DEFAULT_POLL_INTERVAL_MS;
|
|
38
|
-
const maxWaitMs = options.maxWaitMs ?? DEFAULT_MAX_WAIT_MS;
|
|
39
|
-
const now = options.now ?? (() => Date.now());
|
|
40
|
-
const sleep = options.sleep ?? defaultAbortableSleep(options.signal);
|
|
41
|
-
const started = now();
|
|
42
|
-
while (true) {
|
|
43
|
-
if (options.signal?.aborted) {
|
|
44
|
-
throw signalAbortError(options.signal);
|
|
45
|
-
}
|
|
46
|
-
const detail = await client.getRender({ render_id: renderId, signal: options.signal });
|
|
47
|
-
const elapsed = now() - started;
|
|
48
|
-
options.onTick?.(detail, elapsed);
|
|
49
|
-
if (isTerminal(detail.status)) {
|
|
50
|
-
return detail;
|
|
51
|
-
}
|
|
52
|
-
if (elapsed >= maxWaitMs) {
|
|
53
|
-
throw new PollTimeoutError(detail, elapsed);
|
|
54
|
-
}
|
|
55
|
-
await sleep(intervalMs);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function signalAbortError(signal) {
|
|
59
|
-
const reason = signal.reason;
|
|
60
|
-
return reason instanceof Error ? reason : new Error("Poll aborted");
|
|
61
|
-
}
|
|
62
|
-
function defaultAbortableSleep(signal) {
|
|
63
|
-
return (ms) => new Promise((resolve, reject) => {
|
|
64
|
-
const onAbort = () => {
|
|
65
|
-
clearTimeout(timer);
|
|
66
|
-
reject(signalAbortError(signal));
|
|
67
|
-
};
|
|
68
|
-
const timer = setTimeout(() => {
|
|
69
|
-
signal?.removeEventListener("abort", onAbort);
|
|
70
|
-
resolve();
|
|
71
|
-
}, ms);
|
|
72
|
-
signal?.addEventListener("abort", onAbort, { once: true });
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
7
|
|
|
76
8
|
// src/cloud/_gen/client.ts
|
|
77
9
|
var HyperframesApiError = class extends Error {
|
|
@@ -276,81 +208,7 @@ var HyperframesCloudClient = class {
|
|
|
276
208
|
}
|
|
277
209
|
};
|
|
278
210
|
|
|
279
|
-
// src/cloud/index.ts
|
|
280
|
-
async function createCloudClient() {
|
|
281
|
-
const client = new HyperframesCloudClient({
|
|
282
|
-
baseUrl: resolveCloudBaseUrl(),
|
|
283
|
-
getAuthHeaders: resolveCloudAuthHeaders
|
|
284
|
-
});
|
|
285
|
-
return wrapWith401Retry(client);
|
|
286
|
-
}
|
|
287
|
-
function wrapWith401Retry(client) {
|
|
288
|
-
return new Proxy(client, {
|
|
289
|
-
get(target, prop, receiver) {
|
|
290
|
-
const value = Reflect.get(target, prop, receiver);
|
|
291
|
-
if (typeof value !== "function") return value;
|
|
292
|
-
const original = value.bind(target);
|
|
293
|
-
return async (...args) => {
|
|
294
|
-
try {
|
|
295
|
-
return await original(...args);
|
|
296
|
-
} catch (err) {
|
|
297
|
-
if (err instanceof HyperframesApiError && err.status === 401) {
|
|
298
|
-
try {
|
|
299
|
-
await forceRefreshCredentials();
|
|
300
|
-
} catch {
|
|
301
|
-
throw err;
|
|
302
|
-
}
|
|
303
|
-
return await original(...args);
|
|
304
|
-
}
|
|
305
|
-
throw err;
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
// src/cloud/errors.ts
|
|
313
|
-
var ERROR_CODE_HINTS = {
|
|
314
|
-
hyperframes_project_too_large: "The zip exceeded the 200 MB limit. Run `hyperframes cloud render --dry-run`, then add only verified-unneeded paths to `.hyperframesignore` or pre-host required large media.",
|
|
315
|
-
hyperframes_render_not_found: "The render_id no longer exists \u2014 either soft-deleted or never created.",
|
|
316
|
-
invalid_parameter: "Check the listed parameter against `hyperframes cloud render --help` for the accepted values.",
|
|
317
|
-
authentication_failed: "Run `hyperframes auth status` to confirm your credential; `hyperframes auth login` to re-auth.",
|
|
318
|
-
rate_limit_exceeded: "Retry after the duration in the Retry-After header."
|
|
319
|
-
};
|
|
320
|
-
function reportApiError(stage, err, options = {}) {
|
|
321
|
-
const hints = { ...ERROR_CODE_HINTS, ...options.extraHints };
|
|
322
|
-
if (err instanceof HyperframesApiError) {
|
|
323
|
-
if (err.status === 404 && options.notFound) {
|
|
324
|
-
errorBox("Not found", options.notFound);
|
|
325
|
-
failCommand();
|
|
326
|
-
}
|
|
327
|
-
const hint = err.code ? hints[err.code] : void 0;
|
|
328
|
-
const title = `${stage} (HTTP ${err.status})`;
|
|
329
|
-
if (hint) {
|
|
330
|
-
errorBox(title, err.message, hint);
|
|
331
|
-
} else if (options.suggestion) {
|
|
332
|
-
errorBox(title, err.message, options.suggestion);
|
|
333
|
-
} else if (err.code) {
|
|
334
|
-
errorBox(title, err.message, `code: ${err.code}`);
|
|
335
|
-
} else {
|
|
336
|
-
errorBox(title, err.message);
|
|
337
|
-
}
|
|
338
|
-
failCommand();
|
|
339
|
-
}
|
|
340
|
-
if (err instanceof Error) {
|
|
341
|
-
errorBox(stage, err.message, options.suggestion);
|
|
342
|
-
failCommand();
|
|
343
|
-
}
|
|
344
|
-
errorBox(stage, String(err), options.suggestion);
|
|
345
|
-
failCommand();
|
|
346
|
-
}
|
|
347
|
-
|
|
348
211
|
export {
|
|
349
|
-
DEFAULT_POLL_INTERVAL_MS,
|
|
350
|
-
DEFAULT_MAX_WAIT_MS,
|
|
351
|
-
PollTimeoutError,
|
|
352
|
-
pollUntilTerminal,
|
|
353
212
|
HyperframesApiError,
|
|
354
|
-
|
|
355
|
-
reportApiError
|
|
213
|
+
HyperframesCloudClient
|
|
356
214
|
};
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
extractMediaMetadata,
|
|
19
19
|
resolveReferencedDuration,
|
|
20
20
|
resolveReferencedStart
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-A356JY2J.js";
|
|
22
22
|
import {
|
|
23
23
|
byStart,
|
|
24
24
|
compositionOriginSeconds,
|
|
@@ -27,14 +27,14 @@ import {
|
|
|
27
27
|
hostInPointSeconds,
|
|
28
28
|
parseFpsWithDefault,
|
|
29
29
|
resolveMediaStartSeconds
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NZ7K76Y2.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-ZJO4SLHC.js";
|
|
38
38
|
import {
|
|
39
39
|
topLevelElements,
|
|
40
40
|
trackKindOf
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
renderFrameIdForRenderId,
|
|
31
31
|
resolveAuthoredTimingWindow,
|
|
32
32
|
toFps
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-NZ7K76Y2.js";
|
|
34
34
|
import {
|
|
35
35
|
AUDIO_GROUP_RENDER_ID_ATTR,
|
|
36
36
|
COLOR_GRADING_SOURCE_HIDDEN_ATTR,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
shiftRateLane,
|
|
60
60
|
sourceTimeAt,
|
|
61
61
|
timeAtSourceTime
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-ZJO4SLHC.js";
|
|
63
63
|
import {
|
|
64
64
|
clampAudioGain,
|
|
65
65
|
isAudibleVideoElement
|
|
@@ -8051,8 +8051,12 @@ ${tail}` : `FFmpeg exited with code ${exitCode}`;
|
|
|
8051
8051
|
}
|
|
8052
8052
|
function describeFfmpegFailure(result, timeoutMs) {
|
|
8053
8053
|
const error = formatFfmpegError(result.exitCode, result.stderr);
|
|
8054
|
-
if (result.terminationReason
|
|
8055
|
-
|
|
8054
|
+
if (result.terminationReason === "deadline") {
|
|
8055
|
+
return `FFmpeg timed out after ${timeoutMs} ms (ffmpegProcessTimeout; long renders can raise FFMPEG_PROCESS_TIMEOUT_MS). ${error}`;
|
|
8056
|
+
}
|
|
8057
|
+
if (result.exitCode !== null) return error;
|
|
8058
|
+
const signalOrRequestedStop = result.terminationReason === "exit" ? result.signal : result.terminationReason;
|
|
8059
|
+
return signalOrRequestedStop ? `FFmpeg ended without an exit code (${signalOrRequestedStop}). ${error}` : error;
|
|
8056
8060
|
}
|
|
8057
8061
|
function spawnFfmpeg(args) {
|
|
8058
8062
|
const ffmpeg = spawn2(getFfmpegBinary(), args, { windowsHide: true });
|
|
@@ -15368,6 +15372,7 @@ async function mixThroughMasterBus(tracks, masterChain, outputPath, workDir, tot
|
|
|
15368
15372
|
async function processCompositionAudio(elements, baseDir, workDir, outputPath, totalDuration, signal, config, compiledDir) {
|
|
15369
15373
|
const startMs = Date.now();
|
|
15370
15374
|
const tracks = [];
|
|
15375
|
+
const preparedTracks = new Array(elements.length);
|
|
15371
15376
|
const failures = [];
|
|
15372
15377
|
const groupTracks = /* @__PURE__ */ new Map();
|
|
15373
15378
|
const groupMeta = /* @__PURE__ */ new Map();
|
|
@@ -15379,7 +15384,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
|
|
|
15379
15384
|
else signal.addEventListener("abort", () => internalController.abort(), { once: true });
|
|
15380
15385
|
}
|
|
15381
15386
|
await Promise.all(
|
|
15382
|
-
elements.map(async (element) => {
|
|
15387
|
+
elements.map(async (element, index) => {
|
|
15383
15388
|
if (effectiveSignal.aborted) {
|
|
15384
15389
|
failures.push({
|
|
15385
15390
|
stage: "cancelled",
|
|
@@ -15559,20 +15564,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
|
|
|
15559
15564
|
...element.fadeOut ? { fadeOut: element.fadeOut } : {},
|
|
15560
15565
|
...tailSeconds > 0 ? { tailSeconds } : {}
|
|
15561
15566
|
};
|
|
15562
|
-
|
|
15563
|
-
const bucket = groupTracks.get(element.groupId);
|
|
15564
|
-
if (bucket) bucket.push(track);
|
|
15565
|
-
else groupTracks.set(element.groupId, [track]);
|
|
15566
|
-
if (!groupMeta.has(element.groupId)) {
|
|
15567
|
-
groupMeta.set(element.groupId, {
|
|
15568
|
-
...element.groupFxChain ? { fxChain: element.groupFxChain } : {},
|
|
15569
|
-
...element.groupAutomation ? { automation: element.groupAutomation } : {},
|
|
15570
|
-
volume: element.groupVolume ?? 1
|
|
15571
|
-
});
|
|
15572
|
-
}
|
|
15573
|
-
} else {
|
|
15574
|
-
tracks.push(track);
|
|
15575
|
-
}
|
|
15567
|
+
preparedTracks[index] = track;
|
|
15576
15568
|
} catch (err) {
|
|
15577
15569
|
if (err instanceof AudioFxRenderError) throw err;
|
|
15578
15570
|
failures.push({
|
|
@@ -15595,6 +15587,24 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
|
|
|
15595
15587
|
}
|
|
15596
15588
|
throw err;
|
|
15597
15589
|
});
|
|
15590
|
+
elements.forEach((element, index) => {
|
|
15591
|
+
const track = preparedTracks[index];
|
|
15592
|
+
if (!track) return;
|
|
15593
|
+
if (element.groupId) {
|
|
15594
|
+
const bucket = groupTracks.get(element.groupId);
|
|
15595
|
+
if (bucket) bucket.push(track);
|
|
15596
|
+
else groupTracks.set(element.groupId, [track]);
|
|
15597
|
+
if (!groupMeta.has(element.groupId)) {
|
|
15598
|
+
groupMeta.set(element.groupId, {
|
|
15599
|
+
...element.groupFxChain ? { fxChain: element.groupFxChain } : {},
|
|
15600
|
+
...element.groupAutomation ? { automation: element.groupAutomation } : {},
|
|
15601
|
+
volume: element.groupVolume ?? 1
|
|
15602
|
+
});
|
|
15603
|
+
}
|
|
15604
|
+
} else {
|
|
15605
|
+
tracks.push(track);
|
|
15606
|
+
}
|
|
15607
|
+
});
|
|
15598
15608
|
const removeWorkDir = () => {
|
|
15599
15609
|
try {
|
|
15600
15610
|
rmSync7(workDir, { recursive: true, force: true });
|
|
@@ -6,21 +6,21 @@ 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-3E3VMAAM.js";
|
|
10
10
|
import {
|
|
11
11
|
DecodeCancelled,
|
|
12
12
|
prepareSherpaWav,
|
|
13
13
|
sherpaUnsupportedReason,
|
|
14
14
|
transcribeWithSherpa
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-O2CXBATN.js";
|
|
16
16
|
import {
|
|
17
17
|
initialModelForLanguage,
|
|
18
18
|
transcribe
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-H46R2BND.js";
|
|
20
20
|
import {
|
|
21
21
|
createRenderCancellationScope,
|
|
22
22
|
stoppedByCancelSignal
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-LMHXUDSR.js";
|
|
24
24
|
import {
|
|
25
25
|
formatSrt,
|
|
26
26
|
formatVtt,
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getMimeType,
|
|
9
9
|
injectMediaCodecMapIntoHtml
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CXVBPW5F.js";
|
|
11
11
|
import {
|
|
12
12
|
PROXY_VARIANT_CONFIG,
|
|
13
13
|
ProxyCapacityError,
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
recordProxyRequest,
|
|
19
19
|
resolveProxy,
|
|
20
20
|
resolveProxyVariantRequest
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5K5YH6M7.js";
|
|
22
22
|
import {
|
|
23
23
|
resolveAutoProxy
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-BHGIBGUZ.js";
|
|
25
25
|
import {
|
|
26
26
|
decodeWellFormedEscapes
|
|
27
27
|
} from "./chunk-BSQ7XANM.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
splitElementInHtml,
|
|
20
20
|
unwrapElementsFromHtml,
|
|
21
21
|
wrapElementsInHtml
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-D5PUMG2P.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-5K5YH6M7.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-42AER3PM.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-NZ7K76Y2.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-ZJO4SLHC.js";
|
|
135
135
|
import {
|
|
136
136
|
HTML_ATTRIBUTE_ENTITIES,
|
|
137
137
|
MagicString,
|
|
@@ -5495,7 +5495,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
|
5495
5495
|
let block = extractGsapScriptBlock(html);
|
|
5496
5496
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
5497
5497
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
5498
|
-
const { GSAP_CDN } = await import("./dist-
|
|
5498
|
+
const { GSAP_CDN } = await import("./dist-P5OHBFEV.js");
|
|
5499
5499
|
const bootstrap = [
|
|
5500
5500
|
`<script src="${GSAP_CDN}"></script>`,
|
|
5501
5501
|
"<script>",
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
flush,
|
|
9
9
|
shouldTrack,
|
|
10
10
|
trackEvent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2XIPB4MP.js";
|
|
12
12
|
import {
|
|
13
13
|
getPowerState
|
|
14
14
|
} from "./chunk-QWQ6GQTI.js";
|
|
@@ -145,6 +145,15 @@ function renderEnvironmentEventProperties(props) {
|
|
|
145
145
|
browser_path_drive: props.browserInstall?.drive
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
+
function renderCpuEventProperties(props) {
|
|
149
|
+
return {
|
|
150
|
+
cpu_busy_avg_pct: props.cpuBusyAvgPct,
|
|
151
|
+
cpu_busy_peak_pct: props.cpuBusyPeakPct,
|
|
152
|
+
cpu_cores_busy_peak: props.cpuCoresBusyPeak,
|
|
153
|
+
load_avg_start: props.loadAvgStart,
|
|
154
|
+
load_avg_end: props.loadAvgEnd
|
|
155
|
+
};
|
|
156
|
+
}
|
|
148
157
|
function redactTelemetryMessage(value) {
|
|
149
158
|
return redactTelemetryString(value);
|
|
150
159
|
}
|
|
@@ -293,6 +302,7 @@ function trackRenderComplete(props) {
|
|
|
293
302
|
source: props.source ?? "cli",
|
|
294
303
|
...renderOutputShapeEventProperties(props),
|
|
295
304
|
...renderEnvironmentEventProperties(props),
|
|
305
|
+
...renderCpuEventProperties(props),
|
|
296
306
|
composition_duration_ms: props.compositionDurationMs,
|
|
297
307
|
composition_width: props.compositionWidth,
|
|
298
308
|
composition_height: props.compositionHeight,
|
|
@@ -349,6 +359,7 @@ function trackRenderError(props) {
|
|
|
349
359
|
elapsed_ms: props.elapsedMs,
|
|
350
360
|
...renderOutputShapeEventProperties(props),
|
|
351
361
|
...renderEnvironmentEventProperties(props),
|
|
362
|
+
...renderCpuEventProperties(props),
|
|
352
363
|
peak_memory_mb: props.peakMemoryMb,
|
|
353
364
|
memory_free_mb: props.memoryFreeMb,
|
|
354
365
|
...powerStateFields(),
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
import {
|
|
8
|
+
HyperframesApiError
|
|
9
|
+
} from "./chunk-5UBZPG74.js";
|
|
10
|
+
|
|
11
|
+
// src/cloud/upload.ts
|
|
12
|
+
import { createHash } from "crypto";
|
|
13
|
+
var COMPLETE_MAX_RETRIES = 5;
|
|
14
|
+
var COMPLETE_RETRY_BASE_MS = 500;
|
|
15
|
+
var CONTENT_TYPE_ZIP = "application/zip";
|
|
16
|
+
function sha256Hex(bytes) {
|
|
17
|
+
return createHash("sha256").update(bytes).digest("hex");
|
|
18
|
+
}
|
|
19
|
+
function sleep(ms) {
|
|
20
|
+
return new Promise((r) => setTimeout(r, ms));
|
|
21
|
+
}
|
|
22
|
+
function normalizeUploadHeaders(raw) {
|
|
23
|
+
const out = {};
|
|
24
|
+
for (const [k, v] of Object.entries(raw ?? {})) {
|
|
25
|
+
if (typeof v === "string") out[k] = v;
|
|
26
|
+
else if (typeof v === "number" || typeof v === "boolean") out[k] = String(v);
|
|
27
|
+
}
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
30
|
+
async function putBytesToPresignedUrl(fetchImpl, uploadUrl, uploadHeaders, bytes, contentType) {
|
|
31
|
+
const headers = {
|
|
32
|
+
"content-type": contentType,
|
|
33
|
+
...normalizeUploadHeaders(uploadHeaders)
|
|
34
|
+
};
|
|
35
|
+
const res = await fetchImpl(uploadUrl, {
|
|
36
|
+
method: "PUT",
|
|
37
|
+
headers,
|
|
38
|
+
body: bytes
|
|
39
|
+
});
|
|
40
|
+
if (!res.ok) {
|
|
41
|
+
const detail = await res.text().catch(() => "");
|
|
42
|
+
throw new Error(
|
|
43
|
+
`Direct upload PUT failed: ${res.status} ${res.statusText}${detail ? ` \u2014 ${detail.slice(0, 300)}` : ""}`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function completeWithRetry(client, asset_id, checksum_sha256) {
|
|
48
|
+
let lastErr;
|
|
49
|
+
for (let attempt = 0; attempt < COMPLETE_MAX_RETRIES; attempt++) {
|
|
50
|
+
try {
|
|
51
|
+
return await client.completeAssetUpload({
|
|
52
|
+
asset_id,
|
|
53
|
+
body: { checksum_sha256 }
|
|
54
|
+
});
|
|
55
|
+
} catch (err) {
|
|
56
|
+
const retryable = err instanceof HyperframesApiError && err.status === 409;
|
|
57
|
+
if (!retryable || attempt === COMPLETE_MAX_RETRIES - 1) {
|
|
58
|
+
throw err;
|
|
59
|
+
}
|
|
60
|
+
lastErr = err;
|
|
61
|
+
await sleep(COMPLETE_RETRY_BASE_MS * (attempt + 1));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
throw lastErr ?? new Error("completeAssetUpload retries exhausted");
|
|
65
|
+
}
|
|
66
|
+
async function uploadAssetViaDirectUpload(opts) {
|
|
67
|
+
const start = Date.now();
|
|
68
|
+
const { bytes, filename, idempotencyKey } = opts;
|
|
69
|
+
const size_bytes = bytes.byteLength;
|
|
70
|
+
const checksum_sha256 = sha256Hex(bytes);
|
|
71
|
+
const fetchImpl = opts.fetchImpl ?? fetch;
|
|
72
|
+
opts.onProgress?.({ phase: "initialize" });
|
|
73
|
+
const initialize = await opts.client.createAssetUpload({
|
|
74
|
+
body: { filename, content_type: opts.contentType, size_bytes, checksum_sha256 },
|
|
75
|
+
idempotencyKey
|
|
76
|
+
});
|
|
77
|
+
opts.onProgress?.({ phase: "upload", percent: 0 });
|
|
78
|
+
await putBytesToPresignedUrl(
|
|
79
|
+
fetchImpl,
|
|
80
|
+
initialize.upload_url,
|
|
81
|
+
initialize.upload_headers,
|
|
82
|
+
bytes,
|
|
83
|
+
opts.contentType
|
|
84
|
+
);
|
|
85
|
+
opts.onProgress?.({ phase: "upload", percent: 100 });
|
|
86
|
+
opts.onProgress?.({ phase: "complete" });
|
|
87
|
+
const completed = await completeWithRetry(opts.client, initialize.asset_id, checksum_sha256);
|
|
88
|
+
return {
|
|
89
|
+
asset_id: completed.asset_id,
|
|
90
|
+
size_bytes,
|
|
91
|
+
duration_ms: Date.now() - start
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function uploadZipViaDirectUpload(opts) {
|
|
95
|
+
return uploadAssetViaDirectUpload({ ...opts, contentType: CONTENT_TYPE_ZIP });
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
uploadAssetViaDirectUpload,
|
|
100
|
+
uploadZipViaDirectUpload
|
|
101
|
+
};
|
|
@@ -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-CXVBPW5F.js";
|
|
10
10
|
import {
|
|
11
11
|
injectTagsAtHeadStart
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZJO4SLHC.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/compositionServer.ts
|
|
15
15
|
import { createHash } from "crypto";
|
|
@@ -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-VG3ZMY2H.js";
|
|
10
10
|
|
|
11
11
|
// src/registry/compatibility.ts
|
|
12
12
|
import { compareVersions } from "compare-versions";
|