@remotion/serverless 4.0.244 → 4.0.245
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-formatting.log +7 -0
- package/.turbo/turbo-lint.log +11 -0
- package/.turbo/turbo-make.log +1 -1
- package/LICENSE.md +1 -1
- package/dist/best-frames-per-function-param.d.ts +1 -0
- package/dist/best-frames-per-function-param.js +17 -0
- package/dist/calculate-chunk-times.d.ts +5 -0
- package/dist/calculate-chunk-times.js +29 -0
- package/dist/can-concat-seamlessly.d.ts +3 -0
- package/dist/can-concat-seamlessly.js +17 -0
- package/dist/cleanup-props.d.ts +9 -0
- package/dist/cleanup-props.js +23 -0
- package/dist/cleanup-serialized-input-props.d.ts +15 -0
- package/dist/cleanup-serialized-input-props.js +34 -0
- package/dist/concat-videos.d.ts +26 -0
- package/dist/concat-videos.js +53 -0
- package/dist/create-post-render-data.d.ts +20 -0
- package/dist/create-post-render-data.js +68 -0
- package/dist/docs-url.d.ts +1 -0
- package/dist/docs-url.js +4 -0
- package/dist/estimate-price-from-bucket.d.ts +15 -0
- package/dist/estimate-price-from-bucket.js +31 -0
- package/dist/find-output-file-in-bucket.d.ts +16 -0
- package/dist/find-output-file-in-bucket.js +41 -0
- package/dist/format-costs-info.d.ts +2 -0
- package/dist/format-costs-info.js +23 -0
- package/dist/get-overall-progress-from-storage.d.ts +11 -0
- package/dist/get-overall-progress-from-storage.js +25 -0
- package/dist/get-overall-progress.d.ts +9 -0
- package/dist/get-overall-progress.js +23 -0
- package/dist/handlers/compositions.d.ts +11 -0
- package/dist/handlers/compositions.js +81 -0
- package/dist/handlers/launch.d.ts +17 -0
- package/dist/handlers/launch.js +601 -0
- package/dist/handlers/progress.d.ts +12 -0
- package/dist/handlers/progress.js +51 -0
- package/dist/handlers/renderer.d.ts +23 -0
- package/dist/handlers/renderer.js +342 -0
- package/dist/handlers/start.d.ts +14 -0
- package/dist/handlers/start.js +105 -0
- package/dist/handlers/still.d.ts +20 -0
- package/dist/handlers/still.js +334 -0
- package/dist/inspect-error.d.ts +4 -0
- package/dist/inspect-error.js +39 -0
- package/dist/invoke-webhook.d.ts +39 -0
- package/dist/invoke-webhook.js +116 -0
- package/dist/leak-detection.d.ts +4 -0
- package/dist/leak-detection.js +40 -0
- package/dist/make-timeout-error.d.ts +13 -0
- package/dist/make-timeout-error.js +32 -0
- package/dist/make-timeout-message.d.ts +12 -0
- package/dist/make-timeout-message.js +75 -0
- package/dist/merge-chunks.d.ts +37 -0
- package/dist/merge-chunks.js +92 -0
- package/dist/min-max.d.ts +2 -0
- package/dist/min-max.js +33 -0
- package/dist/most-expensive-chunks.d.ts +13 -0
- package/dist/most-expensive-chunks.js +28 -0
- package/dist/on-downloads-helpers.d.ts +2 -0
- package/dist/on-downloads-helpers.js +29 -0
- package/dist/overall-render-progress.d.ts +59 -0
- package/dist/overall-render-progress.js +180 -0
- package/dist/plan-frame-ranges.d.ts +7 -0
- package/dist/plan-frame-ranges.js +17 -0
- package/dist/progress.d.ts +16 -0
- package/dist/progress.js +254 -0
- package/dist/render-has-audio-video.d.ts +6 -0
- package/dist/render-has-audio-video.js +21 -0
- package/dist/render-progress.d.ts +51 -0
- package/dist/render-progress.js +2 -0
- package/dist/return-values.d.ts +38 -0
- package/dist/return-values.js +2 -0
- package/dist/stackback.d.ts +6 -0
- package/dist/stackback.js +59 -0
- package/dist/stream-renderer.d.ts +17 -0
- package/dist/stream-renderer.js +148 -0
- package/dist/types.d.ts +54 -0
- package/dist/types.js +2 -0
- package/dist/validate-download-behavior.d.ts +1 -0
- package/dist/validate-download-behavior.js +21 -0
- package/dist/validate-frames-per-function.d.ts +4 -0
- package/dist/validate-frames-per-function.js +29 -0
- package/dist/validate-frames-per-lambda.d.ts +4 -0
- package/dist/validate-frames-per-lambda.js +29 -0
- package/dist/validate-privacy.d.ts +2 -0
- package/dist/validate-privacy.js +14 -0
- package/dist/validate.d.ts +4 -0
- package/dist/validate.js +8 -0
- package/dist/why-is-node-running.d.ts +15 -0
- package/dist/why-is-node-running.js +89 -0
- package/package.json +5 -5
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compositionsHandler = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
5
|
+
const version_1 = require("remotion/version");
|
|
6
|
+
const compress_props_1 = require("../compress-props");
|
|
7
|
+
const constants_1 = require("../constants");
|
|
8
|
+
const get_or_create_bucket_1 = require("../get-or-create-bucket");
|
|
9
|
+
const compositionsHandler = async (lambdaParams, options, providerSpecifics) => {
|
|
10
|
+
var _a;
|
|
11
|
+
if (lambdaParams.type !== constants_1.ServerlessRoutines.compositions) {
|
|
12
|
+
throw new TypeError('Expected info compositions');
|
|
13
|
+
}
|
|
14
|
+
if (lambdaParams.version !== version_1.VERSION) {
|
|
15
|
+
if (!lambdaParams.version) {
|
|
16
|
+
throw new Error(`Version mismatch: When calling getCompositionsOnLambda(), you called the function ${process.env.AWS_LAMBDA_FUNCTION_NAME} which has the version ${version_1.VERSION} but the @remotion/lambda package is an older version. Deploy a new function and use it to call getCompositionsOnLambda(). See: https://www.remotion.dev/docs/lambda/upgrading`);
|
|
17
|
+
}
|
|
18
|
+
throw new Error(`Version mismatch: When calling getCompositionsOnLambda(), you passed ${process.env.AWS_LAMBDA_FUNCTION_NAME} as the function, which has the version ${version_1.VERSION}, but the @remotion/lambda package you used to invoke the function has version ${lambdaParams.version}. Deploy a new function and use it to call getCompositionsOnLambda(). See: https://www.remotion.dev/docs/lambda/upgrading`);
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const region = providerSpecifics.getCurrentRegionInFunction();
|
|
22
|
+
const browserInstancePromise = providerSpecifics.getBrowserInstance({
|
|
23
|
+
logLevel: lambdaParams.logLevel,
|
|
24
|
+
indent: false,
|
|
25
|
+
chromiumOptions: lambdaParams.chromiumOptions,
|
|
26
|
+
providerSpecifics,
|
|
27
|
+
});
|
|
28
|
+
const bucketNamePromise = lambdaParams.bucketName
|
|
29
|
+
? Promise.resolve(lambdaParams.bucketName)
|
|
30
|
+
: (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
|
|
31
|
+
region,
|
|
32
|
+
enableFolderExpiry: null,
|
|
33
|
+
customCredentials: null,
|
|
34
|
+
providerSpecifics,
|
|
35
|
+
forcePathStyle: lambdaParams.forcePathStyle,
|
|
36
|
+
skipPutAcl: false,
|
|
37
|
+
}).then((b) => b.bucketName);
|
|
38
|
+
const bucketName = await bucketNamePromise;
|
|
39
|
+
const serializedInputPropsWithCustomSchema = await (0, compress_props_1.decompressInputProps)({
|
|
40
|
+
bucketName: await bucketNamePromise,
|
|
41
|
+
expectedBucketOwner: options.expectedBucketOwner,
|
|
42
|
+
region: providerSpecifics.getCurrentRegionInFunction(),
|
|
43
|
+
serialized: lambdaParams.inputProps,
|
|
44
|
+
propsType: 'input-props',
|
|
45
|
+
providerSpecifics,
|
|
46
|
+
forcePathStyle: lambdaParams.forcePathStyle,
|
|
47
|
+
});
|
|
48
|
+
const realServeUrl = providerSpecifics.convertToServeUrl({
|
|
49
|
+
urlOrId: lambdaParams.serveUrl,
|
|
50
|
+
region,
|
|
51
|
+
bucketName,
|
|
52
|
+
});
|
|
53
|
+
const compositions = await renderer_1.RenderInternals.internalGetCompositions({
|
|
54
|
+
serveUrlOrWebpackUrl: realServeUrl,
|
|
55
|
+
puppeteerInstance: (await browserInstancePromise).instance,
|
|
56
|
+
serializedInputPropsWithCustomSchema,
|
|
57
|
+
envVariables: (_a = lambdaParams.envVariables) !== null && _a !== void 0 ? _a : {},
|
|
58
|
+
timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
|
|
59
|
+
chromiumOptions: lambdaParams.chromiumOptions,
|
|
60
|
+
port: null,
|
|
61
|
+
server: undefined,
|
|
62
|
+
logLevel: lambdaParams.logLevel,
|
|
63
|
+
indent: false,
|
|
64
|
+
browserExecutable: null,
|
|
65
|
+
onBrowserLog: null,
|
|
66
|
+
offthreadVideoCacheSizeInBytes: lambdaParams.offthreadVideoCacheSizeInBytes,
|
|
67
|
+
binariesDirectory: null,
|
|
68
|
+
onBrowserDownload: () => {
|
|
69
|
+
throw new Error('Should not download a browser in Lambda');
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
return Promise.resolve({
|
|
73
|
+
compositions,
|
|
74
|
+
type: 'success',
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
finally {
|
|
78
|
+
providerSpecifics.forgetBrowserEventLoop(lambdaParams.logLevel);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
exports.compositionsHandler = compositionsHandler;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ServerlessPayload } from '../constants';
|
|
2
|
+
import type { WebhookClient } from '../invoke-webhook';
|
|
3
|
+
import type { ProviderSpecifics } from '../provider-implementation';
|
|
4
|
+
import type { CloudProvider } from '../types';
|
|
5
|
+
type Options = {
|
|
6
|
+
expectedBucketOwner: string;
|
|
7
|
+
getRemainingTimeInMillis: () => number;
|
|
8
|
+
};
|
|
9
|
+
export declare const launchHandler: <Provider extends CloudProvider>({ params, options, providerSpecifics, client, }: {
|
|
10
|
+
params: ServerlessPayload<Provider>;
|
|
11
|
+
options: Options;
|
|
12
|
+
providerSpecifics: ProviderSpecifics<Provider>;
|
|
13
|
+
client: WebhookClient;
|
|
14
|
+
}) => Promise<{
|
|
15
|
+
type: "success";
|
|
16
|
+
}>;
|
|
17
|
+
export {};
|