@remotion/lambda 4.0.200 → 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 +7 -3
- package/dist/api/deploy-site.js +17 -4
- 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 +22 -2
- 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/helpers/progress-bar.d.ts +5 -0
- package/dist/cli/helpers/progress-bar.js +19 -1
- package/dist/cli/index.js +6 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/functions/helpers/check-if-render-exists.d.ts +3 -0
- package/dist/functions/helpers/check-if-render-exists.js +15 -0
- package/dist/functions/helpers/cleanup-props.d.ts +6 -2
- package/dist/functions/helpers/cleanup-props.js +3 -1
- package/dist/functions/helpers/delete-chunks.d.ts +9 -0
- package/dist/functions/helpers/delete-chunks.js +25 -0
- package/dist/functions/helpers/expected-out-name.d.ts +1 -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-browser-instance.d.ts +2 -3
- package/dist/functions/helpers/get-browser-instance.js +4 -3
- package/dist/functions/helpers/get-cleanup-progress.d.ts +10 -0
- package/dist/functions/helpers/get-cleanup-progress.js +35 -0
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/helpers/get-custom-out-name.d.ts +1 -1
- package/dist/functions/helpers/get-encoding-metadata.d.ts +7 -0
- package/dist/functions/helpers/get-encoding-metadata.js +15 -0
- package/dist/functions/helpers/get-encoding-progress-step-size.d.ts +1 -0
- package/dist/functions/helpers/get-encoding-progress-step-size.js +7 -0
- package/dist/functions/helpers/get-files-to-delete.d.ts +10 -0
- package/dist/functions/helpers/get-files-to-delete.js +52 -0
- package/dist/functions/helpers/get-final-encoding-status.d.ts +6 -0
- package/dist/functions/helpers/get-final-encoding-status.js +18 -0
- package/dist/functions/helpers/get-folder-size.d.ts +1 -0
- package/dist/functions/helpers/get-folder-size.js +8 -0
- package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +8 -0
- package/dist/functions/helpers/get-lambdas-invoked-stats.js +14 -0
- 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-post-render-data.d.ts +8 -0
- package/dist/functions/helpers/get-post-render-data.js +22 -0
- package/dist/functions/helpers/get-progress.d.ts +2 -1
- package/dist/functions/helpers/get-progress.js +2 -1
- package/dist/functions/helpers/get-render-metadata.d.ts +8 -0
- package/dist/functions/helpers/get-render-metadata.js +17 -0
- package/dist/functions/helpers/get-rendered-frames-progress.d.ts +8 -0
- package/dist/functions/helpers/get-rendered-frames-progress.js +37 -0
- package/dist/functions/helpers/get-time-to-finish.d.ts +5 -0
- package/dist/functions/helpers/get-time-to-finish.js +13 -0
- package/dist/functions/helpers/io.d.ts +33 -3
- package/dist/functions/helpers/io.js +104 -3
- 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/print-cloudwatch-helper.d.ts +1 -1
- package/dist/functions/helpers/print-cloudwatch-helper.js +3 -3
- package/dist/functions/helpers/read-with-progress.d.ts +2 -1
- package/dist/functions/helpers/read-with-progress.js +2 -2
- package/dist/functions/helpers/streaming-payloads.d.ts +19 -0
- package/dist/functions/helpers/streaming-payloads.js +25 -0
- package/dist/functions/helpers/write-lambda-error.d.ts +3 -2
- package/dist/functions/helpers/write-lambda-error.js +2 -3
- package/dist/functions/helpers/write-post-render-data.d.ts +9 -0
- package/dist/functions/helpers/write-post-render-data.js +18 -0
- package/dist/functions/launch.js +8 -0
- package/dist/functions/merge.d.ts +9 -0
- package/dist/functions/merge.js +61 -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 +12 -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/__mocks__/read-dir.js +2 -2
- package/dist/shared/aws-clients.js +15 -2
- package/dist/shared/chunk-progress.d.ts +9 -0
- package/dist/shared/chunk-progress.js +2034 -0
- package/dist/shared/cleanup-serialized-input-props.d.ts +4 -2
- package/dist/shared/cleanup-serialized-input-props.js +4 -2
- package/dist/shared/compress-props.d.ts +6 -8
- package/dist/shared/compress-props.js +14 -11
- package/dist/shared/get-etag.d.ts +1 -1
- package/dist/shared/get-etag.js +33 -12
- package/dist/shared/get-s3-client.d.ts +5 -1
- package/dist/shared/get-s3-client.js +2 -1
- package/dist/shared/get-s3-operations.d.ts +2 -1
- package/dist/shared/get-s3-operations.js +38 -20
- 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/dist/shared/parse-chunk-key.d.ts +5 -0
- package/dist/shared/parse-chunk-key.js +15 -0
- package/dist/shared/parse-lambda-initialized-key.d.ts +5 -0
- package/dist/shared/parse-lambda-initialized-key.js +15 -0
- package/dist/shared/read-dir.d.ts +6 -5
- package/dist/shared/read-dir.js +9 -6
- package/dist/shared/serialize-props.d.ts +14 -0
- package/dist/shared/serialize-props.js +36 -0
- package/package.json +11 -11
- package/remotionlambda-arm64.zip +0 -0
- package/dist/functions/provider-implementation.d.ts +0 -0
- package/dist/functions/provider-implementation.js +0 -1
|
@@ -10,7 +10,7 @@ const validate_download_behavior_1 = require("../shared/validate-download-behavi
|
|
|
10
10
|
const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lambda");
|
|
11
11
|
const validate_lambda_codec_1 = require("../shared/validate-lambda-codec");
|
|
12
12
|
const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
13
|
-
const makeLambdaRenderMediaPayload = async ({ 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, }) => {
|
|
13
|
+
const makeLambdaRenderMediaPayload = async ({ 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, }) => {
|
|
14
14
|
const actualCodec = (0, validate_lambda_codec_1.validateLambdaCodec)(codec);
|
|
15
15
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
16
16
|
(0, validate_frames_per_lambda_1.validateFramesPerLambda)({
|
|
@@ -30,6 +30,7 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
|
|
|
30
30
|
userSpecifiedBucketName: bucketName !== null && bucketName !== void 0 ? bucketName : null,
|
|
31
31
|
propsType: 'input-props',
|
|
32
32
|
providerSpecifics: aws_implementation_1.awsImplementation,
|
|
33
|
+
forcePathStyle: forcePathStyle !== null && forcePathStyle !== void 0 ? forcePathStyle : false,
|
|
33
34
|
});
|
|
34
35
|
return {
|
|
35
36
|
rendererFunctionName,
|
|
@@ -74,21 +75,23 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
|
|
|
74
75
|
deleteAfter: deleteAfter !== null && deleteAfter !== void 0 ? deleteAfter : null,
|
|
75
76
|
colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : null,
|
|
76
77
|
preferLossless: preferLossless !== null && preferLossless !== void 0 ? preferLossless : false,
|
|
78
|
+
forcePathStyle: forcePathStyle !== null && forcePathStyle !== void 0 ? forcePathStyle : false,
|
|
77
79
|
};
|
|
78
80
|
};
|
|
79
81
|
exports.makeLambdaRenderMediaPayload = makeLambdaRenderMediaPayload;
|
|
80
|
-
const getRenderProgressPayload = ({ bucketName, renderId, s3OutputProvider, logLevel, }) => {
|
|
82
|
+
const getRenderProgressPayload = ({ bucketName, renderId, s3OutputProvider, logLevel, forcePathStyle, }) => {
|
|
81
83
|
return {
|
|
82
84
|
type: client_1.ServerlessRoutines.status,
|
|
83
85
|
bucketName,
|
|
84
86
|
renderId,
|
|
85
87
|
version: version_1.VERSION,
|
|
86
|
-
s3OutputProvider,
|
|
88
|
+
s3OutputProvider: s3OutputProvider !== null && s3OutputProvider !== void 0 ? s3OutputProvider : null,
|
|
87
89
|
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
90
|
+
forcePathStyle: forcePathStyle !== null && forcePathStyle !== void 0 ? forcePathStyle : false,
|
|
88
91
|
};
|
|
89
92
|
};
|
|
90
93
|
exports.getRenderProgressPayload = getRenderProgressPayload;
|
|
91
|
-
const makeLambdaRenderStillPayload = async ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, }) => {
|
|
94
|
+
const makeLambdaRenderStillPayload = async ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, }) => {
|
|
92
95
|
if (quality) {
|
|
93
96
|
throw new Error('The `quality` option is deprecated. Use `jpegQuality` instead.');
|
|
94
97
|
}
|
|
@@ -103,6 +106,7 @@ const makeLambdaRenderStillPayload = async ({ serveUrl, inputProps, imageFormat,
|
|
|
103
106
|
userSpecifiedBucketName: forceBucketName !== null && forceBucketName !== void 0 ? forceBucketName : null,
|
|
104
107
|
propsType: 'input-props',
|
|
105
108
|
providerSpecifics: aws_implementation_1.awsImplementation,
|
|
109
|
+
forcePathStyle,
|
|
106
110
|
});
|
|
107
111
|
return {
|
|
108
112
|
composition,
|
|
@@ -129,6 +133,7 @@ const makeLambdaRenderStillPayload = async ({ serveUrl, inputProps, imageFormat,
|
|
|
129
133
|
deleteAfter,
|
|
130
134
|
type: client_1.ServerlessRoutines.still,
|
|
131
135
|
streamed: true,
|
|
136
|
+
forcePathStyle,
|
|
132
137
|
};
|
|
133
138
|
};
|
|
134
139
|
exports.makeLambdaRenderStillPayload = makeLambdaRenderStillPayload;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { AwsRegion } from '../regions';
|
|
2
|
-
|
|
2
|
+
type MandatoryParameters = {
|
|
3
3
|
region: AwsRegion;
|
|
4
4
|
bucketName: string;
|
|
5
5
|
objectKey: string;
|
|
6
|
-
checkIfObjectExists?: CheckIfObjectExists;
|
|
7
6
|
expiresInSeconds: number;
|
|
8
7
|
};
|
|
8
|
+
type OptionalParameters<CheckIfObjectExists extends boolean> = {
|
|
9
|
+
checkIfObjectExists: CheckIfObjectExists;
|
|
10
|
+
forcePathStyle: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type PresignUrlInput<CheckIfObjectExists extends boolean = boolean> = MandatoryParameters & Partial<OptionalParameters<CheckIfObjectExists>>;
|
|
9
13
|
/**
|
|
10
14
|
* @description Returns a public url of an object stored in Remotion's S3 bucket.
|
|
11
15
|
* @see [Documentation](https://remotion.dev/docs/lambda/presignurl)
|
|
@@ -16,4 +20,5 @@ export type PresignUrlInput<CheckIfObjectExists extends boolean = boolean> = {
|
|
|
16
20
|
* @param {boolean} params.checkIfObjectExists Whether the function should check if the object exists in the bucket before generating the presigned url.
|
|
17
21
|
* @returns {Promise<string | null>} The public url of an object or `null` if `checkIfObjectExists=true` & object does not exist.
|
|
18
22
|
*/
|
|
19
|
-
export declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region, bucketName, objectKey, checkIfObjectExists, expiresInSeconds, }: PresignUrlInput<CheckIfObjectExists>) => Promise<CheckIfObjectExists extends true ? string | null : string>;
|
|
23
|
+
export declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region, bucketName, objectKey, checkIfObjectExists, expiresInSeconds, forcePathStyle, }: PresignUrlInput<CheckIfObjectExists>) => Promise<CheckIfObjectExists extends true ? string | null : string>;
|
|
24
|
+
export {};
|
package/dist/api/presign-url.js
CHANGED
|
@@ -6,20 +6,14 @@ const s3_request_presigner_1 = require("@aws-sdk/s3-request-presigner");
|
|
|
6
6
|
const client_1 = require("@remotion/serverless/client");
|
|
7
7
|
const get_s3_client_1 = require("../shared/get-s3-client");
|
|
8
8
|
const validate_presign_expiration_1 = require("../shared/validate-presign-expiration");
|
|
9
|
-
|
|
10
|
-
* @description Returns a public url of an object stored in Remotion's S3 bucket.
|
|
11
|
-
* @see [Documentation](https://remotion.dev/docs/lambda/presignurl)
|
|
12
|
-
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
13
|
-
* @param {string} params.bucketName The name of the bucket to fetch the object from.
|
|
14
|
-
* @param {string} params.objectKey Key of the S3 object to get.
|
|
15
|
-
* @param {string} params.expiresIn The number of seconds before the presigned URL expires. Default 120.
|
|
16
|
-
* @param {boolean} params.checkIfObjectExists Whether the function should check if the object exists in the bucket before generating the presigned url.
|
|
17
|
-
* @returns {Promise<string | null>} The public url of an object or `null` if `checkIfObjectExists=true` & object does not exist.
|
|
18
|
-
*/
|
|
19
|
-
const presignUrl = async ({ region, bucketName, objectKey, checkIfObjectExists, expiresInSeconds, }) => {
|
|
9
|
+
const internalPresignUrl = async ({ region, bucketName, objectKey, checkIfObjectExists, expiresInSeconds, forcePathStyle, }) => {
|
|
20
10
|
(0, client_1.validateBucketName)(bucketName, { mustStartWithRemotion: false });
|
|
21
11
|
(0, validate_presign_expiration_1.validatePresignExpiration)(expiresInSeconds);
|
|
22
|
-
const s3Client = (0, get_s3_client_1.getS3Client)(
|
|
12
|
+
const s3Client = (0, get_s3_client_1.getS3Client)({
|
|
13
|
+
region,
|
|
14
|
+
customCredentials: null,
|
|
15
|
+
forcePathStyle,
|
|
16
|
+
});
|
|
23
17
|
if (checkIfObjectExists === true) {
|
|
24
18
|
try {
|
|
25
19
|
await s3Client.send(new client_s3_1.HeadObjectCommand({
|
|
@@ -48,4 +42,24 @@ const presignUrl = async ({ region, bucketName, objectKey, checkIfObjectExists,
|
|
|
48
42
|
});
|
|
49
43
|
return publicUrl;
|
|
50
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* @description Returns a public url of an object stored in Remotion's S3 bucket.
|
|
47
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/presignurl)
|
|
48
|
+
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
49
|
+
* @param {string} params.bucketName The name of the bucket to fetch the object from.
|
|
50
|
+
* @param {string} params.objectKey Key of the S3 object to get.
|
|
51
|
+
* @param {string} params.expiresIn The number of seconds before the presigned URL expires. Default 120.
|
|
52
|
+
* @param {boolean} params.checkIfObjectExists Whether the function should check if the object exists in the bucket before generating the presigned url.
|
|
53
|
+
* @returns {Promise<string | null>} The public url of an object or `null` if `checkIfObjectExists=true` & object does not exist.
|
|
54
|
+
*/
|
|
55
|
+
const presignUrl = ({ region, bucketName, objectKey, checkIfObjectExists, expiresInSeconds, forcePathStyle, }) => {
|
|
56
|
+
return internalPresignUrl({
|
|
57
|
+
region,
|
|
58
|
+
bucketName,
|
|
59
|
+
objectKey,
|
|
60
|
+
checkIfObjectExists: checkIfObjectExists !== null && checkIfObjectExists !== void 0 ? checkIfObjectExists : false,
|
|
61
|
+
expiresInSeconds,
|
|
62
|
+
forcePathStyle: forcePathStyle !== null && forcePathStyle !== void 0 ? forcePathStyle : false,
|
|
63
|
+
});
|
|
64
|
+
};
|
|
51
65
|
exports.presignUrl = presignUrl;
|
|
@@ -42,6 +42,7 @@ export type RenderMediaOnLambdaInput = {
|
|
|
42
42
|
* @deprecated in favor of `logLevel`: true
|
|
43
43
|
*/
|
|
44
44
|
dumpBrowserLogs?: boolean;
|
|
45
|
+
forcePathStyle?: boolean;
|
|
45
46
|
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda>>;
|
|
46
47
|
export type RenderMediaOnLambdaOutput = {
|
|
47
48
|
renderId: string;
|
|
@@ -59,7 +59,7 @@ const internalRenderMediaOnLambdaRaw = async (input) => {
|
|
|
59
59
|
};
|
|
60
60
|
exports.internalRenderMediaOnLambdaRaw = internalRenderMediaOnLambdaRaw;
|
|
61
61
|
const renderMediaOnLambdaOptionalToRequired = (options) => {
|
|
62
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
|
|
62
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12;
|
|
63
63
|
return {
|
|
64
64
|
audioBitrate: (_a = options.audioBitrate) !== null && _a !== void 0 ? _a : null,
|
|
65
65
|
audioCodec: (_b = options.audioCodec) !== null && _b !== void 0 ? _b : null,
|
|
@@ -103,6 +103,7 @@ const renderMediaOnLambdaOptionalToRequired = (options) => {
|
|
|
103
103
|
x264Preset: (_9 = options.x264Preset) !== null && _9 !== void 0 ? _9 : null,
|
|
104
104
|
deleteAfter: (_10 = options.deleteAfter) !== null && _10 !== void 0 ? _10 : null,
|
|
105
105
|
preferLossless: (_11 = options.preferLossless) !== null && _11 !== void 0 ? _11 : false,
|
|
106
|
+
forcePathStyle: (_12 = options.forcePathStyle) !== null && _12 !== void 0 ? _12 : false,
|
|
106
107
|
indent: false,
|
|
107
108
|
};
|
|
108
109
|
};
|
|
@@ -39,6 +39,7 @@ type OptionalParameters = {
|
|
|
39
39
|
lambdaInsightsUrl: string;
|
|
40
40
|
}) => void;
|
|
41
41
|
indent: boolean;
|
|
42
|
+
forcePathStyle: boolean;
|
|
42
43
|
} & ToOptions<typeof BrowserSafeApis.optionsMap.renderStillOnLambda>;
|
|
43
44
|
export type RenderStillOnLambdaNonNullInput = MandatoryParameters & OptionalParameters;
|
|
44
45
|
export type RenderStillOnLambdaInput = MandatoryParameters & Partial<OptionalParameters>;
|
|
@@ -94,7 +94,7 @@ const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(internalRenderS
|
|
|
94
94
|
* @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
|
|
95
95
|
*/
|
|
96
96
|
const renderStillOnLambda = (input) => {
|
|
97
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
97
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
98
98
|
return errorHandled({
|
|
99
99
|
chromiumOptions: (_a = input.chromiumOptions) !== null && _a !== void 0 ? _a : {},
|
|
100
100
|
composition: input.composition,
|
|
@@ -122,6 +122,7 @@ const renderStillOnLambda = (input) => {
|
|
|
122
122
|
scale: (_q = input.scale) !== null && _q !== void 0 ? _q : 1,
|
|
123
123
|
timeoutInMilliseconds: (_r = input.timeoutInMilliseconds) !== null && _r !== void 0 ? _r : 30000,
|
|
124
124
|
dumpBrowserLogs: false,
|
|
125
|
+
forcePathStyle: (_s = input.forcePathStyle) !== null && _s !== void 0 ? _s : false,
|
|
125
126
|
});
|
|
126
127
|
};
|
|
127
128
|
exports.renderStillOnLambda = renderStillOnLambda;
|
package/dist/api/upload-dir.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type MockFile = {
|
|
|
11
11
|
content: string;
|
|
12
12
|
};
|
|
13
13
|
export declare const getDirFiles: (entry: string) => MockFile[];
|
|
14
|
-
export declare const uploadDir: ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, }: {
|
|
14
|
+
export declare const uploadDir: ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, forcePathStyle, }: {
|
|
15
15
|
bucket: string;
|
|
16
16
|
region: AwsRegion;
|
|
17
17
|
localDir: string;
|
|
@@ -19,4 +19,5 @@ export declare const uploadDir: ({ bucket, region, localDir, onProgress, keyPref
|
|
|
19
19
|
onProgress: (progress: UploadDirProgress) => void;
|
|
20
20
|
privacy: Privacy;
|
|
21
21
|
toUpload: string[];
|
|
22
|
+
forcePathStyle: boolean;
|
|
22
23
|
}) => Promise<void>;
|
package/dist/api/upload-dir.js
CHANGED
|
@@ -46,13 +46,13 @@ async function getFiles(directory, originalDirectory, toUpload) {
|
|
|
46
46
|
return _files.flat(1);
|
|
47
47
|
}
|
|
48
48
|
const limit = (0, p_limit_1.pLimit)(50);
|
|
49
|
-
const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, }) => {
|
|
49
|
+
const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, forcePathStyle, }) => {
|
|
50
50
|
const files = await getFiles(localDir, localDir, toUpload);
|
|
51
51
|
const progresses = {};
|
|
52
52
|
for (const file of files) {
|
|
53
53
|
progresses[file.name] = 0;
|
|
54
54
|
}
|
|
55
|
-
const client = (0, get_s3_client_1.getS3Client)(region, null);
|
|
55
|
+
const client = (0, get_s3_client_1.getS3Client)({ region, customCredentials: null, forcePathStyle });
|
|
56
56
|
const uploadAll = (async () => {
|
|
57
57
|
const uploads = files.map((filePath) => limit(async () => {
|
|
58
58
|
const Key = (0, make_s3_key_1.makeS3Key)(keyPrefix, localDir, filePath.name);
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ type LambdaCommandLineOptions = {
|
|
|
36
36
|
['vpc-subnet-ids']: string | undefined;
|
|
37
37
|
['vpc-security-group-ids']: string | undefined;
|
|
38
38
|
['compatible-only']: boolean;
|
|
39
|
+
['force-path-style']: boolean;
|
|
39
40
|
};
|
|
40
41
|
export declare const parsedLambdaCli: LambdaCommandLineOptions & import("minimist").ParsedArgs;
|
|
41
42
|
export declare const forceFlagProvided: boolean;
|
|
@@ -29,7 +29,7 @@ const progress_1 = require("./progress");
|
|
|
29
29
|
exports.RENDER_COMMAND = 'render';
|
|
30
30
|
const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, mutedOption, colorSpaceOption, deleteAfterOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, overwriteOption, binariesDirectoryOption, preferLosslessOption, } = client_1.BrowserSafeApis.options;
|
|
31
31
|
const renderCommand = async (args, remotionRoot, logLevel, implementation) => {
|
|
32
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
33
33
|
const serveUrl = args[0];
|
|
34
34
|
if (!serveUrl) {
|
|
35
35
|
log_1.Log.error({ indent: false, logLevel }, 'No serve URL passed.');
|
|
@@ -234,6 +234,7 @@ const renderCommand = async (args, remotionRoot, logLevel, implementation) => {
|
|
|
234
234
|
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
|
|
235
235
|
preferLossless,
|
|
236
236
|
indent: false,
|
|
237
|
+
forcePathStyle: (_l = args_1.parsedLambdaCli['force-path-style']) !== null && _l !== void 0 ? _l : false,
|
|
237
238
|
});
|
|
238
239
|
const progressBar = cli_1.CliInternals.createOverwriteableCliOutput({
|
|
239
240
|
quiet: cli_1.CliInternals.quietFlagProvided(),
|
|
@@ -327,6 +328,7 @@ const renderCommand = async (args, remotionRoot, logLevel, implementation) => {
|
|
|
327
328
|
}), false);
|
|
328
329
|
},
|
|
329
330
|
providerSpecifics: implementation,
|
|
331
|
+
forcePathStyle: args_1.parsedLambdaCli['force-path-style'],
|
|
330
332
|
});
|
|
331
333
|
downloadOrNothing = download;
|
|
332
334
|
progressBar.update((0, progress_1.makeProgressString)({
|
|
@@ -17,7 +17,7 @@ const log_1 = require("../../log");
|
|
|
17
17
|
exports.SITES_CREATE_SUBCOMMAND = 'create';
|
|
18
18
|
const { folderExpiryOption, publicDirOption, throwIfSiteExistsOption, disableGitSourceOption, } = client_1.BrowserSafeApis.options;
|
|
19
19
|
const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementation) => {
|
|
20
|
-
var _a, _b, _c, _d;
|
|
20
|
+
var _a, _b, _c, _d, _e;
|
|
21
21
|
const { file, reason } = cli_1.CliInternals.findEntryPoint({
|
|
22
22
|
args,
|
|
23
23
|
remotionRoot,
|
|
@@ -58,13 +58,20 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementatio
|
|
|
58
58
|
sizeUploaded: 0,
|
|
59
59
|
stats: null,
|
|
60
60
|
},
|
|
61
|
+
diffingProgress: {
|
|
62
|
+
doneIn: null,
|
|
63
|
+
bytesProcessed: 0,
|
|
64
|
+
},
|
|
61
65
|
};
|
|
62
66
|
const updateProgress = (newLine) => {
|
|
63
67
|
progressBar.update([
|
|
64
68
|
(0, progress_bar_1.makeBundleProgress)(multiProgress.bundleProgress),
|
|
65
69
|
(0, progress_bar_1.makeBucketProgress)(multiProgress.bucketProgress),
|
|
70
|
+
(0, progress_bar_1.makeDiffingProgressBar)(multiProgress.diffingProgress),
|
|
66
71
|
(0, progress_bar_1.makeDeployProgressBar)(multiProgress.deployProgress),
|
|
67
|
-
]
|
|
72
|
+
]
|
|
73
|
+
.filter(no_react_1.NoReactInternals.truthy)
|
|
74
|
+
.join('\n'), newLine);
|
|
68
75
|
};
|
|
69
76
|
const bucketStart = Date.now();
|
|
70
77
|
const enableFolderExpiry = folderExpiryOption.getValue({
|
|
@@ -76,6 +83,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementatio
|
|
|
76
83
|
enableFolderExpiry,
|
|
77
84
|
customCredentials: null,
|
|
78
85
|
providerSpecifics: implementation,
|
|
86
|
+
forcePathStyle: false,
|
|
79
87
|
})).bucketName;
|
|
80
88
|
multiProgress.bucketProgress.doneIn = Date.now() - bucketStart;
|
|
81
89
|
updateProgress(false);
|
|
@@ -108,6 +116,17 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementatio
|
|
|
108
116
|
}
|
|
109
117
|
updateProgress(false);
|
|
110
118
|
},
|
|
119
|
+
onDiffingProgress(bytes, done) {
|
|
120
|
+
const previous = multiProgress.diffingProgress.bytesProcessed;
|
|
121
|
+
const newBytes = bytes - previous;
|
|
122
|
+
if (newBytes > 100000000 || done) {
|
|
123
|
+
multiProgress.diffingProgress = {
|
|
124
|
+
bytesProcessed: bytes,
|
|
125
|
+
doneIn: done ? Date.now() - bundleStart : null,
|
|
126
|
+
};
|
|
127
|
+
updateProgress(false);
|
|
128
|
+
}
|
|
129
|
+
},
|
|
111
130
|
onUploadProgress: (p) => {
|
|
112
131
|
multiProgress.deployProgress = {
|
|
113
132
|
sizeUploaded: p.sizeUploaded,
|
|
@@ -128,6 +147,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementatio
|
|
|
128
147
|
logLevel,
|
|
129
148
|
throwIfSiteExists,
|
|
130
149
|
providerSpecifics: implementation,
|
|
150
|
+
forcePathStyle: (_e = args_1.parsedLambdaCli['force-path-style']) !== null && _e !== void 0 ? _e : false,
|
|
131
151
|
});
|
|
132
152
|
const uploadDuration = Date.now() - uploadStart;
|
|
133
153
|
multiProgress.deployProgress = {
|
|
@@ -31,6 +31,7 @@ const sitesRmSubcommand = async (args, logLevel, implementation) => {
|
|
|
31
31
|
enableFolderExpiry: false,
|
|
32
32
|
customCredentials: null,
|
|
33
33
|
providerSpecifics: implementation,
|
|
34
|
+
forcePathStyle: false,
|
|
34
35
|
})).bucketName;
|
|
35
36
|
for (const siteName of args) {
|
|
36
37
|
const site = deployedSites.sites.find((s) => s.id === siteName.trim());
|
|
@@ -21,6 +21,7 @@ const sitesRmallSubcommand = async (logLevel, implementation) => {
|
|
|
21
21
|
enableFolderExpiry: false,
|
|
22
22
|
customCredentials: null,
|
|
23
23
|
providerSpecifics: implementation,
|
|
24
|
+
forcePathStyle: false,
|
|
24
25
|
})).bucketName;
|
|
25
26
|
for (const site of deployedSites.sites) {
|
|
26
27
|
if (!(await (0, confirm_1.confirmCli)({
|
|
@@ -2,4 +2,9 @@ import type { LogLevel } from '@remotion/renderer';
|
|
|
2
2
|
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
3
3
|
import type { AwsProvider } from '../../functions/aws-implementation';
|
|
4
4
|
export declare const STILL_COMMAND = "still";
|
|
5
|
-
export declare const stillCommand: (args
|
|
5
|
+
export declare const stillCommand: ({ args, remotionRoot, logLevel, implementation, }: {
|
|
6
|
+
args: string[];
|
|
7
|
+
remotionRoot: string;
|
|
8
|
+
logLevel: LogLevel;
|
|
9
|
+
implementation: ProviderSpecifics<AwsProvider>;
|
|
10
|
+
}) => Promise<void>;
|
|
@@ -26,7 +26,7 @@ const progress_1 = require("./render/progress");
|
|
|
26
26
|
const { offthreadVideoCacheSizeInBytesOption, scaleOption, deleteAfterOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, } = client_1.BrowserSafeApis.options;
|
|
27
27
|
const { parsedCli, determineFinalStillImageFormat, chalk, getCliOptions, formatBytes, getCompositionWithDimensionOverride, } = cli_1.CliInternals;
|
|
28
28
|
exports.STILL_COMMAND = 'still';
|
|
29
|
-
const stillCommand = async (args, remotionRoot, logLevel, implementation) => {
|
|
29
|
+
const stillCommand = async ({ args, remotionRoot, logLevel, implementation, }) => {
|
|
30
30
|
var _a, _b, _c, _d, _e;
|
|
31
31
|
const serveUrl = args[0];
|
|
32
32
|
if (!serveUrl) {
|
|
@@ -194,6 +194,7 @@ const stillCommand = async (args, remotionRoot, logLevel, implementation) => {
|
|
|
194
194
|
renderId: res.renderId,
|
|
195
195
|
logLevel,
|
|
196
196
|
providerSpecifics: implementation,
|
|
197
|
+
forcePathStyle: args_1.parsedLambdaCli['force-path-style'],
|
|
197
198
|
});
|
|
198
199
|
const relativePath = path_1.default.relative(process.cwd(), outputPath);
|
|
199
200
|
log_1.Log.info({ indent: false, logLevel }, chalk.blue('↓'.padEnd(cli_1.CliInternals.LABEL_WIDTH)), chalk.blue(cli_1.CliInternals.makeHyperlink({
|
|
@@ -18,5 +18,10 @@ export type DeployToS3Progress = {
|
|
|
18
18
|
doneIn: number | null;
|
|
19
19
|
stats: UploadStats | null;
|
|
20
20
|
};
|
|
21
|
+
export type DiffingProgress = {
|
|
22
|
+
doneIn: number | null;
|
|
23
|
+
bytesProcessed: number;
|
|
24
|
+
};
|
|
25
|
+
export declare const makeDiffingProgressBar: ({ bytesProcessed, doneIn, }: DiffingProgress) => string | null;
|
|
21
26
|
export declare const makeDeployProgressBar: ({ sizeUploaded, totalSize, doneIn, stats, }: DeployToS3Progress) => string;
|
|
22
27
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeDeployProgressBar = exports.makeBucketProgress = exports.makeBundleProgress = void 0;
|
|
3
|
+
exports.makeDeployProgressBar = exports.makeDiffingProgressBar = exports.makeBucketProgress = exports.makeBundleProgress = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
5
|
const no_react_1 = require("remotion/no-react");
|
|
6
6
|
const makeBundleProgress = ({ progress, doneIn }) => {
|
|
@@ -37,6 +37,24 @@ const makeUploadDiff = ({ stats }) => {
|
|
|
37
37
|
.filter(no_react_1.NoReactInternals.truthy)
|
|
38
38
|
.join(',')} ${total === 1 ? 'file' : 'files'})`);
|
|
39
39
|
};
|
|
40
|
+
const makeDiffingProgressBar = ({ bytesProcessed, doneIn, }) => {
|
|
41
|
+
const progress = doneIn === null ? 0 : 1;
|
|
42
|
+
if (bytesProcessed === 0) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return [
|
|
46
|
+
`${doneIn === null ? 'Calculating changes' : 'Calculated changes'}`.padEnd(cli_1.CliInternals.LABEL_WIDTH, ' '),
|
|
47
|
+
cli_1.CliInternals.makeProgressBar(progress, false),
|
|
48
|
+
doneIn === null
|
|
49
|
+
? bytesProcessed === 0
|
|
50
|
+
? null
|
|
51
|
+
: `${cli_1.CliInternals.formatBytes(bytesProcessed)}`
|
|
52
|
+
: cli_1.CliInternals.chalk.gray(`${doneIn}ms`),
|
|
53
|
+
]
|
|
54
|
+
.filter(no_react_1.NoReactInternals.truthy)
|
|
55
|
+
.join(' ');
|
|
56
|
+
};
|
|
57
|
+
exports.makeDiffingProgressBar = makeDiffingProgressBar;
|
|
40
58
|
const makeDeployProgressBar = ({ sizeUploaded, totalSize, doneIn, stats, }) => {
|
|
41
59
|
const progress = totalSize === null ? 0 : sizeUploaded / totalSize;
|
|
42
60
|
return [
|
package/dist/cli/index.js
CHANGED
|
@@ -49,7 +49,12 @@ const matchCommand = (args, remotionRoot, logLevel, implementation) => {
|
|
|
49
49
|
return (0, render_1.renderCommand)(args.slice(1), remotionRoot, logLevel, implementation);
|
|
50
50
|
}
|
|
51
51
|
if (args[0] === still_1.STILL_COMMAND) {
|
|
52
|
-
return (0, still_1.stillCommand)(
|
|
52
|
+
return (0, still_1.stillCommand)({
|
|
53
|
+
args: args.slice(1),
|
|
54
|
+
remotionRoot,
|
|
55
|
+
logLevel,
|
|
56
|
+
implementation,
|
|
57
|
+
});
|
|
53
58
|
}
|
|
54
59
|
if (args[0] === compositions_1.COMPOSITIONS_COMMAND) {
|
|
55
60
|
return (0, compositions_1.compositionsCommand)(args.slice(1), logLevel);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkIfRenderExists = void 0;
|
|
4
|
+
const constants_1 = require("../../shared/constants");
|
|
5
|
+
const checkIfRenderExists = (contents, renderId, bucketName, region) => {
|
|
6
|
+
const initializedExists = Boolean(contents.find((c) => {
|
|
7
|
+
var _a;
|
|
8
|
+
return (_a = c.Key) === null || _a === void 0 ? void 0 : _a.startsWith((0, constants_1.initalizedMetadataKey)(renderId));
|
|
9
|
+
}));
|
|
10
|
+
if (!initializedExists) {
|
|
11
|
+
// ! Error message is checked in progress handler and will be retried. Make sure to update
|
|
12
|
+
throw new TypeError(`No render with ID "${renderId}" found in bucket ${bucketName} and region ${region}`);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.checkIfRenderExists = checkIfRenderExists;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { CloudProvider, ProviderSpecifics } from '@remotion/serverless';
|
|
2
2
|
import type { SerializedInputProps } from '@remotion/serverless/client';
|
|
3
|
-
export declare const cleanupProps: <Provider extends CloudProvider<string, Record<string, unknown>>>({ serializedResolvedProps, inputProps, providerSpecifics, }: {
|
|
3
|
+
export declare const cleanupProps: <Provider extends CloudProvider<string, Record<string, unknown>>>({ serializedResolvedProps, inputProps, providerSpecifics, forcePathStyle, }: {
|
|
4
4
|
serializedResolvedProps: SerializedInputProps;
|
|
5
5
|
inputProps: SerializedInputProps;
|
|
6
6
|
providerSpecifics: ProviderSpecifics<Provider>;
|
|
7
|
-
|
|
7
|
+
forcePathStyle: boolean;
|
|
8
|
+
}) => Promise<[
|
|
9
|
+
number,
|
|
10
|
+
number
|
|
11
|
+
]>;
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.cleanupProps = void 0;
|
|
4
4
|
const cleanup_serialized_input_props_1 = require("../../shared/cleanup-serialized-input-props");
|
|
5
|
-
const cleanupProps = ({ serializedResolvedProps, inputProps, providerSpecifics, }) => {
|
|
5
|
+
const cleanupProps = ({ serializedResolvedProps, inputProps, providerSpecifics, forcePathStyle, }) => {
|
|
6
6
|
const cleanupSerializedInputPropsProm = (0, cleanup_serialized_input_props_1.cleanupSerializedInputProps)({
|
|
7
7
|
region: providerSpecifics.getCurrentRegionInFunction(),
|
|
8
8
|
serialized: inputProps,
|
|
9
9
|
providerSpecifics,
|
|
10
|
+
forcePathStyle,
|
|
10
11
|
});
|
|
11
12
|
const cleanupResolvedInputPropsProm = (0, cleanup_serialized_input_props_1.cleanupSerializedResolvedProps)({
|
|
12
13
|
region: providerSpecifics.getCurrentRegionInFunction(),
|
|
13
14
|
serialized: serializedResolvedProps,
|
|
14
15
|
providerSpecifics,
|
|
16
|
+
forcePathStyle,
|
|
15
17
|
});
|
|
16
18
|
return Promise.all([
|
|
17
19
|
cleanupSerializedInputPropsProm,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { _Object } from '@aws-sdk/client-s3';
|
|
2
|
+
import type { AwsRegion } from '../../pricing/aws-regions';
|
|
3
|
+
import type { CleanupJob } from './get-files-to-delete';
|
|
4
|
+
export declare const cleanupFiles: ({ bucket, region, contents, jobs, }: {
|
|
5
|
+
bucket: string;
|
|
6
|
+
region: AwsRegion;
|
|
7
|
+
contents: _Object[];
|
|
8
|
+
jobs: CleanupJob[];
|
|
9
|
+
}) => Promise<number>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cleanupFiles = void 0;
|
|
4
|
+
const clean_items_1 = require("../../api/clean-items");
|
|
5
|
+
const cleanupFiles = async ({ bucket, region, contents, jobs, }) => {
|
|
6
|
+
const start = Date.now();
|
|
7
|
+
await (0, clean_items_1.cleanItems)({
|
|
8
|
+
bucket,
|
|
9
|
+
region,
|
|
10
|
+
list: jobs.map((item) => {
|
|
11
|
+
var _a;
|
|
12
|
+
if (item.type === 'exact') {
|
|
13
|
+
return item.name;
|
|
14
|
+
}
|
|
15
|
+
if (item.type === 'prefix') {
|
|
16
|
+
return (_a = contents.find((c) => { var _a; return (_a = c.Key) === null || _a === void 0 ? void 0 : _a.startsWith(item.name); })) === null || _a === void 0 ? void 0 : _a.Key;
|
|
17
|
+
}
|
|
18
|
+
throw new Error('unexpected in deleteChunks()');
|
|
19
|
+
}),
|
|
20
|
+
onAfterItemDeleted: () => undefined,
|
|
21
|
+
onBeforeItemDeleted: () => undefined,
|
|
22
|
+
});
|
|
23
|
+
return Date.now() - start;
|
|
24
|
+
};
|
|
25
|
+
exports.cleanupFiles = cleanupFiles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { CustomCredentials, OutNameInput } from '@remotion/serverless/client';
|
|
2
2
|
import type { OutNameOutput, RenderMetadata } from '../../defaults';
|
|
3
3
|
export declare const getCredentialsFromOutName: <Region extends string>(name: OutNameInput<Region> | null) => CustomCredentials<Region> | null;
|
|
4
|
-
export declare const getExpectedOutName: <Region extends string>(renderMetadata: RenderMetadata
|
|
4
|
+
export declare const getExpectedOutName: <Region extends string>(renderMetadata: RenderMetadata<Region>, bucketName: string, customCredentials: CustomCredentials<Region> | null) => OutNameOutput<Region>;
|
|
@@ -3,11 +3,12 @@ import { type CustomCredentials, type RenderMetadata } from '@remotion/serverles
|
|
|
3
3
|
export type OutputFileMetadata = {
|
|
4
4
|
url: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const findOutputFileInBucket: <Provider extends CloudProvider<string, Record<string, unknown>>>({ region, renderMetadata, bucketName, customCredentials, currentRegion, providerSpecifics, }: {
|
|
6
|
+
export declare const findOutputFileInBucket: <Provider extends CloudProvider<string, Record<string, unknown>>>({ region, renderMetadata, bucketName, customCredentials, currentRegion, providerSpecifics, forcePathStyle, }: {
|
|
7
7
|
region: Provider["region"];
|
|
8
8
|
renderMetadata: RenderMetadata<Provider>;
|
|
9
9
|
bucketName: string;
|
|
10
10
|
customCredentials: CustomCredentials<Provider> | null;
|
|
11
11
|
currentRegion: Provider["region"];
|
|
12
12
|
providerSpecifics: ProviderSpecifics<Provider>;
|
|
13
|
+
forcePathStyle: boolean;
|
|
13
14
|
}) => Promise<OutputFileMetadata | null>;
|
|
@@ -4,7 +4,7 @@ exports.findOutputFileInBucket = void 0;
|
|
|
4
4
|
const client_1 = require("@remotion/serverless/client");
|
|
5
5
|
const suggested_policy_1 = require("../../api/iam-validation/suggested-policy");
|
|
6
6
|
const get_output_url_from_metadata_1 = require("./get-output-url-from-metadata");
|
|
7
|
-
const findOutputFileInBucket = async ({ region, renderMetadata, bucketName, customCredentials, currentRegion, providerSpecifics, }) => {
|
|
7
|
+
const findOutputFileInBucket = async ({ region, renderMetadata, bucketName, customCredentials, currentRegion, providerSpecifics, forcePathStyle, }) => {
|
|
8
8
|
if (!renderMetadata) {
|
|
9
9
|
throw new Error('unexpectedly did not get renderMetadata');
|
|
10
10
|
}
|
|
@@ -15,6 +15,7 @@ const findOutputFileInBucket = async ({ region, renderMetadata, bucketName, cust
|
|
|
15
15
|
key,
|
|
16
16
|
region,
|
|
17
17
|
customCredentials,
|
|
18
|
+
forcePathStyle,
|
|
18
19
|
});
|
|
19
20
|
return {
|
|
20
21
|
url: (0, get_output_url_from_metadata_1.getOutputUrlFromMetadata)(renderMetadata, bucketName, customCredentials, currentRegion).url,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ChromiumOptions, LogLevel, openBrowser } from '@remotion/renderer';
|
|
2
|
-
import type {
|
|
3
|
-
import type { Await } from '@remotion/serverless/client';
|
|
2
|
+
import type { Await } from '../../shared/await';
|
|
4
3
|
type LaunchedBrowser = {
|
|
5
4
|
instance: Await<ReturnType<typeof openBrowser>>;
|
|
6
5
|
configurationString: string;
|
|
7
6
|
};
|
|
8
7
|
export declare const forgetBrowserEventLoop: (logLevel: LogLevel) => void;
|
|
9
|
-
export declare const getBrowserInstance: (logLevel: LogLevel, indent: boolean, chromiumOptions: ChromiumOptions
|
|
8
|
+
export declare const getBrowserInstance: (logLevel: LogLevel, indent: boolean, chromiumOptions: ChromiumOptions) => Promise<LaunchedBrowser>;
|
|
10
9
|
export {};
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getBrowserInstance = exports.forgetBrowserEventLoop = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const version_1 = require("remotion/version");
|
|
6
|
+
const get_chromium_executable_path_1 = require("./get-chromium-executable-path");
|
|
6
7
|
const makeConfigurationString = (options, logLevel) => {
|
|
7
8
|
var _a, _b, _c;
|
|
8
9
|
return [
|
|
@@ -36,7 +37,7 @@ const forgetBrowserEventLoop = (logLevel) => {
|
|
|
36
37
|
_browserInstance === null || _browserInstance === void 0 ? void 0 : _browserInstance.instance.forgetEventLoop();
|
|
37
38
|
};
|
|
38
39
|
exports.forgetBrowserEventLoop = forgetBrowserEventLoop;
|
|
39
|
-
const getBrowserInstance = async (logLevel, indent, chromiumOptions
|
|
40
|
+
const getBrowserInstance = async (logLevel, indent, chromiumOptions) => {
|
|
40
41
|
var _a;
|
|
41
42
|
const actualChromiumOptions = {
|
|
42
43
|
...chromiumOptions,
|
|
@@ -56,7 +57,7 @@ const getBrowserInstance = async (logLevel, indent, chromiumOptions, providerSpe
|
|
|
56
57
|
if (!_browserInstance) {
|
|
57
58
|
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, 'Cold Lambda function, launching new browser instance');
|
|
58
59
|
launching = true;
|
|
59
|
-
const execPath =
|
|
60
|
+
const execPath = (0, get_chromium_executable_path_1.executablePath)();
|
|
60
61
|
const instance = await renderer_1.RenderInternals.internalOpenBrowser({
|
|
61
62
|
browser: 'chrome',
|
|
62
63
|
browserExecutable: execPath,
|
|
@@ -90,7 +91,7 @@ const getBrowserInstance = async (logLevel, indent, chromiumOptions, providerSpe
|
|
|
90
91
|
_browserInstance.instance.rememberEventLoop();
|
|
91
92
|
await _browserInstance.instance.close(true, logLevel, indent);
|
|
92
93
|
_browserInstance = null;
|
|
93
|
-
return (0, exports.getBrowserInstance)(logLevel, indent, chromiumOptions
|
|
94
|
+
return (0, exports.getBrowserInstance)(logLevel, indent, chromiumOptions);
|
|
94
95
|
}
|
|
95
96
|
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, 'Warm Lambda function, reusing browser instance');
|
|
96
97
|
_browserInstance.instance.rememberEventLoop();
|