@remotion/lambda 4.0.0-alpha6 → 4.0.0-alpha7

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.
@@ -37,6 +37,7 @@ const bundleLambda = async () => {
37
37
  });
38
38
  const compositorFile = `${outdir}/compositor`;
39
39
  node_fs_1.default.copyFileSync(compositor_linux_arm64_gnu_1.binaryPath, compositorFile);
40
+ node_fs_1.default.cpSync(compositor_linux_arm64_gnu_1.ffmpegCwd, `${outdir}/ffmpeg`, { recursive: true });
40
41
  await zl.archiveFolder(outdir, function_zip_path_1.FUNCTION_ZIP_ARM64);
41
42
  node_fs_1.default.rmSync(outdir, { recursive: true });
42
43
  };
@@ -10,11 +10,11 @@ export declare const makeLambdaPayload: ({ rendererFunctionName, frameRange, fra
10
10
  crf: number | undefined;
11
11
  envVariables: Record<string, string> | undefined;
12
12
  pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le" | undefined;
13
- proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
13
+ proResProfile: "standard" | "4444-xq" | "4444" | "hq" | "light" | "proxy" | undefined;
14
14
  jpegQuality: number | undefined;
15
15
  maxRetries: number;
16
16
  privacy: import("../defaults").Privacy;
17
- logLevel: "verbose" | "info" | "warn" | "error";
17
+ logLevel: "error" | "verbose" | "info" | "warn";
18
18
  frameRange: import("@remotion/renderer").FrameRange | null;
19
19
  outName: import("../defaults").OutNameInput | null;
20
20
  timeoutInMilliseconds: number;
@@ -39,8 +39,11 @@ CloudWatch Retention Period = ${cloudWatchLogRetentionPeriodInDays} days
39
39
  const output = cli_1.CliInternals.createOverwriteableCliOutput({
40
40
  quiet: cli_1.CliInternals.quietFlagProvided(),
41
41
  cancelSignal: null,
42
+ // No browser logs
43
+ updatesDontOverwrite: false,
44
+ indent: false,
42
45
  });
43
- output.update('Deploying Lambda...');
46
+ output.update('Deploying Lambda...', false);
44
47
  const { functionName, alreadyExisted } = await (0, deploy_function_1.deployFunction)({
45
48
  createCloudWatchLogGroup,
46
49
  region,
@@ -54,10 +57,10 @@ CloudWatch Retention Period = ${cloudWatchLogRetentionPeriodInDays} days
54
57
  cli_1.CliInternals.Log.info(functionName);
55
58
  }
56
59
  if (alreadyExisted) {
57
- output.update(`Already exists as ${functionName}\n`);
60
+ output.update(`Already exists as ${functionName}`, true);
58
61
  }
59
62
  else {
60
- output.update(`Deployed as ${functionName}\n`);
63
+ output.update(`Deployed as ${functionName}\n`, true);
61
64
  }
62
65
  };
63
66
  exports.functionsDeploySubcommand = functionsDeploySubcommand;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.functionsLsCommand = exports.FUNCTIONS_LS_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
+ const renderer_1 = require("@remotion/renderer");
5
6
  const get_functions_1 = require("../../../api/get-functions");
6
7
  const get_aws_region_1 = require("../../get-aws-region");
7
8
  const NAME_COLS = 70;
@@ -15,8 +16,12 @@ const functionsLsCommand = async () => {
15
16
  const fetchingOutput = cli_1.CliInternals.createOverwriteableCliOutput({
16
17
  quiet: cli_1.CliInternals.quietFlagProvided(),
17
18
  cancelSignal: null,
19
+ updatesDontOverwrite: cli_1.CliInternals.shouldUseNonOverlayingLogger({
20
+ logLevel: renderer_1.RenderInternals.getLogLevel(),
21
+ }),
22
+ indent: false,
18
23
  });
19
- fetchingOutput.update('Getting functions...');
24
+ fetchingOutput.update('Getting functions...', false);
20
25
  const functions = await (0, get_functions_1.getFunctions)({
21
26
  region,
22
27
  compatibleOnly: false,
@@ -29,9 +34,9 @@ const functionsLsCommand = async () => {
29
34
  cli_1.CliInternals.Log.info(functions.map((f) => f.functionName).join(' '));
30
35
  return;
31
36
  }
32
- fetchingOutput.update('Getting function info...');
37
+ fetchingOutput.update('Getting function info...', false);
33
38
  const pluralized = functions.length === 1 ? 'function' : 'functions';
34
- fetchingOutput.update(`${functions.length} ${pluralized} in the ${region} region`);
39
+ fetchingOutput.update(`${functions.length} ${pluralized} in the ${region} region`, true);
35
40
  cli_1.CliInternals.Log.info();
36
41
  cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray([
37
42
  'Name'.padEnd(NAME_COLS, ' '),
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.functionsRmCommand = exports.FUNCTIONS_RM_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
+ const renderer_1 = require("@remotion/renderer");
5
6
  const delete_function_1 = require("../../../api/delete-function");
6
7
  const get_function_info_1 = require("../../../api/get-function-info");
7
8
  const constants_1 = require("../../../shared/constants");
@@ -29,8 +30,11 @@ const functionsRmCommand = async (args) => {
29
30
  const infoOutput = cli_1.CliInternals.createOverwriteableCliOutput({
30
31
  quiet: cli_1.CliInternals.quietFlagProvided(),
31
32
  cancelSignal: null,
33
+ // No browser logs
34
+ updatesDontOverwrite: false,
35
+ indent: false,
32
36
  });
33
- infoOutput.update('Getting function info...');
37
+ infoOutput.update('Getting function info...', false);
34
38
  const info = await (0, get_function_info_1.getFunctionInfo)({
35
39
  region,
36
40
  functionName,
@@ -40,16 +44,19 @@ const functionsRmCommand = async (args) => {
40
44
  'Memory: '.padEnd(LEFT_COL, ' ') + ' ' + info.memorySizeInMb + 'MB',
41
45
  'Timeout: '.padEnd(LEFT_COL, ' ') + ' ' + info.timeoutInSeconds + 'sec',
42
46
  'Version: '.padEnd(LEFT_COL, ' ') + ' ' + info.version,
43
- ].join('\n'));
44
- log_1.Log.info();
47
+ ].join('\n'), true);
45
48
  await (0, confirm_1.confirmCli)({ delMessage: 'Delete? (Y/n)', allowForceFlag: true });
46
49
  const output = cli_1.CliInternals.createOverwriteableCliOutput({
47
50
  quiet: cli_1.CliInternals.quietFlagProvided(),
48
51
  cancelSignal: null,
52
+ updatesDontOverwrite: cli_1.CliInternals.shouldUseNonOverlayingLogger({
53
+ logLevel: renderer_1.RenderInternals.getLogLevel(),
54
+ }),
55
+ indent: false,
49
56
  });
50
- output.update('Deleting...');
57
+ output.update('Deleting...', false);
51
58
  await (0, delete_function_1.deleteFunction)({ region, functionName });
52
- output.update('Deleted!\n');
59
+ output.update('Deleted!', true);
53
60
  }
54
61
  };
55
62
  exports.functionsRmCommand = functionsRmCommand;
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.functionsRmallCommand = exports.FUNCTIONS_RMALL_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
+ const renderer_1 = require("@remotion/renderer");
5
6
  const delete_function_1 = require("../../../api/delete-function");
6
7
  const get_function_info_1 = require("../../../api/get-function-info");
7
8
  const get_functions_1 = require("../../../api/get-functions");
8
9
  const get_aws_region_1 = require("../../get-aws-region");
9
10
  const confirm_1 = require("../../helpers/confirm");
10
- const log_1 = require("../../log");
11
11
  exports.FUNCTIONS_RMALL_SUBCOMMAND = 'rmall';
12
12
  const LEFT_COL = 16;
13
13
  const functionsRmallCommand = async () => {
@@ -20,8 +20,11 @@ const functionsRmallCommand = async () => {
20
20
  const infoOutput = cli_1.CliInternals.createOverwriteableCliOutput({
21
21
  quiet: cli_1.CliInternals.quietFlagProvided(),
22
22
  cancelSignal: null,
23
+ // No browser logs
24
+ updatesDontOverwrite: false,
25
+ indent: false,
23
26
  });
24
- infoOutput.update('Getting function info...');
27
+ infoOutput.update('Getting function info...', false);
25
28
  const info = await (0, get_function_info_1.getFunctionInfo)({
26
29
  region,
27
30
  functionName: fun.functionName,
@@ -31,16 +34,19 @@ const functionsRmallCommand = async () => {
31
34
  'Memory: '.padEnd(LEFT_COL, ' ') + ' ' + info.memorySizeInMb + 'MB',
32
35
  'Timeout: '.padEnd(LEFT_COL, ' ') + ' ' + info.timeoutInSeconds + 'sec',
33
36
  'Version: '.padEnd(LEFT_COL, ' ') + ' ' + info.version,
34
- ].join('\n'));
35
- log_1.Log.info();
37
+ ].join('\n'), true);
36
38
  await (0, confirm_1.confirmCli)({ delMessage: 'Delete? (Y/n)', allowForceFlag: true });
37
39
  const output = cli_1.CliInternals.createOverwriteableCliOutput({
38
40
  quiet: cli_1.CliInternals.quietFlagProvided(),
39
41
  cancelSignal: null,
42
+ updatesDontOverwrite: cli_1.CliInternals.shouldUseNonOverlayingLogger({
43
+ logLevel: renderer_1.RenderInternals.getLogLevel(),
44
+ }),
45
+ indent: false,
40
46
  });
41
- output.update('Deleting...');
47
+ output.update('Deleting...', false);
42
48
  await (0, delete_function_1.deleteFunction)({ region, functionName: fun.functionName });
43
- output.update('Deleted!\n');
49
+ output.update('Deleted!', true);
44
50
  }
45
51
  };
46
52
  exports.functionsRmallCommand = functionsRmallCommand;
@@ -109,6 +109,9 @@ const renderCommand = async (args, remotionRoot) => {
109
109
  const progressBar = cli_1.CliInternals.createOverwriteableCliOutput({
110
110
  quiet: cli_1.CliInternals.quietFlagProvided(),
111
111
  cancelSignal: null,
112
+ // No browser logs in Lambda
113
+ updatesDontOverwrite: false,
114
+ indent: false,
112
115
  });
113
116
  log_1.Log.info(cli_1.CliInternals.chalk.gray(`bucket = ${res.bucketName}, function = ${functionName}`));
114
117
  log_1.Log.info(cli_1.CliInternals.chalk.gray(`renderId = ${res.renderId}, codec = ${codec} (${reason})`));
@@ -130,7 +133,7 @@ const renderCommand = async (args, remotionRoot) => {
130
133
  verbose,
131
134
  totalFrames: getTotalFrames(status),
132
135
  timeToEncode: status.timeToEncode,
133
- }));
136
+ }), false);
134
137
  // eslint-disable-next-line no-constant-condition
