@remotion/lambda 4.0.204 → 4.0.206

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.
Files changed (61) hide show
  1. package/dist/admin/make-layer-public.js +19 -5
  2. package/dist/api/create-function.d.ts +3 -1
  3. package/dist/api/create-function.js +7 -5
  4. package/dist/api/deploy-function.d.ts +3 -1
  5. package/dist/api/deploy-function.js +6 -4
  6. package/dist/api/deploy-site.d.ts +3 -3
  7. package/dist/cli/args.d.ts +2 -0
  8. package/dist/cli/args.js +1 -0
  9. package/dist/cli/commands/functions/deploy.js +3 -1
  10. package/dist/functions/helpers/get-current-region.d.ts +1 -1
  11. package/dist/internals.d.ts +6 -6
  12. package/dist/shared/get-layers.d.ts +11 -0
  13. package/dist/shared/get-layers.js +38 -0
  14. package/dist/shared/hosted-layers.d.ts +5 -4
  15. package/dist/shared/hosted-layers.js +588 -84
  16. package/package.json +11 -11
  17. package/remotionlambda-arm64.zip +0 -0
  18. package/dist/functions/compositions.d.ts +0 -10
  19. package/dist/functions/compositions.js +0 -77
  20. package/dist/functions/helpers/expected-out-name.d.ts +0 -4
  21. package/dist/functions/helpers/expected-out-name.js +0 -52
  22. package/dist/functions/helpers/get-browser-instance.d.ts +0 -10
  23. package/dist/functions/helpers/get-browser-instance.js +0 -99
  24. package/dist/functions/helpers/get-chromium-executable-path.d.ts +0 -1
  25. package/dist/functions/helpers/get-chromium-executable-path.js +0 -14
  26. package/dist/functions/helpers/get-custom-out-name.d.ts +0 -6
  27. package/dist/functions/helpers/get-custom-out-name.js +0 -32
  28. package/dist/functions/helpers/get-files-in-folder.d.ts +0 -5
  29. package/dist/functions/helpers/get-files-in-folder.js +0 -38
  30. package/dist/functions/helpers/io.d.ts +0 -20
  31. package/dist/functions/helpers/io.js +0 -13
  32. package/dist/functions/helpers/is-enosp-err.d.ts +0 -3
  33. package/dist/functions/helpers/is-enosp-err.js +0 -16
  34. package/dist/functions/helpers/print-cloudwatch-helper.d.ts +0 -3
  35. package/dist/functions/helpers/print-cloudwatch-helper.js +0 -12
  36. package/dist/functions/helpers/serialize-artifact.d.ts +0 -9
  37. package/dist/functions/helpers/serialize-artifact.js +0 -37
  38. package/dist/functions/helpers/validate-composition.d.ts +0 -24
  39. package/dist/functions/helpers/validate-composition.js +0 -31
  40. package/dist/functions/helpers/write-lambda-error.d.ts +0 -25
  41. package/dist/functions/helpers/write-lambda-error.js +0 -20
  42. package/dist/functions/info.d.ts +0 -5
  43. package/dist/functions/info.js +0 -16
  44. package/dist/functions/provider-implementation.d.ts +0 -0
  45. package/dist/functions/provider-implementation.js +0 -1
  46. package/dist/functions/streaming/stream-writer.d.ts +0 -6
  47. package/dist/functions/streaming/stream-writer.js +0 -35
  48. package/dist/functions/streaming/streaming.d.ts +0 -102
  49. package/dist/functions/streaming/streaming.js +0 -61
  50. package/dist/shared/await.d.ts +0 -1
  51. package/dist/shared/await.js +0 -2
  52. package/dist/shared/compress-props.d.ts +0 -22
  53. package/dist/shared/compress-props.js +0 -88
  54. package/dist/shared/stream-to-string.d.ts +0 -4
  55. package/dist/shared/stream-to-string.js +0 -15
  56. package/dist/shared/truthy.d.ts +0 -3
  57. package/dist/shared/truthy.js +0 -7
  58. package/dist/shared/validate-outname.d.ts +0 -8
  59. package/dist/shared/validate-outname.js +0 -37
  60. package/dist/shared/validate-webhook.d.ts +0 -3
  61. package/dist/shared/validate-webhook.js +0 -16
