@remotion/lambda 4.0.201 → 4.0.202
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/dist/api/bucket-exists.js +6 -2
- package/dist/api/clean-items.d.ts +2 -1
- package/dist/api/clean-items.js +2 -1
- package/dist/api/create-bucket.js +5 -5
- package/dist/api/delete-render.d.ts +2 -0
- package/dist/api/delete-render.js +6 -0
- package/dist/api/delete-site.d.ts +11 -5
- package/dist/api/delete-site.js +7 -1
- package/dist/api/deploy-site.d.ts +5 -3
- package/dist/api/deploy-site.js +7 -2
- package/dist/api/download-media.d.ts +2 -0
- package/dist/api/download-media.js +4 -1
- package/dist/api/get-aws-client.d.ts +2 -1
- package/dist/api/get-aws-client.js +2 -1
- package/dist/api/get-buckets.js +11 -3
- package/dist/api/get-compositions-on-lambda.d.ts +2 -1
- package/dist/api/get-compositions-on-lambda.js +3 -1
- package/dist/api/get-or-create-bucket.js +1 -0
- package/dist/api/get-render-progress.d.ts +1 -0
- package/dist/api/get-sites.d.ts +9 -4
- package/dist/api/get-sites.js +15 -5
- package/dist/api/make-lambda-payload.d.ts +4 -3
- package/dist/api/make-lambda-payload.js +9 -4
- package/dist/api/presign-url.d.ts +8 -3
- package/dist/api/presign-url.js +26 -12
- package/dist/api/render-media-on-lambda.d.ts +1 -0
- package/dist/api/render-media-on-lambda.js +2 -1
- package/dist/api/render-still-on-lambda.d.ts +1 -0
- package/dist/api/render-still-on-lambda.js +2 -1
- package/dist/api/upload-dir.d.ts +2 -1
- package/dist/api/upload-dir.js +2 -2
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/commands/render/render.js +3 -1
- package/dist/cli/commands/sites/create.js +3 -1
- package/dist/cli/commands/sites/rm.js +1 -0
- package/dist/cli/commands/sites/rmall.js +1 -0
- package/dist/cli/commands/still.d.ts +6 -1
- package/dist/cli/commands/still.js +2 -1
- package/dist/cli/index.js +6 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/functions/helpers/cleanup-props.d.ts +6 -2
- package/dist/functions/helpers/cleanup-props.js +3 -1
- package/dist/functions/helpers/find-output-file-in-bucket.d.ts +2 -1
- package/dist/functions/helpers/find-output-file-in-bucket.js +2 -1
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/helpers/get-overall-progress-s3.d.ts +2 -1
- package/dist/functions/helpers/get-overall-progress-s3.js +2 -1
- package/dist/functions/helpers/get-progress.d.ts +2 -1
- package/dist/functions/helpers/get-progress.js +2 -1
- package/dist/functions/helpers/merge-chunks.d.ts +1 -0
- package/dist/functions/helpers/merge-chunks.js +2 -0
- package/dist/functions/helpers/overall-render-progress.d.ts +2 -1
- package/dist/functions/helpers/overall-render-progress.js +2 -1
- package/dist/functions/helpers/read-with-progress.d.ts +2 -1
- package/dist/functions/helpers/read-with-progress.js +2 -2
- package/dist/functions/launch.js +8 -0
- package/dist/functions/progress.js +1 -0
- package/dist/functions/renderer.js +2 -0
- package/dist/functions/start.js +3 -0
- package/dist/functions/still.js +6 -0
- package/dist/index.d.ts +2 -2
- package/dist/internals.d.ts +11 -9
- package/dist/io/delete-file.js +2 -2
- package/dist/io/head-file.js +6 -2
- package/dist/io/list-objects.js +12 -3
- package/dist/io/read-file.d.ts +2 -1
- package/dist/io/read-file.js +6 -2
- package/dist/io/write-file.js +6 -2
- package/dist/shared/aws-clients.js +15 -2
- package/dist/shared/cleanup-serialized-input-props.d.ts +4 -2
- package/dist/shared/cleanup-serialized-input-props.js +4 -2
- package/dist/shared/get-s3-client.d.ts +5 -1
- package/dist/shared/get-s3-client.js +2 -1
- package/dist/shared/get-service-client.d.ts +2 -1
- package/dist/shared/get-service-client.js +4 -2
- package/dist/shared/lifecycle-rules.d.ts +2 -1
- package/dist/shared/lifecycle-rules.js +17 -7
- package/package.json +11 -11
- package/remotionlambda-arm64.zip +0 -0
package/dist/functions/start.js
CHANGED
|
@@ -24,6 +24,7 @@ const startHandler = async (params, options, providerSpecifics) => {
|
|
|
24
24
|
enableFolderExpiry: null,
|
|
25
25
|
customCredentials: null,
|
|
26
26
|
providerSpecifics,
|
|
27
|
+
forcePathStyle: params.forcePathStyle,
|
|
27
28
|
})).bucketName;
|
|
28
29
|
const realServeUrl = providerSpecifics.convertToServeUrl({
|
|
29
30
|
urlOrId: params.serveUrl,
|
|
@@ -40,6 +41,7 @@ const startHandler = async (params, options, providerSpecifics) => {
|
|
|
40
41
|
key: (0, client_1.overallProgressKey)(options.renderId),
|
|
41
42
|
privacy: 'private',
|
|
42
43
|
customCredentials: null,
|
|
44
|
+
forcePathStyle: params.forcePathStyle,
|
|
43
45
|
});
|
|
44
46
|
const payload = {
|
|
45
47
|
type: client_1.ServerlessRoutines.launch,
|
|
@@ -84,6 +86,7 @@ const startHandler = async (params, options, providerSpecifics) => {
|
|
|
84
86
|
deleteAfter: params.deleteAfter,
|
|
85
87
|
colorSpace: params.colorSpace,
|
|
86
88
|
preferLossless: params.preferLossless,
|
|
89
|
+
forcePathStyle: params.forcePathStyle,
|
|
87
90
|
};
|
|
88
91
|
const stringifiedPayload = JSON.stringify(payload);
|
|
89
92
|
if (stringifiedPayload.length > 256 * 1024) {
|
package/dist/functions/still.js
CHANGED
|
@@ -52,6 +52,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
52
52
|
enableFolderExpiry: null,
|
|
53
53
|
customCredentials: null,
|
|
54
54
|
providerSpecifics,
|
|
55
|
+
forcePathStyle: lambdaParams.forcePathStyle,
|
|
55
56
|
}).then((b) => b.bucketName);
|
|
56
57
|
const outputDir = renderer_1.RenderInternals.tmpDir('remotion-render-');
|
|
57
58
|
const outputPath = node_path_1.default.join(outputDir, 'output');
|
|
@@ -64,6 +65,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
64
65
|
serialized: lambdaParams.inputProps,
|
|
65
66
|
propsType: 'input-props',
|
|
66
67
|
providerSpecifics,
|
|
68
|
+
forcePathStyle: lambdaParams.forcePathStyle,
|
|
67
69
|
});
|
|
68
70
|
const serveUrl = providerSpecifics.convertToServeUrl({
|
|
69
71
|
urlOrId: lambdaParams.serveUrl,
|
|
@@ -138,6 +140,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
138
140
|
expectedBucketOwner,
|
|
139
141
|
downloadBehavior: null,
|
|
140
142
|
customCredentials: null,
|
|
143
|
+
forcePathStyle: lambdaParams.forcePathStyle,
|
|
141
144
|
});
|
|
142
145
|
const onBrowserDownload = () => {
|
|
143
146
|
throw new Error('Should not download a browser in Lambda');
|
|
@@ -167,6 +170,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
167
170
|
expectedBucketOwner,
|
|
168
171
|
downloadBehavior: lambdaParams.downloadBehavior,
|
|
169
172
|
customCredentials,
|
|
173
|
+
forcePathStyle: lambdaParams.forcePathStyle,
|
|
170
174
|
})
|
|
171
175
|
.then(() => {
|
|
172
176
|
renderer_1.RenderInternals.Log.info({ indent: false, logLevel: lambdaParams.logLevel }, `Wrote artifact to S3 in ${Date.now() - startTime}ms`);
|
|
@@ -221,6 +225,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
221
225
|
region: providerSpecifics.getCurrentRegionInFunction(),
|
|
222
226
|
downloadBehavior: lambdaParams.downloadBehavior,
|
|
223
227
|
customCredentials,
|
|
228
|
+
forcePathStyle: lambdaParams.forcePathStyle,
|
|
224
229
|
});
|
|
225
230
|
await Promise.all([
|
|
226
231
|
node_fs_1.default.promises.rm(outputPath, { recursive: true }),
|
|
@@ -228,6 +233,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
228
233
|
region: providerSpecifics.getCurrentRegionInFunction(),
|
|
229
234
|
serialized: lambdaParams.inputProps,
|
|
230
235
|
providerSpecifics,
|
|
236
|
+
forcePathStyle: lambdaParams.forcePathStyle,
|
|
231
237
|
}),
|
|
232
238
|
server.closeServer(true),
|
|
233
239
|
]);
|
package/dist/index.d.ts
CHANGED
|
@@ -49,11 +49,11 @@ declare const renderStillOnLambda: (input: RenderStillOnLambdaInput) => Promise<
|
|
|
49
49
|
/**
|
|
50
50
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
51
51
|
*/
|
|
52
|
-
declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region, bucketName, objectKey, checkIfObjectExists, expiresInSeconds, }: import("./api/presign-url").PresignUrlInput<CheckIfObjectExists>) => Promise<CheckIfObjectExists extends true ? string | null : string>;
|
|
52
|
+
declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region, bucketName, objectKey, checkIfObjectExists, expiresInSeconds, forcePathStyle, }: import("./api/presign-url").PresignUrlInput<CheckIfObjectExists>) => Promise<CheckIfObjectExists extends true ? string | null : string>;
|
|
53
53
|
/**
|
|
54
54
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
55
55
|
*/
|
|
56
|
-
declare const getSites: ({ region, forceBucketName, }: GetSitesInput) => Promise<GetSitesOutput>;
|
|
56
|
+
declare const getSites: ({ region, forceBucketName, forcePathStyle, }: GetSitesInput) => Promise<GetSitesOutput>;
|
|
57
57
|
export { LambdaInternals, deleteFunction, deleteRender, deleteSite, deployFunction, deploySite, downloadMedia, estimatePrice, getAwsClient, getCompositionsOnLambda, getFunctionInfo, getFunctions, getOrCreateBucket, getRegions, getRenderProgress, getRolePolicy, getSites, getUserPolicy, presignUrl, renderMediaOnLambda, renderStillOnLambda, renderVideoOnLambda, simulatePermissions, validateWebhookSignature, };
|
|
58
58
|
export type { AwsRegion, CustomCredentials, DeleteFunctionInput, DeleteRenderInput, DeleteSiteInput, DeleteSiteOutput, DeployFunctionInput, DeployFunctionOutput, DeploySiteInput, DeploySiteOutput, DownloadMediaInput, DownloadMediaOutput, EnhancedErrorInfo, EstimatePriceInput, FunctionInfo, GetAwsClientInput, GetAwsClientOutput, GetCompositionsOnLambdaInput, GetCompositionsOnLambdaOutput, GetFunctionInfoInput, GetFunctionsInput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderProgressInput, GetSitesInput, GetSitesOutput, LambdaErrorInfo, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderProgress, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, WebhookPayload, };
|
|
59
59
|
export { _InternalAwsProvider, _InternalOverallRenderProgress };
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const LambdaInternals: {
|
|
2
|
-
executeCommand: (args: string[], remotionRoot: string, logLevel: "
|
|
3
|
-
makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, encodingMaxRate, encodingBufferSize, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, preferLossless, }: import("./api/make-lambda-payload").InnerRenderMediaOnLambdaInput) => Promise<import("@remotion/serverless/client").ServerlessStartPayload<import("./functions/aws-implementation").AwsProvider>>;
|
|
4
|
-
getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, }: import("./client").GetRenderProgressInput) => import("@remotion/serverless/client").ServerlessStatusPayload<import("./functions/aws-implementation").AwsProvider>;
|
|
5
|
-
makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, }: import("./api/render-still-on-lambda").RenderStillOnLambdaNonNullInput) => Promise<{
|
|
2
|
+
executeCommand: (args: string[], remotionRoot: string, logLevel: "error" | "verbose" | "info" | "warn", implementation: import("@remotion/serverless").ProviderSpecifics<import("./functions/aws-implementation").AwsProvider> | null) => Promise<void>;
|
|
3
|
+
makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, encodingMaxRate, encodingBufferSize, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, preferLossless, forcePathStyle, }: import("./api/make-lambda-payload").InnerRenderMediaOnLambdaInput) => Promise<import("@remotion/serverless/client").ServerlessStartPayload<import("./functions/aws-implementation").AwsProvider>>;
|
|
4
|
+
getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, forcePathStyle, }: import("./client").GetRenderProgressInput) => import("@remotion/serverless/client").ServerlessStatusPayload<import("./functions/aws-implementation").AwsProvider>;
|
|
5
|
+
makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, }: import("./api/render-still-on-lambda").RenderStillOnLambdaNonNullInput) => Promise<{
|
|
6
6
|
type: import("@remotion/serverless/client").ServerlessRoutines.still;
|
|
7
7
|
serveUrl: string;
|
|
8
8
|
composition: string;
|
|
@@ -14,7 +14,7 @@ export declare const LambdaInternals: {
|
|
|
14
14
|
maxRetries: number;
|
|
15
15
|
frame: number;
|
|
16
16
|
privacy: import("@remotion/serverless/client").Privacy;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
18
18
|
outName: import("@remotion/serverless/client").OutNameInput<import("./functions/aws-implementation").AwsProvider> | null;
|
|
19
19
|
timeoutInMilliseconds: number;
|
|
20
20
|
chromiumOptions: import("@remotion/renderer").ChromiumOptions;
|
|
@@ -27,11 +27,12 @@ export declare const LambdaInternals: {
|
|
|
27
27
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
28
28
|
deleteAfter: "1-day" | "3-days" | "7-days" | "30-days" | null;
|
|
29
29
|
streamed: boolean;
|
|
30
|
+
forcePathStyle: boolean;
|
|
30
31
|
}>;
|
|
31
32
|
internalDeploySite: (args_0: {
|
|
32
33
|
entryPoint: string;
|
|
33
34
|
bucketName: string;
|
|
34
|
-
region: "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "eu-north-1" | "us-east-
|
|
35
|
+
region: "us-east-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "eu-north-1" | "us-east-2" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-south-1" | "ap-east-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "me-south-1" | "sa-east-1";
|
|
35
36
|
} & {
|
|
36
37
|
siteName: string;
|
|
37
38
|
options: {
|
|
@@ -48,6 +49,7 @@ export declare const LambdaInternals: {
|
|
|
48
49
|
privacy: "public" | "no-acl";
|
|
49
50
|
gitSource: import("@remotion/bundler").GitSource | null;
|
|
50
51
|
indent: boolean;
|
|
52
|
+
forcePathStyle: boolean;
|
|
51
53
|
} & import("@remotion/renderer").ToOptions<{
|
|
52
54
|
readonly logLevel: {
|
|
53
55
|
cliFlag: "log";
|
|
@@ -58,11 +60,11 @@ export declare const LambdaInternals: {
|
|
|
58
60
|
getValue: ({ commandLine }: {
|
|
59
61
|
commandLine: Record<string, unknown>;
|
|
60
62
|
}) => {
|
|
61
|
-
value: "
|
|
63
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
62
64
|
source: string;
|
|
63
65
|
};
|
|
64
|
-
setConfig: (newLogLevel: "
|
|
65
|
-
type: "
|
|
66
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
67
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
66
68
|
};
|
|
67
69
|
readonly throwIfSiteExists: {
|
|
68
70
|
cliFlag: string;
|
package/dist/io/delete-file.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.lambdaDeleteFileImplementation = void 0;
|
|
4
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
5
|
const get_s3_client_1 = require("../shared/get-s3-client");
|
|
6
|
-
const lambdaDeleteFileImplementation = async ({ bucketName, key, region, customCredentials, }) => {
|
|
7
|
-
await (0, get_s3_client_1.getS3Client)(region, customCredentials).send(new client_s3_1.DeleteObjectCommand({
|
|
6
|
+
const lambdaDeleteFileImplementation = async ({ bucketName, key, region, customCredentials, forcePathStyle, }) => {
|
|
7
|
+
await (0, get_s3_client_1.getS3Client)({ region, customCredentials, forcePathStyle }).send(new client_s3_1.DeleteObjectCommand({
|
|
8
8
|
Bucket: bucketName,
|
|
9
9
|
Key: key,
|
|
10
10
|
}));
|
package/dist/io/head-file.js
CHANGED
|
@@ -3,8 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.lambdaHeadFileImplementation = void 0;
|
|
4
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
5
|
const get_s3_client_1 = require("../shared/get-s3-client");
|
|
6
|
-
const lambdaHeadFileImplementation = async ({ bucketName, key, region, customCredentials, }) => {
|
|
7
|
-
const head = await (0, get_s3_client_1.getS3Client)(
|
|
6
|
+
const lambdaHeadFileImplementation = async ({ bucketName, key, region, customCredentials, forcePathStyle, }) => {
|
|
7
|
+
const head = await (0, get_s3_client_1.getS3Client)({
|
|
8
|
+
region,
|
|
9
|
+
customCredentials,
|
|
10
|
+
forcePathStyle,
|
|
11
|
+
}).send(new client_s3_1.HeadObjectCommand({
|
|
8
12
|
Bucket: bucketName,
|
|
9
13
|
Key: key,
|
|
10
14
|
}));
|
package/dist/io/list-objects.js
CHANGED
|
@@ -3,10 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.lambdaLsImplementation = void 0;
|
|
4
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
5
|
const get_s3_client_1 = require("../shared/get-s3-client");
|
|
6
|
-
const lambdaLsImplementation = async ({ bucketName, prefix, region, expectedBucketOwner, continuationToken, }) => {
|
|
6
|
+
const lambdaLsImplementation = async ({ bucketName, prefix, region, expectedBucketOwner, continuationToken, forcePathStyle, }) => {
|
|
7
7
|
var _a, _b, _c, _d;
|
|
8
8
|
try {
|
|
9
|
-
const list = await (0, get_s3_client_1.getS3Client)(
|
|
9
|
+
const list = await (0, get_s3_client_1.getS3Client)({
|
|
10
|
+
region,
|
|
11
|
+
customCredentials: null,
|
|
12
|
+
forcePathStyle,
|
|
13
|
+
}).send(new client_s3_1.ListObjectsV2Command({
|
|
10
14
|
Bucket: bucketName,
|
|
11
15
|
Prefix: prefix,
|
|
12
16
|
ExpectedBucketOwner: expectedBucketOwner !== null && expectedBucketOwner !== void 0 ? expectedBucketOwner : undefined,
|
|
@@ -28,6 +32,7 @@ const lambdaLsImplementation = async ({ bucketName, prefix, region, expectedBuck
|
|
|
28
32
|
expectedBucketOwner,
|
|
29
33
|
region,
|
|
30
34
|
continuationToken: list.NextContinuationToken,
|
|
35
|
+
forcePathStyle,
|
|
31
36
|
})),
|
|
32
37
|
];
|
|
33
38
|
}
|
|
@@ -46,7 +51,11 @@ const lambdaLsImplementation = async ({ bucketName, prefix, region, expectedBuck
|
|
|
46
51
|
}
|
|
47
52
|
// Prevent from accessing a foreign bucket, retry without ExpectedBucketOwner and see if it works. If it works then it's an owner mismatch.
|
|
48
53
|
if ((_d = err.stack) === null || _d === void 0 ? void 0 : _d.includes('AccessDenied')) {
|
|
49
|
-
await (0, get_s3_client_1.getS3Client)(
|
|
54
|
+
await (0, get_s3_client_1.getS3Client)({
|
|
55
|
+
region,
|
|
56
|
+
customCredentials: null,
|
|
57
|
+
forcePathStyle,
|
|
58
|
+
}).send(new client_s3_1.ListObjectsV2Command({
|
|
50
59
|
Bucket: bucketName,
|
|
51
60
|
Prefix: prefix,
|
|
52
61
|
}));
|
package/dist/io/read-file.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { Readable } from 'stream';
|
|
3
3
|
import type { AwsRegion } from '../regions';
|
|
4
|
-
export declare const lambdaReadFileImplementation: ({ bucketName, key, region, expectedBucketOwner, }: {
|
|
4
|
+
export declare const lambdaReadFileImplementation: ({ bucketName, key, region, expectedBucketOwner, forcePathStyle, }: {
|
|
5
5
|
bucketName: string;
|
|
6
6
|
key: string;
|
|
7
7
|
region: AwsRegion;
|
|
8
8
|
expectedBucketOwner: string;
|
|
9
|
+
forcePathStyle: boolean;
|
|
9
10
|
}) => Promise<Readable>;
|
package/dist/io/read-file.js
CHANGED
|
@@ -3,8 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.lambdaReadFileImplementation = void 0;
|
|
4
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
5
|
const get_s3_client_1 = require("../shared/get-s3-client");
|
|
6
|
-
const lambdaReadFileImplementation = async ({ bucketName, key, region, expectedBucketOwner, }) => {
|
|
7
|
-
const { Body } = await (0, get_s3_client_1.getS3Client)(
|
|
6
|
+
const lambdaReadFileImplementation = async ({ bucketName, key, region, expectedBucketOwner, forcePathStyle, }) => {
|
|
7
|
+
const { Body } = await (0, get_s3_client_1.getS3Client)({
|
|
8
|
+
region,
|
|
9
|
+
customCredentials: null,
|
|
10
|
+
forcePathStyle,
|
|
11
|
+
}).send(new client_s3_1.GetObjectCommand({
|
|
8
12
|
Bucket: bucketName,
|
|
9
13
|
Key: key,
|
|
10
14
|
ExpectedBucketOwner: expectedBucketOwner,
|
package/dist/io/write-file.js
CHANGED
|
@@ -8,8 +8,12 @@ const client_s3_1 = require("@aws-sdk/client-s3");
|
|
|
8
8
|
const mime_types_1 = __importDefault(require("mime-types"));
|
|
9
9
|
const content_disposition_header_1 = require("../shared/content-disposition-header");
|
|
10
10
|
const get_s3_client_1 = require("../shared/get-s3-client");
|
|
11
|
-
const tryLambdaWriteFile = async ({ bucketName, key, body, region, privacy, expectedBucketOwner, downloadBehavior, customCredentials, }) => {
|
|
12
|
-
await (0, get_s3_client_1.getS3Client)(
|
|
11
|
+
const tryLambdaWriteFile = async ({ bucketName, key, body, region, privacy, expectedBucketOwner, downloadBehavior, customCredentials, forcePathStyle, }) => {
|
|
12
|
+
await (0, get_s3_client_1.getS3Client)({
|
|
13
|
+
region,
|
|
14
|
+
customCredentials: customCredentials,
|
|
15
|
+
forcePathStyle,
|
|
16
|
+
}).send(new client_s3_1.PutObjectCommand({
|
|
13
17
|
Bucket: bucketName,
|
|
14
18
|
Key: key,
|
|
15
19
|
Body: body,
|
|
@@ -7,6 +7,7 @@ const getCloudWatchLogsClient = (region) => {
|
|
|
7
7
|
region,
|
|
8
8
|
service: 'cloudwatch',
|
|
9
9
|
customCredentials: null,
|
|
10
|
+
forcePathStyle: false,
|
|
10
11
|
});
|
|
11
12
|
};
|
|
12
13
|
exports.getCloudWatchLogsClient = getCloudWatchLogsClient;
|
|
@@ -17,11 +18,17 @@ _timeoutInTest) => {
|
|
|
17
18
|
region,
|
|
18
19
|
service: 'lambda',
|
|
19
20
|
customCredentials: null,
|
|
21
|
+
forcePathStyle: false,
|
|
20
22
|
});
|
|
21
23
|
};
|
|
22
24
|
exports.getLambdaClient = getLambdaClient;
|
|
23
25
|
const getIamClient = (region) => {
|
|
24
|
-
return (0, get_service_client_1.getServiceClient)({
|
|
26
|
+
return (0, get_service_client_1.getServiceClient)({
|
|
27
|
+
region,
|
|
28
|
+
service: 'iam',
|
|
29
|
+
customCredentials: null,
|
|
30
|
+
forcePathStyle: false,
|
|
31
|
+
});
|
|
25
32
|
};
|
|
26
33
|
exports.getIamClient = getIamClient;
|
|
27
34
|
const getServiceQuotasClient = (region) => {
|
|
@@ -29,10 +36,16 @@ const getServiceQuotasClient = (region) => {
|
|
|
29
36
|
region,
|
|
30
37
|
service: 'servicequotas',
|
|
31
38
|
customCredentials: null,
|
|
39
|
+
forcePathStyle: false,
|
|
32
40
|
});
|
|
33
41
|
};
|
|
34
42
|
exports.getServiceQuotasClient = getServiceQuotasClient;
|
|
35
43
|
const getStsClient = (region) => {
|
|
36
|
-
return (0, get_service_client_1.getServiceClient)({
|
|
44
|
+
return (0, get_service_client_1.getServiceClient)({
|
|
45
|
+
region,
|
|
46
|
+
service: 'sts',
|
|
47
|
+
customCredentials: null,
|
|
48
|
+
forcePathStyle: false,
|
|
49
|
+
});
|
|
37
50
|
};
|
|
38
51
|
exports.getStsClient = getStsClient;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { CloudProvider, ProviderSpecifics } from '@remotion/serverless';
|
|
2
2
|
import { type SerializedInputProps } from '@remotion/serverless/client';
|
|
3
|
-
export declare const cleanupSerializedInputProps: <Provider extends CloudProvider<string, Record<string, unknown>>>({ serialized, region, providerSpecifics, }: {
|
|
3
|
+
export declare const cleanupSerializedInputProps: <Provider extends CloudProvider<string, Record<string, unknown>>>({ serialized, region, providerSpecifics, forcePathStyle, }: {
|
|
4
4
|
serialized: SerializedInputProps;
|
|
5
5
|
region: Provider["region"];
|
|
6
6
|
providerSpecifics: ProviderSpecifics<Provider>;
|
|
7
|
+
forcePathStyle: boolean;
|
|
7
8
|
}) => Promise<number>;
|
|
8
|
-
export declare const cleanupSerializedResolvedProps: <Provider extends CloudProvider<string, Record<string, unknown>>>({ serialized, region, providerSpecifics, }: {
|
|
9
|
+
export declare const cleanupSerializedResolvedProps: <Provider extends CloudProvider<string, Record<string, unknown>>>({ serialized, region, providerSpecifics, forcePathStyle, }: {
|
|
9
10
|
serialized: SerializedInputProps;
|
|
10
11
|
region: Provider["region"];
|
|
11
12
|
providerSpecifics: ProviderSpecifics<Provider>;
|
|
13
|
+
forcePathStyle: boolean;
|
|
12
14
|
}) => Promise<number>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.cleanupSerializedResolvedProps = exports.cleanupSerializedInputProps = void 0;
|
|
4
4
|
const client_1 = require("@remotion/serverless/client");
|
|
5
|
-
const cleanupSerializedInputProps = async ({ serialized, region, providerSpecifics, }) => {
|
|
5
|
+
const cleanupSerializedInputProps = async ({ serialized, region, providerSpecifics, forcePathStyle, }) => {
|
|
6
6
|
if (serialized.type === 'payload') {
|
|
7
7
|
return 0;
|
|
8
8
|
}
|
|
@@ -12,11 +12,12 @@ const cleanupSerializedInputProps = async ({ serialized, region, providerSpecifi
|
|
|
12
12
|
key: (0, client_1.inputPropsKey)(serialized.hash),
|
|
13
13
|
region,
|
|
14
14
|
customCredentials: null,
|
|
15
|
+
forcePathStyle,
|
|
15
16
|
});
|
|
16
17
|
return Date.now() - time;
|
|
17
18
|
};
|
|
18
19
|
exports.cleanupSerializedInputProps = cleanupSerializedInputProps;
|
|
19
|
-
const cleanupSerializedResolvedProps = async ({ serialized, region, providerSpecifics, }) => {
|
|
20
|
+
const cleanupSerializedResolvedProps = async ({ serialized, region, providerSpecifics, forcePathStyle, }) => {
|
|
20
21
|
if (serialized.type === 'payload') {
|
|
21
22
|
return 0;
|
|
22
23
|
}
|
|
@@ -26,6 +27,7 @@ const cleanupSerializedResolvedProps = async ({ serialized, region, providerSpec
|
|
|
26
27
|
key: (0, client_1.resolvedPropsKey)(serialized.hash),
|
|
27
28
|
region,
|
|
28
29
|
customCredentials: null,
|
|
30
|
+
forcePathStyle,
|
|
29
31
|
});
|
|
30
32
|
return Date.now() - time;
|
|
31
33
|
};
|
|
@@ -2,4 +2,8 @@ import type { S3Client } from '@aws-sdk/client-s3';
|
|
|
2
2
|
import type { CustomCredentials } from '../client';
|
|
3
3
|
import type { AwsProvider } from '../functions/aws-implementation';
|
|
4
4
|
import type { AwsRegion } from '../regions';
|
|
5
|
-
export declare const getS3Client: (region
|
|
5
|
+
export declare const getS3Client: ({ region, customCredentials, forcePathStyle, }: {
|
|
6
|
+
region: AwsRegion;
|
|
7
|
+
customCredentials: CustomCredentials<AwsProvider> | null;
|
|
8
|
+
forcePathStyle: boolean;
|
|
9
|
+
}) => S3Client;
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getS3Client = void 0;
|
|
4
4
|
const get_service_client_1 = require("./get-service-client");
|
|
5
|
-
const getS3Client = (region, customCredentials) => {
|
|
5
|
+
const getS3Client = ({ region, customCredentials, forcePathStyle, }) => {
|
|
6
6
|
var _a;
|
|
7
7
|
return (0, get_service_client_1.getServiceClient)({
|
|
8
8
|
region: (_a = customCredentials === null || customCredentials === void 0 ? void 0 : customCredentials.region) !== null && _a !== void 0 ? _a : region,
|
|
9
9
|
service: 's3',
|
|
10
10
|
customCredentials,
|
|
11
|
+
forcePathStyle,
|
|
11
12
|
});
|
|
12
13
|
};
|
|
13
14
|
exports.getS3Client = getS3Client;
|
|
@@ -15,8 +15,9 @@ export type ServiceMapping = {
|
|
|
15
15
|
servicequotas: ServiceQuotasClient;
|
|
16
16
|
sts: STSClient;
|
|
17
17
|
};
|
|
18
|
-
export declare const getServiceClient: <T extends keyof ServiceMapping>({ region, service, customCredentials, }: {
|
|
18
|
+
export declare const getServiceClient: <T extends keyof ServiceMapping>({ region, service, customCredentials, forcePathStyle, }: {
|
|
19
19
|
region: AwsRegion;
|
|
20
20
|
service: T;
|
|
21
21
|
customCredentials: CustomCredentials<AwsProvider> | null;
|
|
22
|
+
forcePathStyle: boolean;
|
|
22
23
|
}) => ServiceMapping[T];
|
|
@@ -11,7 +11,7 @@ const no_react_1 = require("remotion/no-react");
|
|
|
11
11
|
const check_credentials_1 = require("./check-credentials");
|
|
12
12
|
const constants_1 = require("./constants");
|
|
13
13
|
const get_credentials_1 = require("./get-credentials");
|
|
14
|
-
const getCredentialsHash = ({ customCredentials, region, service, }) => {
|
|
14
|
+
const getCredentialsHash = ({ customCredentials, region, service, forcePathStyle, }) => {
|
|
15
15
|
const hashComponents = {};
|
|
16
16
|
if (process.env.REMOTION_SKIP_AWS_CREDENTIALS_CHECK) {
|
|
17
17
|
hashComponents.credentials = {
|
|
@@ -45,10 +45,11 @@ const getCredentialsHash = ({ customCredentials, region, service, }) => {
|
|
|
45
45
|
hashComponents.customCredentials = customCredentials;
|
|
46
46
|
hashComponents.region = region;
|
|
47
47
|
hashComponents.service = service;
|
|
48
|
+
hashComponents.forcePathStyle = forcePathStyle;
|
|
48
49
|
return (0, no_react_1.random)(JSON.stringify(hashComponents)).toString().replace('0.', '');
|
|
49
50
|
};
|
|
50
51
|
const _clients = {};
|
|
51
|
-
const getServiceClient = ({ region, service, customCredentials, }) => {
|
|
52
|
+
const getServiceClient = ({ region, service, customCredentials, forcePathStyle, }) => {
|
|
52
53
|
var _a;
|
|
53
54
|
const Client = (() => {
|
|
54
55
|
if (service === 'cloudwatch') {
|
|
@@ -75,6 +76,7 @@ const getServiceClient = ({ region, service, customCredentials, }) => {
|
|
|
75
76
|
region,
|
|
76
77
|
customCredentials,
|
|
77
78
|
service,
|
|
79
|
+
forcePathStyle,
|
|
78
80
|
});
|
|
79
81
|
if (!_clients[key]) {
|
|
80
82
|
(0, check_credentials_1.checkCredentials)();
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { CustomCredentials } from '@remotion/serverless/client';
|
|
2
2
|
import type { AwsProvider } from '../functions/aws-implementation';
|
|
3
3
|
import type { AwsRegion } from '../regions';
|
|
4
|
-
export declare const applyLifeCyleOperation: ({ enableFolderExpiry, bucketName, region, customCredentials, }: {
|
|
4
|
+
export declare const applyLifeCyleOperation: ({ enableFolderExpiry, bucketName, region, customCredentials, forcePathStyle, }: {
|
|
5
5
|
enableFolderExpiry: boolean | null;
|
|
6
6
|
bucketName: string;
|
|
7
7
|
region: AwsRegion;
|
|
8
8
|
customCredentials: CustomCredentials<AwsProvider> | null;
|
|
9
|
+
forcePathStyle: boolean;
|
|
9
10
|
}) => Promise<void>;
|
|
@@ -5,7 +5,7 @@ const client_s3_1 = require("@aws-sdk/client-s3");
|
|
|
5
5
|
const apply_lifecyle_1 = require("../functions/helpers/apply-lifecyle");
|
|
6
6
|
const lifecycle_1 = require("../functions/helpers/lifecycle");
|
|
7
7
|
const get_s3_client_1 = require("./get-s3-client");
|
|
8
|
-
const createLCRules = async ({ bucketName, region, customCredentials, }) => {
|
|
8
|
+
const createLCRules = async ({ bucketName, region, customCredentials, forcePathStyle, }) => {
|
|
9
9
|
var _a;
|
|
10
10
|
const lcRules = (0, lifecycle_1.getLifeCycleRules)();
|
|
11
11
|
// create the lifecyle rules
|
|
@@ -15,7 +15,7 @@ const createLCRules = async ({ bucketName, region, customCredentials, }) => {
|
|
|
15
15
|
});
|
|
16
16
|
const createCommand = new client_s3_1.PutBucketLifecycleConfigurationCommand(createCommandInput);
|
|
17
17
|
try {
|
|
18
|
-
await (0, get_s3_client_1.getS3Client)(region, customCredentials).send(createCommand);
|
|
18
|
+
await (0, get_s3_client_1.getS3Client)({ region, customCredentials, forcePathStyle }).send(createCommand);
|
|
19
19
|
}
|
|
20
20
|
catch (err) {
|
|
21
21
|
if ((_a = err.stack) === null || _a === void 0 ? void 0 : _a.includes('AccessDenied')) {
|
|
@@ -23,13 +23,13 @@ const createLCRules = async ({ bucketName, region, customCredentials, }) => {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const deleteLCRules = async ({ bucketName, region, customCredentials, }) => {
|
|
26
|
+
const deleteLCRules = async ({ bucketName, region, customCredentials, forcePathStyle, }) => {
|
|
27
27
|
var _a;
|
|
28
28
|
const deleteCommandInput = (0, apply_lifecyle_1.deleteLifeCycleInput)({
|
|
29
29
|
bucketName,
|
|
30
30
|
});
|
|
31
31
|
try {
|
|
32
|
-
await (0, get_s3_client_1.getS3Client)(region, customCredentials).send(new client_s3_1.DeleteBucketLifecycleCommand(deleteCommandInput));
|
|
32
|
+
await (0, get_s3_client_1.getS3Client)({ region, customCredentials, forcePathStyle }).send(new client_s3_1.DeleteBucketLifecycleCommand(deleteCommandInput));
|
|
33
33
|
}
|
|
34
34
|
catch (err) {
|
|
35
35
|
if ((_a = err.stack) === null || _a === void 0 ? void 0 : _a.includes('AccessDenied')) {
|
|
@@ -37,15 +37,25 @@ const deleteLCRules = async ({ bucketName, region, customCredentials, }) => {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
const applyLifeCyleOperation = async ({ enableFolderExpiry, bucketName, region, customCredentials, }) => {
|
|
40
|
+
const applyLifeCyleOperation = async ({ enableFolderExpiry, bucketName, region, customCredentials, forcePathStyle, }) => {
|
|
41
41
|
if (enableFolderExpiry === null) {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
if (enableFolderExpiry === true) {
|
|
45
|
-
await createLCRules({
|
|
45
|
+
await createLCRules({
|
|
46
|
+
bucketName,
|
|
47
|
+
region,
|
|
48
|
+
customCredentials,
|
|
49
|
+
forcePathStyle,
|
|
50
|
+
});
|
|
46
51
|
}
|
|
47
52
|
else {
|
|
48
|
-
await deleteLCRules({
|
|
53
|
+
await deleteLCRules({
|
|
54
|
+
bucketName,
|
|
55
|
+
region,
|
|
56
|
+
customCredentials,
|
|
57
|
+
forcePathStyle,
|
|
58
|
+
});
|
|
49
59
|
}
|
|
50
60
|
};
|
|
51
61
|
exports.applyLifeCyleOperation = applyLifeCyleOperation;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/lambda",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.202",
|
|
7
7
|
"description": "Render Remotion videos on AWS Lambda",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"@aws-sdk/s3-request-presigner": "3.583.0",
|
|
23
23
|
"mime-types": "2.1.34",
|
|
24
24
|
"zod": "3.22.3",
|
|
25
|
-
"@remotion/bundler": "4.0.
|
|
26
|
-
"@remotion/cli": "4.0.
|
|
27
|
-
"@remotion/renderer": "4.0.
|
|
28
|
-
"@remotion/studio-server": "4.0.
|
|
29
|
-
"@remotion/streaming": "4.0.
|
|
30
|
-
"
|
|
31
|
-
"remotion": "4.0.
|
|
25
|
+
"@remotion/bundler": "4.0.202",
|
|
26
|
+
"@remotion/cli": "4.0.202",
|
|
27
|
+
"@remotion/renderer": "4.0.202",
|
|
28
|
+
"@remotion/studio-server": "4.0.202",
|
|
29
|
+
"@remotion/streaming": "4.0.202",
|
|
30
|
+
"remotion": "4.0.202",
|
|
31
|
+
"@remotion/serverless": "4.0.202"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/mime-types": "2.1.1",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"pureimage": "0.4.13",
|
|
38
38
|
"vitest": "0.31.1",
|
|
39
39
|
"zip-lib": "^0.7.2",
|
|
40
|
-
"@remotion/bundler": "4.0.
|
|
41
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
40
|
+
"@remotion/bundler": "4.0.202",
|
|
41
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.202"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@remotion/bundler": "4.0.
|
|
44
|
+
"@remotion/bundler": "4.0.202"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|