@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.
Files changed (221) hide show
  1. package/build.ts +1 -1
  2. package/dist/admin/make-layer-public.js +3 -3
  3. package/dist/api/create-function.d.ts +1 -2
  4. package/dist/api/create-function.js +8 -8
  5. package/dist/api/delete-site.d.ts +2 -2
  6. package/dist/api/delete-site.js +3 -4
  7. package/dist/api/deploy-function.d.ts +2 -2
  8. package/dist/api/deploy-function.js +9 -13
  9. package/dist/api/deploy-site.d.ts +2 -2
  10. package/dist/api/deploy-site.js +19 -13
  11. package/dist/api/download-media.d.ts +3 -3
  12. package/dist/api/download-media.js +11 -5
  13. package/dist/api/get-function-info.d.ts +1 -1
  14. package/dist/api/get-function-info.js +6 -8
  15. package/dist/api/get-or-create-bucket.d.ts +3 -3
  16. package/dist/api/get-or-create-bucket.js +4 -4
  17. package/dist/api/get-regions.d.ts +1 -1
  18. package/dist/api/get-regions.js +1 -1
  19. package/dist/api/iam-validation/role-permissions.js +6 -7
  20. package/dist/api/iam-validation/simulate-rule.d.ts +1 -1
  21. package/dist/api/iam-validation/simulate-rule.js +2 -2
  22. package/dist/api/iam-validation/simulate.d.ts +1 -1
  23. package/dist/api/iam-validation/simulate.js +2 -2
  24. package/dist/api/iam-validation/user-permissions.js +4 -5
  25. package/dist/api/upload-dir.d.ts +2 -3
  26. package/dist/api/upload-dir.js +7 -4
  27. package/dist/cli/args.d.ts +2 -4
  28. package/dist/cli/commands/compositions/index.d.ts +1 -1
  29. package/dist/cli/commands/compositions/index.js +5 -6
  30. package/dist/cli/commands/functions/deploy.d.ts +1 -1
  31. package/dist/cli/commands/functions/deploy.js +8 -9
  32. package/dist/cli/commands/functions/index.d.ts +1 -1
  33. package/dist/cli/commands/functions/index.js +6 -6
  34. package/dist/cli/commands/functions/ls.d.ts +1 -1
  35. package/dist/cli/commands/functions/rm.js +4 -4
  36. package/dist/cli/commands/functions/rmall.d.ts +1 -1
  37. package/dist/cli/commands/functions/rmall.js +2 -2
  38. package/dist/cli/commands/policies/policies.js +5 -5
  39. package/dist/cli/commands/quotas/increase.js +5 -5
  40. package/dist/cli/commands/quotas/list.js +4 -4
  41. package/dist/cli/commands/render/progress.js +4 -4
  42. package/dist/cli/commands/render/render.d.ts +1 -1
  43. package/dist/cli/commands/render/render.js +13 -16
  44. package/dist/cli/commands/sites/create.d.ts +1 -1
  45. package/dist/cli/commands/sites/create.js +4 -4
  46. package/dist/cli/commands/sites/index.d.ts +1 -1
  47. package/dist/cli/commands/sites/index.js +6 -6
  48. package/dist/cli/commands/sites/ls.js +2 -2
  49. package/dist/cli/commands/sites/rm.d.ts +1 -1
  50. package/dist/cli/commands/sites/rm.js +4 -4
  51. package/dist/cli/commands/sites/rmall.d.ts +1 -1
  52. package/dist/cli/commands/sites/rmall.js +4 -4
  53. package/dist/cli/commands/still.d.ts +1 -1
  54. package/dist/cli/commands/still.js +10 -12
  55. package/dist/cli/get-aws-region.d.ts +1 -1
  56. package/dist/cli/get-aws-region.js +6 -7
  57. package/dist/cli/help.js +10 -10
  58. package/dist/cli/helpers/find-function-name.d.ts +1 -1
  59. package/dist/cli/helpers/find-function-name.js +5 -5
  60. package/dist/cli/index.d.ts +2 -2
  61. package/dist/cli/index.js +15 -17
  62. package/dist/cli/log.d.ts +5 -5
  63. package/dist/client.d.ts +1 -19
  64. package/dist/client.js +15 -30
  65. package/dist/defaults.d.ts +1 -1
  66. package/dist/defaults.js +1 -1
  67. package/dist/functions/aws-server-implementation.d.ts +2 -1
  68. package/dist/functions/aws-server-implementation.js +11 -2
  69. package/dist/functions/full-client-implementation.d.ts +1 -1
  70. package/dist/functions/full-client-implementation.js +0 -2
  71. package/dist/functions/helpers/get-current-region.d.ts +1 -1
  72. package/dist/functions/helpers/get-folder-files.d.ts +1 -1
  73. package/dist/functions/helpers/make-aws-artifact.d.ts +1 -1
  74. package/dist/functions/helpers/read-with-progress.d.ts +2 -3
  75. package/dist/functions/helpers/read-with-progress.js +6 -2
  76. package/dist/functions/index.d.ts +2 -3
  77. package/dist/functions/index.js +2 -4
  78. package/dist/index.d.ts +13 -32
  79. package/dist/index.js +24 -35
  80. package/dist/internals.d.ts +8 -12
  81. package/dist/internals.js +0 -4
  82. package/dist/shared/get-layers.d.ts +1 -4
  83. package/dist/shared/get-layers.js +3 -3
  84. package/dist/shared/get-s3-operations.d.ts +1 -1
  85. package/dist/shared/hosted-layers.d.ts +1 -1
  86. package/dist/shared/lambda-insights-extensions.d.ts +1 -1
  87. package/dist/shared/validate-timeout.js +3 -3
  88. package/package.json +20 -28
  89. package/remotionlambda-arm64.zip +0 -0
  90. package/dist/api/app-router-webhook.d.ts +0 -10
  91. package/dist/api/app-router-webhook.js +0 -43
  92. package/dist/api/bucket-exists.d.ts +0 -3
  93. package/dist/api/bucket-exists.js +0 -26
  94. package/dist/api/clean-items.d.ts +0 -16
  95. package/dist/api/clean-items.js +0 -25
  96. package/dist/api/create-bucket.d.ts +0 -3
  97. package/dist/api/create-bucket.js +0 -45
  98. package/dist/api/delete-function.d.ts +0 -4
  99. package/dist/api/delete-function.js +0 -15
  100. package/dist/api/delete-render.d.ts +0 -20
  101. package/dist/api/delete-render.js +0 -78
  102. package/dist/api/estimate-price.d.ts +0 -17
  103. package/dist/api/estimate-price.js +0 -45
  104. package/dist/api/express-webhook.d.ts +0 -3
  105. package/dist/api/express-webhook.js +0 -46
  106. package/dist/api/get-aws-client.d.ts +0 -30
  107. package/dist/api/get-aws-client.js +0 -56
  108. package/dist/api/get-buckets.d.ts +0 -9
  109. package/dist/api/get-buckets.js +0 -62
  110. package/dist/api/get-compositions-on-lambda.d.ts +0 -20
  111. package/dist/api/get-compositions-on-lambda.js +0 -60
  112. package/dist/api/get-functions.d.ts +0 -9
  113. package/dist/api/get-functions.js +0 -77
  114. package/dist/api/get-render-progress.d.ts +0 -16
  115. package/dist/api/get-render-progress.js +0 -45
  116. package/dist/api/get-sites.d.ts +0 -29
  117. package/dist/api/get-sites.js +0 -79
  118. package/dist/api/make-lambda-payload.d.ts +0 -57
  119. package/dist/api/make-lambda-payload.js +0 -150
  120. package/dist/api/pages-router-webhook.d.ts +0 -5
  121. package/dist/api/pages-router-webhook.js +0 -48
  122. package/dist/api/presign-url.d.ts +0 -14
  123. package/dist/api/presign-url.js +0 -59
  124. package/dist/api/render-media-on-lambda.d.ts +0 -63
  125. package/dist/api/render-media-on-lambda.js +0 -128
  126. package/dist/api/render-still-on-lambda.d.ts +0 -56
  127. package/dist/api/render-still-on-lambda.js +0 -118
  128. package/dist/api/speculate-function-name.d.ts +0 -6
  129. package/dist/api/speculate-function-name.js +0 -20
  130. package/dist/api/validate-webhook-signature.d.ts +0 -5
  131. package/dist/api/validate-webhook-signature.js +0 -28
  132. package/dist/cli/is-cli.d.ts +0 -2
  133. package/dist/cli/is-cli.js +0 -10
  134. package/dist/functions/aws-implementation.d.ts +0 -23
  135. package/dist/functions/aws-implementation.js +0 -97
  136. package/dist/functions/helpers/apply-lifecyle.d.ts +0 -8
  137. package/dist/functions/helpers/apply-lifecyle.js +0 -18
  138. package/dist/functions/helpers/get-output-url-from-metadata.d.ts +0 -3
  139. package/dist/functions/helpers/get-output-url-from-metadata.js +0 -12
  140. package/dist/functions/helpers/lifecycle.d.ts +0 -8
  141. package/dist/functions/helpers/lifecycle.js +0 -24
  142. package/dist/functions/helpers/parse-function-name.d.ts +0 -8
  143. package/dist/functions/helpers/parse-function-name.js +0 -17
  144. package/dist/functions/http-client.d.ts +0 -2
  145. package/dist/functions/http-client.js +0 -18
  146. package/dist/io/delete-file.d.ts +0 -3
  147. package/dist/io/delete-file.js +0 -12
  148. package/dist/io/head-file.d.ts +0 -3
  149. package/dist/io/head-file.js +0 -17
  150. package/dist/io/list-objects.d.ts +0 -3
  151. package/dist/io/list-objects.js +0 -67
  152. package/dist/io/read-file.d.ts +0 -9
  153. package/dist/io/read-file.js +0 -18
  154. package/dist/io/write-file.d.ts +0 -5
  155. package/dist/io/write-file.js +0 -55
  156. package/dist/pricing/price-per-1-s.d.ts +0 -37
  157. package/dist/pricing/price-per-1-s.js +0 -822
  158. package/dist/regions.d.ts +0 -3
  159. package/dist/regions.js +0 -48
  160. package/dist/shared/aws-clients.d.ts +0 -11
  161. package/dist/shared/aws-clients.js +0 -51
  162. package/dist/shared/call-lambda-async.d.ts +0 -3
  163. package/dist/shared/call-lambda-async.js +0 -20
  164. package/dist/shared/call-lambda-streaming.d.ts +0 -7
  165. package/dist/shared/call-lambda-streaming.js +0 -126
  166. package/dist/shared/call-lambda-sync.d.ts +0 -3
  167. package/dist/shared/call-lambda-sync.js +0 -30
  168. package/dist/shared/check-credentials.d.ts +0 -1
  169. package/dist/shared/check-credentials.js +0 -39
  170. package/dist/shared/constants.d.ts +0 -26
  171. package/dist/shared/constants.js +0 -29
  172. package/dist/shared/content-disposition-header.d.ts +0 -2
  173. package/dist/shared/content-disposition-header.js +0 -50
  174. package/dist/shared/convert-to-serve-url.d.ts +0 -6
  175. package/dist/shared/convert-to-serve-url.js +0 -14
  176. package/dist/shared/encode-aws-url-params.d.ts +0 -1
  177. package/dist/shared/encode-aws-url-params.js +0 -7
  178. package/dist/shared/get-account-id.d.ts +0 -3
  179. package/dist/shared/get-account-id.js +0 -15
  180. package/dist/shared/get-aws-urls.d.ts +0 -26
  181. package/dist/shared/get-aws-urls.js +0 -31
  182. package/dist/shared/get-credentials.d.ts +0 -9
  183. package/dist/shared/get-credentials.js +0 -55
  184. package/dist/shared/get-env-variable.d.ts +0 -1
  185. package/dist/shared/get-env-variable.js +0 -15
  186. package/dist/shared/get-function-version.d.ts +0 -7
  187. package/dist/shared/get-function-version.js +0 -32
  188. package/dist/shared/get-s3-client.d.ts +0 -9
  189. package/dist/shared/get-s3-client.js +0 -14
  190. package/dist/shared/get-service-client.d.ts +0 -23
  191. package/dist/shared/get-service-client.js +0 -121
  192. package/dist/shared/is-flaky-error.d.ts +0 -1
  193. package/dist/shared/is-flaky-error.js +0 -77
  194. package/dist/shared/is-in-lambda.d.ts +0 -1
  195. package/dist/shared/is-in-lambda.js +0 -9
  196. package/dist/shared/is-likely-to-have-aws-profile.d.ts +0 -1
  197. package/dist/shared/is-likely-to-have-aws-profile.js +0 -50
  198. package/dist/shared/lambda-version-string.d.ts +0 -1
  199. package/dist/shared/lambda-version-string.js +0 -7
  200. package/dist/shared/lifecycle-rules.d.ts +0 -10
  201. package/dist/shared/lifecycle-rules.js +0 -61
  202. package/dist/shared/make-s3-url.d.ts +0 -6
  203. package/dist/shared/make-s3-url.js +0 -7
  204. package/dist/shared/p-limit.d.ts +0 -1
  205. package/dist/shared/p-limit.js +0 -57
  206. package/dist/shared/random-hash.d.ts +0 -1
  207. package/dist/shared/random-hash.js +0 -13
  208. package/dist/shared/validate-aws-region.d.ts +0 -2
  209. package/dist/shared/validate-aws-region.js +0 -9
  210. package/dist/shared/validate-bucketname.d.ts +0 -4
  211. package/dist/shared/validate-bucketname.js +0 -15
  212. package/dist/shared/validate-disk-size-in-mb.d.ts +0 -1
  213. package/dist/shared/validate-disk-size-in-mb.js +0 -23
  214. package/dist/shared/validate-lambda-codec.d.ts +0 -2
  215. package/dist/shared/validate-lambda-codec.js +0 -21
  216. package/dist/shared/validate-memory-size.d.ts +0 -1
  217. package/dist/shared/validate-memory-size.js +0 -22
  218. package/dist/shared/validate-presign-expiration.d.ts +0 -1
  219. package/dist/shared/validate-presign-expiration.js +0 -29
  220. package/dist/shared/validate-serveurl.d.ts +0 -1
  221. package/dist/shared/validate-serveurl.js +0 -9
