@hyperframes/producer 0.9.87 → 0.9.89
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/README.md +1 -1
- package/dist/compileWorker.js +75 -15
- package/dist/distributed.js +182 -82
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +69 -69
- package/dist/index.js +286 -123
- package/dist/public-server.js +238 -77
- package/dist/server.d.ts +1 -1
- package/dist/services/animatedGifPrep.d.ts +2 -0
- package/dist/services/assetMediaType.d.ts +4 -4
- package/dist/services/compileScratch.d.ts +2 -0
- package/dist/services/distributed/chunkFrames.d.ts +1 -0
- package/dist/services/heifImagePrep.d.ts +2 -0
- package/dist/services/render/deferredVideoFrames.d.ts +1 -0
- package/dist/services/render/shared.d.ts +3 -3
- package/package.json +7 -7
package/dist/server.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface HandlerOptions {
|
|
|
24
24
|
logger?: ProducerLogger;
|
|
25
25
|
/** Extract or generate a request ID. Defaults to x-request-id header or random UUID. */
|
|
26
26
|
getRequestId?: (c: Context) => string;
|
|
27
|
-
/** Directory for rendered output files. Defaults to PRODUCER_RENDERS_DIR or
|
|
27
|
+
/** Directory for rendered output files. Defaults to PRODUCER_RENDERS_DIR or a new private temp folder. */
|
|
28
28
|
rendersDir?: string;
|
|
29
29
|
/** Prefix for output URLs in responses. Default: "/outputs". */
|
|
30
30
|
outputUrlPrefix?: string;
|
|
@@ -17,6 +17,7 @@ export interface PrepareAnimatedGifInputsOptions {
|
|
|
17
17
|
cacheDir?: string;
|
|
18
18
|
sourceAssets?: Map<string, string>;
|
|
19
19
|
timeoutMs?: number;
|
|
20
|
+
signal?: AbortSignal;
|
|
20
21
|
transcode?: (input: AnimatedGifTranscodeRequest) => Promise<void>;
|
|
21
22
|
allowOutsideFiles?: boolean;
|
|
22
23
|
}
|
|
@@ -25,6 +26,7 @@ export interface AnimatedGifTranscodeRequest {
|
|
|
25
26
|
outputPath: string;
|
|
26
27
|
args: string[];
|
|
27
28
|
timeoutMs?: number;
|
|
29
|
+
signal?: AbortSignal;
|
|
28
30
|
}
|
|
29
31
|
export interface PrepareAnimatedGifInputsResult {
|
|
30
32
|
html: string;
|
|
@@ -37,10 +37,10 @@ export declare function dropMediaOutsideProject(input: {
|
|
|
37
37
|
allowOutsideProjectAssets?: boolean;
|
|
38
38
|
}): void;
|
|
39
39
|
/**
|
|
40
|
-
* Fail early when a
|
|
41
|
-
*
|
|
42
|
-
* inputs deliberately remain untouched so their existing
|
|
43
|
-
* invalid-media classification is preserved downstream.
|
|
40
|
+
* Fail early when a probed local asset cannot satisfy its HTML element, a PNG
|
|
41
|
+
* cut short under a <video> included. Other missing, corrupt, remote-at-runtime
|
|
42
|
+
* and unprobeable inputs deliberately remain untouched so their existing
|
|
43
|
+
* source/download/invalid-media classification is preserved downstream.
|
|
44
44
|
*/
|
|
45
45
|
export declare function preflightCompositionAssetMediaTypes(input: {
|
|
46
46
|
projectDir: string;
|
|
@@ -57,4 +57,5 @@ export declare function extractDeferredVideoFramesForChunk(input: {
|
|
|
57
57
|
cfg: Pick<EngineConfig, "ffmpegProcessTimeout">;
|
|
58
58
|
remoteSources?: PlanV2RemoteSources;
|
|
59
59
|
shownBoxes?: ReadonlyMap<string, ShownBox>;
|
|
60
|
+
onProgress?: () => void;
|
|
60
61
|
}): Promise<ExtractedFrames[]>;
|
|
@@ -16,6 +16,7 @@ export interface HeifTranscodeRequest {
|
|
|
16
16
|
inputPath: string;
|
|
17
17
|
outputPath: string;
|
|
18
18
|
timeoutMs?: number;
|
|
19
|
+
signal?: AbortSignal;
|
|
19
20
|
}
|
|
20
21
|
export interface PrepareHeifImageInputsOptions {
|
|
21
22
|
projectDir: string;
|
|
@@ -25,6 +26,7 @@ export interface PrepareHeifImageInputsOptions {
|
|
|
25
26
|
cacheDir?: string;
|
|
26
27
|
sourceAssets?: Map<string, string>;
|
|
27
28
|
timeoutMs?: number;
|
|
29
|
+
signal?: AbortSignal;
|
|
28
30
|
transcode?: (input: HeifTranscodeRequest) => Promise<void>;
|
|
29
31
|
allowOutsideFiles?: boolean;
|
|
30
32
|
/** Leaves an image whose conversion failed as authored and reports it, instead of throwing. */
|
|
@@ -24,6 +24,7 @@ export declare function extractDeferredFrames(input: {
|
|
|
24
24
|
shownBoxes?: ReadonlyMap<string, ShownBox>;
|
|
25
25
|
/** The error to throw when the extractor returns no frame for an index the video shows. */
|
|
26
26
|
onMissingFrame: (video: ExtractedFrames, index: number) => Error;
|
|
27
|
+
onProgress?: () => void;
|
|
27
28
|
}): Promise<ExtractedFrames[]>;
|
|
28
29
|
/**
|
|
29
30
|
* Fills every deferred video in place with the frames a full extraction writes, into the folder it
|
|
@@ -122,9 +122,9 @@ export declare function audioWaitReporter(job: RenderJob, onProgress: ProgressCa
|
|
|
122
122
|
/** Seconds of the final file written, 90% to 99%: only a complete file reaches 100. */
|
|
123
123
|
export declare function reportAssembleProgress(job: RenderJob, done: number, total: number, onProgress: ProgressCallback | undefined): void;
|
|
124
124
|
export declare function forgetWorkerPhases(job: object): void;
|
|
125
|
-
/** Counts a
|
|
126
|
-
export declare function
|
|
127
|
-
export declare function
|
|
125
|
+
/** Counts capture work between frames (still checks, a chunk's video frames); the stall watcher reads it. */
|
|
126
|
+
export declare function noteCaptureActivity(job: object): void;
|
|
127
|
+
export declare function captureActivity(job: object): number;
|
|
128
128
|
export declare function describeWorkerPhases(job: object): string | undefined;
|
|
129
129
|
/** Browser warm-up before the first frame, from the parallel workers' phase events. */
|
|
130
130
|
export declare function reportWorkerStartup(job: RenderJob, progress: ParallelProgress, onProgress: ProgressCallback | undefined): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/producer",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.89",
|
|
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/
|
|
38
|
+
"@hyperframes/core": "0.9.89",
|
|
39
|
+
"@hyperframes/lint": "0.9.89",
|
|
40
|
+
"@hyperframes/studio-server": "0.9.89",
|
|
41
|
+
"@hyperframes/engine": "0.9.89",
|
|
42
|
+
"@hyperframes/parsers": "0.9.89"
|
|
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.89"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|