@hyperframes/studio 0.8.9 → 0.8.10
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/assets/{hyperframes-player-OP68oEBG.js → hyperframes-player-DoTrWV8q.js} +1 -1
- package/dist/assets/{index-D1Sa69m2.js → index-BQs1fahB.js} +1 -1
- package/dist/assets/{index-57oMsXQN.js → index-C6m2nHiX.js} +3 -3
- package/dist/assets/{index-BIdEpMGS.js → index-DV45YLqR.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/components/renders/useRenderQueue.ts +9 -2
- package/src/components/renders/useRenderQueueTransportError.test.tsx +49 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/studio",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"gsap": "^3.13.0",
|
|
48
48
|
"marked": "^14.1.4",
|
|
49
49
|
"mediabunny": "^1.45.3",
|
|
50
|
-
"@hyperframes/core": "0.8.
|
|
51
|
-
"@hyperframes/parsers": "0.8.
|
|
52
|
-
"@hyperframes/
|
|
53
|
-
"@hyperframes/
|
|
54
|
-
"@hyperframes/
|
|
50
|
+
"@hyperframes/core": "0.8.10",
|
|
51
|
+
"@hyperframes/parsers": "0.8.10",
|
|
52
|
+
"@hyperframes/player": "0.8.10",
|
|
53
|
+
"@hyperframes/sdk": "0.8.10",
|
|
54
|
+
"@hyperframes/studio-server": "0.8.10"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/react": "19",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"vite": "^6.4.2",
|
|
69
69
|
"vitest": "^3.2.4",
|
|
70
70
|
"zustand": "^5.0.0",
|
|
71
|
-
"@hyperframes/producer": "0.8.
|
|
71
|
+
"@hyperframes/producer": "0.8.10"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"react": "19",
|
|
@@ -250,12 +250,19 @@ export function useRenderQueue(projectId: string | null) {
|
|
|
250
250
|
headers: { "Content-Type": "application/json" },
|
|
251
251
|
body: JSON.stringify(body),
|
|
252
252
|
});
|
|
253
|
-
} catch {
|
|
253
|
+
} catch (err) {
|
|
254
|
+
// The cause used to be discarded. Every failure — a dead server, an
|
|
255
|
+
// aborted request, a DNS error, a mid-render crash — surfaced as the
|
|
256
|
+
// same sentence, and this string is what travels into the feedback
|
|
257
|
+
// report too, so field reports of a render that fails *every time*
|
|
258
|
+
// still carried nothing to act on. Keep the CLI guidance, name the
|
|
259
|
+
// cause after it.
|
|
260
|
+
const cause = err instanceof Error ? err.message : String(err);
|
|
254
261
|
const failedJob: RenderJob = {
|
|
255
262
|
id: generateId(),
|
|
256
263
|
status: "failed",
|
|
257
264
|
progress: 0,
|
|
258
|
-
error:
|
|
265
|
+
error: `Could not reach render server: ${cause}. Use \`hyperframes render\` from the CLI instead.`,
|
|
259
266
|
filename: "Export failed",
|
|
260
267
|
createdAt: startTime,
|
|
261
268
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// @vitest-environment happy-dom
|
|
2
|
+
|
|
3
|
+
// The render POST's catch used to discard its error, so a dead server, a DNS
|
|
4
|
+
// failure and a mid-render crash all produced one sentence. That string is also
|
|
5
|
+
// what travels into the feedback report, so three field reports — one of them a
|
|
6
|
+
// render that failed EVERY time — arrived with nothing to act on.
|
|
7
|
+
|
|
8
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
9
|
+
import { mountRenderQueue } from "./renderQueueTestHarness";
|
|
10
|
+
|
|
11
|
+
vi.mock("./useFfmpegStatus", async (importOriginal) => ({
|
|
12
|
+
...(await importOriginal<typeof import("./useFfmpegStatus")>()),
|
|
13
|
+
useFfmpegStatus: () => ({ status: { ok: true }, checking: false, recheck: vi.fn() }),
|
|
14
|
+
}));
|
|
15
|
+
vi.mock("../../telemetry/events", () => ({ trackStudioRenderStart: vi.fn() }));
|
|
16
|
+
|
|
17
|
+
const { useRenderQueue } = await import("./useRenderQueue");
|
|
18
|
+
|
|
19
|
+
let queue: ReturnType<typeof mountRenderQueue> | null = null;
|
|
20
|
+
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
vi.stubGlobal(
|
|
23
|
+
"fetch",
|
|
24
|
+
vi.fn(() => Promise.reject(new TypeError("Failed to fetch"))),
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
afterEach(() => {
|
|
29
|
+
queue?.unmount();
|
|
30
|
+
queue = null;
|
|
31
|
+
document.body.innerHTML = "";
|
|
32
|
+
vi.unstubAllGlobals();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
describe("useRenderQueue transport failure", () => {
|
|
36
|
+
it("names the cause instead of collapsing every failure into one sentence", async () => {
|
|
37
|
+
queue = mountRenderQueue(useRenderQueue);
|
|
38
|
+
const { act } = await import("react");
|
|
39
|
+
await act(async () => {
|
|
40
|
+
await queue?.api().startRender({});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const job = queue.api().jobs.at(-1);
|
|
44
|
+
expect(job?.status).toBe("failed");
|
|
45
|
+
expect(job?.error).toContain("Failed to fetch");
|
|
46
|
+
// The CLI guidance still earns its place; it just no longer stands alone.
|
|
47
|
+
expect(job?.error).toContain("hyperframes render");
|
|
48
|
+
});
|
|
49
|
+
});
|