135
138
  while (true) {
136
139
  await (0, sleep_1.sleep)(1000);
@@ -149,7 +152,7 @@ const renderCommand = async (args, remotionRoot) => {
149
152
  verbose,
150
153
  timeToEncode: newStatus.timeToEncode,
151
154
  totalFrames: getTotalFrames(newStatus),
152
- }));
155
+ }), false);
153
156
  if (newStatus.done) {
154
157
  progressBar.update((0, progress_1.makeProgressString)({
155
158
  progress: newProgress,
@@ -159,7 +162,7 @@ const renderCommand = async (args, remotionRoot) => {
159
162
  verbose,
160
163
  timeToEncode: newStatus.timeToEncode,
161
164
  totalFrames: getTotalFrames(newStatus),
162
- }));
165
+ }), false);
163
166
  if (downloadName) {
164
167
  const downloadStart = Date.now();
165
168
  const { outputPath, sizeInBytes } = await (0, download_media_1.downloadMedia)({
@@ -180,7 +183,7 @@ const renderCommand = async (args, remotionRoot) => {
180
183
  verbose,
181
184
  timeToEncode: newStatus.timeToEncode,
182
185
  totalFrames: getTotalFrames(newStatus),
183
- }));
186
+ }), false);
184
187
  },
185
188
  });
