@remotion/lambda-client 4.0.263 → 4.0.265
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-make.log +2 -2
- package/dist/esm/index.mjs +41 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -2
- package/dist/speculate-function-name.d.ts +1 -0
- package/dist/speculate-function-name.js +27 -8
- package/package.json +3 -3
- package/src/index.ts +2 -0
- package/src/speculate-function-name.ts +41 -8
- package/tsconfig.tsbuildinfo +1 -1
package/.turbo/turbo-make.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @remotion/lambda-client@4.0.
|
|
3
|
+
> @remotion/lambda-client@4.0.265 make /Users/jonathanburger/remotion/packages/lambda-client
|
|
4
4
|
> tsc -d && bun --env-file=../.env.bundle bundle.ts
|
|
5
5
|
|
|
6
|
-
[0m[2m[[
|
|
6
|
+
[0m[2m[[1m17.63ms[0m[2m][0m Generated.
|
package/dist/esm/index.mjs
CHANGED
|
@@ -230,7 +230,7 @@ var require_log_level = __commonJS((exports) => {
|
|
|
230
230
|
var require_version = __commonJS((exports) => {
|
|
231
231
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
232
232
|
exports.VERSION = undefined;
|
|
233
|
-
exports.VERSION = "4.0.
|
|
233
|
+
exports.VERSION = "4.0.265";
|
|
234
234
|
});
|
|
235
235
|
var require_find_closest_package_json = __commonJS((exports) => {
|
|
236
236
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
@@ -2301,7 +2301,7 @@ var validateFramesPerFunction = ({
|
|
|
2301
2301
|
};
|
|
2302
2302
|
var import_error_handling = __toESM(require_error_handling(), 1);
|
|
2303
2303
|
var import_streaming2 = __toESM(require_dist(), 1);
|
|
2304
|
-
var VERSION = "4.0.
|
|
2304
|
+
var VERSION = "4.0.265";
|
|
2305
2305
|
var min = (arr) => {
|
|
2306
2306
|
if (arr.length === 0) {
|
|
2307
2307
|
throw new Error("Array of 0 length");
|
|
@@ -5989,6 +5989,43 @@ var runtimePreferenceOptions = [
|
|
|
5989
5989
|
"cjk"
|
|
5990
5990
|
];
|
|
5991
5991
|
|
|
5992
|
+
// src/speculate-function-name.ts
|
|
5993
|
+
var innerSpeculateFunctionName = ({
|
|
5994
|
+
diskSizeInMb,
|
|
5995
|
+
memorySizeInMb,
|
|
5996
|
+
timeoutInSeconds
|
|
5997
|
+
}) => {
|
|
5998
|
+
return [
|
|
5999
|
+
`${RENDER_FN_PREFIX}${LAMBDA_VERSION_STRING}`,
|
|
6000
|
+
`mem${memorySizeInMb}mb`,
|
|
6001
|
+
`disk${diskSizeInMb}mb`,
|
|
6002
|
+
`${timeoutInSeconds}sec`
|
|
6003
|
+
].join("-");
|
|
6004
|
+
};
|
|
6005
|
+
var speculateFunctionName = ({
|
|
6006
|
+
memorySizeInMb,
|
|
6007
|
+
diskSizeInMb,
|
|
6008
|
+
timeoutInSeconds
|
|
6009
|
+
}) => {
|
|
6010
|
+
const memorySize = Number(memorySizeInMb);
|
|
6011
|
+
const diskSize = Number(diskSizeInMb);
|
|
6012
|
+
const timeout = Number(timeoutInSeconds);
|
|
6013
|
+
if (!Number.isInteger(memorySize) || memorySize <= 0) {
|
|
6014
|
+
throw new Error(`Memory size must be a positive integer. Received: ${memorySizeInMb}`);
|
|
6015
|
+
}
|
|
6016
|
+
if (!Number.isInteger(diskSize) || diskSize <= 0) {
|
|
6017
|
+
throw new Error(`Disk size must be a positive integer. Received: ${diskSizeInMb}`);
|
|
6018
|
+
}
|
|
6019
|
+
if (!Number.isInteger(timeout) || timeout <= 0) {
|
|
6020
|
+
throw new Error(`Timeout must be a positive integer. Received: ${timeoutInSeconds}`);
|
|
6021
|
+
}
|
|
6022
|
+
return innerSpeculateFunctionName({
|
|
6023
|
+
diskSizeInMb,
|
|
6024
|
+
memorySizeInMb,
|
|
6025
|
+
timeoutInSeconds
|
|
6026
|
+
});
|
|
6027
|
+
};
|
|
6028
|
+
|
|
5992
6029
|
// src/validate-webhook-signature.ts
|
|
5993
6030
|
var validateWebhookSignature = ({
|
|
5994
6031
|
secret,
|
|
@@ -6443,19 +6480,6 @@ var renderStillOnLambda = (input) => {
|
|
|
6443
6480
|
offthreadVideoThreads: input.offthreadVideoThreads ?? null
|
|
6444
6481
|
});
|
|
6445
6482
|
};
|
|
6446
|
-
// src/speculate-function-name.ts
|
|
6447
|
-
var speculateFunctionName = ({
|
|
6448
|
-
memorySizeInMb,
|
|
6449
|
-
diskSizeInMb,
|
|
6450
|
-
timeoutInSeconds
|
|
6451
|
-
}) => {
|
|
6452
|
-
return [
|
|
6453
|
-
`${RENDER_FN_PREFIX}${LAMBDA_VERSION_STRING}`,
|
|
6454
|
-
`mem${memorySizeInMb}mb`,
|
|
6455
|
-
`disk${diskSizeInMb}mb`,
|
|
6456
|
-
`${timeoutInSeconds}sec`
|
|
6457
|
-
].join("-");
|
|
6458
|
-
};
|
|
6459
6483
|
|
|
6460
6484
|
// src/index.ts
|
|
6461
6485
|
var LambdaClientInternals = {
|
|
@@ -6496,7 +6520,8 @@ var LambdaClientInternals = {
|
|
|
6496
6520
|
internalRenderMediaOnLambdaRaw,
|
|
6497
6521
|
cleanItems,
|
|
6498
6522
|
makeLambdaRenderStillPayload,
|
|
6499
|
-
getRenderProgressPayload
|
|
6523
|
+
getRenderProgressPayload,
|
|
6524
|
+
innerSpeculateFunctionName
|
|
6500
6525
|
};
|
|
6501
6526
|
export {
|
|
6502
6527
|
validateWebhookSignature,
|
package/dist/index.d.ts
CHANGED
|
@@ -120,4 +120,5 @@ export declare const LambdaClientInternals: {
|
|
|
120
120
|
}) => Promise<void[]>;
|
|
121
121
|
makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, apiKey, }: import("./render-still-on-lambda").RenderStillOnLambdaNonNullInput) => Promise<import("@remotion/serverless-client").ServerlessPayloads<import("./aws-provider").AwsProvider>[import("@remotion/serverless-client").ServerlessRoutines.still]>;
|
|
122
122
|
getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, forcePathStyle, }: import("./get-render-progress").GetRenderProgressInput) => import("@remotion/serverless-client").ServerlessStatusPayload<import("./aws-provider").AwsProvider>;
|
|
123
|
+
innerSpeculateFunctionName: ({ diskSizeInMb, memorySizeInMb, timeoutInSeconds, }: import("./speculate-function-name").SpeculateFunctionNameInput) => string;
|
|
123
124
|
};
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ const parse_function_name_1 = require("./parse-function-name");
|
|
|
22
22
|
const random_hash_1 = require("./random-hash");
|
|
23
23
|
const render_media_on_lambda_1 = require("./render-media-on-lambda");
|
|
24
24
|
const runtime_preference_1 = require("./runtime-preference");
|
|
25
|
+
const speculate_function_name_1 = require("./speculate-function-name");
|
|
25
26
|
const validate_aws_region_1 = require("./validate-aws-region");
|
|
26
27
|
const validate_bucketname_1 = require("./validate-bucketname");
|
|
27
28
|
const validate_disk_size_in_mb_1 = require("./validate-disk-size-in-mb");
|
|
@@ -58,8 +59,8 @@ Object.defineProperty(exports, "renderMediaOnLambda", { enumerable: true, get: f
|
|
|
58
59
|
Object.defineProperty(exports, "renderVideoOnLambda", { enumerable: true, get: function () { return render_media_on_lambda_2.renderVideoOnLambda; } });
|
|
59
60
|
var render_still_on_lambda_1 = require("./render-still-on-lambda");
|
|
60
61
|
Object.defineProperty(exports, "renderStillOnLambda", { enumerable: true, get: function () { return render_still_on_lambda_1.renderStillOnLambda; } });
|
|
61
|
-
var
|
|
62
|
-
Object.defineProperty(exports, "speculateFunctionName", { enumerable: true, get: function () { return
|
|
62
|
+
var speculate_function_name_2 = require("./speculate-function-name");
|
|
63
|
+
Object.defineProperty(exports, "speculateFunctionName", { enumerable: true, get: function () { return speculate_function_name_2.speculateFunctionName; } });
|
|
63
64
|
var validate_webhook_signature_1 = require("./validate-webhook-signature");
|
|
64
65
|
Object.defineProperty(exports, "validateWebhookSignature", { enumerable: true, get: function () { return validate_webhook_signature_1.validateWebhookSignature; } });
|
|
65
66
|
exports.LambdaClientInternals = {
|
|
@@ -101,4 +102,5 @@ exports.LambdaClientInternals = {
|
|
|
101
102
|
cleanItems: clean_items_1.cleanItems,
|
|
102
103
|
makeLambdaRenderStillPayload: make_lambda_payload_1.makeLambdaRenderStillPayload,
|
|
103
104
|
getRenderProgressPayload: make_lambda_payload_1.getRenderProgressPayload,
|
|
105
|
+
innerSpeculateFunctionName: speculate_function_name_1.innerSpeculateFunctionName,
|
|
104
106
|
};
|
|
@@ -3,4 +3,5 @@ export type SpeculateFunctionNameInput = {
|
|
|
3
3
|
diskSizeInMb: string | number;
|
|
4
4
|
timeoutInSeconds: string | number;
|
|
5
5
|
};
|
|
6
|
+
export declare const innerSpeculateFunctionName: ({ diskSizeInMb, memorySizeInMb, timeoutInSeconds, }: SpeculateFunctionNameInput) => string;
|
|
6
7
|
export declare const speculateFunctionName: ({ memorySizeInMb, diskSizeInMb, timeoutInSeconds, }: SpeculateFunctionNameInput) => string;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.speculateFunctionName = void 0;
|
|
3
|
+
exports.speculateFunctionName = exports.innerSpeculateFunctionName = void 0;
|
|
4
4
|
const constants_1 = require("./constants");
|
|
5
5
|
const lambda_version_string_1 = require("./lambda-version-string");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* @see [Documentation](https://remotion.dev/docs/lambda/speculatefunctionname)
|
|
9
|
-
*/
|
|
10
|
-
const speculateFunctionName = ({ memorySizeInMb, diskSizeInMb, timeoutInSeconds, }) => {
|
|
11
|
-
// find-function-name.ts uses this for templating
|
|
12
|
-
// consider this before adding any validation here
|
|
6
|
+
const innerSpeculateFunctionName = ({ diskSizeInMb, memorySizeInMb, timeoutInSeconds, }) => {
|
|
7
|
+
// No validation here, used in find-function-name.ts
|
|
13
8
|
return [
|
|
14
9
|
`${constants_1.RENDER_FN_PREFIX}${lambda_version_string_1.LAMBDA_VERSION_STRING}`,
|
|
15
10
|
`mem${memorySizeInMb}mb`,
|
|
@@ -17,4 +12,28 @@ const speculateFunctionName = ({ memorySizeInMb, diskSizeInMb, timeoutInSeconds,
|
|
|
17
12
|
`${timeoutInSeconds}sec`,
|
|
18
13
|
].join('-');
|
|
19
14
|
};
|
|
15
|
+
exports.innerSpeculateFunctionName = innerSpeculateFunctionName;
|
|
16
|
+
/*
|
|
17
|
+
* @description Speculate the name of the Lambda function that will be created by `deployFunction()` or its CLI equivalent, based on the function configuration.
|
|
18
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/speculatefunctionname)
|
|
19
|
+
*/
|
|
20
|
+
const speculateFunctionName = ({ memorySizeInMb, diskSizeInMb, timeoutInSeconds, }) => {
|
|
21
|
+
const memorySize = Number(memorySizeInMb);
|
|
22
|
+
const diskSize = Number(diskSizeInMb);
|
|
23
|
+
const timeout = Number(timeoutInSeconds);
|
|
24
|
+
if (!Number.isInteger(memorySize) || memorySize <= 0) {
|
|
25
|
+
throw new Error(`Memory size must be a positive integer. Received: ${memorySizeInMb}`);
|
|
26
|
+
}
|
|
27
|
+
if (!Number.isInteger(diskSize) || diskSize <= 0) {
|
|
28
|
+
throw new Error(`Disk size must be a positive integer. Received: ${diskSizeInMb}`);
|
|
29
|
+
}
|
|
30
|
+
if (!Number.isInteger(timeout) || timeout <= 0) {
|
|
31
|
+
throw new Error(`Timeout must be a positive integer. Received: ${timeoutInSeconds}`);
|
|
32
|
+
}
|
|
33
|
+
return (0, exports.innerSpeculateFunctionName)({
|
|
34
|
+
diskSizeInMb,
|
|
35
|
+
memorySizeInMb,
|
|
36
|
+
timeoutInSeconds,
|
|
37
|
+
});
|
|
38
|
+
};
|
|
20
39
|
exports.speculateFunctionName = speculateFunctionName;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda-client"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/lambda-client",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.265",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"eslint": "9.19.0",
|
|
26
26
|
"next": "15.1.6",
|
|
27
27
|
"@types/mime-types": "2.1.1",
|
|
28
|
-
"@remotion/serverless-client": "4.0.
|
|
29
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
28
|
+
"@remotion/serverless-client": "4.0.265",
|
|
29
|
+
"@remotion/eslint-config-internal": "4.0.265"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
package/src/index.ts
CHANGED
|
@@ -49,6 +49,7 @@ import {
|
|
|
49
49
|
renderMediaOnLambdaOptionalToRequired,
|
|
50
50
|
} from './render-media-on-lambda';
|
|
51
51
|
import {runtimePreferenceOptions} from './runtime-preference';
|
|
52
|
+
import {innerSpeculateFunctionName} from './speculate-function-name';
|
|
52
53
|
import {validateAwsRegion} from './validate-aws-region';
|
|
53
54
|
import {parseBucketName} from './validate-bucketname';
|
|
54
55
|
import {validateDiskSizeInMb} from './validate-disk-size-in-mb';
|
|
@@ -144,4 +145,5 @@ export const LambdaClientInternals = {
|
|
|
144
145
|
cleanItems,
|
|
145
146
|
makeLambdaRenderStillPayload,
|
|
146
147
|
getRenderProgressPayload,
|
|
148
|
+
innerSpeculateFunctionName,
|
|
147
149
|
};
|
|
@@ -7,17 +7,12 @@ export type SpeculateFunctionNameInput = {
|
|
|
7
7
|
timeoutInSeconds: string | number;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
* @description Speculate the name of the Lambda function that will be created by `deployFunction()` or its CLI equivalent, based on the function configuration.
|
|
12
|
-
* @see [Documentation](https://remotion.dev/docs/lambda/speculatefunctionname)
|
|
13
|
-
*/
|
|
14
|
-
export const speculateFunctionName = ({
|
|
15
|
-
memorySizeInMb,
|
|
10
|
+
export const innerSpeculateFunctionName = ({
|
|
16
11
|
diskSizeInMb,
|
|
12
|
+
memorySizeInMb,
|
|
17
13
|
timeoutInSeconds,
|
|
18
14
|
}: SpeculateFunctionNameInput) => {
|
|
19
|
-
// find-function-name.ts
|
|
20
|
-
// consider this before adding any validation here
|
|
15
|
+
// No validation here, used in find-function-name.ts
|
|
21
16
|
return [
|
|
22
17
|
`${RENDER_FN_PREFIX}${LAMBDA_VERSION_STRING}`,
|
|
23
18
|
`mem${memorySizeInMb}mb`,
|
|
@@ -25,3 +20,41 @@ export const speculateFunctionName = ({
|
|
|
25
20
|
`${timeoutInSeconds}sec`,
|
|
26
21
|
].join('-');
|
|
27
22
|
};
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* @description Speculate the name of the Lambda function that will be created by `deployFunction()` or its CLI equivalent, based on the function configuration.
|
|
26
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/speculatefunctionname)
|
|
27
|
+
*/
|
|
28
|
+
export const speculateFunctionName = ({
|
|
29
|
+
memorySizeInMb,
|
|
30
|
+
diskSizeInMb,
|
|
31
|
+
timeoutInSeconds,
|
|
32
|
+
}: SpeculateFunctionNameInput) => {
|
|
33
|
+
const memorySize = Number(memorySizeInMb);
|
|
34
|
+
const diskSize = Number(diskSizeInMb);
|
|
35
|
+
const timeout = Number(timeoutInSeconds);
|
|
36
|
+
|
|
37
|
+
if (!Number.isInteger(memorySize) || memorySize <= 0) {
|
|
38
|
+
throw new Error(
|
|
39
|
+
`Memory size must be a positive integer. Received: ${memorySizeInMb}`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (!Number.isInteger(diskSize) || diskSize <= 0) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
`Disk size must be a positive integer. Received: ${diskSizeInMb}`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (!Number.isInteger(timeout) || timeout <= 0) {
|
|
50
|
+
throw new Error(
|
|
51
|
+
`Timeout must be a positive integer. Received: ${timeoutInSeconds}`,
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return innerSpeculateFunctionName({
|
|
56
|
+
diskSizeInMb,
|
|
57
|
+
memorySizeInMb,
|
|
58
|
+
timeoutInSeconds,
|
|
59
|
+
});
|
|
60
|
+
};
|