@@ -5,12 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.uploadDir = void 0;
7
7
  const lib_storage_1 = require("@aws-sdk/lib-storage");
8
+ const lambda_client_1 = require("@remotion/lambda-client");
8
9
  const mime_types_1 = __importDefault(require("mime-types"));
9
10
  const node_fs_1 = require("node:fs");
10
11
  const node_path_1 = __importDefault(require("node:path"));
11
- const get_s3_client_1 = require("../shared/get-s3-client");
12
12
  const make_s3_key_1 = require("../shared/make-s3-key");
13
- const p_limit_1 = require("../shared/p-limit");
14
13
  async function getFiles(directory, originalDirectory, toUpload) {
15
14
  const dirents = await node_fs_1.promises.readdir(directory, { withFileTypes: true });
16
15
  const _files = await Promise.all(dirents
@@ -41,14 +40,18 @@ async function getFiles(directory, originalDirectory, toUpload) {
41
40
  }));
42
41
  return _files.flat(1);
43
42
  }
44
- const limit = (0, p_limit_1.pLimit)(15);
43
+ const limit = lambda_client_1.LambdaClientInternals.pLimit(15);
45
44
  const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, forcePathStyle, }) => {
46
45
  const files = await getFiles(localDir, localDir, toUpload);
47
46
  const progresses = {};
48
47
  for (const file of files) {
49
48
  progresses[file.name] = 0;
50
49
  }
51
- const client = (0, get_s3_client_1.getS3Client)({ region, customCredentials: null, forcePathStyle });
50
+ const client = lambda_client_1.LambdaClientInternals.getS3Client({
51
+ region,
52
+ customCredentials: null,
53
+ forcePathStyle,
54
+ });
52
55
  const uploadWithoutRetry = async (filePath) => {
53
56
  const Key = (0, make_s3_key_1.makeS3Key)(keyPrefix, localDir, filePath.name);
54
57
  const Body = (0, node_fs_1.createReadStream)(filePath.name);
@@ -1,8 +1,6 @@
1
1
  import type { BrowserSafeApis } from '@remotion/renderer/client';
2
- import type { DeleteAfter } from '../client';
3
- import type { Privacy } from '@remotion/serverless/client';
4
- import { AwsRegion } from '../regions';
5
- import type { RuntimePreference } from '../shared/get-layers';
2
+ import type { AwsRegion, DeleteAfter, RuntimePreference } from '../client';
3
+ import type { Privacy } from '@remotion/serverless';
6
4
  type LambdaCommandLineOptions = {
7
5
  help: boolean;
8
6
  region: AwsRegion;
@@ -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 COMPOSITIONS_COMMAND = "compositions";
5
5
  export declare const compositionsCommand: ({ args, logLevel, providerSpecifics, }: {
6
6
  args: string[];
@@ -2,10 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.compositionsCommand = exports.COMPOSITIONS_COMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
+ const lambda_client_1 = require("@remotion/lambda-client");
5
6
  const client_1 = require("@remotion/renderer/client");
6
- const __1 = require("../../..");
7
- const constants_1 = require("../../../shared/constants");
8
- const validate_serveurl_1 = require("../../../shared/validate-serveurl");
7
+ const defaults_1 = require("../../../defaults");
9
8
  const args_1 = require("../../args");
10
9
  const get_aws_region_1 = require("../../get-aws-region");
11
10
  const find_function_name_1 = require("../../helpers/find-function-name");
@@ -19,7 +18,7 @@ const compositionsCommand = async ({ args, logLevel, providerSpecifics, }) => {
19
18
  log_1.Log.error({ indent: false, logLevel }, 'No serve URL passed.');
20
19
  log_1.Log.info({ indent: false, logLevel }, 'Pass an additional argument specifying a URL where your Remotion project is hosted.');
21
20
  log_1.Log.info({ indent: false, logLevel });
22
- log_1.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.COMPOSITIONS_COMMAND} <serve-url>`);
21
+ log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.COMPOSITIONS_COMMAND} <serve-url>`);
23
22
  (0, quit_1.quit)(1);
24
23
  }
25
24
  const { envVariables, inputProps, ignoreCertificateErrors, userAgent, disableWebSecurity, } = cli_1.CliInternals.getCliOptions({
@@ -46,9 +45,9 @@ const compositionsCommand = async ({ args, logLevel, providerSpecifics, }) => {
46
45
  userAgent,
47
46
  };
48
47
  const region = (0, get_aws_region_1.getAwsRegion)();
49
- (0, validate_serveurl_1.validateServeUrl)(serveUrl);
48
+ lambda_client_1.LambdaClientInternals.validateServeUrl(serveUrl);
50
49
  const functionName = await (0, find_function_name_1.findFunctionName)({ logLevel, providerSpecifics });
51
- const comps = await (0, __1.getCompositionsOnLambda)({
50
+ const comps = await (0, lambda_client_1.getCompositionsOnLambda)({
52
51
  functionName,
53
52
  serveUrl,
54
53
  inputProps,
@@ -1,6 +1,6 @@
1
+ import { AwsProvider } from '@remotion/lambda-client';
1
2
  import type { LogLevel } from '@remotion/renderer';
2
3
  import { FullClientSpecifics, ProviderSpecifics } from '@remotion/serverless';
3
- import { AwsProvider } from '../../../functions/aws-implementation';
4
4
  export declare const FUNCTIONS_DEPLOY_SUBCOMMAND = "deploy";
5
5
  export declare const functionsDeploySubcommand: ({ logLevel, providerSpecifics, fullClientSpecifics, }: {
6
6
  logLevel: LogLevel;
@@ -2,12 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.functionsDeploySubcommand = exports.FUNCTIONS_DEPLOY_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
+ const lambda_client_1 = require("@remotion/lambda-client");
5
6
  const version_1 = require("remotion/version");
6
7
  const deploy_function_1 = require("../../../api/deploy-function");
7
- const constants_1 = require("../../../shared/constants");
8
+ const defaults_1 = require("../../../defaults");
8
9
  const validate_custom_role_arn_1 = require("../../../shared/validate-custom-role-arn");
9
- const validate_disk_size_in_mb_1 = require("../../../shared/validate-disk-size-in-mb");
10
- const validate_memory_size_1 = require("../../../shared/validate-memory-size");
11
10
  const validate_timeout_1 = require("../../../shared/validate-timeout");
12
11
  const validate_vpc_security_group_ids_1 = require("../../../shared/validate-vpc-security-group-ids");
13
12
  const validate_vpc_subnet_ids_1 = require("../../../shared/validate-vpc-subnet-ids");
@@ -18,13 +17,13 @@ exports.FUNCTIONS_DEPLOY_SUBCOMMAND = 'deploy';
18
17
  const functionsDeploySubcommand = async ({ logLevel, providerSpecifics, fullClientSpecifics, }) => {
19
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
20
19
  const region = (0, get_aws_region_1.getAwsRegion)();
21
- const timeoutInSeconds = (_a = args_1.parsedLambdaCli.timeout) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_TIMEOUT;
22
- const memorySizeInMb = (_b = args_1.parsedLambdaCli.memory) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MEMORY_SIZE;
23
- const diskSizeInMb = (_c = args_1.parsedLambdaCli.disk) !== null && _c !== void 0 ? _c : constants_1.DEFAULT_EPHEMERAL_STORAGE_IN_MB;
20
+ const timeoutInSeconds = (_a = args_1.parsedLambdaCli.timeout) !== null && _a !== void 0 ? _a : defaults_1.DEFAULT_TIMEOUT;
21
+ const memorySizeInMb = (_b = args_1.parsedLambdaCli.memory) !== null && _b !== void 0 ? _b : defaults_1.DEFAULT_MEMORY_SIZE;
22
+ const diskSizeInMb = (_c = args_1.parsedLambdaCli.disk) !== null && _c !== void 0 ? _c : defaults_1.DEFAULT_EPHEMERAL_STORAGE_IN_MB;
24
23
  const customRoleArn = (_d = args_1.parsedLambdaCli['custom-role-arn']) !== null && _d !== void 0 ? _d : undefined;
25
24
  const createCloudWatchLogGroup = !args_1.parsedLambdaCli['disable-cloudwatch'];
26
25
  const enableLambdaInsights = (_e = args_1.parsedLambdaCli['enable-lambda-insights']) !== null && _e !== void 0 ? _e : false;
27
- const cloudWatchLogRetentionPeriodInDays = (_f = args_1.parsedLambdaCli['retention-period']) !== null && _f !== void 0 ? _f : constants_1.DEFAULT_CLOUDWATCH_RETENTION_PERIOD;
26
+ const cloudWatchLogRetentionPeriodInDays = (_f = args_1.parsedLambdaCli['retention-period']) !== null && _f !== void 0 ? _f : defaults_1.DEFAULT_CLOUDWATCH_RETENTION_PERIOD;
28
27
  const enableV5Runtime = (_g = args_1.parsedLambdaCli['enable-v5-runtime']) !== null && _g !== void 0 ? _g : undefined;
29
28
  if (enableV5Runtime) {
30
29
  log_1.Log.warn({ logLevel, indent: false }, `The --enable-v5-runtime flag is now enabled by default and has no function anymore.`);
@@ -32,9 +31,9 @@ const functionsDeploySubcommand = async ({ logLevel, providerSpecifics, fullClie
32
31
  const vpcSubnetIds = (_h = args_1.parsedLambdaCli['vpc-subnet-ids']) !== null && _h !== void 0 ? _h : undefined;
33
32
  const vpcSecurityGroupIds = (_j = args_1.parsedLambdaCli['vpc-security-group-ids']) !== null && _j !== void 0 ? _j : undefined;
34
33
  const runtimePreference = (_k = args_1.parsedLambdaCli['runtime-preference']) !== null && _k !== void 0 ? _k : 'default';
35
- (0, validate_memory_size_1.validateMemorySize)(memorySizeInMb);
34
+ lambda_client_1.LambdaClientInternals.validateMemorySize(memorySizeInMb);
36
35
  (0, validate_timeout_1.validateTimeout)(timeoutInSeconds);
37
- (0, validate_disk_size_in_mb_1.validateDiskSizeInMb)(diskSizeInMb);
36
+ lambda_client_1.LambdaClientInternals.validateDiskSizeInMb(diskSizeInMb);
38
37
  (0, validate_custom_role_arn_1.validateCustomRoleArn)(customRoleArn);
39
38
  (0, validate_vpc_subnet_ids_1.validateVpcSubnetIds)(vpcSubnetIds);
40
39
  (0, validate_vpc_security_group_ids_1.validateVpcSecurityGroupIds)(vpcSecurityGroupIds);
@@ -1,6 +1,6 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
2
  import { FullClientSpecifics, ProviderSpecifics } from '@remotion/serverless';
3
- import { AwsProvider } from '../../../functions/aws-implementation';
3
+ import { AwsProvider } from '../../../client';
4
4
  export declare const FUNCTIONS_COMMAND = "functions";
5
5
  export declare const functionsCommand: ({ args, logLevel, fullClientSpecifics, providerSpecifics, }: {
6
6
  args: string[];
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.functionsCommand = exports.FUNCTIONS_COMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
- const constants_1 = require("../../../shared/constants");
5
+ const defaults_1 = require("../../../defaults");
6
6
  const quit_1 = require("../../helpers/quit");
7
7
  const deploy_1 = require("./deploy");
8
8
  const ls_1 = require("./ls");
@@ -10,20 +10,20 @@ const rm_1 = require("./rm");
10
10
  const rmall_1 = require("./rmall");
11
11
  exports.FUNCTIONS_COMMAND = 'functions';
12
12
  const printFunctionsHelp = (logLevel) => {
13
- cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.FUNCTIONS_COMMAND} <subcommand>`);
13
+ cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.FUNCTIONS_COMMAND} <subcommand>`);
14
14
  cli_1.CliInternals.Log.info({ indent: false, logLevel });
15
15
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, 'Available subcommands:');
16
16
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, '');
17
- cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.FUNCTIONS_COMMAND} ${ls_1.FUNCTIONS_LS_SUBCOMMAND}`);
17
+ cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.FUNCTIONS_COMMAND} ${ls_1.FUNCTIONS_LS_SUBCOMMAND}`);
18
18
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Lists the functions currently deployed'));
19
19
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, '');
20
- cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.FUNCTIONS_COMMAND} ${deploy_1.FUNCTIONS_DEPLOY_SUBCOMMAND}`);
20
+ cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.FUNCTIONS_COMMAND} ${deploy_1.FUNCTIONS_DEPLOY_SUBCOMMAND}`);
21
21
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Deploy a new Lambda function'));
22
22
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, '');
23
- cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.FUNCTIONS_COMMAND} ${rm_1.FUNCTIONS_RM_SUBCOMMAND} <function-name>`);
23
+ cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.FUNCTIONS_COMMAND} ${rm_1.FUNCTIONS_RM_SUBCOMMAND} <function-name>`);
24
24
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Delete a Lambda function'));
25
25
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, '');
26
- cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.FUNCTIONS_COMMAND} ${rmall_1.FUNCTIONS_RMALL_SUBCOMMAND}`);
26
+ cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${defaults_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
29
  const functionsCommand = ({ args, logLevel, fullClientSpecifics, providerSpecifics, }) => {
@@ -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 FUNCTIONS_LS_SUBCOMMAND = "ls";
5
5
  export declare const functionsLsCommand: ({ logLevel, providerSpecifics, }: {
6
6
  logLevel: LogLevel;
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.functionsRmCommand = exports.FUNCTIONS_RM_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
- const delete_function_1 = require("../../../api/delete-function");
5
+ const lambda_client_1 = require("@remotion/lambda-client");
6
6
  const get_function_info_1 = require("../../../api/get-function-info");
7
- const constants_1 = require("../../../shared/constants");
7
+ const defaults_1 = require("../../../defaults");
8
8
  const get_aws_region_1 = require("../../get-aws-region");
9
9
  const confirm_1 = require("../../helpers/confirm");
10
10
  const quit_1 = require("../../helpers/quit");
@@ -17,7 +17,7 @@ const functionsRmCommand = async (args, logLevel) => {
17
17
  if (args.length === 0) {
18
18
  log_1.Log.error({ indent: false, logLevel }, 'No function name passed.');
19
19
  log_1.Log.error({ indent: false, logLevel }, 'Pass another argument which is the name of the function you would like to remove.');
20
- log_1.Log.info({ indent: false, logLevel }, `You can run \`${constants_1.BINARY_NAME} ${index_1.FUNCTIONS_COMMAND} ${ls_1.FUNCTIONS_LS_SUBCOMMAND}\` to see a list of deployed Lambda functions.`);
20
+ log_1.Log.info({ indent: false, logLevel }, `You can run \`${defaults_1.BINARY_NAME} ${index_1.FUNCTIONS_COMMAND} ${ls_1.FUNCTIONS_LS_SUBCOMMAND}\` to see a list of deployed Lambda functions.`);
21
21
  (0, quit_1.quit)(1);
22
22
  }
23
23
  if (args[0] === '()') {
@@ -56,7 +56,7 @@ const functionsRmCommand = async (args, logLevel) => {
56
56
  indent: false,
57
57
  });
58
58
  output.update('Deleting...', false);
59
- await (0, delete_function_1.deleteFunction)({ region, functionName });
59
+ await (0, lambda_client_1.deleteFunction)({ region, functionName });
60
60
  output.update('Deleted!', true);
61
61
  }
62
62
  };
