@remotion/lambda 4.0.267 → 4.0.270

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.
Files changed (37) hide show
  1. package/build.ts +1 -0
  2. package/bundle.ts +23 -0
  3. package/dist/api/create-function.js +3 -3
  4. package/dist/api/delete-site.js +3 -3
  5. package/dist/api/deploy-function.js +2 -2
  6. package/dist/api/deploy-site.js +3 -3
  7. package/dist/api/download-media.js +2 -2
  8. package/dist/api/get-function-info.js +2 -2
  9. package/dist/api/iam-validation/role-permissions.js +6 -6
  10. package/dist/api/iam-validation/user-permissions.js +4 -4
  11. package/dist/cli/commands/compositions/index.js +2 -2
  12. package/dist/cli/commands/functions/deploy.js +5 -5
  13. package/dist/cli/commands/functions/index.js +6 -6
  14. package/dist/cli/commands/functions/rm.js +2 -2
  15. package/dist/cli/commands/policies/policies.js +5 -5
  16. package/dist/cli/commands/quotas/increase.js +8 -8
  17. package/dist/cli/commands/quotas/index.js +3 -3
  18. package/dist/cli/commands/quotas/list.js +5 -5
  19. package/dist/cli/commands/render/progress.d.ts +1 -1
  20. package/dist/cli/commands/render/render.js +4 -4
  21. package/dist/cli/commands/sites/create.js +2 -2
  22. package/dist/cli/commands/sites/index.js +6 -6
  23. package/dist/cli/commands/still.js +4 -4
  24. package/dist/cli/get-aws-region.js +2 -2
  25. package/dist/cli/help.js +10 -10
  26. package/dist/cli/helpers/find-function-name.js +3 -3
  27. package/dist/cli/index.js +2 -2
  28. package/dist/esm/client.mjs +2 -0
  29. package/dist/esm/index.mjs +12886 -0
  30. package/dist/esm/policies.mjs +167 -0
  31. package/dist/policies.d.ts +1 -0
  32. package/dist/{defaults.js → policies.js} +1 -1
  33. package/dist/shared/function-zip-path.js +4 -1
  34. package/dist/shared/validate-timeout.js +3 -3
  35. package/package.json +35 -19
  36. package/remotionlambda-arm64.zip +0 -0
  37. package/dist/defaults.d.ts +0 -1
@@ -7,13 +7,13 @@ 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
9
  const lambda_client_1 = require("@remotion/lambda-client");
10
+ const constants_1 = require("@remotion/lambda-client/constants");
10
11
  const renderer_1 = require("@remotion/renderer");
11
12
  const client_1 = require("@remotion/renderer/client");
12
13
  const serverless_1 = require("@remotion/serverless");
13
14
  const path_1 = __importDefault(require("path"));
14
15
  const no_react_1 = require("remotion/no-react");
15
16
  const download_media_1 = require("../../api/download-media");
16
- const defaults_1 = require("../../defaults");
17
17
  const validate_retries_1 = require("../../shared/validate-retries");
18
18
  const args_1 = require("../args");
19
19
  const get_aws_region_1 = require("../get-aws-region");
@@ -31,7 +31,7 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
31
31
  log_1.Log.error({ indent: false, logLevel }, 'No serve URL passed.');
32
32
  log_1.Log.info({ indent: false, logLevel }, 'Pass an additional argument specifying a URL where your Remotion project is hosted.');
33
33
  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]`);
34
+ log_1.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.STILL_COMMAND} <serve-url> <composition-id> [output-location]`);
35
35
  (0, quit_1.quit)(1);
36
36
  }
