@remotion/serverless 4.0.389 → 4.0.391

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.
@@ -17,13 +17,13 @@ const stream_renderer_1 = require("../stream-renderer");
17
17
  const validate_composition_1 = require("../validate-composition");
18
18
  const send_telemetry_event_1 = require("./send-telemetry-event");
19
19
  const innerLaunchHandler = async ({ params, options, overallProgress, registerCleanupTask, providerSpecifics, insideFunctionSpecifics, onBrowser, }) => {
20
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
20
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
21
21
  if (params.type !== serverless_client_2.ServerlessRoutines.launch) {
22
22
  throw new Error('Expected launch type');
23
23
  }
24
24
  const startedDate = Date.now();
25
- const chromiumParams = { ...params.chromiumOptions };
26
- if (params.chromiumOptions.gl === 'angle') {
25
+ const chromiumParams = { ...((_a = params.chromiumOptions) !== null && _a !== void 0 ? _a : {}) };
26
+ if (((_b = params.chromiumOptions) === null || _b === void 0 ? void 0 : _b.gl) === 'angle') {
27
27
  renderer_1.RenderInternals.Log.warn({ indent: false, logLevel: params.logLevel }, 'gl=angle is not supported in Lambda. Changing to gl=swangle instead.');
28
28
  chromiumParams.gl = 'swangle';
29
29
  }
@@ -68,9 +68,9 @@ const innerLaunchHandler = async ({ params, options, overallProgress, registerCl
68
68
  composition: params.composition,
69
69
  browserInstance: instance,
70
70
  serializedInputPropsWithCustomSchema,
71
- envVariables: (_a = params.envVariables) !== null && _a !== void 0 ? _a : {},
71
+ envVariables: (_c = params.envVariables) !== null && _c !== void 0 ? _c : {},
72
72
  timeoutInMilliseconds: validateCompositionTimeout,
73
- chromiumOptions: params.chromiumOptions,
73
+ chromiumOptions: (_d = params.chromiumOptions) !== null && _d !== void 0 ? _d : {},
74
74
  port: null,
75
75
  forceHeight: params.forceHeight,
76
76
  forceWidth: params.forceWidth,
@@ -94,7 +94,7 @@ const innerLaunchHandler = async ({ params, options, overallProgress, registerCl
94
94
  renderer_1.RenderInternals.validateConcurrency({
95
95
  value: params.concurrencyPerFunction,
96
96
  setting: 'concurrencyPerLambda',
97
- checkIfValidForCurrentMachine: ((_b = params.rendererFunctionName) !== null && _b !== void 0 ? _b : null) === null,
97
+ checkIfValidForCurrentMachine: ((_e = params.rendererFunctionName) !== null && _e !== void 0 ? _e : null) === null,
98
98
  });
99
99
  const realFrameRange = renderer_1.RenderInternals.getRealFrameRange(comp.durationInFrames, params.frameRange);
100
100
  const frameCount = renderer_1.RenderInternals.getFramesToRender(realFrameRange, params.everyNthFrame);
@@ -160,7 +160,7 @@ const innerLaunchHandler = async ({ params, options, overallProgress, registerCl
160
160
  // Throttling a bit, allowing more progress if there is lower concurrency.
161
161
  const progressEveryNthFrame = Math.ceil(chunks.length / 15);
162
162
  const lambdaPayloads = chunks.map((chunkPayload) => {
163
- var _a;
163
+ var _a, _b;
164
164
  const payload = {
165
165
  type: serverless_client_2.ServerlessRoutines.renderer,
166
166
  frameRange: chunkPayload,
@@ -187,7 +187,7 @@ const innerLaunchHandler = async ({ params, options, overallProgress, registerCl
187
187
  logLevel: (_a = params.logLevel) !== null && _a !== void 0 ? _a : 'info',
188
188
  attempt: 1,
189
189
  timeoutInMilliseconds: params.timeoutInMilliseconds,
190
- chromiumOptions: params.chromiumOptions,
190
+ chromiumOptions: (_b = params.chromiumOptions) !== null && _b !== void 0 ? _b : {},
191
191
  scale: params.scale,
192
192
  everyNthFrame: params.everyNthFrame,
193
193
  concurrencyPerLambda: params.concurrencyPerFunction,
@@ -215,7 +215,7 @@ const innerLaunchHandler = async ({ params, options, overallProgress, registerCl
215
215
  return payload;
216
216
  });
217
217
  renderer_1.RenderInternals.Log.info(logOptions, 'Render plan: ', chunks.map((c, i) => `Chunk ${i} (Frames ${c[0]} - ${c[1]})`).join(', '));
218
- const rendererFunctionName = (_c = params.rendererFunctionName) !== null && _c !== void 0 ? _c : insideFunctionSpecifics.getCurrentFunctionName();
218
+ const rendererFunctionName = (_f = params.rendererFunctionName) !== null && _f !== void 0 ? _f : insideFunctionSpecifics.getCurrentFunctionName();
219
219
  const renderMetadata = {
220
220
  startedDate,
221
221
  totalChunks: chunks.length,
@@ -237,7 +237,7 @@ const innerLaunchHandler = async ({ params, options, overallProgress, registerCl
237
237
  memorySizeInMb: insideFunctionSpecifics.getCurrentMemorySizeInMb(),
238
238
  region: insideFunctionSpecifics.getCurrentRegionInFunction(),
239
239
  renderId: params.renderId,
240
- outName: (0, remove_outname_credentials_1.removeOutnameCredentials)((_d = params.outName) !== null && _d !== void 0 ? _d : undefined),
240
+ outName: (0, remove_outname_credentials_1.removeOutnameCredentials)((_g = params.outName) !== null && _g !== void 0 ? _g : undefined),
241
241
  privacy: params.privacy,
242
242
  everyNthFrame: params.everyNthFrame,
243
243
  frameRange: realFrameRange,
@@ -250,10 +250,10 @@ const innerLaunchHandler = async ({ params, options, overallProgress, registerCl
250
250
  metadata: params.metadata,
251
251
  functionName: insideFunctionSpecifics.getCurrentFunctionName(),
252
252
  dimensions: {
253
- width: comp.width * ((_e = params.scale) !== null && _e !== void 0 ? _e : 1),
254
- height: comp.height * ((_f = params.scale) !== null && _f !== void 0 ? _f : 1),
253
+ width: comp.width * ((_h = params.scale) !== null && _h !== void 0 ? _h : 1),
254
+ height: comp.height * ((_j = params.scale) !== null && _j !== void 0 ? _j : 1),
255
255
  },
256
- rendererFunctionName: (_g = params.rendererFunctionName) !== null && _g !== void 0 ? _g : insideFunctionSpecifics.getCurrentFunctionName(),
256
+ rendererFunctionName: (_k = params.rendererFunctionName) !== null && _k !== void 0 ? _k : insideFunctionSpecifics.getCurrentFunctionName(),
257
257
  scale: params.scale,
258
258
  };
259
259
  const { key, renderBucketName, customCredentials } = (0, serverless_client_2.getExpectedOutName)({
@@ -262,7 +262,7 @@ const innerLaunchHandler = async ({ params, options, overallProgress, registerCl
262
262
  customCredentials: typeof params.outName === 'string' ||
263
263
  typeof params.outName === 'undefined'
264
264
  ? null
265
- : ((_j = (_h = params.outName) === null || _h === void 0 ? void 0 : _h.s3OutputProvider) !== null && _j !== void 0 ? _j : null),
265
+ : ((_m = (_l = params.outName) === null || _l === void 0 ? void 0 : _l.s3OutputProvider) !== null && _m !== void 0 ? _m : null),
266
266
  bucketNamePrefix: providerSpecifics.getBucketPrefix(),
267
267
  });
268
268
  if (!params.overwrite) {
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.389",
6
+ "version": "4.0.391",
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.389",
27
- "@remotion/bundler": "4.0.389",
28
- "@remotion/licensing": "4.0.389",
29
- "@remotion/serverless-client": "4.0.389"
26
+ "@remotion/renderer": "4.0.391",
27
+ "@remotion/bundler": "4.0.391",
28
+ "@remotion/licensing": "4.0.391",
29
+ "@remotion/serverless-client": "4.0.391"
30
30
  },
31
31
  "devDependencies": {
32
- "@remotion/eslint-config-internal": "4.0.389",
32
+ "@remotion/eslint-config-internal": "4.0.391",
33
33
  "eslint": "9.19.0"
34
34
  },
35
35
  "exports": {