@remotion/lambda 4.0.245 → 4.0.247

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 (212) hide show
  1. package/dist/api/app-router-webhook.d.ts +10 -0
  2. package/dist/api/app-router-webhook.js +43 -0
  3. package/dist/api/delete-function.d.ts +4 -6
  4. package/dist/api/delete-render.js +2 -4
  5. package/dist/api/delete-site.js +1 -2
  6. package/dist/api/deploy-function.d.ts +5 -1
  7. package/dist/api/deploy-function.js +16 -14
  8. package/dist/api/deploy-site.d.ts +2 -2
  9. package/dist/api/deploy-site.js +11 -14
  10. package/dist/api/download-media.js +2 -4
  11. package/dist/api/get-aws-client.d.ts +1 -1
  12. package/dist/api/get-compositions-on-lambda.d.ts +1 -1
  13. package/dist/api/get-compositions-on-lambda.js +10 -6
  14. package/dist/api/get-function-info.d.ts +1 -7
  15. package/dist/api/get-functions.d.ts +1 -1
  16. package/dist/api/get-render-progress.js +2 -4
  17. package/dist/api/get-sites.js +1 -2
  18. package/dist/api/make-lambda-payload.d.ts +2 -1
  19. package/dist/api/make-lambda-payload.js +19 -13
  20. package/dist/api/pages-router-webhook.d.ts +3 -0
  21. package/dist/api/pages-router-webhook.js +47 -0
  22. package/dist/api/render-media-on-lambda.d.ts +1 -1
  23. package/dist/api/render-media-on-lambda.js +2 -2
  24. package/dist/api/render-still-on-lambda.d.ts +2 -3
  25. package/dist/api/render-still-on-lambda.js +3 -2
  26. package/dist/api/upload-dir.d.ts +1 -7
  27. package/dist/api/upload-dir.js +2 -6
  28. package/dist/cli/args.d.ts +2 -1
  29. package/dist/cli/commands/compositions/index.d.ts +7 -1
  30. package/dist/cli/commands/compositions/index.js +2 -2
  31. package/dist/cli/commands/functions/deploy.d.ts +7 -1
  32. package/dist/cli/commands/functions/deploy.js +3 -1
  33. package/dist/cli/commands/functions/index.d.ts +8 -1
  34. package/dist/cli/commands/functions/index.js +8 -4
  35. package/dist/cli/commands/functions/ls.d.ts +6 -1
  36. package/dist/cli/commands/functions/ls.js +2 -3
  37. package/dist/cli/commands/functions/rmall.d.ts +6 -1
  38. package/dist/cli/commands/functions/rmall.js +2 -3
  39. package/dist/cli/commands/render/render.d.ts +6 -1
  40. package/dist/cli/commands/render/render.js +10 -7
  41. package/dist/cli/commands/sites/create.js +2 -0
  42. package/dist/cli/commands/sites/index.d.ts +1 -1
  43. package/dist/cli/commands/sites/index.js +4 -4
  44. package/dist/cli/commands/still.d.ts +2 -2
  45. package/dist/cli/commands/still.js +6 -5
  46. package/dist/cli/get-aws-region.js +0 -4
  47. package/dist/cli/helpers/find-function-name.d.ts +6 -1
  48. package/dist/cli/helpers/find-function-name.js +4 -5
  49. package/dist/cli/index.d.ts +2 -2
  50. package/dist/cli/index.js +36 -16
  51. package/dist/client.d.ts +17 -22
  52. package/dist/client.js +17 -13
  53. package/dist/functions/aws-implementation.d.ts +13 -1
  54. package/dist/functions/aws-implementation.js +46 -0
  55. package/dist/functions/aws-server-implementation.d.ts +2 -0
  56. package/dist/functions/aws-server-implementation.js +25 -0
  57. package/dist/functions/full-client-implementation.d.ts +3 -0
  58. package/dist/functions/full-client-implementation.js +16 -0
  59. package/dist/functions/helpers/clean-tmpdir.js +1 -3
  60. package/dist/functions/helpers/get-current-region.js +0 -4
  61. package/dist/functions/helpers/get-output-url-from-metadata.d.ts +3 -7
  62. package/dist/functions/helpers/get-output-url-from-metadata.js +1 -1
  63. package/dist/functions/helpers/lifecycle.d.ts +4 -2
  64. package/dist/functions/helpers/lifecycle.js +3 -18
  65. package/dist/functions/helpers/timer.d.ts +2 -4
  66. package/dist/functions/index.d.ts +1 -8
  67. package/dist/functions/index.js +12 -235
  68. package/dist/index.d.ts +6 -6
  69. package/dist/index.js +1 -1
  70. package/dist/internals.d.ts +6 -5
  71. package/dist/shared/check-credentials.js +2 -3
  72. package/dist/shared/constants.d.ts +2 -91
  73. package/dist/shared/constants.js +1 -8
  74. package/dist/shared/convert-to-serve-url.js +2 -2
  75. package/dist/shared/get-account-id.d.ts +3 -4
  76. package/dist/shared/get-account-id.js +3 -3
  77. package/dist/shared/get-aws-urls.d.ts +4 -8
  78. package/dist/shared/get-aws-urls.js +1 -1
  79. package/dist/shared/get-function-version.js +4 -4
  80. package/dist/shared/get-s3-operations.d.ts +4 -1
  81. package/dist/shared/get-s3-operations.js +2 -3
  82. package/dist/shared/get-service-client.js +2 -2
  83. package/dist/shared/read-dir.d.ts +2 -10
  84. package/dist/shared/read-dir.js +5 -4
  85. package/dist/shared/validate-bucketname.d.ts +1 -1
  86. package/package.json +15 -15
  87. package/remotionlambda-arm64.zip +0 -0
  88. package/dist/api/__mocks__/clean-items.d.ts +0 -2
  89. package/dist/api/__mocks__/clean-items.js +0 -24
  90. package/dist/api/__mocks__/create-function.d.ts +0 -2
  91. package/dist/api/__mocks__/create-function.js +0 -21
  92. package/dist/api/__mocks__/delete-function.d.ts +0 -2
  93. package/dist/api/__mocks__/delete-function.js +0 -9
  94. package/dist/api/__mocks__/get-functions.d.ts +0 -2
  95. package/dist/api/__mocks__/get-functions.js +0 -9
  96. package/dist/api/__mocks__/upload-dir.d.ts +0 -3
  97. package/dist/api/__mocks__/upload-dir.js +0 -47
  98. package/dist/api/mock-functions.d.ts +0 -18
  99. package/dist/api/mock-functions.js +0 -36
  100. package/dist/cli/helpers/__mocks__/quit.d.ts +0 -1
  101. package/dist/cli/helpers/__mocks__/quit.js +0 -7
  102. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +0 -7
  103. package/dist/functions/chunk-optimization/plan-frame-ranges.js +0 -17
  104. package/dist/functions/chunk-optimization/types.d.ts +0 -8
  105. package/dist/functions/chunk-optimization/types.js +0 -2
  106. package/dist/functions/helpers/__mocks__/get-browser-instance.d.ts +0 -3
  107. package/dist/functions/helpers/__mocks__/get-browser-instance.js +0 -12
  108. package/dist/functions/helpers/__mocks__/leak-detection.d.ts +0 -4
  109. package/dist/functions/helpers/__mocks__/leak-detection.js +0 -9
  110. package/dist/functions/helpers/__mocks__/timer.d.ts +0 -2
  111. package/dist/functions/helpers/__mocks__/timer.js +0 -10
  112. package/dist/functions/helpers/best-frames-per-lambda-param.d.ts +0 -1
  113. package/dist/functions/helpers/best-frames-per-lambda-param.js +0 -17
  114. package/dist/functions/helpers/calculate-chunk-times.d.ts +0 -5
  115. package/dist/functions/helpers/calculate-chunk-times.js +0 -29
  116. package/dist/functions/helpers/calculate-price-from-bucket.d.ts +0 -15
  117. package/dist/functions/helpers/calculate-price-from-bucket.js +0 -30
  118. package/dist/functions/helpers/can-concat-seamlessly.d.ts +0 -3
  119. package/dist/functions/helpers/can-concat-seamlessly.js +0 -17
  120. package/dist/functions/helpers/cleanup-props.d.ts +0 -8
  121. package/dist/functions/helpers/cleanup-props.js +0 -23
  122. package/dist/functions/helpers/concat-videos.d.ts +0 -23
  123. package/dist/functions/helpers/concat-videos.js +0 -54
  124. package/dist/functions/helpers/create-post-render-data.d.ts +0 -17
  125. package/dist/functions/helpers/create-post-render-data.js +0 -67
  126. package/dist/functions/helpers/find-output-file-in-bucket.d.ts +0 -14
  127. package/dist/functions/helpers/find-output-file-in-bucket.js +0 -38
  128. package/dist/functions/helpers/format-costs-info.d.ts +0 -2
  129. package/dist/functions/helpers/format-costs-info.js +0 -23
  130. package/dist/functions/helpers/get-overall-progress-s3.d.ts +0 -10
  131. package/dist/functions/helpers/get-overall-progress-s3.js +0 -24
  132. package/dist/functions/helpers/get-overall-progress.d.ts +0 -9
  133. package/dist/functions/helpers/get-overall-progress.js +0 -23
  134. package/dist/functions/helpers/get-progress.d.ts +0 -15
  135. package/dist/functions/helpers/get-progress.js +0 -254
  136. package/dist/functions/helpers/get-retry-stats.d.ts +0 -5
  137. package/dist/functions/helpers/get-retry-stats.js +0 -2
  138. package/dist/functions/helpers/inspect-errors.d.ts +0 -4
  139. package/dist/functions/helpers/inspect-errors.js +0 -39
  140. package/dist/functions/helpers/is-warm.d.ts +0 -2
  141. package/dist/functions/helpers/is-warm.js +0 -10
  142. package/dist/functions/helpers/leak-detection.d.ts +0 -4
  143. package/dist/functions/helpers/leak-detection.js +0 -40
  144. package/dist/functions/helpers/make-timeout-error.d.ts +0 -10
  145. package/dist/functions/helpers/make-timeout-error.js +0 -31
  146. package/dist/functions/helpers/make-timeout-message.d.ts +0 -10
  147. package/dist/functions/helpers/make-timeout-message.js +0 -75
  148. package/dist/functions/helpers/merge-chunks.d.ts +0 -36
  149. package/dist/functions/helpers/merge-chunks.js +0 -84
  150. package/dist/functions/helpers/min-max.d.ts +0 -2
  151. package/dist/functions/helpers/min-max.js +0 -33
  152. package/dist/functions/helpers/on-downloads-logger.d.ts +0 -2
  153. package/dist/functions/helpers/on-downloads-logger.js +0 -29
  154. package/dist/functions/helpers/overall-render-progress.d.ts +0 -59
  155. package/dist/functions/helpers/overall-render-progress.js +0 -180
  156. package/dist/functions/helpers/print-concurrency-curve.d.ts +0 -1
  157. package/dist/functions/helpers/print-concurrency-curve.js +0 -8
  158. package/dist/functions/helpers/print-logging-helper.d.ts +0 -4
  159. package/dist/functions/helpers/print-logging-helper.js +0 -12
  160. package/dist/functions/helpers/render-has-audio-video.d.ts +0 -6
  161. package/dist/functions/helpers/render-has-audio-video.js +0 -21
  162. package/dist/functions/helpers/request-context.d.ts +0 -5
  163. package/dist/functions/helpers/request-context.js +0 -2
  164. package/dist/functions/helpers/stream-renderer.d.ts +0 -17
  165. package/dist/functions/helpers/stream-renderer.js +0 -148
  166. package/dist/functions/launch.d.ts +0 -10
  167. package/dist/functions/launch.js +0 -596
  168. package/dist/functions/progress.d.ts +0 -11
  169. package/dist/functions/progress.js +0 -51
  170. package/dist/functions/renderer.d.ts +0 -17
  171. package/dist/functions/renderer.js +0 -341
  172. package/dist/functions/start.d.ts +0 -13
  173. package/dist/functions/start.js +0 -113
  174. package/dist/functions/still.d.ts +0 -19
  175. package/dist/functions/still.js +0 -330
  176. package/dist/shared/__mocks__/aws-clients.d.ts +0 -2
  177. package/dist/shared/__mocks__/aws-clients.js +0 -62
  178. package/dist/shared/__mocks__/bundle-site.d.ts +0 -2
  179. package/dist/shared/__mocks__/bundle-site.js +0 -32
  180. package/dist/shared/__mocks__/check-credentials.d.ts +0 -1
  181. package/dist/shared/__mocks__/check-credentials.js +0 -5
  182. package/dist/shared/__mocks__/get-account-id.d.ts +0 -2
  183. package/dist/shared/__mocks__/get-account-id.js +0 -11
  184. package/dist/shared/__mocks__/read-dir.d.ts +0 -2
  185. package/dist/shared/__mocks__/read-dir.js +0 -13
  186. package/dist/shared/call-lambda.d.ts +0 -16
  187. package/dist/shared/call-lambda.js +0 -149
  188. package/dist/shared/cleanup-serialized-input-props.d.ts +0 -14
  189. package/dist/shared/cleanup-serialized-input-props.js +0 -34
  190. package/dist/shared/docs-url.d.ts +0 -1
  191. package/dist/shared/docs-url.js +0 -4
  192. package/dist/shared/get-most-expensive-chunks.d.ts +0 -8
  193. package/dist/shared/get-most-expensive-chunks.js +0 -28
  194. package/dist/shared/invoke-webhook.d.ts +0 -48
  195. package/dist/shared/invoke-webhook.js +0 -140
  196. package/dist/shared/parse-lambda-timings-key.d.ts +0 -5
  197. package/dist/shared/parse-lambda-timings-key.js +0 -2
  198. package/dist/shared/return-values.d.ts +0 -16
  199. package/dist/shared/return-values.js +0 -2
  200. package/dist/shared/stackback.d.ts +0 -6
  201. package/dist/shared/stackback.js +0 -59
  202. package/dist/shared/validate-download-behavior.d.ts +0 -1
  203. package/dist/shared/validate-download-behavior.js +0 -21
  204. package/dist/shared/validate-frames-per-lambda.d.ts +0 -4
  205. package/dist/shared/validate-frames-per-lambda.js +0 -29
  206. package/dist/shared/validate-privacy.d.ts +0 -2
  207. package/dist/shared/validate-privacy.js +0 -14
  208. package/dist/shared/validate.d.ts +0 -4
  209. package/dist/shared/validate.js +0 -8
  210. package/dist/shared/why-is-node-running.d.ts +0 -15
  211. package/dist/shared/why-is-node-running.js +0 -88
  212. package/vitest.config.mts +0 -11
