hyperframes 0.8.71 → 0.8.73
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/cli.js +456 -386
- package/dist/fontLocalizeCli.js +93 -59
- package/dist/hyperframe-runtime.js +45 -45
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +45 -45
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/studio/assets/{hyperframes-player-DuN39PN6.js → hyperframes-player-BUauoSsb.js} +1 -1
- package/dist/studio/assets/{index-BoQsbDgf.js → index-CMFPPAGq.js} +1 -1
- package/dist/studio/assets/{index-BmCEvqsr.js → index-DKInxDDv.js} +1 -1
- package/dist/studio/assets/{index-CUcdruHw.js → index-DxIHGgGZ.js} +163 -163
- package/dist/studio/index.d.ts +16 -1
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +129 -92
- package/dist/studio/index.js.map +1 -1
- package/package.json +1 -1
package/dist/fontLocalizeCli.js
CHANGED
|
@@ -65139,7 +65139,7 @@ function classifyDownloadFailure(error) {
|
|
|
65139
65139
|
return new UrlDownloadError(
|
|
65140
65140
|
"network",
|
|
65141
65141
|
true,
|
|
65142
|
-
|
|
65142
|
+
`Download failed due to a transient network error${describeCause(current2)}`
|
|
65143
65143
|
);
|
|
65144
65144
|
}
|
|
65145
65145
|
current2 = typeof current2 === "object" && current2 !== null && "cause" in current2 ? current2.cause : void 0;
|
|
@@ -65147,9 +65147,16 @@ function classifyDownloadFailure(error) {
|
|
|
65147
65147
|
return new UrlDownloadError(
|
|
65148
65148
|
"filesystem",
|
|
65149
65149
|
false,
|
|
65150
|
-
|
|
65150
|
+
`Download failed while writing the local artifact${describeCause(error)}`
|
|
65151
65151
|
);
|
|
65152
65152
|
}
|
|
65153
|
+
function describeCause(error) {
|
|
65154
|
+
const name = error instanceof Error && /^[A-Za-z]{1,40}$/.test(error.name) ? error.name : "";
|
|
65155
|
+
const rawCode = typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
|
|
65156
|
+
const code = typeof rawCode === "string" && /^[A-Z0-9_]{1,40}$/.test(rawCode) ? rawCode : "";
|
|
65157
|
+
const tag = [name, code].filter(Boolean).join(" ");
|
|
65158
|
+
return tag ? ` (${tag})` : "";
|
|
65159
|
+
}
|
|
65153
65160
|
function isRetryableNetworkCause(error) {
|
|
65154
65161
|
const message = error instanceof Error ? error.message : String(error);
|
|
65155
65162
|
const code = typeof error === "object" && error !== null && "code" in error && typeof error.code === "string" ? error.code : "";
|
|
@@ -89223,6 +89230,38 @@ function updateJobStatus(job, status, stage, progress, onProgress) {
|
|
|
89223
89230
|
}
|
|
89224
89231
|
if (onProgress) void onProgress(job, stage);
|
|
89225
89232
|
}
|
|
89233
|
+
var PROGRESS_REPORT_INTERVAL_MS = 250;
|
|
89234
|
+
var lastFrameReportAt = /* @__PURE__ */ new WeakMap();
|
|
89235
|
+
var lastStartupReportAt = /* @__PURE__ */ new WeakMap();
|
|
89236
|
+
function reportThrottled(lastReportAt, job, stage, progress, onProgress, force) {
|
|
89237
|
+
const now = Date.now();
|
|
89238
|
+
const last = lastReportAt.get(job);
|
|
89239
|
+
const due = force || last === void 0 || now - last >= PROGRESS_REPORT_INTERVAL_MS;
|
|
89240
|
+
if (due) lastReportAt.set(job, now);
|
|
89241
|
+
updateJobStatus(job, "rendering", stage, progress, due ? onProgress : void 0);
|
|
89242
|
+
}
|
|
89243
|
+
function reportFrameProgress(job, stage, progress, onProgress, isLastFrame) {
|
|
89244
|
+
reportThrottled(lastFrameReportAt, job, stage, progress, onProgress, isLastFrame);
|
|
89245
|
+
}
|
|
89246
|
+
var workerPhasesByJob = /* @__PURE__ */ new WeakMap();
|
|
89247
|
+
function reportWorkerStartup(job, progress, onProgress) {
|
|
89248
|
+
const phase = progress.latestWorkerPhase;
|
|
89249
|
+
if (!phase) return;
|
|
89250
|
+
const phases = workerPhasesByJob.get(job) ?? /* @__PURE__ */ new Map();
|
|
89251
|
+
workerPhasesByJob.set(job, phases);
|
|
89252
|
+
phases.set(phase.workerId, phase.phase);
|
|
89253
|
+
const ready = [...phases].filter(
|
|
89254
|
+
([id, p]) => id < progress.activeWorkers && (p === "frame_capture" || p === "frame_encode")
|
|
89255
|
+
).length;
|
|
89256
|
+
reportThrottled(
|
|
89257
|
+
lastStartupReportAt,
|
|
89258
|
+
job,
|
|
89259
|
+
`Starting browsers (${ready}/${progress.activeWorkers} ready)`,
|
|
89260
|
+
job.progress,
|
|
89261
|
+
onProgress,
|
|
89262
|
+
false
|
|
89263
|
+
);
|
|
89264
|
+
}
|
|
89226
89265
|
var materializePathModule = {
|
|
89227
89266
|
resolve: resolve8,
|
|
89228
89267
|
join: join22,
|
|
@@ -91541,12 +91580,12 @@ async function runWorkerEncodePipelineLoop(session, totalFrames, job, currentEnc
|
|
|
91541
91580
|
reorderBuffer.advanceTo(prev.idx + 1);
|
|
91542
91581
|
job.framesRendered = prev.idx + 1;
|
|
91543
91582
|
lastProgressAt = Date.now();
|
|
91544
|
-
|
|
91583
|
+
reportFrameProgress(
|
|
91545
91584
|
job,
|
|
91546
|
-
"rendering",
|
|
91547
91585
|
`Streaming frame ${prev.idx + 1}/${totalFrames}`,
|
|
91548
91586
|
Math.round(25 + (prev.idx + 1) / totalFrames * 55),
|
|
91549
|
-
onProgress
|
|
91587
|
+
onProgress,
|
|
91588
|
+
prev.idx + 1 === totalFrames
|
|
91550
91589
|
);
|
|
91551
91590
|
};
|
|
91552
91591
|
const batchNRaw = Number(process.env.HF_DE_BATCH ?? "4");
|
|
@@ -91560,12 +91599,12 @@ async function runWorkerEncodePipelineLoop(session, totalFrames, job, currentEnc
|
|
|
91560
91599
|
reorderBuffer.advanceTo(item.idx + 1);
|
|
91561
91600
|
job.framesRendered = item.idx + 1;
|
|
91562
91601
|
lastProgressAt = Date.now();
|
|
91563
|
-
|
|
91602
|
+
reportFrameProgress(
|
|
91564
91603
|
job,
|
|
91565
|
-
"rendering",
|
|
91566
91604
|
`Streaming frame ${item.idx + 1}/${totalFrames}`,
|
|
91567
91605
|
Math.round(25 + (item.idx + 1) / totalFrames * 55),
|
|
91568
|
-
onProgress
|
|
91606
|
+
onProgress,
|
|
91607
|
+
item.idx + 1 === totalFrames
|
|
91569
91608
|
);
|
|
91570
91609
|
}
|
|
91571
91610
|
};
|
|
@@ -91762,6 +91801,7 @@ async function runCaptureStreamingStage(input) {
|
|
|
91762
91801
|
canvasDrawElement: phase.canvasDrawElement,
|
|
91763
91802
|
gpuBackend: phase.gpuBackend
|
|
91764
91803
|
});
|
|
91804
|
+
if (progress.capturedFrames === 0) reportWorkerStartup(job, progress, onProgress);
|
|
91765
91805
|
return;
|
|
91766
91806
|
}
|
|
91767
91807
|
if (progress.capturedFrames > lastCapturedFrames) {
|
|
@@ -91771,16 +91811,13 @@ async function runCaptureStreamingStage(input) {
|
|
|
91771
91811
|
}
|
|
91772
91812
|
job.framesRendered = progress.capturedFrames;
|
|
91773
91813
|
const frameProgress = progress.capturedFrames / progress.totalFrames;
|
|
91774
|
-
|
|
91775
|
-
|
|
91776
|
-
|
|
91777
|
-
|
|
91778
|
-
|
|
91779
|
-
|
|
91780
|
-
|
|
91781
|
-
onProgress
|
|
91782
|
-
);
|
|
91783
|
-
}
|
|
91814
|
+
reportFrameProgress(
|
|
91815
|
+
job,
|
|
91816
|
+
`Streaming frame ${progress.capturedFrames}/${progress.totalFrames} (${workerCount} workers)`,
|
|
91817
|
+
Math.round(25 + frameProgress * 55),
|
|
91818
|
+
onProgress,
|
|
91819
|
+
progress.capturedFrames === progress.totalFrames
|
|
91820
|
+
);
|
|
91784
91821
|
},
|
|
91785
91822
|
onFrameBuffer,
|
|
91786
91823
|
// Interleaved DE workers each need their own browser PROCESS:
|
|
@@ -91892,12 +91929,12 @@ async function runCaptureStreamingStage(input) {
|
|
|
91892
91929
|
lastProgressAt = Date.now();
|
|
91893
91930
|
const frameProgress = (i + 1) / totalFrames;
|
|
91894
91931
|
const progress = 25 + frameProgress * 55;
|
|
91895
|
-
|
|
91932
|
+
reportFrameProgress(
|
|
91896
91933
|
job,
|
|
91897
|
-
"rendering",
|
|
91898
91934
|
`Streaming frame ${i + 1}/${totalFrames}`,
|
|
91899
91935
|
Math.round(progress),
|
|
91900
|
-
onProgress
|
|
91936
|
+
onProgress,
|
|
91937
|
+
i + 1 === totalFrames
|
|
91901
91938
|
);
|
|
91902
91939
|
}
|
|
91903
91940
|
}
|
|
@@ -91976,12 +92013,12 @@ async function captureSegmentFrames(ctx, segment, encoder) {
|
|
|
91976
92013
|
ensureFrameWritten(await encoder.writeFrame(buffer), i, encoder);
|
|
91977
92014
|
ctx.job.framesRendered = i + 1;
|
|
91978
92015
|
lastProgressAt = Date.now();
|
|
91979
|
-
|
|
92016
|
+
reportFrameProgress(
|
|
91980
92017
|
ctx.job,
|
|
91981
|
-
"rendering",
|
|
91982
92018
|
`Streaming frame ${i + 1}/${ctx.totalFrames} (segment ${segment.index + 1}/${ctx.segmentCount}` + (ctx.skipped > 0 ? `, skipped ${ctx.skipped}` : "") + ")",
|
|
91983
92019
|
Math.round(25 + (i + 1) / ctx.totalFrames * 55),
|
|
91984
|
-
ctx.onProgress
|
|
92020
|
+
ctx.onProgress,
|
|
92021
|
+
i + 1 === ctx.totalFrames
|
|
91985
92022
|
);
|
|
91986
92023
|
}
|
|
91987
92024
|
}
|
|
@@ -98125,19 +98162,20 @@ async function runCaptureStage(input) {
|
|
|
98125
98162
|
frameRangeStart: frameRange?.startFrame,
|
|
98126
98163
|
dedupPerfs,
|
|
98127
98164
|
onProgress: (progress) => {
|
|
98165
|
+
if (progress.latestWorkerPhase) {
|
|
98166
|
+
if (progress.capturedFrames === 0) reportWorkerStartup(job, progress, onProgress);
|
|
98167
|
+
return;
|
|
98168
|
+
}
|
|
98128
98169
|
job.framesRendered = progress.capturedFrames;
|
|
98129
98170
|
checkDiskProjection(progress.capturedFrames);
|
|
98130
98171
|
const frameProgress = progress.capturedFrames / progress.totalFrames;
|
|
98131
|
-
|
|
98132
|
-
|
|
98133
|
-
|
|
98134
|
-
|
|
98135
|
-
|
|
98136
|
-
|
|
98137
|
-
|
|
98138
|
-
onProgress
|
|
98139
|
-
);
|
|
98140
|
-
}
|
|
98172
|
+
reportFrameProgress(
|
|
98173
|
+
job,
|
|
98174
|
+
`Capturing frame ${progress.capturedFrames}/${progress.totalFrames} (${progress.activeWorkers} workers)`,
|
|
98175
|
+
Math.round(25 + frameProgress * 45),
|
|
98176
|
+
onProgress,
|
|
98177
|
+
progress.capturedFrames === progress.totalFrames
|
|
98178
|
+
);
|
|
98141
98179
|
},
|
|
98142
98180
|
cfg: captureCfg,
|
|
98143
98181
|
log
|
|
@@ -98267,12 +98305,12 @@ async function captureSessionFrames(session, { input, rangeStart, rangeEnd, resu
|
|
|
98267
98305
|
const reportFrame = (fileIndex) => {
|
|
98268
98306
|
job.framesRendered = fileIndex + 1;
|
|
98269
98307
|
checkDiskProjection(fileIndex + 1);
|
|
98270
|
-
|
|
98308
|
+
reportFrameProgress(
|
|
98271
98309
|
job,
|
|
98272
|
-
"rendering",
|
|
98273
98310
|
`Capturing frame ${fileIndex + 1}/${rangeFrames}`,
|
|
98274
98311
|
Math.round(25 + (fileIndex + 1) / rangeFrames * 45),
|
|
98275
|
-
onProgress
|
|
98312
|
+
onProgress,
|
|
98313
|
+
fileIndex + 1 === rangeFrames
|
|
98276
98314
|
);
|
|
98277
98315
|
};
|
|
98278
98316
|
if (session.workerEncodeEnabled) {
|
|
@@ -98525,16 +98563,13 @@ async function runSequentialLayeredFrameLoop(input) {
|
|
|
98525
98563
|
log
|
|
98526
98564
|
});
|
|
98527
98565
|
job.framesRendered = i + 1;
|
|
98528
|
-
|
|
98529
|
-
|
|
98530
|
-
|
|
98531
|
-
|
|
98532
|
-
|
|
98533
|
-
|
|
98534
|
-
|
|
98535
|
-
onProgress
|
|
98536
|
-
);
|
|
98537
|
-
}
|
|
98566
|
+
reportFrameProgress(
|
|
98567
|
+
job,
|
|
98568
|
+
`Layered composite frame ${i + 1}/${job.totalFrames}`,
|
|
98569
|
+
Math.round(25 + (i + 1) / totalFrames * 55),
|
|
98570
|
+
onProgress,
|
|
98571
|
+
i + 1 === totalFrames
|
|
98572
|
+
);
|
|
98538
98573
|
}
|
|
98539
98574
|
}
|
|
98540
98575
|
|
|
@@ -98826,16 +98861,13 @@ async function runHybridLayeredFrameLoop(input) {
|
|
|
98826
98861
|
reorderBuffer.advanceTo(frameIdx + 1);
|
|
98827
98862
|
framesWritten += 1;
|
|
98828
98863
|
job.framesRendered = framesWritten;
|
|
98829
|
-
|
|
98830
|
-
|
|
98831
|
-
|
|
98832
|
-
|
|
98833
|
-
|
|
98834
|
-
|
|
98835
|
-
|
|
98836
|
-
onProgress
|
|
98837
|
-
);
|
|
98838
|
-
}
|
|
98864
|
+
reportFrameProgress(
|
|
98865
|
+
job,
|
|
98866
|
+
`Layered composite frame ${framesWritten}/${job.totalFrames}`,
|
|
98867
|
+
Math.round(25 + framesWritten / totalFrames * 55),
|
|
98868
|
+
onProgress,
|
|
98869
|
+
framesWritten === totalFrames
|
|
98870
|
+
);
|
|
98839
98871
|
};
|
|
98840
98872
|
const poolRef = shaderPool;
|
|
98841
98873
|
const workerTaskOf = async (w) => {
|
|
@@ -101361,6 +101393,7 @@ async function executeRenderPipeline(input) {
|
|
|
101361
101393
|
}
|
|
101362
101394
|
const framesDir = join47(workDir, "captured-frames");
|
|
101363
101395
|
if (!existsSync33(framesDir)) mkdirSync19(framesDir, { recursive: true });
|
|
101396
|
+
updateJobStatus(job, "rendering", "Checking browser GPU", 25, onProgress);
|
|
101364
101397
|
const resolvedBrowserGpuMode = await resolveBrowserGpuMode(cfg.browserGpuMode, {
|
|
101365
101398
|
chromePath: resolveHeadlessShellPath(cfg),
|
|
101366
101399
|
browserTimeout: cfg.browserTimeout
|
|
@@ -101553,6 +101586,7 @@ async function executeRenderPipeline(input) {
|
|
|
101553
101586
|
}
|
|
101554
101587
|
});
|
|
101555
101588
|
if (job.config.workers === void 0 && totalFrames >= 60 && !htmlInCanvasDetected && !cfg.lowMemoryMode && !deInversionEligible && !deParallelRouterEligible) {
|
|
101589
|
+
updateJobStatus(job, "rendering", "Measuring capture speed", 25, onProgress);
|
|
101556
101590
|
const outcome = await observeRenderStage(
|
|
101557
101591
|
observability,
|
|
101558
101592
|
"capture_calibration",
|
|
@@ -103950,8 +103984,8 @@ async function runFontLocalize(io, localize) {
|
|
|
103950
103984
|
}
|
|
103951
103985
|
|
|
103952
103986
|
// src/version.ts
|
|
103953
|
-
var VERSION = true ? "0.8.
|
|
103954
|
-
var PRODUCER_VERSION = true ? "0.8.
|
|
103987
|
+
var VERSION = true ? "0.8.73" : "0.0.0-dev";
|
|
103988
|
+
var PRODUCER_VERSION = true ? "0.8.73" : "0.0.0-dev";
|
|
103955
103989
|
|
|
103956
103990
|
// src/fontLocalizeCli.ts
|
|
103957
103991
|
async function readStdin() {
|