@remotion/lambda 4.0.314 → 4.0.315

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 +2 -2
  2. package/dist/api/create-function.d.ts +3 -1
  3. package/dist/api/create-function.js +8 -8
  4. package/dist/api/delete-site.d.ts +3 -2
  5. package/dist/api/delete-site.js +6 -2
  6. package/dist/api/deploy-function.d.ts +3 -2
  7. package/dist/api/deploy-function.js +3 -1
  8. package/dist/api/deploy-site.d.ts +3 -1
  9. package/dist/api/deploy-site.js +7 -2
  10. package/dist/api/download-media.d.ts +2 -1
  11. package/dist/api/download-media.js +2 -0
  12. package/dist/api/get-function-info.d.ts +3 -2
  13. package/dist/api/get-function-info.js +3 -2
  14. package/dist/api/get-or-create-bucket.js +2 -1
  15. package/dist/api/iam-validation/simulate-rule.d.ts +2 -1
  16. package/dist/api/iam-validation/simulate-rule.js +1 -1
  17. package/dist/api/iam-validation/simulate.d.ts +2 -1
  18. package/dist/api/iam-validation/simulate.js +2 -1
  19. package/dist/api/upload-dir.d.ts +3 -2
  20. package/dist/api/upload-dir.js +2 -1
  21. package/dist/cli/commands/compositions/index.js +1 -0
  22. package/dist/cli/commands/functions/deploy.js +1 -0
  23. package/dist/cli/commands/quotas/increase.d.ts +2 -1
  24. package/dist/cli/commands/quotas/increase.js +5 -5
  25. package/dist/cli/commands/quotas/index.js +1 -1
  26. package/dist/cli/commands/quotas/list.js +3 -3
  27. package/dist/cli/commands/render/render.js +1 -0
  28. package/dist/cli/commands/sites/create.js +2 -0
  29. package/dist/cli/commands/sites/rm.js +1 -0
  30. package/dist/cli/commands/sites/rmall.js +1 -0
  31. package/dist/cli/commands/still.js +1 -0
  32. package/dist/cli/helpers/find-function-name.js +2 -2
  33. package/dist/esm/index.mjs +91 -56
  34. package/dist/functions/helpers/read-with-progress.d.ts +3 -2
  35. package/dist/functions/helpers/read-with-progress.js +2 -1
  36. package/dist/index.d.ts +2 -2
  37. package/dist/internals.d.ts +1 -0
  38. package/package.json +12 -12
  39. package/remotionlambda-arm64.zip +0 -0
