@remotion/lambda 4.0.508 → 4.0.510

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 (39) hide show
  1. package/dist/admin/make-layer-public.js +6 -5
  2. package/dist/api/create-function.d.ts +2 -1
  3. package/dist/api/create-function.js +57 -20
  4. package/dist/api/deploy-function.d.ts +7 -2
  5. package/dist/api/deploy-function.js +10 -1
  6. package/dist/api/get-regions.d.ts +1 -1
  7. package/dist/api/iam-validation/resolve-caller-arn.d.ts +6 -0
  8. package/dist/api/iam-validation/resolve-caller-arn.js +28 -0
  9. package/dist/api/iam-validation/role-permissions.d.ts +5 -2
  10. package/dist/api/iam-validation/role-permissions.js +9 -7
  11. package/dist/api/iam-validation/simulate.js +8 -22
  12. package/dist/api/iam-validation/suggested-policy.d.ts +6 -2
  13. package/dist/api/iam-validation/suggested-policy.js +28 -26
  14. package/dist/api/iam-validation/user-permissions.d.ts +5 -2
  15. package/dist/api/iam-validation/user-permissions.js +14 -10
  16. package/dist/cli/args.d.ts +1 -0
  17. package/dist/cli/commands/functions/deploy.js +7 -0
  18. package/dist/cli/commands/policies/role.js +5 -1
  19. package/dist/cli/commands/policies/user.js +5 -1
  20. package/dist/cli/commands/quotas/increase.js +4 -2
  21. package/dist/cli/commands/quotas/list.js +2 -1
  22. package/dist/cli/commands/render/render.js +2 -2
  23. package/dist/cli/commands/still.js +2 -2
  24. package/dist/cli/get-aws-region.d.ts +1 -1
  25. package/dist/cli/helpers/get-s3-output-provider-from-cli.d.ts +1 -1
  26. package/dist/esm/index.mjs +274 -147
  27. package/dist/esm/policies.mjs +36 -38
  28. package/dist/functions/helpers/get-current-region.d.ts +1 -1
  29. package/dist/functions/helpers/make-aws-artifact.d.ts +1 -1
  30. package/dist/functions/helpers/make-aws-artifact.js +3 -1
  31. package/dist/index.d.ts +3 -2
  32. package/dist/shared/get-layers.d.ts +1 -1
  33. package/dist/shared/get-layers.js +4 -2
  34. package/dist/shared/hosted-layers.d.ts +2 -1
  35. package/dist/shared/lambda-insights-extensions.js +2 -0
  36. package/dist/shared/validate-custom-layer-arns.d.ts +6 -0
  37. package/dist/shared/validate-custom-layer-arns.js +44 -0
  38. package/package.json +12 -12
  39. package/remotionlambda-arm64.zip +0 -0
@@ -14,11 +14,13 @@ const quit_1 = require("../../helpers/quit");
14
14
  const log_1 = require("../../log");
15
15
  exports.INCREASE_SUBCOMMAND = 'increase';
16
16
  const makeQuotaUrl = ({ region, quotaId, }) => {
17
- return `https://${region}.console.aws.amazon.com/servicequotas/home/services/lambda/quotas/${quotaId}`;
17
+ const { consoleDomain } = lambda_client_1.LambdaClientInternals.getAwsRegionMetadata(region);
18
+ return `https://${region}.${consoleDomain}/servicequotas/home/services/lambda/quotas/${quotaId}`;
18
19
  };
