@hyperframes/producer 0.8.216 → 0.8.218

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/index.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  * or any web content via configurable page contracts and hooks.
7
7
  */
8
8
  export { createRenderJob, executeRenderJob, resolveRenderDebugDir, RenderCancelledError, RenderQualityError, applyRenderWarningPolicy, type RenderConfig, type RenderConfigInput, type RenderJob, type RenderStatus, type RenderOutcome, type RenderStrictness, type RenderWarning, type RenderPerfSummary, type ProgressCallback, } from "./services/renderOrchestrator.js";
9
+ export { extractSafeRenderErrorCode } from "./services/safeRenderErrorCode.js";
9
10
  export { RENDER_JOB_DIR, createOwnedRenderDir, listAbandonedRenderDirs, } from "./services/render/renderDirOwner.js";
10
11
  export { RENDER_REQUEST_VERSION, createRenderRequest, distributedConfigFromRequest, parseRenderRequest, renderConfigFromRequest, renderRequestFromDistributedConfig, serializeRenderRequest, type CreateRenderRequestInput, type DistributedRenderOptions, type RenderRequest, type RenderRequestOptions, } from "./renderRequest.js";
11
12
  export { type BrowserDiagnosticSummary, type RenderCaptureObservability, type RenderObservabilitySummary, type RenderObservationData, type RenderObservationEvent, type RenderObservationStatus, } from "./services/render/observability.js";
package/dist/index.js CHANGED
@@ -13583,6 +13583,14 @@ async function executeRenderPipeline(input) {
13583
13583
  // sample frame indices from this so they land inside the drained range.
13584
13584
  compositionDurationSeconds: job.duration,
13585
13585
  deFrameFallback: true,
13586
+ // A line per scanned chunk, so a long effect scan reads as preparing, not as a stall.
13587
+ onEffectScanProgress: (scanned, total) => updateJobStatus(
13588
+ job,
13589
+ "rendering",
13590
+ `Checking effects, ${scanned} of ${total} frames`,
13591
+ 25,
13592
+ onProgress
13593
+ ),
13586
13594
  requiresWebGpu: compositionRequiresWebGpu2(compiled.html),
13587
13595
  // Live route for Chrome memory (spec §5 Phase −1). The aggregate route
13588
13596
  // through CapturePerfSummary only exists on success; a mid-capture
@@ -15027,6 +15035,25 @@ async function executeRenderPipeline(input) {
15027
15035
  }
15028
15036
  }
15029
15037
 
15038
+ // src/services/safeRenderErrorCode.ts
15039
+ var SAFE_RENDER_ERROR_CODES = /* @__PURE__ */ new Set([
15040
+ "ASSET_MEDIA_TYPE_MISMATCH",
15041
+ "HEIF_IMAGE_CONVERSION_FAILED",
15042
+ "HEIF_TOOL_UNAVAILABLE",
15043
+ "NOT_MEDIA_PAYLOAD",
15044
+ "INVALID_VIDEO_METADATA",
15045
+ "VIDEO_SOURCE_UNRENDERABLE",
15046
+ "VIDEO_EXTRACTION_FAILED",
15047
+ "ENCODER_INTERRUPTED",
15048
+ "RENDER_TOO_SLOW",
15049
+ "RENDER_STAGE_STALLED"
15050
+ ]);
15051
+ function extractSafeRenderErrorCode(error) {
15052
+ if (typeof error !== "object" || error === null || !("code" in error)) return void 0;
15053
+ const code = error.code;
15054
+ return typeof code === "string" && SAFE_RENDER_ERROR_CODES.has(code) ? code : void 0;
15055
+ }
15056
+
15030
15057
  // src/renderRequest.ts