@@ -1,16 +1,10 @@
1
+ import type { UploadDirProgress } from '@remotion/serverless';
1
2
  import type { Privacy } from '@remotion/serverless/client';
2
3
  import type { AwsRegion } from '../regions';
3
- export type UploadDirProgress = {
4
- totalFiles: number;
5
- filesUploaded: number;
6
- totalSize: number;
7
- sizeUploaded: number;
8
- };
9
4
  export type MockFile = {
10
5
  name: string;
11
6
  content: string;
12
7
  };
13
- export declare const getDirFiles: (entry: string) => MockFile[];
14
8
  export declare const uploadDir: ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, forcePathStyle, }: {
15
9
  bucket: string;
16
10
  region: AwsRegion;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.uploadDir = exports.getDirFiles = void 0;
6
+ exports.uploadDir = void 0;
7
7
  const lib_storage_1 = require("@aws-sdk/lib-storage");
8
8
  const mime_types_1 = __importDefault(require("mime-types"));
9
9
  const node_fs_1 = require("node:fs");
@@ -11,10 +11,6 @@ const node_path_1 = __importDefault(require("node:path"));
11
11
  const get_s3_client_1 = require("../shared/get-s3-client");
12
12
  const make_s3_key_1 = require("../shared/make-s3-key");
13
13
  const p_limit_1 = require("../shared/p-limit");
14
- const getDirFiles = (entry) => {
15
- throw new TypeError('should only be executed in test ' + JSON.stringify(entry));
16
- };
17
- exports.getDirFiles = getDirFiles;
18
14
  async function getFiles(directory, originalDirectory, toUpload) {
19
15
  const dirents = await node_fs_1.promises.readdir(directory, { withFileTypes: true });
20
16
  const _files = await Promise.all(dirents
@@ -45,7 +41,7 @@ async function getFiles(directory, originalDirectory, toUpload) {
45
41
  }));
46
42
  return _files.flat(1);
47
43
  }