@@ -31,23 +31,37 @@ const layerInfo = {
31
31
  const V5_RUNTIME = true;
32
32
  const makeLayerPublic = async () => {
33
33
  const runtimes = [V5_RUNTIME ? 'nodejs20.x' : 'nodejs18.x'];
34
- const layers = ['fonts', 'chromium'];
34
+ const layers = [
35
+ 'fonts',
36
+ 'chromium',
37
+ 'emoji-apple',
38
+ 'emoji-google',
39
+ 'cjk',
40
+ ];
35
41
  for (const region of (0, get_regions_1.getRegions)()) {
36
42
  for (const layer of layers) {
37
43
  const layerName = `remotion-binaries-${layer}-arm64`;
38
44
  const { Version, LayerArn } = await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PublishLayerVersionCommand({
39
45
  Content: {
40
46
  S3Bucket: 'remotionlambda-binaries-' + region,
41
- S3Key: V5_RUNTIME
42
- ? `remotion-layer-${layer}-v11-arm64.zip`
43
- : `remotion-layer-${layer}-v10-arm64.zip`,
47
+ S3Key: layer === 'emoji-apple'
48
+ ? 'remotion-layer-emoji-v1-arm64.zip'
49
+ : V5_RUNTIME
50
+ ? `remotion-layer-${layer}-v11-arm64.zip`
51
+ : `remotion-layer-${layer}-v10-arm64.zip`,
44
52
  },
45
53
  LayerName: layerName,
46
54
  LicenseInfo: layer === 'chromium'
47
55
  ? V5_RUNTIME
48
56
  ? 'Chromium 123.0.6312.86, compiled from source. Read Chromium License: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/LICENSE'
49
57
  : 'Chromium 114, compiled from source. Read Chromium License: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/LICENSE'
50
- : 'Contains Noto Sans font. Read Noto Sans License: https://fonts.google.com/noto/specimen/Noto+Sans/about',
58
+ : layer === 'emoji-apple'
59
+ ? 'Apple Emojis (https://github.com/samuelngs/apple-emoji-linux). For educational purposes only - Apple is a trademark of Apple Inc., registered in the U.S. and other countries.'
60
+ : layer === 'emoji-google'
61
+ ? 'Google Emojis (https://github.com/googlefonts/noto-emoji)'
62
+ : layer === 'cjk'
63
+ ? 'Noto Sans (Chinese, Japanese, Korean)'
64
+ : 'Contains Noto Sans font. Read Noto Sans License: https://fonts.google.com/noto/specimen/Noto+Sans/about',
51
65
  CompatibleRuntimes: runtimes,
52
66
  Description: version_1.VERSION,
53
67
  }));
@@ -1,6 +1,7 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
2
  import type { AwsRegion } from '../regions';
3
- export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, ephemerealStorageInMb, customRoleArn, enableLambdaInsights, enableV5Runtime, logLevel, vpcSubnetIds, vpcSecurityGroupIds, }: {
3
+ import type { RuntimePreference } from '../shared/get-layers';
4
+ export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, ephemerealStorageInMb, customRoleArn, enableLambdaInsights, enableV5Runtime, logLevel, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, }: {
4
5
  createCloudWatchLogGroup: boolean;
5
6
  region: AwsRegion;
6
7
  zipFile: string;
@@ -17,6 +18,7 @@ export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFil
17
18
  logLevel: LogLevel;
18
19
  vpcSubnetIds: string;
19
20
  vpcSecurityGroupIds: string;
21
+ runtimePreference: RuntimePreference;
20
22
  }) => Promise<{
21
23
  FunctionName: string;
22
24
  }>;
@@ -8,10 +8,10 @@ const node_fs_1 = require("node:fs");
8
8
  const version_1 = require("remotion/version");
9
9
  const defaults_1 = require("../defaults");
10
10
  const aws_clients_1 = require("../shared/aws-clients");
11
- const hosted_layers_1 = require("../shared/hosted-layers");
11
+ const get_layers_1 = require("../shared/get-layers");
12
12
  const lambda_insights_extensions_1 = require("../shared/lambda-insights-extensions");
13
13
  const suggested_policy_1 = require("./iam-validation/suggested-policy");
14
- const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, ephemerealStorageInMb, customRoleArn, enableLambdaInsights, enableV5Runtime, logLevel, vpcSubnetIds, vpcSecurityGroupIds, }) => {
14
+ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, ephemerealStorageInMb, customRoleArn, enableLambdaInsights, enableV5Runtime, logLevel, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, }) => {
15
15
  var _a;
16
16
  if (createCloudWatchLogGroup) {
17
17
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Creating CloudWatch group');
@@ -42,9 +42,11 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
42
42
  return { FunctionName: functionName };
43
43
  }
44
44
  const defaultRoleName = `arn:aws:iam::${accountId}:role/${suggested_policy_1.ROLE_NAME}`;
45
- const layers = enableV5Runtime
46
- ? hosted_layers_1.v5HostedLayers[region]
47
- : hosted_layers_1.hostedLayers[region];
45
+ const layers = (0, get_layers_1.getLayers)({
46
+ option: runtimePreference,
47
+ region,
48
+ enableV5Runtime,
49
+ });
48
50
  if (enableV5Runtime) {
49
51
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'New V5 runtime enabled https://remotion.dev/docs/lambda/runtime#runtime-changes-in-remotion-50');
50
52
  }