@@ -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 FUNCTIONS_RMALL_SUBCOMMAND = "rmall";
5
5
  export declare const functionsRmallCommand: ({ logLevel, providerSpecifics, }: {
6
6
  logLevel: LogLevel;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.functionsRmallCommand = exports.FUNCTIONS_RMALL_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
- const delete_function_1 = require("../../../api/delete-function");
5
+ const lambda_client_1 = require("@remotion/lambda-client");
6
6
  const get_function_info_1 = require("../../../api/get-function-info");
7
7
  const get_aws_region_1 = require("../../get-aws-region");
8
8
  const confirm_1 = require("../../helpers/confirm");
@@ -45,7 +45,7 @@ const functionsRmallCommand = async ({ logLevel, providerSpecifics, }) => {
45
45
  indent: false,
46
46
  });
47
47
  output.update('Deleting...', false);
48
- await (0, delete_function_1.deleteFunction)({ region, functionName: fun.functionName });
48
+ await (0, lambda_client_1.deleteFunction)({ region, functionName: fun.functionName });
49
49
  output.update('Deleted!', true);
50
50
  }
51
51
  };
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.policiesCommand = exports.POLICIES_COMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
- const constants_1 = require("../../../shared/constants");
5
+ const defaults_1 = require("../../../defaults");
6
6
  const quit_1 = require("../../helpers/quit");
