@remotion/lambda 3.2.38 → 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/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts +3 -5
- package/dist/functions/chunk-optimization/get-profile-duration.d.ts +1 -1
- package/dist/functions/chunk-optimization/get-profile-duration.js +3 -0
- package/dist/functions/chunk-optimization/is-valid-profile.d.ts +2 -1
- package/dist/functions/chunk-optimization/optimize-invocation-order.d.ts +1 -0
- package/dist/functions/chunk-optimization/optimize-profile.d.ts +3 -8
- package/dist/functions/chunk-optimization/optimize-profile.js +2 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
- package/dist/functions/chunk-optimization/s3-optimization-file.d.ts +1 -0
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts +1 -4
- package/dist/functions/chunk-optimization/sort-by-duration.d.ts +2 -1
- package/dist/functions/helpers/io.js +3 -1
- package/dist/functions/helpers/read-with-progress.js +1 -1
- package/package.json +6 -6
- package/remotionlambda.zip +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
][];
|
|
5
|
-
export declare const sortProfileByFrameRanges: (profile: TimingProfile) => any;
|
|
1
|
+
import type { TimingProfile } from './types';
|
|
2
|
+
export declare const getFrameRangesFromProfile: (profile: TimingProfile) => [number, number][];
|
|
3
|
+
export declare const sortProfileByFrameRanges: (profile: TimingProfile) => import("./types").ChunkTimingData[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ChunkTimingData } from './types';
|
|
1
|
+
import type { ChunkTimingData, TimingProfile } from './types';
|
|
2
2
|
export declare const getTimingEndTimestamps: (chunk: ChunkTimingData) => number[];
|
|
3
3
|
export declare const getProfileDuration: (chunks: TimingProfile) => number;
|
|
@@ -5,6 +5,9 @@ const getTimingEndTimestamps = (chunk) => {
|
|
|
5
5
|
return chunk.timings.map((timing) => chunk.startDate + timing);
|
|
6
6
|
};
|
|
7
7
|
exports.getTimingEndTimestamps = getTimingEndTimestamps;
|
|
8
|
+
const getProfileTimestamps = (chunks) => {
|
|
9
|
+
return chunks.map((c) => (0, exports.getTimingEndTimestamps)(c));
|
|
10
|
+
};
|
|
8
11
|
const getProfileDuration = (chunks) => {
|
|
9
12
|
const startTimeStamps = chunks.map((c) => c.startDate).flat(1);
|
|
10
13
|
const endTimestamps = getProfileTimestamps(chunks).flat(1);
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { TimingProfile } from './types';
|
|
2
|
+
export declare const isValidOptimizationProfile: (profile: TimingProfile) => boolean;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
+
import type { TimingProfile } from './types';
|
|
1
2
|
export declare const assignFrameToOther: ({ frameRanges, fromChunk, toChunk, framesToShift, }: {
|
|
2
|
-
frameRanges: [
|
|
3
|
-
number,
|
|
4
|
-
number
|
|
5
|
-
][];
|
|
3
|
+
frameRanges: [number, number][];
|
|
6
4
|
fromChunk: number;
|
|
7
5
|
toChunk: number;
|
|
8
6
|
framesToShift: number;
|
|
9
|
-
}) => [
|
|
10
|
-
number,
|
|
11
|
-
number
|
|
12
|
-
][];
|
|
7
|
+
}) => [number, number][];
|
|
13
8
|
export declare const optimizeProfile: (_profile: TimingProfile) => TimingProfile;
|
|
14
9
|
export declare const optimizeProfileRecursively: (profile: TimingProfile, amount: number) => TimingProfile;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.optimizeProfileRecursively = exports.optimizeProfile = exports.assignFrameToOther = void 0;
|
|
4
|
+
const get_frame_ranges_from_profile_1 = require("./get-frame-ranges-from-profile");
|
|
4
5
|
const simulate_frame_ranges_1 = require("./simulate-frame-ranges");
|
|
5
6
|
const sort_by_duration_1 = require("./sort-by-duration");
|
|
6
7
|
const assignFrameToOther = ({ frameRanges, fromChunk, toChunk, framesToShift, }) => {
|
|
@@ -46,7 +47,7 @@ const optimizeProfile = (_profile) => {
|
|
|
46
47
|
if (indexOfSlowest === -1) {
|
|
47
48
|
throw new Error('invalid timing profile: ' + JSON.stringify(_profile));
|
|
48
49
|
}
|
|
49
|
-
const frameRanges = getFrameRangesFromProfile(sortedByStart);
|
|
50
|
+
const frameRanges = (0, get_frame_ranges_from_profile_1.getFrameRangesFromProfile)(sortedByStart);
|
|
50
51
|
if (indexOfFastest === indexOfSlowest) {
|
|
51
52
|
return _profile;
|
|
52
53
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AwsRegion } from '../../pricing/aws-regions';
|
|
2
|
+
import type { OptimizationProfile } from './types';
|
|
2
3
|
export declare const writeOptimization: ({ bucketName, optimization, compositionId, siteId, region, expectedBucketOwner, }: {
|
|
3
4
|
bucketName: string;
|
|
4
5
|
optimization: OptimizationProfile;
|
|
@@ -3,8 +3,5 @@ export declare const getTimingForFrame: (profile: TimingProfile, frame: number)
|
|
|
3
3
|
export declare const getSimulatedTimingForFrameRange: (profile: TimingProfile, frameRange: [number, number]) => ChunkTimingData['timings'];
|
|
4
4
|
export declare const simulateFrameRanges: ({ profile, newFrameRanges, }: {
|
|
5
5
|
profile: TimingProfile;
|
|
6
|
-
newFrameRanges: [
|
|
7
|
-
number,
|
|
8
|
-
number
|
|
9
|
-
][];
|
|
6
|
+
newFrameRanges: [number, number][];
|
|
10
7
|
}) => TimingProfile;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ChunkTimingData, TimingProfile } from './types';
|
|
2
|
+
export declare const sortProfileByDuration: (profile: TimingProfile) => ChunkTimingData[];
|
|
@@ -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/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
|