@remotion/lambda-client 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.
- package/.turbo/turbo-formatting.log +7 -0
- package/.turbo/turbo-make.log +2 -2
- package/dist/aws-clients.d.ts +6 -5
- package/dist/aws-clients.js +10 -5
- package/dist/aws-provider.d.ts +2 -0
- package/dist/bucket-exists.js +2 -1
- package/dist/call-lambda-async.js +1 -1
- package/dist/call-lambda-streaming.js +1 -1
- package/dist/call-lambda-sync.js +1 -1
- package/dist/clean-items.d.ts +2 -1
- package/dist/clean-items.js +2 -1
- package/dist/create-bucket.js +25 -5
- package/dist/delete-file.js +7 -2
- package/dist/delete-function.d.ts +4 -1
- package/dist/delete-function.js +2 -2
- package/dist/delete-render.d.ts +2 -0
- package/dist/delete-render.js +7 -1
- package/dist/esm/index.mjs +232 -106
- package/dist/get-account-id.js +1 -1
- package/dist/get-aws-client.d.ts +3 -1
- package/dist/get-aws-client.js +2 -1
- package/dist/get-buckets.js +3 -1
- package/dist/get-compositions-on-lambda.d.ts +3 -1
- package/dist/get-compositions-on-lambda.js +3 -1
- package/dist/get-function-version.d.ts +3 -1
- package/dist/get-function-version.js +4 -1
- package/dist/get-functions.d.ts +2 -0
- package/dist/get-functions.js +5 -2
- package/dist/get-render-progress.d.ts +2 -0
- package/dist/get-render-progress.js +2 -0
- package/dist/get-s3-client.d.ts +3 -1
- package/dist/get-s3-client.js +2 -1
- package/dist/get-service-client.d.ts +3 -1
- package/dist/get-service-client.js +13 -5
- package/dist/get-sites.d.ts +4 -2
- package/dist/get-sites.js +6 -2
- package/dist/head-file.js +2 -1
- package/dist/index.d.ts +14 -10
- package/dist/is-flaky-error.js +2 -1
- package/dist/lifecycle-rules.d.ts +3 -1
- package/dist/lifecycle-rules.js +17 -5
- package/dist/list-objects.js +4 -1
- package/dist/make-lambda-payload.d.ts +4 -2
- package/dist/make-lambda-payload.js +4 -2
- package/dist/presign-url.d.ts +5 -2
- package/dist/presign-url.js +4 -2
- package/dist/read-file.d.ts +3 -1
- package/dist/read-file.js +2 -1
- package/dist/render-media-on-lambda.d.ts +2 -0
- package/dist/render-media-on-lambda.js +3 -1
- package/dist/render-still-on-lambda.d.ts +5 -1
- package/dist/render-still-on-lambda.js +3 -1
- package/dist/test/request-handler.test.d.ts +1 -0
- package/dist/test/request-handler.test.js +36 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.js +2 -0
- package/dist/write-file.js +2 -1
- package/package.json +3 -3
- package/src/aws-clients.ts +18 -3
- package/src/aws-provider.ts +2 -0
- package/src/bucket-exists.ts +8 -1
- package/src/call-lambda-async.ts +5 -1
- package/src/call-lambda-streaming.ts +5 -1
- package/src/call-lambda-sync.ts +5 -1
- package/src/clean-items.ts +3 -0
- package/src/create-bucket.ts +25 -5
- package/src/delete-file.ts +9 -1
- package/src/delete-function.ts +6 -2
- package/src/delete-render.ts +8 -1
- package/src/get-account-id.ts +1 -1
- package/src/get-aws-client.ts +4 -0
- package/src/get-buckets.ts +3 -0
- package/src/get-compositions-on-lambda.ts +5 -0
- package/src/get-function-version.ts +6 -0
- package/src/get-functions.ts +12 -1
- package/src/get-render-progress.ts +4 -0
- package/src/get-s3-client.ts +4 -0
- package/src/get-service-client.ts +17 -3
- package/src/get-sites.ts +8 -0
- package/src/head-file.ts +2 -0
- package/src/index.ts +1 -0
- package/src/is-flaky-error.ts +4 -1
- package/src/lifecycle-rules.ts +21 -6
- package/src/list-objects.ts +4 -0
- package/src/make-lambda-payload.ts +6 -0
- package/src/presign-url.ts +13 -2
- package/src/read-file.ts +4 -0
- package/src/render-media-on-lambda.ts +4 -0
- package/src/render-still-on-lambda.ts +7 -1
- package/src/test/request-handler.test.ts +42 -0
- package/src/types.ts +7 -0
- package/src/write-file.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -16747,6 +16747,9 @@ var getAbsoluteSrc = (relativeSrc) => {
|
|
|
16747
16747
|
if (typeof window === "undefined") {
|
|
16748
16748
|
return relativeSrc;
|
|
16749
16749
|
}
|
|
16750
|
+
if (relativeSrc.startsWith("http://") || relativeSrc.startsWith("https://") || relativeSrc.startsWith("file://") || relativeSrc.startsWith("blob:") || relativeSrc.startsWith("data:")) {
|
|
16751
|
+
return relativeSrc;
|
|
16752
|
+
}
|
|
16750
16753
|
return new URL(relativeSrc, window.origin).href;
|
|
16751
16754
|
};
|
|
16752
16755
|
var getOffthreadVideoSource = ({
|
|
@@ -16874,7 +16877,7 @@ var validateFramesPerFunction = ({
|
|
|
16874
16877
|
throw new TypeError(`The framesPerLambda needs to be at least ${effectiveMinimum}, but is ${framesPerFunction}`);
|
|
16875
16878
|
}
|
|
16876
16879
|
};
|
|
16877
|
-
var VERSION = "4.0.
|
|
16880
|
+
var VERSION = "4.0.315";
|
|
16878
16881
|
var isColorSupported = () => {
|
|
16879
16882
|
const env = process.env || {};
|
|
16880
16883
|
const isForceDisabled = "NO_COLOR" in env;
|
|
@@ -17263,7 +17266,8 @@ var internalGetOrCreateBucket = async (params) => {
|
|
|
17263
17266
|
const remotionBuckets = await params.providerSpecifics.getBuckets({
|
|
17264
17267
|
region: params.region,
|
|
17265
17268
|
forceBucketName: null,
|
|
17266
|
-
forcePathStyle: params.forcePathStyle
|
|
17269
|
+
forcePathStyle: params.forcePathStyle,
|
|
17270
|
+
requestHandler: params.requestHandler
|
|
17267
17271
|
});
|
|
17268
17272
|
if (remotionBuckets.length > 1) {
|
|
17269
17273
|
throw new Error(`You have multiple buckets (${remotionBuckets.map((b) => b.name)}) in your S3 region (${params.region}) starting with "${params.providerSpecifics.getBucketPrefix()}". Please see https://remotion.dev/docs/lambda/multiple-buckets.`);
|
|
@@ -17276,7 +17280,8 @@ var internalGetOrCreateBucket = async (params) => {
|
|
|
17276
17280
|
bucketName: existingBucketName,
|
|
17277
17281
|
region,
|
|
17278
17282
|
customCredentials: params.customCredentials,
|
|
17279
|
-
forcePathStyle: params.forcePathStyle
|
|
17283
|
+
forcePathStyle: params.forcePathStyle,
|
|
17284
|
+
requestHandler: params.requestHandler
|
|
17280
17285
|
});
|
|
17281
17286
|
return { bucketName: remotionBuckets[0].name, alreadyExisted: true };
|
|
17282
17287
|
}
|
|
@@ -17285,14 +17290,16 @@ var internalGetOrCreateBucket = async (params) => {
|
|
|
17285
17290
|
bucketName,
|
|
17286
17291
|
region: params.region,
|
|
17287
17292
|
forcePathStyle: params.forcePathStyle,
|
|
17288
|
-
skipPutAcl: params.skipPutAcl
|
|
17293
|
+
skipPutAcl: params.skipPutAcl,
|
|
17294
|
+
requestHandler: params.requestHandler
|
|
17289
17295
|
});
|
|
17290
17296
|
await params.providerSpecifics.applyLifeCycle({
|
|
17291
17297
|
enableFolderExpiry: enableFolderExpiry ?? null,
|
|
17292
17298
|
bucketName,
|
|
17293
17299
|
region,
|
|
17294
17300
|
customCredentials: params.customCredentials,
|
|
17295
|
-
forcePathStyle: params.forcePathStyle
|
|
17301
|
+
forcePathStyle: params.forcePathStyle,
|
|
17302
|
+
requestHandler: params.requestHandler
|
|
17296
17303
|
});
|
|
17297
17304
|
return { bucketName, alreadyExisted: false };
|
|
17298
17305
|
};
|
|
@@ -17365,7 +17372,8 @@ var compressInputProps = async ({
|
|
|
17365
17372
|
needsToUpload,
|
|
17366
17373
|
providerSpecifics,
|
|
17367
17374
|
forcePathStyle,
|
|
17368
|
-
skipPutAcl
|
|
17375
|
+
skipPutAcl,
|
|
17376
|
+
requestHandler
|
|
17369
17377
|
}) => {
|
|
17370
17378
|
const hash = providerSpecifics.randomHash();
|
|
17371
17379
|
if (needsToUpload) {
|
|
@@ -17375,7 +17383,8 @@ var compressInputProps = async ({
|
|
|
17375
17383
|
customCredentials: null,
|
|
17376
17384
|
providerSpecifics,
|
|
17377
17385
|
forcePathStyle,
|
|
17378
|
-
skipPutAcl
|
|
17386
|
+
skipPutAcl,
|
|
17387
|
+
requestHandler
|
|
17379
17388
|
})).bucketName;
|
|
17380
17389
|
await providerSpecifics.writeFile({
|
|
17381
17390
|
body: stringifiedInputProps,
|
|
@@ -17387,7 +17396,8 @@ var compressInputProps = async ({
|
|
|
17387
17396
|
key: makeKey(propsType, hash),
|
|
17388
17397
|
privacy: "private",
|
|
17389
17398
|
forcePathStyle,
|
|
17390
|
-
storageClass: null
|
|
17399
|
+
storageClass: null,
|
|
17400
|
+
requestHandler
|
|
17391
17401
|
});
|
|
17392
17402
|
return {
|
|
17393
17403
|
type: "bucket-url",
|
|
@@ -18085,7 +18095,8 @@ var getOverallProgressFromStorage = async ({
|
|
|
18085
18095
|
expectedBucketOwner,
|
|
18086
18096
|
region,
|
|
18087
18097
|
providerSpecifics,
|
|
18088
|
-
forcePathStyle
|
|
18098
|
+
forcePathStyle,
|
|
18099
|
+
requestHandler
|
|
18089
18100
|
}) => {
|
|
18090
18101
|
try {
|
|
18091
18102
|
const Body = await providerSpecifics.readFile({
|
|
@@ -18093,7 +18104,8 @@ var getOverallProgressFromStorage = async ({
|
|
|
18093
18104
|
key: overallProgressKey(renderId),
|
|
18094
18105
|
expectedBucketOwner,
|
|
18095
18106
|
region,
|
|
18096
|
-
forcePathStyle
|
|
18107
|
+
forcePathStyle,
|
|
18108
|
+
requestHandler
|
|
18097
18109
|
});
|
|
18098
18110
|
const str = await streamToString(Body);
|
|
18099
18111
|
return JSON.parse(str);
|
|
@@ -18301,7 +18313,8 @@ var getProgress = async ({
|
|
|
18301
18313
|
customCredentials,
|
|
18302
18314
|
providerSpecifics,
|
|
18303
18315
|
forcePathStyle,
|
|
18304
|
-
functionName
|
|
18316
|
+
functionName,
|
|
18317
|
+
requestHandler
|
|
18305
18318
|
}) => {
|
|
18306
18319
|
const overallProgress = await getOverallProgressFromStorage({
|
|
18307
18320
|
renderId,
|
|
@@ -18309,7 +18322,8 @@ var getProgress = async ({
|
|
|
18309
18322
|
expectedBucketOwner,
|
|
18310
18323
|
region,
|
|
18311
18324
|
providerSpecifics,
|
|
18312
|
-
forcePathStyle
|
|
18325
|
+
forcePathStyle,
|
|
18326
|
+
requestHandler
|
|
18313
18327
|
});
|
|
18314
18328
|
if (overallProgress.postRenderData) {
|
|
18315
18329
|
if (!overallProgress.renderMetadata) {
|
|
@@ -18708,7 +18722,8 @@ var getCredentialsHash = ({
|
|
|
18708
18722
|
customCredentials,
|
|
18709
18723
|
region,
|
|
18710
18724
|
service,
|
|
18711
|
-
forcePathStyle
|
|
18725
|
+
forcePathStyle,
|
|
18726
|
+
requestHandler
|
|
18712
18727
|
}) => {
|
|
18713
18728
|
const hashComponents = {};
|
|
18714
18729
|
if (getEnvVariable("REMOTION_SKIP_AWS_CREDENTIALS_CHECK")) {
|
|
@@ -18738,6 +18753,7 @@ var getCredentialsHash = ({
|
|
|
18738
18753
|
hashComponents.region = region;
|
|
18739
18754
|
hashComponents.service = service;
|
|
18740
18755
|
hashComponents.forcePathStyle = forcePathStyle;
|
|
18756
|
+
hashComponents.requestHandler = requestHandler;
|
|
18741
18757
|
return random(JSON.stringify(hashComponents)).toString().replace("0.", "");
|
|
18742
18758
|
};
|
|
18743
18759
|
var _clients = {};
|
|
@@ -18745,7 +18761,8 @@ var getServiceClient = ({
|
|
|
18745
18761
|
region,
|
|
18746
18762
|
service,
|
|
18747
18763
|
customCredentials,
|
|
18748
|
-
forcePathStyle
|
|
18764
|
+
forcePathStyle,
|
|
18765
|
+
requestHandler
|
|
18749
18766
|
}) => {
|
|
18750
18767
|
const Client = (() => {
|
|
18751
18768
|
if (service === "cloudwatch") {
|
|
@@ -18772,7 +18789,8 @@ var getServiceClient = ({
|
|
|
18772
18789
|
region,
|
|
18773
18790
|
customCredentials,
|
|
18774
18791
|
service,
|
|
18775
|
-
forcePathStyle
|
|
18792
|
+
forcePathStyle,
|
|
18793
|
+
requestHandler
|
|
18776
18794
|
});
|
|
18777
18795
|
if (!_clients[key]) {
|
|
18778
18796
|
checkCredentials();
|
|
@@ -18781,6 +18799,7 @@ var getServiceClient = ({
|
|
|
18781
18799
|
maxSockets: MAX_FUNCTIONS_PER_RENDER * 2
|
|
18782
18800
|
}
|
|
18783
18801
|
} : undefined;
|
|
18802
|
+
const finalRequestHandler = requestHandler ? lambdaOptions ? { ...requestHandler, ...lambdaOptions } : requestHandler : lambdaOptions;
|
|
18784
18803
|
const client = customCredentials ? new Client({
|
|
18785
18804
|
region: customCredentials.region ?? "us-east-1",
|
|
18786
18805
|
credentials: customCredentials.accessKeyId && customCredentials.secretAccessKey ? {
|
|
@@ -18788,17 +18807,17 @@ var getServiceClient = ({
|
|
|
18788
18807
|
secretAccessKey: customCredentials.secretAccessKey
|
|
18789
18808
|
} : undefined,
|
|
18790
18809
|
endpoint: customCredentials.endpoint,
|
|
18791
|
-
requestHandler:
|
|
18810
|
+
requestHandler: finalRequestHandler,
|
|
18792
18811
|
forcePathStyle: customCredentials.forcePathStyle,
|
|
18793
18812
|
maxAttempts: service === "lambda" ? 1 : undefined
|
|
18794
18813
|
}) : getEnvVariable("REMOTION_SKIP_AWS_CREDENTIALS_CHECK") ? new Client({
|
|
18795
18814
|
region,
|
|
18796
|
-
requestHandler:
|
|
18815
|
+
requestHandler: finalRequestHandler,
|
|
18797
18816
|
maxAttempts: service === "lambda" ? 1 : undefined
|
|
18798
18817
|
}) : new Client({
|
|
18799
18818
|
region,
|
|
18800
18819
|
credentials: getCredentials(),
|
|
18801
|
-
requestHandler:
|
|
18820
|
+
requestHandler: finalRequestHandler,
|
|
18802
18821
|
maxAttempts: service === "lambda" ? 1 : undefined
|
|
18803
18822
|
});
|
|
18804
18823
|
if (getEnvVariable("REMOTION_DISABLE_AWS_CLIENT_CACHE")) {
|
|
@@ -18810,44 +18829,49 @@ var getServiceClient = ({
|
|
|
18810
18829
|
};
|
|
18811
18830
|
|
|
18812
18831
|
// src/aws-clients.ts
|
|
18813
|
-
var getCloudWatchLogsClient = (region) => {
|
|
18832
|
+
var getCloudWatchLogsClient = (region, requestHandler) => {
|
|
18814
18833
|
return getServiceClient({
|
|
18815
18834
|
region,
|
|
18816
18835
|
service: "cloudwatch",
|
|
18817
18836
|
customCredentials: null,
|
|
18818
|
-
forcePathStyle: false
|
|
18837
|
+
forcePathStyle: false,
|
|
18838
|
+
requestHandler
|
|
18819
18839
|
});
|
|
18820
18840
|
};
|
|
18821
|
-
var getLambdaClient = (region, _timeoutInTest) => {
|
|
18841
|
+
var getLambdaClient = (region, _timeoutInTest, requestHandler) => {
|
|
18822
18842
|
return getServiceClient({
|
|
18823
18843
|
region,
|
|
18824
18844
|
service: "lambda",
|
|
18825
18845
|
customCredentials: null,
|
|
18826
|
-
forcePathStyle: false
|
|
18846
|
+
forcePathStyle: false,
|
|
18847
|
+
requestHandler
|
|
18827
18848
|
});
|
|
18828
18849
|
};
|
|
18829
|
-
var getIamClient = (region) => {
|
|
18850
|
+
var getIamClient = (region, requestHandler) => {
|
|
18830
18851
|
return getServiceClient({
|
|
18831
18852
|
region,
|
|
18832
18853
|
service: "iam",
|
|
18833
18854
|
customCredentials: null,
|
|
18834
|
-
forcePathStyle: false
|
|
18855
|
+
forcePathStyle: false,
|
|
18856
|
+
requestHandler
|
|
18835
18857
|
});
|
|
18836
18858
|
};
|
|
18837
|
-
var getServiceQuotasClient = (region) => {
|
|
18859
|
+
var getServiceQuotasClient = (region, requestHandler) => {
|
|
18838
18860
|
return getServiceClient({
|
|
18839
18861
|
region,
|
|
18840
18862
|
service: "servicequotas",
|
|
18841
18863
|
customCredentials: null,
|
|
18842
|
-
forcePathStyle: false
|
|
18864
|
+
forcePathStyle: false,
|
|
18865
|
+
requestHandler
|
|
18843
18866
|
});
|
|
18844
18867
|
};
|
|
18845
|
-
var getStsClient = (region) => {
|
|
18868
|
+
var getStsClient = (region, requestHandler) => {
|
|
18846
18869
|
return getServiceClient({
|
|
18847
18870
|
region,
|
|
18848
18871
|
service: "sts",
|
|
18849
18872
|
customCredentials: null,
|
|
18850
|
-
forcePathStyle: false
|
|
18873
|
+
forcePathStyle: false,
|
|
18874
|
+
requestHandler
|
|
18851
18875
|
});
|
|
18852
18876
|
};
|
|
18853
18877
|
|
|
@@ -18861,23 +18885,32 @@ import { GetBucketLocationCommand } from "@aws-sdk/client-s3";
|
|
|
18861
18885
|
var getS3Client = ({
|
|
18862
18886
|
region,
|
|
18863
18887
|
customCredentials,
|
|
18864
|
-
forcePathStyle
|
|
18888
|
+
forcePathStyle,
|
|
18889
|
+
requestHandler
|
|
18865
18890
|
}) => {
|
|
18866
18891
|
return getServiceClient({
|
|
18867
18892
|
region: customCredentials?.region ?? region,
|
|
18868
18893
|
service: "s3",
|
|
18869
18894
|
customCredentials,
|
|
18870
|
-
forcePathStyle
|
|
18895
|
+
forcePathStyle,
|
|
18896
|
+
requestHandler
|
|
18871
18897
|
});
|
|
18872
18898
|
};
|
|
18873
18899
|
|
|
18874
18900
|
// src/bucket-exists.ts
|
|
18875
|
-
var bucketExistsInRegionImplementation = async ({
|
|
18901
|
+
var bucketExistsInRegionImplementation = async ({
|
|
18902
|
+
bucketName,
|
|
18903
|
+
region,
|
|
18904
|
+
expectedBucketOwner,
|
|
18905
|
+
forcePathStyle,
|
|
18906
|
+
requestHandler
|
|
18907
|
+
}) => {
|
|
18876
18908
|
try {
|
|
18877
18909
|
const bucket = await getS3Client({
|
|
18878
18910
|
region,
|
|
18879
18911
|
customCredentials: null,
|
|
18880
|
-
forcePathStyle
|
|
18912
|
+
forcePathStyle,
|
|
18913
|
+
requestHandler
|
|
18881
18914
|
}).send(new GetBucketLocationCommand({
|
|
18882
18915
|
Bucket: bucketName,
|
|
18883
18916
|
ExpectedBucketOwner: expectedBucketOwner ?? undefined
|
|
@@ -18903,7 +18936,7 @@ var callFunctionAsyncImplementation = async ({
|
|
|
18903
18936
|
if (stringifiedPayload.length > 256 * 1024) {
|
|
18904
18937
|
throw new Error(`Payload is too big: ${stringifiedPayload.length} bytes. Maximum size is 256 KB. This should not happen, please report this to the Remotion team. Payload: ${stringifiedPayload}`);
|
|
18905
18938
|
}
|
|
18906
|
-
const result = await getLambdaClient(region, timeoutInTest).send(new InvokeCommand({
|
|
18939
|
+
const result = await getLambdaClient(region, timeoutInTest, null).send(new InvokeCommand({
|
|
18907
18940
|
FunctionName: functionName,
|
|
18908
18941
|
Payload: stringifiedPayload,
|
|
18909
18942
|
InvocationType: "Event"
|
|
@@ -18934,7 +18967,7 @@ var invokeStreamOrTimeout = async ({
|
|
|
18934
18967
|
type,
|
|
18935
18968
|
payload
|
|
18936
18969
|
}) => {
|
|
18937
|
-
const resProm = getLambdaClient(region, timeoutInTest).send(new InvokeWithResponseStreamCommand({
|
|
18970
|
+
const resProm = getLambdaClient(region, timeoutInTest, null).send(new InvokeWithResponseStreamCommand({
|
|
18938
18971
|
FunctionName: functionName,
|
|
18939
18972
|
Payload: JSON.stringify({ type, ...payload })
|
|
18940
18973
|
}));
|
|
@@ -19039,7 +19072,7 @@ var callLambdaSyncWithoutRetry = async ({
|
|
|
19039
19072
|
timeoutInTest
|
|
19040
19073
|
}) => {
|
|
19041
19074
|
const Payload = JSON.stringify(payload);
|
|
19042
|
-
const res = await getLambdaClient(region, timeoutInTest).send(new InvokeCommand2({
|
|
19075
|
+
const res = await getLambdaClient(region, timeoutInTest, null).send(new InvokeCommand2({
|
|
19043
19076
|
FunctionName: functionName,
|
|
19044
19077
|
Payload,
|
|
19045
19078
|
InvocationType: "RequestResponse"
|
|
@@ -19095,12 +19128,22 @@ import {
|
|
|
19095
19128
|
DeletePublicAccessBlockCommand,
|
|
19096
19129
|
PutBucketAclCommand
|
|
19097
19130
|
} from "@aws-sdk/client-s3";
|
|
19098
|
-
var createBucket = async ({ region, bucketName, forcePathStyle }) => {
|
|
19099
|
-
await getS3Client({
|
|
19131
|
+
var createBucket = async ({ region, bucketName, forcePathStyle, requestHandler }) => {
|
|
19132
|
+
await getS3Client({
|
|
19133
|
+
region,
|
|
19134
|
+
customCredentials: null,
|
|
19135
|
+
forcePathStyle,
|
|
19136
|
+
requestHandler
|
|
19137
|
+
}).send(new CreateBucketCommand({
|
|
19100
19138
|
Bucket: bucketName
|
|
19101
19139
|
}));
|
|
19102
19140
|
try {
|
|
19103
|
-
await getS3Client({
|
|
19141
|
+
await getS3Client({
|
|
19142
|
+
region,
|
|
19143
|
+
customCredentials: null,
|
|
19144
|
+
forcePathStyle,
|
|
19145
|
+
requestHandler
|
|
19146
|
+
}).send(new DeleteBucketOwnershipControlsCommand({
|
|
19104
19147
|
Bucket: bucketName
|
|
19105
19148
|
}));
|
|
19106
19149
|
} catch (err) {
|
|
@@ -19110,7 +19153,12 @@ var createBucket = async ({ region, bucketName, forcePathStyle }) => {
|
|
|
19110
19153
|
throw err;
|
|
19111
19154
|
}
|
|
19112
19155
|
try {
|
|
19113
|
-
await getS3Client({
|
|
19156
|
+
await getS3Client({
|
|
19157
|
+
region,
|
|
19158
|
+
customCredentials: null,
|
|
19159
|
+
forcePathStyle,
|
|
19160
|
+
requestHandler
|
|
19161
|
+
}).send(new DeletePublicAccessBlockCommand({
|
|
19114
19162
|
Bucket: bucketName
|
|
19115
19163
|
}));
|
|
19116
19164
|
} catch (err) {
|
|
@@ -19120,7 +19168,12 @@ var createBucket = async ({ region, bucketName, forcePathStyle }) => {
|
|
|
19120
19168
|
throw err;
|
|
19121
19169
|
}
|
|
19122
19170
|
try {
|
|
19123
|
-
await getS3Client({
|
|
19171
|
+
await getS3Client({
|
|
19172
|
+
region,
|
|
19173
|
+
customCredentials: null,
|
|
19174
|
+
forcePathStyle,
|
|
19175
|
+
requestHandler
|
|
19176
|
+
}).send(new PutBucketAclCommand({
|
|
19124
19177
|
Bucket: bucketName,
|
|
19125
19178
|
ACL: "public-read"
|
|
19126
19179
|
}));
|
|
@@ -19139,9 +19192,15 @@ var lambdaDeleteFileImplementation = async ({
|
|
|
19139
19192
|
key,
|
|
19140
19193
|
region,
|
|
19141
19194
|
customCredentials,
|
|
19142
|
-
forcePathStyle
|
|
19195
|
+
forcePathStyle,
|
|
19196
|
+
requestHandler
|
|
19143
19197
|
}) => {
|
|
19144
|
-
await getS3Client({
|
|
19198
|
+
await getS3Client({
|
|
19199
|
+
region,
|
|
19200
|
+
customCredentials,
|
|
19201
|
+
forcePathStyle,
|
|
19202
|
+
requestHandler
|
|
19203
|
+
}).send(new DeleteObjectCommand({
|
|
19145
19204
|
Bucket: bucketName,
|
|
19146
19205
|
Key: key
|
|
19147
19206
|
}));
|
|
@@ -19151,9 +19210,10 @@ var lambdaDeleteFileImplementation = async ({
|
|
|
19151
19210
|
import { DeleteFunctionCommand } from "@aws-sdk/client-lambda";
|
|
19152
19211
|
var deleteFunction = async ({
|
|
19153
19212
|
region,
|
|
19154
|
-
functionName
|
|
19213
|
+
functionName,
|
|
19214
|
+
requestHandler
|
|
19155
19215
|
}) => {
|
|
19156
|
-
await getLambdaClient(region).send(new DeleteFunctionCommand({
|
|
19216
|
+
await getLambdaClient(region, undefined, requestHandler ?? null).send(new DeleteFunctionCommand({
|
|
19157
19217
|
FunctionName: functionName
|
|
19158
19218
|
}));
|
|
19159
19219
|
};
|
|
@@ -20088,7 +20148,7 @@ var estimatePrice = ({
|
|
|
20088
20148
|
import { GetCallerIdentityCommand } from "@aws-sdk/client-sts";
|
|
20089
20149
|
var getAccountIdImplementation = async (options) => {
|
|
20090
20150
|
validateAwsRegion(options.region);
|
|
20091
|
-
const callerIdentity = await getStsClient(options.region).send(new GetCallerIdentityCommand({}));
|
|
20151
|
+
const callerIdentity = await getStsClient(options.region, null).send(new GetCallerIdentityCommand({}));
|
|
20092
20152
|
if (!callerIdentity.Account) {
|
|
20093
20153
|
throw new Error("Cannot get account ID");
|
|
20094
20154
|
}
|
|
@@ -20163,12 +20223,14 @@ var parseBucketName = (name) => {
|
|
|
20163
20223
|
var getRemotionBuckets = async ({
|
|
20164
20224
|
region,
|
|
20165
20225
|
forceBucketName,
|
|
20166
|
-
forcePathStyle
|
|
20226
|
+
forcePathStyle,
|
|
20227
|
+
requestHandler
|
|
20167
20228
|
}) => {
|
|
20168
20229
|
const { Buckets } = await getS3Client({
|
|
20169
20230
|
region,
|
|
20170
20231
|
customCredentials: null,
|
|
20171
|
-
forcePathStyle
|
|
20232
|
+
forcePathStyle,
|
|
20233
|
+
requestHandler
|
|
20172
20234
|
}).send(new ListBucketsCommand({}));
|
|
20173
20235
|
if (!Buckets) {
|
|
20174
20236
|
return [];
|
|
@@ -20188,7 +20250,8 @@ var getRemotionBuckets = async ({
|
|
|
20188
20250
|
const result = await getS3Client({
|
|
20189
20251
|
region,
|
|
20190
20252
|
customCredentials: null,
|
|
20191
|
-
forcePathStyle
|
|
20253
|
+
forcePathStyle,
|
|
20254
|
+
requestHandler
|
|
20192
20255
|
}).send(new GetBucketLocationCommand2({
|
|
20193
20256
|
Bucket: bucket.Name
|
|
20194
20257
|
}));
|
|
@@ -20219,7 +20282,8 @@ import { ListFunctionsCommand } from "@aws-sdk/client-lambda";
|
|
|
20219
20282
|
var getFunctionVersion = async ({
|
|
20220
20283
|
functionName,
|
|
20221
20284
|
region,
|
|
20222
|
-
logLevel
|
|
20285
|
+
logLevel,
|
|
20286
|
+
requestHandler
|
|
20223
20287
|
}) => {
|
|
20224
20288
|
try {
|
|
20225
20289
|
const result = await awsImplementation.callFunctionSync({
|
|
@@ -20230,7 +20294,8 @@ var getFunctionVersion = async ({
|
|
|
20230
20294
|
},
|
|
20231
20295
|
region,
|
|
20232
20296
|
type: ServerlessRoutines.info,
|
|
20233
|
-
timeoutInTest: 120000
|
|
20297
|
+
timeoutInTest: 120000,
|
|
20298
|
+
requestHandler
|
|
20234
20299
|
});
|
|
20235
20300
|
return result.version;
|
|
20236
20301
|
} catch (err) {
|
|
@@ -20248,10 +20313,11 @@ var getFunctionVersion = async ({
|
|
|
20248
20313
|
var getAllFunctions = async ({
|
|
20249
20314
|
existing,
|
|
20250
20315
|
nextMarker,
|
|
20251
|
-
region
|
|
20316
|
+
region,
|
|
20317
|
+
requestHandler
|
|
20252
20318
|
}) => {
|
|
20253
20319
|
const allLambdas = [...existing];
|
|
20254
|
-
const lambdas = await getLambdaClient(region).send(new ListFunctionsCommand({
|
|
20320
|
+
const lambdas = await getLambdaClient(region, undefined, requestHandler ?? null).send(new ListFunctionsCommand({
|
|
20255
20321
|
Marker: nextMarker ?? undefined
|
|
20256
20322
|
}));
|
|
20257
20323
|
if (!lambdas.Functions) {
|
|
@@ -20264,7 +20330,8 @@ var getAllFunctions = async ({
|
|
|
20264
20330
|
return getAllFunctions({
|
|
20265
20331
|
existing: allLambdas,
|
|
20266
20332
|
nextMarker: lambdas.NextMarker,
|
|
20267
|
-
region
|
|
20333
|
+
region,
|
|
20334
|
+
requestHandler
|
|
20268
20335
|
});
|
|
20269
20336
|
}
|
|
20270
20337
|
return allLambdas;
|
|
@@ -20273,7 +20340,8 @@ var getFunctions = async (params) => {
|
|
|
20273
20340
|
const lambdas = await getAllFunctions({
|
|
20274
20341
|
existing: [],
|
|
20275
20342
|
nextMarker: null,
|
|
20276
|
-
region: params.region
|
|
20343
|
+
region: params.region,
|
|
20344
|
+
requestHandler: params.requestHandler
|
|
20277
20345
|
});
|
|
20278
20346
|
const remotionLambdas = lambdas.filter((f) => {
|
|
20279
20347
|
return f.FunctionName?.startsWith(RENDER_FN_PREFIX);
|
|
@@ -20283,7 +20351,8 @@ var getFunctions = async (params) => {
|
|
|
20283
20351
|
const version = await getFunctionVersion({
|
|
20284
20352
|
functionName: fn.FunctionName,
|
|
20285
20353
|
region: params.region,
|
|
20286
|
-
logLevel: params.logLevel ?? "info"
|
|
20354
|
+
logLevel: params.logLevel ?? "info",
|
|
20355
|
+
requestHandler: params.requestHandler
|
|
20287
20356
|
});
|
|
20288
20357
|
return version;
|
|
20289
20358
|
} catch {
|
|
@@ -20336,12 +20405,14 @@ var lambdaHeadFileImplementation = async ({
|
|
|
20336
20405
|
key,
|
|
20337
20406
|
region,
|
|
20338
20407
|
customCredentials,
|
|
20339
|
-
forcePathStyle
|
|
20408
|
+
forcePathStyle,
|
|
20409
|
+
requestHandler
|
|
20340
20410
|
}) => {
|
|
20341
20411
|
const head = await getS3Client({
|
|
20342
20412
|
region,
|
|
20343
20413
|
customCredentials,
|
|
20344
|
-
forcePathStyle
|
|
20414
|
+
forcePathStyle,
|
|
20415
|
+
requestHandler
|
|
20345
20416
|
}).send(new HeadObjectCommand({
|
|
20346
20417
|
Bucket: bucketName,
|
|
20347
20418
|
Key: key
|
|
@@ -20373,7 +20444,7 @@ var isFlakyError = (err) => {
|
|
|
20373
20444
|
if (message.includes("Compositor exited") && !message.includes("SIGSEGV")) {
|
|
20374
20445
|
return true;
|
|
20375
20446
|
}
|
|
20376
|
-
if (message.includes("Timed out while setting up the headless browser")) {
|
|
20447
|
+
if (message.includes("Timed out") && message.includes("while setting up the headless browser")) {
|
|
20377
20448
|
return true;
|
|
20378
20449
|
}
|
|
20379
20450
|
if (message.includes("while trying to connect to the browser")) {
|
|
@@ -20466,7 +20537,8 @@ var createLCRules = async ({
|
|
|
20466
20537
|
bucketName,
|
|
20467
20538
|
region,
|
|
20468
20539
|
customCredentials,
|
|
20469
|
-
forcePathStyle
|
|
20540
|
+
forcePathStyle,
|
|
20541
|
+
requestHandler
|
|
20470
20542
|
}) => {
|
|
20471
20543
|
const lcRules = getLifeCycleRules();
|
|
20472
20544
|
const createCommandInput = createLifeCycleInput({
|
|
@@ -20475,7 +20547,12 @@ var createLCRules = async ({
|
|
|
20475
20547
|
});
|
|
20476
20548
|
const createCommand = new PutBucketLifecycleConfigurationCommand(createCommandInput);
|
|
20477
20549
|
try {
|
|
20478
|
-
await getS3Client({
|
|
20550
|
+
await getS3Client({
|
|
20551
|
+
region,
|
|
20552
|
+
customCredentials,
|
|
20553
|
+
forcePathStyle,
|
|
20554
|
+
requestHandler
|
|
20555
|
+
}).send(createCommand);
|
|
20479
20556
|
} catch (err) {
|
|
20480
20557
|
if (err.stack?.includes("AccessDenied")) {
|
|
20481
20558
|
throw new Error(`You don't have the required permissions to create lifecycle rules on the bucket "${bucketName}", but the "enableFolderExpiry" was set to true. Ensure that your user has the "s3:PutLifecycleConfiguration" permission.`);
|
|
@@ -20486,13 +20563,19 @@ var deleteLCRules = async ({
|
|
|
20486
20563
|
bucketName,
|
|
20487
20564
|
region,
|
|
20488
20565
|
customCredentials,
|
|
20489
|
-
forcePathStyle
|
|
20566
|
+
forcePathStyle,
|
|
20567
|
+
requestHandler
|
|
20490
20568
|
}) => {
|
|
20491
20569
|
const deleteCommandInput = deleteLifeCycleInput({
|
|
20492
20570
|
bucketName
|
|
20493
20571
|
});
|
|
20494
20572
|
try {
|
|
20495
|
-
await getS3Client({
|
|
20573
|
+
await getS3Client({
|
|
20574
|
+
region,
|
|
20575
|
+
customCredentials,
|
|
20576
|
+
forcePathStyle,
|
|
20577
|
+
requestHandler
|
|
20578
|
+
}).send(new DeleteBucketLifecycleCommand(deleteCommandInput));
|
|
20496
20579
|
} catch (err) {
|
|
20497
20580
|
if (err.stack?.includes("AccessDenied")) {
|
|
20498
20581
|
throw new Error(`You don't have the required permissions to delete lifecycle rules on the bucket "${bucketName}", but the "enableFolderExpiry" option was set to "false". Ensure that your user has the "s3:PutLifecycleConfiguration" permission. Set "enableFolderExpiry" to "null" to not overwrite any existing lifecycle rules.`);
|
|
@@ -20504,7 +20587,8 @@ var applyLifeCyleOperation = async ({
|
|
|
20504
20587
|
bucketName,
|
|
20505
20588
|
region,
|
|
20506
20589
|
customCredentials,
|
|
20507
|
-
forcePathStyle
|
|
20590
|
+
forcePathStyle,
|
|
20591
|
+
requestHandler
|
|
20508
20592
|
}) => {
|
|
20509
20593
|
if (enableFolderExpiry === null) {
|
|
20510
20594
|
return;
|
|
@@ -20514,14 +20598,16 @@ var applyLifeCyleOperation = async ({
|
|
|
20514
20598
|
bucketName,
|
|
20515
20599
|
region,
|
|
20516
20600
|
customCredentials,
|
|
20517
|
-
forcePathStyle
|
|
20601
|
+
forcePathStyle,
|
|
20602
|
+
requestHandler
|
|
20518
20603
|
});
|
|
20519
20604
|
} else {
|
|
20520
20605
|
await deleteLCRules({
|
|
20521
20606
|
bucketName,
|
|
20522
20607
|
region,
|
|
20523
20608
|
customCredentials,
|
|
20524
|
-
forcePathStyle
|
|
20609
|
+
forcePathStyle,
|
|
20610
|
+
requestHandler
|
|
20525
20611
|
});
|
|
20526
20612
|
}
|
|
20527
20613
|
};
|
|
@@ -20534,13 +20620,15 @@ var lambdaLsImplementation = async ({
|
|
|
20534
20620
|
region,
|
|
20535
20621
|
expectedBucketOwner,
|
|
20536
20622
|
continuationToken,
|
|
20537
|
-
forcePathStyle
|
|
20623
|
+
forcePathStyle,
|
|
20624
|
+
requestHandler
|
|
20538
20625
|
}) => {
|
|
20539
20626
|
try {
|
|
20540
20627
|
const list = await getS3Client({
|
|
20541
20628
|
region,
|
|
20542
20629
|
customCredentials: null,
|
|
20543
|
-
forcePathStyle
|
|
20630
|
+
forcePathStyle,
|
|
20631
|
+
requestHandler
|
|
20544
20632
|
}).send(new ListObjectsV2Command({
|
|
20545
20633
|
Bucket: bucketName,
|
|
20546
20634
|
Prefix: prefix,
|
|
@@ -20563,7 +20651,8 @@ var lambdaLsImplementation = async ({
|
|
|
20563
20651
|
expectedBucketOwner,
|
|
20564
20652
|
region,
|
|
20565
20653
|
continuationToken: list.NextContinuationToken,
|
|
20566
|
-
forcePathStyle
|
|
20654
|
+
forcePathStyle,
|
|
20655
|
+
requestHandler
|
|
20567
20656
|
})
|
|
20568
20657
|
];
|
|
20569
20658
|
}
|
|
@@ -20583,7 +20672,8 @@ var lambdaLsImplementation = async ({
|
|
|
20583
20672
|
await getS3Client({
|
|
20584
20673
|
region,
|
|
20585
20674
|
customCredentials: null,
|
|
20586
|
-
forcePathStyle
|
|
20675
|
+
forcePathStyle,
|
|
20676
|
+
requestHandler
|
|
20587
20677
|
}).send(new ListObjectsV2Command({
|
|
20588
20678
|
Bucket: bucketName,
|
|
20589
20679
|
Prefix: prefix
|
|
@@ -20623,12 +20713,14 @@ var lambdaReadFileImplementation = async ({
|
|
|
20623
20713
|
key,
|
|
20624
20714
|
region,
|
|
20625
20715
|
expectedBucketOwner,
|
|
20626
|
-
forcePathStyle
|
|
20716
|
+
forcePathStyle,
|
|
20717
|
+
requestHandler
|
|
20627
20718
|
}) => {
|
|
20628
20719
|
const { Body } = await getS3Client({
|
|
20629
20720
|
region,
|
|
20630
20721
|
customCredentials: null,
|
|
20631
|
-
forcePathStyle
|
|
20722
|
+
forcePathStyle,
|
|
20723
|
+
requestHandler
|
|
20632
20724
|
}).send(new GetObjectCommand({
|
|
20633
20725
|
Bucket: bucketName,
|
|
20634
20726
|
Key: key,
|
|
@@ -20699,12 +20791,14 @@ var tryLambdaWriteFile = async ({
|
|
|
20699
20791
|
downloadBehavior,
|
|
20700
20792
|
customCredentials,
|
|
20701
20793
|
forcePathStyle,
|
|
20702
|
-
storageClass
|
|
20794
|
+
storageClass,
|
|
20795
|
+
requestHandler
|
|
20703
20796
|
}) => {
|
|
20704
20797
|
const client = getS3Client({
|
|
20705
20798
|
region,
|
|
20706
20799
|
customCredentials,
|
|
20707
|
-
forcePathStyle
|
|
20800
|
+
forcePathStyle,
|
|
20801
|
+
requestHandler
|
|
20708
20802
|
});
|
|
20709
20803
|
const params = {
|
|
20710
20804
|
Bucket: bucketName,
|
|
@@ -20869,7 +20963,8 @@ var cleanItems = ({
|
|
|
20869
20963
|
region,
|
|
20870
20964
|
list,
|
|
20871
20965
|
providerSpecifics,
|
|
20872
|
-
forcePathStyle
|
|
20966
|
+
forcePathStyle,
|
|
20967
|
+
requestHandler
|
|
20873
20968
|
}) => {
|
|
20874
20969
|
return Promise.all(list.map((object) => limit(async () => {
|
|
20875
20970
|
onBeforeItemDeleted({
|
|
@@ -20881,7 +20976,8 @@ var cleanItems = ({
|
|
|
20881
20976
|
key: object,
|
|
20882
20977
|
region,
|
|
20883
20978
|
customCredentials: null,
|
|
20884
|
-
forcePathStyle
|
|
20979
|
+
forcePathStyle,
|
|
20980
|
+
requestHandler
|
|
20885
20981
|
});
|
|
20886
20982
|
onAfterItemDeleted({
|
|
20887
20983
|
bucketName: bucket,
|
|
@@ -20901,7 +20997,8 @@ var internalDeleteRender = async (input) => {
|
|
|
20901
20997
|
region: input.region,
|
|
20902
20998
|
renderId: input.renderId,
|
|
20903
20999
|
providerSpecifics: input.providerSpecifics,
|
|
20904
|
-
forcePathStyle: input.forcePathStyle
|
|
21000
|
+
forcePathStyle: input.forcePathStyle,
|
|
21001
|
+
requestHandler: input.requestHandler
|
|
20905
21002
|
});
|
|
20906
21003
|
if (progress.renderMetadata === null) {
|
|
20907
21004
|
return { freedBytes: 0 };
|
|
@@ -20917,14 +21014,16 @@ var internalDeleteRender = async (input) => {
|
|
|
20917
21014
|
customCredentials,
|
|
20918
21015
|
key,
|
|
20919
21016
|
region: input.region,
|
|
20920
|
-
forcePathStyle: input.forcePathStyle
|
|
21017
|
+
forcePathStyle: input.forcePathStyle,
|
|
21018
|
+
requestHandler: input.requestHandler
|
|
20921
21019
|
});
|
|
20922
21020
|
let files = await input.providerSpecifics.listObjects({
|
|
20923
21021
|
bucketName: input.bucketName,
|
|
20924
21022
|
prefix: rendersPrefix(input.renderId),
|
|
20925
21023
|
region: input.region,
|
|
20926
21024
|
expectedBucketOwner,
|
|
20927
|
-
forcePathStyle: input.forcePathStyle
|
|
21025
|
+
forcePathStyle: input.forcePathStyle,
|
|
21026
|
+
requestHandler: input.requestHandler
|
|
20928
21027
|
});
|
|
20929
21028
|
let totalSize = 0;
|
|
20930
21029
|
while (files.length > 0) {
|
|
@@ -20942,14 +21041,16 @@ var internalDeleteRender = async (input) => {
|
|
|
20942
21041
|
},
|
|
20943
21042
|
region: input.region,
|
|
20944
21043
|
providerSpecifics: input.providerSpecifics,
|
|
20945
|
-
forcePathStyle: input.forcePathStyle
|
|
21044
|
+
forcePathStyle: input.forcePathStyle,
|
|
21045
|
+
requestHandler: input.requestHandler
|
|
20946
21046
|
});
|
|
20947
21047
|
files = await input.providerSpecifics.listObjects({
|
|
20948
21048
|
bucketName: input.bucketName,
|
|
20949
21049
|
prefix: rendersPrefix(input.renderId),
|
|
20950
21050
|
region: input.region,
|
|
20951
21051
|
expectedBucketOwner,
|
|
20952
|
-
forcePathStyle: input.forcePathStyle
|
|
21052
|
+
forcePathStyle: input.forcePathStyle,
|
|
21053
|
+
requestHandler: input.requestHandler
|
|
20953
21054
|
});
|
|
20954
21055
|
}
|
|
20955
21056
|
return {
|
|
@@ -20960,7 +21061,7 @@ var deleteRender = (input) => {
|
|
|
20960
21061
|
return internalDeleteRender({
|
|
20961
21062
|
...input,
|
|
20962
21063
|
providerSpecifics: awsImplementation,
|
|
20963
|
-
forcePathStyle: false
|
|
21064
|
+
forcePathStyle: input.forcePathStyle ?? false
|
|
20964
21065
|
});
|
|
20965
21066
|
};
|
|
20966
21067
|
|
|
@@ -20978,16 +21079,19 @@ var internalGetSites = async ({
|
|
|
20978
21079
|
region,
|
|
20979
21080
|
forceBucketName,
|
|
20980
21081
|
providerSpecifics,
|
|
20981
|
-
forcePathStyle
|
|
21082
|
+
forcePathStyle,
|
|
21083
|
+
requestHandler
|
|
20982
21084
|
}) => {
|
|
20983
21085
|
const remotionBuckets = forceBucketName ? await providerSpecifics.getBuckets({
|
|
20984
21086
|
region,
|
|
20985
21087
|
forceBucketName,
|
|
20986
|
-
forcePathStyle
|
|
21088
|
+
forcePathStyle,
|
|
21089
|
+
requestHandler
|
|
20987
21090
|
}) : await providerSpecifics.getBuckets({
|
|
20988
21091
|
region,
|
|
20989
21092
|
forceBucketName: null,
|
|
20990
|
-
forcePathStyle
|
|
21093
|
+
forcePathStyle,
|
|
21094
|
+
requestHandler
|
|
20991
21095
|
});
|
|
20992
21096
|
const accountId = await providerSpecifics.getAccountId({ region });
|
|
20993
21097
|
const sites = {};
|
|
@@ -20997,7 +21101,8 @@ var internalGetSites = async ({
|
|
|
20997
21101
|
prefix: getSitesKey(""),
|
|
20998
21102
|
region,
|
|
20999
21103
|
expectedBucketOwner: accountId,
|
|
21000
|
-
forcePathStyle
|
|
21104
|
+
forcePathStyle,
|
|
21105
|
+
requestHandler
|
|
21001
21106
|
});
|
|
21002
21107
|
for (const file of ls) {
|
|
21003
21108
|
const siteKeyMatch = file.Key?.match(/sites\/([0-9a-zA-Z-!_.*'()]+)\/(.*)$/);
|
|
@@ -21037,13 +21142,15 @@ var internalGetSites = async ({
|
|
|
21037
21142
|
var getSites = ({
|
|
21038
21143
|
region,
|
|
21039
21144
|
forceBucketName,
|
|
21040
|
-
forcePathStyle
|
|
21145
|
+
forcePathStyle,
|
|
21146
|
+
requestHandler
|
|
21041
21147
|
}) => {
|
|
21042
21148
|
return internalGetSites({
|
|
21043
21149
|
region,
|
|
21044
21150
|
forceBucketName: forceBucketName ?? null,
|
|
21045
21151
|
forcePathStyle: forcePathStyle ?? false,
|
|
21046
|
-
providerSpecifics: awsImplementation
|
|
21152
|
+
providerSpecifics: awsImplementation,
|
|
21153
|
+
requestHandler: requestHandler ?? null
|
|
21047
21154
|
});
|
|
21048
21155
|
};
|
|
21049
21156
|
|
|
@@ -21119,7 +21226,8 @@ var makeLambdaRenderMediaPayload = async ({
|
|
|
21119
21226
|
metadata,
|
|
21120
21227
|
apiKey,
|
|
21121
21228
|
offthreadVideoThreads,
|
|
21122
|
-
storageClass
|
|
21229
|
+
storageClass,
|
|
21230
|
+
requestHandler
|
|
21123
21231
|
}) => {
|
|
21124
21232
|
const actualCodec = validateLambdaCodec(codec);
|
|
21125
21233
|
validateServeUrl(serveUrl);
|
|
@@ -21145,7 +21253,8 @@ var makeLambdaRenderMediaPayload = async ({
|
|
|
21145
21253
|
propsType: "input-props",
|
|
21146
21254
|
providerSpecifics: awsImplementation,
|
|
21147
21255
|
forcePathStyle: forcePathStyle ?? false,
|
|
21148
|
-
skipPutAcl: privacy === "no-acl"
|
|
21256
|
+
skipPutAcl: privacy === "no-acl",
|
|
21257
|
+
requestHandler: requestHandler ?? null
|
|
21149
21258
|
});
|
|
21150
21259
|
return {
|
|
21151
21260
|
rendererFunctionName,
|
|
@@ -21238,7 +21347,8 @@ var makeLambdaRenderStillPayload = async ({
|
|
|
21238
21347
|
deleteAfter,
|
|
21239
21348
|
forcePathStyle,
|
|
21240
21349
|
apiKey,
|
|
21241
|
-
storageClass
|
|
21350
|
+
storageClass,
|
|
21351
|
+
requestHandler
|
|
21242
21352
|
}) => {
|
|
21243
21353
|
const stringifiedInputProps = serializeOrThrow(inputProps, "input-props");
|
|
21244
21354
|
const serializedInputProps = await compressInputProps({
|
|
@@ -21256,7 +21366,8 @@ var makeLambdaRenderStillPayload = async ({
|
|
|
21256
21366
|
propsType: "input-props",
|
|
21257
21367
|
providerSpecifics: awsImplementation,
|
|
21258
21368
|
forcePathStyle,
|
|
21259
|
-
skipPutAcl: privacy === "no-acl"
|
|
21369
|
+
skipPutAcl: privacy === "no-acl",
|
|
21370
|
+
requestHandler
|
|
21260
21371
|
});
|
|
21261
21372
|
return {
|
|
21262
21373
|
composition,
|
|
@@ -21299,7 +21410,8 @@ var internalRenderMediaOnLambdaRaw = async (input) => {
|
|
|
21299
21410
|
type: ServerlessRoutines.start,
|
|
21300
21411
|
payload: await makeLambdaRenderMediaPayload(input),
|
|
21301
21412
|
region,
|
|
21302
|
-
timeoutInTest: 120000
|
|
21413
|
+
timeoutInTest: 120000,
|
|
21414
|
+
requestHandler: input.requestHandler
|
|
21303
21415
|
});
|
|
21304
21416
|
return {
|
|
21305
21417
|
renderId: res.renderId,
|
|
@@ -21389,7 +21501,8 @@ var renderMediaOnLambdaOptionalToRequired = (options) => {
|
|
|
21389
21501
|
indent: false,
|
|
21390
21502
|
metadata: options.metadata ?? null,
|
|
21391
21503
|
apiKey: options.apiKey ?? null,
|
|
21392
|
-
storageClass: options.storageClass ?? null
|
|
21504
|
+
storageClass: options.storageClass ?? null,
|
|
21505
|
+
requestHandler: options.requestHandler ?? null
|
|
21393
21506
|
};
|
|
21394
21507
|
};
|
|
21395
21508
|
var wrapped = wrapWithErrorHandling(internalRenderMediaOnLambdaRaw);
|
|
@@ -21437,7 +21550,8 @@ var innerRenderStillOnLambda = async (input) => {
|
|
|
21437
21550
|
}
|
|
21438
21551
|
},
|
|
21439
21552
|
timeoutInTest: 120000,
|
|
21440
|
-
retriesRemaining: input.maxRetries
|
|
21553
|
+
retriesRemaining: input.maxRetries,
|
|
21554
|
+
requestHandler: input.requestHandler
|
|
21441
21555
|
}).then(() => {
|
|
21442
21556
|
reject(new Error("Expected response to be streamed"));
|
|
21443
21557
|
}).catch((err) => {
|
|
@@ -21499,7 +21613,8 @@ var renderStillOnLambda = (input) => {
|
|
|
21499
21613
|
forcePathStyle: input.forcePathStyle ?? false,
|
|
21500
21614
|
apiKey: input.apiKey ?? null,
|
|
21501
21615
|
offthreadVideoThreads: input.offthreadVideoThreads ?? null,
|
|
21502
|
-
storageClass: input.storageClass ?? null
|
|
21616
|
+
storageClass: input.storageClass ?? null,
|
|
21617
|
+
requestHandler: input.requestHandler ?? null
|
|
21503
21618
|
});
|
|
21504
21619
|
};
|
|
21505
21620
|
|
|
@@ -21691,14 +21806,16 @@ var getAwsClient = ({
|
|
|
21691
21806
|
region,
|
|
21692
21807
|
service,
|
|
21693
21808
|
customCredentials,
|
|
21694
|
-
forcePathStyle
|
|
21809
|
+
forcePathStyle,
|
|
21810
|
+
requestHandler
|
|
21695
21811
|
}) => {
|
|
21696
21812
|
return {
|
|
21697
21813
|
client: getServiceClient({
|
|
21698
21814
|
region,
|
|
21699
21815
|
service,
|
|
21700
21816
|
customCredentials: customCredentials ?? null,
|
|
21701
|
-
forcePathStyle: forcePathStyle ?? false
|
|
21817
|
+
forcePathStyle: forcePathStyle ?? false,
|
|
21818
|
+
requestHandler
|
|
21702
21819
|
}),
|
|
21703
21820
|
sdk: {
|
|
21704
21821
|
lambda: LambdaSDK,
|
|
@@ -21723,7 +21840,8 @@ var getCompositionsOnLambda = async ({
|
|
|
21723
21840
|
forceBucketName: bucketName,
|
|
21724
21841
|
dumpBrowserLogs,
|
|
21725
21842
|
offthreadVideoCacheSizeInBytes,
|
|
21726
|
-
forcePathStyle
|
|
21843
|
+
forcePathStyle,
|
|
21844
|
+
requestHandler
|
|
21727
21845
|
}) => {
|
|
21728
21846
|
const stringifiedInputProps = serializeOrThrow(inputProps, "input-props");
|
|
21729
21847
|
const serializedInputProps = await compressInputProps({
|
|
@@ -21741,7 +21859,8 @@ var getCompositionsOnLambda = async ({
|
|
|
21741
21859
|
}),
|
|
21742
21860
|
providerSpecifics: awsImplementation,
|
|
21743
21861
|
forcePathStyle: forcePathStyle ?? false,
|
|
21744
|
-
skipPutAcl: false
|
|
21862
|
+
skipPutAcl: false,
|
|
21863
|
+
requestHandler
|
|
21745
21864
|
});
|
|
21746
21865
|
try {
|
|
21747
21866
|
const res = await awsImplementation.callFunctionSync({
|
|
@@ -21761,7 +21880,8 @@ var getCompositionsOnLambda = async ({
|
|
|
21761
21880
|
forcePathStyle: forcePathStyle ?? false
|
|
21762
21881
|
},
|
|
21763
21882
|
region,
|
|
21764
|
-
timeoutInTest: 120000
|
|
21883
|
+
timeoutInTest: 120000,
|
|
21884
|
+
requestHandler
|
|
21765
21885
|
});
|
|
21766
21886
|
return res.compositions;
|
|
21767
21887
|
} catch (err) {
|
|
@@ -21793,7 +21913,8 @@ var getRenderProgress = async (input) => {
|
|
|
21793
21913
|
providerSpecifics: awsImplementation,
|
|
21794
21914
|
memorySizeInMb: parsed.memorySizeInMb,
|
|
21795
21915
|
timeoutInMilliseconds: parsed.timeoutInSeconds * 1000,
|
|
21796
|
-
functionName: input.functionName
|
|
21916
|
+
functionName: input.functionName,
|
|
21917
|
+
requestHandler: input.requestHandler
|
|
21797
21918
|
});
|
|
21798
21919
|
}
|
|
21799
21920
|
const result = await awsImplementation.callFunctionSync({
|
|
@@ -21801,7 +21922,8 @@ var getRenderProgress = async (input) => {
|
|
|
21801
21922
|
type: ServerlessRoutines.status,
|
|
21802
21923
|
payload: getRenderProgressPayload(input),
|
|
21803
21924
|
region: input.region,
|
|
21804
|
-
timeoutInTest: 120000
|
|
21925
|
+
timeoutInTest: 120000,
|
|
21926
|
+
requestHandler: input.requestHandler
|
|
21805
21927
|
});
|
|
21806
21928
|
return result;
|
|
21807
21929
|
};
|
|
@@ -21843,7 +21965,8 @@ var internalPresignUrl = async ({
|
|
|
21843
21965
|
objectKey,
|
|
21844
21966
|
checkIfObjectExists,
|
|
21845
21967
|
expiresInSeconds,
|
|
21846
|
-
forcePathStyle
|
|
21968
|
+
forcePathStyle,
|
|
21969
|
+
requestHandler
|
|
21847
21970
|
}) => {
|
|
21848
21971
|
validateBucketName({
|
|
21849
21972
|
bucketName,
|
|
@@ -21854,7 +21977,8 @@ var internalPresignUrl = async ({
|
|
|
21854
21977
|
const s3Client = getS3Client({
|
|
21855
21978
|
region,
|
|
21856
21979
|
customCredentials: null,
|
|
21857
|
-
forcePathStyle
|
|
21980
|
+
forcePathStyle,
|
|
21981
|
+
requestHandler: requestHandler ?? null
|
|
21858
21982
|
});
|
|
21859
21983
|
if (checkIfObjectExists === true) {
|
|
21860
21984
|
try {
|
|
@@ -21887,7 +22011,8 @@ var presignUrl = ({
|
|
|
21887
22011
|
objectKey,
|
|
21888
22012
|
checkIfObjectExists,
|
|
21889
22013
|
expiresInSeconds,
|
|
21890
|
-
forcePathStyle
|
|
22014
|
+
forcePathStyle,
|
|
22015
|
+
requestHandler
|
|
21891
22016
|
}) => {
|
|
21892
22017
|
return internalPresignUrl({
|
|
21893
22018
|
region,
|
|
@@ -21895,7 +22020,8 @@ var presignUrl = ({
|
|
|
21895
22020
|
objectKey,
|
|
21896
22021
|
checkIfObjectExists: checkIfObjectExists ?? false,
|
|
21897
22022
|
expiresInSeconds,
|
|
21898
|
-
forcePathStyle: forcePathStyle ?? false
|
|
22023
|
+
forcePathStyle: forcePathStyle ?? false,
|
|
22024
|
+
requestHandler
|
|
21899
22025
|
});
|
|
21900
22026
|
};
|
|
21901
22027
|
|