@@ -1,5 +1,6 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
2
  import type { AwsRegion } from '../regions';
3
+ import { type RuntimePreference } from '../shared/get-layers';
3
4
  type MandatoryParameters = {
4
5
  createCloudWatchLogGroup: boolean;
5
6
  cloudWatchLogRetentionPeriodInDays?: number;
@@ -16,6 +17,7 @@ type OptionalParameters = {
16
17
  enableV5Runtime: boolean;
17
18
  vpcSubnetIds: string | undefined;
18
19
  vpcSecurityGroupIds: string | undefined;
20
+ runtimePreference: RuntimePreference;
19
21
  };
20
22
  export type DeployFunctionInput = MandatoryParameters & Partial<OptionalParameters>;
21
23
  export type DeployFunctionOutput = {
@@ -35,5 +37,5 @@ export declare const internalDeployFunction: (params: MandatoryParameters & Opti
35
37
  * @param params.diskSizeInMb The amount of storage the function should be allocated. The higher, the longer videos you can render. Default 512.
36
38
  * @returns {Promise<DeployFunctionOutput>} An object that contains the `functionName` property
37
39
  */
38
- export declare const deployFunction: ({ createCloudWatchLogGroup, memorySizeInMb, region, timeoutInSeconds, cloudWatchLogRetentionPeriodInDays, customRoleArn, enableLambdaInsights, indent, logLevel, enableV5Runtime, vpcSubnetIds, vpcSecurityGroupIds, ...options }: DeployFunctionInput) => Promise<DeployFunctionOutput>;
40
+ export declare const deployFunction: ({ createCloudWatchLogGroup, memorySizeInMb, region, timeoutInSeconds, cloudWatchLogRetentionPeriodInDays, customRoleArn, enableLambdaInsights, indent, logLevel, enableV5Runtime, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, diskSizeInMb, }: DeployFunctionInput) => Promise<DeployFunctionOutput>;
39
41
  export {};
@@ -8,6 +8,7 @@ const get_functions_1 = require("../api/get-functions");
8
8
  const constants_1 = require("../shared/constants");
9
9
  const function_zip_path_1 = require("../shared/function-zip-path");
10
10
  const get_account_id_1 = require("../shared/get-account-id");
11
+ const get_layers_1 = require("../shared/get-layers");
11
12
  const lambda_version_string_1 = require("../shared/lambda-version-string");
12
13
  const validate_aws_region_1 = require("../shared/validate-aws-region");
13
14
  const validate_custom_role_arn_1 = require("../shared/validate-custom-role-arn");
@@ -24,6 +25,7 @@ const internalDeployFunction = async (params) => {
24
25
  (0, validate_retention_period_1.validateCloudWatchRetentionPeriod)(params.cloudWatchLogRetentionPeriodInDays);
25
26
  (0, validate_disk_size_in_mb_1.validateDiskSizeInMb)(params.diskSizeInMb);
26
27
  (0, validate_custom_role_arn_1.validateCustomRoleArn)(params.customRoleArn);
28
+ (0, get_layers_1.validateRuntimePreference)(params.runtimePreference);
27
29
  const fnNameRender = [
28
30
  `${constants_1.RENDER_FN_PREFIX}${lambda_version_string_1.LAMBDA_VERSION_STRING}`,
29
31
  `mem${params.memorySizeInMb}mb`,
@@ -56,6 +58,7 @@ const internalDeployFunction = async (params) => {
56
58
  logLevel: params.logLevel,
57
59
  vpcSubnetIds: params.vpcSubnetIds,
58
60
  vpcSecurityGroupIds: params.vpcSecurityGroupIds,
61
+ runtimePreference: params.runtimePreference,
59
62
  });
60
63
  if (!created.FunctionName) {
61
64
  throw new Error('Lambda was created but has no name');
@@ -79,15 +82,13 @@ const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(exports.interna
79
82
  * @param params.diskSizeInMb The amount of storage the function should be allocated. The higher, the longer videos you can render. Default 512.
80
83
  * @returns {Promise<DeployFunctionOutput>} An object that contains the `functionName` property
81
84
  */
82
- const deployFunction = ({ createCloudWatchLogGroup, memorySizeInMb, region, timeoutInSeconds, cloudWatchLogRetentionPeriodInDays, customRoleArn, enableLambdaInsights, indent, logLevel, enableV5Runtime, vpcSubnetIds, vpcSecurityGroupIds, ...options }) => {
83
- var _a;
84
- const diskSizeInMb = (_a = options.diskSizeInMb) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_EPHEMERAL_STORAGE_IN_MB;
85
+ const deployFunction = ({ createCloudWatchLogGroup, memorySizeInMb, region, timeoutInSeconds, cloudWatchLogRetentionPeriodInDays, customRoleArn, enableLambdaInsights, indent, logLevel, enableV5Runtime, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, diskSizeInMb, }) => {
85
86
  return errorHandled({
86
87
  indent: indent !== null && indent !== void 0 ? indent : false,
87
88
  logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
88
89
  createCloudWatchLogGroup,
89
90
  customRoleArn: customRoleArn !== null && customRoleArn !== void 0 ? customRoleArn : undefined,
90
- diskSizeInMb,
91
+ diskSizeInMb: diskSizeInMb !== null && diskSizeInMb !== void 0 ? diskSizeInMb : constants_1.DEFAULT_EPHEMERAL_STORAGE_IN_MB,
91
92
  enableLambdaInsights: enableLambdaInsights !== null && enableLambdaInsights !== void 0 ? enableLambdaInsights : false,
92
93
  memorySizeInMb,
93
94
  region,
@@ -96,6 +97,7 @@ const deployFunction = ({ createCloudWatchLogGroup, memorySizeInMb, region, time
96
97
  enableV5Runtime: enableV5Runtime !== null && enableV5Runtime !== void 0 ? enableV5Runtime : no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES,
97
98
  vpcSubnetIds,
98
99
  vpcSecurityGroupIds,
100
+ runtimePreference: runtimePreference !== null && runtimePreference !== void 0 ? runtimePreference : 'default',
99
101
  });
100
102
  };
101
103
  exports.deployFunction = deployFunction;
@@ -65,11 +65,11 @@ export declare const internalDeploySite: (args_0: MandatoryParameters & {
65
65
  getValue: ({ commandLine }: {
66
66
  commandLine: Record<string, unknown>;
67
67
  }) => {
68
- value: "error" | "verbose" | "info" | "warn";
68
+ value: "verbose" | "info" | "warn" | "error";
69
69
  source: string;
70
70
  };
71
- setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
72
- type: "error" | "verbose" | "info" | "warn";
71
+ setConfig: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
72
+ type: "verbose" | "info" | "warn" | "error";
73
73
  };
74
74
  readonly throwIfSiteExists: {
75
75
  cliFlag: string;
@@ -2,6 +2,7 @@
2
2
  import type { BrowserSafeApis } from '@remotion/renderer/client';
3
3
  import type { AwsRegion, DeleteAfter } from '../client';
4
4
  import type { Privacy } from '@remotion/serverless/client';
5
+ import type { RuntimePreference } from '../shared/get-layers';
5
6
  type LambdaCommandLineOptions = {
6
7
  help: boolean;
7
8
  region: AwsRegion;
@@ -37,6 +38,7 @@ type LambdaCommandLineOptions = {
37
38
  ['vpc-security-group-ids']: string | undefined;
38
39
  ['compatible-only']: boolean;
39
40
  ['force-path-style']: boolean;
41
+ ['runtime-preference']: RuntimePreference;
40
42
  };
41
43
  export declare const parsedLambdaCli: LambdaCommandLineOptions & import("minimist").ParsedArgs;
42
44
  export declare const forceFlagProvided: boolean;
package/dist/cli/args.js CHANGED
@@ -4,6 +4,7 @@ exports.forceFlagProvided = exports.parsedLambdaCli = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
5
  exports.parsedLambdaCli = cli_1.CliInternals.minimist(process.argv.slice(2), {
6
6
  boolean: cli_1.CliInternals.BooleanFlags,
7
+ string: ['_'],
7
8
  });
8
9
  exports.forceFlagProvided = exports.parsedLambdaCli.f ||
9
10
  exports.parsedLambdaCli.force ||
@@ -15,7 +15,7 @@ const args_1 = require("../../args");
15
15
  const get_aws_region_1 = require("../../get-aws-region");
16
16
  exports.FUNCTIONS_DEPLOY_SUBCOMMAND = 'deploy';
17
17
  const functionsDeploySubcommand = async (logLevel) => {
18
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19
19
  const region = (0, get_aws_region_1.getAwsRegion)();
20
20
  const timeoutInSeconds = (_a = args_1.parsedLambdaCli.timeout) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_TIMEOUT;
21
21
  const memorySizeInMb = (_b = args_1.parsedLambdaCli.memory) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MEMORY_SIZE;
@@ -27,6 +27,7 @@ const functionsDeploySubcommand = async (logLevel) => {
27
27
  const enableV5Runtime = (_g = args_1.parsedLambdaCli['enable-v5-runtime']) !== null && _g !== void 0 ? _g : undefined;
28
28
  const vpcSubnetIds = (_h = args_1.parsedLambdaCli['vpc-subnet-ids']) !== null && _h !== void 0 ? _h : undefined;
29
29
  const vpcSecurityGroupIds = (_j = args_1.parsedLambdaCli['vpc-security-group-ids']) !== null && _j !== void 0 ? _j : undefined;
30
+ const runtimePreference = (_k = args_1.parsedLambdaCli['runtime-preference']) !== null && _k !== void 0 ? _k : 'default';
30
31
  (0, validate_memory_size_1.validateMemorySize)(memorySizeInMb);
31
32
  (0, validate_timeout_1.validateTimeout)(timeoutInSeconds);
32
33
  (0, validate_disk_size_in_mb_1.validateDiskSizeInMb)(diskSizeInMb);
@@ -74,6 +75,7 @@ VPC Security Group IDs = ${vpcSecurityGroupIds}
74
75
  logLevel,
75
76
  vpcSubnetIds,
76
77
  vpcSecurityGroupIds,
78
+ runtimePreference,
77
79
  });
78
80
  if (cli_1.CliInternals.quietFlagProvided()) {
79
81
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, functionName);
@@ -1 +1 @@
1
- export declare const getCurrentRegionInFunctionImplementation: () => "us-east-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "eu-north-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 getCurrentRegionInFunctionImplementation: () => "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";
@@ -1,5 +1,5 @@
1
1
  export declare const LambdaInternals: {
2
- executeCommand: (args: string[], remotionRoot: string, logLevel: "error" | "verbose" | "info" | "warn", implementation: import("@remotion/serverless").ProviderSpecifics<import("./functions/aws-implementation").AwsProvider> | null) => Promise<void>;
2
+ executeCommand: (args: string[], remotionRoot: string, logLevel: "verbose" | "info" | "warn" | "error", implementation: import("@remotion/serverless").ProviderSpecifics<import("./functions/aws-implementation").AwsProvider> | null) => Promise<void>;
3
3
  makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, encodingMaxRate, encodingBufferSize, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, preferLossless, forcePathStyle, }: import("./api/make-lambda-payload").InnerRenderMediaOnLambdaInput) => Promise<import("@remotion/serverless/client").ServerlessStartPayload<import("./functions/aws-implementation").AwsProvider>>;
4
4
  getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, forcePathStyle, }: import("./client").GetRenderProgressInput) => import("@remotion/serverless/client").ServerlessStatusPayload<import("./functions/aws-implementation").AwsProvider>;
5
5
  makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, }: import("./api/render-still-on-lambda").RenderStillOnLambdaNonNullInput) => Promise<{
@@ -14,7 +14,7 @@ export declare const LambdaInternals: {
14
14
  maxRetries: number;
15
15
  frame: number;
16
16
  privacy: import("@remotion/serverless/client").Privacy;
17
- logLevel: "error" | "verbose" | "info" | "warn";
17
+ logLevel: "verbose" | "info" | "warn" | "error";
18
18
  outName: import("@remotion/serverless/client").OutNameInput<import("./functions/aws-implementation").AwsProvider> | null;
19
19
  timeoutInMilliseconds: number;
20
20
  chromiumOptions: import("@remotion/renderer").ChromiumOptions;
@@ -32,7 +32,7 @@ export declare const LambdaInternals: {
32
32
  internalDeploySite: (args_0: {
33
33
  entryPoint: string;
34
34
  bucketName: string;
35
- region: "us-east-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "eu-north-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";
35
+ region: "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";
36
36
  } & {
37
37
  siteName: string;
38
38
  options: {
@@ -60,11 +60,11 @@ export declare const LambdaInternals: {
60
60
  getValue: ({ commandLine }: {
61
61
  commandLine: Record<string, unknown>;
62
62
  }) => {
63
- value: "error" | "verbose" | "info" | "warn";
63
+ value: "verbose" | "info" | "warn" | "error";
64
64
  source: string;
65
65
  };
66
- setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
67
- type: "error" | "verbose" | "info" | "warn";
66
+ setConfig: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
67
+ type: "verbose" | "info" | "warn" | "error";
68
68
  };
69
69
  readonly throwIfSiteExists: {
70
70
  cliFlag: string;
@@ -0,0 +1,11 @@
1
+ import type { AwsRegion } from '../regions';
2
+ import type { AwsLayer } from './hosted-layers';
3
+ declare const runtimePreferenceOptions: readonly ["default", "apple-emojis", "cjk"];
4
+ export type RuntimePreference = (typeof runtimePreferenceOptions)[number];
5
+ export declare const validateRuntimePreference: (option: unknown) => void;
6
+ export declare const getLayers: ({ option, region, enableV5Runtime, }: {
7
+ option: RuntimePreference;
8
+ region: AwsRegion;
9
+ enableV5Runtime: boolean;
10
+ }) => AwsLayer[];
11
+ export {};
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLayers = exports.validateRuntimePreference = void 0;
4
+ const hosted_layers_1 = require("./hosted-layers");
5
+ const runtimePreferenceOptions = ['default', 'apple-emojis', 'cjk'];
6
+ const validateRuntimePreference = (option) => {
7
+ if (!option) {
8
+ return;
9
+ }
10
+ if (!runtimePreferenceOptions.includes(option)) {
11
+ throw new Error(`Invalid runtime preference ${option}. Must be one of ${runtimePreferenceOptions.join(', ')}`);
12
+ }
13
+ };
14
+ exports.validateRuntimePreference = validateRuntimePreference;
15
+ const getLayers = ({ option, region, enableV5Runtime, }) => {
16
+ const layers = enableV5Runtime
17
+ ? hosted_layers_1.v5HostedLayers[region]
18
+ : hosted_layers_1.hostedLayers[region];
19
+ return layers.filter((layer) => {
20
+ if (layer.layerArn.includes('emoji-apple')) {
21
+ return option === 'apple-emojis';
22
+ }
23
+ if (layer.layerArn.includes('emoji-google')) {
24
+ return option !== 'apple-emojis';
25
+ }
26
+ if (layer.layerArn.includes('cjk')) {
27
+ return option !== 'apple-emojis';
28
+ }
29
+ if (layer.layerArn.includes('chromium')) {
30
+ return true;
31
+ }
32
+ if (layer.layerArn.includes('fonts')) {
33
+ return true;
34
+ }
35
+ throw new Error('Unhandled layer type ');
36
+ });
37
+ };
38
+ exports.getLayers = getLayers;
@@ -1,10 +1,11 @@
1
1
  import type { AwsRegion } from '../regions';
2
2
  export declare const REMOTION_HOSTED_LAYER_ARN = "arn:aws:lambda:*:678892195805:layer:remotion-binaries-*";
3
+ export type AwsLayer = {
4
+ layerArn: string;
5
+ version: number;
6
+ };
3
7
  export type HostedLayers = {
4
- [region in AwsRegion]: {
5
- layerArn: string;
6
- version: number;
7
- }[];
8
+ [region in AwsRegion]: AwsLayer[];
8
9
  };
9
10
  export declare const hostedLayers: HostedLayers;
10
11
  export declare const v5HostedLayers: HostedLayers;