@remotion/lambda 4.0.165 → 4.0.166
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/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
- package/dist/functions/helpers/check-if-render-exists.js +1 -1
- package/dist/functions/helpers/get-cleanup-progress.d.ts +1 -3
- package/dist/functions/helpers/get-cleanup-progress.js +1 -3
- package/dist/functions/helpers/get-custom-out-name.js +1 -0
- package/dist/functions/helpers/get-encoding-progress-step-size.d.ts +1 -1
- package/dist/functions/helpers/get-encoding-progress-step-size.js +3 -0
- package/dist/functions/helpers/get-files-to-delete.d.ts +1 -3
- package/dist/functions/helpers/get-files-to-delete.js +1 -35
- package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +1 -1
- package/dist/functions/helpers/get-lambdas-invoked-stats.js +1 -0
- package/dist/shared/aws-clients.js +6 -1
- package/dist/shared/chunk-progress.d.ts +1 -2
- package/dist/shared/chunk-progress.js +2 -2
- package/package.json +8 -8
- package/remotionlambda-arm64.zip +0 -0
|
@@ -5,7 +5,7 @@ const constants_1 = require("../../shared/constants");
|
|
|
5
5
|
const checkIfRenderExists = (contents, renderId, bucketName, region) => {
|
|
6
6
|
const initializedExists = Boolean(contents.find((c) => {
|
|
7
7
|
var _a;
|
|
8
|
-
return (_a = c.Key) === null || _a === void 0 ? void 0 : _a.startsWith((0, constants_1.
|
|
8
|
+
return (_a = c.Key) === null || _a === void 0 ? void 0 : _a.startsWith((0, constants_1.overallProgressKey)(renderId));
|
|
9
9
|
}));
|
|
10
10
|
if (!initializedExists) {
|
|
11
11
|
// ! Error message is checked in progress handler and will be retried. Make sure to update
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { _Object } from '@aws-sdk/client-s3';
|
|
2
2
|
import type { CleanupInfo } from '../../shared/constants';
|
|
3
|
-
export declare const getCleanupProgress: ({ contents, output, chunkCount, renderId,
|
|
3
|
+
export declare const getCleanupProgress: ({ contents, output, chunkCount, renderId, }: {
|
|
4
4
|
contents: _Object[];
|
|
5
5
|
output: string | null;
|
|
6
6
|
chunkCount: number;
|
|
7
7
|
renderId: string;
|
|
8
|
-
hasAudio: boolean;
|
|
9
|
-
hasVideo: boolean;
|
|
10
8
|
}) => null | CleanupInfo;
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCleanupProgress = void 0;
|
|
4
4
|
const get_files_to_delete_1 = require("./get-files-to-delete");
|
|
5
|
-
const getCleanupProgress = ({ contents, output, chunkCount, renderId,
|
|
5
|
+
const getCleanupProgress = ({ contents, output, chunkCount, renderId, }) => {
|
|
6
6
|
if (output === null) {
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
9
|
const filesToDelete = (0, get_files_to_delete_1.getFilesToDelete)({
|
|
10
10
|
chunkCount,
|
|
11
11
|
renderId,
|
|
12
|
-
hasAudio,
|
|
13
|
-
hasVideo,
|
|
14
12
|
});
|
|
15
13
|
const filesStillThere = contents.filter((c) => {
|
|
16
14
|
return filesToDelete.find((f) => {
|
|
@@ -20,6 +20,7 @@ const getCustomOutName = ({ renderMetadata, customCredentials, }) => {
|
|
|
20
20
|
endpoint: renderMetadata.outName.s3OutputProvider.endpoint,
|
|
21
21
|
accessKeyId: (_a = customCredentials === null || customCredentials === void 0 ? void 0 : customCredentials.accessKeyId) !== null && _a !== void 0 ? _a : null,
|
|
22
22
|
secretAccessKey: (_b = customCredentials === null || customCredentials === void 0 ? void 0 : customCredentials.secretAccessKey) !== null && _b !== void 0 ? _b : null,
|
|
23
|
+
region: customCredentials === null || customCredentials === void 0 ? void 0 : customCredentials.region,
|
|
23
24
|
},
|
|
24
25
|
};
|
|
25
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
declare const getEncodingProgressStepSize: (totalFrames: number) => number;
|
|
1
|
+
export declare const getEncodingProgressStepSize: (totalFrames: number) => number;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEncodingProgressStepSize = void 0;
|
|
2
4
|
const getEncodingProgressStepSize = (totalFrames) => {
|
|
3
5
|
return Math.min(100, Math.max(5, totalFrames / 10));
|
|
4
6
|
};
|
|
7
|
+
exports.getEncodingProgressStepSize = getEncodingProgressStepSize;
|
|
@@ -2,9 +2,7 @@ export type CleanupJob = {
|
|
|
2
2
|
name: string;
|
|
3
3
|
type: 'exact' | 'prefix';
|
|
4
4
|
};
|
|
5
|
-
export declare const getFilesToDelete: ({ chunkCount, renderId,
|
|
5
|
+
export declare const getFilesToDelete: ({ chunkCount, renderId, }: {
|
|
6
6
|
chunkCount: number;
|
|
7
7
|
renderId: string;
|
|
8
|
-
hasVideo: boolean;
|
|
9
|
-
hasAudio: boolean;
|
|
10
8
|
}) => CleanupJob[];
|
|
@@ -2,51 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFilesToDelete = void 0;
|
|
4
4
|
const constants_1 = require("../../shared/constants");
|
|
5
|
-
const getFilesToDelete = ({ chunkCount, renderId,
|
|
6
|
-
const videoChunks = hasVideo
|
|
7
|
-
? new Array(chunkCount).fill(true).map((_x, i) => (0, constants_1.chunkKeyForIndex)({
|
|
8
|
-
index: i,
|
|
9
|
-
renderId,
|
|
10
|
-
type: 'video',
|
|
11
|
-
}))
|
|
12
|
-
: [];
|
|
13
|
-
const audioChunks = hasAudio
|
|
14
|
-
? new Array(chunkCount).fill(true).map((_x, i) => (0, constants_1.chunkKeyForIndex)({
|
|
15
|
-
index: i,
|
|
16
|
-
renderId,
|
|
17
|
-
type: 'audio',
|
|
18
|
-
}))
|
|
19
|
-
: [];
|
|
5
|
+
const getFilesToDelete = ({ chunkCount, renderId, }) => {
|
|
20
6
|
const lambdaTimings = new Array(chunkCount)
|
|
21
7
|
.fill(true)
|
|
22
8
|
.map((_x, i) => (0, constants_1.lambdaTimingsPrefixForChunk)(renderId, i));
|
|
23
9
|
return [
|
|
24
|
-
{
|
|
25
|
-
name: (0, constants_1.lambdaChunkInitializedPrefix)(renderId),
|
|
26
|
-
type: 'prefix',
|
|
27
|
-
},
|
|
28
|
-
...videoChunks.map((i) => {
|
|
29
|
-
return {
|
|
30
|
-
name: i,
|
|
31
|
-
type: 'exact',
|
|
32
|
-
};
|
|
33
|
-
}),
|
|
34
|
-
...audioChunks.map((i) => {
|
|
35
|
-
return {
|
|
36
|
-
name: i,
|
|
37
|
-
type: 'exact',
|
|
38
|
-
};
|
|
39
|
-
}),
|
|
40
10
|
...lambdaTimings.map((i) => {
|
|
41
11
|
return {
|
|
42
12
|
name: i,
|
|
43
13
|
type: 'prefix',
|
|
44
14
|
};
|
|
45
15
|
}),
|
|
46
|
-
{
|
|
47
|
-
name: (0, constants_1.encodingProgressKey)(renderId),
|
|
48
|
-
type: 'exact',
|
|
49
|
-
},
|
|
50
16
|
];
|
|
51
17
|
};
|
|
52
18
|
exports.getFilesToDelete = getFilesToDelete;
|
|
@@ -167,7 +167,12 @@ const getCloudWatchLogsClient = (region) => {
|
|
|
167
167
|
};
|
|
168
168
|
exports.getCloudWatchLogsClient = getCloudWatchLogsClient;
|
|
169
169
|
const getS3Client = (region, customCredentials) => {
|
|
170
|
-
|
|
170
|
+
var _a;
|
|
171
|
+
return (0, exports.getServiceClient)({
|
|
172
|
+
region: (_a = customCredentials === null || customCredentials === void 0 ? void 0 : customCredentials.region) !== null && _a !== void 0 ? _a : region,
|
|
173
|
+
service: 's3',
|
|
174
|
+
customCredentials,
|
|
175
|
+
});
|
|
171
176
|
};
|
|
172
177
|
exports.getS3Client = getS3Client;
|
|
173
178
|
const getLambdaClient = (region,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export declare const writeLambdaInitializedFile: ({ bucketName, expectedBucketOwner, attempt, chunk, renderId,
|
|
1
|
+
export declare const writeLambdaInitializedFile: ({ bucketName, expectedBucketOwner, attempt, chunk, renderId, }: {
|
|
2
2
|
bucketName: string;
|
|
3
3
|
expectedBucketOwner: string;
|
|
4
4
|
renderId: string;
|
|
5
5
|
chunk: number;
|
|
6
6
|
attempt: number;
|
|
7
|
-
framesRendered: number;
|
|
8
7
|
}) => Promise<void>;
|
|
9
8
|
export declare const getProgressOfChunk: (etag: string) => number;
|
|
@@ -2010,11 +2010,11 @@ const etags = [
|
|
|
2010
2010
|
'"c5b2cebf15b205503560c4e8e6d1ea78"',
|
|
2011
2011
|
'"5ec829debe54b19a5f78d9a65b900a39"',
|
|
2012
2012
|
];
|
|
2013
|
-
const writeLambdaInitializedFile = ({ bucketName, expectedBucketOwner, attempt, chunk, renderId,
|
|
2013
|
+
const writeLambdaInitializedFile = ({ bucketName, expectedBucketOwner, attempt, chunk, renderId, }) => {
|
|
2014
2014
|
return (0, io_1.lambdaWriteFile)({
|
|
2015
2015
|
privacy: 'private',
|
|
2016
2016
|
bucketName,
|
|
2017
|
-
body:
|
|
2017
|
+
body: '0',
|
|
2018
2018
|
key: (0, constants_1.lambdaChunkInitializedKey)({
|
|
2019
2019
|
renderId,
|
|
2020
2020
|
chunk,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.166",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"@aws-sdk/s3-request-presigner": "3.583.0",
|
|
26
26
|
"mime-types": "2.1.34",
|
|
27
27
|
"zod": "3.22.3",
|
|
28
|
-
"@remotion/bundler": "4.0.
|
|
29
|
-
"@remotion/cli": "4.0.
|
|
30
|
-
"
|
|
31
|
-
"remotion": "4.0.
|
|
28
|
+
"@remotion/bundler": "4.0.166",
|
|
29
|
+
"@remotion/cli": "4.0.166",
|
|
30
|
+
"remotion": "4.0.166",
|
|
31
|
+
"@remotion/renderer": "4.0.166"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@jonny/eslint-config": "3.0.281",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"ts-node": "10.9.2",
|
|
45
45
|
"vitest": "0.31.1",
|
|
46
46
|
"zip-lib": "^0.7.2",
|
|
47
|
-
"@remotion/
|
|
48
|
-
"@remotion/
|
|
47
|
+
"@remotion/bundler": "4.0.166",
|
|
48
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.166"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@remotion/bundler": "4.0.
|
|
51
|
+
"@remotion/bundler": "4.0.166"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|