@remotion/lambda 3.2.37 → 3.2.39
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/render-media-on-lambda.js +8 -6
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +5 -6
- package/dist/functions/chunk-optimization/plan-frame-ranges.js +1 -14
- package/dist/functions/chunk-optimization/types.d.ts +0 -11
- package/dist/functions/helpers/io.js +3 -1
- package/dist/functions/helpers/read-with-progress.js +1 -1
- package/dist/functions/index.js +4 -1
- package/dist/functions/launch.d.ts +1 -0
- package/dist/functions/launch.js +10 -64
- package/dist/functions/still.js +5 -7
- package/dist/index.d.ts +2 -1
- package/dist/shared/constants.d.ts +0 -2
- package/dist/shared/constants.js +1 -3
- package/package.json +6 -6
- package/remotionlambda.zip +0 -0
- package/dist/shared/cleanup-input-props.d.ts +0 -7
- package/dist/shared/cleanup-input-props.js +0 -17
- package/dist/shared/const hi = () => {.d.ts +0 -1
- package/dist/shared/const hi = () => {.js +0 -18
- package/dist/shared/query.d.ts +0 -1
- package/dist/shared/query.js +0 -21
|
@@ -39,12 +39,14 @@ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec,
|
|
|
39
39
|
durationInFrames: 1,
|
|
40
40
|
});
|
|
41
41
|
(0, validate_download_behavior_1.validateDownloadBehavior)(downloadBehavior);
|
|
42
|
-
const realServeUrl = await
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
const [realServeUrl, serializedInputProps] = await Promise.all([
|
|
43
|
+
(0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region),
|
|
44
|
+
(0, serialize_input_props_1.serializeInputProps)({
|
|
45
|
+
inputProps,
|
|
46
|
+
region,
|
|
47
|
+
type: 'video-or-audio',
|
|
48
|
+
}),
|
|
49
|
+
]);
|
|
48
50
|
try {
|
|
49
51
|
const res = await (0, call_lambda_1.callLambda)({
|
|
50
52
|
functionName,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const planFrameRanges: ({ framesPerLambda, optimization, shouldUseOptimization, frameRange, everyNthFrame, }: {
|
|
1
|
+
export declare const planFrameRanges: ({ framesPerLambda, frameRange, everyNthFrame, }: {
|
|
3
2
|
framesPerLambda: number;
|
|
4
|
-
optimization: OptimizationProfile | null;
|
|
5
|
-
shouldUseOptimization: boolean;
|
|
6
3
|
frameRange: [number, number];
|
|
7
4
|
everyNthFrame: number;
|
|
8
5
|
}) => {
|
|
9
|
-
chunks: [
|
|
10
|
-
|
|
6
|
+
chunks: [
|
|
7
|
+
number,
|
|
8
|
+
number
|
|
9
|
+
][];
|
|
11
10
|
};
|
|
@@ -2,21 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.planFrameRanges = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
const
|
|
6
|
-
const planFrameRanges = ({ framesPerLambda, optimization, shouldUseOptimization, frameRange, everyNthFrame, }) => {
|
|
5
|
+
const planFrameRanges = ({ framesPerLambda, frameRange, everyNthFrame, }) => {
|
|
7
6
|
const framesToRender = renderer_1.RenderInternals.getFramesToRender(frameRange, everyNthFrame);
|
|
8
7
|
const chunkCount = Math.ceil(framesToRender.length / framesPerLambda);
|
|
9
|
-
if ((0, can_use_optimization_1.canUseOptimization)({
|
|
10
|
-
optimization,
|
|
11
|
-
framesPerLambda,
|
|
12
|
-
frameRange,
|
|
13
|
-
}) &&
|
|
14
|
-
shouldUseOptimization) {
|
|
15
|
-
return {
|
|
16
|
-
chunks: optimization.ranges,
|
|
17
|
-
didUseOptimization: true,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
8
|
const firstFrame = frameRange[0];
|
|
21
9
|
return {
|
|
22
10
|
chunks: new Array(chunkCount).fill(1).map((_, i) => {
|
|
@@ -24,7 +12,6 @@ const planFrameRanges = ({ framesPerLambda, optimization, shouldUseOptimization,
|
|
|
24
12
|
const end = Math.min(framesToRender[framesToRender.length - 1], (i + 1) * framesPerLambda * everyNthFrame - 1) + firstFrame;
|
|
25
13
|
return [start, end];
|
|
26
14
|
}),
|
|
27
|
-
didUseOptimization: false,
|
|
28
15
|
};
|
|
29
16
|
};
|
|
30
17
|
exports.planFrameRanges = planFrameRanges;
|
|
@@ -9,14 +9,3 @@ export declare type ObjectChunkTimingData = {
|
|
|
9
9
|
export declare type ChunkTimingData = Omit<ObjectChunkTimingData, 'timings'> & {
|
|
10
10
|
timings: number[];
|
|
11
11
|
};
|
|
12
|
-
export declare type TimingProfile = ChunkTimingData[];
|
|
13
|
-
export declare type OptimizationProfile = {
|
|
14
|
-
ranges: [number, number][];
|
|
15
|
-
frameRange: [number, number];
|
|
16
|
-
oldTiming: number;
|
|
17
|
-
newTiming: number;
|
|
18
|
-
createdFromRenderId: string;
|
|
19
|
-
framesPerLambda: number;
|
|
20
|
-
lambdaVersion: string;
|
|
21
|
-
everyNthFrame: number;
|
|
22
|
-
};
|
|
@@ -64,7 +64,9 @@ const lambdaWriteFile = async ({ bucketName, key, body, region, privacy, expecte
|
|
|
64
64
|
: privacy === 'private'
|
|
65
65
|
? 'private'
|
|
66
66
|
: 'public-read',
|
|
67
|
-
ExpectedBucketOwner:
|
|
67
|
+
ExpectedBucketOwner: customCredentials
|
|
68
|
+
? undefined
|
|
69
|
+
: expectedBucketOwner !== null && expectedBucketOwner !== void 0 ? expectedBucketOwner : undefined,
|
|
68
70
|
ContentType: mime_types_1.default.lookup(key) || 'application/octet-stream',
|
|
69
71
|
ContentDisposition: (0, content_disposition_header_1.getContentDispositionHeader)(downloadBehavior),
|
|
70
72
|
}));
|
|
@@ -9,7 +9,7 @@ const lambdaDownloadFileWithProgress = async ({ bucketName, key, region, expecte
|
|
|
9
9
|
const client = (0, aws_clients_1.getS3Client)(region, customCredentials);
|
|
10
10
|
const command = new client_s3_1.GetObjectCommand({
|
|
11
11
|
Bucket: bucketName,
|
|
12
|
-
ExpectedBucketOwner: expectedBucketOwner,
|
|
12
|
+
ExpectedBucketOwner: customCredentials ? undefined : expectedBucketOwner,
|
|
13
13
|
Key: key,
|
|
14
14
|
});
|
|
15
15
|
const presigned = await (0, s3_request_presigner_1.getSignedUrl)(client, command);
|
package/dist/functions/index.js
CHANGED
|
@@ -44,7 +44,10 @@ const handler = async (params, context) => {
|
|
|
44
44
|
inputProps: JSON.stringify(params.inputProps),
|
|
45
45
|
isWarm,
|
|
46
46
|
});
|
|
47
|
-
return (0, launch_1.launchHandler)(params, {
|
|
47
|
+
return (0, launch_1.launchHandler)(params, {
|
|
48
|
+
expectedBucketOwner: currentUserId,
|
|
49
|
+
getRemainingTimeInMillis: context.getRemainingTimeInMillis,
|
|
50
|
+
});
|
|
48
51
|
}
|
|
49
52
|
if (params.type === constants_1.LambdaRoutines.status) {
|
|
50
53
|
(0, print_cloudwatch_helper_1.printCloudwatchHelper)(constants_1.LambdaRoutines.status, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LambdaPayload } from '../shared/constants';
|
|
2
2
|
declare type Options = {
|
|
3
3
|
expectedBucketOwner: string;
|
|
4
|
+
getRemainingTimeInMillis: () => number;
|
|
4
5
|
};
|
|
5
6
|
export declare const launchHandler: (params: LambdaPayload, options: Options) => Promise<void>;
|
|
6
7
|
export {};
|
package/dist/functions/launch.js
CHANGED
|
@@ -19,14 +19,7 @@ const make_s3_url_1 = require("../shared/make-s3-url");
|
|
|
19
19
|
const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lambda");
|
|
20
20
|
const validate_outname_1 = require("../shared/validate-outname");
|
|
21
21
|
const validate_privacy_1 = require("../shared/validate-privacy");
|
|
22
|
-
const collect_data_1 = require("./chunk-optimization/collect-data");
|
|
23
|
-
const get_frame_ranges_from_profile_1 = require("./chunk-optimization/get-frame-ranges-from-profile");
|
|
24
|
-
const get_profile_duration_1 = require("./chunk-optimization/get-profile-duration");
|
|
25
|
-
const is_valid_profile_1 = require("./chunk-optimization/is-valid-profile");
|
|
26
|
-
const optimize_invocation_order_1 = require("./chunk-optimization/optimize-invocation-order");
|
|
27
|
-
const optimize_profile_1 = require("./chunk-optimization/optimize-profile");
|
|
28
22
|
const plan_frame_ranges_1 = require("./chunk-optimization/plan-frame-ranges");
|
|
29
|
-
const s3_optimization_file_1 = require("./chunk-optimization/s3-optimization-file");
|
|
30
23
|
const best_frames_per_lambda_param_1 = require("./helpers/best-frames-per-lambda-param");
|
|
31
24
|
const concat_videos_1 = require("./helpers/concat-videos");
|
|
32
25
|
const create_post_render_data_1 = require("./helpers/create-post-render-data");
|
|
@@ -72,6 +65,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
72
65
|
}
|
|
73
66
|
const startedDate = Date.now();
|
|
74
67
|
let webhookInvoked = false;
|
|
68
|
+
console.log(`Function has ${Math.max(options.getRemainingTimeInMillis() - 1000, 1000)} before it times out`);
|
|
75
69
|
const webhookDueToTimeout = setTimeout(async () => {
|
|
76
70
|
if (params.webhook && !webhookInvoked) {
|
|
77
71
|
try {
|
|
@@ -113,17 +107,8 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
113
107
|
console.log(err);
|
|
114
108
|
}
|
|
115
109
|
}
|
|
116
|
-
}, Math.max(
|
|
117
|
-
const
|
|
118
|
-
(0, get_browser_instance_1.getBrowserInstance)(renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'), params.chromiumOptions),
|
|
119
|
-
(0, s3_optimization_file_1.getOptimization)({
|
|
120
|
-
bucketName: params.bucketName,
|
|
121
|
-
siteId: (0, make_s3_url_1.getServeUrlHash)(params.serveUrl),
|
|
122
|
-
compositionId: params.composition,
|
|
123
|
-
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
124
|
-
expectedBucketOwner: options.expectedBucketOwner,
|
|
125
|
-
}),
|
|
126
|
-
]);
|
|
110
|
+
}, Math.max(options.getRemainingTimeInMillis() - 1000, 1000));
|
|
111
|
+
const browserInstance = await (0, get_browser_instance_1.getBrowserInstance)(renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'), params.chromiumOptions);
|
|
127
112
|
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
128
113
|
const inputPropsPromise = (0, deserialize_input_props_1.deserializeInputProps)({
|
|
129
114
|
bucketName: params.bucketName,
|
|
@@ -165,11 +150,8 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
165
150
|
(0, validate_outname_1.validateOutname)(params.outName, params.codec);
|
|
166
151
|
(0, validate_privacy_1.validatePrivacy)(params.privacy);
|
|
167
152
|
renderer_1.RenderInternals.validatePuppeteerTimeout(params.timeoutInMilliseconds);
|
|
168
|
-
const { chunks
|
|
153
|
+
const { chunks } = (0, plan_frame_ranges_1.planFrameRanges)({
|
|
169
154
|
framesPerLambda,
|
|
170
|
-
optimization,
|
|
171
|
-
// TODO: Re-enable chunk optimization later
|
|
172
|
-
shouldUseOptimization: false,
|
|
173
155
|
frameRange: realFrameRange,
|
|
174
156
|
everyNthFrame: params.everyNthFrame,
|
|
175
157
|
});
|
|
@@ -228,7 +210,6 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
228
210
|
compositionId: comp.id,
|
|
229
211
|
siteId: (0, make_s3_url_1.getServeUrlHash)(params.serveUrl),
|
|
230
212
|
codec: params.codec,
|
|
231
|
-
usesOptimizationProfile: didUseOptimization,
|
|
232
213
|
type: 'video',
|
|
233
214
|
imageFormat: params.imageFormat,
|
|
234
215
|
inputProps: params.inputProps,
|
|
@@ -381,47 +362,12 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
381
362
|
downloadBehavior: params.downloadBehavior,
|
|
382
363
|
customCredentials,
|
|
383
364
|
});
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
renderId: params.renderId,
|
|
391
|
-
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
392
|
-
expectedBucketOwner: options.expectedBucketOwner,
|
|
393
|
-
});
|
|
394
|
-
const optimizedProfile = (0, optimize_invocation_order_1.optimizeInvocationOrder)((0, optimize_profile_1.optimizeProfileRecursively)(chunkData, 400));
|
|
395
|
-
const optimizedFrameRange = (0, get_frame_ranges_from_profile_1.getFrameRangesFromProfile)(optimizedProfile);
|
|
396
|
-
chunkProm = (0, is_valid_profile_1.isValidOptimizationProfile)(optimizedProfile)
|
|
397
|
-
? (0, s3_optimization_file_1.writeOptimization)({
|
|
398
|
-
bucketName: params.bucketName,
|
|
399
|
-
optimization: {
|
|
400
|
-
ranges: optimizedFrameRange,
|
|
401
|
-
oldTiming: (0, get_profile_duration_1.getProfileDuration)(chunkData),
|
|
402
|
-
newTiming: (0, get_profile_duration_1.getProfileDuration)(optimizedProfile),
|
|
403
|
-
createdFromRenderId: params.renderId,
|
|
404
|
-
framesPerLambda,
|
|
405
|
-
lambdaVersion: version_1.VERSION,
|
|
406
|
-
frameRange: realFrameRange,
|
|
407
|
-
everyNthFrame: params.everyNthFrame,
|
|
408
|
-
},
|
|
409
|
-
expectedBucketOwner: options.expectedBucketOwner,
|
|
410
|
-
compositionId: params.composition,
|
|
411
|
-
siteId: (0, make_s3_url_1.getServeUrlHash)(params.serveUrl),
|
|
412
|
-
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
413
|
-
})
|
|
414
|
-
: Promise.resolve();
|
|
415
|
-
}
|
|
416
|
-
const [, contents] = await Promise.all([
|
|
417
|
-
chunkProm,
|
|
418
|
-
(0, io_1.lambdaLs)({
|
|
419
|
-
bucketName: params.bucketName,
|
|
420
|
-
prefix: (0, constants_1.rendersPrefix)(params.renderId),
|
|
421
|
-
expectedBucketOwner: options.expectedBucketOwner,
|
|
422
|
-
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
423
|
-
}),
|
|
424
|
-
]);
|
|
365
|
+
const contents = await (0, io_1.lambdaLs)({
|
|
366
|
+
bucketName: params.bucketName,
|
|
367
|
+
prefix: (0, constants_1.rendersPrefix)(params.renderId),
|
|
368
|
+
expectedBucketOwner: options.expectedBucketOwner,
|
|
369
|
+
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
370
|
+
});
|
|
425
371
|
const finalEncodingProgress = {
|
|
426
372
|
framesEncoded: frameCount.length,
|
|
427
373
|
totalFrames: frameCount.length,
|
package/dist/functions/still.js
CHANGED
|
@@ -50,20 +50,20 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
50
50
|
}),
|
|
51
51
|
(0, get_browser_instance_1.getBrowserInstance)(renderer_1.RenderInternals.isEqualOrBelowLogLevel(lambdaParams.logLevel, 'verbose'), (_a = lambdaParams.chromiumOptions) !== null && _a !== void 0 ? _a : {}),
|
|
52
52
|
]);
|
|
53
|
-
const
|
|
53
|
+
const outputDir = renderer_1.RenderInternals.tmpDir('remotion-render-');
|
|
54
|
+
const outputPath = path_1.default.join(outputDir, 'output');
|
|
55
|
+
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
56
|
+
const inputProps = await (0, deserialize_input_props_1.deserializeInputProps)({
|
|
54
57
|
bucketName,
|
|
55
58
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
56
59
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
57
60
|
serialized: lambdaParams.inputProps,
|
|
58
61
|
});
|
|
59
|
-
const outputDir = renderer_1.RenderInternals.tmpDir('remotion-render-');
|
|
60
|
-
const outputPath = path_1.default.join(outputDir, 'output');
|
|
61
|
-
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
62
62
|
const composition = await (0, validate_composition_1.validateComposition)({
|
|
63
63
|
serveUrl: lambdaParams.serveUrl,
|
|
64
64
|
browserInstance,
|
|
65
65
|
composition: lambdaParams.composition,
|
|
66
|
-
inputProps
|
|
66
|
+
inputProps,
|
|
67
67
|
envVariables: lambdaParams.envVariables,
|
|
68
68
|
ffmpegExecutable: null,
|
|
69
69
|
ffprobeExecutable: null,
|
|
@@ -82,7 +82,6 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
82
82
|
siteId: (0, make_s3_url_1.getServeUrlHash)(lambdaParams.serveUrl),
|
|
83
83
|
totalChunks: 1,
|
|
84
84
|
type: 'still',
|
|
85
|
-
usesOptimizationProfile: false,
|
|
86
85
|
imageFormat: lambdaParams.imageFormat,
|
|
87
86
|
inputProps: lambdaParams.inputProps,
|
|
88
87
|
lambdaVersion: version_1.VERSION,
|
|
@@ -103,7 +102,6 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
103
102
|
downloadBehavior: null,
|
|
104
103
|
customCredentials: null,
|
|
105
104
|
});
|
|
106
|
-
const inputProps = await inputPropsPromise;
|
|
107
105
|
await (0, renderer_1.renderStill)({
|
|
108
106
|
composition,
|
|
109
107
|
output: outputPath,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DeleteFunctionInput } from './api/delete-function';
|
|
2
2
|
import { deleteFunction } from './api/delete-function';
|
|
3
|
+
import type { DeleteRenderInput } from './api/delete-render';
|
|
3
4
|
import { deleteRender } from './api/delete-render';
|
|
4
5
|
import type { DeleteSiteInput, DeleteSiteOutput } from './api/delete-site';
|
|
5
6
|
import { deleteSite } from './api/delete-site';
|
|
@@ -42,4 +43,4 @@ import type { RenderProgress } from './shared/constants';
|
|
|
42
43
|
import type { WebhookPayload } from './shared/invoke-webhook';
|
|
43
44
|
import type { LambdaArchitecture } from './shared/validate-architecture';
|
|
44
45
|
export { deleteSite, deployFunction, deploySite, downloadMedia, downloadVideo, getFunctions, getUserPolicy, getRolePolicy, getSites, getOrCreateBucket, getRenderProgress, renderVideoOnLambda, renderMediaOnLambda, simulatePermissions, deleteFunction, getFunctionInfo, estimatePrice, LambdaInternals, renderStillOnLambda, getRegions, getAwsClient, presignUrl, deleteRender, validateWebhookSignature, };
|
|
45
|
-
export type { AwsRegion, RenderProgress, DeploySiteInput, DeploySiteOutput, LambdaLsReturnType, LambdaLSInput, DeleteSiteInput, DeleteSiteOutput, EstimatePriceInput, DeployFunctionInput, DeployFunctionOutput, DeleteFunctionInput, GetFunctionInfoInput, FunctionInfo, GetFunctionsInput, GetSitesInput, GetSitesOutput, DownloadMediaInput, DownloadMediaOutput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderInput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, GetAwsClientInput, GetAwsClientOutput, LambdaArchitecture, CustomCredentials, WebhookPayload, LambdaErrorInfo, EnhancedErrorInfo, };
|
|
46
|
+
export type { AwsRegion, RenderProgress, DeploySiteInput, DeploySiteOutput, LambdaLsReturnType, LambdaLSInput, DeleteSiteInput, DeleteSiteOutput, EstimatePriceInput, DeployFunctionInput, DeployFunctionOutput, DeleteFunctionInput, GetFunctionInfoInput, FunctionInfo, GetFunctionsInput, GetSitesInput, GetSitesOutput, DownloadMediaInput, DownloadMediaOutput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderInput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, GetAwsClientInput, GetAwsClientOutput, LambdaArchitecture, CustomCredentials, WebhookPayload, LambdaErrorInfo, EnhancedErrorInfo, DeleteRenderInput, };
|
|
@@ -75,7 +75,6 @@ export declare type OutNameOutput = {
|
|
|
75
75
|
key: string;
|
|
76
76
|
customCredentials: CustomCredentials | null;
|
|
77
77
|
};
|
|
78
|
-
export declare const optimizationProfile: (siteId: string, compositionId: string) => string;
|
|
79
78
|
export declare const getSitesKey: (siteId: string) => string;
|
|
80
79
|
export declare const outName: (renderId: string, extension: string) => string;
|
|
81
80
|
export declare const outStillName: (renderId: string, imageFormat: ImageFormat) => string;
|
|
@@ -251,7 +250,6 @@ export declare type RenderMetadata = {
|
|
|
251
250
|
estimatedRenderLambdaInvokations: number;
|
|
252
251
|
compositionId: string;
|
|
253
252
|
codec: Codec | null;
|
|
254
|
-
usesOptimizationProfile: boolean;
|
|
255
253
|
type: 'still' | 'video';
|
|
256
254
|
imageFormat: ImageFormat;
|
|
257
255
|
inputProps: SerializedInputProps;
|
package/dist/shared/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LAMBDA_BURST_LIMIT_QUOTA = exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = exports.LambdaRoutines = exports.REMOTION_FILELIST_TOKEN = exports.REMOTION_CONCATED_TOKEN = exports.CONCAT_FOLDER_TOKEN = exports.RENDERER_PATH_TOKEN = exports.inputPropsKey = exports.postRenderDataKey = exports.customOutName = exports.outStillName = exports.outName = exports.getSitesKey = exports.
|
|
3
|
+
exports.LAMBDA_BURST_LIMIT_QUOTA = exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = exports.LambdaRoutines = exports.REMOTION_FILELIST_TOKEN = exports.REMOTION_CONCATED_TOKEN = exports.CONCAT_FOLDER_TOKEN = exports.RENDERER_PATH_TOKEN = exports.inputPropsKey = exports.postRenderDataKey = exports.customOutName = exports.outStillName = exports.outName = exports.getSitesKey = exports.getErrorFileName = exports.getErrorKeyPrefix = exports.chunkKeyForIndex = exports.chunkKey = exports.lambdaTimingsKey = exports.lambdaLogsPrefix = exports.lambdaTimingsPrefixForChunk = exports.lambdaTimingsPrefix = exports.lambdaChunkInitializedKey = exports.lambdaChunkInitializedPrefix = exports.initalizedMetadataKey = exports.renderMetadataKey = exports.encodingProgressKey = exports.rendersPrefix = exports.LOG_GROUP_PREFIX = exports.RENDER_FN_PREFIX = exports.REMOTION_BUCKET_PREFIX = exports.DEFAULT_CLOUDWATCH_RETENTION_PERIOD = exports.DEFAULT_OUTPUT_PRIVACY = exports.MAX_EPHEMERAL_STORAGE_IN_MB = exports.MIN_EPHEMERAL_STORAGE_IN_MB = exports.DEFAULT_EPHEMERAL_STORAGE_IN_MB = exports.MAX_FUNCTIONS_PER_RENDER = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_REGION = exports.COMMAND_NOT_FOUND = exports.BINARY_NAME = exports.DEFAULT_FRAMES_PER_LAMBDA = exports.MINIMUM_FRAMES_PER_LAMBDA = exports.MAX_TIMEOUT = exports.MIN_TIMEOUT = exports.DEFAULT_TIMEOUT = exports.DEFAULT_ARCHITECTURE = exports.DEFAULT_MEMORY_SIZE = exports.MAX_MEMORY = exports.MIN_MEMORY = void 0;
|
|
4
4
|
exports.MIN_MEMORY = 512;
|
|
5
5
|
exports.MAX_MEMORY = 10240;
|
|
6
6
|
exports.DEFAULT_MEMORY_SIZE = 2048;
|
|
@@ -51,8 +51,6 @@ const getErrorKeyPrefix = (renderId) => `${(0, exports.rendersPrefix)(renderId)}
|
|
|
51
51
|
exports.getErrorKeyPrefix = getErrorKeyPrefix;
|
|
52
52
|
const getErrorFileName = ({ renderId, chunk, attempt, }) => (0, exports.getErrorKeyPrefix)(renderId) + ':chunk-' + chunk + ':attempt-' + attempt;
|
|
53
53
|
exports.getErrorFileName = getErrorFileName;
|
|
54
|
-
const optimizationProfile = (siteId, compositionId) => `optimization-profiles/${siteId}/${compositionId}/optimization-profile`;
|
|
55
|
-
exports.optimizationProfile = optimizationProfile;
|
|
56
54
|
const getSitesKey = (siteId) => `sites/${siteId}`;
|
|
57
55
|
exports.getSitesKey = getSitesKey;
|
|
58
56
|
const outName = (renderId, extension) => `${(0, exports.rendersPrefix)(renderId)}/out.${extension}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.39",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"@aws-sdk/client-service-quotas": "3.190.0",
|
|
32
32
|
"@aws-sdk/lib-storage": "3.190.0",
|
|
33
33
|
"@aws-sdk/s3-request-presigner": "3.190.0",
|
|
34
|
-
"@remotion/bundler": "3.2.
|
|
35
|
-
"@remotion/cli": "3.2.
|
|
36
|
-
"@remotion/renderer": "3.2.
|
|
34
|
+
"@remotion/bundler": "3.2.39",
|
|
35
|
+
"@remotion/cli": "3.2.39",
|
|
36
|
+
"@remotion/renderer": "3.2.39",
|
|
37
37
|
"aws-policies": "^1.0.1",
|
|
38
38
|
"mime-types": "2.1.34",
|
|
39
|
-
"remotion": "3.2.
|
|
39
|
+
"remotion": "3.2.39"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=16.8.0",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "406632092cb2b96ac34d489808283508298c4e1f"
|
|
63
63
|
}
|
package/remotionlambda.zip
CHANGED
|
Binary file
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { AwsRegion } from '../client';
|
|
2
|
-
import type { SerializedInputProps } from './constants';
|
|
3
|
-
export declare const cleanupSerializedInputProps: ({ serialized, region, bucketName, }: {
|
|
4
|
-
serialized: SerializedInputProps;
|
|
5
|
-
region: AwsRegion;
|
|
6
|
-
bucketName: string;
|
|
7
|
-
}) => Promise<void>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cleanupSerializedInputProps = void 0;
|
|
4
|
-
const io_1 = require("../functions/helpers/io");
|
|
5
|
-
const constants_1 = require("./constants");
|
|
6
|
-
const cleanupSerializedInputProps = async ({ serialized, region, bucketName, }) => {
|
|
7
|
-
if (serialized.type === 'payload') {
|
|
8
|
-
return undefined;
|
|
9
|
-
}
|
|
10
|
-
await (0, io_1.lambdaDeleteFile)({
|
|
11
|
-
bucketName,
|
|
12
|
-
key: (0, constants_1.inputPropsKey)(serialized.hash),
|
|
13
|
-
region,
|
|
14
|
-
customCredentials: null,
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
exports.cleanupSerializedInputProps = cleanupSerializedInputProps;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare const hi: (query: string) => Promise<void>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const hi = async (query) => {
|
|
3
|
-
await fetch('https://plsduol1ca-dsn.algolianet.com/1/indexes/*/queries?x-algolia-agent=Algolia%20for%20JavaScript%20(4.14.2)%3B%20Browser%20(lite)%3B%20docsearch%20(3.2.1)%3B%20docsearch-react%20(3.2.1)%3B%20docusaurus%20(2.1.0)&x-algolia-api-key=3e42dbd4f895fe93ff5cf40d860c4a85&x-algolia-application-id=PLSDUOL1CA', {
|
|
4
|
-
headers: {
|
|
5
|
-
'content-type': 'application/x-www-form-urlencoded',
|
|
6
|
-
},
|
|
7
|
-
body: JSON.stringify({
|
|
8
|
-
requests: [
|
|
9
|
-
{
|
|
10
|
-
query,
|
|
11
|
-
indexName: 'remotion',
|
|
12
|
-
params: 'attributesToRetrieve=%5B%22hierarchy.lvl0%22%2C%22hierarchy.lvl1%22%2C%22hierarchy.lvl2%22%2C%22hierarchy.lvl3%22%2C%22hierarchy.lvl4%22%2C%22hierarchy.lvl5%22%2C%22hierarchy.lvl6%22%2C%22content%22%2C%22type%22%2C%22url%22%5D&attributesToSnippet=%5B%22hierarchy.lvl1%3A10%22%2C%22hierarchy.lvl2%3A10%22%2C%22hierarchy.lvl3%3A10%22%2C%22hierarchy.lvl4%3A10%22%2C%22hierarchy.lvl5%3A10%22%2C%22hierarchy.lvl6%3A10%22%2C%22content%3A10%22%5D&snippetEllipsisText=%E2%80%A6&highlightPreTag=%3Cmark%3E&highlightPostTag=%3C%2Fmark%3E&hitsPerPage=20&facetFilters=%5B%5D',
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
}),
|
|
16
|
-
method: 'POST',
|
|
17
|
-
}).then((res) => res.json());
|
|
18
|
-
};
|
package/dist/shared/query.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare const hi: (query: string) => Promise<void>;
|
package/dist/shared/query.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const hi = async (query) => {
|
|
3
|
-
await fetch('https://plsduol1ca-dsn.algolianet.com/1/indexes/*/queries?x-algolia-agent=' +
|
|
4
|
-
encodeURIComponent('Remotion Preview DocSearch') +
|
|
5
|
-
'&x-algolia-api-key=3e42dbd4f895fe93ff5cf40d860c4a85&x-algolia-application-id=PLSDUOL1CA', {
|
|
6
|
-
headers: {
|
|
7
|
-
'content-type': 'application/x-www-form-urlencoded',
|
|
8
|
-
},
|
|
9
|
-
body: JSON.stringify({
|
|
10
|
-
requests: [
|
|
11
|
-
{
|
|
12
|
-
query,
|
|
13
|
-
indexName: 'remotion',
|
|
14
|
-
params: encodeURIComponent('attributesToRetrieve=["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"]&attributesToSnippet=["hierarchy.lvl1:10","hierarchy.lvl2:10","hierarchy.lvl3:10","hierarchy.lvl4:10","hierarchy.lvl5:10","hierarchy.lvl6:10","content:10"]&snippetEllipsisText=…&highlightPreTag=<mark>&highlightPostTag=</mark>&hitsPerPage=20&facetFilters=[]'),
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
}),
|
|
18
|
-
method: 'POST',
|
|
19
|
-
}).then((res) => res.json());
|
|
20
|
-
};
|
|
21
|
-
hi();
|