@remotion/lambda 4.0.248 → 4.0.249
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/express-webhook.d.ts +3 -0
- package/dist/api/express-webhook.js +46 -0
- package/dist/api/pages-router-webhook.d.ts +2 -0
- package/dist/api/pages-router-webhook.js +4 -3
- package/dist/cli/log.d.ts +3 -3
- package/dist/client.d.ts +1 -0
- package/dist/client.js +3 -1
- package/dist/shared/constants.d.ts +1 -0
- package/dist/shared/constants.js +3 -1
- package/package.json +17 -15
- package/remotionlambda-arm64.zip +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expressWebhook = void 0;
|
|
4
|
+
const pages_router_webhook_1 = require("./pages-router-webhook");
|
|
5
|
+
const validate_webhook_signature_1 = require("./validate-webhook-signature");
|
|
6
|
+
const expressWebhook = (options) => {
|
|
7
|
+
const { testing, extraHeaders, secret, onSuccess, onTimeout, onError } = options;
|
|
8
|
+
return (req, res) => {
|
|
9
|
+
// add headers to enable testing
|
|
10
|
+
if (testing) {
|
|
11
|
+
const testingheaders = {
|
|
12
|
+
'Access-Control-Allow-Origin': 'https://www.remotion.dev',
|
|
13
|
+
'Access-Control-Allow-Headers': 'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version, X-Remotion-Status, X-Remotion-Signature, X-Remotion-Mode',
|
|
14
|
+
'Access-Control-Allow-Methods': 'OPTIONS,POST',
|
|
15
|
+
};
|
|
16
|
+
(0, pages_router_webhook_1.addHeaders)(res, testingheaders);
|
|
17
|
+
}
|
|
18
|
+
// add extra headers
|
|
19
|
+
(0, pages_router_webhook_1.addHeaders)(res, extraHeaders || {});
|
|
20
|
+
// dont go forward if just testing
|
|
21
|
+
if (req.method === 'OPTIONS') {
|
|
22
|
+
res.status(200).end();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
// validate the webhook signature
|
|
26
|
+
(0, validate_webhook_signature_1.validateWebhookSignature)({
|
|
27
|
+
signatureHeader: req.header('X-Remotion-Signature'),
|
|
28
|
+
body: req.body,
|
|
29
|
+
secret,
|
|
30
|
+
});
|
|
31
|
+
// custom logic
|
|
32
|
+
const payload = req.body;
|
|
33
|
+
if (payload.type === 'success' && onSuccess) {
|
|
34
|
+
onSuccess(payload);
|
|
35
|
+
}
|
|
36
|
+
else if (payload.type === 'error' && onError) {
|
|
37
|
+
onError(payload);
|
|
38
|
+
}
|
|
39
|
+
else if (payload.type === 'timeout' && onTimeout) {
|
|
40
|
+
onTimeout(payload);
|
|
41
|
+
}
|
|
42
|
+
// send response
|
|
43
|
+
res.status(200).json({ success: true });
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
exports.expressWebhook = expressWebhook;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Response } from 'express';
|
|
1
2
|
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
2
3
|
import type { NextWebhookArgs } from './app-router-webhook';
|
|
4
|
+
export declare const addHeaders: (res: NextApiResponse | Response, headers: Record<string, string>) => void;
|
|
3
5
|
export declare const pagesRouterWebhook: (options: NextWebhookArgs) => (req: NextApiRequest, res: NextApiResponse) => void;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pagesRouterWebhook = void 0;
|
|
3
|
+
exports.pagesRouterWebhook = exports.addHeaders = void 0;
|
|
4
4
|
const validate_webhook_signature_1 = require("./validate-webhook-signature");
|
|
5
5
|
const addHeaders = (res, headers) => {
|
|
6
6
|
Object.entries(headers).forEach(([key, value]) => {
|
|
7
7
|
res.setHeader(key, value);
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
exports.addHeaders = addHeaders;
|
|
10
11
|
const pagesRouterWebhook = (options) => {
|
|
11
12
|
const { testing, extraHeaders, secret, onSuccess, onTimeout, onError } = options;
|
|
12
13
|
return function (req, res) {
|
|
13
|
-
addHeaders(res, extraHeaders || {});
|
|
14
|
+
(0, exports.addHeaders)(res, extraHeaders || {});
|
|
14
15
|
if (testing) {
|
|
15
16
|
const testingheaders = {
|
|
16
17
|
'Access-Control-Allow-Origin': 'https://www.remotion.dev',
|
|
17
18
|
'Access-Control-Allow-Headers': 'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version, X-Remotion-Status, X-Remotion-Signature, X-Remotion-Mode',
|
|
18
19
|
'Access-Control-Allow-Methods': 'OPTIONS,POST',
|
|
19
20
|
};
|
|
20
|
-
addHeaders(res, testingheaders);
|
|
21
|
+
(0, exports.addHeaders)(res, testingheaders);
|
|
21
22
|
}
|
|
22
23
|
if (req.method === 'OPTIONS') {
|
|
23
24
|
res.status(200).end();
|
package/dist/cli/log.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const Log: {
|
|
2
|
-
verbose: (options: import("@remotion/renderer
|
|
2
|
+
verbose: (options: import("@remotion/renderer").LogOptions & {
|
|
3
3
|
tag?: string;
|
|
4
4
|
}, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
5
5
|
info: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
6
|
-
warn: (options: import("@remotion/renderer
|
|
7
|
-
error: (options: import("@remotion/renderer
|
|
6
|
+
warn: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
7
|
+
error: (options: import("@remotion/renderer").LogOptions & {
|
|
8
8
|
tag?: string;
|
|
9
9
|
}, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
10
10
|
};
|
package/dist/client.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export type { WebhookErrorPayload, WebhookPayload, WebhookSuccessPayload, Webhoo
|
|
|
2
2
|
export type { CustomCredentials, DeleteAfter } from '@remotion/serverless/client';
|
|
3
3
|
export { NextWebhookArgs, appRouterWebhook } from './api/app-router-webhook';
|
|
4
4
|
export { deleteRender, type DeleteRenderInput } from './api/delete-render';
|
|
5
|
+
export { expressWebhook } from './api/express-webhook';
|
|
5
6
|
export { getAwsClient, type GetAwsClientInput, type GetAwsClientOutput, } from './api/get-aws-client';
|
|
6
7
|
export { getCompositionsOnLambda, type GetCompositionsOnLambdaInput, type GetCompositionsOnLambdaOutput, } from './api/get-compositions-on-lambda';
|
|
7
8
|
export { getFunctions, type GetFunctionsInput } from './api/get-functions';
|
package/dist/client.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateWebhookSignature = exports.speculateFunctionName = exports.renderStillOnLambda = exports.renderVideoOnLambda = exports.renderMediaOnLambda = exports.presignUrl = exports.pagesRouterWebhook = exports.getSites = exports.getRenderProgress = exports.getFunctions = exports.getCompositionsOnLambda = exports.getAwsClient = exports.deleteRender = exports.appRouterWebhook = void 0;
|
|
3
|
+
exports.validateWebhookSignature = exports.speculateFunctionName = exports.renderStillOnLambda = exports.renderVideoOnLambda = exports.renderMediaOnLambda = exports.presignUrl = exports.pagesRouterWebhook = exports.getSites = exports.getRenderProgress = exports.getFunctions = exports.getCompositionsOnLambda = exports.getAwsClient = exports.expressWebhook = exports.deleteRender = exports.appRouterWebhook = void 0;
|
|
4
4
|
var app_router_webhook_1 = require("./api/app-router-webhook");
|
|
5
5
|
Object.defineProperty(exports, "appRouterWebhook", { enumerable: true, get: function () { return app_router_webhook_1.appRouterWebhook; } });
|
|
6
6
|
var delete_render_1 = require("./api/delete-render");
|
|
7
7
|
Object.defineProperty(exports, "deleteRender", { enumerable: true, get: function () { return delete_render_1.deleteRender; } });
|
|
8
|
+
var express_webhook_1 = require("./api/express-webhook");
|
|
9
|
+
Object.defineProperty(exports, "expressWebhook", { enumerable: true, get: function () { return express_webhook_1.expressWebhook; } });
|
|
8
10
|
var get_aws_client_1 = require("./api/get-aws-client");
|
|
9
11
|
Object.defineProperty(exports, "getAwsClient", { enumerable: true, get: function () { return get_aws_client_1.getAwsClient; } });
|
|
10
12
|
var get_compositions_on_lambda_1 = require("./api/get-compositions-on-lambda");
|
|
@@ -23,3 +23,4 @@ export declare const LAMBDA_INSIGHTS_PREFIX = "/aws/lambda-insights";
|
|
|
23
23
|
export declare const getSitesKey: (siteId: string) => string;
|
|
24
24
|
export type RenderProgress = GenericRenderProgress<AwsProvider>;
|
|
25
25
|
export declare const LAMBDA_CONCURRENCY_LIMIT_QUOTA = "L-B99A9384";
|
|
26
|
+
export declare const MINIMUM_FRAMES_PER_LAMBDA = 4;
|
package/dist/shared/constants.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = exports.getSitesKey = exports.LAMBDA_INSIGHTS_PREFIX = exports.LOG_GROUP_PREFIX = exports.RENDER_FN_PREFIX = exports.DEFAULT_CLOUDWATCH_RETENTION_PERIOD = exports.DEFAULT_OUTPUT_PRIVACY = exports.MIN_EPHEMERAL_STORAGE_IN_MB = exports.DEFAULT_EPHEMERAL_STORAGE_IN_MB = exports.MAX_EPHEMERAL_STORAGE_IN_MB = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_REGION = exports.BINARY_NAME = exports.DEFAULT_FRAMES_PER_LAMBDA = exports.MAX_TIMEOUT = exports.MIN_TIMEOUT = exports.DEFAULT_TIMEOUT = exports.DEFAULT_MEMORY_SIZE = exports.MAX_MEMORY = exports.MIN_MEMORY = void 0;
|
|
3
|
+
exports.MINIMUM_FRAMES_PER_LAMBDA = exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = exports.getSitesKey = exports.LAMBDA_INSIGHTS_PREFIX = exports.LOG_GROUP_PREFIX = exports.RENDER_FN_PREFIX = exports.DEFAULT_CLOUDWATCH_RETENTION_PERIOD = exports.DEFAULT_OUTPUT_PRIVACY = exports.MIN_EPHEMERAL_STORAGE_IN_MB = exports.DEFAULT_EPHEMERAL_STORAGE_IN_MB = exports.MAX_EPHEMERAL_STORAGE_IN_MB = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_REGION = exports.BINARY_NAME = exports.DEFAULT_FRAMES_PER_LAMBDA = exports.MAX_TIMEOUT = exports.MIN_TIMEOUT = exports.DEFAULT_TIMEOUT = exports.DEFAULT_MEMORY_SIZE = exports.MAX_MEMORY = exports.MIN_MEMORY = void 0;
|
|
4
|
+
const client_1 = require("@remotion/serverless/client");
|
|
4
5
|
const no_react_1 = require("remotion/no-react");
|
|
5
6
|
exports.MIN_MEMORY = 512;
|
|
6
7
|
exports.MAX_MEMORY = 10240;
|
|
@@ -25,3 +26,4 @@ exports.LAMBDA_INSIGHTS_PREFIX = '/aws/lambda-insights';
|
|
|
25
26
|
const getSitesKey = (siteId) => `sites/${siteId}`;
|
|
26
27
|
exports.getSitesKey = getSitesKey;
|
|
27
28
|
exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = 'L-B99A9384';
|
|
29
|
+
exports.MINIMUM_FRAMES_PER_LAMBDA = client_1.MINIMUM_FRAMES_PER_FUNCTIONS;
|
package/package.json
CHANGED
|
@@ -3,14 +3,13 @@
|
|
|
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.249",
|
|
7
7
|
"description": "Render Remotion videos on AWS Lambda",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
10
10
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@smithy/abort-controller": "3.1.1",
|
|
14
13
|
"@aws-sdk/client-cloudwatch-logs": "3.645.0",
|
|
15
14
|
"@aws-sdk/client-iam": "3.645.0",
|
|
16
15
|
"@aws-sdk/client-lambda": "3.645.0",
|
|
@@ -20,30 +19,33 @@
|
|
|
20
19
|
"@aws-sdk/credential-providers": "3.645.0",
|
|
21
20
|
"@aws-sdk/lib-storage": "3.645.0",
|
|
22
21
|
"@aws-sdk/s3-request-presigner": "3.645.0",
|
|
22
|
+
"@smithy/abort-controller": "3.1.1",
|
|
23
|
+
"@types/express": "^5.0.0",
|
|
24
|
+
"express": "4.21.0",
|
|
23
25
|
"mime-types": "2.1.34",
|
|
24
26
|
"zod": "3.22.3",
|
|
25
|
-
"@remotion/bundler": "4.0.
|
|
26
|
-
"@remotion/
|
|
27
|
-
"@remotion/
|
|
28
|
-
"@remotion/
|
|
29
|
-
"@remotion/
|
|
30
|
-
"@remotion/
|
|
31
|
-
"remotion": "4.0.
|
|
27
|
+
"@remotion/bundler": "4.0.249",
|
|
28
|
+
"@remotion/serverless": "4.0.249",
|
|
29
|
+
"@remotion/renderer": "4.0.249",
|
|
30
|
+
"@remotion/studio-server": "4.0.249",
|
|
31
|
+
"@remotion/cli": "4.0.249",
|
|
32
|
+
"@remotion/streaming": "4.0.249",
|
|
33
|
+
"remotion": "4.0.249"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
36
|
"@types/mime-types": "2.1.1",
|
|
35
37
|
"@types/minimist": "1.2.2",
|
|
36
38
|
"@types/prompt": "^1.1.0",
|
|
39
|
+
"eslint": "9.14.0",
|
|
40
|
+
"next": "15.1.2",
|
|
37
41
|
"pureimage": "0.4.13",
|
|
38
42
|
"zip-lib": "^0.7.2",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"@remotion/
|
|
42
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.248",
|
|
43
|
-
"@remotion/eslint-config-internal": "4.0.248"
|
|
43
|
+
"@remotion/bundler": "4.0.249",
|
|
44
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.249",
|
|
45
|
+
"@remotion/eslint-config-internal": "4.0.249"
|
|
44
46
|
},
|
|
45
47
|
"peerDependencies": {
|
|
46
|
-
"@remotion/bundler": "4.0.
|
|
48
|
+
"@remotion/bundler": "4.0.249"
|
|
47
49
|
},
|
|
48
50
|
"publishConfig": {
|
|
49
51
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|