@hyperframes/producer 0.9.66 → 0.9.67
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/distributed.js +91 -46
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +61 -61
- package/dist/index.d.ts +1 -0
- package/dist/index.js +649 -519
- package/dist/public-server.js +448 -318
- package/dist/services/compositionSizeLimit.d.ts +2 -0
- package/dist/services/htmlCompiler.d.ts +5 -2
- package/dist/services/render/cleanup.d.ts +2 -0
- package/dist/services/render/missingPath.d.ts +15 -0
- package/dist/services/render/observability.d.ts +1 -0
- package/dist/services/renderOrchestrator.d.ts +2 -0
- package/package.json +7 -7
|
@@ -9,6 +9,8 @@ export declare const MAX_COMPOSITION_HTML_BYTES: number;
|
|
|
9
9
|
* above, but a few small files that mount each other many times assemble a page far larger.
|
|
10
10
|
*/
|
|
11
11
|
export declare const MAX_EXPANDED_COMPOSITION_BYTES: number;
|
|
12
|
+
export declare const REMOTE_SCRIPTS = "remote scripts";
|
|
13
|
+
export declare const REMOTE_STYLESHEETS = "remote stylesheets";
|
|
12
14
|
/** Adds up every mount a render inlines, and what it generates for them, and throws past a limit. */
|
|
13
15
|
export declare class CompositionExpansionBudget {
|
|
14
16
|
private bytes;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type RateSpec, type ResolvedDuration, type UnresolvedElement } from "@hyperframes/core";
|
|
2
|
+
import { CompositionExpansionBudget } from "./compositionSizeLimit.js";
|
|
2
3
|
import { type OutsideFilePolicy } from "../utils/paths.js";
|
|
3
4
|
import { type VideoElement, type ImageElement, type AudioElement, type AudioVolumeKeyframe } from "@hyperframes/engine";
|
|
4
5
|
import type { Page } from "puppeteer-core";
|
|
@@ -56,9 +57,11 @@ export declare function detectAncestorBackgroundImage(html: string): boolean;
|
|
|
56
57
|
export declare function detectShaderTransitionUsage(html: string): boolean;
|
|
57
58
|
/**
|
|
58
59
|
* Download external CDN scripts and inline them into the HTML so rendering
|
|
59
|
-
* works without network access (Docker, CI, restricted environments).
|
|
60
|
+
* works without network access (Docker, CI, restricted environments). Each URL
|
|
61
|
+
* is fetched once, a few at a time, and every inlined copy is charged to the
|
|
62
|
+
* render's budget as it arrives, so going over stops the downloads still queued.
|
|
60
63
|
*/
|
|
61
|
-
export declare function inlineExternalScripts(html: string): Promise<string>;
|
|
64
|
+
export declare function inlineExternalScripts(html: string, budget?: CompositionExpansionBudget): Promise<string>;
|
|
62
65
|
/**
|
|
63
66
|
* Scan compiled HTML for asset references that resolve outside projectDir.
|
|
64
67
|
* For each, map the normalized in-HTML path to the real filesystem path so
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { type SubTimelineWaitOutcome } from "@hyperframes/engine";
|
|
3
3
|
import type { HdrDiagnostics, RenderJob } from "../renderOrchestrator.js";
|
|
4
4
|
import type { RenderObservabilitySummary } from "./observability.js";
|
|
5
|
+
import type { MissingPathFacts } from "./missingPath.js";
|
|
5
6
|
/**
|
|
6
7
|
* Build the `RenderJob.errorDetails` shape downstream consumers (SSE,
|
|
7
8
|
* sync `/render` response, queue introspection) read on failure.
|
|
@@ -14,4 +15,5 @@ export declare function buildRenderErrorDetails(input: {
|
|
|
14
15
|
hdrDiagnostics: HdrDiagnostics;
|
|
15
16
|
observability?: RenderObservabilitySummary;
|
|
16
17
|
subTimelineWait?: SubTimelineWaitOutcome;
|
|
18
|
+
missingPath?: MissingPathFacts;
|
|
17
19
|
}): NonNullable<RenderJob["errorDetails"]>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** What was gone around a missing path when the render failed, from closed lists only: never a path or a name. */
|
|
2
|
+
export interface MissingPathFacts {
|
|
3
|
+
/** The highest thing gone on the path; a link on the way is read through to its target. */
|
|
4
|
+
scope: "file" | "link_target" | "cache_entry" | "cache_partial" | "cache_root" | "work_dir" | "temp_root" | "other";
|
|
5
|
+
/** Under a folder a sync app owns (OneDrive, Dropbox, iCloud, Google Drive). */
|
|
6
|
+
synced: boolean;
|
|
7
|
+
root: "system_temp" | "cache_dir" | "other";
|
|
8
|
+
}
|
|
9
|
+
/** What was gone around the path a failed render's ENOENT names; undefined when it names none or the look fails.
|
|
10
|
+
* Only the render's own folders are looked at, never a share; call it before the render's own cleanup runs. */
|
|
11
|
+
export declare function describeMissingPath(error: unknown, { cacheDir, workDir, tempRoot, }?: {
|
|
12
|
+
cacheDir?: string;
|
|
13
|
+
workDir?: string;
|
|
14
|
+
tempRoot?: string;
|
|
15
|
+
}): MissingPathFacts | undefined;
|
|
@@ -214,6 +214,7 @@ export interface RenderExtractionObservability {
|
|
|
214
214
|
vfrPreflightCount?: number;
|
|
215
215
|
cacheHits?: number;
|
|
216
216
|
cacheMisses?: number;
|
|
217
|
+
cachePublishFailures?: number;
|
|
217
218
|
/** Per-source transient download/metadata/FFmpeg retries performed during extraction. */
|
|
218
219
|
transientRetries?: number;
|
|
219
220
|
/**
|
|
@@ -5,6 +5,7 @@ import { type EngineConfig, type ExtractionPhaseBreakdown, type VideoFrameFormat
|
|
|
5
5
|
import { type ReferenceBackgroundResult } from "@hyperframes/engine";
|
|
6
6
|
import { type ProducerLogger } from "../logger.js";
|
|
7
7
|
import { type RenderOutputFormat } from "./render/renderFormat.js";
|
|
8
|
+
import { type MissingPathFacts } from "./render/missingPath.js";
|
|
8
9
|
import { type RenderCaptureObservability, type RenderObservabilitySummary, type OpenStallAttempt, type StageStallRule } from "./render/observability.js";
|
|
9
10
|
import { type HdrPerfSummary } from "./render/hdrPerf.js";
|
|
10
11
|
export declare function sampleDirectoryBytes(dir: string): number;
|
|
@@ -473,6 +474,7 @@ export interface RenderJob extends Partial<ReferenceBackgroundResult> {
|
|
|
473
474
|
observability?: RenderObservabilitySummary;
|
|
474
475
|
/** Worst sub-composition timeline wait outcome across sessions captured before the failure. */
|
|
475
476
|
subTimelineWait?: SubTimelineWaitOutcome;
|
|
477
|
+
missingPath?: MissingPathFacts;
|
|
476
478
|
};
|
|
477
479
|
}
|
|
478
480
|
export type ProgressCallback = (job: RenderJob, message: string) => void | Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/producer",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.67",
|
|
4
4
|
"description": "HTML-to-video rendering engine using Chrome's BeginFrame API",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"postcss": "^8.4.0",
|
|
36
36
|
"puppeteer": "~25.13.0",
|
|
37
37
|
"puppeteer-core": "^25.13.0",
|
|
38
|
-
"@hyperframes/
|
|
39
|
-
"@hyperframes/engine": "0.9.
|
|
40
|
-
"@hyperframes/
|
|
41
|
-
"@hyperframes/
|
|
42
|
-
"@hyperframes/
|
|
38
|
+
"@hyperframes/core": "0.9.67",
|
|
39
|
+
"@hyperframes/engine": "0.9.67",
|
|
40
|
+
"@hyperframes/parsers": "0.9.67",
|
|
41
|
+
"@hyperframes/studio-server": "0.9.67",
|
|
42
|
+
"@hyperframes/lint": "0.9.67"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^25.0.10",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"tsx": "^4.21.0",
|
|
49
49
|
"typescript": "^5.7.2",
|
|
50
50
|
"vitest": "^4.1.12",
|
|
51
|
-
"@hyperframes/aws-lambda": "0.9.
|
|
51
|
+
"@hyperframes/aws-lambda": "0.9.67"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|