@remotion/lambda 4.0.260 → 4.0.261
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/build.ts +1 -1
- package/dist/admin/make-layer-public.js +3 -3
- package/dist/api/create-function.d.ts +1 -2
- package/dist/api/create-function.js +8 -8
- package/dist/api/delete-site.d.ts +2 -2
- package/dist/api/delete-site.js +3 -4
- package/dist/api/deploy-function.d.ts +2 -2
- package/dist/api/deploy-function.js +9 -13
- package/dist/api/deploy-site.d.ts +2 -2
- package/dist/api/deploy-site.js +19 -13
- package/dist/api/download-media.d.ts +3 -3
- package/dist/api/download-media.js +11 -5
- package/dist/api/get-function-info.d.ts +1 -1
- package/dist/api/get-function-info.js +6 -8
- package/dist/api/get-or-create-bucket.d.ts +3 -3
- package/dist/api/get-or-create-bucket.js +4 -4
- package/dist/api/get-regions.d.ts +1 -1
- package/dist/api/get-regions.js +1 -1
- package/dist/api/iam-validation/role-permissions.js +6 -7
- package/dist/api/iam-validation/simulate-rule.d.ts +1 -1
- package/dist/api/iam-validation/simulate-rule.js +2 -2
- package/dist/api/iam-validation/simulate.d.ts +1 -1
- package/dist/api/iam-validation/simulate.js +2 -2
- package/dist/api/iam-validation/user-permissions.js +4 -5
- package/dist/api/upload-dir.d.ts +2 -3
- package/dist/api/upload-dir.js +7 -4
- package/dist/cli/args.d.ts +2 -4
- package/dist/cli/commands/compositions/index.d.ts +1 -1
- package/dist/cli/commands/compositions/index.js +5 -6
- package/dist/cli/commands/functions/deploy.d.ts +1 -1
- package/dist/cli/commands/functions/deploy.js +8 -9
- package/dist/cli/commands/functions/index.d.ts +1 -1
- package/dist/cli/commands/functions/index.js +6 -6
- package/dist/cli/commands/functions/ls.d.ts +1 -1
- package/dist/cli/commands/functions/rm.js +4 -4
- package/dist/cli/commands/functions/rmall.d.ts +1 -1
- package/dist/cli/commands/functions/rmall.js +2 -2
- package/dist/cli/commands/policies/policies.js +5 -5
- package/dist/cli/commands/quotas/increase.js +5 -5
- package/dist/cli/commands/quotas/list.js +4 -4
- package/dist/cli/commands/render/progress.js +4 -4
- package/dist/cli/commands/render/render.d.ts +1 -1
- package/dist/cli/commands/render/render.js +13 -16
- package/dist/cli/commands/sites/create.d.ts +1 -1
- package/dist/cli/commands/sites/create.js +4 -4
- package/dist/cli/commands/sites/index.d.ts +1 -1
- package/dist/cli/commands/sites/index.js +6 -6
- package/dist/cli/commands/sites/ls.js +2 -2
- package/dist/cli/commands/sites/rm.d.ts +1 -1
- package/dist/cli/commands/sites/rm.js +4 -4
- package/dist/cli/commands/sites/rmall.d.ts +1 -1
- package/dist/cli/commands/sites/rmall.js +4 -4
- package/dist/cli/commands/still.d.ts +1 -1
- package/dist/cli/commands/still.js +10 -12
- package/dist/cli/get-aws-region.d.ts +1 -1
- package/dist/cli/get-aws-region.js +6 -7
- package/dist/cli/help.js +10 -10
- package/dist/cli/helpers/find-function-name.d.ts +1 -1
- package/dist/cli/helpers/find-function-name.js +5 -5
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +15 -17
- package/dist/cli/log.d.ts +5 -5
- package/dist/client.d.ts +1 -19
- package/dist/client.js +15 -30
- package/dist/defaults.d.ts +1 -1
- package/dist/defaults.js +1 -1
- package/dist/functions/aws-server-implementation.d.ts +2 -1
- package/dist/functions/aws-server-implementation.js +11 -2
- package/dist/functions/full-client-implementation.d.ts +1 -1
- package/dist/functions/full-client-implementation.js +0 -2
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/helpers/get-folder-files.d.ts +1 -1
- package/dist/functions/helpers/make-aws-artifact.d.ts +1 -1
- package/dist/functions/helpers/read-with-progress.d.ts +2 -3
- package/dist/functions/helpers/read-with-progress.js +6 -2
- package/dist/functions/index.d.ts +2 -3
- package/dist/functions/index.js +2 -4
- package/dist/index.d.ts +13 -32
- package/dist/index.js +24 -35
- package/dist/internals.d.ts +8 -12
- package/dist/internals.js +0 -4
- package/dist/shared/get-layers.d.ts +1 -4
- package/dist/shared/get-layers.js +3 -3
- package/dist/shared/get-s3-operations.d.ts +1 -1
- package/dist/shared/hosted-layers.d.ts +1 -1
- package/dist/shared/lambda-insights-extensions.d.ts +1 -1
- package/dist/shared/validate-timeout.js +3 -3
- package/package.json +20 -28
- package/remotionlambda-arm64.zip +0 -0
- package/dist/api/app-router-webhook.d.ts +0 -10
- package/dist/api/app-router-webhook.js +0 -43
- package/dist/api/bucket-exists.d.ts +0 -3
- package/dist/api/bucket-exists.js +0 -26
- package/dist/api/clean-items.d.ts +0 -16
- package/dist/api/clean-items.js +0 -25
- package/dist/api/create-bucket.d.ts +0 -3
- package/dist/api/create-bucket.js +0 -45
- package/dist/api/delete-function.d.ts +0 -4
- package/dist/api/delete-function.js +0 -15
- package/dist/api/delete-render.d.ts +0 -20
- package/dist/api/delete-render.js +0 -78
- package/dist/api/estimate-price.d.ts +0 -17
- package/dist/api/estimate-price.js +0 -45
- package/dist/api/express-webhook.d.ts +0 -3
- package/dist/api/express-webhook.js +0 -46
- package/dist/api/get-aws-client.d.ts +0 -30
- package/dist/api/get-aws-client.js +0 -56
- package/dist/api/get-buckets.d.ts +0 -9
- package/dist/api/get-buckets.js +0 -62
- package/dist/api/get-compositions-on-lambda.d.ts +0 -20
- package/dist/api/get-compositions-on-lambda.js +0 -60
- package/dist/api/get-functions.d.ts +0 -9
- package/dist/api/get-functions.js +0 -77
- package/dist/api/get-render-progress.d.ts +0 -16
- package/dist/api/get-render-progress.js +0 -45
- package/dist/api/get-sites.d.ts +0 -29
- package/dist/api/get-sites.js +0 -79
- package/dist/api/make-lambda-payload.d.ts +0 -57
- package/dist/api/make-lambda-payload.js +0 -150
- package/dist/api/pages-router-webhook.d.ts +0 -5
- package/dist/api/pages-router-webhook.js +0 -48
- package/dist/api/presign-url.d.ts +0 -14
- package/dist/api/presign-url.js +0 -59
- package/dist/api/render-media-on-lambda.d.ts +0 -63
- package/dist/api/render-media-on-lambda.js +0 -128
- package/dist/api/render-still-on-lambda.d.ts +0 -56
- package/dist/api/render-still-on-lambda.js +0 -118
- package/dist/api/speculate-function-name.d.ts +0 -6
- package/dist/api/speculate-function-name.js +0 -20
- package/dist/api/validate-webhook-signature.d.ts +0 -5
- package/dist/api/validate-webhook-signature.js +0 -28
- package/dist/cli/is-cli.d.ts +0 -2
- package/dist/cli/is-cli.js +0 -10
- package/dist/functions/aws-implementation.d.ts +0 -23
- package/dist/functions/aws-implementation.js +0 -97
- package/dist/functions/helpers/apply-lifecyle.d.ts +0 -8
- package/dist/functions/helpers/apply-lifecyle.js +0 -18
- package/dist/functions/helpers/get-output-url-from-metadata.d.ts +0 -3
- package/dist/functions/helpers/get-output-url-from-metadata.js +0 -12
- package/dist/functions/helpers/lifecycle.d.ts +0 -8
- package/dist/functions/helpers/lifecycle.js +0 -24
- package/dist/functions/helpers/parse-function-name.d.ts +0 -8
- package/dist/functions/helpers/parse-function-name.js +0 -17
- package/dist/functions/http-client.d.ts +0 -2
- package/dist/functions/http-client.js +0 -18
- package/dist/io/delete-file.d.ts +0 -3
- package/dist/io/delete-file.js +0 -12
- package/dist/io/head-file.d.ts +0 -3
- package/dist/io/head-file.js +0 -17
- package/dist/io/list-objects.d.ts +0 -3
- package/dist/io/list-objects.js +0 -67
- package/dist/io/read-file.d.ts +0 -9
- package/dist/io/read-file.js +0 -18
- package/dist/io/write-file.d.ts +0 -5
- package/dist/io/write-file.js +0 -55
- package/dist/pricing/price-per-1-s.d.ts +0 -37
- package/dist/pricing/price-per-1-s.js +0 -822
- package/dist/regions.d.ts +0 -3
- package/dist/regions.js +0 -48
- package/dist/shared/aws-clients.d.ts +0 -11
- package/dist/shared/aws-clients.js +0 -51
- package/dist/shared/call-lambda-async.d.ts +0 -3
- package/dist/shared/call-lambda-async.js +0 -20
- package/dist/shared/call-lambda-streaming.d.ts +0 -7
- package/dist/shared/call-lambda-streaming.js +0 -126
- package/dist/shared/call-lambda-sync.d.ts +0 -3
- package/dist/shared/call-lambda-sync.js +0 -30
- package/dist/shared/check-credentials.d.ts +0 -1
- package/dist/shared/check-credentials.js +0 -39
- package/dist/shared/constants.d.ts +0 -26
- package/dist/shared/constants.js +0 -29
- package/dist/shared/content-disposition-header.d.ts +0 -2
- package/dist/shared/content-disposition-header.js +0 -50
- package/dist/shared/convert-to-serve-url.d.ts +0 -6
- package/dist/shared/convert-to-serve-url.js +0 -14
- package/dist/shared/encode-aws-url-params.d.ts +0 -1
- package/dist/shared/encode-aws-url-params.js +0 -7
- package/dist/shared/get-account-id.d.ts +0 -3
- package/dist/shared/get-account-id.js +0 -15
- package/dist/shared/get-aws-urls.d.ts +0 -26
- package/dist/shared/get-aws-urls.js +0 -31
- package/dist/shared/get-credentials.d.ts +0 -9
- package/dist/shared/get-credentials.js +0 -55
- package/dist/shared/get-env-variable.d.ts +0 -1
- package/dist/shared/get-env-variable.js +0 -15
- package/dist/shared/get-function-version.d.ts +0 -7
- package/dist/shared/get-function-version.js +0 -32
- package/dist/shared/get-s3-client.d.ts +0 -9
- package/dist/shared/get-s3-client.js +0 -14
- package/dist/shared/get-service-client.d.ts +0 -23
- package/dist/shared/get-service-client.js +0 -121
- package/dist/shared/is-flaky-error.d.ts +0 -1
- package/dist/shared/is-flaky-error.js +0 -77
- package/dist/shared/is-in-lambda.d.ts +0 -1
- package/dist/shared/is-in-lambda.js +0 -9
- package/dist/shared/is-likely-to-have-aws-profile.d.ts +0 -1
- package/dist/shared/is-likely-to-have-aws-profile.js +0 -50
- package/dist/shared/lambda-version-string.d.ts +0 -1
- package/dist/shared/lambda-version-string.js +0 -7
- package/dist/shared/lifecycle-rules.d.ts +0 -10
- package/dist/shared/lifecycle-rules.js +0 -61
- package/dist/shared/make-s3-url.d.ts +0 -6
- package/dist/shared/make-s3-url.js +0 -7
- package/dist/shared/p-limit.d.ts +0 -1
- package/dist/shared/p-limit.js +0 -57
- package/dist/shared/random-hash.d.ts +0 -1
- package/dist/shared/random-hash.js +0 -13
- package/dist/shared/validate-aws-region.d.ts +0 -2
- package/dist/shared/validate-aws-region.js +0 -9
- package/dist/shared/validate-bucketname.d.ts +0 -4
- package/dist/shared/validate-bucketname.js +0 -15
- package/dist/shared/validate-disk-size-in-mb.d.ts +0 -1
- package/dist/shared/validate-disk-size-in-mb.js +0 -23
- package/dist/shared/validate-lambda-codec.d.ts +0 -2
- package/dist/shared/validate-lambda-codec.js +0 -21
- package/dist/shared/validate-memory-size.d.ts +0 -1
- package/dist/shared/validate-memory-size.js +0 -22
- package/dist/shared/validate-presign-expiration.d.ts +0 -1
- package/dist/shared/validate-presign-expiration.js +0 -29
- package/dist/shared/validate-serveurl.d.ts +0 -1
- package/dist/shared/validate-serveurl.js +0 -9
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sitesRmSubcommand = exports.SITES_RM_COMMAND = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
|
-
const
|
|
5
|
+
const lambda_client_1 = require("@remotion/lambda-client");
|
|
6
|
+
const serverless_1 = require("@remotion/serverless");
|
|
6
7
|
const delete_site_1 = require("../../../api/delete-site");
|
|
7
|
-
const get_sites_1 = require("../../../api/get-sites");
|
|
8
8
|
const args_1 = require("../../args");
|
|
9
9
|
const get_aws_region_1 = require("../../get-aws-region");
|
|
10
10
|
const confirm_1 = require("../../helpers/confirm");
|
|
@@ -22,11 +22,11 @@ const sitesRmSubcommand = async (args, logLevel, implementation) => {
|
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
25
|
-
const deployedSites = await (0,
|
|
25
|
+
const deployedSites = await (0, lambda_client_1.getSites)({
|
|
26
26
|
region,
|
|
27
27
|
forceBucketName: args_1.parsedLambdaCli['force-bucket-name'],
|
|
28
28
|
});
|
|
29
|
-
const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0,
|
|
29
|
+
const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, serverless_1.internalGetOrCreateBucket)({
|
|
30
30
|
region,
|
|
31
31
|
enableFolderExpiry: false,
|
|
32
32
|
customCredentials: null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { AwsProvider } from '@remotion/lambda-client';
|
|
1
2
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
3
|
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
3
|
-
import type { AwsProvider } from '../../../functions/aws-implementation';
|
|
4
4
|
export declare const SITES_RMALL_COMMAND = "rmall";
|
|
5
5
|
export declare const sitesRmallSubcommand: (logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<void>;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sitesRmallSubcommand = exports.SITES_RMALL_COMMAND = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
|
-
const
|
|
5
|
+
const lambda_client_1 = require("@remotion/lambda-client");
|
|
6
|
+
const serverless_1 = require("@remotion/serverless");
|
|
6
7
|
const delete_site_1 = require("../../../api/delete-site");
|
|
7
|
-
const get_sites_1 = require("../../../api/get-sites");
|
|
8
8
|
const args_1 = require("../../args");
|
|
9
9
|
const get_aws_region_1 = require("../../get-aws-region");
|
|
10
10
|
const confirm_1 = require("../../helpers/confirm");
|
|
@@ -13,10 +13,10 @@ exports.SITES_RMALL_COMMAND = 'rmall';
|
|
|
13
13
|
const sitesRmallSubcommand = async (logLevel, implementation) => {
|
|
14
14
|
var _a;
|
|
15
15
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
16
|
-
const deployedSites = await (0,
|
|
16
|
+
const deployedSites = await (0, lambda_client_1.getSites)({
|
|
17
17
|
region,
|
|
18
18
|
});
|
|
19
|
-
const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0,
|
|
19
|
+
const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, serverless_1.internalGetOrCreateBucket)({
|
|
20
20
|
region,
|
|
21
21
|
enableFolderExpiry: false,
|
|
22
22
|
customCredentials: null,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { AwsProvider } from '@remotion/lambda-client';
|
|
1
2
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
3
|
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
3
|
-
import type { AwsProvider } from '../../functions/aws-implementation';
|
|
4
4
|
export declare const STILL_COMMAND = "still";
|
|
5
5
|
export declare const stillCommand: ({ args, remotionRoot, logLevel, providerSpecifics, }: {
|
|
6
6
|
args: string[];
|
|
@@ -6,17 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.stillCommand = exports.STILL_COMMAND = void 0;
|
|
7
7
|
const cli_1 = require("@remotion/cli");
|
|
8
8
|
const config_1 = require("@remotion/cli/config");
|
|
9
|
+
const lambda_client_1 = require("@remotion/lambda-client");
|
|
9
10
|
const renderer_1 = require("@remotion/renderer");
|
|
10
11
|
const client_1 = require("@remotion/renderer/client");
|
|
11
|
-
const
|
|
12
|
+
const serverless_1 = require("@remotion/serverless");
|
|
12
13
|
const path_1 = __importDefault(require("path"));
|
|
13
14
|
const no_react_1 = require("remotion/no-react");
|
|
14
15
|
const download_media_1 = require("../../api/download-media");
|
|
15
|
-
const
|
|
16
|
-
const constants_1 = require("../../shared/constants");
|
|
17
|
-
const get_aws_urls_1 = require("../../shared/get-aws-urls");
|
|
16
|
+
const defaults_1 = require("../../defaults");
|
|
18
17
|
const validate_retries_1 = require("../../shared/validate-retries");
|
|
19
|
-
const validate_serveurl_1 = require("../../shared/validate-serveurl");
|
|
20
18
|
const args_1 = require("../args");
|
|
21
19
|
const get_aws_region_1 = require("../get-aws-region");
|
|
22
20
|
const find_function_name_1 = require("../helpers/find-function-name");
|
|
@@ -33,7 +31,7 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
|
|
|
33
31
|
log_1.Log.error({ indent: false, logLevel }, 'No serve URL passed.');
|
|
34
32
|
log_1.Log.info({ indent: false, logLevel }, 'Pass an additional argument specifying a URL where your Remotion project is hosted.');
|
|
35
33
|
log_1.Log.info({ indent: false, logLevel });
|
|
36
|
-
log_1.Log.info({ indent: false, logLevel }, `${
|
|
34
|
+
log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.STILL_COMMAND} <serve-url> <composition-id> [output-location]`);
|
|
37
35
|
(0, quit_1.quit)(1);
|
|
38
36
|
}
|
|
39
37
|
const { envVariables, inputProps, stillFrame, height, width, browserExecutable, userAgent, disableWebSecurity, ignoreCertificateErrors, } = getCliOptions({
|
|
@@ -69,7 +67,7 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
|
|
|
69
67
|
}).value;
|
|
70
68
|
if (!composition) {
|
|
71
69
|
log_1.Log.info({ indent: false, logLevel }, 'No compositions passed. Fetching compositions...');
|
|
72
|
-
|
|
70
|
+
lambda_client_1.LambdaClientInternals.validateServeUrl(serveUrl);
|
|
73
71
|
if (!serveUrl.startsWith('https://') && !serveUrl.startsWith('http://')) {
|
|
74
72
|
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.');
|
|
75
73
|
}
|
|
@@ -119,10 +117,10 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
|
|
|
119
117
|
const downloadName = (_a = args[2]) !== null && _a !== void 0 ? _a : null;
|
|
120
118
|
const outName = args_1.parsedLambdaCli['out-name'];
|
|
121
119
|
const functionName = await (0, find_function_name_1.findFunctionName)({ logLevel, providerSpecifics });
|
|
122
|
-
const maxRetries = (_b = args_1.parsedLambdaCli['max-retries']) !== null && _b !== void 0 ? _b :
|
|
120
|
+
const maxRetries = (_b = args_1.parsedLambdaCli['max-retries']) !== null && _b !== void 0 ? _b : defaults_1.DEFAULT_MAX_RETRIES;
|
|
123
121
|
(0, validate_retries_1.validateMaxRetries)(maxRetries);
|
|
124
|
-
const privacy = (_c = args_1.parsedLambdaCli.privacy) !== null && _c !== void 0 ? _c :
|
|
125
|
-
(0,
|
|
122
|
+
const privacy = (_c = args_1.parsedLambdaCli.privacy) !== null && _c !== void 0 ? _c : defaults_1.DEFAULT_OUTPUT_PRIVACY;
|
|
123
|
+
(0, serverless_1.validatePrivacy)(privacy, true);
|
|
126
124
|
const { format: imageFormat, source: imageFormatReason } = determineFinalStillImageFormat({
|
|
127
125
|
downloadName,
|
|
128
126
|
outName: outName !== null && outName !== void 0 ? outName : null,
|
|
@@ -140,7 +138,7 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
|
|
|
140
138
|
const jpegQuality = jpegQualityOption.getValue({
|
|
141
139
|
commandLine: parsedCli,
|
|
142
140
|
}).value;
|
|
143
|
-
const res = await (0,
|
|
141
|
+
const res = await (0, lambda_client_1.renderStillOnLambda)({
|
|
144
142
|
functionName,
|
|
145
143
|
serveUrl,
|
|
146
144
|
inputProps,
|
|
@@ -173,7 +171,7 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
|
|
|
173
171
|
},
|
|
174
172
|
deleteAfter,
|
|
175
173
|
});
|
|
176
|
-
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Render ID: ${cli_1.CliInternals.makeHyperlink({ text: res.renderId, fallback: res.renderId, url:
|
|
174
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Render ID: ${cli_1.CliInternals.makeHyperlink({ text: res.renderId, fallback: res.renderId, url: lambda_client_1.LambdaClientInternals.getS3RenderUrl({ bucketName: res.bucketName, renderId: res.renderId, region: (0, get_aws_region_1.getAwsRegion)() }) })}`));
|
|
177
175
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Bucket: ${cli_1.CliInternals.makeHyperlink({ text: res.bucketName, fallback: res.bucketName, url: `https://${(0, get_aws_region_1.getAwsRegion)()}.console.aws.amazon.com/s3/buckets/${res.bucketName}/?region=${(0, get_aws_region_1.getAwsRegion)()}` })}`));
|
|
178
176
|
const artifactProgress = (0, progress_1.makeArtifactProgress)(res.artifacts);
|
|
179
177
|
if (artifactProgress) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AwsRegion } from '@remotion/lambda-client';
|
|
2
2
|
export declare const getAwsRegion: () => AwsRegion;
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAwsRegion = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
4
|
+
const lambda_client_1 = require("@remotion/lambda-client");
|
|
5
|
+
const defaults_1 = require("../defaults");
|
|
7
6
|
const args_1 = require("./args");
|
|
8
7
|
const getAwsRegion = () => {
|
|
9
8
|
var _a;
|
|
10
9
|
if (args_1.parsedLambdaCli.region) {
|
|
11
|
-
|
|
10
|
+
lambda_client_1.LambdaClientInternals.validateAwsRegion(args_1.parsedLambdaCli.region);
|
|
12
11
|
return args_1.parsedLambdaCli.region;
|
|
13
12
|
}
|
|
14
|
-
const envVariable = (_a =
|
|
13
|
+
const envVariable = (_a = lambda_client_1.LambdaClientInternals.getEnvVariable('REMOTION_AWS_REGION')) !== null && _a !== void 0 ? _a : lambda_client_1.LambdaClientInternals.getEnvVariable('AWS_REGION');
|
|
15
14
|
if (envVariable) {
|
|
16
|
-
|
|
15
|
+
lambda_client_1.LambdaClientInternals.validateAwsRegion(envVariable);
|
|
17
16
|
return envVariable;
|
|
18
17
|
}
|
|
19
|
-
return
|
|
18
|
+
return defaults_1.DEFAULT_REGION;
|
|
20
19
|
};
|
|
21
20
|
exports.getAwsRegion = getAwsRegion;
|
package/dist/cli/help.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.printHelp = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
|
-
const
|
|
5
|
+
const defaults_1 = require("../defaults");
|
|
6
6
|
const compositions_1 = require("./commands/compositions");
|
|
7
7
|
const functions_1 = require("./commands/functions");
|
|
8
8
|
const policies_1 = require("./commands/policies/policies");
|
|
@@ -14,31 +14,31 @@ const still_1 = require("./commands/still");
|
|
|
14
14
|
const log_1 = require("./log");
|
|
15
15
|
const packagejson = require('../../package.json');
|
|
16
16
|
const printHelp = (logLevel) => {
|
|
17
|
-
log_1.Log.info({ indent: false, logLevel }, `${
|
|
17
|
+
log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${packagejson.version} © ${new Date().getFullYear()} The Remotion developers`);
|
|
18
18
|
log_1.Log.info({ indent: false, logLevel });
|
|
19
19
|
log_1.Log.info({ indent: false, logLevel }, 'Available commands:');
|
|
20
20
|
log_1.Log.info({ indent: false, logLevel }, '');
|
|
21
|
-
log_1.Log.info({ indent: false, logLevel }, `${
|
|
21
|
+
log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${render_1.RENDER_COMMAND} <s3-url> <composition-id>`);
|
|
22
22
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Render a video in the cloud.'));
|
|
23
|
-
log_1.Log.info({ indent: false, logLevel }, `${
|
|
23
|
+
log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${still_1.STILL_COMMAND} <s3-url> <composition-id>`);
|
|
24
24
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Render a still image in the cloud.'));
|
|
25
25
|
log_1.Log.info({ indent: false, logLevel });
|
|
26
|
-
log_1.Log.info({ indent: false, logLevel }, `${
|
|
26
|
+
log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${functions_1.FUNCTIONS_COMMAND}`);
|
|
27
27
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Deploy and manage AWS Lambda functions.'));
|
|
28
28
|
log_1.Log.info({ indent: false, logLevel });
|
|
29
|
-
log_1.Log.info({ indent: false, logLevel }, `${
|
|
29
|
+
log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${sites_1.SITES_COMMAND}`);
|
|
30
30
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Deploy and manage Remotion projects.'));
|
|
31
31
|
log_1.Log.info({ indent: false, logLevel });
|
|
32
|
-
log_1.Log.info({ indent: false, logLevel }, `${
|
|
32
|
+
log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${compositions_1.COMPOSITIONS_COMMAND}`);
|
|
33
33
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Print list of composition IDs from a serve URL.'));
|
|
34
34
|
log_1.Log.info({ indent: false, logLevel });
|
|
35
|
-
log_1.Log.info({ indent: false, logLevel }, `${
|
|
35
|
+
log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${policies_1.POLICIES_COMMAND}`);
|
|
36
36
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('View and validate AWS policy files.'));
|
|
37
37
|
log_1.Log.info({ indent: false, logLevel });
|
|
38
|
-
log_1.Log.info({ indent: false, logLevel }, `${
|
|
38
|
+
log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${regions_1.REGIONS_COMMAND}`);
|
|
39
39
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Show the list of AWS regions supported.'));
|
|
40
40
|
log_1.Log.info({ indent: false, logLevel });
|
|
41
|
-
log_1.Log.info({ indent: false, logLevel }, `${
|
|
41
|
+
log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${quotas_1.QUOTAS_COMMAND}`);
|
|
42
42
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Shows AWS quotas and allows to increase them.'));
|
|
43
43
|
};
|
|
44
44
|
exports.printHelp = printHelp;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { AwsProvider } from '@remotion/lambda-client';
|
|
1
2
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
3
|
import { ProviderSpecifics } from '@remotion/serverless';
|
|
3
|
-
import { AwsProvider } from '../../functions/aws-implementation';
|
|
4
4
|
export declare const findFunctionName: ({ logLevel, providerSpecifics, }: {
|
|
5
5
|
logLevel: LogLevel;
|
|
6
6
|
providerSpecifics: ProviderSpecifics<AwsProvider>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findFunctionName = void 0;
|
|
4
|
+
const lambda_client_1 = require("@remotion/lambda-client");
|
|
4
5
|
const version_1 = require("remotion/version");
|
|
5
|
-
const
|
|
6
|
-
const constants_1 = require("../../shared/constants");
|
|
6
|
+
const defaults_1 = require("../../defaults");
|
|
7
7
|
const args_1 = require("../args");
|
|
8
8
|
const functions_1 = require("../commands/functions");
|
|
9
9
|
const deploy_1 = require("../commands/functions/deploy");
|
|
@@ -26,7 +26,7 @@ const findFunctionName = async ({ logLevel, providerSpecifics, }) => {
|
|
|
26
26
|
if (cliFlag) {
|
|
27
27
|
const compatibleFunctionExists = lambdasWithMatchingVersion.find((l) => l.functionName === cliFlag);
|
|
28
28
|
if (!compatibleFunctionExists) {
|
|
29
|
-
log_1.Log.warn({ indent: false, logLevel }, `Function "${cliFlag}" does not match naming convention ${(0,
|
|
29
|
+
log_1.Log.warn({ indent: false, logLevel }, `Function "${cliFlag}" does not match naming convention ${(0, lambda_client_1.speculateFunctionName)({ diskSizeInMb: '[disk]', memorySizeInMb: '[memory]', timeoutInSeconds: '[timeout]' })}.`);
|
|
30
30
|
log_1.Log.warn({ indent: false, logLevel }, 'Remotion relies on the naming to determine function information. This is an unsupported workflow.');
|
|
31
31
|
if (lambdasWithMatchingVersion.length > 0) {
|
|
32
32
|
log_1.Log.info(logOptions, 'The following functions were found:');
|
|
@@ -44,7 +44,7 @@ const findFunctionName = async ({ logLevel, providerSpecifics, }) => {
|
|
|
44
44
|
log_1.Log.error({ indent: false, logLevel }, 'Other functions were found, but are not compatible with this version of the CLI.');
|
|
45
45
|
}
|
|
46
46
|
log_1.Log.info(logOptions, 'Run');
|
|
47
|
-
log_1.Log.info(logOptions, ` npx ${
|
|
47
|
+
log_1.Log.info(logOptions, ` npx ${defaults_1.BINARY_NAME} ${functions_1.FUNCTIONS_COMMAND} ${deploy_1.FUNCTIONS_DEPLOY_SUBCOMMAND}`);
|
|
48
48
|
log_1.Log.info(logOptions, `to deploy a new Lambda function.`);
|
|
49
49
|
(0, quit_1.quit)(1);
|
|
50
50
|
}
|
|
@@ -54,7 +54,7 @@ const findFunctionName = async ({ logLevel, providerSpecifics, }) => {
|
|
|
54
54
|
log_1.Log.info(logOptions, 'Possible solutions:');
|
|
55
55
|
log_1.Log.info(logOptions, '- Define using `--function-name` which function you want to use.');
|
|
56
56
|
log_1.Log.info(logOptions, `- Delete extraneous Lambda functions in your AWS console or using:`);
|
|
57
|
-
log_1.Log.info(logOptions, ` npx ${
|
|
57
|
+
log_1.Log.info(logOptions, ` npx ${defaults_1.BINARY_NAME} ${functions_1.FUNCTIONS_COMMAND} ${rm_1.FUNCTIONS_RM_SUBCOMMAND} $(npx ${defaults_1.BINARY_NAME} ${functions_1.FUNCTIONS_COMMAND} ${ls_1.FUNCTIONS_LS_SUBCOMMAND} -q) -y`);
|
|
58
58
|
log_1.Log.info(logOptions);
|
|
59
59
|
log_1.Log.info(logOptions, `The following functions were found (only showing v${version_1.VERSION}):`);
|
|
60
60
|
for (const l of lambdasWithMatchingVersion) {
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { AwsProvider } from '@remotion/lambda-client';
|
|
1
2
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
3
|
import { FullClientSpecifics, type ProviderSpecifics } from '@remotion/serverless';
|
|
3
|
-
|
|
4
|
-
export declare const executeCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, providerSpecifics: ProviderSpecifics<AwsProvider> | null, fullClientSpecifics: FullClientSpecifics<AwsProvider> | null) => Promise<void>;
|
|
4
|
+
export declare const executeCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, _providerSpecifics: ProviderSpecifics<AwsProvider> | null, fullClientSpecifics: FullClientSpecifics<AwsProvider> | null) => Promise<void>;
|
|
5
5
|
export declare const cli: (logLevel: LogLevel) => Promise<void>;
|
package/dist/cli/index.js
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.cli = exports.executeCommand = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const lambda_client_1 = require("@remotion/lambda-client");
|
|
5
6
|
const renderer_1 = require("@remotion/renderer");
|
|
6
|
-
const
|
|
7
|
+
const serverless_1 = require("@remotion/serverless");
|
|
7
8
|
const suggested_policy_1 = require("../api/iam-validation/suggested-policy");
|
|
8
9
|
const defaults_1 = require("../defaults");
|
|
9
|
-
const aws_implementation_1 = require("../functions/aws-implementation");
|
|
10
10
|
const full_client_implementation_1 = require("../functions/full-client-implementation");
|
|
11
|
-
const get_env_variable_1 = require("../shared/get-env-variable");
|
|
12
11
|
const args_1 = require("./args");
|
|
13
12
|
const compositions_1 = require("./commands/compositions");
|
|
14
13
|
const functions_1 = require("./commands/functions");
|
|
@@ -22,7 +21,6 @@ const sites_1 = require("./commands/sites");
|
|
|
22
21
|
const still_1 = require("./commands/still");
|
|
23
22
|
const help_1 = require("./help");
|
|
24
23
|
const quit_1 = require("./helpers/quit");
|
|
25
|
-
const is_cli_1 = require("./is-cli");
|
|
26
24
|
const log_1 = require("./log");
|
|
27
25
|
const requiresCredentials = (args) => {
|
|
28
26
|
if (args[0] === policies_1.POLICIES_COMMAND) {
|
|
@@ -44,7 +42,7 @@ const matchCommand = ({ args, remotionRoot, logLevel, providerSpecifics, fullCli
|
|
|
44
42
|
(0, quit_1.quit)(0);
|
|
45
43
|
}
|
|
46
44
|
if (requiresCredentials(args)) {
|
|
47
|
-
|
|
45
|
+
providerSpecifics.checkCredentials();
|
|
48
46
|
}
|
|
49
47
|
if (args[0] === render_1.RENDER_COMMAND) {
|
|
50
48
|
return (0, render_1.renderCommand)({
|
|
@@ -117,15 +115,15 @@ const matchCommand = ({ args, remotionRoot, logLevel, providerSpecifics, fullCli
|
|
|
117
115
|
(0, help_1.printHelp)(logLevel);
|
|
118
116
|
(0, quit_1.quit)(1);
|
|
119
117
|
};
|
|
120
|
-
const executeCommand = async (args, remotionRoot, logLevel,
|
|
118
|
+
const executeCommand = async (args, remotionRoot, logLevel, _providerSpecifics, fullClientSpecifics) => {
|
|
121
119
|
var _a, _b, _c, _d, _e;
|
|
122
120
|
try {
|
|
123
|
-
|
|
121
|
+
const providerSpecifics = _providerSpecifics !== null && _providerSpecifics !== void 0 ? _providerSpecifics : lambda_client_1.LambdaClientInternals.awsImplementation;
|
|
124
122
|
await matchCommand({
|
|
125
123
|
args,
|
|
126
124
|
remotionRoot,
|
|
127
125
|
logLevel,
|
|
128
|
-
providerSpecifics: providerSpecifics
|
|
126
|
+
providerSpecifics: providerSpecifics,
|
|
129
127
|
fullClientSpecifics: fullClientSpecifics !== null && fullClientSpecifics !== void 0 ? fullClientSpecifics : full_client_implementation_1.awsFullClientSpecifics,
|
|
130
128
|
});
|
|
131
129
|
}
|
|
@@ -138,7 +136,7 @@ const executeCommand = async (args, remotionRoot, logLevel, providerSpecifics, f
|
|
|
138
136
|
- Remove the "--custom-role-arn" parameter and set up Remotion Lambda according to the setup guide
|
|
139
137
|
- Make sure the role has the same policy assigned as the one returned by "npx ${defaults_1.BINARY_NAME} ${policies_1.POLICIES_COMMAND} ${role_1.ROLE_SUBCOMMAND}"
|
|
140
138
|
|
|
141
|
-
Revisit ${
|
|
139
|
+
Revisit ${serverless_1.DOCS_URL}/docs/lambda/setup and make sure you set up the role and role policy correctly. Also see the troubleshooting page: ${serverless_1.DOCS_URL}/docs/lambda/troubleshooting/permissions. The original error message is:
|
|
142
140
|
`.trim());
|
|
143
141
|
}
|
|
144
142
|
log_1.Log.error({ indent: false, logLevel }, `
|
|
@@ -146,24 +144,24 @@ The role "${suggested_policy_1.ROLE_NAME}" does not exist in your AWS account or
|
|
|
146
144
|
- The name of the role is not "${suggested_policy_1.ROLE_NAME}"
|
|
147
145
|
- The policy is not exactly as specified in the setup guide
|
|
148
146
|
|
|
149
|
-
Revisit ${
|
|
147
|
+
Revisit ${serverless_1.DOCS_URL}/docs/lambda/setup and make sure you set up the role and role policy correctly. Also see the troubleshooting page: ${serverless_1.DOCS_URL}/docs/lambda/troubleshooting/permissions. The original error message is:
|
|
150
148
|
`.trim());
|
|
151
149
|
}
|
|
152
150
|
if ((_a = error.stack) === null || _a === void 0 ? void 0 : _a.includes('AccessDenied')) {
|
|
153
151
|
log_1.Log.error({ indent: false, logLevel }, `
|
|
154
|
-
AWS returned an "AccessDenied" error message meaning a permission is missing. Read the permissions troubleshooting page: ${
|
|
152
|
+
AWS returned an "AccessDenied" error message meaning a permission is missing. Read the permissions troubleshooting page: ${serverless_1.DOCS_URL}/docs/lambda/troubleshooting/permissions. The original error message is:
|
|
155
153
|
`.trim());
|
|
156
154
|
}
|
|
157
155
|
if ((_b = error.stack) === null || _b === void 0 ? void 0 : _b.includes('TooManyRequestsException')) {
|
|
158
156
|
log_1.Log.error({ indent: false, logLevel }, `
|
|
159
|
-
AWS returned an "TooManyRequestsException" error message which could mean you reached the concurrency limit of AWS Lambda. You can increase the limit - read this troubleshooting page: ${
|
|
157
|
+
AWS returned an "TooManyRequestsException" error message which could mean you reached the concurrency limit of AWS Lambda. You can increase the limit - read this troubleshooting page: ${serverless_1.DOCS_URL}/docs/lambda/troubleshooting/rate-limit. The original error message is:
|
|
160
158
|
`.trim());
|
|
161
159
|
}
|
|
162
160
|
if ((_c = error.stack) === null || _c === void 0 ? void 0 : _c.includes('The security token included in the request is invalid')) {
|
|
163
|
-
const keyButDoesntStartWithAki =
|
|
164
|
-
!
|
|
165
|
-
const pureKeyButDoesntStartWithAki =
|
|
166
|
-
!
|
|
161
|
+
const keyButDoesntStartWithAki = lambda_client_1.LambdaClientInternals.getEnvVariable('REMOTION_AWS_ACCESS_KEY_ID') &&
|
|
162
|
+
!lambda_client_1.LambdaClientInternals.getEnvVariable('REMOTION_AWS_ACCESS_KEY_ID').startsWith('AKI');
|
|
163
|
+
const pureKeyButDoesntStartWithAki = lambda_client_1.LambdaClientInternals.getEnvVariable('AWS_ACCESS_KEY_ID') &&
|
|
164
|
+
!lambda_client_1.LambdaClientInternals.getEnvVariable('AWS_ACCESS_KEY_ID').startsWith('AKI');
|
|
167
165
|
if (keyButDoesntStartWithAki || pureKeyButDoesntStartWithAki) {
|
|
168
166
|
log_1.Log.error({ indent: false, logLevel }, `
|
|
169
167
|
AWS returned an error message "The security token included in the request is invalid". A possible reason is that your AWS Access key ID is set but doesn't start with "AKI", which it usually should. The original message is:
|
|
@@ -197,6 +195,6 @@ exports.executeCommand = executeCommand;
|
|
|
197
195
|
const cli = async (logLevel) => {
|
|
198
196
|
const remotionRoot = renderer_1.RenderInternals.findRemotionRoot();
|
|
199
197
|
await cli_1.CliInternals.initializeCli(remotionRoot);
|
|
200
|
-
await (0, exports.executeCommand)(args_1.parsedLambdaCli._, remotionRoot, logLevel,
|
|
198
|
+
await (0, exports.executeCommand)(args_1.parsedLambdaCli._, remotionRoot, logLevel, lambda_client_1.LambdaClientInternals.awsImplementation, full_client_implementation_1.awsFullClientSpecifics);
|
|
201
199
|
};
|
|
202
200
|
exports.cli = cli;
|
package/dist/cli/log.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const Log: {
|
|
2
2
|
trace: (options: import("@remotion/renderer").LogOptions & {
|
|
3
3
|
tag?: string;
|
|
4
|
-
},
|
|
4
|
+
}, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
5
5
|
verbose: (options: import("@remotion/renderer").LogOptions & {
|
|
6
6
|
tag?: string;
|
|
7
|
-
},
|
|
8
|
-
info: (options: import("@remotion/renderer").LogOptions,
|
|
9
|
-
warn: (options: import("@remotion/renderer").LogOptions,
|
|
7
|
+
}, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
8
|
+
info: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
9
|
+
warn: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
10
10
|
error: (options: import("@remotion/renderer").LogOptions & {
|
|
11
11
|
tag?: string;
|
|
12
|
-
},
|
|
12
|
+
}, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
13
13
|
};
|
package/dist/client.d.ts
CHANGED
|
@@ -1,19 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type { CustomCredentials, DeleteAfter } from '@remotion/serverless/client';
|
|
3
|
-
export { NextWebhookArgs, appRouterWebhook } from './api/app-router-webhook';
|
|
4
|
-
export { deleteRender, type DeleteRenderInput } from './api/delete-render';
|
|
5
|
-
export { expressWebhook } from './api/express-webhook';
|
|
6
|
-
export { getAwsClient, type GetAwsClientInput, type GetAwsClientOutput, } from './api/get-aws-client';
|
|
7
|
-
export { getCompositionsOnLambda, type GetCompositionsOnLambdaInput, type GetCompositionsOnLambdaOutput, } from './api/get-compositions-on-lambda';
|
|
8
|
-
export { getFunctions, type GetFunctionsInput } from './api/get-functions';
|
|
9
|
-
export { getRenderProgress } from './api/get-render-progress';
|
|
10
|
-
export type { GetRenderProgressInput } from './api/get-render-progress';
|
|
11
|
-
export { getSites, type GetSitesInput, type GetSitesOutput, } from './api/get-sites';
|
|
12
|
-
export { pagesRouterWebhook } from './api/pages-router-webhook';
|
|
13
|
-
export { presignUrl, type PresignUrlInput } from './api/presign-url';
|
|
14
|
-
export { renderMediaOnLambda, renderVideoOnLambda, type RenderMediaOnLambdaInput, type RenderMediaOnLambdaOutput, } from './api/render-media-on-lambda';
|
|
15
|
-
export { renderStillOnLambda, type RenderStillOnLambdaInput, type RenderStillOnLambdaOutput, } from './api/render-still-on-lambda';
|
|
16
|
-
export { speculateFunctionName, type SpeculateFunctionNameInput, } from './api/speculate-function-name';
|
|
17
|
-
export { validateWebhookSignature } from './api/validate-webhook-signature';
|
|
18
|
-
export type { AwsRegion } from './regions';
|
|
19
|
-
export type { RenderProgress } from './shared/constants';
|
|
1
|
+
export * from '@remotion/lambda-client';
|
package/dist/client.js
CHANGED
|
@@ -1,32 +1,17 @@
|
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
var app_router_webhook_1 = require("./api/app-router-webhook");
|
|
5
|
-
Object.defineProperty(exports, "appRouterWebhook", { enumerable: true, get: function () { return app_router_webhook_1.appRouterWebhook; } });
|
|
6
|
-
var delete_render_1 = require("./api/delete-render");
|
|
7
|
-
Object.defineProperty(exports, "deleteRender", { enumerable: true, get: function () { return delete_render_1.deleteRender; } });
|
|
8
|
-
var express_webhook_1 = require("./api/express-webhook");
|
|
9
|
-
Object.defineProperty(exports, "expressWebhook", { enumerable: true, get: function () { return express_webhook_1.expressWebhook; } });
|
|
10
|
-
var get_aws_client_1 = require("./api/get-aws-client");
|
|
11
|
-
Object.defineProperty(exports, "getAwsClient", { enumerable: true, get: function () { return get_aws_client_1.getAwsClient; } });
|
|
12
|
-
var get_compositions_on_lambda_1 = require("./api/get-compositions-on-lambda");
|
|
13
|
-
Object.defineProperty(exports, "getCompositionsOnLambda", { enumerable: true, get: function () { return get_compositions_on_lambda_1.getCompositionsOnLambda; } });
|
|
14
|
-
var get_functions_1 = require("./api/get-functions");
|
|
15
|
-
Object.defineProperty(exports, "getFunctions", { enumerable: true, get: function () { return get_functions_1.getFunctions; } });
|
|
16
|
-
var get_render_progress_1 = require("./api/get-render-progress");
|
|
17
|
-
Object.defineProperty(exports, "getRenderProgress", { enumerable: true, get: function () { return get_render_progress_1.getRenderProgress; } });
|
|
18
|
-
var get_sites_1 = require("./api/get-sites");
|
|
19
|
-
Object.defineProperty(exports, "getSites", { enumerable: true, get: function () { return get_sites_1.getSites; } });
|
|
20
|
-
var pages_router_webhook_1 = require("./api/pages-router-webhook");
|
|
21
|
-
Object.defineProperty(exports, "pagesRouterWebhook", { enumerable: true, get: function () { return pages_router_webhook_1.pagesRouterWebhook; } });
|
|
22
|
-
var presign_url_1 = require("./api/presign-url");
|
|
23
|
-
Object.defineProperty(exports, "presignUrl", { enumerable: true, get: function () { return presign_url_1.presignUrl; } });
|
|
24
|
-
var render_media_on_lambda_1 = require("./api/render-media-on-lambda");
|
|
25
|
-
Object.defineProperty(exports, "renderMediaOnLambda", { enumerable: true, get: function () { return render_media_on_lambda_1.renderMediaOnLambda; } });
|
|
26
|
-
Object.defineProperty(exports, "renderVideoOnLambda", { enumerable: true, get: function () { return render_media_on_lambda_1.renderVideoOnLambda; } });
|
|
27
|
-
var render_still_on_lambda_1 = require("./api/render-still-on-lambda");
|
|
28
|
-
Object.defineProperty(exports, "renderStillOnLambda", { enumerable: true, get: function () { return render_still_on_lambda_1.renderStillOnLambda; } });
|
|
29
|
-
var speculate_function_name_1 = require("./api/speculate-function-name");
|
|
30
|
-
Object.defineProperty(exports, "speculateFunctionName", { enumerable: true, get: function () { return speculate_function_name_1.speculateFunctionName; } });
|
|
31
|
-
var validate_webhook_signature_1 = require("./api/validate-webhook-signature");
|
|
32
|
-
Object.defineProperty(exports, "validateWebhookSignature", { enumerable: true, get: function () { return validate_webhook_signature_1.validateWebhookSignature; } });
|
|
17
|
+
__exportStar(require("@remotion/lambda-client"), exports);
|
package/dist/defaults.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '@remotion/lambda-client/constants';
|
package/dist/defaults.js
CHANGED
|
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("
|
|
17
|
+
__exportStar(require("@remotion/lambda-client/constants"), exports);
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { type AwsProvider } from '@remotion/lambda-client';
|
|
1
2
|
import type { InsideFunctionSpecifics } from '@remotion/serverless';
|
|
2
|
-
export declare const serverAwsImplementation: InsideFunctionSpecifics
|
|
3
|
+
export declare const serverAwsImplementation: InsideFunctionSpecifics<AwsProvider>;
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.serverAwsImplementation = void 0;
|
|
4
|
+
const lambda_client_1 = require("@remotion/lambda-client");
|
|
4
5
|
const serverless_1 = require("@remotion/serverless");
|
|
5
6
|
const clean_tmpdir_1 = require("./helpers/clean-tmpdir");
|
|
6
|
-
const
|
|
7
|
+
const get_current_region_1 = require("./helpers/get-current-region");
|
|
8
|
+
const get_folder_files_1 = require("./helpers/get-folder-files");
|
|
9
|
+
const make_aws_artifact_1 = require("./helpers/make-aws-artifact");
|
|
7
10
|
const timer_1 = require("./helpers/timer");
|
|
8
11
|
exports.serverAwsImplementation = {
|
|
9
12
|
forgetBrowserEventLoop: serverless_1.forgetBrowserEventLoopImplementation,
|
|
10
13
|
getBrowserInstance: serverless_1.getBrowserInstanceImplementation,
|
|
11
14
|
timer: timer_1.timer,
|
|
15
|
+
getCurrentRegionInFunction: get_current_region_1.getCurrentRegionInFunctionImplementation,
|
|
12
16
|
generateRandomId: ({ deleteAfter, randomHashFn }) => {
|
|
13
|
-
return
|
|
17
|
+
return lambda_client_1.LambdaClientInternals.generateRandomHashWithLifeCycleRule({
|
|
18
|
+
deleteAfter,
|
|
19
|
+
randomHashFn,
|
|
20
|
+
});
|
|
14
21
|
},
|
|
15
22
|
deleteTmpDir: () => Promise.resolve((0, clean_tmpdir_1.deleteTmpDir)()),
|
|
16
23
|
getCurrentFunctionName: () => {
|
|
@@ -23,4 +30,6 @@ exports.serverAwsImplementation = {
|
|
|
23
30
|
return Number(process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE);
|
|
24
31
|
},
|
|
25
32
|
invokeWebhook: serverless_1.invokeWebhook,
|
|
33
|
+
makeArtifactWithDetails: make_aws_artifact_1.makeAwsArtifact,
|
|
34
|
+
getFolderFiles: get_folder_files_1.getFolderFiles,
|
|
26
35
|
};
|
|
@@ -4,7 +4,6 @@ exports.awsFullClientSpecifics = void 0;
|
|
|
4
4
|
const bundler_1 = require("@remotion/bundler");
|
|
5
5
|
const create_function_1 = require("../api/create-function");
|
|
6
6
|
const upload_dir_1 = require("../api/upload-dir");
|
|
7
|
-
const check_credentials_1 = require("../shared/check-credentials");
|
|
8
7
|
const read_dir_1 = require("../shared/read-dir");
|
|
9
8
|
exports.awsFullClientSpecifics = {
|
|
10
9
|
bundleSite: bundler_1.bundle,
|
|
@@ -12,5 +11,4 @@ exports.awsFullClientSpecifics = {
|
|
|
12
11
|
readDirectory: read_dir_1.readDirectory,
|
|
13
12
|
uploadDir: upload_dir_1.uploadDir,
|
|
14
13
|
createFunction: create_function_1.createFunction,
|
|
15
|
-
checkCredentials: check_credentials_1.checkCredentials,
|
|
16
14
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AwsRegion } from '
|
|
1
|
+
import type { AwsRegion } from '@remotion/lambda-client';
|
|
2
2
|
export declare const getCurrentRegionInFunctionImplementation: () => AwsRegion;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { GetFolderFiles } from '@remotion/serverless
|
|
1
|
+
import type { GetFolderFiles } from '@remotion/serverless';
|
|
2
2
|
export declare const getFolderFiles: GetFolderFiles;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import type { AwsProvider, AwsRegion } from '@remotion/lambda-client';
|
|
1
2
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
import type { CustomCredentials } from '@remotion/serverless
|
|
3
|
-
import type { AwsRegion } from '../../regions';
|
|
4
|
-
import type { AwsProvider } from '../aws-implementation';
|
|
3
|
+
import type { CustomCredentials } from '@remotion/serverless';
|
|
5
4
|
export type LambdaReadFileProgress = (progress: {
|
|
6
5
|
totalSize: number;
|
|
7
6
|
downloaded: number;
|
|
@@ -3,10 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.lambdaDownloadFileWithProgress = void 0;
|
|
4
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
5
|
const s3_request_presigner_1 = require("@aws-sdk/s3-request-presigner");
|
|
6
|
+
const lambda_client_1 = require("@remotion/lambda-client");
|
|
6
7
|
const renderer_1 = require("@remotion/renderer");
|
|
7
|
-
const get_s3_client_1 = require("../../shared/get-s3-client");
|
|
8
8
|
const lambdaDownloadFileWithProgress = async ({ bucketName, key, region, expectedBucketOwner, outputPath, onProgress, customCredentials, logLevel, forcePathStyle, }) => {
|
|
9
|
-
const client =
|
|
9
|
+
const client = lambda_client_1.LambdaClientInternals.getS3Client({
|
|
10
|
+
region,
|
|
11
|
+
customCredentials,
|
|
12
|
+
forcePathStyle,
|
|
13
|
+
});
|
|
10
14
|
const command = new client_s3_1.GetObjectCommand({
|
|
11
15
|
Bucket: bucketName,
|
|
12
16
|
ExpectedBucketOwner: customCredentials ? undefined : expectedBucketOwner,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ServerlessPayload } from '@remotion/serverless
|
|
3
|
-
import type { AwsProvider } from './aws-implementation';
|
|
1
|
+
import type { AwsProvider } from '@remotion/lambda-client';
|
|
2
|
+
import type { RequestContext, ResponseStream, ServerlessPayload } from '@remotion/serverless';
|
|
4
3
|
export declare const routine: (params: ServerlessPayload<AwsProvider>, responseStream: ResponseStream, context: RequestContext) => Promise<void>;
|
|
5
4
|
export declare const handler: Function;
|