hyperframes 0.6.60 → 0.6.62
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
CHANGED
|
@@ -50,7 +50,7 @@ var VERSION;
|
|
|
50
50
|
var init_version = __esm({
|
|
51
51
|
"src/version.ts"() {
|
|
52
52
|
"use strict";
|
|
53
|
-
VERSION = true ? "0.6.
|
|
53
|
+
VERSION = true ? "0.6.62" : "0.0.0-dev";
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
@@ -58777,7 +58777,13 @@ function registerFileRoutes(api, adapter2) {
|
|
|
58777
58777
|
writeFileSync8(res.absPath, newHtml, "utf-8");
|
|
58778
58778
|
}
|
|
58779
58779
|
const freshParsed = parseGsapScript2(newScript);
|
|
58780
|
-
return c3.json({
|
|
58780
|
+
return c3.json({
|
|
58781
|
+
ok: true,
|
|
58782
|
+
parsed: freshParsed,
|
|
58783
|
+
before: html,
|
|
58784
|
+
after: newHtml,
|
|
58785
|
+
scriptText: newScript
|
|
58786
|
+
});
|
|
58781
58787
|
});
|
|
58782
58788
|
}
|
|
58783
58789
|
var init_files = __esm({
|
|
@@ -73840,8 +73846,15 @@ async function createShaderTransitionWorkerPool(opts) {
|
|
|
73840
73846
|
const traceEnabled = process.env.HF_SHADER_POOL_TRACE === "1";
|
|
73841
73847
|
let nextTaskId = 0;
|
|
73842
73848
|
const execArgv = buildExecArgv(entryIsTs);
|
|
73849
|
+
const failQueueIfNoLiveSlots = () => {
|
|
73850
|
+
if (slots.some((s2) => !s2.dead)) return;
|
|
73851
|
+
while (queue.length > 0) {
|
|
73852
|
+
const t2 = queue.shift();
|
|
73853
|
+
if (t2) t2.reject(new Error("shader-blend pool has no live workers; task abandoned"));
|
|
73854
|
+
}
|
|
73855
|
+
};
|
|
73843
73856
|
const dispatchNext = (slot) => {
|
|
73844
|
-
if (terminated || slot.busy) return;
|
|
73857
|
+
if (terminated || slot.busy || slot.dead) return;
|
|
73845
73858
|
const task = queue.shift();
|
|
73846
73859
|
if (!task) return;
|
|
73847
73860
|
slot.busy = true;
|
|
@@ -73905,24 +73918,28 @@ async function createShaderTransitionWorkerPool(opts) {
|
|
|
73905
73918
|
const task = slot.current;
|
|
73906
73919
|
slot.current = null;
|
|
73907
73920
|
slot.busy = false;
|
|
73921
|
+
slot.dead = true;
|
|
73908
73922
|
if (task) {
|
|
73909
73923
|
task.reject(new Error(`shader-blend worker crashed mid-task: ${err.message}; buffers lost`));
|
|
73910
73924
|
}
|
|
73911
73925
|
log2.warn?.("[shaderTransitionWorkerPool] worker errored", { err: err.message });
|
|
73926
|
+
failQueueIfNoLiveSlots();
|
|
73912
73927
|
};
|
|
73913
73928
|
const onWorkerExit = (slot, code) => {
|
|
73914
73929
|
if (terminated) return;
|
|
73930
|
+
slot.dead = true;
|
|
73915
73931
|
if (slot.current) {
|
|
73916
73932
|
slot.current.reject(new Error(`shader-blend worker exited (code=${code}) mid-task`));
|
|
73917
73933
|
slot.current = null;
|
|
73918
73934
|
slot.busy = false;
|
|
73919
73935
|
}
|
|
73920
73936
|
log2.warn?.("[shaderTransitionWorkerPool] worker exited unexpectedly", { code });
|
|
73937
|
+
failQueueIfNoLiveSlots();
|
|
73921
73938
|
};
|
|
73922
73939
|
try {
|
|
73923
73940
|
for (let i2 = 0; i2 < size; i2++) {
|
|
73924
73941
|
const worker = new Worker(entry, { execArgv });
|
|
73925
|
-
const slot = { worker, busy: false, current: null };
|
|
73942
|
+
const slot = { worker, busy: false, current: null, dead: false };
|
|
73926
73943
|
worker.on("message", (msg) => onWorkerMessage(slot, msg));
|
|
73927
73944
|
worker.on(
|
|
73928
73945
|
"error",
|
|
@@ -73945,12 +73962,14 @@ async function createShaderTransitionWorkerPool(opts) {
|
|
|
73945
73962
|
}
|
|
73946
73963
|
return new Promise((resolve46, reject) => {
|
|
73947
73964
|
const task = traceEnabled ? { req, resolve: resolve46, reject, enqueuedAtMs: Date.now(), traceId: ++nextTaskId } : { req, resolve: resolve46, reject };
|
|
73948
|
-
const idle = slots.find((s2) => !s2.busy);
|
|
73965
|
+
const idle = slots.find((s2) => !s2.busy && !s2.dead);
|
|
73949
73966
|
if (idle) {
|
|
73950
73967
|
queue.unshift(task);
|
|
73951
73968
|
dispatchNext(idle);
|
|
73952
|
-
} else {
|
|
73969
|
+
} else if (slots.some((s2) => !s2.dead)) {
|
|
73953
73970
|
queue.push(task);
|
|
73971
|
+
} else {
|
|
73972
|
+
reject(new Error("shader-blend pool has no live workers"));
|
|
73954
73973
|
}
|
|
73955
73974
|
});
|
|
73956
73975
|
},
|
|
@@ -77014,7 +77033,8 @@ function resolveChunkPlan(totalFrames, configChunkSize, maxParallelChunks) {
|
|
|
77014
77033
|
const naiveCount = Math.ceil(totalFrames / resolvedChunkSize);
|
|
77015
77034
|
const chunkCount = Math.min(maxParallelChunks, Math.max(1, naiveCount));
|
|
77016
77035
|
const effectiveChunkSize = Math.max(resolvedChunkSize, Math.ceil(totalFrames / chunkCount));
|
|
77017
|
-
|
|
77036
|
+
const tightChunkCount = Math.min(chunkCount, Math.ceil(totalFrames / effectiveChunkSize));
|
|
77037
|
+
return { chunkCount: tightChunkCount, effectiveChunkSize };
|
|
77018
77038
|
}
|
|
77019
77039
|
function assertPositiveInteger(name, value) {
|
|
77020
77040
|
if (!Number.isInteger(value) || value <= 0) {
|