186
189
  progressBar.update((0, progress_1.makeProgressString)({
@@ -195,7 +198,7 @@ const renderCommand = async (args, remotionRoot) => {
195
198
  verbose,
196
199
  timeToEncode: newStatus.timeToEncode,
197
200
  totalFrames: getTotalFrames(newStatus),
198
- }));
201
+ }), false);
199
202
  log_1.Log.info();
200
203
  log_1.Log.info();
201
204
  log_1.Log.info('Done!', outputPath, cli_1.CliInternals.formatBytes(sizeInBytes));
@@ -245,7 +248,7 @@ const renderCommand = async (args, remotionRoot) => {
245
248
  stack: err.stack,
246
249
  stackFrame: frames,
247
250
  });
248
- await cli_1.CliInternals.handleCommonError(errorWithStackFrame);
251
+ await cli_1.CliInternals.handleCommonError(errorWithStackFrame, logLevel);
249
252
  }
250
253
  (0, quit_1.quit)(1);
251
254
  }
@@ -33,6 +33,9 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
33
33
  const progressBar = cli_1.CliInternals.createOverwriteableCliOutput({
34
34
  quiet: cli_1.CliInternals.quietFlagProvided(),
35
35
  cancelSignal: null,
36
+ // No browser logs
37
+ updatesDontOverwrite: false,
38
+ indent: false,
36
39
  });
