@remotion/lambda 4.0.226 → 4.0.228
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/create-function.js +1 -1
- package/dist/api/get-functions.js +1 -1
- package/dist/cli/commands/sites/index.d.ts +1 -1
- package/dist/cli/commands/sites/ls.d.ts +1 -1
- package/dist/cli/log.d.ts +4 -4
- package/dist/functions/helpers/can-concat-seamlessly.js +0 -1
- package/dist/functions/helpers/clean-tmpdir.js +1 -1
- package/dist/functions/renderer.js +1 -0
- package/dist/shared/call-lambda.js +4 -3
- package/dist/shared/is-likely-to-have-aws-profile.js +1 -1
- package/dist/shared/read-dir.js +0 -1
- package/dist/shared/stackback.js +2 -2
- package/dist/shared/why-is-node-running.js +1 -1
- package/eslint.config.mjs +36 -0
- package/package.json +16 -14
- package/remotionlambda-arm64.zip +0 -0
- package/dist/admin/bundle-lambda.d.ts +0 -1
- package/dist/admin/bundle-lambda.js +0 -75
|
@@ -129,7 +129,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
|
|
|
129
129
|
RuntimeVersionArn,
|
|
130
130
|
}));
|
|
131
131
|
}
|
|
132
|
-
catch (
|
|
132
|
+
catch (_b) {
|
|
133
133
|
console.warn('⚠️ Could not lock the runtime version. We recommend to update your policies to prevent your functions from breaking in the future in case the AWS runtime changes. See https://remotion.dev/docs/lambda/feb-2023-incident for an example on how to update your policy.');
|
|
134
134
|
}
|
|
135
135
|
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, `Function runtime is locked to ${RuntimeVersionArn}`);
|
|
@@ -2,4 +2,4 @@ import type { LogLevel } from '@remotion/renderer';
|
|
|
2
2
|
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
3
3
|
import type { AwsProvider } from '../../../functions/aws-implementation';
|
|
4
4
|
export declare const SITES_COMMAND = "sites";
|
|
5
|
-
export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<void> | undefined;
|
|
5
|
+
export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<boolean | void> | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
2
|
export declare const SITES_LS_SUBCOMMAND = "ls";
|
|
3
|
-
export declare const sitesLsSubcommand: (logLevel: LogLevel) => Promise<void>;
|
|
3
|
+
export declare const sitesLsSubcommand: (logLevel: LogLevel) => Promise<boolean | void>;
|
package/dist/cli/log.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const Log: {
|
|
2
2
|
verbose: (options: import("@remotion/renderer/dist/logger").LogOptions & {
|
|
3
3
|
tag?: string;
|
|
4
|
-
}, ...args: Parameters<typeof console.log>) => void;
|
|
5
|
-
info: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => void;
|
|
6
|
-
warn: (options: import("@remotion/renderer/dist/logger").LogOptions, ...args: Parameters<typeof console.log>) => void;
|
|
4
|
+
}, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
5
|
+
info: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
6
|
+
warn: (options: import("@remotion/renderer/dist/logger").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
7
7
|
error: (options: import("@remotion/renderer/dist/logger").LogOptions & {
|
|
8
8
|
tag?: string;
|
|
9
|
-
}, ...args: Parameters<typeof console.log>) => void;
|
|
9
|
+
}, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
10
10
|
};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.canConcatVideoSeamlessly = exports.canConcatAudioSeamlessly = void 0;
|
|
4
4
|
// Cannot do WAV yet, because currently assumes AAC in+outpoint
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
5
|
const canConcatAudioSeamlessly = (audioCodec, chunkDurationInFrames) => {
|
|
7
6
|
// Rendering a chunk that is too small generates too much overhead
|
|
8
7
|
// and is currently buggy
|
|
@@ -217,6 +217,7 @@ const renderHandler = async ({ params, options, logs, onStream, providerSpecific
|
|
|
217
217
|
},
|
|
218
218
|
onArtifact,
|
|
219
219
|
metadata: params.metadata,
|
|
220
|
+
hardwareAcceleration: 'disable',
|
|
220
221
|
})
|
|
221
222
|
.then(({ slowestFrames }) => {
|
|
222
223
|
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel: params.logLevel }, `Slowest frames:`);
|
|
@@ -11,7 +11,7 @@ const parseJsonOrThrowSource = (data, type) => {
|
|
|
11
11
|
try {
|
|
12
12
|
return JSON.parse(asString);
|
|
13
13
|
}
|
|
14
|
-
catch (
|
|
14
|
+
catch (_a) {
|
|
15
15
|
throw new Error(`Invalid JSON (${type}): ${asString}`);
|
|
16
16
|
}
|
|
17
17
|
};
|
|
@@ -29,12 +29,13 @@ exports.callLambda = callLambda;
|
|
|
29
29
|
const callLambdaWithStreaming = async (options) => {
|
|
30
30
|
// As of August 2023, Lambda streaming sometimes misses parts of the JSON response.
|
|
31
31
|
// Handling this for now by applying a retry mechanism.
|
|
32
|
+
var _a;
|
|
32
33
|
try {
|
|
33
34
|
// Do not remove this await
|
|
34
35
|
await callLambdaWithStreamingWithoutRetry(options);
|
|
35
36
|
}
|
|
36
37
|
catch (err) {
|
|
37
|
-
if (err.
|
|
38
|
+
if ((_a = err.stack) === null || _a === void 0 ? void 0 : _a.includes('TooManyRequestsException')) {
|
|
38
39
|
throw new Error(`AWS Concurrency limit reached (Original Error: ${err.message}). See https://www.remotion.dev/docs/lambda/troubleshooting/rate-limit for tips to fix this.`);
|
|
39
40
|
}
|
|
40
41
|
if (!err.message.includes(INVALID_JSON_MESSAGE) &&
|
|
@@ -66,7 +67,7 @@ const callLambdaWithoutRetry = async ({ functionName, type, payload, region, tim
|
|
|
66
67
|
try {
|
|
67
68
|
return JSON.parse(decoded);
|
|
68
69
|
}
|
|
69
|
-
catch (
|
|
70
|
+
catch (_a) {
|
|
70
71
|
throw new Error(`Invalid JSON (${type}): ${JSON.stringify(decoded)}`);
|
|
71
72
|
}
|
|
72
73
|
};
|
package/dist/shared/read-dir.js
CHANGED
|
@@ -47,7 +47,6 @@ function readDirectory({ dir, etags, originalDir, onProgress, }) {
|
|
|
47
47
|
};
|
|
48
48
|
continue;
|
|
49
49
|
}
|
|
50
|
-
// eslint-disable-next-line no-lonely-if
|
|
51
50
|
if (fs.lstatSync(filePath).isSymbolicLink()) {
|
|
52
51
|
const realPath = fs.realpathSync(filePath);
|
|
53
52
|
etags[path.relative(originalDir, filePath)] = (0, get_etag_1.getEtagOfFile)(realPath, onProgress);
|
package/dist/shared/stackback.js
CHANGED
|
@@ -10,7 +10,7 @@ function FormatStackTrace(error, frames) {
|
|
|
10
10
|
try {
|
|
11
11
|
lines.push('<error: ' + e + '>');
|
|
12
12
|
}
|
|
13
|
-
catch (
|
|
13
|
+
catch (_a) {
|
|
14
14
|
lines.push('<error>');
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -24,7 +24,7 @@ function FormatStackTrace(error, frames) {
|
|
|
24
24
|
try {
|
|
25
25
|
line = '<error: ' + e + '>';
|
|
26
26
|
}
|
|
27
|
-
catch (
|
|
27
|
+
catch (_b) {
|
|
28
28
|
// Any code that reaches this point is seriously nasty!
|
|
29
29
|
line = '<error>';
|
|
30
30
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {remotionFlatConfig} from '@remotion/eslint-config-internal';
|
|
2
|
+
|
|
3
|
+
const config = remotionFlatConfig({react: false});
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
{
|
|
7
|
+
...config,
|
|
8
|
+
ignores: ['src/cli/**'],
|
|
9
|
+
rules: {
|
|
10
|
+
...config.rules,
|
|
11
|
+
'no-console': 'off',
|
|
12
|
+
'arrow-body-style': 'off',
|
|
13
|
+
'no-restricted-imports': [
|
|
14
|
+
'error',
|
|
15
|
+
{
|
|
16
|
+
patterns: ['@remotion/cli', '@remotion/*/src/*', 'remotion/src/*'],
|
|
17
|
+
paths: ['remotion', 'react', 'react-dom'],
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
...config,
|
|
24
|
+
files: ['src/cli/**.ts'],
|
|
25
|
+
rules: {
|
|
26
|
+
'no-console': 'error',
|
|
27
|
+
'no-restricted-imports': [
|
|
28
|
+
'error',
|
|
29
|
+
{
|
|
30
|
+
patterns: ['@remotion/*/src/*', 'remotion/src/*'],
|
|
31
|
+
paths: ['remotion', 'react', 'react-dom'],
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
];
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/lambda",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.228",
|
|
7
7
|
"description": "Render Remotion videos on AWS Lambda",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"@aws-sdk/s3-request-presigner": "3.645.0",
|
|
23
23
|
"mime-types": "2.1.34",
|
|
24
24
|
"zod": "3.22.3",
|
|
25
|
-
"@remotion/
|
|
26
|
-
"@remotion/
|
|
27
|
-
"@remotion/
|
|
28
|
-
"remotion": "4.0.
|
|
29
|
-
"@remotion/
|
|
30
|
-
"@remotion/
|
|
31
|
-
"
|
|
25
|
+
"@remotion/bundler": "4.0.228",
|
|
26
|
+
"@remotion/cli": "4.0.228",
|
|
27
|
+
"@remotion/streaming": "4.0.228",
|
|
28
|
+
"@remotion/renderer": "4.0.228",
|
|
29
|
+
"@remotion/serverless": "4.0.228",
|
|
30
|
+
"@remotion/studio-server": "4.0.228",
|
|
31
|
+
"remotion": "4.0.228"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/mime-types": "2.1.1",
|
|
@@ -37,11 +37,13 @@
|
|
|
37
37
|
"pureimage": "0.4.13",
|
|
38
38
|
"vitest": "0.31.1",
|
|
39
39
|
"zip-lib": "^0.7.2",
|
|
40
|
-
"
|
|
41
|
-
"@remotion/bundler": "4.0.
|
|
40
|
+
"eslint": "9.14.0",
|
|
41
|
+
"@remotion/bundler": "4.0.228",
|
|
42
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.228",
|
|
43
|
+
"@remotion/eslint-config-internal": "4.0.228"
|
|
42
44
|
},
|
|
43
45
|
"peerDependencies": {
|
|
44
|
-
"@remotion/bundler": "4.0.
|
|
46
|
+
"@remotion/bundler": "4.0.228"
|
|
45
47
|
},
|
|
46
48
|
"publishConfig": {
|
|
47
49
|
"access": "public"
|
|
@@ -74,9 +76,9 @@
|
|
|
74
76
|
"homepage": "https://www.remotion.dev/docs/lambda",
|
|
75
77
|
"scripts": {
|
|
76
78
|
"formatting": "prettier src --check",
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
+
"lint": "eslint src",
|
|
80
|
+
"testlambda": "vitest src/test/integration --run",
|
|
79
81
|
"test": "vitest src/test/unit --run",
|
|
80
|
-
"make": "bun build.ts"
|
|
82
|
+
"make": "tsc -d && bun build.ts"
|
|
81
83
|
}
|
|
82
84
|
}
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const bundler_1 = require("@remotion/bundler");
|
|
30
|
-
const compositor_linux_arm64_gnu_1 = require("@remotion/compositor-linux-arm64-gnu");
|
|
31
|
-
const node_fs_1 = __importStar(require("node:fs"));
|
|
32
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
33
|
-
const quit_1 = require("../cli/helpers/quit");
|
|
34
|
-
const function_zip_path_1 = require("../shared/function-zip-path");
|
|
35
|
-
const zl = require("zip-lib");
|
|
36
|
-
const bundleLambda = async () => {
|
|
37
|
-
const outdir = node_path_1.default.join(__dirname, '..', `build-render`);
|
|
38
|
-
node_fs_1.default.mkdirSync(outdir, {
|
|
39
|
-
recursive: true,
|
|
40
|
-
});
|
|
41
|
-
const outfile = node_path_1.default.join(outdir, 'index.js');
|
|
42
|
-
node_fs_1.default.rmSync(outdir, { recursive: true });
|
|
43
|
-
node_fs_1.default.mkdirSync(outdir, { recursive: true });
|
|
44
|
-
const template = require.resolve(node_path_1.default.join(__dirname, '..', 'functions', 'index'));
|
|
45
|
-
await bundler_1.BundlerInternals.esbuild.build({
|
|
46
|
-
platform: 'node',
|
|
47
|
-
target: 'node16',
|
|
48
|
-
bundle: true,
|
|
49
|
-
outfile,
|
|
50
|
-
entryPoints: [template],
|
|
51
|
-
treeShaking: true,
|
|
52
|
-
external: [],
|
|
53
|
-
});
|
|
54
|
-
const filesInCwd = (0, node_fs_1.readdirSync)(compositor_linux_arm64_gnu_1.dir);
|
|
55
|
-
const filesToCopy = filesInCwd.filter((f) => f.startsWith('remotion') ||
|
|
56
|
-
f.endsWith('.so') ||
|
|
57
|
-
f.endsWith('.dll') ||
|
|
58
|
-
f.endsWith('.dylib') ||
|
|
59
|
-
f.startsWith('ffmpeg') ||
|
|
60
|
-
f.startsWith('ffprobe'));
|
|
61
|
-
for (const file of filesToCopy) {
|
|
62
|
-
(0, node_fs_1.cpSync)(node_path_1.default.join(compositor_linux_arm64_gnu_1.dir, file), node_path_1.default.join(outdir, file));
|
|
63
|
-
}
|
|
64
|
-
node_fs_1.default.cpSync(node_path_1.default.join(__dirname, '..', '..', '..', 'renderer', 'node_modules', 'source-map', 'lib', 'mappings.wasm'), `${outdir}/mappings.wasm`);
|
|
65
|
-
await zl.archiveFolder(outdir, function_zip_path_1.FUNCTION_ZIP_ARM64);
|
|
66
|
-
node_fs_1.default.rmSync(outdir, { recursive: true });
|
|
67
|
-
};
|
|
68
|
-
bundleLambda()
|
|
69
|
-
.then(() => {
|
|
70
|
-
console.log('Bundled Lambda');
|
|
71
|
-
})
|
|
72
|
-
.catch((err) => {
|
|
73
|
-
console.log(err);
|
|
74
|
-
(0, quit_1.quit)(1);
|
|
75
|
-
});
|