@remotion/lambda 4.0.19 → 4.0.21
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/cli/commands/render/render.js +7 -1
- package/dist/cli/commands/sites/create.js +4 -1
- package/dist/cli/commands/still.js +4 -1
- package/dist/cli/log.d.ts +4 -4
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/functions/helpers/create-post-render-data.js +1 -1
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/helpers/streaming-payloads.d.ts +3 -3
- package/dist/shared/get-most-expensive-chunks.d.ts +1 -1
- package/dist/shared/get-most-expensive-chunks.js +5 -3
- package/dist/shared/invoke-webhook.d.ts +2 -0
- package/dist/shared/is-flaky-error.js +10 -1
- package/package.json +8 -8
- package/remotionlambda-arm64.zip +0 -0
|
@@ -41,6 +41,9 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
41
41
|
if (!composition) {
|
|
42
42
|
log_1.Log.info('No compositions passed. Fetching compositions...');
|
|
43
43
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
44
|
+
if (!serveUrl.startsWith('https://') && !serveUrl.startsWith('http://')) {
|
|
45
|
+
throw Error('Passing the shorthand serve URL without composition name is currently not supported.\n Make sure to pass a composition name after the shorthand serve URL or pass the complete serveURL without composition name to get to choose between all compositions.');
|
|
46
|
+
}
|
|
44
47
|
const server = await renderer_1.RenderInternals.prepareServer({
|
|
45
48
|
concurrency: 1,
|
|
46
49
|
indent: false,
|
|
@@ -50,7 +53,7 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
50
53
|
webpackConfigOrServeUrl: serveUrl,
|
|
51
54
|
});
|
|
52
55
|
const { compositionId } = await cli_1.CliInternals.getCompositionWithDimensionOverride({
|
|
53
|
-
args,
|
|
56
|
+
args: args.slice(1),
|
|
54
57
|
compositionIdFromUi: null,
|
|
55
58
|
browserExecutable,
|
|
56
59
|
chromiumOptions,
|
|
@@ -278,6 +281,9 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
278
281
|
});
|
|
279
282
|
await cli_1.CliInternals.handleCommonError(errorWithStackFrame, logLevel);
|
|
280
283
|
}
|
|
284
|
+
log_1.Log.info();
|
|
285
|
+
log_1.Log.verbose(`Accrued costs until error was thrown: ${newStatus.costs.displayCost}.`);
|
|
286
|
+
log_1.Log.info('This is an estimate and continuing Lambda functions may incur additional costs.');
|
|
281
287
|
(0, quit_1.quit)(1);
|
|
282
288
|
}
|
|
283
289
|
}
|
|
@@ -67,7 +67,7 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
|
|
|
67
67
|
multiProgress.bucketProgress.doneIn = Date.now() - bucketStart;
|
|
68
68
|
updateProgress();
|
|
69
69
|
const bundleStart = Date.now();
|
|
70
|
-
|
|
70
|
+
let uploadStart = Date.now();
|
|
71
71
|
const { serveUrl, siteName, stats } = await (0, deploy_site_1.deploySite)({
|
|
72
72
|
entryPoint: file,
|
|
73
73
|
siteName: desiredSiteName,
|
|
@@ -78,6 +78,9 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
|
|
|
78
78
|
progress,
|
|
79
79
|
doneIn: progress === 100 ? Date.now() - bundleStart : null,
|
|
80
80
|
};
|
|
81
|
+
if (progress === 100) {
|
|
82
|
+
uploadStart = Date.now();
|
|
83
|
+
}
|
|
81
84
|
},
|
|
82
85
|
onUploadProgress: (p) => {
|
|
83
86
|
multiProgress.deployProgress = {
|
|
@@ -37,6 +37,9 @@ const stillCommand = async (args, remotionRoot) => {
|
|
|
37
37
|
if (!composition) {
|
|
38
38
|
log_1.Log.info('No compositions passed. Fetching compositions...');
|
|
39
39
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
40
|
+
if (!serveUrl.startsWith('https://') && !serveUrl.startsWith('http://')) {
|
|
41
|
+
throw Error('Passing the shorthand serve URL without composition name is currently not supported.\n Make sure to pass a composition name after the shorthand serve URL or pass the complete serveURL without composition name to get to choose between all compositions.');
|
|
42
|
+
}
|
|
40
43
|
const server = await renderer_1.RenderInternals.prepareServer({
|
|
41
44
|
concurrency: 1,
|
|
42
45
|
indent: false,
|
|
@@ -46,7 +49,7 @@ const stillCommand = async (args, remotionRoot) => {
|
|
|
46
49
|
webpackConfigOrServeUrl: serveUrl,
|
|
47
50
|
});
|
|
48
51
|
const { compositionId } = await cli_1.CliInternals.getCompositionWithDimensionOverride({
|
|
49
|
-
args,
|
|
52
|
+
args: args.slice(1),
|
|
50
53
|
compositionIdFromUi: null,
|
|
51
54
|
indent: false,
|
|
52
55
|
serveUrlOrWebpackUrl: serveUrl,
|
package/dist/cli/log.d.ts
CHANGED
|
@@ -2,24 +2,24 @@ export declare const Log: {
|
|
|
2
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
3
3
|
verboseAdvanced: (options: {
|
|
4
4
|
indent: boolean;
|
|
5
|
-
logLevel: "
|
|
5
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
6
6
|
} & {
|
|
7
7
|
tag?: string | undefined;
|
|
8
8
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
9
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
10
10
|
infoAdvanced: (options: {
|
|
11
11
|
indent: boolean;
|
|
12
|
-
logLevel: "
|
|
12
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
13
13
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
14
14
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
15
15
|
warnAdvanced: (options: {
|
|
16
16
|
indent: boolean;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
18
18
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
errorAdvanced: (options: {
|
|
21
21
|
indent: boolean;
|
|
22
|
-
logLevel: "
|
|
22
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
23
23
|
} & {
|
|
24
24
|
tag?: string | undefined;
|
|
25
25
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
@@ -69,7 +69,7 @@ const createPostRenderData = ({ renderId, region, memorySizeInMb, renderMetadata
|
|
|
69
69
|
type: 'absolute-time',
|
|
70
70
|
}),
|
|
71
71
|
retriesInfo,
|
|
72
|
-
mostExpensiveFrameRanges: (0, get_most_expensive_chunks_1.getMostExpensiveChunks)(parsedTimings, renderMetadata.framesPerLambda, renderMetadata.frameRange[1]),
|
|
72
|
+
mostExpensiveFrameRanges: (0, get_most_expensive_chunks_1.getMostExpensiveChunks)(parsedTimings, renderMetadata.framesPerLambda, renderMetadata.frameRange[0], renderMetadata.frameRange[1]),
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
exports.createPostRenderData = createPostRenderData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-
|
|
1
|
+
export declare const getCurrentRegionInFunction: () => "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" | "eu-south-1" | "af-south-1" | "ap-east-1" | "me-south-1";
|
|
@@ -4,16 +4,16 @@ declare const streamingPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
4
4
|
type: z.ZodLiteral<"render-id-determined">;
|
|
5
5
|
renderId: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
type: "render-id-determined";
|
|
8
7
|
renderId: string;
|
|
9
|
-
}, {
|
|
10
8
|
type: "render-id-determined";
|
|
9
|
+
}, {
|
|
11
10
|
renderId: string;
|
|
11
|
+
type: "render-id-determined";
|
|
12
12
|
}>]>;
|
|
13
13
|
export type StreamingPayloads = z.infer<typeof streamingPayloadSchema>;
|
|
14
14
|
export declare const isStreamingPayload: (str: string) => false | {
|
|
15
|
-
type: "render-id-determined";
|
|
16
15
|
renderId: string;
|
|
16
|
+
type: "render-id-determined";
|
|
17
17
|
};
|
|
18
18
|
export declare const sendProgressEvent: (responseStream: ResponseStream, payload: StreamingPayloads) => void;
|
|
19
19
|
export {};
|
|
@@ -5,4 +5,4 @@ export type ExpensiveChunk = {
|
|
|
5
5
|
frameRange: [number, number];
|
|
6
6
|
timeInMilliseconds: number;
|
|
7
7
|
};
|
|
8
|
-
export declare const getMostExpensiveChunks: (parsedTimings: ParsedTiming[], framesPerLambda: number, lastFrame: number) => ExpensiveChunk[];
|
|
8
|
+
export declare const getMostExpensiveChunks: (parsedTimings: ParsedTiming[], framesPerLambda: number, firstFrame: number, lastFrame: number) => ExpensiveChunk[];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getMostExpensiveChunks = exports.OVERHEAD_TIME_PER_LAMBDA = void 0;
|
|
4
4
|
exports.OVERHEAD_TIME_PER_LAMBDA = 100;
|
|
5
|
-
const getMostExpensiveChunks = (parsedTimings, framesPerLambda, lastFrame) => {
|
|
5
|
+
const getMostExpensiveChunks = (parsedTimings, framesPerLambda, firstFrame, lastFrame) => {
|
|
6
6
|
const mostExpensiveChunks = parsedTimings
|
|
7
7
|
.slice(0)
|
|
8
8
|
.sort((a, b) => {
|
|
@@ -17,8 +17,10 @@ const getMostExpensiveChunks = (parsedTimings, framesPerLambda, lastFrame) => {
|
|
|
17
17
|
timeInMilliseconds: c.rendered - c.start,
|
|
18
18
|
chunk: c.chunk,
|
|
19
19
|
frameRange: [
|
|
20
|
-
framesPerLambda * c.chunk,
|
|
21
|
-
isLastChunk
|
|
20
|
+
framesPerLambda * c.chunk + firstFrame,
|
|
21
|
+
isLastChunk
|
|
22
|
+
? lastFrame
|
|
23
|
+
: framesPerLambda * (c.chunk + 1) - 1 + firstFrame,
|
|
22
24
|
],
|
|
23
25
|
};
|
|
24
26
|
});
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isFlakyError = void 0;
|
|
4
4
|
const isFlakyError = (err) => {
|
|
5
|
-
|
|
5
|
+
var _a;
|
|
6
|
+
const message = (_a = err.stack) !== null && _a !== void 0 ? _a : '';
|
|
6
7
|
// storage.googleapis.com sometimes returns 500s, and Video does not have retry on its own
|
|
7
8
|
if ((message.includes('Format error') || message.includes('audio metadata')) &&
|
|
8
9
|
message.includes('storage.googleapis.com')) {
|
|
@@ -26,6 +27,14 @@ const isFlakyError = (err) => {
|
|
|
26
27
|
if (message.includes('Timed out while setting up the headless browser')) {
|
|
27
28
|
return true;
|
|
28
29
|
}
|
|
30
|
+
// https://github.com/remotion-dev/remotion/issues/2742
|
|
31
|
+
if (message.includes('while trying to connect to the browser')) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
// https://discord.com/channels/809501355504959528/1131234931863998665/1131998442219118622
|
|
35
|
+
if (message.includes('RequestTimeout: Your socket connection to the server')) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
29
38
|
return false;
|
|
30
39
|
};
|
|
31
40
|
exports.isFlakyError = isFlakyError;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.21",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"aws-policies": "^1.0.1",
|
|
27
27
|
"mime-types": "2.1.34",
|
|
28
28
|
"zod": "3.21.4",
|
|
29
|
-
"@remotion/bundler": "4.0.
|
|
30
|
-
"@remotion/cli": "4.0.
|
|
31
|
-
"
|
|
32
|
-
"remotion": "4.0.
|
|
29
|
+
"@remotion/bundler": "4.0.21",
|
|
30
|
+
"@remotion/cli": "4.0.21",
|
|
31
|
+
"remotion": "4.0.21",
|
|
32
|
+
"@remotion/renderer": "4.0.21"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@jonny/eslint-config": "3.0.266",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"ts-node": "^10.8.0",
|
|
44
44
|
"vitest": "0.31.1",
|
|
45
45
|
"zip-lib": "^0.7.2",
|
|
46
|
-
"@remotion/bundler": "4.0.
|
|
47
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
46
|
+
"@remotion/bundler": "4.0.21",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.21"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@remotion/bundler": "4.0.
|
|
50
|
+
"@remotion/bundler": "4.0.21"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|