7
7
  const log_1 = require("../../log");
8
8
  const role_1 = require("./role");
@@ -10,17 +10,17 @@ const user_1 = require("./user");
10
10
  const validate_1 = require("./validate");
11
11
  exports.POLICIES_COMMAND = 'policies';
12
12
  const printPoliciesHelp = (logLevel) => {
13
- log_1.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.POLICIES_COMMAND} <subcommand>`);
13
+ log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.POLICIES_COMMAND} <subcommand>`);
14
14
  log_1.Log.info({ indent: false, logLevel });
15
15
  log_1.Log.info({ indent: false, logLevel }, 'Available subcommands:');
16
16
  log_1.Log.info({ indent: false, logLevel }, '');
17
- log_1.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.POLICIES_COMMAND} ${user_1.USER_SUBCOMMAND}`);
17
+ log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.POLICIES_COMMAND} ${user_1.USER_SUBCOMMAND}`);
18
18
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Print the suggested policy to be applied to the user that is attached to the access token.'));
19
19
  log_1.Log.info({ indent: false, logLevel });
20
- log_1.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.POLICIES_COMMAND} ${role_1.ROLE_SUBCOMMAND}`);
20
+ log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.POLICIES_COMMAND} ${role_1.ROLE_SUBCOMMAND}`);
21
21
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Print the suggested policy to be applied to the role that is attached to the lambda function.'));
22
22
  log_1.Log.info({ indent: false, logLevel });