15031
15058
  import {
15032
15059
  PRORES_PROFILE_NAMES as PRORES_PROFILE_NAMES2,
@@ -18427,23 +18454,6 @@ import {
18427
18454
  import { parseEncoderOptions } from "@hyperframes/studio-server/encoder-options";
18428
18455
  var DEFAULT_SERVER_FPS = { num: 30, den: 1 };
18429
18456
  var SSE_KEEPALIVE_MS = 3e4;
18430
- var SAFE_RENDER_ERROR_CODES = /* @__PURE__ */ new Set([
18431
- "ASSET_MEDIA_TYPE_MISMATCH",
18432
- "HEIF_IMAGE_CONVERSION_FAILED",
18433
- "HEIF_TOOL_UNAVAILABLE",
18434
- "NOT_MEDIA_PAYLOAD",
18435
- "INVALID_VIDEO_METADATA",
18436
- "VIDEO_SOURCE_UNRENDERABLE",
18437
- "VIDEO_EXTRACTION_FAILED",
18438
- "ENCODER_INTERRUPTED",
18439
- "RENDER_TOO_SLOW",
18440
- "RENDER_STAGE_STALLED"
18441
- ]);
18442
- function extractSafeRenderErrorCode(error) {
18443
- if (typeof error !== "object" || error === null || !("code" in error)) return void 0;
18444
- const code = error.code;
18445
- return typeof code === "string" && SAFE_RENDER_ERROR_CODES.has(code) ? code : void 0;
18446
- }
18447
18457
  function extractSafeRenderErrorMetadata(error) {
18448
18458
  const errorCode = extractSafeRenderErrorCode(error);
18449
18459
  if (!errorCode || typeof error !== "object" || error === null) return void 0;
@@ -21116,6 +21126,7 @@ export {
21116
21126
  defaultLogger,
21117
21127
  distributedConfigFromRequest,
21118
21128
  executeRenderJob,
21129
+ extractSafeRenderErrorCode,
21119
21130
  getCapturePerfSummary4 as getCapturePerfSummary,
21120
21131
  getCompositionDuration2 as getCompositionDuration,
21121
21132
  getDistributedRenderCapabilities,
@@ -13563,6 +13563,14 @@ async function executeRenderPipeline(input) {
13563
13563
  // sample frame indices from this so they land inside the drained range.
13564
13564
  compositionDurationSeconds: job.duration,
13565
13565
  deFrameFallback: true,
13566
+ // A line per scanned chunk, so a long effect scan reads as preparing, not as a stall.
13567
+ onEffectScanProgress: (scanned, total) => updateJobStatus(
13568
+ job,
13569
+ "rendering",
13570
+ `Checking effects, ${scanned} of ${total} frames`,
13571
+ 25,
13572
+ onProgress
13573
+ ),
13566
13574
  requiresWebGpu: compositionRequiresWebGpu2(compiled.html),
13567
13575
  // Live route for Chrome memory (spec §5 Phase −1). The aggregate route
13568
13576
  // through CapturePerfSummary only exists on success; a mid-capture
@@ -15585,9 +15593,7 @@ function renderConfigFromRequest(request, runtime = {}) {
15585
15593
  };
15586
15594
  }
15587
15595
 
15588
- // src/server.ts
15589
- var DEFAULT_SERVER_FPS = { num: 30, den: 1 };
15590
- var SSE_KEEPALIVE_MS = 3e4;
15596
+ // src/services/safeRenderErrorCode.ts
15591
15597
  var SAFE_RENDER_ERROR_CODES = /* @__PURE__ */ new Set([
15592
15598
  "ASSET_MEDIA_TYPE_MISMATCH",
15593
15599
  "HEIF_IMAGE_CONVERSION_FAILED",
@@ -15605,6 +15611,10 @@ function extractSafeRenderErrorCode(error) {
15605
15611
  const code = error.code;
15606
15612
  return typeof code === "string" && SAFE_RENDER_ERROR_CODES.has(code) ? code : void 0;
15607
15613
  }
15614
+
15615
+ // src/server.ts
15616
+ var DEFAULT_SERVER_FPS = { num: 30, den: 1 };
15617
+ var SSE_KEEPALIVE_MS = 3e4;
15608
15618
  function extractSafeRenderErrorMetadata(error) {
15609
15619
  const errorCode = extractSafeRenderErrorCode(error);
15610
15620
  if (!errorCode || typeof error !== "object" || error === null) return void 0;
package/dist/server.d.ts CHANGED
@@ -16,6 +16,8 @@ import { Hono, type Context } from "hono";
16
16
  import { type RenderConfig } from "./services/renderOrchestrator.js";
17
17
  import { type ProducerLogger } from "./logger.js";
18
18
  import { type CanvasResolution } from "@hyperframes/core";
19
+ import { extractSafeRenderErrorCode } from "./services/safeRenderErrorCode.js";
20
+ export { extractSafeRenderErrorCode };
19
21
  export interface HandlerOptions {
20
22
  /** Custom logger. Defaults to console-based defaultLogger. */
21
23
  logger?: ProducerLogger;
@@ -80,11 +82,6 @@ interface PreparedRenderInput {
80
82
  input: RenderInput;
81
83
  cleanupProjectDir?: string;
82
84
  }
83
- /**
84
- * Preserve only bounded producer error codes across JSON/SSE. Never derive a
85
- * code from the message: it may contain local paths or signed source URLs.
86
- */
87
- export declare function extractSafeRenderErrorCode(error: unknown): string | undefined;
88
85
  export interface SafeRenderErrorMetadata {
89
86
  errorCode: string;
90
87
  errorOwner?: "system" | "user";
@@ -126,4 +123,3 @@ export declare function createProducerApp(options?: HandlerOptions): Hono;
126
123
  * Start the producer HTTP server with graceful shutdown.
127
124
  */
128
125
  export declare function startServer(options?: ServerOptions): import("@hono/node-server").ServerType;
129
- export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Preserve only bounded producer error codes across JSON/SSE. Never derive a
3
+ * code from the message: it may contain local paths or signed source URLs.
4
+ */
5
+ export declare function extractSafeRenderErrorCode(error: unknown): string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/producer",
3
- "version": "0.8.216",
3
+ "version": "0.8.218",
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.11.0",
37
37
  "puppeteer-core": "^25.11.0",
38
- "@hyperframes/core": "0.8.216",
39
- "@hyperframes/engine": "0.8.216",
40
- "@hyperframes/lint": "0.8.216",
41
- "@hyperframes/studio-server": "0.8.216",
42
- "@hyperframes/parsers": "0.8.216"
38
+ "@hyperframes/core": "0.8.218",
39
+ "@hyperframes/engine": "0.8.218",
40
+ "@hyperframes/lint": "0.8.218",
41
+ "@hyperframes/parsers": "0.8.218",
42
+ "@hyperframes/studio-server": "0.8.218"
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.11",
51
- "@hyperframes/aws-lambda": "0.8.216"
51
+ "@hyperframes/aws-lambda": "0.8.218"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=22"