@remotion/lambda 4.0.244 → 4.0.246
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/LICENSE.md +1 -1
- package/dist/admin/make-layer-public.js +10 -11
- package/dist/api/app-router-webhook.d.ts +10 -0
- package/dist/api/app-router-webhook.js +43 -0
- package/dist/api/create-function.d.ts +1 -2
- package/dist/api/create-function.js +10 -10
- package/dist/api/delete-function.d.ts +4 -13
- package/dist/api/delete-function.js +2 -5
- package/dist/api/delete-render.d.ts +0 -8
- package/dist/api/delete-render.js +4 -10
- package/dist/api/delete-site.d.ts +0 -10
- package/dist/api/delete-site.js +4 -11
- package/dist/api/deploy-function.d.ts +8 -15
- package/dist/api/deploy-function.js +21 -27
- package/dist/api/deploy-site.d.ts +2 -11
- package/dist/api/deploy-site.js +14 -22
- package/dist/api/download-media.d.ts +0 -11
- package/dist/api/download-media.js +3 -12
- package/dist/api/estimate-price.d.ts +0 -6
- package/dist/api/estimate-price.js +1 -3
- package/dist/api/get-aws-client.d.ts +1 -9
- package/dist/api/get-aws-client.js +2 -6
- package/dist/api/get-compositions-on-lambda.d.ts +1 -14
- package/dist/api/get-compositions-on-lambda.js +12 -17
- package/dist/api/get-function-info.d.ts +1 -14
- package/dist/api/get-function-info.js +2 -5
- package/dist/api/get-functions.d.ts +1 -8
- package/dist/api/get-functions.js +2 -5
- package/dist/api/get-or-create-bucket.d.ts +0 -6
- package/dist/api/get-or-create-bucket.js +3 -5
- package/dist/api/get-regions.d.ts +0 -5
- package/dist/api/get-regions.js +3 -4
- package/dist/api/get-render-progress.d.ts +0 -10
- package/dist/api/get-render-progress.js +3 -11
- package/dist/api/get-sites.d.ts +0 -6
- package/dist/api/get-sites.js +4 -7
- package/dist/api/iam-validation/simulate.d.ts +0 -7
- package/dist/api/iam-validation/simulate.js +2 -5
- package/dist/api/iam-validation/suggested-policy.d.ts +0 -10
- package/dist/api/iam-validation/suggested-policy.js +2 -4
- package/dist/api/make-lambda-payload.d.ts +2 -1
- package/dist/api/make-lambda-payload.js +19 -13
- package/dist/api/pages-router-webhook.d.ts +3 -0
- package/dist/api/pages-router-webhook.js +47 -0
- package/dist/api/presign-url.d.ts +0 -10
- package/dist/api/presign-url.js +2 -8
- package/dist/api/render-media-on-lambda.d.ts +1 -20
- package/dist/api/render-media-on-lambda.js +4 -19
- package/dist/api/render-still-on-lambda.d.ts +2 -19
- package/dist/api/render-still-on-lambda.js +6 -17
- package/dist/api/speculate-function-name.d.ts +0 -8
- package/dist/api/speculate-function-name.js +3 -7
- package/dist/api/upload-dir.d.ts +1 -7
- package/dist/api/upload-dir.js +1 -5
- package/dist/api/validate-webhook-signature.d.ts +0 -8
- package/dist/api/validate-webhook-signature.js +3 -7
- package/dist/cli/args.d.ts +2 -1
- package/dist/cli/commands/compositions/index.d.ts +7 -1
- package/dist/cli/commands/compositions/index.js +2 -2
- package/dist/cli/commands/functions/deploy.d.ts +7 -1
- package/dist/cli/commands/functions/deploy.js +7 -2
- package/dist/cli/commands/functions/index.d.ts +8 -1
- package/dist/cli/commands/functions/index.js +8 -4
- package/dist/cli/commands/functions/ls.d.ts +6 -1
- package/dist/cli/commands/functions/ls.js +2 -3
- package/dist/cli/commands/functions/rmall.d.ts +6 -1
- package/dist/cli/commands/functions/rmall.js +2 -3
- package/dist/cli/commands/render/render.d.ts +6 -1
- package/dist/cli/commands/render/render.js +9 -7
- package/dist/cli/commands/sites/create.js +2 -0
- package/dist/cli/commands/sites/index.d.ts +1 -1
- package/dist/cli/commands/sites/index.js +4 -4
- package/dist/cli/commands/still.d.ts +2 -2
- package/dist/cli/commands/still.js +5 -5
- package/dist/cli/get-aws-region.js +0 -4
- package/dist/cli/helpers/find-function-name.d.ts +6 -1
- package/dist/cli/helpers/find-function-name.js +4 -5
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +36 -16
- package/dist/client.d.ts +17 -22
- package/dist/client.js +17 -13
- package/dist/functions/aws-implementation.d.ts +13 -1
- package/dist/functions/aws-implementation.js +46 -0
- package/dist/functions/aws-server-implementation.d.ts +2 -0
- package/dist/functions/aws-server-implementation.js +25 -0
- package/dist/functions/full-client-implementation.d.ts +3 -0
- package/dist/functions/full-client-implementation.js +16 -0
- package/dist/functions/helpers/clean-tmpdir.js +1 -3
- package/dist/functions/helpers/get-current-region.js +0 -4
- package/dist/functions/helpers/get-output-url-from-metadata.d.ts +3 -7
- package/dist/functions/helpers/get-output-url-from-metadata.js +1 -1
- package/dist/functions/helpers/lifecycle.d.ts +4 -2
- package/dist/functions/helpers/lifecycle.js +3 -18
- package/dist/functions/helpers/timer.d.ts +2 -4
- package/dist/functions/http-client.d.ts +7 -0
- package/dist/functions/http-client.js +22 -0
- package/dist/functions/index.d.ts +1 -8
- package/dist/functions/index.js +12 -235
- package/dist/index.d.ts +6 -6
- package/dist/index.js +27 -6
- package/dist/internals.d.ts +6 -5
- package/dist/pricing/price-per-1-s.js +102 -0
- package/dist/regions.d.ts +1 -1
- package/dist/regions.js +3 -0
- package/dist/shared/call-lambda-async.d.ts +3 -0
- package/dist/shared/call-lambda-async.js +20 -0
- package/dist/shared/call-lambda-streaming.d.ts +7 -0
- package/dist/shared/{call-lambda.js → call-lambda-streaming.js} +36 -61
- package/dist/shared/call-lambda-sync.d.ts +3 -0
- package/dist/shared/call-lambda-sync.js +30 -0
- package/dist/shared/check-credentials.js +2 -3
- package/dist/shared/constants.d.ts +2 -91
- package/dist/shared/constants.js +1 -8
- package/dist/shared/convert-to-serve-url.js +2 -2
- package/dist/shared/get-account-id.d.ts +3 -4
- package/dist/shared/get-account-id.js +3 -3
- package/dist/shared/get-aws-urls.d.ts +4 -8
- package/dist/shared/get-aws-urls.js +1 -1
- package/dist/shared/get-function-version.js +4 -4
- package/dist/shared/get-layers.d.ts +1 -2
- package/dist/shared/get-layers.js +2 -4
- package/dist/shared/get-s3-operations.d.ts +4 -1
- package/dist/shared/get-s3-operations.js +2 -3
- package/dist/shared/get-service-client.js +2 -2
- package/dist/shared/hosted-layers.d.ts +0 -1
- package/dist/shared/hosted-layers.js +139 -537
- package/dist/shared/lambda-insights-extensions.d.ts +1 -1
- package/dist/shared/lambda-insights-extensions.js +3 -0
- package/dist/shared/read-dir.d.ts +2 -10
- package/dist/shared/read-dir.js +5 -4
- package/dist/shared/validate-aws-region.js +1 -1
- package/dist/shared/validate-bucketname.d.ts +1 -1
- package/package.json +15 -15
- package/remotionlambda-arm64.zip +0 -0
- package/dist/api/__mocks__/clean-items.d.ts +0 -2
- package/dist/api/__mocks__/clean-items.js +0 -24
- package/dist/api/__mocks__/create-function.d.ts +0 -2
- package/dist/api/__mocks__/create-function.js +0 -21
- package/dist/api/__mocks__/delete-function.d.ts +0 -2
- package/dist/api/__mocks__/delete-function.js +0 -9
- package/dist/api/__mocks__/get-functions.d.ts +0 -2
- package/dist/api/__mocks__/get-functions.js +0 -9
- package/dist/api/__mocks__/upload-dir.d.ts +0 -3
- package/dist/api/__mocks__/upload-dir.js +0 -47
- package/dist/api/mock-functions.d.ts +0 -18
- package/dist/api/mock-functions.js +0 -36
- package/dist/cli/helpers/__mocks__/quit.d.ts +0 -1
- package/dist/cli/helpers/__mocks__/quit.js +0 -7
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +0 -7
- package/dist/functions/chunk-optimization/plan-frame-ranges.js +0 -17
- package/dist/functions/chunk-optimization/types.d.ts +0 -8
- package/dist/functions/chunk-optimization/types.js +0 -2
- package/dist/functions/helpers/__mocks__/get-browser-instance.d.ts +0 -3
- package/dist/functions/helpers/__mocks__/get-browser-instance.js +0 -12
- package/dist/functions/helpers/__mocks__/leak-detection.d.ts +0 -4
- package/dist/functions/helpers/__mocks__/leak-detection.js +0 -9
- package/dist/functions/helpers/__mocks__/timer.d.ts +0 -2
- package/dist/functions/helpers/__mocks__/timer.js +0 -10
- package/dist/functions/helpers/best-frames-per-lambda-param.d.ts +0 -1
- package/dist/functions/helpers/best-frames-per-lambda-param.js +0 -17
- package/dist/functions/helpers/calculate-chunk-times.d.ts +0 -5
- package/dist/functions/helpers/calculate-chunk-times.js +0 -29
- package/dist/functions/helpers/calculate-price-from-bucket.d.ts +0 -15
- package/dist/functions/helpers/calculate-price-from-bucket.js +0 -30
- package/dist/functions/helpers/can-concat-seamlessly.d.ts +0 -3
- package/dist/functions/helpers/can-concat-seamlessly.js +0 -17
- package/dist/functions/helpers/cleanup-props.d.ts +0 -8
- package/dist/functions/helpers/cleanup-props.js +0 -23
- package/dist/functions/helpers/concat-videos.d.ts +0 -23
- package/dist/functions/helpers/concat-videos.js +0 -54
- package/dist/functions/helpers/create-post-render-data.d.ts +0 -17
- package/dist/functions/helpers/create-post-render-data.js +0 -67
- package/dist/functions/helpers/find-output-file-in-bucket.d.ts +0 -14
- package/dist/functions/helpers/find-output-file-in-bucket.js +0 -38
- package/dist/functions/helpers/format-costs-info.d.ts +0 -2
- package/dist/functions/helpers/format-costs-info.js +0 -23
- package/dist/functions/helpers/get-overall-progress-s3.d.ts +0 -10
- package/dist/functions/helpers/get-overall-progress-s3.js +0 -24
- package/dist/functions/helpers/get-overall-progress.d.ts +0 -9
- package/dist/functions/helpers/get-overall-progress.js +0 -23
- package/dist/functions/helpers/get-progress.d.ts +0 -15
- package/dist/functions/helpers/get-progress.js +0 -254
- package/dist/functions/helpers/get-retry-stats.d.ts +0 -5
- package/dist/functions/helpers/get-retry-stats.js +0 -2
- package/dist/functions/helpers/inspect-errors.d.ts +0 -4
- package/dist/functions/helpers/inspect-errors.js +0 -39
- package/dist/functions/helpers/is-warm.d.ts +0 -2
- package/dist/functions/helpers/is-warm.js +0 -10
- package/dist/functions/helpers/leak-detection.d.ts +0 -4
- package/dist/functions/helpers/leak-detection.js +0 -40
- package/dist/functions/helpers/make-timeout-error.d.ts +0 -10
- package/dist/functions/helpers/make-timeout-error.js +0 -31
- package/dist/functions/helpers/make-timeout-message.d.ts +0 -10
- package/dist/functions/helpers/make-timeout-message.js +0 -75
- package/dist/functions/helpers/merge-chunks.d.ts +0 -36
- package/dist/functions/helpers/merge-chunks.js +0 -84
- package/dist/functions/helpers/min-max.d.ts +0 -2
- package/dist/functions/helpers/min-max.js +0 -33
- package/dist/functions/helpers/on-downloads-logger.d.ts +0 -2
- package/dist/functions/helpers/on-downloads-logger.js +0 -29
- package/dist/functions/helpers/overall-render-progress.d.ts +0 -59
- package/dist/functions/helpers/overall-render-progress.js +0 -180
- package/dist/functions/helpers/print-concurrency-curve.d.ts +0 -1
- package/dist/functions/helpers/print-concurrency-curve.js +0 -8
- package/dist/functions/helpers/print-logging-helper.d.ts +0 -4
- package/dist/functions/helpers/print-logging-helper.js +0 -12
- package/dist/functions/helpers/render-has-audio-video.d.ts +0 -6
- package/dist/functions/helpers/render-has-audio-video.js +0 -21
- package/dist/functions/helpers/request-context.d.ts +0 -5
- package/dist/functions/helpers/request-context.js +0 -2
- package/dist/functions/helpers/stream-renderer.d.ts +0 -17
- package/dist/functions/helpers/stream-renderer.js +0 -148
- package/dist/functions/launch.d.ts +0 -10
- package/dist/functions/launch.js +0 -596
- package/dist/functions/progress.d.ts +0 -11
- package/dist/functions/progress.js +0 -51
- package/dist/functions/renderer.d.ts +0 -17
- package/dist/functions/renderer.js +0 -341
- package/dist/functions/start.d.ts +0 -13
- package/dist/functions/start.js +0 -113
- package/dist/functions/still.d.ts +0 -19
- package/dist/functions/still.js +0 -330
- package/dist/shared/__mocks__/aws-clients.d.ts +0 -2
- package/dist/shared/__mocks__/aws-clients.js +0 -62
- package/dist/shared/__mocks__/bundle-site.d.ts +0 -2
- package/dist/shared/__mocks__/bundle-site.js +0 -32
- package/dist/shared/__mocks__/check-credentials.d.ts +0 -1
- package/dist/shared/__mocks__/check-credentials.js +0 -5
- package/dist/shared/__mocks__/get-account-id.d.ts +0 -2
- package/dist/shared/__mocks__/get-account-id.js +0 -11
- package/dist/shared/__mocks__/read-dir.d.ts +0 -2
- package/dist/shared/__mocks__/read-dir.js +0 -13
- package/dist/shared/call-lambda.d.ts +0 -16
- package/dist/shared/cleanup-serialized-input-props.d.ts +0 -14
- package/dist/shared/cleanup-serialized-input-props.js +0 -34
- package/dist/shared/docs-url.d.ts +0 -1
- package/dist/shared/docs-url.js +0 -4
- package/dist/shared/get-most-expensive-chunks.d.ts +0 -8
- package/dist/shared/get-most-expensive-chunks.js +0 -28
- package/dist/shared/invoke-webhook.d.ts +0 -48
- package/dist/shared/invoke-webhook.js +0 -140
- package/dist/shared/parse-lambda-timings-key.d.ts +0 -5
- package/dist/shared/parse-lambda-timings-key.js +0 -2
- package/dist/shared/return-values.d.ts +0 -16
- package/dist/shared/return-values.js +0 -2
- package/dist/shared/stackback.d.ts +0 -6
- package/dist/shared/stackback.js +0 -59
- package/dist/shared/validate-download-behavior.d.ts +0 -1
- package/dist/shared/validate-download-behavior.js +0 -21
- package/dist/shared/validate-frames-per-lambda.d.ts +0 -4
- package/dist/shared/validate-frames-per-lambda.js +0 -29
- package/dist/shared/validate-privacy.d.ts +0 -2
- package/dist/shared/validate-privacy.js +0 -14
- package/dist/shared/validate.d.ts +0 -4
- package/dist/shared/validate.js +0 -8
- package/dist/shared/why-is-node-running.d.ts +0 -15
- package/dist/shared/why-is-node-running.js +0 -88
- package/vitest.config.mts +0 -11
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getWebhookClient = exports.mockableHttpClients = void 0;
|
|
7
|
+
const node_http_1 = __importDefault(require("node:http"));
|
|
8
|
+
const node_https_1 = __importDefault(require("node:https"));
|
|
9
|
+
exports.mockableHttpClients = {
|
|
10
|
+
http: node_http_1.default.request,
|
|
11
|
+
https: node_https_1.default.request,
|
|
12
|
+
};
|
|
13
|
+
const getWebhookClient = (url) => {
|
|
14
|
+
if (url.startsWith('https://')) {
|
|
15
|
+
return exports.mockableHttpClients.https;
|
|
16
|
+
}
|
|
17
|
+
if (url.startsWith('http://')) {
|
|
18
|
+
return exports.mockableHttpClients.http;
|
|
19
|
+
}
|
|
20
|
+
throw new Error('Can only request URLs starting with http:// or https://');
|
|
21
|
+
};
|
|
22
|
+
exports.getWebhookClient = getWebhookClient;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RequestContext, ResponseStream } from '@remotion/serverless';
|
|
2
2
|
import type { ServerlessPayload } from '@remotion/serverless/client';
|
|
3
3
|
import type { AwsProvider } from './aws-implementation';
|
|
4
|
-
import type { RequestContext } from './helpers/request-context';
|
|
5
|
-
export type OrError<T> = T | {
|
|
6
|
-
type: 'error';
|
|
7
|
-
message: string;
|
|
8
|
-
stack: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const innerRoutine: <Provider extends CloudProvider>(params: ServerlessPayload<Provider>, responseStream: ResponseStream, context: RequestContext, providerSpecifics: ProviderSpecifics<Provider>) => Promise<void>;
|
|
11
4
|
export declare const routine: (params: ServerlessPayload<AwsProvider>, responseStream: ResponseStream, context: RequestContext) => Promise<void>;
|
|
12
5
|
export declare const handler: Function;
|
package/dist/functions/index.js
CHANGED
|
@@ -1,244 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.handler = exports.routine =
|
|
4
|
-
const renderer_1 = require("@remotion/renderer");
|
|
3
|
+
exports.handler = exports.routine = void 0;
|
|
5
4
|
const serverless_1 = require("@remotion/serverless");
|
|
6
|
-
const client_1 = require("@remotion/serverless/client");
|
|
7
|
-
const constants_1 = require("../shared/constants");
|
|
8
5
|
const aws_implementation_1 = require("./aws-implementation");
|
|
9
|
-
const
|
|
10
|
-
const is_warm_1 = require("./helpers/is-warm");
|
|
11
|
-
const leak_detection_1 = require("./helpers/leak-detection");
|
|
12
|
-
const lifecycle_1 = require("./helpers/lifecycle");
|
|
13
|
-
const print_logging_helper_1 = require("./helpers/print-logging-helper");
|
|
6
|
+
const aws_server_implementation_1 = require("./aws-server-implementation");
|
|
14
7
|
const streamify_response_1 = require("./helpers/streamify-response");
|
|
15
|
-
const
|
|
16
|
-
const progress_1 = require("./progress");
|
|
17
|
-
const renderer_2 = require("./renderer");
|
|
18
|
-
const start_1 = require("./start");
|
|
19
|
-
const still_1 = require("./still");
|
|
20
|
-
const innerHandler = async ({ params, responseWriter, context, providerSpecifics, }) => {
|
|
21
|
-
(0, leak_detection_1.setCurrentRequestId)(context.awsRequestId);
|
|
22
|
-
process.env.__RESERVED_IS_INSIDE_REMOTION_LAMBDA = 'true';
|
|
23
|
-
const timeoutInMilliseconds = context.getRemainingTimeInMillis();
|
|
24
|
-
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel: params.logLevel }, 'AWS Request ID:', context.awsRequestId);
|
|
25
|
-
(0, leak_detection_1.stopLeakDetection)();
|
|
26
|
-
if (!(context === null || context === void 0 ? void 0 : context.invokedFunctionArn)) {
|
|
27
|
-
throw new Error('Lambda function unexpectedly does not have context.invokedFunctionArn');
|
|
28
|
-
}
|
|
29
|
-
(0, clean_tmpdir_1.deleteTmpDir)();
|
|
30
|
-
const isWarm = (0, is_warm_1.getWarm)();
|
|
31
|
-
(0, is_warm_1.setWarm)();
|
|
32
|
-
const currentUserId = context.invokedFunctionArn.split(':')[4];
|
|
33
|
-
if (params.type === client_1.ServerlessRoutines.still) {
|
|
34
|
-
(0, lifecycle_1.validateDeleteAfter)(params.deleteAfter);
|
|
35
|
-
const renderId = (0, lifecycle_1.generateRandomHashWithLifeCycleRule)(params.deleteAfter, providerSpecifics);
|
|
36
|
-
if (providerSpecifics.printLoggingHelper) {
|
|
37
|
-
(0, print_logging_helper_1.printLoggingGrepHelper)(client_1.ServerlessRoutines.still, {
|
|
38
|
-
renderId,
|
|
39
|
-
inputProps: JSON.stringify(params.inputProps),
|
|
40
|
-
isWarm,
|
|
41
|
-
}, params.logLevel);
|
|
42
|
-
}
|
|
43
|
-
try {
|
|
44
|
-
await new Promise((resolve, reject) => {
|
|
45
|
-
const onStream = async (payload) => {
|
|
46
|
-
if (!params.streamed) {
|
|
47
|
-
if (payload.type !== 'still-rendered') {
|
|
48
|
-
throw new Error('Expected still-rendered');
|
|
49
|
-
}
|
|
50
|
-
await responseWriter.write(Buffer.from(JSON.stringify(payload.payload)));
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const message = (0, client_1.makeStreamPayload)({
|
|
54
|
-
message: payload,
|
|
55
|
-
});
|
|
56
|
-
return new Promise((innerResolve, innerReject) => {
|
|
57
|
-
responseWriter
|
|
58
|
-
.write(message)
|
|
59
|
-
.then(() => {
|
|
60
|
-
innerResolve();
|
|
61
|
-
})
|
|
62
|
-
.catch((err) => {
|
|
63
|
-
reject(err);
|
|
64
|
-
innerReject(err);
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
if (params.streamed) {
|
|
69
|
-
onStream({
|
|
70
|
-
type: 'render-id-determined',
|
|
71
|
-
payload: { renderId },
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
(0, still_1.stillHandler)({
|
|
75
|
-
expectedBucketOwner: currentUserId,
|
|
76
|
-
params,
|
|
77
|
-
renderId,
|
|
78
|
-
onStream,
|
|
79
|
-
timeoutInMilliseconds,
|
|
80
|
-
providerSpecifics,
|
|
81
|
-
})
|
|
82
|
-
.then((r) => {
|
|
83
|
-
resolve(r);
|
|
84
|
-
})
|
|
85
|
-
.catch((err) => {
|
|
86
|
-
reject(err);
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
await responseWriter.end();
|
|
90
|
-
}
|
|
91
|
-
catch (err) {
|
|
92
|
-
console.log({ err });
|
|
93
|
-
}
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
if (params.type === client_1.ServerlessRoutines.start) {
|
|
97
|
-
const renderId = (0, lifecycle_1.generateRandomHashWithLifeCycleRule)(params.deleteAfter, providerSpecifics);
|
|
98
|
-
if (providerSpecifics.printLoggingHelper) {
|
|
99
|
-
(0, print_logging_helper_1.printLoggingGrepHelper)(client_1.ServerlessRoutines.start, {
|
|
100
|
-
renderId,
|
|
101
|
-
inputProps: JSON.stringify(params.inputProps),
|
|
102
|
-
isWarm,
|
|
103
|
-
}, params.logLevel);
|
|
104
|
-
}
|
|
105
|
-
const response = await (0, start_1.startHandler)(params, {
|
|
106
|
-
expectedBucketOwner: currentUserId,
|
|
107
|
-
timeoutInMilliseconds,
|
|
108
|
-
renderId,
|
|
109
|
-
}, providerSpecifics);
|
|
110
|
-
await responseWriter.write(Buffer.from(JSON.stringify(response)));
|
|
111
|
-
await responseWriter.end();
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (params.type === client_1.ServerlessRoutines.launch) {
|
|
115
|
-
if (providerSpecifics.printLoggingHelper) {
|
|
116
|
-
(0, print_logging_helper_1.printLoggingGrepHelper)(client_1.ServerlessRoutines.launch, {
|
|
117
|
-
renderId: params.renderId,
|
|
118
|
-
inputProps: JSON.stringify(params.inputProps),
|
|
119
|
-
isWarm,
|
|
120
|
-
}, params.logLevel);
|
|
121
|
-
}
|
|
122
|
-
const response = await (0, launch_1.launchHandler)(params, {
|
|
123
|
-
expectedBucketOwner: currentUserId,
|
|
124
|
-
getRemainingTimeInMillis: context.getRemainingTimeInMillis,
|
|
125
|
-
}, providerSpecifics);
|
|
126
|
-
await responseWriter.write(Buffer.from(JSON.stringify(response)));
|
|
127
|
-
await responseWriter.end();
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
if (params.type === client_1.ServerlessRoutines.status) {
|
|
131
|
-
if (providerSpecifics.printLoggingHelper) {
|
|
132
|
-
(0, print_logging_helper_1.printLoggingGrepHelper)(client_1.ServerlessRoutines.status, {
|
|
133
|
-
renderId: params.renderId,
|
|
134
|
-
isWarm,
|
|
135
|
-
}, params.logLevel);
|
|
136
|
-
}
|
|
137
|
-
const response = await (0, progress_1.progressHandler)(params, {
|
|
138
|
-
expectedBucketOwner: currentUserId,
|
|
139
|
-
timeoutInMilliseconds,
|
|
140
|
-
retriesRemaining: 2,
|
|
141
|
-
providerSpecifics,
|
|
142
|
-
});
|
|
143
|
-
await responseWriter.write(Buffer.from(JSON.stringify(response)));
|
|
144
|
-
await responseWriter.end();
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
if (params.type === client_1.ServerlessRoutines.renderer) {
|
|
148
|
-
if (providerSpecifics.printLoggingHelper) {
|
|
149
|
-
(0, print_logging_helper_1.printLoggingGrepHelper)(client_1.ServerlessRoutines.renderer, {
|
|
150
|
-
renderId: params.renderId,
|
|
151
|
-
chunk: String(params.chunk),
|
|
152
|
-
dumpLogs: String(renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose')),
|
|
153
|
-
resolvedProps: JSON.stringify(params.resolvedProps),
|
|
154
|
-
isWarm,
|
|
155
|
-
}, params.logLevel);
|
|
156
|
-
}
|
|
157
|
-
await new Promise((resolve, reject) => {
|
|
158
|
-
(0, renderer_2.rendererHandler)({
|
|
159
|
-
params,
|
|
160
|
-
options: {
|
|
161
|
-
expectedBucketOwner: currentUserId,
|
|
162
|
-
isWarm,
|
|
163
|
-
},
|
|
164
|
-
onStream: (payload) => {
|
|
165
|
-
const message = (0, client_1.makeStreamPayload)({
|
|
166
|
-
message: payload,
|
|
167
|
-
});
|
|
168
|
-
const writeProm = responseWriter.write(message);
|
|
169
|
-
return new Promise((innerResolve, innerReject) => {
|
|
170
|
-
writeProm
|
|
171
|
-
.then(() => {
|
|
172
|
-
innerResolve();
|
|
173
|
-
})
|
|
174
|
-
.catch((err) => {
|
|
175
|
-
reject(err);
|
|
176
|
-
innerReject(err);
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
},
|
|
180
|
-
requestContext: context,
|
|
181
|
-
providerSpecifics,
|
|
182
|
-
})
|
|
183
|
-
.then((res) => {
|
|
184
|
-
resolve(res);
|
|
185
|
-
})
|
|
186
|
-
.catch((err) => {
|
|
187
|
-
reject(err);
|
|
188
|
-
});
|
|
189
|
-
});
|
|
190
|
-
await responseWriter.end();
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
if (params.type === client_1.ServerlessRoutines.info) {
|
|
194
|
-
if (providerSpecifics.printLoggingHelper) {
|
|
195
|
-
(0, print_logging_helper_1.printLoggingGrepHelper)(client_1.ServerlessRoutines.info, {
|
|
196
|
-
isWarm,
|
|
197
|
-
}, params.logLevel);
|
|
198
|
-
}
|
|
199
|
-
const response = await (0, serverless_1.infoHandler)(params);
|
|
200
|
-
await responseWriter.write(Buffer.from(JSON.stringify(response)));
|
|
201
|
-
await responseWriter.end();
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
if (params.type === client_1.ServerlessRoutines.compositions) {
|
|
205
|
-
if (providerSpecifics.printLoggingHelper) {
|
|
206
|
-
(0, print_logging_helper_1.printLoggingGrepHelper)(client_1.ServerlessRoutines.compositions, {
|
|
207
|
-
isWarm,
|
|
208
|
-
}, params.logLevel);
|
|
209
|
-
}
|
|
210
|
-
const response = await (0, serverless_1.compositionsHandler)(params, {
|
|
211
|
-
expectedBucketOwner: currentUserId,
|
|
212
|
-
}, providerSpecifics);
|
|
213
|
-
await responseWriter.write(Buffer.from(JSON.stringify(response)));
|
|
214
|
-
await responseWriter.end();
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
throw new Error(constants_1.COMMAND_NOT_FOUND);
|
|
218
|
-
};
|
|
219
|
-
const innerRoutine = async (params, responseStream, context, providerSpecifics) => {
|
|
220
|
-
const responseWriter = (0, serverless_1.streamWriter)(responseStream);
|
|
221
|
-
try {
|
|
222
|
-
await innerHandler({
|
|
223
|
-
params,
|
|
224
|
-
responseWriter,
|
|
225
|
-
context,
|
|
226
|
-
providerSpecifics,
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
catch (err) {
|
|
230
|
-
const res = {
|
|
231
|
-
type: 'error',
|
|
232
|
-
message: err.message,
|
|
233
|
-
stack: err.stack,
|
|
234
|
-
};
|
|
235
|
-
await responseWriter.write(Buffer.from(JSON.stringify(res)));
|
|
236
|
-
await responseWriter.end();
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
exports.innerRoutine = innerRoutine;
|
|
8
|
+
const http_client_1 = require("./http-client");
|
|
240
9
|
const routine = (params, responseStream, context) => {
|
|
241
|
-
|
|
10
|
+
const responseWriter = (0, serverless_1.streamWriter)(responseStream);
|
|
11
|
+
return (0, serverless_1.innerHandler)({
|
|
12
|
+
params,
|
|
13
|
+
responseWriter,
|
|
14
|
+
context,
|
|
15
|
+
providerSpecifics: aws_implementation_1.awsImplementation,
|
|
16
|
+
insideFunctionSpecifics: aws_server_implementation_1.serverAwsImplementation,
|
|
17
|
+
webhookClient: http_client_1.getWebhookClient,
|
|
18
|
+
});
|
|
242
19
|
};
|
|
243
20
|
exports.routine = routine;
|
|
244
21
|
exports.handler = (0, streamify_response_1.streamifyResponse)(exports.routine);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EnhancedErrorInfo, LambdaErrorInfo } from '@remotion/serverless';
|
|
1
|
+
import type { EnhancedErrorInfo, FunctionInfo, LambdaErrorInfo } from '@remotion/serverless';
|
|
2
2
|
import type { CustomCredentials, GetOrCreateBucketInput, GetOrCreateBucketOutput } from '@remotion/serverless/client';
|
|
3
3
|
import type { DeleteFunctionInput } from './api/delete-function';
|
|
4
4
|
import { deleteFunction } from './api/delete-function';
|
|
@@ -18,7 +18,7 @@ import type { GetAwsClientInput, GetAwsClientOutput } from './api/get-aws-client
|
|
|
18
18
|
import { getAwsClient } from './api/get-aws-client';
|
|
19
19
|
import type { GetCompositionsOnLambdaInput, GetCompositionsOnLambdaOutput } from './api/get-compositions-on-lambda';
|
|
20
20
|
import { getCompositionsOnLambda } from './api/get-compositions-on-lambda';
|
|
21
|
-
import type {
|
|
21
|
+
import type { GetFunctionInfoInput } from './api/get-function-info';
|
|
22
22
|
import { getFunctionInfo } from './api/get-function-info';
|
|
23
23
|
import type { GetFunctionsInput } from './api/get-functions';
|
|
24
24
|
import { getFunctions } from './api/get-functions';
|
|
@@ -33,10 +33,10 @@ import type { RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput } from './api/
|
|
|
33
33
|
import { renderVideoOnLambda } from './api/render-media-on-lambda';
|
|
34
34
|
import type { RenderStillOnLambdaInput, RenderStillOnLambdaOutput } from './api/render-still-on-lambda';
|
|
35
35
|
import { validateWebhookSignature } from './api/validate-webhook-signature';
|
|
36
|
-
import { LambdaInternals, _InternalAwsProvider, _InternalOverallRenderProgress } from './internals';
|
|
36
|
+
import { LambdaInternals, type _InternalAwsProvider, type _InternalOverallRenderProgress } from './internals';
|
|
37
37
|
import type { AwsRegion } from './regions';
|
|
38
38
|
import type { RenderProgress } from './shared/constants';
|
|
39
|
-
|
|
39
|
+
export type { WebhookPayload } from '@remotion/serverless';
|
|
40
40
|
/**
|
|
41
41
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
42
42
|
*/
|
|
@@ -57,6 +57,6 @@ declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region
|
|
|
57
57
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
58
58
|
*/
|
|
59
59
|
declare const getSites: ({ region, forceBucketName, forcePathStyle, }: GetSitesInput) => Promise<GetSitesOutput>;
|
|
60
|
-
export {
|
|
61
|
-
export type { AwsRegion, CustomCredentials, DeleteFunctionInput, DeleteRenderInput, DeleteSiteInput, DeleteSiteOutput, DeployFunctionInput, DeployFunctionOutput, DeploySiteInput, DeploySiteOutput, DownloadMediaInput, DownloadMediaOutput, EnhancedErrorInfo, EstimatePriceInput, FunctionInfo, GetAwsClientInput, GetAwsClientOutput, GetCompositionsOnLambdaInput, GetCompositionsOnLambdaOutput, GetFunctionInfoInput, GetFunctionsInput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderProgressInput, GetSitesInput, GetSitesOutput, LambdaErrorInfo, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderProgress, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput,
|
|
60
|
+
export { deleteFunction, deleteRender, deleteSite, deployFunction, deploySite, downloadMedia, estimatePrice, getAwsClient, getCompositionsOnLambda, getFunctionInfo, getFunctions, getOrCreateBucket, getRegions, getRenderProgress, getRolePolicy, getSites, getUserPolicy, LambdaInternals, presignUrl, renderMediaOnLambda, renderStillOnLambda, renderVideoOnLambda, simulatePermissions, validateWebhookSignature, };
|
|
61
|
+
export type { AwsRegion, CustomCredentials, DeleteFunctionInput, DeleteRenderInput, DeleteSiteInput, DeleteSiteOutput, DeployFunctionInput, DeployFunctionOutput, DeploySiteInput, DeploySiteOutput, DownloadMediaInput, DownloadMediaOutput, EnhancedErrorInfo, EstimatePriceInput, FunctionInfo, GetAwsClientInput, GetAwsClientOutput, GetCompositionsOnLambdaInput, GetCompositionsOnLambdaOutput, GetFunctionInfoInput, GetFunctionsInput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderProgressInput, GetSitesInput, GetSitesOutput, LambdaErrorInfo, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderProgress, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, };
|
|
62
62
|
export { _InternalAwsProvider, _InternalOverallRenderProgress };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateWebhookSignature = exports.simulatePermissions = exports.renderVideoOnLambda = exports.renderStillOnLambda = exports.renderMediaOnLambda = exports.presignUrl = exports.getUserPolicy = exports.getSites = exports.getRolePolicy = exports.getRenderProgress = exports.getRegions = exports.getOrCreateBucket = exports.getFunctions = exports.getFunctionInfo = exports.getCompositionsOnLambda = exports.getAwsClient = exports.estimatePrice = exports.downloadMedia = exports.deploySite = exports.deployFunction = exports.deleteSite = exports.deleteRender = exports.deleteFunction =
|
|
3
|
+
exports.validateWebhookSignature = exports.simulatePermissions = exports.renderVideoOnLambda = exports.renderStillOnLambda = exports.renderMediaOnLambda = exports.presignUrl = exports.LambdaInternals = exports.getUserPolicy = exports.getSites = exports.getRolePolicy = exports.getRenderProgress = exports.getRegions = exports.getOrCreateBucket = exports.getFunctions = exports.getFunctionInfo = exports.getCompositionsOnLambda = exports.getAwsClient = exports.estimatePrice = exports.downloadMedia = exports.deploySite = exports.deployFunction = exports.deleteSite = exports.deleteRender = exports.deleteFunction = void 0;
|
|
4
|
+
const no_react_1 = require("remotion/no-react");
|
|
4
5
|
const delete_function_1 = require("./api/delete-function");
|
|
5
6
|
Object.defineProperty(exports, "deleteFunction", { enumerable: true, get: function () { return delete_function_1.deleteFunction; } });
|
|
6
7
|
const delete_render_1 = require("./api/delete-render");
|
|
@@ -45,25 +46,45 @@ Object.defineProperty(exports, "LambdaInternals", { enumerable: true, get: funct
|
|
|
45
46
|
/**
|
|
46
47
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
47
48
|
*/
|
|
48
|
-
const renderMediaOnLambda =
|
|
49
|
+
const renderMediaOnLambda = no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES
|
|
50
|
+
? () => {
|
|
51
|
+
throw new Error('renderMediaOnLambda() has moved to `@remotion/lambda/client`. Please import it from there.');
|
|
52
|
+
}
|
|
53
|
+
: render_media_on_lambda_1.renderMediaOnLambda;
|
|
49
54
|
exports.renderMediaOnLambda = renderMediaOnLambda;
|
|
50
55
|
/**
|
|
51
56
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
52
57
|
*/
|
|
53
|
-
const getRenderProgress =
|
|
58
|
+
const getRenderProgress = no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES
|
|
59
|
+
? () => {
|
|
60
|
+
throw new Error('getRenderProgress() has moved to `@remotion/lambda/client`. Please import it from there.');
|
|
61
|
+
}
|
|
62
|
+
: get_render_progress_1.getRenderProgress;
|
|
54
63
|
exports.getRenderProgress = getRenderProgress;
|
|
55
64
|
/**
|
|
56
65
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
57
66
|
*/
|
|
58
|
-
const renderStillOnLambda =
|
|
67
|
+
const renderStillOnLambda = no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES
|
|
68
|
+
? () => {
|
|
69
|
+
throw new Error('renderStillOnLambda() has moved to `@remotion/lambda/client`. Please import it from there.');
|
|
70
|
+
}
|
|
71
|
+
: render_still_on_lambda_1.renderStillOnLambda;
|
|
59
72
|
exports.renderStillOnLambda = renderStillOnLambda;
|
|
60
73
|
/**
|
|
61
74
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
62
75
|
*/
|
|
63
|
-
const presignUrl =
|
|
76
|
+
const presignUrl = no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES
|
|
77
|
+
? () => {
|
|
78
|
+
throw new Error('presignUrl() has moved to `@remotion/lambda/client`. Please import it from there.');
|
|
79
|
+
}
|
|
80
|
+
: presign_url_1.presignUrl;
|
|
64
81
|
exports.presignUrl = presignUrl;
|
|
65
82
|
/**
|
|
66
83
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
67
84
|
*/
|
|
68
|
-
const getSites =
|
|
85
|
+
const getSites = no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES
|
|
86
|
+
? () => {
|
|
87
|
+
throw new Error('getSites() has moved to `@remotion/lambda/client`. Please import it from there.');
|
|
88
|
+
}
|
|
89
|
+
: get_sites_1.getSites;
|
|
69
90
|
exports.getSites = getSites;
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const LambdaInternals: {
|
|
2
|
-
executeCommand: (args: string[], remotionRoot: string, logLevel: import("@remotion/renderer").LogLevel,
|
|
2
|
+
executeCommand: (args: string[], remotionRoot: string, logLevel: import("@remotion/renderer").LogLevel, providerSpecifics: import("@remotion/serverless").ProviderSpecifics<import("./functions/aws-implementation").AwsProvider> | null, fullClientSpecifics: import("@remotion/serverless").FullClientSpecifics<import("./functions/aws-implementation").AwsProvider> | null) => 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, forcePathStyle, metadata, }: import("./api/make-lambda-payload").InnerRenderMediaOnLambdaInput) => Promise<import("@remotion/serverless/client").ServerlessStartPayload<import("./functions/aws-implementation").AwsProvider>>;
|
|
4
4
|
getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, forcePathStyle, }: import("./client").GetRenderProgressInput) => import("@remotion/serverless/client").ServerlessStatusPayload<import("./functions/aws-implementation").AwsProvider>;
|
|
5
|
-
makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, }: import("./api/render-still-on-lambda").RenderStillOnLambdaNonNullInput) => Promise<import("@remotion/serverless/client").ServerlessPayloads<import("./functions/aws-implementation").AwsProvider>[import("@remotion/serverless
|
|
5
|
+
makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, }: import("./api/render-still-on-lambda").RenderStillOnLambdaNonNullInput) => Promise<import("@remotion/serverless/client").ServerlessPayloads<import("./functions/aws-implementation").AwsProvider>[import("@remotion/serverless").ServerlessRoutines.still]>;
|
|
6
6
|
internalDeploySite: (args_0: {
|
|
7
7
|
entryPoint: string;
|
|
8
8
|
bucketName: string;
|
|
@@ -11,7 +11,7 @@ export declare const LambdaInternals: {
|
|
|
11
11
|
siteName: string;
|
|
12
12
|
options: {
|
|
13
13
|
onBundleProgress?: (progress: number) => void;
|
|
14
|
-
onUploadProgress?: (upload: import("
|
|
14
|
+
onUploadProgress?: (upload: import("@remotion/serverless").UploadDirProgress) => void;
|
|
15
15
|
onDiffingProgress?: (bytes: number, done: boolean) => void;
|
|
16
16
|
webpackOverride?: import("@remotion/bundler").WebpackOverrideFn;
|
|
17
17
|
ignoreRegisterRootWarning?: boolean;
|
|
@@ -57,6 +57,7 @@ export declare const LambdaInternals: {
|
|
|
57
57
|
};
|
|
58
58
|
}> & {
|
|
59
59
|
providerSpecifics: import("@remotion/serverless").ProviderSpecifics<import("./functions/aws-implementation").AwsProvider>;
|
|
60
|
+
fullClientSpecifics: import("@remotion/serverless").FullClientSpecifics<import("./functions/aws-implementation").AwsProvider>;
|
|
60
61
|
}) => Promise<{
|
|
61
62
|
serveUrl: string;
|
|
62
63
|
siteName: string;
|
|
@@ -67,5 +68,5 @@ export declare const LambdaInternals: {
|
|
|
67
68
|
};
|
|
68
69
|
}>;
|
|
69
70
|
};
|
|
70
|
-
export {
|
|
71
|
-
export {
|
|
71
|
+
export type { OverallRenderProgress as _InternalOverallRenderProgress } from '@remotion/serverless';
|
|
72
|
+
export type { AwsProvider as _InternalAwsProvider } from './functions/aws-implementation';
|
|
@@ -173,6 +173,74 @@ exports.pricing = {
|
|
|
173
173
|
price: '0.0000133334',
|
|
174
174
|
},
|
|
175
175
|
},
|
|
176
|
+
'ap-southeast-4': {
|
|
177
|
+
'Lambda Storage-Duration': {
|
|
178
|
+
rateCode: 'VVJE4FEKRZE6DRJK.JRTCKXETXF.6YS6EN2CT7',
|
|
179
|
+
price: '0.0000000370',
|
|
180
|
+
},
|
|
181
|
+
'Lambda Requests-ARM': {
|
|
182
|
+
rateCode: 'UH8TQNRPPRZ9TJ4V.JRTCKXETXF.6YS6EN2CT7',
|
|
183
|
+
price: '0.0000002000',
|
|
184
|
+
},
|
|
185
|
+
'Lambda Provisioned-Concurrency': {
|
|
186
|
+
rateCode: '2EC2UBFH6KGNHV2T.JRTCKXETXF.6YS6EN2CT7',
|
|
187
|
+
price: '0.0000052360',
|
|
188
|
+
},
|
|
189
|
+
'Lambda Duration-ARM': {
|
|
190
|
+
rateCode: 'QVV5SPACJCKHAF8A.JRTCKXETXF.6NBUNBXSC3',
|
|
191
|
+
price: '0.0000133334',
|
|
192
|
+
},
|
|
193
|
+
'Lambda Requests': {
|
|
194
|
+
rateCode: 'VXJTSR9CJSBFXG5K.JRTCKXETXF.6YS6EN2CT7',
|
|
195
|
+
price: '0.0000002000',
|
|
196
|
+
},
|
|
197
|
+
'Lambda Storage-Duration-ARM': {
|
|
198
|
+
rateCode: '29EUHTVHTD7D8THR.JRTCKXETXF.6YS6EN2CT7',
|
|
199
|
+
price: '0.0000000370',
|
|
200
|
+
},
|
|
201
|
+
'Lambda Duration': {
|
|
202
|
+
rateCode: 'H6FQK2WA7RDQ5V8X.JRTCKXETXF.CUKFZ388N3',
|
|
203
|
+
price: '0.0000166667',
|
|
204
|
+
},
|
|
205
|
+
'Lambda Duration-Provisioned': {
|
|
206
|
+
rateCode: 'YYP8U36M9AE5T6D2.JRTCKXETXF.6YS6EN2CT7',
|
|
207
|
+
price: '0.0000122173',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
'ap-southeast-5': {
|
|
211
|
+
'Lambda Storage-Duration-ARM': {
|
|
212
|
+
rateCode: 'Q54DCNPEP5HDZ72X.JRTCKXETXF.6YS6EN2CT7',
|
|
213
|
+
price: '0.0000000333',
|
|
214
|
+
},
|
|
215
|
+
'Lambda Storage-Duration': {
|
|
216
|
+
rateCode: 'Q54DCNPEP5HDZ72X.JRTCKXETXF.6YS6EN2CT7',
|
|
217
|
+
price: '0.0000000333',
|
|
218
|
+
},
|
|
219
|
+
'Lambda Requests-ARM': {
|
|
220
|
+
rateCode: 'F9T53VWVKRT6G32X.JRTCKXETXF.6YS6EN2CT7',
|
|
221
|
+
price: '0.0000001800',
|
|
222
|
+
},
|
|
223
|
+
'Lambda Provisioned-Concurrency': {
|
|
224
|
+
rateCode: '72ETGRTGNSDZG7ZS.JRTCKXETXF.6YS6EN2CT7',
|
|
225
|
+
price: '0.0000046791',
|
|
226
|
+
},
|
|
227
|
+
'Lambda Duration-ARM': {
|
|
228
|
+
rateCode: 'JZF5EBXY9YXH6KJZ.JRTCKXETXF.6NBUNBXSC3',
|
|
229
|
+
price: '0.0000120000',
|
|
230
|
+
},
|
|
231
|
+
'Lambda Requests': {
|
|
232
|
+
rateCode: 'GVB4MJBFXA3BX4M6.JRTCKXETXF.6YS6EN2CT7',
|
|
233
|
+
price: '0.0000001800',
|
|
234
|
+
},
|
|
235
|
+
'Lambda Duration': {
|
|
236
|
+
rateCode: 'D9T9NECWKTB5WH67.JRTCKXETXF.CUKFZ388N3',
|
|
237
|
+
price: '0.0000150000',
|
|
238
|
+
},
|
|
239
|
+
'Lambda Duration-Provisioned': {
|
|
240
|
+
rateCode: 'BWUE5MJNG4QYHA76.JRTCKXETXF.6YS6EN2CT7',
|
|
241
|
+
price: '0.0000109181',
|
|
242
|
+
},
|
|
243
|
+
},
|
|
176
244
|
'ap-southeast-1': {
|
|
177
245
|
'Lambda Duration-Provisioned': {
|
|
178
246
|
rateCode: 'Z43QGMUZW4S2XN34.JRTCKXETXF.6YS6EN2CT7',
|
|
@@ -683,6 +751,40 @@ exports.pricing = {
|
|
|
683
751
|
price: '0.0000133334',
|
|
684
752
|
},
|
|
685
753
|
},
|
|
754
|
+
'eu-central-2': {
|
|
755
|
+
'Lambda Storage-Duration': {
|
|
756
|
+
rateCode: '4JZ5N4HUYM6K333N.JRTCKXETXF.6YS6EN2CT7',
|
|
757
|
+
price: '0.0000000441',
|
|
758
|
+
},
|
|
759
|
+
'Lambda Requests-ARM': {
|
|
760
|
+
rateCode: 'VUQUVJRYRZKGXHKX.JRTCKXETXF.6YS6EN2CT7',
|
|
761
|
+
price: '0.0000002200',
|
|
762
|
+
},
|
|
763
|
+
'Lambda Provisioned-Concurrency': {
|
|
764
|
+
rateCode: 'YYM4DVFSJ5APJDUG.JRTCKXETXF.6YS6EN2CT7',
|
|
765
|
+
price: '0.0000055162',
|
|
766
|
+
},
|
|
767
|
+
'Lambda Duration-ARM': {
|
|
768
|
+
rateCode: 'EZZMW8SEEDT6E2G5.JRTCKXETXF.6NBUNBXSC3',
|
|
769
|
+
price: '0.0000146667',
|
|
770
|
+
},
|
|
771
|
+
'Lambda Requests': {
|
|
772
|
+
rateCode: '8FY96CH95ZA8NU5C.JRTCKXETXF.6YS6EN2CT7',
|
|
773
|
+
price: '0.0000002200',
|
|
774
|
+
},
|
|
775
|
+
'Lambda Storage-Duration-ARM': {
|
|
776
|
+
rateCode: 'TMSMVCZ6FWXCBNM5.JRTCKXETXF.6YS6EN2CT7',
|
|
777
|
+
price: '0.0000000441',
|
|
778
|
+
},
|
|
779
|
+
'Lambda Duration': {
|
|
780
|
+
rateCode: 'U6YRFNVKQZTX8VF2.JRTCKXETXF.CUKFZ388N3',
|
|
781
|
+
price: '0.0000183334',
|
|
782
|
+
},
|
|
783
|
+
'Lambda Duration-Provisioned': {
|
|
784
|
+
rateCode: '594VMK9T4PANJ2TK.JRTCKXETXF.6YS6EN2CT7',
|
|
785
|
+
price: '0.0000128712',
|
|
786
|
+
},
|
|
787
|
+
},
|
|
686
788
|
'us-west-2': {
|
|
687
789
|
'Lambda Duration-Provisioned': {
|
|
688
790
|
rateCode: 'MP7NQ6MSH3HNCZP6.JRTCKXETXF.6YS6EN2CT7',
|
package/dist/regions.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const DEFAULT_AWS_REGIONS: readonly ["eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "eu-north-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ca-central-1", "sa-east-1"];
|
|
2
|
-
export declare const AWS_REGIONS: readonly ["eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "eu-south-1", "eu-north-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-south-1", "ap-east-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ca-central-1", "me-south-1", "sa-east-1"];
|
|
2
|
+
export declare const AWS_REGIONS: readonly ["eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-south-1", "eu-north-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-south-1", "ap-east-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-southeast-4", "ap-southeast-5", "ca-central-1", "me-south-1", "sa-east-1"];
|
|
3
3
|
export type AwsRegion = (typeof AWS_REGIONS)[number];
|
package/dist/regions.js
CHANGED
|
@@ -22,6 +22,7 @@ exports.DEFAULT_AWS_REGIONS = [
|
|
|
22
22
|
];
|
|
23
23
|
exports.AWS_REGIONS = [
|
|
24
24
|
'eu-central-1',
|
|
25
|
+
'eu-central-2',
|
|
25
26
|
'eu-west-1',
|
|
26
27
|
'eu-west-2',
|
|
27
28
|
'eu-west-3',
|
|
@@ -39,6 +40,8 @@ exports.AWS_REGIONS = [
|
|
|
39
40
|
'ap-northeast-1',
|
|
40
41
|
'ap-northeast-2',
|
|
41
42
|
'ap-northeast-3',
|
|
43
|
+
'ap-southeast-4',
|
|
44
|
+
'ap-southeast-5',
|
|
42
45
|
'ca-central-1',
|
|
43
46
|
'me-south-1',
|
|
44
47
|
'sa-east-1',
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CallFunctionOptions, CloudProvider } from '@remotion/serverless';
|
|
2
|
+
import type { ServerlessRoutines } from '@remotion/serverless/client';
|
|
3
|
+
export declare const callFunctionAsyncImplementation: <T extends ServerlessRoutines, Provider extends CloudProvider>({ functionName, payload, region, timeoutInTest, }: CallFunctionOptions<T, Provider>) => Promise<void>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.callFunctionAsyncImplementation = void 0;
|
|
4
|
+
const client_lambda_1 = require("@aws-sdk/client-lambda");
|
|
5
|
+
const aws_clients_1 = require("./aws-clients");
|
|
6
|
+
const callFunctionAsyncImplementation = async ({ functionName, payload, region, timeoutInTest, }) => {
|
|
7
|
+
const stringifiedPayload = JSON.stringify(payload);
|
|
8
|
+
if (stringifiedPayload.length > 256 * 1024) {
|
|
9
|
+
throw new Error(`Payload is too big: ${stringifiedPayload.length} bytes. Maximum size is 256 KB. This should not happen, please report this to the Remotion team. Payload: ${stringifiedPayload}`);
|
|
10
|
+
}
|
|
11
|
+
const result = await (0, aws_clients_1.getLambdaClient)(region, timeoutInTest).send(new client_lambda_1.InvokeCommand({
|
|
12
|
+
FunctionName: functionName,
|
|
13
|
+
Payload: stringifiedPayload,
|
|
14
|
+
InvocationType: 'Event',
|
|
15
|
+
}));
|
|
16
|
+
if (result.FunctionError) {
|
|
17
|
+
throw new Error(`Lambda function returned error: ${result.FunctionError} ${result.LogResult}`);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.callFunctionAsyncImplementation = callFunctionAsyncImplementation;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CallFunctionOptions, CloudProvider, OnMessage } from '@remotion/serverless';
|
|
2
|
+
import type { ServerlessRoutines } from '@remotion/serverless/client';
|
|
3
|
+
export declare const parseJsonOrThrowSource: (data: Uint8Array, type: string) => any;
|
|
4
|
+
export declare const callFunctionWithStreamingImplementation: <Provider extends CloudProvider, T extends ServerlessRoutines>(options: CallFunctionOptions<T, Provider> & {
|
|
5
|
+
receivedStreamingPayload: OnMessage<Provider>;
|
|
6
|
+
retriesRemaining: number;
|
|
7
|
+
}) => Promise<void>;
|