23
- log_1.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.POLICIES_COMMAND} ${validate_1.VALIDATE_SUBCOMMAND}`);
23
+ log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.POLICIES_COMMAND} ${validate_1.VALIDATE_SUBCOMMAND}`);
24
24
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Validate the current policies setup is correct by running tests using the AWS policy simulator.'));
25
25
  };
26
26
  const policiesCommand = (args, logLevel) => {
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.quotasIncreaseCommand = exports.INCREASE_SUBCOMMAND = void 0;
4
4
  const client_service_quotas_1 = require("@aws-sdk/client-service-quotas");
5
+ const lambda_client_1 = require("@remotion/lambda-client");
5
6
  const node_process_1 = require("node:process");
6
7
  const _1 = require(".");
7
8
  const defaults_1 = require("../../../defaults");
8
- const aws_clients_1 = require("../../../shared/aws-clients");
9
9
  const args_1 = require("../../args");
10
10
  const get_aws_region_1 = require("../../get-aws-region");
11
11
  const confirm_1 = require("../../helpers/confirm");
@@ -19,15 +19,15 @@ const quotasIncreaseCommand = async (logLevel) => {
19
19
  var _a, _b, _c;
20
20
  const region = (0, get_aws_region_1.getAwsRegion)();
21
21
  const [concurrencyLimit, defaultConcurrencyLimit, changes] = await Promise.all([
22
- (0, aws_clients_1.getServiceQuotasClient)(region).send(new client_service_quotas_1.GetServiceQuotaCommand({
22
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.GetServiceQuotaCommand({
23
23
  QuotaCode: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
24
24
  ServiceCode: 'lambda',
25
25
  })),
26
- (0, aws_clients_1.getServiceQuotasClient)(region).send(new client_service_quotas_1.GetAWSDefaultServiceQuotaCommand({
26
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.GetAWSDefaultServiceQuotaCommand({
27
27
  QuotaCode: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
28
28
  ServiceCode: 'lambda',
29
29
  })),
30
- (0, aws_clients_1.getServiceQuotasClient)(region).send(new client_service_quotas_1.ListRequestedServiceQuotaChangeHistoryByQuotaCommand({
30
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.ListRequestedServiceQuotaChangeHistoryByQuotaCommand({
31
31
  QuotaCode: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
32
32
  ServiceCode: 'lambda',
33
33
  })),
@@ -61,7 +61,7 @@ const quotasIncreaseCommand = async (logLevel) => {
61
61
  (0, quit_1.quit)(1);
62
62
  }
63
63
  try {
64
- await (0, aws_clients_1.getServiceQuotasClient)(region).send(new client_service_quotas_1.RequestServiceQuotaIncreaseCommand({
64
+ await lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.RequestServiceQuotaIncreaseCommand({
65
65
  QuotaCode: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
66
66
  DesiredValue: newLimit,
67
67
  ServiceCode: 'lambda',
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.quotasListCommand = void 0;
4
4
  const client_service_quotas_1 = require("@aws-sdk/client-service-quotas");
5
5
  const cli_1 = require("@remotion/cli");
6
+ const lambda_client_1 = require("@remotion/lambda-client");
6
7
  const _1 = require(".");
7
8
  const defaults_1 = require("../../../defaults");
8
- const aws_clients_1 = require("../../../shared/aws-clients");
9
9
  const get_aws_region_1 = require("../../get-aws-region");
10
10
  const log_1 = require("../../log");
11
11
  const increase_1 = require("./increase");
@@ -15,15 +15,15 @@ const quotasListCommand = async (logLevel) => {
15
15
  log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Region = ${region}`));
16
16
  log_1.Log.info({ indent: false, logLevel });
17
17
  const [concurrencyLimit, defaultConcurrencyLimit, changes] = await Promise.all([
18
- (0, aws_clients_1.getServiceQuotasClient)(region).send(new client_service_quotas_1.GetServiceQuotaCommand({
18
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.GetServiceQuotaCommand({
19
19
  QuotaCode: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
20
20
  ServiceCode: 'lambda',
21
21
  })),
22
- (0, aws_clients_1.getServiceQuotasClient)(region).send(new client_service_quotas_1.GetAWSDefaultServiceQuotaCommand({
22
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.GetAWSDefaultServiceQuotaCommand({
23
23
  QuotaCode: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
24
24
  ServiceCode: 'lambda',
25
25
  })),
26
- (0, aws_clients_1.getServiceQuotasClient)(region).send(new client_service_quotas_1.ListRequestedServiceQuotaChangeHistoryByQuotaCommand({
26
+ lambda_client_1.LambdaClientInternals.getServiceQuotasClient(region).send(new client_service_quotas_1.ListRequestedServiceQuotaChangeHistoryByQuotaCommand({
27
27
  QuotaCode: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
28
28
  ServiceCode: 'lambda',
29
29
  })),
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeProgressString = exports.makeArtifactProgress = 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
+ const serverless_1 = require("@remotion/serverless");
7
7
  const no_react_1 = require("remotion/no-react");
8
8
  const makeEvaluationProgress = (overall) => {
9
9
  const timeToLaunch = overall.compositionValidated
@@ -71,7 +71,7 @@ const makeRenderProgress = (progress) => {
71
71
  ? frames
72
72
  : cli_1.CliInternals.chalk.gray(`${progress.timeToRenderFrames}ms`),
73
73
  ]
74
- .filter(client_1.truthy)
74
+ .filter(serverless_1.truthy)
75
75
  .join(' ');
76
76
  const second = [
77
77
  `${progress.timeToEncode === null ? 'Encoding' : 'Encoded'} frames`.padEnd(cli_1.CliInternals.LABEL_WIDTH, ' '),
@@ -82,7 +82,7 @@ const makeRenderProgress = (progress) => {
82
82
  : `${framesEncoded}/${totalFrames}`
83
83
  : cli_1.CliInternals.chalk.gray(`${progress.timeToEncode}ms`),
84
84
  ]
85
- .filter(client_1.truthy)
85
+ .filter(serverless_1.truthy)
86
86
  .join(' ');
87
87
  return [first, second];
88
88
  };
@@ -163,7 +163,7 @@ const makeArtifactProgress = (artifactProgress) => {
163
163
  cli_1.CliInternals.chalk.gray(`${cli_1.CliInternals.formatBytes(artifact.sizeInBytes)}`),
164
164
  ].join(' ');
165
165
  })
166
- .filter(client_1.truthy)
166
+ .filter(serverless_1.truthy)
167
167
  .join('\n');
168
168
  };
169
169
  exports.makeArtifactProgress = makeArtifactProgress;
@@ -1,6 +1,6 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { AwsProvider } from '@remotion/lambda-client';
2
3
  import type { ProviderSpecifics } from '@remotion/serverless';
3
- import type { AwsProvider } from '../../../functions/aws-implementation';
4
4
  export declare const RENDER_COMMAND = "render";
5
5
  export declare const renderCommand: ({ args, remotionRoot, logLevel, providerSpecifics, }: {
6
6
  args: string[];
@@ -11,14 +11,11 @@ const client_1 = require("@remotion/renderer/client");
11
11
  const path_1 = __importDefault(require("path"));
12
12
  const no_react_1 = require("remotion/no-react");
13
13
  const download_media_1 = require("../../../api/download-media");
14
- const get_render_progress_1 = require("../../../api/get-render-progress");
15
- const render_media_on_lambda_1 = require("../../../api/render-media-on-lambda");
16
- const client_2 = require("@remotion/serverless/client");
17
- const parse_function_name_1 = require("../../../functions/helpers/parse-function-name");
18
- const constants_1 = require("../../../shared/constants");
14
+ const lambda_client_1 = require("@remotion/lambda-client");
15
+ const serverless_1 = require("@remotion/serverless");
16
+ const defaults_1 = require("../../../defaults");
19
17
  const sleep_1 = require("../../../shared/sleep");
20
18
  const validate_retries_1 = require("../../../shared/validate-retries");
21
- const validate_serveurl_1 = require("../../../shared/validate-serveurl");
22
19
  const args_1 = require("../../args");
23
20
  const get_aws_region_1 = require("../../get-aws-region");
24
21
  const find_function_name_1 = require("../../helpers/find-function-name");
@@ -35,7 +32,7 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
35
32
  log_1.Log.error({ indent: false, logLevel }, 'No serve URL passed.');
36
33
  log_1.Log.info({ indent: false, logLevel }, 'Pass an additional argument specifying a URL where your Remotion project is hosted.');
37
34
  log_1.Log.info({ indent: false, logLevel });
38
- log_1.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.RENDER_COMMAND} <serve-url> <composition-id> [output-location]`);
35
+ log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.RENDER_COMMAND} <serve-url> <composition-id> [output-location]`);
39
36
  (0, quit_1.quit)(1);
40
37
  }
41
38
  const region = (0, get_aws_region_1.getAwsRegion)();
@@ -118,7 +115,7 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
118
115
  let composition = args[1];
119
116
  if (!composition) {
120
117
  log_1.Log.info({ indent: false, logLevel }, 'No compositions passed. Fetching compositions...');
121
- (0, validate_serveurl_1.validateServeUrl)(serveUrl);
118
+ lambda_client_1.LambdaClientInternals.validateServeUrl(serveUrl);
122
119
  if (!serveUrl.startsWith('https://') && !serveUrl.startsWith('http://')) {
123
120
  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.');
124
121
  }
@@ -181,17 +178,17 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
181
178
  uiImageFormat: null,
182
179
  });
183
180
  const functionName = await (0, find_function_name_1.findFunctionName)({ logLevel, providerSpecifics });
184
- const maxRetries = (_c = args_1.parsedLambdaCli['max-retries']) !== null && _c !== void 0 ? _c : constants_1.DEFAULT_MAX_RETRIES;
181
+ const maxRetries = (_c = args_1.parsedLambdaCli['max-retries']) !== null && _c !== void 0 ? _c : defaults_1.DEFAULT_MAX_RETRIES;
185
182
  (0, validate_retries_1.validateMaxRetries)(maxRetries);
186
- const privacy = (_d = args_1.parsedLambdaCli.privacy) !== null && _d !== void 0 ? _d : constants_1.DEFAULT_OUTPUT_PRIVACY;
187
- (0, client_2.validatePrivacy)(privacy, true);
183
+ const privacy = (_d = args_1.parsedLambdaCli.privacy) !== null && _d !== void 0 ? _d : defaults_1.DEFAULT_OUTPUT_PRIVACY;
184
+ (0, serverless_1.validatePrivacy)(privacy, true);
188
185
  const framesPerLambda = (_e = args_1.parsedLambdaCli['frames-per-lambda']) !== null && _e !== void 0 ? _e : undefined;
189
- (0, client_2.validateFramesPerFunction)({
186
+ (0, serverless_1.validateFramesPerFunction)({
190
187
  framesPerFunction: framesPerLambda,
191
188
  durationInFrames: 1,
192
189
  });
193
190
  const webhookCustomData = (0, get_webhook_custom_data_1.getWebhookCustomData)(logLevel);
194
- const res = await (0, render_media_on_lambda_1.internalRenderMediaOnLambdaRaw)({
191
+ const res = await lambda_client_1.LambdaClientInternals.internalRenderMediaOnLambdaRaw({
195
192
  functionName,
196
193
  serveUrl,
197
194
  inputProps,
@@ -291,8 +288,8 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
291
288
  fallback: `Render folder: ${res.folderInS3Console}`,
292
289
  }));
293
290
  }
294
- const adheresToFunctionNameConvention = (0, parse_function_name_1.parseFunctionName)(functionName);
295
- const status = await (0, get_render_progress_1.getRenderProgress)({
291
+ const adheresToFunctionNameConvention = lambda_client_1.LambdaClientInternals.parseFunctionName(functionName);
292
+ const status = await (0, lambda_client_1.getRenderProgress)({
296
293
  functionName,
297
294
  bucketName: res.bucketName,
298
295
  renderId: res.renderId,
@@ -307,7 +304,7 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
307
304
  // eslint-disable-next-line no-constant-condition
308
305
  while (true) {
309
306
  await (0, sleep_1.sleep)(500);
310
- const newStatus = await (0, get_render_progress_1.getRenderProgress)({
307
+ const newStatus = await (0, lambda_client_1.getRenderProgress)({
311
308
  functionName,
312
309
  bucketName: res.bucketName,
313
310
  renderId: res.renderId,
@@ -1,5 +1,5 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { AwsProvider } from '@remotion/lambda-client';
2
3
  import type { ProviderSpecifics } from '@remotion/serverless';
3
- import type { AwsProvider } from '../../../functions/aws-implementation';
4
4
  export declare const SITES_CREATE_SUBCOMMAND = "create";
5
5
  export declare const sitesCreateSubcommand: (args: string[], remotionRoot: string, logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<void>;
@@ -4,11 +4,11 @@ exports.sitesCreateSubcommand = exports.SITES_CREATE_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
5
  const config_1 = require("@remotion/cli/config");
6
6
  const client_1 = require("@remotion/renderer/client");
7
- const client_2 = require("@remotion/serverless/client");
7
+ const serverless_1 = require("@remotion/serverless");
8
8
  const no_react_1 = require("remotion/no-react");
9
+ const defaults_1 = require("../../../defaults");
9
10
  const full_client_implementation_1 = require("../../../functions/full-client-implementation");
10
11
  const internals_1 = require("../../../internals");
11
- const constants_1 = require("../../../shared/constants");
12
12
  const validate_site_name_1 = require("../../../shared/validate-site-name");
13
13
  const args_1 = require("../../args");
14
14
  const get_aws_region_1 = require("../../get-aws-region");
@@ -29,7 +29,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementatio
29
29
  log_1.Log.error({ indent: false, logLevel }, 'No entry file passed.');
30
30
  log_1.Log.info({ indent: false, logLevel }, 'Pass an additional argument specifying the entry file of your Remotion project:');
31
31
  log_1.Log.info({ indent: false, logLevel });
32
- log_1.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} deploy <entry-file.ts>`);
32
+ log_1.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} deploy <entry-file.ts>`);
33
33
  (0, quit_1.quit)(1);
34
34
  return;
35
35
  }
@@ -79,7 +79,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementatio
79
79
  commandLine: cli_1.CliInternals.parsedCli,
80
80
  }).value;
81
81
  const cliBucketName = (_b = args_1.parsedLambdaCli['force-bucket-name']) !== null && _b !== void 0 ? _b : null;
82
- const bucketName = cliBucketName !== null && cliBucketName !== void 0 ? cliBucketName : (await (0, client_2.internalGetOrCreateBucket)({
82
+ const bucketName = cliBucketName !== null && cliBucketName !== void 0 ? cliBucketName : (await (0, serverless_1.internalGetOrCreateBucket)({
83
83
  region: (0, get_aws_region_1.getAwsRegion)(),
84
84
  enableFolderExpiry,
85
85
  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_COMMAND = "sites";
5
5
  export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, providerSpecifics: ProviderSpecifics<AwsProvider>) => Promise<boolean | void> | undefined;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sitesCommand = exports.SITES_COMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
- const constants_1 = require("../../../shared/constants");
5
+ const defaults_1 = require("../../../defaults");
6
6
  const quit_1 = require("../../helpers/quit");
7
7
  const create_1 = require("./create");
8
8
  const ls_1 = require("./ls");
@@ -10,20 +10,20 @@ const rm_1 = require("./rm");
10
10
  const rmall_1 = require("./rmall");
11
11
  exports.SITES_COMMAND = 'sites';
12
12
  const printSitesHelp = (logLevel) => {
13
- cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} <subcommand>`);
13
+ cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.SITES_COMMAND} <subcommand>`);
14
14
  cli_1.CliInternals.Log.info({ indent: false, logLevel });
15
15
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, 'Available subcommands:');
16
16
  cli_1.CliInternals.Log.info({ indent: false, logLevel });
17
- cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${create_1.SITES_CREATE_SUBCOMMAND} <entry-point>`);
17
+ cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.SITES_COMMAND} ${create_1.SITES_CREATE_SUBCOMMAND} <entry-point>`);
18
18
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Creates a new site based on a Remotion project'));
19
19
  cli_1.CliInternals.Log.info({ indent: false, logLevel });
20
- cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${ls_1.SITES_LS_SUBCOMMAND}`);
20
+ cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.SITES_COMMAND} ${ls_1.SITES_LS_SUBCOMMAND}`);
21
21
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Lists the sites currently deployed'));
22
22
  cli_1.CliInternals.Log.info({ indent: false, logLevel });
23
- cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rm_1.SITES_RM_COMMAND} <site-id>`);
23
+ cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${defaults_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rm_1.SITES_RM_COMMAND} <site-id>`);
24
24
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Remove a site from the S3 bucket.'));
25
25
  cli_1.CliInternals.Log.info({ indent: false, logLevel });
26
- cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rmall_1.SITES_RMALL_COMMAND}`);
26
+ cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${defaults_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
29
  const sitesCommand = (args, remotionRoot, logLevel, providerSpecifics) => {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sitesLsSubcommand = exports.SITES_LS_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
- const get_sites_1 = require("../../../api/get-sites");
5
+ const lambda_client_1 = require("@remotion/lambda-client");
6
6
  const get_aws_region_1 = require("../../get-aws-region");
7
7
  const date_string_1 = require("../../helpers/date-string");
8
8
  exports.SITES_LS_SUBCOMMAND = 'ls';
@@ -17,7 +17,7 @@ const logRow = (data) => {
17
17
  };
18
18
  const sitesLsSubcommand = async (logLevel) => {
19
19
  const region = (0, get_aws_region_1.getAwsRegion)();
20
- const { sites, buckets } = await (0, get_sites_1.getSites)({ region });
20
+ const { sites, buckets } = await (0, lambda_client_1.getSites)({ region });
21
21
  if (buckets.length > 1 && !cli_1.CliInternals.quietFlagProvided()) {
22
22
  cli_1.CliInternals.Log.warn({ indent: false, logLevel }, 'Warning: You have more than one Remotion S3 bucket, but only one is needed. This can lead to conflicts. Remove all but one of them.');
23
23
  }
@@ -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_RM_COMMAND = "rm";
5
5
  export declare const sitesRmSubcommand: (args: string[], logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<undefined>;