@hyperframes/producer 0.9.69 → 0.9.71
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 +143 -90
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +72 -72
- package/dist/index.js +379 -292
- package/dist/public-server.js +268 -183
- package/dist/services/htmlCompiler.d.ts +16 -2
- package/dist/services/render/audioPadTrim.d.ts +2 -1
- package/dist/services/render/segmentManifest.d.ts +3 -4
- package/dist/services/renderOrchestrator.d.ts +1 -1
- package/package.json +7 -7
|
@@ -55,13 +55,26 @@ export declare function detectThreeDTransformUsage(html: string): boolean;
|
|
|
55
55
|
*/
|
|
56
56
|
export declare function detectAncestorBackgroundImage(html: string): boolean;
|
|
57
57
|
export declare function detectShaderTransitionUsage(html: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Distinct remote addresses one compile downloads, per kind: scripts, and non-Google stylesheets (counted before
|
|
60
|
+
* their contents are read, so a stylesheet with no font rules counts too).
|
|
61
|
+
*/
|
|
62
|
+
export declare const MAX_REMOTE_FETCHES = 32;
|
|
63
|
+
/**
|
|
64
|
+
* The script and stylesheet inliners' downloads share this much time, from the first one; what is still pending then
|
|
65
|
+
* counts as failed. Fonts and other assets keep their own per-request limits.
|
|
66
|
+
*/
|
|
67
|
+
export declare const REMOTE_FETCH_DEADLINE_MS = 60000;
|
|
68
|
+
/** A signal, or a getter that starts one when the first download asks for it. */
|
|
69
|
+
type FetchSignal = AbortSignal | (() => AbortSignal);
|
|
58
70
|
/**
|
|
59
71
|
* Download external CDN scripts and inline them into the HTML so rendering
|
|
60
72
|
* works without network access (Docker, CI, restricted environments). Each URL
|
|
61
73
|
* is fetched once, a few at a time, and every inlined copy is charged to the
|
|
62
74
|
* render's budget as it arrives, so going over stops the downloads still queued.
|
|
75
|
+
* Once `signal` aborts, pending downloads fail and their tags are left as they are.
|
|
63
76
|
*/
|
|
64
|
-
export declare function inlineExternalScripts(html: string, budget?: CompositionExpansionBudget): Promise<string>;
|
|
77
|
+
export declare function inlineExternalScripts(html: string, budget?: CompositionExpansionBudget, signal?: FetchSignal): Promise<string>;
|
|
65
78
|
/**
|
|
66
79
|
* Scan compiled HTML for asset references that resolve outside projectDir.
|
|
67
80
|
* For each, map the normalized in-HTML path to the real filesystem path so
|
|
@@ -184,7 +197,7 @@ export interface CompileForRenderOptions {
|
|
|
184
197
|
* prevent host-specific font capture from leaking into the planDir.
|
|
185
198
|
*/
|
|
186
199
|
allowSystemFontCapture?: boolean;
|
|
187
|
-
/** Caller cancellation propagated through compile-time font fetches. */
|
|
200
|
+
/** Caller cancellation propagated through compile-time font, stylesheet and script fetches. */
|
|
188
201
|
abortSignal?: AbortSignal;
|
|
189
202
|
/** Persistent cache directory for the animated GIF and HEIC prep transcodes; defaults to downloadDir. */
|
|
190
203
|
animatedGifCacheDir?: string;
|
|
@@ -259,3 +272,4 @@ export declare function resolveCompositionDurations(page: Page, unresolved: Unre
|
|
|
259
272
|
* Injects durations into the HTML and re-parses sub-composition media with proper bounds.
|
|
260
273
|
*/
|
|
261
274
|
export declare function recompileWithResolutions(compiled: CompiledComposition, resolutions: ResolvedDuration[], projectDir: string, downloadDir: string, assetRoot?: string, outsideFiles?: OutsideFilePolicy): Promise<CompiledComposition>;
|
|
275
|
+
export {};
|
|
@@ -38,6 +38,7 @@ export interface AudioProbeInfo {
|
|
|
38
38
|
audioCodec?: string;
|
|
39
39
|
}
|
|
40
40
|
export interface PadTrimAudioInput {
|
|
41
|
+
audioContainer?: "mov";
|
|
41
42
|
/** Path to the assembled video. Used to derive `frameCount / fps`. */
|
|
42
43
|
videoPath: string;
|
|
43
44
|
/** Path to the pre-mixed audio (typically `<planDir>/audio.m4a`). */
|
|
@@ -138,6 +139,6 @@ export declare function constrainAacTruePeak(input: {
|
|
|
138
139
|
}>;
|
|
139
140
|
/** Writes `sourcePath` through `filter` to `outputPath` as float PCM. */
|
|
140
141
|
type SourceRewriter = (sourcePath: string, outputPath: string, filter: string) => Promise<StepResult>;
|
|
141
|
-
export declare function defaultProbeVideoFrameInfo(videoPath: string, signal?: AbortSignal): Promise<ProbeVideoFrameInfo>;
|
|
142
|
+
export declare function defaultProbeVideoFrameInfo(videoPath: string, signal?: AbortSignal, container?: "mov" | "matroska"): Promise<ProbeVideoFrameInfo>;
|
|
142
143
|
export declare function runFfprobeJson<T>(args: string[], signal?: AbortSignal): Promise<T>;
|
|
143
144
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type SegmentSlice } from "./segmentPlan.js";
|
|
2
1
|
export interface SegmentManifestEntry {
|
|
3
2
|
index: number;
|
|
4
3
|
startFrame: number;
|
|
@@ -50,7 +49,7 @@ export interface SegmentPlanHashInput {
|
|
|
50
49
|
}
|
|
51
50
|
/** Everything that determines segment bytes. Key order is fixed by construction. */
|
|
52
51
|
export declare function computeSegmentPlanHash(input: SegmentPlanHashInput): string;
|
|
53
|
-
export declare function segmentDirFor(
|
|
52
|
+
export declare function segmentDirFor(projectDir: string, planHash: string): string;
|
|
54
53
|
export declare function readSegmentManifest(segmentDir: string): SegmentManifest | null;
|
|
55
54
|
/**
|
|
56
55
|
* The key that signs segment manifests, derived from this user's preview token, which lives in the
|
|
@@ -75,8 +74,8 @@ export declare function probeSegmentFrameCount(path: string, probe: (path: strin
|
|
|
75
74
|
export interface SegmentResumeCheck {
|
|
76
75
|
expectedHash: string;
|
|
77
76
|
segmentDir: string;
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
totalFrames: number;
|
|
78
|
+
segmentFrames: number;
|
|
80
79
|
key: Buffer | null;
|
|
81
80
|
probeFrames: (path: string) => Promise<number | null>;
|
|
82
81
|
}
|
|
@@ -30,7 +30,7 @@ export interface RenderConfig {
|
|
|
30
30
|
quality: "draft" | "standard" | "high";
|
|
31
31
|
/** Segmented capture: reuse segments recorded in a matching manifest (Phase 2b). */
|
|
32
32
|
resumeSegments?: boolean;
|
|
33
|
-
/** Segmented capture: keep
|
|
33
|
+
/** Segmented capture: keep the local segment cache after a successful render. */
|
|
34
34
|
keepSegments?: boolean;
|
|
35
35
|
/**
|
|
36
36
|
* Output container format. Defaults to `"mp4"`; set explicitly for other formats.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/producer",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.71",
|
|
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/
|
|
40
|
-
"@hyperframes/
|
|
41
|
-
"@hyperframes/
|
|
42
|
-
"@hyperframes/studio-server": "0.9.
|
|
38
|
+
"@hyperframes/engine": "0.9.71",
|
|
39
|
+
"@hyperframes/core": "0.9.71",
|
|
40
|
+
"@hyperframes/parsers": "0.9.71",
|
|
41
|
+
"@hyperframes/lint": "0.9.71",
|
|
42
|
+
"@hyperframes/studio-server": "0.9.71"
|
|
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.71"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|