@hyperframes/producer 0.9.28-alpha.1 → 0.9.28-alpha.3

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.
@@ -66,7 +66,9 @@ function createConsoleLogger(level = "info") {
66
66
  }
67
67
  };
68
68
  }
69
- var defaultLogger = createConsoleLogger("info");
69
+ var defaultLogger = createConsoleLogger(
70
+ process.env.HF_DEBUG_RENDER === "1" ? "debug" : "info"
71
+ );
70
72
 
71
73
  // src/services/renderOrchestrator.ts
72
74
  import { audioFailureDiagnostics as audioFailureDiagnostics2 } from "@hyperframes/engine";
@@ -3143,7 +3145,7 @@ async function preflightCompositionAssetMediaTypes(input) {
3143
3145
 
3144
3146
  // src/services/htmlCompiler.ts
3145
3147
  function logRemoteDownloadTelemetry(event) {
3146
- defaultLogger.info("[Compiler] Remote asset download integrity", { ...event });
3148
+ defaultLogger.debug("[Compiler] Remote asset download integrity", { ...event });
3147
3149
  }
3148
3150
  var INFERRED_MEDIA_DURATION_ATTR = "data-hf-inferred-duration";
3149
3151
  function parseSubCompHtmlForValidity(html) {
@@ -3890,7 +3892,7 @@ ${safeText}
3890
3892
  //# sourceURL=${new URL(src).href}
3891
3893
  `;
3892
3894
  el.replaceWith(inlineScript);
3893
- defaultLogger.info(`[Compiler] Inlined CDN script: ${src}`);
3895
+ defaultLogger.debug(`[Compiler] Inlined CDN script: ${src}`);
3894
3896
  } else {
3895
3897
  if (download.reason instanceof ScriptIntegrityError) throw download.reason;
3896
3898
  defaultLogger.warn(
@@ -3945,7 +3947,7 @@ function collectExternalAssets(html, projectDir) {
3945
3947
  if (rewritten !== style) el.setAttribute("style", rewritten);
3946
3948
  }
3947
3949
  if (externalAssets.size > 0) {
3948
- defaultLogger.info(
3950
+ defaultLogger.debug(
3949
3951
  `[Compiler] Found ${externalAssets.size} asset(s) outside project directory, will copy to render output`
3950
3952
  );
3951
3953
  }
@@ -3992,7 +3994,7 @@ async function downloadAndRewriteUrls(urlSet, html, remoteDir, warnLabel, logLab
3992
3994
  result = result.replaceAll(`"${url}"`, `"${relPath}"`).replaceAll(`'${url}'`, `'${relPath}'`);
3993
3995
  if (extraRewrite) result = extraRewrite(result, url, relPath);
3994
3996
  }
3995
- defaultLogger.info(`[Compiler] ${logLabel} ${urlToLocal.size} to ${REMOTE_MEDIA_SUBDIR}/`);
3997
+ defaultLogger.debug(`[Compiler] ${logLabel} ${urlToLocal.size} to ${REMOTE_MEDIA_SUBDIR}/`);
3996
3998
  return { html: result, remoteMediaAssets };
3997
3999
  }
3998
4000
  async function localizeRemoteMediaSources(html, downloadDir) {
@@ -4129,7 +4131,7 @@ async function inlineExternalFontStylesheets(html) {
4129
4131
  ${fontFaceBlocks.join("\n")}
4130
4132
  </style>`;
4131
4133
  result = result.replace(fullMatch, inlineStyle);
4132
- defaultLogger.info("[Compiler] Inlined external @font-face rule(s)", {
4134
+ defaultLogger.debug("[Compiler] Inlined external @font-face rule(s)", {
4133
4135
  count: fontFaceBlocks.length,
4134
4136
  urlFingerprint: identity.urlFingerprint,
4135
4137
  host: identity.host
@@ -4248,7 +4250,7 @@ async function embedLocalFontFaces(html, projectDir) {
4248
4250
  const font = await readLocalFont(absPath);
4249
4251
  if (font.kind === "file-backed") {
4250
4252
  fileBackedAbsolutePaths.add(absPath);
4251
- defaultLogger.info(
4253
+ defaultLogger.debug(
4252
4254
  `[Compiler] Kept large local font file-backed: ${localPath} (> ${(MAX_LOCAL_FONT_DATA_URI_BYTES / 1024 / 1024).toFixed(1)} MB)`
4253
4255
  );
4254
4256
  embeddedPaths.add(localPath);
@@ -4256,7 +4258,7 @@ async function embedLocalFontFaces(html, projectDir) {
4256
4258
  }
4257
4259
  dataUri = await toDataUri(font.buffer, ext, { compressToWoff2: false });
4258
4260
  dataUriByAbsolutePath.set(absPath, dataUri);
4259
- defaultLogger.info(
4261
+ defaultLogger.debug(
4260
4262
  `[Compiler] Embedded local font file: ${localPath} (${(font.buffer.length / 1024).toFixed(0)} KB \u2192 data URI)`
4261
4263
  );
4262
4264
  }
@@ -4291,7 +4293,7 @@ function rewriteUnresolvableGsapToCdn(html, projectDir, compSrcPath) {
4291
4293
  if (/^https?:\/\//i.test(src)) return full;
4292
4294
  if (exists(compSrcPath ? rewriteAssetPath(compSrcPath, src, exists) : src)) return full;
4293
4295
  gsapDist ??= renderGsapDist();
4294
- defaultLogger.info(`[Compiler] Rewriting missing gsap script: ${src} \u2192 ${gsapDist}${file}`);
4296
+ defaultLogger.debug(`[Compiler] Rewriting missing gsap script: ${src} \u2192 ${gsapDist}${file}`);
4295
4297
  return `${prefix}${gsapDist}${file}${suffix}`;
4296
4298
  }
4297
4299
  );
@@ -4409,7 +4411,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
4409
4411
  timeoutMs: options.ffmpegProcessTimeout
4410
4412
  });
4411
4413
  if (preparedHeifImages.length > 0) {
4412
- defaultLogger.info(`[Compiler] Converted ${preparedHeifImages.length} HEIC image(s) to JPEG`);
4414
+ defaultLogger.debug(`[Compiler] Converted ${preparedHeifImages.length} HEIC image(s) to JPEG`);
4413
4415
  }
4414
4416
  const gifSourceAssets = new Map(remoteImageAssets);
4415
4417
  const {
@@ -4424,7 +4426,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
4424
4426
  timeoutMs: options.ffmpegProcessTimeout
4425
4427
  });
4426
4428
  if (preparedGifs.length > 0) {
4427
- defaultLogger.info(`[Compiler] Prepared ${preparedGifs.length} animated GIF input(s) as WebM`);
4429
+ defaultLogger.debug(`[Compiler] Prepared ${preparedGifs.length} animated GIF input(s) as WebM`);
4428
4430
  }
4429
4431
  const embeddedHtml = await embedLocalFontFaces(htmlWithPreparedGifs, projectDir);
4430
4432
  const { html, externalAssets } = collectExternalAssets(embeddedHtml, projectDir);
package/dist/index.js CHANGED
@@ -206,7 +206,9 @@ function createConsoleLogger(level = "info") {
206
206
  }
207
207
  };
208
208
  }
209
- var defaultLogger = createConsoleLogger("info");
209
+ var defaultLogger = createConsoleLogger(
210
+ process.env.HF_DEBUG_RENDER === "1" ? "debug" : "info"
211
+ );
210
212
 
211
213
  // src/services/fileServer.ts
212
214
  var readFileAsync = promisify(readFile);
@@ -7328,7 +7330,7 @@ async function preflightCompositionAssetMediaTypes(input) {
7328
7330
 
7329
7331
  // src/services/htmlCompiler.ts
7330
7332
  function logRemoteDownloadTelemetry(event) {
7331
- defaultLogger.info("[Compiler] Remote asset download integrity", { ...event });
7333
+ defaultLogger.debug("[Compiler] Remote asset download integrity", { ...event });
7332
7334
  }
7333
7335
  var INFERRED_MEDIA_DURATION_ATTR = "data-hf-inferred-duration";
7334
7336
  function parseSubCompHtmlForValidity(html) {
@@ -8075,7 +8077,7 @@ ${safeText}
8075
8077
  //# sourceURL=${new URL(src).href}
8076
8078
  `;
8077
8079
  el.replaceWith(inlineScript);
8078
- defaultLogger.info(`[Compiler] Inlined CDN script: ${src}`);
8080
+ defaultLogger.debug(`[Compiler] Inlined CDN script: ${src}`);
8079
8081
  } else {
8080
8082
  if (download.reason instanceof ScriptIntegrityError) throw download.reason;
8081
8083
  defaultLogger.warn(
@@ -8130,7 +8132,7 @@ function collectExternalAssets(html, projectDir) {
8130
8132
  if (rewritten !== style) el.setAttribute("style", rewritten);
8131
8133
  }
8132
8134
  if (externalAssets.size > 0) {
8133
- defaultLogger.info(
8135
+ defaultLogger.debug(
8134
8136
  `[Compiler] Found ${externalAssets.size} asset(s) outside project directory, will copy to render output`
8135
8137
  );
8136
8138
  }
@@ -8177,7 +8179,7 @@ async function downloadAndRewriteUrls(urlSet, html, remoteDir, warnLabel, logLab
8177
8179
  result = result.replaceAll(`"${url}"`, `"${relPath}"`).replaceAll(`'${url}'`, `'${relPath}'`);
8178
8180
  if (extraRewrite) result = extraRewrite(result, url, relPath);
8179
8181
  }
8180
- defaultLogger.info(`[Compiler] ${logLabel} ${urlToLocal.size} to ${REMOTE_MEDIA_SUBDIR}/`);
8182
+ defaultLogger.debug(`[Compiler] ${logLabel} ${urlToLocal.size} to ${REMOTE_MEDIA_SUBDIR}/`);
8181
8183
  return { html: result, remoteMediaAssets };
8182
8184
  }
8183
8185
  async function localizeRemoteMediaSources(html, downloadDir) {
@@ -8314,7 +8316,7 @@ async function inlineExternalFontStylesheets(html) {
8314
8316
  ${fontFaceBlocks.join("\n")}
8315
8317
  </style>`;
8316
8318
  result = result.replace(fullMatch, inlineStyle);
8317
- defaultLogger.info("[Compiler] Inlined external @font-face rule(s)", {
8319
+ defaultLogger.debug("[Compiler] Inlined external @font-face rule(s)", {
8318
8320
  count: fontFaceBlocks.length,
8319
8321
  urlFingerprint: identity.urlFingerprint,
8320
8322
  host: identity.host
@@ -8436,7 +8438,7 @@ async function embedLocalFontFaces(html, projectDir) {
8436
8438
  const font = await readLocalFont(absPath);
8437
8439
  if (font.kind === "file-backed") {
8438
8440
  fileBackedAbsolutePaths.add(absPath);
8439
- defaultLogger.info(
8441
+ defaultLogger.debug(
8440
8442
  `[Compiler] Kept large local font file-backed: ${localPath} (> ${(MAX_LOCAL_FONT_DATA_URI_BYTES / 1024 / 1024).toFixed(1)} MB)`
8441
8443
  );
8442
8444
  embeddedPaths.add(localPath);
@@ -8444,7 +8446,7 @@ async function embedLocalFontFaces(html, projectDir) {
8444
8446
  }
8445
8447
  dataUri = await toDataUri(font.buffer, ext, { compressToWoff2: false });
8446
8448
  dataUriByAbsolutePath.set(absPath, dataUri);
8447
- defaultLogger.info(
8449
+ defaultLogger.debug(
8448
8450
  `[Compiler] Embedded local font file: ${localPath} (${(font.buffer.length / 1024).toFixed(0)} KB \u2192 data URI)`
8449
8451
  );
8450
8452
  }
@@ -8479,7 +8481,7 @@ function rewriteUnresolvableGsapToCdn(html, projectDir, compSrcPath) {
8479
8481
  if (/^https?:\/\//i.test(src)) return full;
8480
8482
  if (exists(compSrcPath ? rewriteAssetPath(compSrcPath, src, exists) : src)) return full;
8481
8483
  gsapDist ??= renderGsapDist();
8482
- defaultLogger.info(`[Compiler] Rewriting missing gsap script: ${src} \u2192 ${gsapDist}${file}`);
8484
+ defaultLogger.debug(`[Compiler] Rewriting missing gsap script: ${src} \u2192 ${gsapDist}${file}`);
8483
8485
  return `${prefix}${gsapDist}${file}${suffix}`;
8484
8486
  }
8485
8487
  );
@@ -8597,7 +8599,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
8597
8599
  timeoutMs: options.ffmpegProcessTimeout
8598
8600
  });
8599
8601
  if (preparedHeifImages.length > 0) {
8600
- defaultLogger.info(`[Compiler] Converted ${preparedHeifImages.length} HEIC image(s) to JPEG`);
8602
+ defaultLogger.debug(`[Compiler] Converted ${preparedHeifImages.length} HEIC image(s) to JPEG`);
8601
8603
  }
8602
8604
  const gifSourceAssets = new Map(remoteImageAssets);
8603
8605
  const {
@@ -8612,7 +8614,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
8612
8614
  timeoutMs: options.ffmpegProcessTimeout
8613
8615
  });
8614
8616
  if (preparedGifs.length > 0) {
8615
- defaultLogger.info(`[Compiler] Prepared ${preparedGifs.length} animated GIF input(s) as WebM`);
8617
+ defaultLogger.debug(`[Compiler] Prepared ${preparedGifs.length} animated GIF input(s) as WebM`);
8616
8618
  }
8617
8619
  const embeddedHtml = await embedLocalFontFaces(htmlWithPreparedGifs, projectDir);
8618
8620
  const { html, externalAssets } = collectExternalAssets(embeddedHtml, projectDir);
@@ -223,7 +223,9 @@ function createConsoleLogger(level = "info") {
223
223
  }
224
224
  };
225
225
  }
226
- var defaultLogger = createConsoleLogger("info");
226
+ var defaultLogger = createConsoleLogger(
227
+ process.env.HF_DEBUG_RENDER === "1" ? "debug" : "info"
228
+ );
227
229
 
228
230
  // src/services/fileServer.ts
229
231
  var readFileAsync = promisify(readFile);
@@ -7341,7 +7343,7 @@ async function preflightCompositionAssetMediaTypes(input) {
7341
7343
 
7342
7344
  // src/services/htmlCompiler.ts
7343
7345
  function logRemoteDownloadTelemetry(event) {
7344
- defaultLogger.info("[Compiler] Remote asset download integrity", { ...event });
7346
+ defaultLogger.debug("[Compiler] Remote asset download integrity", { ...event });
7345
7347
  }
7346
7348
  var INFERRED_MEDIA_DURATION_ATTR = "data-hf-inferred-duration";
7347
7349
  function parseSubCompHtmlForValidity(html) {
@@ -8088,7 +8090,7 @@ ${safeText}
8088
8090
  //# sourceURL=${new URL(src).href}
8089
8091
  `;
8090
8092
  el.replaceWith(inlineScript);
8091
- defaultLogger.info(`[Compiler] Inlined CDN script: ${src}`);
8093
+ defaultLogger.debug(`[Compiler] Inlined CDN script: ${src}`);
8092
8094
  } else {
8093
8095
  if (download.reason instanceof ScriptIntegrityError) throw download.reason;
8094
8096
  defaultLogger.warn(
@@ -8143,7 +8145,7 @@ function collectExternalAssets(html, projectDir) {
8143
8145
  if (rewritten !== style) el.setAttribute("style", rewritten);
8144
8146
  }
8145
8147
  if (externalAssets.size > 0) {
8146
- defaultLogger.info(
8148
+ defaultLogger.debug(
8147
8149
  `[Compiler] Found ${externalAssets.size} asset(s) outside project directory, will copy to render output`
8148
8150
  );
8149
8151
  }
@@ -8190,7 +8192,7 @@ async function downloadAndRewriteUrls(urlSet, html, remoteDir, warnLabel, logLab
8190
8192
  result = result.replaceAll(`"${url}"`, `"${relPath}"`).replaceAll(`'${url}'`, `'${relPath}'`);
8191
8193
  if (extraRewrite) result = extraRewrite(result, url, relPath);
8192
8194
  }
8193
- defaultLogger.info(`[Compiler] ${logLabel} ${urlToLocal.size} to ${REMOTE_MEDIA_SUBDIR}/`);
8195
+ defaultLogger.debug(`[Compiler] ${logLabel} ${urlToLocal.size} to ${REMOTE_MEDIA_SUBDIR}/`);
8194
8196
  return { html: result, remoteMediaAssets };
8195
8197
  }
8196
8198
  async function localizeRemoteMediaSources(html, downloadDir) {
@@ -8327,7 +8329,7 @@ async function inlineExternalFontStylesheets(html) {
8327
8329
  ${fontFaceBlocks.join("\n")}
8328
8330
  </style>`;
8329
8331
  result = result.replace(fullMatch, inlineStyle);
8330
- defaultLogger.info("[Compiler] Inlined external @font-face rule(s)", {
8332
+ defaultLogger.debug("[Compiler] Inlined external @font-face rule(s)", {
8331
8333
  count: fontFaceBlocks.length,
8332
8334
  urlFingerprint: identity.urlFingerprint,
8333
8335
  host: identity.host
@@ -8446,7 +8448,7 @@ async function embedLocalFontFaces(html, projectDir) {
8446
8448
  const font = await readLocalFont(absPath);
8447
8449
  if (font.kind === "file-backed") {
8448
8450
  fileBackedAbsolutePaths.add(absPath);
8449
- defaultLogger.info(
8451
+ defaultLogger.debug(
8450
8452
  `[Compiler] Kept large local font file-backed: ${localPath} (> ${(MAX_LOCAL_FONT_DATA_URI_BYTES / 1024 / 1024).toFixed(1)} MB)`
8451
8453
  );
8452
8454
  embeddedPaths.add(localPath);
@@ -8454,7 +8456,7 @@ async function embedLocalFontFaces(html, projectDir) {
8454
8456
  }
8455
8457
  dataUri = await toDataUri(font.buffer, ext, { compressToWoff2: false });
8456
8458
  dataUriByAbsolutePath.set(absPath, dataUri);
8457
- defaultLogger.info(
8459
+ defaultLogger.debug(
8458
8460
  `[Compiler] Embedded local font file: ${localPath} (${(font.buffer.length / 1024).toFixed(0)} KB \u2192 data URI)`
8459
8461
  );
8460
8462
  }
@@ -8489,7 +8491,7 @@ function rewriteUnresolvableGsapToCdn(html, projectDir, compSrcPath) {
8489
8491
  if (/^https?:\/\//i.test(src)) return full;
8490
8492
  if (exists(compSrcPath ? rewriteAssetPath(compSrcPath, src, exists) : src)) return full;
8491
8493
  gsapDist ??= renderGsapDist();
8492
- defaultLogger.info(`[Compiler] Rewriting missing gsap script: ${src} \u2192 ${gsapDist}${file}`);
8494
+ defaultLogger.debug(`[Compiler] Rewriting missing gsap script: ${src} \u2192 ${gsapDist}${file}`);
8493
8495
  return `${prefix}${gsapDist}${file}${suffix}`;
8494
8496
  }
8495
8497
  );
@@ -8607,7 +8609,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
8607
8609
  timeoutMs: options.ffmpegProcessTimeout
8608
8610
  });
8609
8611
  if (preparedHeifImages.length > 0) {
8610
- defaultLogger.info(`[Compiler] Converted ${preparedHeifImages.length} HEIC image(s) to JPEG`);
8612
+ defaultLogger.debug(`[Compiler] Converted ${preparedHeifImages.length} HEIC image(s) to JPEG`);
8611
8613
  }
8612
8614
  const gifSourceAssets = new Map(remoteImageAssets);
8613
8615
  const {
@@ -8622,7 +8624,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
8622
8624
  timeoutMs: options.ffmpegProcessTimeout
8623
8625
  });
8624
8626
  if (preparedGifs.length > 0) {
8625
- defaultLogger.info(`[Compiler] Prepared ${preparedGifs.length} animated GIF input(s) as WebM`);
8627
+ defaultLogger.debug(`[Compiler] Prepared ${preparedGifs.length} animated GIF input(s) as WebM`);
8626
8628
  }
8627
8629
  const embeddedHtml = await embedLocalFontFaces(htmlWithPreparedGifs, projectDir);
8628
8630
  const { html, externalAssets } = collectExternalAssets(embeddedHtml, projectDir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/producer",
3
- "version": "0.9.28-alpha.1",
3
+ "version": "0.9.28-alpha.3",
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/lint": "0.9.28-alpha.1",
39
- "@hyperframes/engine": "0.9.28-alpha.1",
40
- "@hyperframes/parsers": "0.9.28-alpha.1",
41
- "@hyperframes/core": "0.9.28-alpha.1",
42
- "@hyperframes/studio-server": "0.9.28-alpha.1"
38
+ "@hyperframes/engine": "0.9.28-alpha.3",
39
+ "@hyperframes/studio-server": "0.9.28-alpha.3",
40
+ "@hyperframes/core": "0.9.28-alpha.3",
41
+ "@hyperframes/lint": "0.9.28-alpha.3",
42
+ "@hyperframes/parsers": "0.9.28-alpha.3"
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.9.28-alpha.1"
51
+ "@hyperframes/aws-lambda": "0.9.28-alpha.3"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=22"