37
40
  const multiProgress = {
38
41
  bundleProgress: {
@@ -54,7 +57,7 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
54
57
  (0, progress_bar_1.makeBundleProgress)(multiProgress.bundleProgress),
55
58
  (0, progress_bar_1.makeBucketProgress)(multiProgress.bucketProgress),
56
59
  (0, progress_bar_1.makeDeployProgressBar)(multiProgress.deployProgress),
57
- ].join('\n'));
60
+ ].join('\n'), false);
58
61
  };
59
62
  const bucketStart = Date.now();
60
63
  const cliBucketName = (_b = args_1.parsedLambdaCli['force-bucket-name']) !== null && _b !== void 0 ? _b : null;
@@ -104,7 +104,7 @@ const stillCommand = async (args, remotionRoot) => {
104
104
  stack: err.stack,
105
105
  stackFrame: frames,
106
106
  });
107
- await cli_1.CliInternals.handleCommonError(errorWithStackFrame);
107
+ await cli_1.CliInternals.handleCommonError(errorWithStackFrame, renderer_1.RenderInternals.getLogLevel());
108
108
  (0, quit_1.quit)(1);
109
109
  }
110
110
  };
package/dist/cli/log.d.ts CHANGED
@@ -2,17 +2,19 @@ export declare const Log: {
2
2
  verbose: (message?: any, ...optionalParams: any[]) => void;
3
3
  verboseAdvanced: (options: {
4
4
  indent: boolean;
5
- logLevel: "verbose" | "info" | "warn" | "error";
5
+ logLevel: "error" | "verbose" | "info" | "warn";
6
+ } & {
7
+ tag?: string | undefined;
6
8
  }, message?: any, ...optionalParams: any[]) => void;
7
9
  info: (message?: any, ...optionalParams: any[]) => void;
8
10
  infoAdvanced: (options: {
9
11
  indent: boolean;
10
- logLevel: "verbose" | "info" | "warn" | "error";
12
+ logLevel: "error" | "verbose" | "info" | "warn";
11
13
  }, message?: any, ...optionalParams: any[]) => void;
12
14
  warn: (message?: any, ...optionalParams: any[]) => void;
13
15
  warnAdvanced: (options: {
14
16
  indent: boolean;
15
- logLevel: "verbose" | "info" | "warn" | "error";
17
+ logLevel: "error" | "verbose" | "info" | "warn";
16
18
  }, message?: any, ...optionalParams: any[]) => void;
17
19
  error: (message?: any, ...optionalParams: any[]) => void;
18
20
  };
@@ -3,8 +3,5 @@ export declare const planFrameRanges: ({ framesPerLambda, frameRange, everyNthFr
3
3
  frameRange: [number, number];
4
4
  everyNthFrame: number;
5
5
  }) => {
6
- chunks: [
7
- number,
8
- number
9
- ][];
6
+ chunks: [number, number][];
10
7
  };
@@ -42,6 +42,7 @@ const getBrowserInstance = async (shouldDumpIo, chromiumOptions) => {
42
42
  browserExecutable: execPath,
43
43
  shouldDumpIo,
44
44
  chromiumOptions: actualChromiumOptions,
45
+ indent: false,
45
46
  });
