hyperframes 0.7.9 → 0.7.10

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/cli.js CHANGED
@@ -50,7 +50,7 @@ var VERSION;
50
50
  var init_version = __esm({
51
51
  "src/version.ts"() {
52
52
  "use strict";
53
- VERSION = true ? "0.7.9" : "0.0.0-dev";
53
+ VERSION = true ? "0.7.10" : "0.0.0-dev";
54
54
  }
55
55
  });
56
56
 
@@ -101986,7 +101986,18 @@ function validateNoSystemFonts(compiledHtml) {
101986
101986
  );
101987
101987
  }
101988
101988
  }
101989
- var PlanValidationError, SYSTEM_FONT_USED;
101989
+ function validateDistributedDuration(input2) {
101990
+ const { duration, totalFrames, fps } = input2;
101991
+ const maxFrames = Math.ceil(MAX_DISTRIBUTED_DURATION_SECONDS * fps);
101992
+ if (Number.isFinite(duration) && duration > 0 && Number.isFinite(fps) && fps > 0 && Number.isSafeInteger(totalFrames) && totalFrames > 0 && totalFrames <= maxFrames) {
101993
+ return;
101994
+ }
101995
+ throw new PlanValidationError(
101996
+ DISTRIBUTED_DURATION_OUT_OF_RANGE,
101997
+ `[planValidation] Distributed render duration is out of range: duration=${String(duration)}s totalFrames=${String(totalFrames)} fps=${String(fps)} (maxDuration=${String(MAX_DISTRIBUTED_DURATION_SECONDS)}s, maxFrames=${String(maxFrames)}). This usually means an unbounded timeline escaped into render planning, such as GSAP repeat:-1 / yoyo loops without an explicit finite root duration. Add a finite data-duration or replace infinite repeats with a finite repeat count before rendering.`
101998
+ );
101999
+ }
102000
+ var PlanValidationError, SYSTEM_FONT_USED, DISTRIBUTED_DURATION_OUT_OF_RANGE, MAX_DISTRIBUTED_DURATION_SECONDS;
101990
102001
  var init_planValidation = __esm({
101991
102002
  "../producer/src/services/render/planValidation.ts"() {
101992
102003
  "use strict";
@@ -102003,6 +102014,8 @@ var init_planValidation = __esm({
102003
102014
  }
102004
102015
  };
102005
102016
  SYSTEM_FONT_USED = "SYSTEM_FONT_USED";
102017
+ DISTRIBUTED_DURATION_OUT_OF_RANGE = "DISTRIBUTED_DURATION_OUT_OF_RANGE";
102018
+ MAX_DISTRIBUTED_DURATION_SECONDS = 24 * 60 * 60;
102006
102019
  }
102007
102020
  });
102008
102021
 
@@ -102388,6 +102401,11 @@ async function plan(projectDir, config, planDir) {
102388
102401
  job.duration = probeResult.duration;
102389
102402
  job.totalFrames = probeResult.totalFrames;
102390
102403
  const totalFrames = probeResult.totalFrames;
102404
+ validateDistributedDuration({
102405
+ duration: probeResult.duration,
102406
+ totalFrames,
102407
+ fps: fpsToNumber(job.config.fps)
102408
+ });
102391
102409
  if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log2);
102392
102410
  if (probeResult.probeSession) {
102393
102411
  try {
@@ -102530,6 +102548,7 @@ var PLAN_PROJECT_DIR_SKIP_SEGMENTS, DEFAULT_MAX_PARALLEL_CHUNKS, MIN_CHUNK_SIZE,
102530
102548
  var init_plan = __esm({
102531
102549
  "../producer/src/services/distributed/plan.ts"() {
102532
102550
  "use strict";
102551
+ init_src();
102533
102552
  init_src2();
102534
102553
  init_logger();
102535
102554
  init_fileServer2();
@@ -102605,7 +102624,7 @@ function rebuildExtractedFramesFromPlanDir(planDir, videos) {
102605
102624
  for (let i2 = 0; i2 < frames.length; i2++) {
102606
102625
  const frameName = frames[i2];
102607
102626
  if (!frameName) continue;
102608
- framePaths.set(i2 + 1, join61(outputDir, frameName));
102627
+ framePaths.set(i2, join61(outputDir, frameName));
102609
102628
  }
102610
102629
  result.push({
102611
102630
  videoId: v2.videoId,
@@ -103545,6 +103564,7 @@ var init_distributed = __esm({
103545
103564
  init_assemble();
103546
103565
  init_renderConfigValidation();
103547
103566
  init_projectHash();
103567
+ init_planValidation();
103548
103568
  }
103549
103569
  });
103550
103570