19
20
  async function quotasIncreaseCommand(logLevel, requestHandler) {
20
21
  var _a, _b, _c;
21
22
  const region = (0, get_aws_region_1.getAwsRegion)();
23
+ const { consoleDomain } = lambda_client_1.LambdaClientInternals.getAwsRegionMetadata(region);
22
24
  const [concurrencyLimit, defaultConcurrencyLimit, changes] = await Promise.all([
23
25
  lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region, requestHandler).send(new client_service_quotas_1.GetServiceQuotaCommand({
24
26
  QuotaCode: constants_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
@@ -40,7 +42,7 @@ async function quotasIncreaseCommand(logLevel, requestHandler) {
40
42
  logLevel,
41
43
  };
42
44
  log_1.Log.warn(logOptions, `A request to increase it to ${openCase.DesiredValue} is already pending:`);
43
- log_1.Log.warn(logOptions, `https://${region}.console.aws.amazon.com/support/home#/case/?displayId=${openCase.CaseId}`);
45
+ log_1.Log.warn(logOptions, `https://${region}.${consoleDomain}/support/home#/case/?displayId=${openCase.CaseId}`);
44
46
  (0, node_process_1.exit)(1);
45
47
  }
46
48
  const concurrencyCurrent = (_b = concurrencyLimit.Quota) === null || _b === void 0 ? void 0 : _b.Value;
@@ -12,6 +12,7 @@ const increase_1 = require("./increase");
12
12
  const quotasListCommand = async (logLevel) => {
13
13
  var _a, _b, _c;
14
14
  const region = (0, get_aws_region_1.getAwsRegion)();
15
+ const { consoleDomain } = lambda_client_1.LambdaClientInternals.getAwsRegionMetadata(region);
15
16
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Region = ${region}`));
16
17
  log_1.Log.info({ indent: false, logLevel });
17
18
  const [concurrencyLimit, defaultConcurrencyLimit, changes] = await Promise.all([
@@ -42,7 +43,7 @@ const quotasListCommand = async (logLevel) => {
42
43
  }
43
44
  if (openCase) {
44
45
  log_1.Log.warn({ indent: false, logLevel }, `A request to increase it to ${openCase.DesiredValue} is pending:`);
45
- log_1.Log.warn({ indent: false, logLevel }, `https://${region}.console.aws.amazon.com/support/home#/case/?displayId=${openCase.CaseId}`);
46
+ log_1.Log.warn({ indent: false, logLevel }, `https://${region}.${consoleDomain}/support/home#/case/?displayId=${openCase.CaseId}`);
46
47
  }
47
48
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('The maximum amount of Lambda functions which can concurrently execute.'));
48
49
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Run \`npx ${constants_1.BINARY_NAME} ${_1.QUOTAS_COMMAND} ${increase_1.INCREASE_SUBCOMMAND}\` to ask AWS to increase your limit.`));
@@ -338,8 +338,8 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
338
338
  indent: false,
339
339
  logLevel,
340
340
  });