46
47
  _browserInstance.on('disconnected', () => {
47
48
  console.log('Browser disconnected / crashed');
@@ -4,15 +4,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.executablePath = void 0;
5
5
  if (/^AWS_Lambda_nodejs(?:18)[.]x$/.test((_a = process.env.AWS_EXECUTION_ENV) !== null && _a !== void 0 ? _a : '') ===
6
6
  true) {
7
- if (process.env.FONTCONFIG_PATH === undefined) {
8
- process.env.FONTCONFIG_PATH = '/opt';
9
- process.env.FONTCONFIG_FILE = '/opt/fonts.conf';
10
- }
11
- process.env.LD_LIBRARY_PATH = '/opt/lib:/opt/bin';
12
- process.env.FFMPEG_BIN_PATH = '/opt/ffmpeg/remotion/bin/ffmpeg';
13
- process.env.FFPROBE_BIN_PATH = '/opt/ffmpeg/remotion/bin/ffprobe';
14
- process.env.FFMPEG_CWD = '/opt/ffmpeg';
7
+ process.env.FONTCONFIG_PATH = '/opt';
8
+ process.env.FONTCONFIG_FILE = '/opt/fonts.conf';
9
+ process.env.READ_ONLY_FS = '1';
15
10
  process.env.COMPOSITOR_PATH = './compositor';
11
+ process.env.NO_COLOR = '1';
16
12
  }
17
13
  const executablePath = () => {
18
14
  return '/opt/bin/chromium';
@@ -1 +1 @@
1
- export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-south-1" | "ap-east-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "me-south-1" | "sa-east-1";
1
+ export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-south-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "sa-east-1" | "eu-south-1" | "af-south-1" | "ap-east-1" | "me-south-1";
@@ -2,17 +2,17 @@ import type { LambdaPayload } from '../shared/constants';
2
2
  export declare const handler: (params: LambdaPayload, context: {
3
3
  invokedFunctionArn: string;
4
4
  getRemainingTimeInMillis: () => number;
5
- }) => Promise<void> | Promise<Promise<{
5
+ }) => Promise<void> | Promise<{
6
+ compositions: import("remotion").AnyCompMetadata[];
7
+ }> | Promise<{
8
+ version: string;
9
+ }> | Promise<{
10
+ bucketName: string;
11
+ renderId: string;
12
+ }> | Promise<import("../shared/constants").RenderProgress> | Promise<Promise<{
6
13
  output: string;
7
14
  size: number;
8
15
  bucketName: string;
9
16
  estimatedPrice: import("../shared/constants").CostsInfo;
10
17
  renderId: string;
11
- }>> | Promise<{
12
- bucketName: string;
13
- renderId: string;
14
- }> | Promise<import("../shared/constants").RenderProgress> | Promise<{
15
- version: string;
16
- }> | Promise<{
17
- compositions: import("remotion").AnyCompMetadata[];
18
- }>;
18
+ }>>;
@@ -187,7 +187,6 @@ const innerLaunchHandler = async (params, options) => {
187
187
  everyNthFrame: params.everyNthFrame,
188
188
  });
189
189
  const sortedChunks = chunks.slice().sort((a, b) => a[0] - b[0]);
190
- const invokers = Math.round(Math.sqrt(chunks.length));
191
190
  const reqSend = (0, timer_1.timer)('sending off requests');