48
- const limit = (0, p_limit_1.pLimit)(30);
44
+ const limit = (0, p_limit_1.pLimit)(15);
49
45
  const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, forcePathStyle, }) => {
50
46
  const files = await getFiles(localDir, localDir, toUpload);
51
47
  const progresses = {};
@@ -1,6 +1,7 @@
1
1
  import type { BrowserSafeApis } from '@remotion/renderer/client';
2
- import type { AwsRegion, DeleteAfter } from '../client';
2
+ import type { DeleteAfter } from '../client';
3
3
  import type { Privacy } from '@remotion/serverless/client';
4
+ import { AwsRegion } from '../regions';
4
5
  import type { RuntimePreference } from '../shared/get-layers';
5
6
  type LambdaCommandLineOptions = {
6
7
  help: boolean;
@@ -1,3 +1,9 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { ProviderSpecifics } from '@remotion/serverless';
3
+ import { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const COMPOSITIONS_COMMAND = "compositions";
3
- export declare const compositionsCommand: (args: string[], logLevel: LogLevel) => Promise<void>;
5
+ export declare const compositionsCommand: ({ args, logLevel, providerSpecifics, }: {
6
+ args: string[];
7
+ logLevel: LogLevel;
8
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
9
+ }) => Promise<void>;
@@ -13,7 +13,7 @@ const quit_1 = require("../../helpers/quit");
13
13
  const log_1 = require("../../log");
14
14
  exports.COMPOSITIONS_COMMAND = 'compositions';
15
15
  const { enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, } = client_1.BrowserSafeApis.options;
16
- const compositionsCommand = async (args, logLevel) => {
16
+ const compositionsCommand = async ({ args, logLevel, providerSpecifics, }) => {
17
17
  const serveUrl = args[0];
18
18
  if (!serveUrl) {
19
19
  log_1.Log.error({ indent: false, logLevel }, 'No serve URL passed.');
@@ -47,7 +47,7 @@ const compositionsCommand = async (args, logLevel) => {
47
47
  };
48
48
  const region = (0, get_aws_region_1.getAwsRegion)();
49
49
  (0, validate_serveurl_1.validateServeUrl)(serveUrl);
50
- const functionName = await (0, find_function_name_1.findFunctionName)(logLevel);
50
+ const functionName = await (0, find_function_name_1.findFunctionName)({ logLevel, providerSpecifics });
51
51
  const comps = await (0, __1.getCompositionsOnLambda)({
52
52
  functionName,
53
53
  serveUrl,
@@ -1,3 +1,9 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { FullClientSpecifics, ProviderSpecifics } from '@remotion/serverless';
3
+ import { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const FUNCTIONS_DEPLOY_SUBCOMMAND = "deploy";
3
- export declare const functionsDeploySubcommand: (logLevel: LogLevel) => Promise<void>;
5
+ export declare const functionsDeploySubcommand: ({ logLevel, providerSpecifics, fullClientSpecifics, }: {
6
+ logLevel: LogLevel;
7
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
8
+ fullClientSpecifics: FullClientSpecifics<AwsProvider>;
9
+ }) => Promise<void>;
@@ -15,7 +15,7 @@ const args_1 = require("../../args");
15
15
  const get_aws_region_1 = require("../../get-aws-region");
16
16
  const log_1 = require("../../log");
17
17
  exports.FUNCTIONS_DEPLOY_SUBCOMMAND = 'deploy';
18
- const functionsDeploySubcommand = async (logLevel) => {
18
+ const functionsDeploySubcommand = async ({ logLevel, providerSpecifics, fullClientSpecifics, }) => {
19
19
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
20
20
  const region = (0, get_aws_region_1.getAwsRegion)();
21
21
  const timeoutInSeconds = (_a = args_1.parsedLambdaCli.timeout) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_TIMEOUT;
@@ -79,6 +79,8 @@ VPC Security Group IDs = ${vpcSecurityGroupIds}
79
79
  vpcSubnetIds,
80
80
  vpcSecurityGroupIds,
81
81
  runtimePreference,
82
+ providerSpecifics,
83
+ fullClientSpecifics,
82
84
  });
83
85
  if (cli_1.CliInternals.quietFlagProvided()) {
84
86
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, functionName);
@@ -1,3 +1,10 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { FullClientSpecifics, ProviderSpecifics } from '@remotion/serverless';
3
+ import { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const FUNCTIONS_COMMAND = "functions";
3
- export declare const functionsCommand: (args: string[], logLevel: LogLevel) => Promise<void> | undefined;
5
+ export declare const functionsCommand: ({ args, logLevel, fullClientSpecifics, providerSpecifics, }: {
6
+ args: string[];
7
+ logLevel: LogLevel;
8
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
9
+ fullClientSpecifics: FullClientSpecifics<AwsProvider>;
10
+ }) => Promise<void> | undefined;
@@ -26,18 +26,22 @@ const printFunctionsHelp = (logLevel) => {
26
26
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.FUNCTIONS_COMMAND} ${rmall_1.FUNCTIONS_RMALL_SUBCOMMAND}`);
27
27
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Delete all functions in selected region'));
28
28
  };
29
- const functionsCommand = (args, logLevel) => {
29
+ const functionsCommand = ({ args, logLevel, fullClientSpecifics, providerSpecifics, }) => {
30
30
  if (args[0] === ls_1.FUNCTIONS_LS_SUBCOMMAND) {
31
- return (0, ls_1.functionsLsCommand)(logLevel);
31
+ return (0, ls_1.functionsLsCommand)({ logLevel, providerSpecifics });
32
32
  }
33
33
  if (args[0] === rm_1.FUNCTIONS_RM_SUBCOMMAND) {
34
34
  return (0, rm_1.functionsRmCommand)(args.slice(1), logLevel);
35
35
  }
36
36
  if (args[0] === rmall_1.FUNCTIONS_RMALL_SUBCOMMAND) {
37
- return (0, rmall_1.functionsRmallCommand)(logLevel);
37
+ return (0, rmall_1.functionsRmallCommand)({ logLevel, providerSpecifics });
38
38
  }
39
39
  if (args[0] === deploy_1.FUNCTIONS_DEPLOY_SUBCOMMAND) {
40
- return (0, deploy_1.functionsDeploySubcommand)(logLevel);
40
+ return (0, deploy_1.functionsDeploySubcommand)({
41
+ logLevel,
42
+ fullClientSpecifics,
43
+ providerSpecifics,
44
+ });
41
45
  }
42
46
  if (args[0]) {
43
47
  cli_1.CliInternals.Log.error({ indent: false, logLevel }, `Subcommand ${args[0]} not found.`);
@@ -1,3 +1,8 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { ProviderSpecifics } from '@remotion/serverless';
3
+ import { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const FUNCTIONS_LS_SUBCOMMAND = "ls";
3
- export declare const functionsLsCommand: (logLevel: LogLevel) => Promise<void>;
5
+ export declare const functionsLsCommand: ({ logLevel, providerSpecifics, }: {
6
+ logLevel: LogLevel;
7
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
8
+ }) => Promise<void>;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.functionsLsCommand = exports.FUNCTIONS_LS_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
- const get_functions_1 = require("../../../api/get-functions");
6
5
  const args_1 = require("../../args");
7
6
  const get_aws_region_1 = require("../../get-aws-region");
8
7
  const NAME_COLS = 70;
@@ -11,7 +10,7 @@ const DISK_COLS = 15;
11
10
  const TIMEOUT_COLS = 15;
12
11
  const VERSION_COLS = 15;
13
12
  exports.FUNCTIONS_LS_SUBCOMMAND = 'ls';
14
- const functionsLsCommand = async (logLevel) => {
13
+ const functionsLsCommand = async ({ logLevel, providerSpecifics, }) => {
15
14
  const region = (0, get_aws_region_1.getAwsRegion)();
16
15
  const fetchingOutput = cli_1.CliInternals.createOverwriteableCliOutput({
17
16
  quiet: cli_1.CliInternals.quietFlagProvided(),
@@ -23,7 +22,7 @@ const functionsLsCommand = async (logLevel) => {
23
22
  });
24
23
  fetchingOutput.update('Getting functions...', false);
25
24
  const compatibleOnly = args_1.parsedLambdaCli['compatible-only'] || false;
26
- const functions = await (0, get_functions_1.getFunctions)({
25
+ const functions = await providerSpecifics.getFunctions({
27
26
  region,
28
27
  compatibleOnly,
29
28
  });
@@ -1,3 +1,8 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { ProviderSpecifics } from '@remotion/serverless';
3
+ import { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const FUNCTIONS_RMALL_SUBCOMMAND = "rmall";
3
- export declare const functionsRmallCommand: (logLevel: LogLevel) => Promise<void>;
5
+ export declare const functionsRmallCommand: ({ logLevel, providerSpecifics, }: {
6
+ logLevel: LogLevel;
7
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
8
+ }) => Promise<void>;
@@ -4,14 +4,13 @@ exports.functionsRmallCommand = exports.FUNCTIONS_RMALL_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
5
  const delete_function_1 = require("../../../api/delete-function");
6
6
  const get_function_info_1 = require("../../../api/get-function-info");
7
- const get_functions_1 = require("../../../api/get-functions");
8
7
  const get_aws_region_1 = require("../../get-aws-region");
9
8
  const confirm_1 = require("../../helpers/confirm");
10
9
  exports.FUNCTIONS_RMALL_SUBCOMMAND = 'rmall';
11
10
  const LEFT_COL = 16;
12
- const functionsRmallCommand = async (logLevel) => {
11
+ const functionsRmallCommand = async ({ logLevel, providerSpecifics, }) => {
13
12
  const region = (0, get_aws_region_1.getAwsRegion)();
14
- const functions = await (0, get_functions_1.getFunctions)({
13
+ const functions = await providerSpecifics.getFunctions({
15
14
  region,
16
15
  compatibleOnly: false,
17
16
  });
@@ -2,4 +2,9 @@ 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 RENDER_COMMAND = "render";
5
- export declare const renderCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<never>;
5
+ export declare const renderCommand: ({ args, remotionRoot, logLevel, providerSpecifics, }: {
6
+ args: string[];
7
+ remotionRoot: string;
8
+ logLevel: LogLevel;
9
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
10
+ }) => Promise<never>;
@@ -13,11 +13,10 @@ const no_react_1 = require("remotion/no-react");
13
13
  const download_media_1 = require("../../../api/download-media");
14
14
  const get_render_progress_1 = require("../../../api/get-render-progress");
15
15
  const render_media_on_lambda_1 = require("../../../api/render-media-on-lambda");
16
+ const client_2 = require("@remotion/serverless/client");
16
17
  const parse_function_name_1 = require("../../../functions/helpers/parse-function-name");
17
18
  const constants_1 = require("../../../shared/constants");
18
19
  const sleep_1 = require("../../../shared/sleep");
19
- const validate_frames_per_lambda_1 = require("../../../shared/validate-frames-per-lambda");
20
- const validate_privacy_1 = require("../../../shared/validate-privacy");
21
20
  const validate_retries_1 = require("../../../shared/validate-retries");
22
21
  const validate_serveurl_1 = require("../../../shared/validate-serveurl");
23
22
  const args_1 = require("../../args");
@@ -29,7 +28,7 @@ const log_1 = require("../../log");
29
28
  const progress_1 = require("./progress");
30
29
  exports.RENDER_COMMAND = 'render';
31
30
  const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, mutedOption, colorSpaceOption, deleteAfterOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, overwriteOption, binariesDirectoryOption, preferLosslessOption, metadataOption, } = client_1.BrowserSafeApis.options;
32
- const renderCommand = async (args, remotionRoot, logLevel, implementation) => {
31
+ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }) => {
33
32
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
34
33
  const serveUrl = args[0];
35
34
  if (!serveUrl) {
@@ -162,6 +161,7 @@ const renderCommand = async (args, remotionRoot, logLevel, implementation) => {
162
161
  logLevel,
163
162
  quiet: cli_1.CliInternals.quietFlagProvided(),
164
163
  }),
164
+ chromeMode: 'headless-shell',
165
165
  });
166
166
  composition = compositionId;
167
167
  }
@@ -180,13 +180,16 @@ const renderCommand = async (args, remotionRoot, logLevel, implementation) => {
180
180
  codec,
181
181
  uiImageFormat: null,
182
182
  });
183
- const functionName = await (0, find_function_name_1.findFunctionName)(logLevel);
183
+ const functionName = await (0, find_function_name_1.findFunctionName)({ logLevel, providerSpecifics });
184
184
  const maxRetries = (_c = args_1.parsedLambdaCli['max-retries']) !== null && _c !== void 0 ? _c : constants_1.DEFAULT_MAX_RETRIES;
185
185
  (0, validate_retries_1.validateMaxRetries)(maxRetries);
186
186
  const privacy = (_d = args_1.parsedLambdaCli.privacy) !== null && _d !== void 0 ? _d : constants_1.DEFAULT_OUTPUT_PRIVACY;
187
- (0, validate_privacy_1.validatePrivacy)(privacy, true);
187
+ (0, client_2.validatePrivacy)(privacy, true);
188
188
  const framesPerLambda = (_e = args_1.parsedLambdaCli['frames-per-lambda']) !== null && _e !== void 0 ? _e : undefined;
189
- (0, validate_frames_per_lambda_1.validateFramesPerLambda)({ framesPerLambda, durationInFrames: 1 });
189
+ (0, client_2.validateFramesPerFunction)({
190
+ framesPerFunction: framesPerLambda,
191
+ durationInFrames: 1,
192
+ });
190
193
  const webhookCustomData = (0, get_webhook_custom_data_1.getWebhookCustomData)(logLevel);
191
194
  const res = await (0, render_media_on_lambda_1.internalRenderMediaOnLambdaRaw)({
192
195
  functionName,
@@ -334,7 +337,7 @@ const renderCommand = async (args, remotionRoot, logLevel, implementation) => {
334
337
  overall: newStatus,
335
338
  }), false);
336
339
  },
337
- providerSpecifics: implementation,
340
+ providerSpecifics: providerSpecifics,
338
341
  forcePathStyle: args_1.parsedLambdaCli['force-path-style'],
339
342
  });
340
343
  downloadOrNothing = download;
@@ -6,6 +6,7 @@ const config_1 = require("@remotion/cli/config");
6
6
  const client_1 = require("@remotion/renderer/client");
7
7
  const client_2 = require("@remotion/serverless/client");
8
8
  const no_react_1 = require("remotion/no-react");
9
+ const full_client_implementation_1 = require("../../../functions/full-client-implementation");
9
10
  const internals_1 = require("../../../internals");
10
11
  const constants_1 = require("../../../shared/constants");
11
12
  const validate_site_name_1 = require("../../../shared/validate-site-name");
@@ -149,6 +150,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementatio
149
150
  throwIfSiteExists,
150
151
  providerSpecifics: implementation,
151
152
  forcePathStyle: (_e = args_1.parsedLambdaCli['force-path-style']) !== null && _e !== void 0 ? _e : false,
153
+ fullClientSpecifics: full_client_implementation_1.awsFullClientSpecifics,
152
154
  });
153
155
  const uploadDuration = Date.now() - uploadStart;
154
156
  multiProgress.deployProgress = {
@@ -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<boolean | void> | undefined;
5
+ export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, providerSpecifics: ProviderSpecifics<AwsProvider>) => Promise<boolean | void> | undefined;
@@ -26,18 +26,18 @@ const printSitesHelp = (logLevel) => {
26
26
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rmall_1.SITES_RMALL_COMMAND}`);
27
27
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Remove all sites from the S3 bucket.'));
28
28
  };
29
- const sitesCommand = (args, remotionRoot, logLevel, implementation) => {
29
+ const sitesCommand = (args, remotionRoot, logLevel, providerSpecifics) => {
30
30
  if (args[0] === ls_1.SITES_LS_SUBCOMMAND) {
31
31
  return (0, ls_1.sitesLsSubcommand)(logLevel);
32
32
  }
33
33
  if (args[0] === rm_1.SITES_RM_COMMAND) {
34
- return (0, rm_1.sitesRmSubcommand)(args.slice(1), logLevel, implementation);
34
+ return (0, rm_1.sitesRmSubcommand)(args.slice(1), logLevel, providerSpecifics);
35
35
  }
36
36
  if (args[0] === rmall_1.SITES_RMALL_COMMAND) {
37
- return (0, rmall_1.sitesRmallSubcommand)(logLevel, implementation);
37
+ return (0, rmall_1.sitesRmallSubcommand)(logLevel, providerSpecifics);
38
38
  }
39
39
  if (args[0] === create_1.SITES_CREATE_SUBCOMMAND) {
40
- return (0, create_1.sitesCreateSubcommand)(args.slice(1), remotionRoot, logLevel, implementation);
40
+ return (0, create_1.sitesCreateSubcommand)(args.slice(1), remotionRoot, logLevel, providerSpecifics);
41
41
  }
42
42
  if (args[0]) {
43
43
  cli_1.CliInternals.Log.error({ indent: false, logLevel }, `Subcommand ${args[0]} not found.`);
@@ -2,9 +2,9 @@ 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 STILL_COMMAND = "still";
5
- export declare const stillCommand: ({ args, remotionRoot, logLevel, implementation, }: {
5
+ export declare const stillCommand: ({ args, remotionRoot, logLevel, providerSpecifics, }: {
6
6
  args: string[];
7
7
  remotionRoot: string;
8
8
  logLevel: LogLevel;
9
- implementation: ProviderSpecifics<AwsProvider>;
9
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
10
10
  }) => Promise<void>;
@@ -8,13 +8,13 @@ const cli_1 = require("@remotion/cli");
8
8
  const config_1 = require("@remotion/cli/config");
9
9
  const renderer_1 = require("@remotion/renderer");
10
10
  const client_1 = require("@remotion/renderer/client");
11
+ const client_2 = require("@remotion/serverless/client");
11
12
  const path_1 = __importDefault(require("path"));
12
13
  const no_react_1 = require("remotion/no-react");
13
14
  const download_media_1 = require("../../api/download-media");
14
15
  const render_still_on_lambda_1 = require("../../api/render-still-on-lambda");
15
16
  const constants_1 = require("../../shared/constants");
16
17
  const get_aws_urls_1 = require("../../shared/get-aws-urls");
17
- const validate_privacy_1 = require("../../shared/validate-privacy");
18
18
  const validate_retries_1 = require("../../shared/validate-retries");
19
19
  const validate_serveurl_1 = require("../../shared/validate-serveurl");
20
20
  const args_1 = require("../args");
@@ -26,7 +26,7 @@ const progress_1 = require("./render/progress");
26
26
  const { offthreadVideoCacheSizeInBytesOption, scaleOption, deleteAfterOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, } = client_1.BrowserSafeApis.options;
27
27
  const { parsedCli, determineFinalStillImageFormat, chalk, getCliOptions, formatBytes, getCompositionWithDimensionOverride, } = cli_1.CliInternals;
28
28
  exports.STILL_COMMAND = 'still';
29
- const stillCommand = async ({ args, remotionRoot, logLevel, implementation, }) => {
29
+ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }) => {
30
30
  var _a, _b, _c, _d, _e;
31
31
  const serveUrl = args[0];
32
32
  if (!serveUrl) {
@@ -112,16 +112,17 @@ const stillCommand = async ({ args, remotionRoot, logLevel, implementation, }) =
112
112
  logLevel,
113
113
  quiet: cli_1.CliInternals.quietFlagProvided(),
114
114
  }),
115
+ chromeMode: 'headless-shell',
115
116
  });
116
117
  composition = compositionId;
117
118
  }
118
119
  const downloadName = (_a = args[2]) !== null && _a !== void 0 ? _a : null;
119
120
  const outName = args_1.parsedLambdaCli['out-name'];
120
- const functionName = await (0, find_function_name_1.findFunctionName)(logLevel);
121
+ const functionName = await (0, find_function_name_1.findFunctionName)({ logLevel, providerSpecifics });
121
122
  const maxRetries = (_b = args_1.parsedLambdaCli['max-retries']) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MAX_RETRIES;
122
123
  (0, validate_retries_1.validateMaxRetries)(maxRetries);
123
124
  const privacy = (_c = args_1.parsedLambdaCli.privacy) !== null && _c !== void 0 ? _c : constants_1.DEFAULT_OUTPUT_PRIVACY;
124
- (0, validate_privacy_1.validatePrivacy)(privacy, true);
125
+ (0, client_2.validatePrivacy)(privacy, true);
125
126
  const { format: imageFormat, source: imageFormatReason } = determineFinalStillImageFormat({
126
127
  downloadName,
127
128
  outName: outName !== null && outName !== void 0 ? outName : null,
@@ -193,7 +194,7 @@ const stillCommand = async ({ args, remotionRoot, logLevel, implementation, }) =
193
194
  region,
194
195
  renderId: res.renderId,
195
196
  logLevel,
196
- providerSpecifics: implementation,
197
+ providerSpecifics: providerSpecifics,
197
198
  forcePathStyle: args_1.parsedLambdaCli['force-path-style'],
198
199
  });
199
200
  const relativePath = path_1.default.relative(process.cwd(), outputPath);
@@ -2,14 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAwsRegion = void 0;
4
4
  const constants_1 = require("../shared/constants");
5
- const is_in_lambda_1 = require("../shared/is-in-lambda");
6
5
  const validate_aws_region_1 = require("../shared/validate-aws-region");
7
6
  const args_1 = require("./args");
8
7
  const getAwsRegion = () => {
9
8
  var _a;
10
- if ((0, is_in_lambda_1.isInsideLambda)()) {
11
- throw new Error('Should not call getAwsRegion() if in lambda');
12
- }
13
9
  if (args_1.parsedLambdaCli.region) {
14
10
  (0, validate_aws_region_1.validateAwsRegion)(args_1.parsedLambdaCli.region);
15
11
  return args_1.parsedLambdaCli.region;
@@ -1,2 +1,7 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
- export declare const findFunctionName: (logLevel: LogLevel) => Promise<string>;
2
+ import { ProviderSpecifics } from '@remotion/serverless';
3
+ import { AwsProvider } from '../../functions/aws-implementation';
4
+ export declare const findFunctionName: ({ logLevel, providerSpecifics, }: {
5
+ logLevel: LogLevel;
6
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
7
+ }) => Promise<string>;
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.findFunctionName = void 0;
4
4
  const version_1 = require("remotion/version");
5
- const get_functions_1 = require("../../api/get-functions");
6
- const client_1 = require("../../client");
5
+ const speculate_function_name_1 = require("../../api/speculate-function-name");
7
6
  const constants_1 = require("../../shared/constants");
8
7
  const args_1 = require("../args");
9
8
  const functions_1 = require("../commands/functions");
@@ -13,8 +12,8 @@ const rm_1 = require("../commands/functions/rm");
13
12
  const get_aws_region_1 = require("../get-aws-region");
14
13
  const log_1 = require("../log");
15
14
  const quit_1 = require("./quit");
16
- const findFunctionName = async (logLevel) => {
17
- const remotionLambdas = await (0, get_functions_1.getFunctions)({
15
+ const findFunctionName = async ({ logLevel, providerSpecifics, }) => {
16
+ const remotionLambdas = await providerSpecifics.getFunctions({
18
17
  region: (0, get_aws_region_1.getAwsRegion)(),
19
18
  compatibleOnly: false,
20
19
  });
@@ -27,7 +26,7 @@ const findFunctionName = async (logLevel) => {
27
26
  if (cliFlag) {
28
27
  const compatibleFunctionExists = lambdasWithMatchingVersion.find((l) => l.functionName === cliFlag);
29
28
  if (!compatibleFunctionExists) {
30
- log_1.Log.warn({ indent: false, logLevel }, `Function "${cliFlag}" does not match naming convention ${(0, client_1.speculateFunctionName)({ diskSizeInMb: '[disk]', memorySizeInMb: '[memory]', timeoutInSeconds: '[timeout]' })}.`);
29
+ log_1.Log.warn({ indent: false, logLevel }, `Function "${cliFlag}" does not match naming convention ${(0, speculate_function_name_1.speculateFunctionName)({ diskSizeInMb: '[disk]', memorySizeInMb: '[memory]', timeoutInSeconds: '[timeout]' })}.`);
31
30
  log_1.Log.warn({ indent: false, logLevel }, 'Remotion relies on the naming to determine function information. This is an unsupported workflow.');
32
31
  if (lambdasWithMatchingVersion.length > 0) {
33
32
  log_1.Log.info(logOptions, 'The following functions were found:');
@@ -1,5 +1,5 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
- import type { ProviderSpecifics } from '@remotion/serverless';
2
+ import { FullClientSpecifics, type ProviderSpecifics } from '@remotion/serverless';
3
3
  import type { AwsProvider } from '../functions/aws-implementation';
4
- export declare const executeCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, implementation: ProviderSpecifics<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
@@ -3,11 +3,11 @@ 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 renderer_1 = require("@remotion/renderer");
6
+ const client_1 = require("@remotion/serverless/client");
6
7
  const suggested_policy_1 = require("../api/iam-validation/suggested-policy");
7
8
  const defaults_1 = require("../defaults");
8
9
  const aws_implementation_1 = require("../functions/aws-implementation");
9
- const check_credentials_1 = require("../shared/check-credentials");
10
- const docs_url_1 = require("../shared/docs-url");
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");
13
13
  const functions_1 = require("./commands/functions");
@@ -37,30 +37,44 @@ const requiresCredentials = (args) => {
37
37
  }
38
38
  return true;
39
39
  };
40
- const matchCommand = (args, remotionRoot, logLevel, implementation) => {
40
+ const matchCommand = ({ args, remotionRoot, logLevel, providerSpecifics, fullClientSpecifics, }) => {
41
41
  if (args_1.parsedLambdaCli.help || args.length === 0) {
42
42
  (0, help_1.printHelp)(logLevel);
43
43
  (0, quit_1.quit)(0);
44
44
  }
45
45
  if (requiresCredentials(args)) {
46
- (0, check_credentials_1.checkCredentials)();
46
+ fullClientSpecifics.checkCredentials();
47
47
  }
48
48
  if (args[0] === render_1.RENDER_COMMAND) {
49
- return (0, render_1.renderCommand)(args.slice(1), remotionRoot, logLevel, implementation);
49
+ return (0, render_1.renderCommand)({
50
+ args: args.slice(1),
51
+ remotionRoot,
52
+ logLevel,
53
+ providerSpecifics,
54
+ });
50
55
  }
51
56
  if (args[0] === still_1.STILL_COMMAND) {
52
57
  return (0, still_1.stillCommand)({
53
58
  args: args.slice(1),
54
59
  remotionRoot,
55
60
  logLevel,
56
- implementation,
61
+ providerSpecifics: providerSpecifics,
57
62
  });
58
63
  }
59
64
  if (args[0] === compositions_1.COMPOSITIONS_COMMAND) {
60
- return (0, compositions_1.compositionsCommand)(args.slice(1), logLevel);
65
+ return (0, compositions_1.compositionsCommand)({
66
+ args: args.slice(1),
67
+ logLevel,
68
+ providerSpecifics,
69
+ });
61
70
  }
62
71
  if (args[0] === functions_1.FUNCTIONS_COMMAND) {
63
- return (0, functions_1.functionsCommand)(args.slice(1), logLevel);
72
+ return (0, functions_1.functionsCommand)({
73
+ args: args.slice(1),
74
+ logLevel,
75
+ fullClientSpecifics,
76
+ providerSpecifics,
77
+ });
64
78
  }
65
79
  if (args[0] === quotas_1.QUOTAS_COMMAND) {
66
80
  return (0, quotas_1.quotasCommand)(args.slice(1), logLevel);
@@ -72,7 +86,7 @@ const matchCommand = (args, remotionRoot, logLevel, implementation) => {
72
86
  return (0, regions_1.regionsCommand)(logLevel);
73
87
  }
74
88
  if (args[0] === sites_1.SITES_COMMAND) {
75
- return (0, sites_1.sitesCommand)(args.slice(1), remotionRoot, logLevel, implementation);
89
+ return (0, sites_1.sitesCommand)(args.slice(1), remotionRoot, logLevel, providerSpecifics);
76
90
  }
77
91
  if (args[0] === 'upload') {
78
92
  log_1.Log.info({ indent: false, logLevel }, 'The command has been renamed.');
@@ -102,11 +116,17 @@ const matchCommand = (args, remotionRoot, logLevel, implementation) => {
102
116
  (0, help_1.printHelp)(logLevel);
103
117
  (0, quit_1.quit)(1);
104
118
  };
105
- const executeCommand = async (args, remotionRoot, logLevel, implementation) => {
119
+ const executeCommand = async (args, remotionRoot, logLevel, providerSpecifics, fullClientSpecifics) => {
106
120
  var _a, _b, _c, _d, _e;
107
121
  try {
108
122
  (0, is_cli_1.setIsCli)(true);
109
- await matchCommand(args, remotionRoot, logLevel, implementation !== null && implementation !== void 0 ? implementation : aws_implementation_1.awsImplementation);
123
+ await matchCommand({
124
+ args,
125
+ remotionRoot,
126
+ logLevel,
127
+ providerSpecifics: providerSpecifics !== null && providerSpecifics !== void 0 ? providerSpecifics : aws_implementation_1.awsImplementation,
128
+ fullClientSpecifics: fullClientSpecifics !== null && fullClientSpecifics !== void 0 ? fullClientSpecifics : full_client_implementation_1.awsFullClientSpecifics,
129
+ });
110
130
  }
111
131
  catch (err) {
112
132
  const error = err;
@@ -117,7 +137,7 @@ const executeCommand = async (args, remotionRoot, logLevel, implementation) => {
117
137
  - Remove the "--custom-role-arn" parameter and set up Remotion Lambda according to the setup guide
118
138
  - 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}"
119
139
 
120
- Revisit ${docs_url_1.DOCS_URL}/docs/lambda/setup and make sure you set up the role and role policy correctly. Also see the troubleshooting page: ${docs_url_1.DOCS_URL}/docs/lambda/troubleshooting/permissions. The original error message is:
140
+ Revisit ${client_1.DOCS_URL}/docs/lambda/setup and make sure you set up the role and role policy correctly. Also see the troubleshooting page: ${client_1.DOCS_URL}/docs/lambda/troubleshooting/permissions. The original error message is:
121
141
  `.trim());
122
142
  }
123
143
  log_1.Log.error({ indent: false, logLevel }, `
@@ -125,17 +145,17 @@ The role "${suggested_policy_1.ROLE_NAME}" does not exist in your AWS account or
125
145
  - The name of the role is not "${suggested_policy_1.ROLE_NAME}"
126
146
  - The policy is not exactly as specified in the setup guide
127
147
 
128
- Revisit ${docs_url_1.DOCS_URL}/docs/lambda/setup and make sure you set up the role and role policy correctly. Also see the troubleshooting page: ${docs_url_1.DOCS_URL}/docs/lambda/troubleshooting/permissions. The original error message is:
148
+ Revisit ${client_1.DOCS_URL}/docs/lambda/setup and make sure you set up the role and role policy correctly. Also see the troubleshooting page: ${client_1.DOCS_URL}/docs/lambda/troubleshooting/permissions. The original error message is:
129
149
  `.trim());
130
150
  }
131
151
  if ((_a = error.stack) === null || _a === void 0 ? void 0 : _a.includes('AccessDenied')) {
132
152
  log_1.Log.error({ indent: false, logLevel }, `
133
- AWS returned an "AccessDenied" error message meaning a permission is missing. Read the permissions troubleshooting page: ${docs_url_1.DOCS_URL}/docs/lambda/troubleshooting/permissions. The original error message is:
153
+ AWS returned an "AccessDenied" error message meaning a permission is missing. Read the permissions troubleshooting page: ${client_1.DOCS_URL}/docs/lambda/troubleshooting/permissions. The original error message is:
134
154
  `.trim());
135
155
  }
136
156
  if ((_b = error.stack) === null || _b === void 0 ? void 0 : _b.includes('TooManyRequestsException')) {
137
157
  log_1.Log.error({ indent: false, logLevel }, `
138
- 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: ${docs_url_1.DOCS_URL}/docs/lambda/troubleshooting/rate-limit. The original error message is:
158
+ 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: ${client_1.DOCS_URL}/docs/lambda/troubleshooting/rate-limit. The original error message is:
139
159
  `.trim());
140
160
  }
141
161
  if ((_c = error.stack) === null || _c === void 0 ? void 0 : _c.includes('The security token included in the request is invalid')) {
@@ -176,6 +196,6 @@ exports.executeCommand = executeCommand;
176
196
  const cli = async (logLevel) => {
177
197
  const remotionRoot = renderer_1.RenderInternals.findRemotionRoot();
178
198
  await cli_1.CliInternals.initializeCli(remotionRoot);
179
- await (0, exports.executeCommand)(args_1.parsedLambdaCli._, remotionRoot, logLevel, aws_implementation_1.awsImplementation);
199
+ await (0, exports.executeCommand)(args_1.parsedLambdaCli._, remotionRoot, logLevel, aws_implementation_1.awsImplementation, full_client_implementation_1.awsFullClientSpecifics);
180
200
  };
181
201
  exports.cli = cli;