341
- log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Bucket: ${cli_1.CliInternals.makeHyperlink({ text: res.bucketName, fallback: res.bucketName, url: `https://${(0, get_aws_region_1.getAwsRegion)()}.console.aws.amazon.com/s3/buckets/${res.bucketName}/?region=${(0, get_aws_region_1.getAwsRegion)()}` })}`));
342
- log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Function: ${cli_1.CliInternals.makeHyperlink({ text: functionName, fallback: functionName, url: `https://${(0, get_aws_region_1.getAwsRegion)()}.console.aws.amazon.com/lambda/home#/functions/${functionName}?tab=code` })}`));
341
+ log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Bucket: ${cli_1.CliInternals.makeHyperlink({ text: res.bucketName, fallback: res.bucketName, url: lambda_client_1.LambdaClientInternals.getS3BucketUrl({ region: (0, get_aws_region_1.getAwsRegion)(), bucketName: res.bucketName }) })}`));
342
+ log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Function: ${cli_1.CliInternals.makeHyperlink({ text: functionName, fallback: functionName, url: lambda_client_1.LambdaClientInternals.getLambdaFunctionUrl({ region: (0, get_aws_region_1.getAwsRegion)(), functionName }) })}`));
343
343
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Render ID: ${cli_1.CliInternals.makeHyperlink({ text: res.renderId, fallback: res.renderId, url: res.folderInS3Console })}`));
344
344
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`progress.json: ${cli_1.CliInternals.makeHyperlink({
345
345
  text: (clickInstruction) => {
@@ -174,7 +174,7 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
174
174
  isLambda: true,
175
175
  fromUi: null,
176
176
  });
177
- log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Function: ${cli_1.CliInternals.makeHyperlink({ text: functionName, fallback: functionName, url: `https://${(0, get_aws_region_1.getAwsRegion)()}.console.aws.amazon.com/lambda/home#/functions/${functionName}?tab=code` })}`));
177
+ log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Function: ${cli_1.CliInternals.makeHyperlink({ text: functionName, fallback: functionName, url: lambda_client_1.LambdaClientInternals.getLambdaFunctionUrl({ region: (0, get_aws_region_1.getAwsRegion)(), functionName }) })}`));
178
178
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Image Format = ${imageFormat} (${imageFormatReason})`));
179
179
  const deleteAfter = args_1.parsedLambdaCli[deleteAfterOption.cliFlag];
180
180
  const scale = scaleOption.getValue({
@@ -230,7 +230,7 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
230
230
  isProduction: (_h = args_1.parsedLambdaCli[client_1.BrowserSafeApis.options.isProductionOption.cliFlag]) !== null && _h !== void 0 ? _h : true,
231
231
  });
232
232
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Render ID: ${cli_1.CliInternals.makeHyperlink({ text: res.renderId, fallback: res.renderId, url: lambda_client_1.LambdaClientInternals.getS3RenderUrl({ bucketName: res.bucketName, renderId: res.renderId, region: (0, get_aws_region_1.getAwsRegion)() }) })}`));
233
- log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Bucket: ${cli_1.CliInternals.makeHyperlink({ text: res.bucketName, fallback: res.bucketName, url: `https://${(0, get_aws_region_1.getAwsRegion)()}.console.aws.amazon.com/s3/buckets/${res.bucketName}/?region=${(0, get_aws_region_1.getAwsRegion)()}` })}`));
233
+ log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Bucket: ${cli_1.CliInternals.makeHyperlink({ text: res.bucketName, fallback: res.bucketName, url: lambda_client_1.LambdaClientInternals.getS3BucketUrl({ region: (0, get_aws_region_1.getAwsRegion)(), bucketName: res.bucketName }) })}`));
234
234
  const artifactProgress = (0, progress_1.makeArtifactProgress)(res.artifacts);
235
235
  if (artifactProgress) {
236
236
  log_1.Log.info({
@@ -1 +1 @@
1
- export declare const getAwsRegion: () => "af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ap-south-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-4" | "ap-southeast-5" | "ca-central-1" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "eu-south-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "sa-east-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2";
1
+ export declare const getAwsRegion: () => "af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ap-south-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-4" | "ap-southeast-5" | "ca-central-1" | "cn-north-1" | "cn-northwest-1" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "eu-south-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "sa-east-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2";
@@ -4,7 +4,7 @@ export declare const S3_OUTPUT_PROVIDER_ACCESS_KEY_ID_ENV_NAME = "REMOTION_S3_OU
4
4
  export declare const S3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY_ENV_NAME = "REMOTION_S3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY";
5
5
  export declare const getS3OutputProviderFromCli: ({ endpoint, region, forcePathStyle, }: {
6
6
  endpoint: string | undefined;
7
- region: "af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ap-south-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-4" | "ap-southeast-5" | "ca-central-1" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "eu-south-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "sa-east-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | (string & {}) | undefined;
7
+ region: "af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ap-south-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-4" | "ap-southeast-5" | "ca-central-1" | "cn-north-1" | "cn-northwest-1" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "eu-south-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "sa-east-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | (string & {}) | undefined;
8
8
  forcePathStyle: boolean | undefined;
9
9
  }) => CustomCredentials<AwsProvider> | null;
10
10
  export declare const makeOutNameWithCustomCredentials: ({ bucketName, key, s3OutputProvider, }: {