192
191
  const lambdaPayloads = chunks.map((chunkPayload) => {
193
192
  var _a;
@@ -238,9 +237,8 @@ const innerLaunchHandler = async (params, options) => {
238
237
  estimatedTotalLambdaInvokations: [
239
238
  // Direct invokations
240
239
  chunks.length,
241
- // Parent invokers
242
- invokers,
243
240
  // This function
241
+ 1,
244
242
  ].reduce((a, b) => a + b, 0),
245
243
  estimatedRenderLambdaInvokations: chunks.length,
246
244
  compositionId: comp.id,
@@ -11,11 +11,11 @@ export declare const LambdaInternals: {
11
11
  crf: number | undefined;
12
12
  envVariables: Record<string, string> | undefined;
13
13
  pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le" | undefined;
14
- proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
14
+ proResProfile: "standard" | "4444-xq" | "4444" | "hq" | "light" | "proxy" | undefined;
15
15
  jpegQuality: number | undefined;
16
16
  maxRetries: number;
17
17
  privacy: import("./defaults").Privacy;
18
- logLevel: "verbose" | "info" | "warn" | "error";
18
+ logLevel: "error" | "verbose" | "info" | "warn";
19
19
  frameRange: import("@remotion/renderer").FrameRange | null;
20
20
  outName: import("./defaults").OutNameInput | null;
21
21
  timeoutInMilliseconds: number;
@@ -8,10 +8,6 @@ exports.hostedLayers = {
8
8
  layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-fonts-arm64',
9
9
  version: 8,
10
10
  },
11
- {
12
- layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
13
- version: 10,
14
- },
15
11
  {
16
12
  layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-chromium-arm64',
17
13
  version: 12,
@@ -22,10 +18,6 @@ exports.hostedLayers = {
22
18
  layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
23
19
  version: 8,
24
20
  },
25
- {
26
- layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
27
- version: 10,
28
- },
29
21
  {
30
22
  layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
31
23
  version: 12,
@@ -36,10 +28,6 @@ exports.hostedLayers = {
36
28
  layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-fonts-arm64',
37
29
  version: 8,
38
30
  },
39
- {
40
- layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
41
- version: 10,
42
- },
43
31
  {
44
32
  layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-chromium-arm64',
45
33
  version: 12,
@@ -50,10 +38,6 @@ exports.hostedLayers = {
50
38
  layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-fonts-arm64',
51
39
  version: 8,
52
40
  },
53
- {
54
- layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
55
- version: 10,
56
- },
57
41
  {
58
42
  layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-chromium-arm64',
59
43
  version: 12,
@@ -64,10 +48,6 @@ exports.hostedLayers = {
64
48
  layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-fonts-arm64',
65
49
  version: 17,
66
50
  },
67
- {
68
- layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
69
- version: 11,
70
- },
71
51
  {
72
52
  layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-chromium-arm64',
73
53
  version: 18,
@@ -78,10 +58,6 @@ exports.hostedLayers = {
78
58
  layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-fonts-arm64',
79
59
  version: 9,
80
60
  },
81
- {
82
- layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
83
- version: 10,
84
- },
85
61
  {
86
62
  layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-chromium-arm64',
87
63
  version: 12,
@@ -92,10 +68,6 @@ exports.hostedLayers = {
92
68
  layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-fonts-arm64',
93
69
  version: 8,
94
70
  },
95
- {
96
- layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
97
- version: 10,
98
- },
99
71
  {
100
72
  layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-chromium-arm64',
101
73
  version: 12,
@@ -106,10 +78,6 @@ exports.hostedLayers = {
106
78
  layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-fonts-arm64',
107
79
  version: 13,
108
80
  },
109
- {
110
- layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
111
- version: 19,
112
- },
113
81
  {
114
82
  layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-chromium-arm64',
115
83
  version: 21,
@@ -120,10 +88,6 @@ exports.hostedLayers = {
120
88
  layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-fonts-arm64',
121
89
  version: 8,
122
90
  },
123
- {
124
- layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
125
- version: 10,
126
- },
127
91
  {
128
92
  layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-chromium-arm64',
129
93
  version: 12,
@@ -134,10 +98,6 @@ exports.hostedLayers = {
134
98
  layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-fonts-arm64',
135
99
  version: 8,
136
100
  },
137
- {
138
- layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
139
- version: 10,
140
- },
141
101
  {
142
102
  layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-chromium-arm64',
143
103
  version: 12,
@@ -148,10 +108,6 @@ exports.hostedLayers = {
148
108
  layerArn: 'arn:aws:lambda:af-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
149
109
  version: 5,
150
110
  },
151
- {
152
- layerArn: 'arn:aws:lambda:af-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
153
- version: 3,
154
- },
155
111
  {
156
112
  layerArn: 'arn:aws:lambda:af-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
157
113
  version: 5,
@@ -162,10 +118,6 @@ exports.hostedLayers = {
162
118
  layerArn: 'arn:aws:lambda:ap-east-1:678892195805:layer:remotion-binaries-fonts-arm64',
163
119
  version: 5,
164
120
  },
165
- {
166
- layerArn: 'arn:aws:lambda:ap-east-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
167
- version: 3,
168
- },
169
121
  {
170
122
  layerArn: 'arn:aws:lambda:ap-east-1:678892195805:layer:remotion-binaries-chromium-arm64',
171
123
  version: 5,
@@ -176,10 +128,6 @@ exports.hostedLayers = {
176
128
  layerArn: 'arn:aws:lambda:ap-northeast-2:678892195805:layer:remotion-binaries-fonts-arm64',
177
129
  version: 5,
178
130
  },
179
- {
180
- layerArn: 'arn:aws:lambda:ap-northeast-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
181
- version: 3,
182
- },
183
131
  {
184
132
  layerArn: 'arn:aws:lambda:ap-northeast-2:678892195805:layer:remotion-binaries-chromium-arm64',
185
133
  version: 5,
@@ -190,10 +138,6 @@ exports.hostedLayers = {
190
138
  layerArn: 'arn:aws:lambda:ap-northeast-3:678892195805:layer:remotion-binaries-fonts-arm64',
191
139
  version: 5,
192
140
  },
193
- {
194
- layerArn: 'arn:aws:lambda:ap-northeast-3:678892195805:layer:remotion-binaries-ffmpeg-arm64',
195
- version: 3,
196
- },
197
141
  {
198
142
  layerArn: 'arn:aws:lambda:ap-northeast-3:678892195805:layer:remotion-binaries-chromium-arm64',
199
143
  version: 5,
@@ -204,10 +148,6 @@ exports.hostedLayers = {
204
148
  layerArn: 'arn:aws:lambda:ca-central-1:678892195805:layer:remotion-binaries-fonts-arm64',
205
149
  version: 5,
206
150
  },
207
- {
208
- layerArn: 'arn:aws:lambda:ca-central-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
209
- version: 3,
210
- },
211
151
  {
212
152
  layerArn: 'arn:aws:lambda:ca-central-1:678892195805:layer:remotion-binaries-chromium-arm64',
213
153
  version: 5,
@@ -218,10 +158,6 @@ exports.hostedLayers = {
218
158
  layerArn: 'arn:aws:lambda:eu-north-1:678892195805:layer:remotion-binaries-fonts-arm64',
219
159
  version: 5,
220
160
  },
221
- {
222
- layerArn: 'arn:aws:lambda:eu-north-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
223
- version: 3,
224
- },
225
161
  {
226
162
  layerArn: 'arn:aws:lambda:eu-north-1:678892195805:layer:remotion-binaries-chromium-arm64',
227
163
  version: 5,
@@ -232,10 +168,6 @@ exports.hostedLayers = {
232
168
  layerArn: 'arn:aws:lambda:eu-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
233
169
  version: 5,
234
170
  },
235
- {
236
- layerArn: 'arn:aws:lambda:eu-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
237
- version: 3,
238
- },
239
171
  {
240
172
  layerArn: 'arn:aws:lambda:eu-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
241
173
  version: 5,
@@ -246,10 +178,6 @@ exports.hostedLayers = {
246
178
  layerArn: 'arn:aws:lambda:eu-west-3:678892195805:layer:remotion-binaries-fonts-arm64',
247
179
  version: 5,
248
180
  },
249
- {
250
- layerArn: 'arn:aws:lambda:eu-west-3:678892195805:layer:remotion-binaries-ffmpeg-arm64',
251
- version: 3,
252
- },
253
181
  {
254
182
  layerArn: 'arn:aws:lambda:eu-west-3:678892195805:layer:remotion-binaries-chromium-arm64',
255
183
  version: 5,
@@ -260,10 +188,6 @@ exports.hostedLayers = {
260
188
  layerArn: 'arn:aws:lambda:me-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
261
189
  version: 5,
262
190
  },
263
- {
264
- layerArn: 'arn:aws:lambda:me-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
265
- version: 3,
266
- },
267
191
  {
268
192
  layerArn: 'arn:aws:lambda:me-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
269
193
  version: 5,
@@ -274,10 +198,6 @@ exports.hostedLayers = {
274
198
  layerArn: 'arn:aws:lambda:sa-east-1:678892195805:layer:remotion-binaries-fonts-arm64',
275
199
  version: 5,
276
200
  },
277
- {
278
- layerArn: 'arn:aws:lambda:sa-east-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
279
- version: 3,
280
- },
281
201
  {
282
202
  layerArn: 'arn:aws:lambda:sa-east-1:678892195805:layer:remotion-binaries-chromium-arm64',
283
203
  version: 5,
@@ -288,10 +208,6 @@ exports.hostedLayers = {
288
208
  layerArn: 'arn:aws:lambda:us-west-1:678892195805:layer:remotion-binaries-fonts-arm64',
289
209
  version: 5,
290
210
  },
291
- {
292
- layerArn: 'arn:aws:lambda:us-west-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
293
- version: 3,
294
- },
295
211
  {
296
212
  layerArn: 'arn:aws:lambda:us-west-1:678892195805:layer:remotion-binaries-chromium-arm64',
297
213
  version: 5,
@@ -1,3 +1,5 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
1
3
  import https from 'https';
2
4
  import http from 'node:http';
3
5
  import type { EnhancedErrorInfo } from '../functions/helpers/write-lambda-error';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "4.0.0-alpha6",
3
+ "version": "4.0.0-alpha7",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -23,17 +23,17 @@
23
23
  "@aws-sdk/credential-providers": "3.272.0",
24
24
  "@aws-sdk/lib-storage": "3.272.0",
25
25
  "@aws-sdk/s3-request-presigner": "3.272.0",
26
- "@remotion/bundler": "4.0.0-alpha6",
27
- "@remotion/cli": "4.0.0-alpha6",
28
- "@remotion/renderer": "4.0.0-alpha6",
26
+ "@remotion/bundler": "4.0.0-alpha7",
27
+ "@remotion/cli": "4.0.0-alpha7",
28
+ "@remotion/renderer": "4.0.0-alpha7",
29
29
  "aws-policies": "^1.0.1",
30
30
  "mime-types": "2.1.34",
31
- "remotion": "4.0.0-alpha6"
31
+ "remotion": "4.0.0-alpha7"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@jonny/eslint-config": "3.0.266",
35
- "@remotion/bundler": "4.0.0-alpha6",
36
- "@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha6",
35
+ "@remotion/bundler": "4.0.0-alpha7",
36
+ "@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha7",
37
37
  "@types/mime-types": "2.1.1",
38
38
  "@types/minimist": "1.2.2",
39
39
  "@types/node": "^18.16.0",
@@ -47,7 +47,7 @@
47
47
  "zip-lib": "^0.7.2"
48
48
  },
49
49
  "peerDependencies": {
50
- "@remotion/bundler": "4.0.0-alpha6"
50
+ "@remotion/bundler": "4.0.0-alpha7"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
Binary file
@@ -1,2 +0,0 @@
1
- import type { LambdaArchitecture } from '../../shared/validate-architecture';
2
- export declare const getCurrentArchitecture: () => LambdaArchitecture;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCurrentArchitecture = void 0;
4
- const is_in_lambda_1 = require("../../shared/is-in-lambda");
5
- const getCurrentArchitecture = () => {
6
- if (!(0, is_in_lambda_1.isInsideLambda)()) {
7
- throw new Error('Should not call getCurrentArchitecture() if not inside a lambda function');
8
- }
9
- return process.arch.includes('arm') ? 'arm64' : 'x86_64';
10
- };
11
- exports.getCurrentArchitecture = getCurrentArchitecture;
@@ -1,4 +0,0 @@
1
- declare const validArchitectures: readonly ["arm64", "x86_64"];
2
- export declare type LambdaArchitecture = typeof validArchitectures[number];
3
- export declare const validateArchitecture: (architecture: unknown) => void;
4
- export {};
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateArchitecture = void 0;
4
- const validArchitectures = ['arm64', 'x86_64'];
5
- const validateArchitecture = (architecture) => {
6
- if (typeof architecture !== 'string') {
7
- throw new TypeError('You must pass an architecture when deploying: One of ' +
8
- validArchitectures.join(', '));
9
- }
10
- if (!validArchitectures.find((a) => a === architecture)) {
11
- throw new TypeError(`You must pass an "architecture" when deploying a function: either "arm64" or "x86_64"`);
12
- }
13
- };
14
- exports.validateArchitecture = validateArchitecture;
Binary file