@@ -46,7 +46,7 @@ const makeLayerPublic = async () => {
46
46
  for (const region of (0, get_regions_1.getRegions)()) {
47
47
  for (const layer of layers) {
48
48
  const layerName = `remotion-binaries-${layer}-arm64`;
49
- const { Version, LayerArn } = await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.PublishLayerVersionCommand({
49
+ const { Version, LayerArn } = await lambda_client_1.LambdaClientInternals.getLambdaClient(region, undefined, null).send(new client_lambda_1.PublishLayerVersionCommand({
50
50
  Content: {
51
51
  S3Bucket: getBucketName(region),
52
52
  S3Key: `remotion-layer-${layer}-v14-arm64.zip`,
@@ -64,7 +64,7 @@ const makeLayerPublic = async () => {
64
64
  CompatibleRuntimes: runtimes,
65
65
  Description: version_1.VERSION,
66
66
  }));
67
- await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.AddLayerVersionPermissionCommand({
67
+ await lambda_client_1.LambdaClientInternals.getLambdaClient(region, undefined, undefined).send(new client_lambda_1.AddLayerVersionPermissionCommand({
68
68
  Action: 'lambda:GetLayerVersion',
69
69
  LayerName: layerName,
70
70
  Principal: '*',
@@ -1,6 +1,7 @@
1
+ import type { RequestHandler } from '@remotion/lambda-client';
1
2
  import { type AwsRegion, type RuntimePreference } from '@remotion/lambda-client';
2
3
  import type { LogLevel } from '@remotion/renderer';
3
- export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, ephemerealStorageInMb, customRoleArn, enableLambdaInsights, logLevel, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, }: {
4
+ export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, ephemerealStorageInMb, customRoleArn, enableLambdaInsights, logLevel, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, requestHandler, }: {
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
  vpcSubnetIds: string;
18
19
  vpcSecurityGroupIds: string;
19
20
  runtimePreference: RuntimePreference;
21
+ requestHandler: RequestHandler | null;
20
22
  }) => Promise<{
21
23
  FunctionName: string;
22
24
  }>;
@@ -11,12 +11,12 @@ const version_1 = require("remotion/version");
11
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, logLevel, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, }) => {
14
+ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, ephemerealStorageInMb, customRoleArn, enableLambdaInsights, logLevel, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, requestHandler, }) => {
15
15
  var _a;
16
16
  if (createCloudWatchLogGroup) {
17
17
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Creating CloudWatch group');
18
18
  try {
19
- await lambda_client_1.LambdaClientInternals.getCloudWatchLogsClient(region).send(new client_cloudwatch_logs_1.CreateLogGroupCommand({
19
+ await lambda_client_1.LambdaClientInternals.getCloudWatchLogsClient(region, requestHandler).send(new client_cloudwatch_logs_1.CreateLogGroupCommand({
20
20
  logGroupName: `${constants_1.LOG_GROUP_PREFIX}${functionName}`,
21
21
  }));
22
22
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'CloudWatch group successfully created');
@@ -31,7 +31,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
31
31
  }
32
32
  }
33
33
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Adding retention policy to the CloudWatch group');
34
- await lambda_client_1.LambdaClientInternals.getCloudWatchLogsClient(region).send(new client_cloudwatch_logs_1.PutRetentionPolicyCommand({
34
+ await lambda_client_1.LambdaClientInternals.getCloudWatchLogsClient(region, requestHandler).send(new client_cloudwatch_logs_1.PutRetentionPolicyCommand({
35
35
  logGroupName: `${constants_1.LOG_GROUP_PREFIX}${functionName}`,
36
36
  retentionInDays,
37
37
  }));
@@ -60,7 +60,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
60
60
  if (enableLambdaInsights && !insightsLayer) {
61
61
  throw new Error(`Lambda Insights is not supported by AWS in region ${region}. Please disable Lambda Insights. See http://remotion.dev/docs/lambda/insights#unsupported-regions`);
62
62
  }
63
- const { FunctionName, FunctionArn } = await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.CreateFunctionCommand({
63
+ const { FunctionName, FunctionArn } = await lambda_client_1.LambdaClientInternals.getLambdaClient(region, undefined, requestHandler).send(new client_lambda_1.CreateFunctionCommand({
64
64
  Code: {
65
65
  ZipFile: new Uint8Array((0, node_fs_1.readFileSync)(zipFile)),
66
66
  },
@@ -82,7 +82,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
82
82
  }));
83
83
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Function deployed. Adding tags...');
84
84
  try {
85
- await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.TagResourceCommand({
85
+ await lambda_client_1.LambdaClientInternals.getLambdaClient(region, undefined, requestHandler).send(new client_lambda_1.TagResourceCommand({
86
86
  Resource: FunctionArn,
87
87
  Tags: {
88
88
  'remotion-lambda': 'true',
@@ -103,7 +103,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
103
103
  }
104
104
  }
105
105
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Disabling function retries (Remotion handles retries itself)...');
106
- await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.PutFunctionEventInvokeConfigCommand({
106
+ await lambda_client_1.LambdaClientInternals.getLambdaClient(region, undefined, requestHandler).send(new client_lambda_1.PutFunctionEventInvokeConfigCommand({
107
107
  MaximumRetryAttempts: 0,
108
108
  FunctionName,
109
109
  }));
@@ -111,7 +111,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
111
111
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Waiting for the function to be ready...');
112
112
  let state = 'Pending';
113
113
  while (state === 'Pending') {
114
- const getFn = await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.GetFunctionCommand({
114
+ const getFn = await lambda_client_1.LambdaClientInternals.getLambdaClient(region, undefined, requestHandler).send(new client_lambda_1.GetFunctionCommand({
115
115
  FunctionName,
116
116
  }));
117
117
  await new Promise((resolve) => {
@@ -123,7 +123,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
123
123
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Locking the runtime version of the function...');
124
124
  const RuntimeVersionArn = `arn:aws:lambda:${region}::runtime:da57c20c4b965d5b75540f6865a35fc8030358e33ec44ecfed33e90901a27a72`;
125
125
  try {
126
- await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.PutRuntimeManagementConfigCommand({
126
+ await lambda_client_1.LambdaClientInternals.getLambdaClient(region, undefined, requestHandler).send(new client_lambda_1.PutRuntimeManagementConfigCommand({
127
127
  FunctionName,
128
128
  UpdateRuntimeOn: 'Manual',
129
129
  RuntimeVersionArn,
@@ -1,4 +1,4 @@
1
- import type { AwsRegion } from '@remotion/lambda-client';
1
+ import type { AwsRegion, RequestHandler } from '@remotion/lambda-client';
2
2
  import { type AwsProvider } from '@remotion/lambda-client';
3
3
  import type { ProviderSpecifics } from '@remotion/serverless';
4
4
  type MandatoryParameters = {
@@ -12,13 +12,14 @@ type OptionalParameters = {
12
12
  itemName: string;
13
13
  }) => void) | null;
14
14
  forcePathStyle: boolean;
15
+ requestHandler: RequestHandler | null;
15
16
  };
16
17
  export type DeleteSiteInput = MandatoryParameters & OptionalParameters;
17
18
  export type DeleteSiteOptionalInput = MandatoryParameters & Partial<OptionalParameters>;
18
19
  export type DeleteSiteOutput = {
19
20
  totalSizeInBytes: number;
20
21
  };
21
- export declare const internalDeleteSite: ({ bucketName, siteName, region, onAfterItemDeleted, providerSpecifics, forcePathStyle, }: DeleteSiteInput & {
22
+ export declare const internalDeleteSite: ({ bucketName, siteName, region, onAfterItemDeleted, providerSpecifics, forcePathStyle, requestHandler, }: DeleteSiteInput & {
22
23
  providerSpecifics: ProviderSpecifics<AwsProvider>;
23
24
  }) => Promise<DeleteSiteOutput>;
24
25
  export declare const deleteSite: (props: DeleteSiteOptionalInput) => Promise<DeleteSiteOutput>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deleteSite = exports.internalDeleteSite = void 0;
4
4
  const lambda_client_1 = require("@remotion/lambda-client");
5
5
  const constants_1 = require("@remotion/lambda-client/constants");
6
- const internalDeleteSite = async ({ bucketName, siteName, region, onAfterItemDeleted, providerSpecifics, forcePathStyle, }) => {
6
+ const internalDeleteSite = async ({ bucketName, siteName, region, onAfterItemDeleted, providerSpecifics, forcePathStyle, requestHandler, }) => {
7
7
  const accountId = await providerSpecifics.getAccountId({ region });
8
8
  let files = await providerSpecifics.listObjects({
9
9
  bucketName,
@@ -12,6 +12,7 @@ const internalDeleteSite = async ({ bucketName, siteName, region, onAfterItemDel
12
12
  region,
13
13
  expectedBucketOwner: accountId,
14
14
  forcePathStyle,
15
+ requestHandler: null,
15
16
  });
16
17
  let totalSize = 0;
17
18
  while (files.length > 0) {
@@ -27,6 +28,7 @@ const internalDeleteSite = async ({ bucketName, siteName, region, onAfterItemDel
27
28
  region,
28
29
  providerSpecifics,
29
30
  forcePathStyle,
31
+ requestHandler,
30
32
  });
31
33
  files = await providerSpecifics.listObjects({
32
34
  bucketName,
@@ -35,6 +37,7 @@ const internalDeleteSite = async ({ bucketName, siteName, region, onAfterItemDel
35
37
  region,
36
38
  expectedBucketOwner: accountId,
37
39
  forcePathStyle,
40
+ requestHandler,
38
41
  });
39
42
  }
40
43
  return {
@@ -47,12 +50,13 @@ exports.internalDeleteSite = internalDeleteSite;
47
50
  * @see [Documentation](https://remotion.dev/docs/cloudrun/deletesite)
48
51
  */
49
52
  const deleteSite = (props) => {
50
- var _a, _b;
53
+ var _a, _b, _c;
51
54
  return (0, exports.internalDeleteSite)({
52
55
  ...props,
53
56
  onAfterItemDeleted: (_a = props.onAfterItemDeleted) !== null && _a !== void 0 ? _a : null,
54
57
  forcePathStyle: (_b = props.forcePathStyle) !== null && _b !== void 0 ? _b : false,
55
58
  providerSpecifics: lambda_client_1.LambdaClientInternals.awsImplementation,
59
+ requestHandler: (_c = props.requestHandler) !== null && _c !== void 0 ? _c : null,
56
60
  });
57
61
  };
58
62
  exports.deleteSite = deleteSite;
@@ -1,4 +1,4 @@
1
- import type { RuntimePreference } from '@remotion/lambda-client';
1
+ import type { RequestHandler, RuntimePreference } from '@remotion/lambda-client';
2
2
  import { type AwsRegion } from '@remotion/lambda-client';
3
3
  import type { LogLevel } from '@remotion/renderer';
4
4
  import type { CloudProvider, FullClientSpecifics, ProviderSpecifics } from '@remotion/serverless';
@@ -18,6 +18,7 @@ type OptionalParameters = {
18
18
  vpcSubnetIds: string | undefined;
19
19
  vpcSecurityGroupIds: string | undefined;
20
20
  runtimePreference: RuntimePreference;
21
+ requestHandler: RequestHandler | null;
21
22
  };
22
23
  export type DeployFunctionInput = MandatoryParameters & Partial<OptionalParameters>;
23
24
  export type DeployFunctionOutput = {
@@ -28,7 +29,7 @@ export declare const internalDeployFunction: <Provider extends CloudProvider>(pa
28
29
  providerSpecifics: ProviderSpecifics<Provider>;
29
30
  fullClientSpecifics: FullClientSpecifics<Provider>;
30
31
  }) => Promise<DeployFunctionOutput>;
31
- export declare const deployFunction: ({ createCloudWatchLogGroup, memorySizeInMb, region, timeoutInSeconds, cloudWatchLogRetentionPeriodInDays, customRoleArn, enableLambdaInsights, indent, logLevel, enableV5Runtime, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, diskSizeInMb, }: DeployFunctionInput & {
32
+ export declare const deployFunction: ({ createCloudWatchLogGroup, memorySizeInMb, region, timeoutInSeconds, cloudWatchLogRetentionPeriodInDays, customRoleArn, enableLambdaInsights, indent, logLevel, enableV5Runtime, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, diskSizeInMb, requestHandler, }: DeployFunctionInput & {
32
33
  enableV5Runtime?: boolean;
33
34
  }) => Promise<DeployFunctionOutput>;
34
35
  export {};
@@ -53,6 +53,7 @@ const internalDeployFunction = async (params) => {
53
53
  vpcSubnetIds: params.vpcSubnetIds,
54
54
  vpcSecurityGroupIds: params.vpcSecurityGroupIds,
55
55
  runtimePreference: params.runtimePreference,
56
+ requestHandler: null,
56
57
  });
57
58
  if (!created.FunctionName) {
58
59
  throw new Error('Lambda was created but has no name');
@@ -68,7 +69,7 @@ const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(exports.interna
68
69
  * @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.
69
70
  * @see [Documentation](https://remotion.dev/docs/lambda/deployfunction)
70
71
  */
71
- const deployFunction = ({ createCloudWatchLogGroup, memorySizeInMb, region, timeoutInSeconds, cloudWatchLogRetentionPeriodInDays, customRoleArn, enableLambdaInsights, indent, logLevel, enableV5Runtime, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, diskSizeInMb, }) => {
72
+ const deployFunction = ({ createCloudWatchLogGroup, memorySizeInMb, region, timeoutInSeconds, cloudWatchLogRetentionPeriodInDays, customRoleArn, enableLambdaInsights, indent, logLevel, enableV5Runtime, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, diskSizeInMb, requestHandler, }) => {
72
73
  if (enableV5Runtime) {
73
74
  console.warn('The `enableV5Runtime` option is now on by default. No need to specify it anymore.');
74
75
  }
@@ -88,6 +89,7 @@ const deployFunction = ({ createCloudWatchLogGroup, memorySizeInMb, region, time
88
89
  runtimePreference: runtimePreference !== null && runtimePreference !== void 0 ? runtimePreference : 'default',
89
90
  providerSpecifics: lambda_client_1.LambdaClientInternals.awsImplementation,
90
91
  fullClientSpecifics: full_client_implementation_1.awsFullClientSpecifics,
92
+ requestHandler,
91
93
  });
92
94
  };
93
95
  exports.deployFunction = deployFunction;
@@ -1,5 +1,5 @@
1
1
  import { type GitSource, type WebpackOverrideFn } from '@remotion/bundler';
2
- import type { AwsRegion } from '@remotion/lambda-client';
2
+ import type { AwsRegion, RequestHandler } from '@remotion/lambda-client';
3
3
  import { type AwsProvider } from '@remotion/lambda-client';
4
4
  import type { ToOptions } from '@remotion/renderer';
5
5
  import type { BrowserSafeApis } from '@remotion/renderer/client';
@@ -26,6 +26,7 @@ type OptionalParameters = {
26
26
  gitSource: GitSource | null;
27
27
  indent: boolean;
28
28
  forcePathStyle: boolean;
29
+ requestHandler: RequestHandler | null;
29
30
  } & ToOptions<typeof BrowserSafeApis.optionsMap.deploySiteLambda>;
30
31
  export type DeploySiteInput = MandatoryParameters & Partial<OptionalParameters>;
31
32
  export type DeploySiteOutput = Promise<{
@@ -54,6 +55,7 @@ export declare const internalDeploySite: (args_0: MandatoryParameters & {
54
55
  gitSource: GitSource | null;
55
56
  indent: boolean;
56
57
  forcePathStyle: boolean;
58
+ requestHandler: RequestHandler | null;
57
59
  } & ToOptions<{
58
60
  readonly logLevel: {
59
61
  cliFlag: "log";
@@ -12,7 +12,7 @@ const node_fs_1 = __importDefault(require("node:fs"));
12
12
  const full_client_implementation_1 = require("../functions/full-client-implementation");
13
13
  const get_s3_operations_1 = require("../shared/get-s3-operations");
14
14
  const validate_site_name_1 = require("../shared/validate-site-name");
15
- const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options, region, privacy, gitSource, throwIfSiteExists, providerSpecifics, forcePathStyle, fullClientSpecifics, }) => {
15
+ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options, region, privacy, gitSource, throwIfSiteExists, providerSpecifics, forcePathStyle, fullClientSpecifics, requestHandler, }) => {
16
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
17
17
  lambda_client_1.LambdaClientInternals.validateAwsRegion(region);
18
18
  (0, serverless_1.validateBucketName)({
@@ -30,6 +30,7 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
30
30
  region,
31
31
  expectedBucketOwner: accountId,
32
32
  forcePathStyle,
33
+ requestHandler,
33
34
  });
34
35
  if (!bucketExists) {
35
36
  throw new Error(`No bucket with the name ${bucketName} exists`);
@@ -43,6 +44,7 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
43
44
  // The `/` is important to not accidentially delete sites with the same name but containing a suffix.
44
45
  prefix: `${subFolder}/`,
45
46
  forcePathStyle,
47
+ requestHandler,
46
48
  }),
47
49
  fullClientSpecifics.bundleSite({
48
50
  publicPath: `/${subFolder}/`,
@@ -93,6 +95,7 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
93
95
  privacy: privacy !== null && privacy !== void 0 ? privacy : 'public',
94
96
  toUpload,
95
97
  forcePathStyle,
98
+ requestHandler,
96
99
  }),
97
100
  Promise.all(toDelete.map((d) => {
98
101
  return providerSpecifics.deleteFile({
@@ -101,6 +104,7 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
101
104
  key: d.Key,
102
105
  region,
103
106
  forcePathStyle,
107
+ requestHandler,
104
108
  });
105
109
  })),
106
110
  ]);
@@ -129,7 +133,7 @@ exports.internalDeploySite = (0, error_handling_1.wrapWithErrorHandling)(mandato
129
133
  * @see [Documentation](https://remotion.dev/docs/cloudrun/deploysite)
130
134
  */
131
135
  const deploySite = (args) => {
132
- var _a, _b, _c, _d, _e, _f;
136
+ var _a, _b, _c, _d, _e, _f, _g;
133
137
  return (0, exports.internalDeploySite)({
134
138
  bucketName: args.bucketName,
135
139
  entryPoint: args.entryPoint,
@@ -144,6 +148,7 @@ const deploySite = (args) => {
144
148
  providerSpecifics: lambda_client_1.LambdaClientInternals.awsImplementation,
145
149
  forcePathStyle: (_f = args.forcePathStyle) !== null && _f !== void 0 ? _f : false,
146
150
  fullClientSpecifics: full_client_implementation_1.awsFullClientSpecifics,
151
+ requestHandler: (_g = args.requestHandler) !== null && _g !== void 0 ? _g : null,
147
152
  });
148
153
  };
149
154
  exports.deploySite = deploySite;
@@ -1,4 +1,4 @@
1
- import type { AwsRegion } from '@remotion/lambda-client';
1
+ import type { AwsRegion, RequestHandler } from '@remotion/lambda-client';
2
2
  import { type AwsProvider } from '@remotion/lambda-client';
3
3
  import type { LogLevel } from '@remotion/renderer';
4
4
  import type { ProviderSpecifics } from '@remotion/serverless';
@@ -13,6 +13,7 @@ export type DownloadMediaInput = {
13
13
  customCredentials?: CustomCredentials<AwsProvider>;
14
14
  logLevel?: LogLevel;
15
15
  forcePathStyle?: boolean;
16
+ requestHandler?: RequestHandler;
16
17
  };
17
18
  export type DownloadMediaOutput = {
18
19
  outputPath: string;
@@ -22,6 +22,7 @@ const internalDownloadMedia = async (input) => {
22
22
  renderId: input.renderId,
23
23
  providerSpecifics: input.providerSpecifics,
24
24
  forcePathStyle: input.forcePathStyle,
25
+ requestHandler: input.requestHandler,
25
26
  });
26
27
  if (!overallProgress.renderMetadata) {
27
28
  throw new Error('Render did not finish yet');
@@ -44,6 +45,7 @@ const internalDownloadMedia = async (input) => {
44
45
  customCredentials,
45
46
  logLevel: (_c = input.logLevel) !== null && _c !== void 0 ? _c : 'info',
46
47
  forcePathStyle: (_d = input.forcePathStyle) !== null && _d !== void 0 ? _d : false,
48
+ requestHandler: input.requestHandler,
47
49
  });
48
50
  return {
49
51
  outputPath,
@@ -1,9 +1,10 @@
1
- import type { AwsRegion } from '@remotion/lambda-client';
1
+ import type { AwsRegion, RequestHandler } from '@remotion/lambda-client';
2
2
  import type { LogLevel } from '@remotion/renderer';
3
3
  import type { FunctionInfo } from '@remotion/serverless';
4
4
  export type GetFunctionInfoInput = {
5
5
  region: AwsRegion;
6
6
  functionName: string;
7
7
  logLevel?: LogLevel;
8
+ requestHandler?: RequestHandler;
8
9
  };
9
- export declare const getFunctionInfo: ({ region, functionName, logLevel, }: GetFunctionInfoInput) => Promise<FunctionInfo>;
10
+ export declare const getFunctionInfo: ({ region, functionName, logLevel, requestHandler, }: GetFunctionInfoInput) => Promise<FunctionInfo>;
@@ -8,17 +8,18 @@ const constants_1 = require("@remotion/lambda-client/constants");
8
8
  * @description Gets information about a function given its name and region.
9
9
  * @see [Documentation](https://remotion.dev/docs/lambda/getfunctioninfo)
10
10
  */
11
- const getFunctionInfo = async ({ region, functionName, logLevel, }) => {
11
+ const getFunctionInfo = async ({ region, functionName, logLevel, requestHandler, }) => {
12
12
  var _a, _b, _c, _d, _e;
13
13
  lambda_client_1.LambdaClientInternals.validateAwsRegion(region);
14
14
  const [functionInfo, version] = await Promise.all([
15
- lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.GetFunctionCommand({
15
+ lambda_client_1.LambdaClientInternals.getLambdaClient(region, undefined, requestHandler).send(new client_lambda_1.GetFunctionCommand({
16
16
  FunctionName: functionName,
17
17
  })),
18
18
  (0, lambda_client_1.getFunctionVersion)({
19
19
  functionName,
20
20
  region,
21
21
  logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
22
+ requestHandler,
22
23
  }),
23
24
  ]);
24
25
  return {
@@ -8,7 +8,7 @@ const serverless_1 = require("@remotion/serverless");
8
8
  * @see [Documentation](https://remotion.dev/docs/cloudrun/getorcreatebucket)
9
9
  */
10
10
  const getOrCreateBucket = (options) => {
11
- var _a, _b;
11
+ var _a, _b, _c;
12
12
  return (0, serverless_1.internalGetOrCreateBucket)({
13
13
  region: options.region,
14
14
  enableFolderExpiry: (_a = options.enableFolderExpiry) !== null && _a !== void 0 ? _a : null,
@@ -16,6 +16,7 @@ const getOrCreateBucket = (options) => {
16
16
  providerSpecifics: lambda_client_1.LambdaClientInternals.awsImplementation,
17
17
  forcePathStyle: false,
18
18
  skipPutAcl: false,
19
+ requestHandler: (_c = options.requestHandler) !== null && _c !== void 0 ? _c : null,
19
20
  });
20
21
  };
21
22
  exports.getOrCreateBucket = getOrCreateBucket;
@@ -1,4 +1,4 @@
1
- import type { AwsRegion } from '@remotion/lambda-client';
1
+ import type { AwsRegion, RequestHandler } from '@remotion/lambda-client';
2
2
  export type EvalDecision = 'allowed' | 'explicitDeny' | 'implicitDeny';
3
3
  export type SimulationResult = {
4
4
  decision: EvalDecision;
@@ -10,4 +10,5 @@ export declare const simulateRule: (options: {
10
10
  arn: string;
11
11
  resource: string[];
12
12
  retries: number;
13
+ requestHandler: RequestHandler | null;
13
14
  }) => Promise<SimulationResult[]>;
@@ -6,7 +6,7 @@ const lambda_client_1 = require("@remotion/lambda-client");
6
6
  const simulateRule = async (options) => {
7
7
  var _a;
8
8
  try {
9
- const res = await lambda_client_1.LambdaClientInternals.getIamClient(options.region).send(new client_iam_1.SimulatePrincipalPolicyCommand({
9
+ const res = await lambda_client_1.LambdaClientInternals.getIamClient(options.region, options.requestHandler).send(new client_iam_1.SimulatePrincipalPolicyCommand({
10
10
  ActionNames: options.actionNames,
11
11
  PolicySourceArn: options.arn,
12
12
  ResourceArns: options.resource,
@@ -1,9 +1,10 @@
1
- import type { AwsRegion } from '@remotion/lambda-client';
1
+ import type { AwsRegion, RequestHandler } from '@remotion/lambda-client';
2
2
  import type { SimulationResult } from './simulate-rule';
3
3
  export declare const logPermissionOutput: (output: SimulationResult) => string;
4
4
  export type SimulatePermissionsInput = {
5
5
  region: AwsRegion;
6
6
  onSimulation?: (result: SimulationResult) => void;
7
+ requestHandler?: RequestHandler;
7
8
  };
8
9
  export type SimulatePermissionsOutput = {
9
10
  results: SimulationResult[];
@@ -23,7 +23,7 @@ exports.logPermissionOutput = logPermissionOutput;
23
23
  */
24
24
  const simulatePermissions = async (options) => {
25
25
  var _a;
26
- const callerIdentity = await lambda_client_1.LambdaClientInternals.getStsClient(options.region).send(new client_sts_1.GetCallerIdentityCommand({}));
26
+ const callerIdentity = await lambda_client_1.LambdaClientInternals.getStsClient(options.region, options.requestHandler).send(new client_sts_1.GetCallerIdentityCommand({}));
27
27
  if (!(callerIdentity === null || callerIdentity === void 0 ? void 0 : callerIdentity.Arn)) {
28
28
  throw new Error('No valid AWS Caller Identity detected');
29
29
  }
@@ -56,6 +56,7 @@ const simulatePermissions = async (options) => {
56
56
  region: options.region,
57
57
  resource: per.resource,
58
58
  retries: 2,
59
+ requestHandler: options.requestHandler,
59
60
  });
60
61
  for (const res of result) {
61
62
  results.push(res);
@@ -1,10 +1,10 @@
1
- import type { AwsRegion } from '@remotion/lambda-client';
1
+ import type { AwsRegion, RequestHandler } from '@remotion/lambda-client';
2
2
  import type { Privacy, UploadDirProgress } from '@remotion/serverless';
3
3
  export type MockFile = {
4
4
  name: string;
5
5
  content: string;
6
6
  };
7
- export declare const uploadDir: ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, forcePathStyle, }: {
7
+ export declare const uploadDir: ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, forcePathStyle, requestHandler, }: {
8
8
  bucket: string;
9
9
  region: AwsRegion;
10
10
  localDir: string;
@@ -13,4 +13,5 @@ export declare const uploadDir: ({ bucket, region, localDir, onProgress, keyPref
13
13
  privacy: Privacy;
14
14
  toUpload: string[];
15
15
  forcePathStyle: boolean;
16
+ requestHandler: RequestHandler | null;
16
17
  }) => Promise<void>;
@@ -41,7 +41,7 @@ async function getFiles(directory, originalDirectory, toUpload) {
41
41
  return _files.flat(1);
42
42
  }
43
43
  const limit = lambda_client_1.LambdaClientInternals.pLimit(5);
44
- const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, forcePathStyle, }) => {
44
+ const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, forcePathStyle, requestHandler, }) => {
45
45
  const files = await getFiles(localDir, localDir, toUpload);
46
46
  const progresses = {};
47
47
  for (const file of files) {
@@ -51,6 +51,7 @@ const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, priv
51
51
  region,
52
52
  customCredentials: null,
53
53
  forcePathStyle,
54
+ requestHandler,
54
55
  });
55
56
  const uploadWithoutRetry = async (filePath) => {
56
57
  const Key = (0, make_s3_key_1.makeS3Key)(keyPrefix, localDir, filePath.name);
@@ -57,6 +57,7 @@ const compositionsCommand = async ({ args, logLevel, providerSpecifics, }) => {
57
57
  logLevel,
58
58
  timeoutInMilliseconds: puppeteerTimeout,
59
59
  forceBucketName: args_1.parsedLambdaCli['force-bucket-name'],
60
+ requestHandler: null,
60
61
  });
61
62
  cli_1.CliInternals.printCompositions(comps, logLevel);
62
63
  };
@@ -80,6 +80,7 @@ VPC Security Group IDs = ${vpcSecurityGroupIds}
80
80
  runtimePreference,
81
81
  providerSpecifics,
82
82
  fullClientSpecifics,
83
+ requestHandler: null,
83
84
  });
84
85
  if (cli_1.CliInternals.quietFlagProvided()) {
85
86
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, functionName);
@@ -1,3 +1,4 @@
1
+ import { RequestHandler } from '@remotion/lambda-client';
1
2
  import type { LogLevel } from '@remotion/renderer';
2
3
  export declare const INCREASE_SUBCOMMAND = "increase";
3
- export declare const quotasIncreaseCommand: (logLevel: LogLevel) => Promise<void>;
4
+ export declare const quotasIncreaseCommand: (logLevel: LogLevel, requestHandler: RequestHandler | null) => Promise<void>;
@@ -15,19 +15,19 @@ exports.INCREASE_SUBCOMMAND = 'increase';
15
15
  const makeQuotaUrl = ({ region, quotaId, }) => {
16
16
  return `https://${region}.console.aws.amazon.com/servicequotas/home/services/lambda/quotas/${quotaId}`;
17
17
  };
18
- const quotasIncreaseCommand = async (logLevel) => {
18
+ const quotasIncreaseCommand = async (logLevel, requestHandler) => {
19
19
  var _a, _b, _c;
20
20
  const region = (0, get_aws_region_1.getAwsRegion)();
21
21
  const [concurrencyLimit, defaultConcurrencyLimit, changes] = await Promise.all([
22
- lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.GetServiceQuotaCommand({
22
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region, requestHandler).send(new client_service_quotas_1.GetServiceQuotaCommand({
23
23
  QuotaCode: constants_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
24
24
  ServiceCode: 'lambda',
25
25
  })),
26
- lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.GetAWSDefaultServiceQuotaCommand({
26
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region, requestHandler).send(new client_service_quotas_1.GetAWSDefaultServiceQuotaCommand({
27
27
  QuotaCode: constants_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
28
28
  ServiceCode: 'lambda',
29
29
  })),
30
- lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.ListRequestedServiceQuotaChangeHistoryByQuotaCommand({
30
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region, requestHandler).send(new client_service_quotas_1.ListRequestedServiceQuotaChangeHistoryByQuotaCommand({
31
31
  QuotaCode: constants_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
32
32
  ServiceCode: 'lambda',
33
33
  })),
@@ -61,7 +61,7 @@ const quotasIncreaseCommand = async (logLevel) => {
61
61
  (0, quit_1.quit)(1);
62
62
  }
63
63
  try {
64
- await lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.RequestServiceQuotaIncreaseCommand({
64
+ await lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region, requestHandler).send(new client_service_quotas_1.RequestServiceQuotaIncreaseCommand({
65
65
  QuotaCode: constants_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
66
66
  DesiredValue: newLimit,
67
67
  ServiceCode: 'lambda',
@@ -20,7 +20,7 @@ const quotasCommand = (args, logLevel) => {
20
20
  return (0, list_1.quotasListCommand)(logLevel);
21
21
  }
22
22
  if (args[0] === increase_1.INCREASE_SUBCOMMAND) {
23
- return (0, increase_1.quotasIncreaseCommand)(logLevel);
23
+ return (0, increase_1.quotasIncreaseCommand)(logLevel, null);
24
24
  }
25
25
  cli_1.CliInternals.Log.error({ indent: false, logLevel }, 'Subcommand ' + args[0] + ' not found.');
26
26
  printHelp(logLevel);
@@ -15,15 +15,15 @@ const quotasListCommand = async (logLevel) => {
15
15
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Region = ${region}`));
16
16
  log_1.Log.info({ indent: false, logLevel });
17
17
  const [concurrencyLimit, defaultConcurrencyLimit, changes] = await Promise.all([
18
- lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.GetServiceQuotaCommand({
18
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region, null).send(new client_service_quotas_1.GetServiceQuotaCommand({
19
19
  QuotaCode: constants_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
20
20
  ServiceCode: 'lambda',
21
21
  })),
22
- lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.GetAWSDefaultServiceQuotaCommand({
22
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region, null).send(new client_service_quotas_1.GetAWSDefaultServiceQuotaCommand({
23
23
  QuotaCode: constants_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
24
24
  ServiceCode: 'lambda',
25
25
  })),
26
- lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.ListRequestedServiceQuotaChangeHistoryByQuotaCommand({
26
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region, null).send(new client_service_quotas_1.ListRequestedServiceQuotaChangeHistoryByQuotaCommand({
27
27
  QuotaCode: constants_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
28
28
  ServiceCode: 'lambda',
29
29
  })),
@@ -247,6 +247,7 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
247
247
  metadata: metadata !== null && metadata !== void 0 ? metadata : null,
248
248
  apiKey: (_m = args_1.parsedLambdaCli[client_1.BrowserSafeApis.options.apiKeyOption.cliFlag]) !== null && _m !== void 0 ? _m : null,
249
249
  storageClass: (_o = args_1.parsedLambdaCli['storage-class']) !== null && _o !== void 0 ? _o : null,
250
+ requestHandler: null,
250
251
  });
251
252
  const progressBar = cli_1.CliInternals.createOverwriteableCliOutput({
252
253
  quiet: cli_1.CliInternals.quietFlagProvided(),
@@ -86,6 +86,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementatio
86
86
  providerSpecifics: implementation,
87
87
  forcePathStyle: false,
88
88
  skipPutAcl: args_1.parsedLambdaCli.privacy === 'no-acl',
89
+ requestHandler: null,
89
90
  })).bucketName;
90
91
  multiProgress.bucketProgress.doneIn = Date.now() - bucketStart;
91
92
  updateProgress(false);
@@ -155,6 +156,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementatio
155
156
  providerSpecifics: implementation,
156
157
  forcePathStyle: (_e = args_1.parsedLambdaCli['force-path-style']) !== null && _e !== void 0 ? _e : false,
157
158
  fullClientSpecifics: full_client_implementation_1.awsFullClientSpecifics,
159
+ requestHandler: null,
158
160
  });
159
161
  const uploadDuration = Date.now() - uploadStart;
160
162
  multiProgress.deployProgress = {
@@ -33,6 +33,7 @@ const sitesRmSubcommand = async (args, logLevel, implementation) => {
33
33
  providerSpecifics: implementation,
34
34
  forcePathStyle: false,
35
35
  skipPutAcl: false,
36
+ requestHandler: null,
36
37
  })).bucketName;
37
38
  for (const siteName of args) {
38
39
  const site = deployedSites.sites.find((s) => s.id === siteName.trim());
@@ -23,6 +23,7 @@ const sitesRmallSubcommand = async (logLevel, implementation) => {
23
23
  providerSpecifics: implementation,
24
24
  forcePathStyle: false,
25
25
  skipPutAcl: false,
26
+ requestHandler: null,
26
27
  })).bucketName;
27
28
  for (const site of deployedSites.sites) {
28
29
  if (!(await (0, confirm_1.confirmCli)({
@@ -182,6 +182,7 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
182
182
  indent: false,
183
183
  offthreadVideoCacheSizeInBytes,
184
184
  offthreadVideoThreads: null,
185
+ requestHandler: null,
185
186
  });
186
187
  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)() }) })}`));
187
188
  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)()}` })}`));