@remotion/lambda 4.0.179 → 4.0.180
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/deploy-site.d.ts +3 -3
- package/dist/api/upload-dir.js +30 -31
- package/dist/cli/commands/still.js +7 -4
- package/dist/functions/helpers/cleanup-props.d.ts +1 -4
- package/dist/internals.d.ts +5 -5
- package/dist/shared/is-flaky-error.js +1 -0
- package/package.json +9 -9
- package/remotionlambda-arm64.zip +0 -0
|
@@ -59,11 +59,11 @@ export declare const internalDeploySite: (args_0: MandatoryParameters & {
|
|
|
59
59
|
getValue: ({ commandLine }: {
|
|
60
60
|
commandLine: Record<string, unknown>;
|
|
61
61
|
}) => {
|
|
62
|
-
value: "
|
|
62
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
63
63
|
source: string;
|
|
64
64
|
};
|
|
65
|
-
setConfig: (newLogLevel: "
|
|
66
|
-
type: "
|
|
65
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
66
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
67
67
|
};
|
|
68
68
|
readonly throwIfSiteExists: {
|
|
69
69
|
cliFlag: string;
|
package/dist/api/upload-dir.js
CHANGED
|
@@ -9,8 +9,8 @@ const mime_types_1 = __importDefault(require("mime-types"));
|
|
|
9
9
|
const node_fs_1 = require("node:fs");
|
|
10
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
11
11
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
12
|
-
const chunk_1 = require("../shared/chunk");
|
|
13
12
|
const make_s3_key_1 = require("../shared/make-s3-key");
|
|
13
|
+
const p_limit_1 = require("../shared/p-limit");
|
|
14
14
|
const getDirFiles = (entry) => {
|
|
15
15
|
throw new TypeError('should only be executed in test ' + JSON.stringify(entry));
|
|
16
16
|
};
|
|
@@ -45,6 +45,7 @@ async function getFiles(directory, originalDirectory, toUpload) {
|
|
|
45
45
|
}));
|
|
46
46
|
return _files.flat(1);
|
|
47
47
|
}
|
|
48
|
+
const limit = (0, p_limit_1.pLimit)(50);
|
|
48
49
|
const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, }) => {
|
|
49
50
|
const files = await getFiles(localDir, localDir, toUpload);
|
|
50
51
|
const progresses = {};
|
|
@@ -52,38 +53,36 @@ const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, priv
|
|
|
52
53
|
progresses[file.name] = 0;
|
|
53
54
|
}
|
|
54
55
|
const client = (0, aws_clients_1.getS3Client)(region, null);
|
|
55
|
-
const chunkedFiles = (0, chunk_1.chunk)(files, 200);
|
|
56
56
|
const uploadAll = (async () => {
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
paralellUploads3.on('httpUploadProgress', (progress) => {
|
|
80
|
-
var _a;
|
|
81
|
-
progresses[filePath.name] = (_a = progress.loaded) !== null && _a !== void 0 ? _a : 0;
|
|
82
|
-
});
|
|
83
|
-
return paralellUploads3.done();
|
|
57
|
+
const uploads = files.map((filePath) => limit(async () => {
|
|
58
|
+
const Key = (0, make_s3_key_1.makeS3Key)(keyPrefix, localDir, filePath.name);
|
|
59
|
+
const Body = (0, node_fs_1.createReadStream)(filePath.name);
|
|
60
|
+
const ContentType = mime_types_1.default.lookup(Key) || 'application/octet-stream';
|
|
61
|
+
const ACL = privacy === 'no-acl'
|
|
62
|
+
? undefined
|
|
63
|
+
: privacy === 'private'
|
|
64
|
+
? 'private'
|
|
65
|
+
: 'public-read';
|
|
66
|
+
const paralellUploads3 = new lib_storage_1.Upload({
|
|
67
|
+
client,
|
|
68
|
+
queueSize: 4,
|
|
69
|
+
partSize: 5 * 1024 * 1024,
|
|
70
|
+
params: {
|
|
71
|
+
Key,
|
|
72
|
+
Bucket: bucket,
|
|
73
|
+
Body,
|
|
74
|
+
ACL,
|
|
75
|
+
ContentType,
|
|
76
|
+
},
|
|
84
77
|
});
|
|
85
|
-
|
|
86
|
-
|
|
78
|
+
paralellUploads3.on('httpUploadProgress', (progress) => {
|
|
79
|
+
var _a;
|
|
80
|
+
progresses[filePath.name] = (_a = progress.loaded) !== null && _a !== void 0 ? _a : 0;
|
|
81
|
+
});
|
|
82
|
+
const prom = await paralellUploads3.done();
|
|
83
|
+
return prom;
|
|
84
|
+
}));
|
|
85
|
+
await Promise.all(uploads);
|
|
87
86
|
})();
|
|
88
87
|
const interval = setInterval(() => {
|
|
89
88
|
onProgress({
|
|
@@ -174,10 +174,13 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
|
174
174
|
});
|
|
175
175
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Render ID: ${cli_1.CliInternals.makeHyperlink({ text: res.renderId, fallback: res.renderId, url: (0, get_aws_urls_1.getS3RenderUrl)({ bucketName: res.bucketName, renderId: res.renderId, region: (0, get_aws_region_1.getAwsRegion)() }) })}`));
|
|
176
176
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Bucket: ${cli_1.CliInternals.makeHyperlink({ text: res.bucketName, fallback: res.bucketName, url: `https://${(0, get_aws_region_1.getAwsRegion)()}.console.aws.amazon.com/s3/buckets/${res.bucketName}/?region=${(0, get_aws_region_1.getAwsRegion)()}` })}`));
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
const artifactProgress = (0, progress_1.makeArtifactProgress)(res.artifacts);
|
|
178
|
+
if (artifactProgress) {
|
|
179
|
+
log_1.Log.info({
|
|
180
|
+
indent: false,
|
|
181
|
+
logLevel,
|
|
182
|
+
}, (0, progress_1.makeArtifactProgress)(res.artifacts));
|
|
183
|
+
}
|
|
181
184
|
log_1.Log.info({ indent: false, logLevel }, chalk.blue('+ S3'.padEnd(cli_1.CliInternals.LABEL_WIDTH)), chalk.blue(cli_1.CliInternals.makeHyperlink({
|
|
182
185
|
fallback: res.url,
|
|
183
186
|
url: res.url,
|
|
@@ -2,7 +2,4 @@ import type { SerializedInputProps } from '../../defaults';
|
|
|
2
2
|
export declare const cleanupProps: ({ serializedResolvedProps, inputProps, }: {
|
|
3
3
|
serializedResolvedProps: SerializedInputProps;
|
|
4
4
|
inputProps: SerializedInputProps;
|
|
5
|
-
}) => Promise<[
|
|
6
|
-
number,
|
|
7
|
-
number
|
|
8
|
-
]>;
|
|
5
|
+
}) => Promise<[number, number]>;
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const LambdaInternals: {
|
|
2
|
-
executeCommand: (args: string[], remotionRoot: string, logLevel: "
|
|
2
|
+
executeCommand: (args: string[], remotionRoot: string, logLevel: "error" | "verbose" | "info" | "warn") => Promise<void>;
|
|
3
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("./defaults").LambdaStartPayload>;
|
|
4
4
|
getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, }: import("./client").GetRenderProgressInput) => import("./defaults").LambdaStatusPayload;
|
|
5
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<{
|
|
@@ -14,7 +14,7 @@ export declare const LambdaInternals: {
|
|
|
14
14
|
maxRetries: number;
|
|
15
15
|
frame: number;
|
|
16
16
|
privacy: import("./defaults").Privacy;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
18
18
|
outName: import("./defaults").OutNameInput | null;
|
|
19
19
|
timeoutInMilliseconds: number;
|
|
20
20
|
chromiumOptions: import("@remotion/renderer").ChromiumOptions;
|
|
@@ -57,11 +57,11 @@ export declare const LambdaInternals: {
|
|
|
57
57
|
getValue: ({ commandLine }: {
|
|
58
58
|
commandLine: Record<string, unknown>;
|
|
59
59
|
}) => {
|
|
60
|
-
value: "
|
|
60
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
61
61
|
source: string;
|
|
62
62
|
};
|
|
63
|
-
setConfig: (newLogLevel: "
|
|
64
|
-
type: "
|
|
63
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
64
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
65
65
|
};
|
|
66
66
|
readonly throwIfSiteExists: {
|
|
67
67
|
cliFlag: string;
|
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.180",
|
|
7
7
|
"description": "Render Remotion videos on AWS Lambda",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -22,11 +22,11 @@
|
|
|
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/
|
|
26
|
-
"@remotion/
|
|
27
|
-
"@remotion/
|
|
28
|
-
"remotion": "4.0.
|
|
29
|
-
"@remotion/
|
|
25
|
+
"@remotion/bundler": "4.0.180",
|
|
26
|
+
"@remotion/streaming": "4.0.180",
|
|
27
|
+
"@remotion/renderer": "4.0.180",
|
|
28
|
+
"remotion": "4.0.180",
|
|
29
|
+
"@remotion/cli": "4.0.180"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/mime-types": "2.1.1",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"pureimage": "0.4.13",
|
|
36
36
|
"vitest": "0.31.1",
|
|
37
37
|
"zip-lib": "^0.7.2",
|
|
38
|
-
"@remotion/bundler": "4.0.
|
|
39
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
38
|
+
"@remotion/bundler": "4.0.180",
|
|
39
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.180"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@remotion/bundler": "4.0.
|
|
42
|
+
"@remotion/bundler": "4.0.180"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|