37
37
  const { envVariables, inputProps, stillFrame, height, width, browserExecutable, userAgent, disableWebSecurity, ignoreCertificateErrors, } = getCliOptions({
@@ -121,9 +121,9 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
121
121
  const downloadName = (_a = args[2]) !== null && _a !== void 0 ? _a : null;
122
122
  const outName = args_1.parsedLambdaCli['out-name'];
123
123
  const functionName = await (0, find_function_name_1.findFunctionName)({ logLevel, providerSpecifics });
124
- const maxRetries = (_b = args_1.parsedLambdaCli['max-retries']) !== null && _b !== void 0 ? _b : defaults_1.DEFAULT_MAX_RETRIES;
124
+ const maxRetries = (_b = args_1.parsedLambdaCli['max-retries']) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MAX_RETRIES;
125
125
  (0, validate_retries_1.validateMaxRetries)(maxRetries);
126
- const privacy = (_c = args_1.parsedLambdaCli.privacy) !== null && _c !== void 0 ? _c : defaults_1.DEFAULT_OUTPUT_PRIVACY;
126
+ const privacy = (_c = args_1.parsedLambdaCli.privacy) !== null && _c !== void 0 ? _c : constants_1.DEFAULT_OUTPUT_PRIVACY;
127
127
  (0, serverless_1.validatePrivacy)(privacy, true);
128
128
  const { format: imageFormat, source: imageFormatReason } = determineFinalStillImageFormat({
129
129
  downloadName,
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAwsRegion = void 0;
4
4
  const lambda_client_1 = require("@remotion/lambda-client");
5
- const defaults_1 = require("../defaults");
5
+ const constants_1 = require("@remotion/lambda-client/constants");
6
6
  const args_1 = require("./args");
7
7
  const getAwsRegion = () => {
8
8
  var _a;
@@ -15,6 +15,6 @@ const getAwsRegion = () => {
15
15
  lambda_client_1.LambdaClientInternals.validateAwsRegion(envVariable);
16
16
  return envVariable;
17
17
  }
18
- return defaults_1.DEFAULT_REGION;
18
+ return constants_1.DEFAULT_REGION;
19
19
  };
20
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 defaults_1 = require("../defaults");
5
+ const constants_1 = require("@remotion/lambda-client/constants");
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 }, `${defaults_1.BINARY_NAME} ${packagejson.version} © ${new Date().getFullYear()} The Remotion developers`);
17
+ log_1.Log.info({ indent: false, logLevel }, `${constants_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 }, `${defaults_1.BINARY_NAME} ${render_1.RENDER_COMMAND} <s3-url> <composition-id>`);
21
+ log_1.Log.info({ indent: false, logLevel }, `${constants_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 }, `${defaults_1.BINARY_NAME} ${still_1.STILL_COMMAND} <s3-url> <composition-id>`);
23
+ log_1.Log.info({ indent: false, logLevel }, `${constants_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 }, `${defaults_1.BINARY_NAME} ${functions_1.FUNCTIONS_COMMAND}`);
26
+ log_1.Log.info({ indent: false, logLevel }, `${constants_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 }, `${defaults_1.BINARY_NAME} ${sites_1.SITES_COMMAND}`);
29
+ log_1.Log.info({ indent: false, logLevel }, `${constants_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 }, `${defaults_1.BINARY_NAME} ${compositions_1.COMPOSITIONS_COMMAND}`);
32
+ log_1.Log.info({ indent: false, logLevel }, `${constants_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 }, `${defaults_1.BINARY_NAME} ${policies_1.POLICIES_COMMAND}`);
35
+ log_1.Log.info({ indent: false, logLevel }, `${constants_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 }, `${defaults_1.BINARY_NAME} ${regions_1.REGIONS_COMMAND}`);
38
+ log_1.Log.info({ indent: false, logLevel }, `${constants_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 }, `${defaults_1.BINARY_NAME} ${quotas_1.QUOTAS_COMMAND}`);
41
+ log_1.Log.info({ indent: false, logLevel }, `${constants_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;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.findFunctionName = void 0;
4
4
  const lambda_client_1 = require("@remotion/lambda-client");
5
+ const constants_1 = require("@remotion/lambda-client/constants");
5
6
  const version_1 = require("remotion/version");
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");
@@ -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 ${defaults_1.BINARY_NAME} ${functions_1.FUNCTIONS_COMMAND} ${deploy_1.FUNCTIONS_DEPLOY_SUBCOMMAND}`);
47
+ log_1.Log.info(logOptions, ` npx ${constants_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 ${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`);
57
+ log_1.Log.info(logOptions, ` npx ${constants_1.BINARY_NAME} ${functions_1.FUNCTIONS_COMMAND} ${rm_1.FUNCTIONS_RM_SUBCOMMAND} $(npx ${constants_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.js CHANGED
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cli = exports.executeCommand = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
5
  const lambda_client_1 = require("@remotion/lambda-client");
6
+ const constants_1 = require("@remotion/lambda-client/constants");
6
7
  const renderer_1 = require("@remotion/renderer");
7
8
  const serverless_1 = require("@remotion/serverless");
8
9
  const suggested_policy_1 = require("../api/iam-validation/suggested-policy");
9
- const defaults_1 = require("../defaults");
10
10
  const full_client_implementation_1 = require("../functions/full-client-implementation");
11
11
  const args_1 = require("./args");
12
12
  const compositions_1 = require("./commands/compositions");
@@ -134,7 +134,7 @@ const executeCommand = async (args, remotionRoot, logLevel, _providerSpecifics,
134
134
  log_1.Log.error({ indent: false, logLevel }, `
135
135
  The role "${args_1.parsedLambdaCli['custom-role-arn']}" does not exist or has the wrong policy assigned to it. Do either:
136
136
  - Remove the "--custom-role-arn" parameter and set up Remotion Lambda according to the setup guide
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}"
137
+ - Make sure the role has the same policy assigned as the one returned by "npx ${constants_1.BINARY_NAME} ${policies_1.POLICIES_COMMAND} ${role_1.ROLE_SUBCOMMAND}"
138
138
 
139
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:
140
140
  `.trim());
@@ -0,0 +1,2 @@
1
+ // src/client.ts
2
+ export * from "@remotion/lambda-client";