@remotion/serverless 4.0.371 → 4.0.373

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.
@@ -51,13 +51,20 @@ const innerLaunchHandler = async ({ params, options, overallProgress, registerCl
51
51
  const { instance } = await browserInstance;
52
52
  renderer_1.RenderInternals.Log.info(logOptions, 'Validating composition, input props:', serializedInputPropsWithCustomSchema);
53
53
  const startTime = Date.now();
54
+ let validateCompositionTimeout = params.timeoutInMilliseconds;
55
+ const remainingTime = options.getRemainingTimeInMillis();
56
+ if (remainingTime / 2 < params.timeoutInMilliseconds) {
57
+ // delayRender() subtracts 2 seconds, must be positive
58
+ validateCompositionTimeout = Math.max(3000, Math.round(remainingTime / 2));
59
+ renderer_1.RenderInternals.Log.info(logOptions, `Lowering "timeoutInMilliseconds" to ${validateCompositionTimeout}ms (half the remaining function lifetime) so that any stuck processes will surface their errors`, validateCompositionTimeout);
60
+ }
54
61
  const comp = await (0, validate_composition_1.validateComposition)({
55
62
  serveUrl: params.serveUrl,
56
63
  composition: params.composition,
57
64
  browserInstance: instance,
58
65
  serializedInputPropsWithCustomSchema,
59
66
  envVariables: (_a = params.envVariables) !== null && _a !== void 0 ? _a : {},
60
- timeoutInMilliseconds: params.timeoutInMilliseconds,
67
+ timeoutInMilliseconds: validateCompositionTimeout,
61
68
  chromiumOptions: params.chromiumOptions,
62
69
  port: null,
63
70
  forceHeight: params.forceHeight,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/serverless"
4
4
  },
5
5
  "name": "@remotion/serverless",
6
- "version": "4.0.371",
6
+ "version": "4.0.373",
7
7
  "description": "A runtime for distributed rendering",
8
8
  "main": "dist",
9
9
  "sideEffects": false,
@@ -23,13 +23,13 @@
23
23
  "access": "public"
24
24
  },
25
25
  "dependencies": {
26
- "@remotion/renderer": "4.0.371",
27
- "@remotion/bundler": "4.0.371",
28
- "@remotion/licensing": "4.0.371",
29
- "@remotion/serverless-client": "4.0.371"
26
+ "@remotion/renderer": "4.0.373",
27
+ "@remotion/bundler": "4.0.373",
28
+ "@remotion/licensing": "4.0.373",
29
+ "@remotion/serverless-client": "4.0.373"
30
30
  },
31
31
  "devDependencies": {
32
- "@remotion/eslint-config-internal": "4.0.371",
32
+ "@remotion/eslint-config-internal": "4.0.373",
33
33
  "eslint": "9.19.0"
34
34
  },
35
35
  "exports": {