@remotion/lambda 4.0.187 → 4.0.189

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 (230) hide show
  1. package/dist/api/__mocks__/clean-items.d.ts +2 -0
  2. package/dist/api/__mocks__/clean-items.js +24 -0
  3. package/dist/api/__mocks__/create-function.d.ts +2 -0
  4. package/dist/api/__mocks__/create-function.js +21 -0
  5. package/dist/api/__mocks__/delete-function.d.ts +2 -0
  6. package/dist/api/__mocks__/delete-function.js +9 -0
  7. package/dist/api/__mocks__/get-functions.d.ts +2 -0
  8. package/dist/api/__mocks__/get-functions.js +9 -0
  9. package/dist/api/__mocks__/upload-dir.d.ts +3 -0
  10. package/dist/api/__mocks__/upload-dir.js +47 -0
  11. package/dist/api/bucket-exists.d.ts +3 -6
  12. package/dist/api/bucket-exists.js +5 -5
  13. package/dist/api/clean-items.d.ts +4 -3
  14. package/dist/api/clean-items.js +7 -7
  15. package/dist/api/create-bucket.d.ts +3 -5
  16. package/dist/api/create-bucket.js +6 -6
  17. package/dist/api/create-function.d.ts +1 -1
  18. package/dist/api/delete-function.d.ts +1 -1
  19. package/dist/api/delete-render.d.ts +10 -3
  20. package/dist/api/delete-render.js +27 -19
  21. package/dist/api/delete-site.d.ts +7 -2
  22. package/dist/api/delete-site.js +23 -15
  23. package/dist/api/deploy-function.d.ts +1 -1
  24. package/dist/api/deploy-function.js +2 -2
  25. package/dist/api/deploy-site.d.ts +9 -5
  26. package/dist/api/deploy-site.js +11 -12
  27. package/dist/api/download-media.d.ts +8 -3
  28. package/dist/api/download-media.js +24 -15
  29. package/dist/api/estimate-price.d.ts +1 -1
  30. package/dist/api/get-aws-client.d.ts +4 -2
  31. package/dist/api/get-aws-client.js +2 -2
  32. package/dist/api/get-buckets.d.ts +4 -4
  33. package/dist/api/get-buckets.js +12 -14
  34. package/dist/api/get-compositions-on-lambda.js +7 -6
  35. package/dist/api/get-function-info.d.ts +1 -1
  36. package/dist/api/get-functions.d.ts +1 -1
  37. package/dist/api/get-or-create-bucket.d.ts +3 -19
  38. package/dist/api/get-or-create-bucket.js +5 -39
  39. package/dist/api/get-regions.d.ts +1 -1
  40. package/dist/api/get-regions.js +1 -2
  41. package/dist/api/get-render-progress.d.ts +4 -3
  42. package/dist/api/get-render-progress.js +2 -2
  43. package/dist/api/get-sites.d.ts +6 -1
  44. package/dist/api/get-sites.js +21 -14
  45. package/dist/api/iam-validation/role-permissions.js +2 -1
  46. package/dist/api/iam-validation/simulate-rule.d.ts +1 -1
  47. package/dist/api/iam-validation/simulate.d.ts +1 -1
  48. package/dist/api/iam-validation/user-permissions.js +2 -1
  49. package/dist/api/make-lambda-payload.d.ts +8 -9
  50. package/dist/api/make-lambda-payload.js +17 -14
  51. package/dist/api/mock-functions.d.ts +1 -1
  52. package/dist/api/presign-url.d.ts +1 -1
  53. package/dist/api/presign-url.js +4 -4
  54. package/dist/api/render-media-on-lambda.d.ts +5 -6
  55. package/dist/api/render-media-on-lambda.js +5 -5
  56. package/dist/api/render-still-on-lambda.d.ts +8 -6
  57. package/dist/api/render-still-on-lambda.js +6 -5
  58. package/dist/api/upload-dir.d.ts +2 -2
  59. package/dist/api/upload-dir.js +2 -2
  60. package/dist/cli/args.d.ts +2 -3
  61. package/dist/cli/commands/render/progress.d.ts +2 -2
  62. package/dist/cli/commands/render/progress.js +6 -5
  63. package/dist/cli/commands/render/render.d.ts +3 -1
  64. package/dist/cli/commands/render/render.js +3 -2
  65. package/dist/cli/commands/sites/create.d.ts +3 -1
  66. package/dist/cli/commands/sites/create.js +6 -5
  67. package/dist/cli/commands/sites/index.d.ts +3 -1
  68. package/dist/cli/commands/sites/index.js +4 -4
  69. package/dist/cli/commands/sites/rm.d.ts +3 -1
  70. package/dist/cli/commands/sites/rm.js +4 -3
  71. package/dist/cli/commands/sites/rmall.d.ts +3 -1
  72. package/dist/cli/commands/sites/rmall.js +4 -3
  73. package/dist/cli/commands/still.d.ts +3 -1
  74. package/dist/cli/commands/still.js +3 -2
  75. package/dist/cli/get-aws-region.d.ts +1 -1
  76. package/dist/cli/helpers/__mocks__/quit.d.ts +1 -0
  77. package/dist/cli/helpers/__mocks__/quit.js +7 -0
  78. package/dist/cli/index.d.ts +3 -1
  79. package/dist/cli/index.js +8 -7
  80. package/dist/client.d.ts +4 -5
  81. package/dist/functions/aws-implementation.d.ts +11 -0
  82. package/dist/functions/aws-implementation.js +49 -0
  83. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
  84. package/dist/functions/compositions.d.ts +3 -2
  85. package/dist/functions/compositions.js +18 -15
  86. package/dist/functions/helpers/__mocks__/get-browser-instance.d.ts +3 -0
  87. package/dist/functions/helpers/__mocks__/get-browser-instance.js +12 -0
  88. package/dist/functions/helpers/__mocks__/leak-detection.d.ts +4 -0
  89. package/dist/functions/helpers/__mocks__/leak-detection.js +9 -0
  90. package/dist/functions/helpers/__mocks__/timer.d.ts +2 -0
  91. package/dist/functions/helpers/__mocks__/timer.js +10 -0
  92. package/dist/functions/helpers/calculate-price-from-bucket.d.ts +5 -3
  93. package/dist/functions/helpers/calculate-price-from-bucket.js +2 -3
  94. package/dist/functions/helpers/cleanup-props.d.ts +4 -2
  95. package/dist/functions/helpers/cleanup-props.js +5 -4
  96. package/dist/functions/helpers/concat-videos.d.ts +2 -2
  97. package/dist/functions/helpers/create-post-render-data.d.ts +8 -8
  98. package/dist/functions/helpers/create-post-render-data.js +1 -1
  99. package/dist/functions/helpers/expected-out-name.d.ts +4 -4
  100. package/dist/functions/helpers/find-output-file-in-bucket.d.ts +8 -7
  101. package/dist/functions/helpers/find-output-file-in-bucket.js +5 -6
  102. package/dist/functions/helpers/get-browser-instance.d.ts +3 -2
  103. package/dist/functions/helpers/get-browser-instance.js +3 -4
  104. package/dist/functions/helpers/get-current-region.d.ts +1 -1
  105. package/dist/functions/helpers/get-current-region.js +3 -3
  106. package/dist/functions/helpers/get-custom-out-name.d.ts +5 -5
  107. package/dist/functions/helpers/get-folder-files.d.ts +2 -0
  108. package/dist/functions/helpers/get-folder-files.js +38 -0
  109. package/dist/functions/helpers/get-output-url-from-metadata.d.ts +4 -3
  110. package/dist/functions/helpers/get-output-url-from-metadata.js +4 -5
  111. package/dist/functions/helpers/get-overall-progress-s3.d.ts +5 -4
  112. package/dist/functions/helpers/get-overall-progress-s3.js +5 -7
  113. package/dist/functions/helpers/get-progress.d.ts +8 -7
  114. package/dist/functions/helpers/get-progress.js +7 -5
  115. package/dist/functions/helpers/inspect-errors.d.ts +1 -1
  116. package/dist/functions/helpers/inspect-errors.js +4 -4
  117. package/dist/functions/helpers/io.d.ts +3 -36
  118. package/dist/functions/helpers/io.js +3 -104
  119. package/dist/functions/helpers/lifecycle.d.ts +3 -9
  120. package/dist/functions/helpers/lifecycle.js +6 -16
  121. package/dist/functions/helpers/make-aws-artifact.d.ts +3 -0
  122. package/dist/functions/helpers/make-aws-artifact.js +12 -0
  123. package/dist/functions/helpers/make-timeout-error.d.ts +5 -4
  124. package/dist/functions/helpers/make-timeout-error.js +2 -1
  125. package/dist/functions/helpers/make-timeout-message.d.ts +5 -3
  126. package/dist/functions/helpers/make-timeout-message.js +8 -9
  127. package/dist/functions/helpers/merge-chunks.d.ts +10 -10
  128. package/dist/functions/helpers/merge-chunks.js +7 -8
  129. package/dist/functions/helpers/overall-render-progress.d.ts +18 -23
  130. package/dist/functions/helpers/overall-render-progress.js +5 -5
  131. package/dist/functions/helpers/print-cloudwatch-helper.d.ts +2 -2
  132. package/dist/functions/helpers/print-logging-helper.d.ts +4 -0
  133. package/dist/functions/helpers/print-logging-helper.js +12 -0
  134. package/dist/functions/helpers/read-with-progress.d.ts +4 -3
  135. package/dist/functions/helpers/read-with-progress.js +2 -2
  136. package/dist/functions/helpers/render-has-audio-video.d.ts +3 -2
  137. package/dist/functions/helpers/stream-renderer.d.ts +7 -4
  138. package/dist/functions/helpers/stream-renderer.js +11 -10
  139. package/dist/functions/helpers/streamify-response.d.ts +0 -20
  140. package/dist/functions/helpers/streamify-response.js +1 -62
  141. package/dist/functions/helpers/validate-composition.d.ts +5 -3
  142. package/dist/functions/helpers/validate-composition.js +2 -3
  143. package/dist/functions/index.d.ts +5 -3
  144. package/dist/functions/index.js +98 -72
  145. package/dist/functions/info.d.ts +1 -1
  146. package/dist/functions/info.js +2 -2
  147. package/dist/functions/launch.d.ts +3 -2
  148. package/dist/functions/launch.js +55 -41
  149. package/dist/functions/progress.d.ts +6 -3
  150. package/dist/functions/progress.js +5 -4
  151. package/dist/functions/provider-implementation.d.ts +0 -0
  152. package/dist/functions/provider-implementation.js +1 -0
  153. package/dist/functions/renderer.d.ts +9 -3
  154. package/dist/functions/renderer.js +41 -22
  155. package/dist/functions/start.d.ts +3 -2
  156. package/dist/functions/start.js +13 -16
  157. package/dist/functions/still.d.ts +8 -18
  158. package/dist/functions/still.js +48 -46
  159. package/dist/index.d.ts +6 -7
  160. package/dist/internals.d.ts +18 -14
  161. package/dist/io/delete-file.d.ts +3 -0
  162. package/dist/io/delete-file.js +12 -0
  163. package/dist/io/head-file.d.ts +3 -0
  164. package/dist/io/head-file.js +13 -0
  165. package/dist/io/list-objects.d.ts +3 -0
  166. package/dist/io/list-objects.js +58 -0
  167. package/dist/io/read-file.d.ts +9 -0
  168. package/dist/io/read-file.js +14 -0
  169. package/dist/io/write-file.d.ts +5 -0
  170. package/dist/io/write-file.js +51 -0
  171. package/dist/pricing/aws-regions.d.ts +0 -3
  172. package/dist/pricing/aws-regions.js +0 -44
  173. package/dist/pricing/price-per-1-s.d.ts +1 -1
  174. package/dist/regions.d.ts +3 -2
  175. package/dist/regions.js +43 -3
  176. package/dist/shared/__mocks__/aws-clients.d.ts +2 -0
  177. package/dist/shared/__mocks__/aws-clients.js +62 -0
  178. package/dist/shared/__mocks__/bundle-site.d.ts +2 -0
  179. package/dist/shared/__mocks__/bundle-site.js +32 -0
  180. package/dist/shared/__mocks__/check-credentials.d.ts +1 -0
  181. package/dist/shared/__mocks__/check-credentials.js +5 -0
  182. package/dist/shared/__mocks__/get-account-id.d.ts +2 -0
  183. package/dist/shared/__mocks__/get-account-id.js +11 -0
  184. package/dist/shared/__mocks__/read-dir.d.ts +2 -0
  185. package/dist/shared/__mocks__/read-dir.js +13 -0
  186. package/dist/shared/aws-clients.d.ts +6 -29
  187. package/dist/shared/aws-clients.js +7 -177
  188. package/dist/shared/call-lambda.d.ts +8 -9
  189. package/dist/shared/call-lambda.js +16 -3
  190. package/dist/shared/check-credentials.js +2 -2
  191. package/dist/shared/cleanup-serialized-input-props.d.ts +8 -6
  192. package/dist/shared/cleanup-serialized-input-props.js +7 -8
  193. package/dist/shared/compress-props.d.ts +8 -6
  194. package/dist/shared/compress-props.js +11 -14
  195. package/dist/shared/constants.d.ts +10 -288
  196. package/dist/shared/constants.js +1 -46
  197. package/dist/shared/content-disposition-header.d.ts +1 -6
  198. package/dist/shared/content-disposition-header.js +2 -2
  199. package/dist/shared/convert-to-serve-url.d.ts +2 -2
  200. package/dist/shared/convert-to-serve-url.js +3 -3
  201. package/dist/shared/get-account-id.d.ts +1 -1
  202. package/dist/shared/get-aws-urls.d.ts +2 -2
  203. package/dist/shared/get-credentials.d.ts +9 -0
  204. package/dist/shared/get-credentials.js +53 -0
  205. package/dist/shared/get-function-version.d.ts +1 -1
  206. package/dist/shared/get-function-version.js +2 -1
  207. package/dist/shared/get-s3-client.d.ts +5 -0
  208. package/dist/shared/get-s3-client.js +13 -0
  209. package/dist/shared/get-service-client.d.ts +22 -0
  210. package/dist/shared/get-service-client.js +117 -0
  211. package/dist/shared/hosted-layers.d.ts +1 -1
  212. package/dist/shared/invoke-webhook.d.ts +1 -1
  213. package/dist/shared/lambda-insights-extensions.d.ts +1 -1
  214. package/dist/shared/lifecycle-rules.d.ts +4 -3
  215. package/dist/shared/lifecycle-rules.js +3 -3
  216. package/dist/shared/make-s3-url.d.ts +1 -1
  217. package/dist/shared/random-hash.d.ts +1 -3
  218. package/dist/shared/random-hash.js +3 -4
  219. package/dist/shared/return-values.d.ts +10 -11
  220. package/dist/shared/validate-aws-region.d.ts +1 -1
  221. package/dist/shared/validate-aws-region.js +3 -3
  222. package/dist/shared/validate-bucketname.d.ts +0 -4
  223. package/dist/shared/validate-bucketname.js +3 -23
  224. package/dist/shared/validate-lambda-codec.d.ts +2 -4
  225. package/dist/shared/validate-lambda-codec.js +3 -13
  226. package/dist/shared/validate-outname.js +2 -2
  227. package/dist/shared/validate-privacy.d.ts +1 -1
  228. package/dist/shared/validate-webhook.d.ts +1 -1
  229. package/package.json +11 -9
  230. package/remotionlambda-arm64.zip +0 -0
@@ -1,14 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeLambdaRenderStillPayload = exports.getRenderProgressPayload = exports.makeLambdaRenderMediaPayload = void 0;
4
+ const client_1 = require("@remotion/serverless/client");
4
5
  const version_1 = require("remotion/version");
5
- const defaults_1 = require("../defaults");
6
- const compress_props_1 = require("../shared/compress-props");
6
+ const aws_implementation_1 = require("../functions/aws-implementation");
7
+ const client_2 = require("@remotion/serverless/client");
8
+ const no_react_1 = require("remotion/no-react");
7
9
  const validate_download_behavior_1 = require("../shared/validate-download-behavior");
8
10
  const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lambda");
9
11
  const validate_lambda_codec_1 = require("../shared/validate-lambda-codec");
10
12
  const validate_serveurl_1 = require("../shared/validate-serveurl");
11
- const validate_webhook_1 = require("../shared/validate-webhook");
12
13
  const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, encodingMaxRate, encodingBufferSize, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, preferLossless, }) => {
13
14
  const actualCodec = (0, validate_lambda_codec_1.validateLambdaCodec)(codec);
14
15
  (0, validate_serveurl_1.validateServeUrl)(serveUrl);
@@ -17,16 +18,17 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
17
18
  durationInFrames: 1,
18
19
  });
19
20
  (0, validate_download_behavior_1.validateDownloadBehavior)(downloadBehavior);
20
- (0, validate_webhook_1.validateWebhook)(webhook);
21
- const stringifiedInputProps = (0, compress_props_1.serializeOrThrow)(inputProps !== null && inputProps !== void 0 ? inputProps : {}, 'input-props');
22
- const serialized = await (0, compress_props_1.compressInputProps)({
21
+ (0, client_2.validateWebhook)(webhook);
22
+ const stringifiedInputProps = (0, client_1.serializeOrThrow)(inputProps !== null && inputProps !== void 0 ? inputProps : {}, 'input-props');
23
+ const serialized = await (0, client_1.compressInputProps)({
23
24
  stringifiedInputProps,
24
25
  region,
25
- needsToUpload: (0, compress_props_1.getNeedsToUpload)('video-or-audio', [
26
+ needsToUpload: (0, client_1.getNeedsToUpload)('video-or-audio', [
26
27
  stringifiedInputProps.length,
27
28
  ]),
28
29
  userSpecifiedBucketName: bucketName !== null && bucketName !== void 0 ? bucketName : null,
29
30
  propsType: 'input-props',
31
+ providerSpecifics: aws_implementation_1.awsImplementation,
30
32
  });
31
33
  return {
32
34
  rendererFunctionName,
@@ -56,7 +58,7 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
56
58
  downloadBehavior,
57
59
  muted,
58
60
  version: version_1.VERSION,
59
- overwrite: overwrite !== null && overwrite !== void 0 ? overwrite : false,
61
+ overwrite: overwrite !== null && overwrite !== void 0 ? overwrite : no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES,
60
62
  audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
61
63
  videoBitrate: videoBitrate !== null && videoBitrate !== void 0 ? videoBitrate : null,
62
64
  encodingBufferSize: encodingBufferSize !== null && encodingBufferSize !== void 0 ? encodingBufferSize : null,
@@ -66,7 +68,7 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
66
68
  forceWidth: forceWidth !== null && forceWidth !== void 0 ? forceWidth : null,
67
69
  bucketName: bucketName !== null && bucketName !== void 0 ? bucketName : null,
68
70
  audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : null,
69
- type: defaults_1.LambdaRoutines.start,
71
+ type: client_1.ServerlessRoutines.start,
70
72
  offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
71
73
  deleteAfter: deleteAfter !== null && deleteAfter !== void 0 ? deleteAfter : null,
72
74
  colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : null,
@@ -76,7 +78,7 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
76
78
  exports.makeLambdaRenderMediaPayload = makeLambdaRenderMediaPayload;
77
79
  const getRenderProgressPayload = ({ bucketName, renderId, s3OutputProvider, logLevel, }) => {
78
80
  return {
79
- type: defaults_1.LambdaRoutines.status,
81
+ type: client_1.ServerlessRoutines.status,
80
82
  bucketName,
81
83
  renderId,
82
84
  version: version_1.VERSION,
@@ -89,13 +91,14 @@ const makeLambdaRenderStillPayload = async ({ serveUrl, inputProps, imageFormat,
89
91
  if (quality) {
90
92
  throw new Error('The `quality` option is deprecated. Use `jpegQuality` instead.');
91
93
  }
92
- const stringifiedInputProps = (0, compress_props_1.serializeOrThrow)(inputProps, 'input-props');
93
- const serializedInputProps = await (0, compress_props_1.compressInputProps)({
94
+ const stringifiedInputProps = (0, client_1.serializeOrThrow)(inputProps, 'input-props');
95
+ const serializedInputProps = await (0, client_1.compressInputProps)({
94
96
  stringifiedInputProps,
95
97
  region,
96
- needsToUpload: (0, compress_props_1.getNeedsToUpload)('still', [stringifiedInputProps.length]),
98
+ needsToUpload: (0, client_1.getNeedsToUpload)('still', [stringifiedInputProps.length]),
97
99
  userSpecifiedBucketName: forceBucketName !== null && forceBucketName !== void 0 ? forceBucketName : null,
98
100
  propsType: 'input-props',
101
+ providerSpecifics: aws_implementation_1.awsImplementation,
99
102
  });
100
103
  return {
101
104
  composition,
@@ -120,7 +123,7 @@ const makeLambdaRenderStillPayload = async ({ serveUrl, inputProps, imageFormat,
120
123
  bucketName: forceBucketName,
121
124
  offthreadVideoCacheSizeInBytes,
122
125
  deleteAfter,
123
- type: defaults_1.LambdaRoutines.still,
126
+ type: client_1.ServerlessRoutines.still,
124
127
  streamed: true,
125
128
  };
126
129
  };
@@ -1,4 +1,4 @@
1
- import type { AwsRegion } from '../pricing/aws-regions';
1
+ import type { AwsRegion } from '../regions';
2
2
  import type { FunctionInfo } from './get-function-info';
3
3
  export declare let mockFunctionsStore: (FunctionInfo & {
4
4
  region: AwsRegion;
@@ -1,4 +1,4 @@
1
- import type { AwsRegion } from '../pricing/aws-regions';
1
+ import type { AwsRegion } from '../regions';
2
2
  export type PresignUrlInput<CheckIfObjectExists extends boolean = boolean> = {
3
3
  region: AwsRegion;
4
4
  bucketName: string;
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.presignUrl = void 0;
4
4
  const client_s3_1 = require("@aws-sdk/client-s3");
5
5
  const s3_request_presigner_1 = require("@aws-sdk/s3-request-presigner");
6
- const aws_clients_1 = require("../shared/aws-clients");
7
- const validate_bucketname_1 = require("../shared/validate-bucketname");
6
+ const client_1 = require("@remotion/serverless/client");
7
+ const get_s3_client_1 = require("../shared/get-s3-client");
8
8
  const validate_presign_expiration_1 = require("../shared/validate-presign-expiration");
9
9
  /**
10
10
  * @description Returns a public url of an object stored in Remotion's S3 bucket.
@@ -17,9 +17,9 @@ const validate_presign_expiration_1 = require("../shared/validate-presign-expira
17
17
  * @returns {Promise<string | null>} The public url of an object or `null` if `checkIfObjectExists=true` & object does not exist.
18
18
  */
19
19
  const presignUrl = async ({ region, bucketName, objectKey, checkIfObjectExists, expiresInSeconds, }) => {
20
- (0, validate_bucketname_1.validateBucketName)(bucketName, { mustStartWithRemotion: false });
20
+ (0, client_1.validateBucketName)(bucketName, { mustStartWithRemotion: false });
21
21
  (0, validate_presign_expiration_1.validatePresignExpiration)(expiresInSeconds);
22
- const s3Client = (0, aws_clients_1.getS3Client)(region, null);
22
+ const s3Client = (0, get_s3_client_1.getS3Client)(region, null);
23
23
  if (checkIfObjectExists === true) {
24
24
  try {
25
25
  await s3Client.send(new client_s3_1.HeadObjectCommand({
@@ -1,9 +1,8 @@
1
1
  import type { AudioCodec, ChromiumOptions, FrameRange, PixelFormat, ProResProfile, ToOptions, VideoImageFormat } from '@remotion/renderer';
2
2
  import type { BrowserSafeApis } from '@remotion/renderer/client';
3
- import type { AwsRegion } from '../pricing/aws-regions';
4
- import type { OutNameInput, Privacy, WebhookOption } from '../shared/constants';
5
- import type { DownloadBehavior } from '../shared/content-disposition-header';
6
- import type { LambdaCodec } from '../shared/validate-lambda-codec';
3
+ import type { DownloadBehavior, OutNameInput, Privacy, ServerlessCodec, WebhookOption } from '@remotion/serverless/client';
4
+ import type { AwsProvider } from '../functions/aws-implementation';
5
+ import type { AwsRegion } from '../regions';
7
6
  import type { InnerRenderMediaOnLambdaInput } from './make-lambda-payload';
8
7
  export type RenderMediaOnLambdaInput = {
9
8
  region: AwsRegion;
@@ -11,7 +10,7 @@ export type RenderMediaOnLambdaInput = {
11
10
  serveUrl: string;
12
11
  composition: string;
13
12
  inputProps?: Record<string, unknown>;
14
- codec: LambdaCodec;
13
+ codec: ServerlessCodec;
15
14
  imageFormat?: VideoImageFormat;
16
15
  crf?: number | undefined;
17
16
  envVariables?: Record<string, string>;
@@ -26,7 +25,7 @@ export type RenderMediaOnLambdaInput = {
26
25
  maxRetries?: number;
27
26
  framesPerLambda?: number;
28
27
  frameRange?: FrameRange;
29
- outName?: OutNameInput;
28
+ outName?: OutNameInput<AwsProvider>;
30
29
  chromiumOptions?: Omit<ChromiumOptions, 'enableMultiProcessOnLinux'>;
31
30
  scale?: number;
32
31
  everyNthFrame?: number;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderVideoOnLambda = exports.renderMediaOnLambda = exports.renderMediaOnLambdaOptionalToRequired = exports.internalRenderMediaOnLambdaRaw = void 0;
4
- const pure_1 = require("@remotion/renderer/pure");
4
+ const error_handling_1 = require("@remotion/renderer/error-handling");
5
+ const client_1 = require("@remotion/serverless/client");
5
6
  const call_lambda_1 = require("../shared/call-lambda");
6
- const constants_1 = require("../shared/constants");
7
7
  const get_aws_urls_1 = require("../shared/get-aws-urls");
8
8
  const make_lambda_payload_1 = require("./make-lambda-payload");
9
9
  const internalRenderMediaOnLambdaRaw = async (input) => {
@@ -12,7 +12,7 @@ const internalRenderMediaOnLambdaRaw = async (input) => {
12
12
  try {
13
13
  const res = await (0, call_lambda_1.callLambda)({
14
14
  functionName,
15
- type: constants_1.LambdaRoutines.start,
15
+ type: client_1.ServerlessRoutines.start,
16
16
  payload: await (0, make_lambda_payload_1.makeLambdaRenderMediaPayload)(input),
17
17
  region,
18
18
  timeoutInTest: 120000,
@@ -30,7 +30,7 @@ const internalRenderMediaOnLambdaRaw = async (input) => {
30
30
  cloudWatchMainLogs: (0, get_aws_urls_1.getCloudwatchMethodUrl)({
31
31
  renderId: res.renderId,
32
32
  functionName,
33
- method: constants_1.LambdaRoutines.launch,
33
+ method: client_1.ServerlessRoutines.launch,
34
34
  region,
35
35
  rendererFunctionName: rendererFunctionName !== null && rendererFunctionName !== void 0 ? rendererFunctionName : null,
36
36
  }),
@@ -107,7 +107,7 @@ const renderMediaOnLambdaOptionalToRequired = (options) => {
107
107
  };
108
108
  };
109
109
  exports.renderMediaOnLambdaOptionalToRequired = renderMediaOnLambdaOptionalToRequired;
110
- const wrapped = pure_1.NoReactAPIs.wrapWithErrorHandling(exports.internalRenderMediaOnLambdaRaw);
110
+ const wrapped = (0, error_handling_1.wrapWithErrorHandling)(exports.internalRenderMediaOnLambdaRaw);
111
111
  /**
112
112
  * @description Triggers a render on a lambda given a composition and a lambda function.
113
113
  * @see [Documentation](https://remotion.dev/docs/lambda/rendermediaonlambda)
@@ -1,9 +1,11 @@
1
1
  import type { ChromiumOptions, StillImageFormat, ToOptions } from '@remotion/renderer';
2
2
  import type { BrowserSafeApis } from '@remotion/renderer/client';
3
- import type { ReceivedArtifact } from '../functions/helpers/overall-render-progress';
4
- import type { AwsRegion } from '../pricing/aws-regions';
5
- import type { CostsInfo, OutNameInput, Privacy } from '../shared/constants';
6
- import type { DownloadBehavior } from '../shared/content-disposition-header';
3
+ import type { DownloadBehavior } from '@remotion/serverless/client';
4
+ import type { ReceivedArtifact } from '@remotion/serverless';
5
+ import type { OutNameInput, Privacy } from '@remotion/serverless/client';
6
+ import type { AwsProvider } from '../functions/aws-implementation';
7
+ import type { AwsRegion } from '../regions';
8
+ import type { CostsInfo } from '../shared/constants';
7
9
  type MandatoryParameters = {
8
10
  region: AwsRegion;
9
11
  functionName: string;
@@ -21,7 +23,7 @@ type OptionalParameters = {
21
23
  */
22
24
  quality?: never;
23
25
  frame: number;
24
- outName: OutNameInput | null;
26
+ outName: OutNameInput<AwsProvider> | null;
25
27
  chromiumOptions: ChromiumOptions;
26
28
  downloadBehavior: DownloadBehavior;
27
29
  forceWidth: number | null;
@@ -48,7 +50,7 @@ export type RenderStillOnLambdaOutput = {
48
50
  bucketName: string;
49
51
  renderId: string;
50
52
  cloudWatchLogs: string;
51
- artifacts: ReceivedArtifact[];
53
+ artifacts: ReceivedArtifact<AwsProvider>[];
52
54
  };
53
55
  /**
54
56
  * @description Renders a still frame on Lambda
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderStillOnLambda = void 0;
4
- const pure_1 = require("@remotion/renderer/pure");
4
+ const client_1 = require("@remotion/serverless/client");
5
5
  const call_lambda_1 = require("../shared/call-lambda");
6
+ const error_handling_1 = require("@remotion/renderer/error-handling");
6
7
  const constants_1 = require("../shared/constants");
7
8
  const get_aws_urls_1 = require("../shared/get-aws-urls");
8
9
  const make_lambda_payload_1 = require("./make-lambda-payload");
@@ -14,7 +15,7 @@ const internalRenderStillOnLambda = async (input) => {
14
15
  const res = await new Promise((resolve, reject) => {
15
16
  (0, call_lambda_1.callLambdaWithStreaming)({
16
17
  functionName,
17
- type: constants_1.LambdaRoutines.still,
18
+ type: client_1.ServerlessRoutines.still,
18
19
  payload,
19
20
  region,
20
21
  receivedStreamingPayload: ({ message }) => {
@@ -23,7 +24,7 @@ const internalRenderStillOnLambda = async (input) => {
23
24
  renderId: message.payload.renderId,
24
25
  cloudWatchLogs: (0, get_aws_urls_1.getCloudwatchMethodUrl)({
25
26
  functionName,
26
- method: constants_1.LambdaRoutines.still,
27
+ method: client_1.ServerlessRoutines.still,
27
28
  region,
28
29
  rendererFunctionName: null,
29
30
  renderId: message.payload.renderId,
@@ -60,7 +61,7 @@ const internalRenderStillOnLambda = async (input) => {
60
61
  renderId: res.renderId,
61
62
  cloudWatchLogs: (0, get_aws_urls_1.getCloudwatchMethodUrl)({
62
63
  functionName,
63
- method: constants_1.LambdaRoutines.still,
64
+ method: client_1.ServerlessRoutines.still,
64
65
  region,
65
66
  renderId: res.renderId,
66
67
  rendererFunctionName: null,
@@ -75,7 +76,7 @@ const internalRenderStillOnLambda = async (input) => {
75
76
  throw err;
76
77
  }
77
78
  };
78
- const errorHandled = pure_1.NoReactAPIs.wrapWithErrorHandling(internalRenderStillOnLambda);
79
+ const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(internalRenderStillOnLambda);
79
80
  /**
80
81
  * @description Renders a still frame on Lambda
81
82
  * @link https://remotion.dev/docs/lambda/renderstillonlambda
@@ -1,5 +1,5 @@
1
- import type { Privacy } from '../defaults';
2
- import type { AwsRegion } from '../pricing/aws-regions';
1
+ import type { Privacy } from '@remotion/serverless/client';
2
+ import type { AwsRegion } from '../regions';
3
3
  export type UploadDirProgress = {
4
4
  totalFiles: number;
5
5
  filesUploaded: number;
@@ -8,7 +8,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");
10
10
  const node_path_1 = __importDefault(require("node:path"));
11
- const aws_clients_1 = require("../shared/aws-clients");
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
14
  const getDirFiles = (entry) => {
@@ -52,7 +52,7 @@ const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, priv
52
52
  for (const file of files) {
53
53
  progresses[file.name] = 0;
54
54
  }
55
- const client = (0, aws_clients_1.getS3Client)(region, null);
55
+ const client = (0, get_s3_client_1.getS3Client)(region, null);
56
56
  const uploadAll = (async () => {
57
57
  const uploads = files.map((filePath) => limit(async () => {
58
58
  const Key = (0, make_s3_key_1.makeS3Key)(keyPrefix, localDir, filePath.name);
@@ -1,8 +1,7 @@
1
1
  /// <reference types="minimist" />
2
2
  import type { BrowserSafeApis } from '@remotion/renderer/client';
3
- import type { DeleteAfter } from '../client';
4
- import type { AwsRegion } from '../pricing/aws-regions';
5
- import type { Privacy } from '../shared/constants';
3
+ import type { AwsRegion, DeleteAfter } from '../client';
4
+ import type { Privacy } from '@remotion/serverless/client';
6
5
  type LambdaCommandLineOptions = {
7
6
  help: boolean;
8
7
  region: AwsRegion;
@@ -1,11 +1,11 @@
1
+ import type { CloudProvider, ReceivedArtifact } from '@remotion/serverless';
1
2
  import type { RenderProgress } from '../../../defaults';
2
- import type { ReceivedArtifact } from '../../../functions/helpers/overall-render-progress';
3
3
  type DownloadedInfo = {
4
4
  totalSize: number | null;
5
5
  downloaded: number;
6
6
  doneIn: number | null;
7
7
  };
8
- export declare const makeArtifactProgress: (artifactProgress: ReceivedArtifact[]) => string | null;
8
+ export declare const makeArtifactProgress: <Provider extends CloudProvider<string, Record<string, unknown>>>(artifactProgress: ReceivedArtifact<Provider>[]) => string | null;
9
9
  export declare const makeProgressString: ({ downloadInfo, overall, }: {
10
10
  overall: RenderProgress;
11
11
  downloadInfo: DownloadedInfo | null;
@@ -3,8 +3,8 @@ 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
7
  const no_react_1 = require("remotion/no-react");
7
- const truthy_1 = require("../../../shared/truthy");
8
8
  const makeEvaluationProgress = (overall) => {
9
9
  const timeToLaunch = overall.compositionValidated
10
10
  ? overall.compositionValidated - overall.functionLaunched
@@ -71,7 +71,7 @@ const makeRenderProgress = (progress) => {
71
71
  ? frames
72
72
  : cli_1.CliInternals.chalk.gray(`${progress.timeToRenderFrames}ms`),
73
73
  ]
74
- .filter(truthy_1.truthy)
74
+ .filter(client_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(truthy_1.truthy)
85
+ .filter(client_1.truthy)
86
86
  .join(' ');
87
87
  return [first, second];
88
88
  };
@@ -153,7 +153,8 @@ const makeArtifactProgress = (artifactProgress) => {
153
153
  return artifactProgress
154
154
  .map((artifact) => {
155
155
  return [
156
- cli_1.CliInternals.chalk.blue('+ S3'.padEnd(cli_1.CliInternals.LABEL_WIDTH)),
156
+ // TODO: Whitelabel S3
157
+ cli_1.CliInternals.chalk.blue(`+ S3`.padEnd(cli_1.CliInternals.LABEL_WIDTH)),
157
158
  cli_1.CliInternals.chalk.blue(cli_1.CliInternals.makeHyperlink({
158
159
  url: artifact.s3Url,
159
160
  fallback: artifact.filename,
@@ -162,7 +163,7 @@ const makeArtifactProgress = (artifactProgress) => {
162
163
  cli_1.CliInternals.chalk.gray(`${cli_1.CliInternals.formatBytes(artifact.sizeInBytes)}`),
163
164
  ].join(' ');
164
165
  })
165
- .filter(truthy_1.truthy)
166
+ .filter(client_1.truthy)
166
167
  .join('\n');
167
168
  };
168
169
  exports.makeArtifactProgress = makeArtifactProgress;
@@ -1,3 +1,5 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import type { ProviderSpecifics } from '@remotion/serverless';
3
+ import type { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const RENDER_COMMAND = "render";
3
- export declare const renderCommand: (args: string[], remotionRoot: string, logLevel: LogLevel) => Promise<never>;
5
+ export declare const renderCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<never>;
@@ -28,7 +28,7 @@ const log_1 = require("../../log");
28
28
  const progress_1 = require("./progress");
29
29
  exports.RENDER_COMMAND = 'render';
30
30
  const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, mutedOption, colorSpaceOption, deleteAfterOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, overwriteOption, binariesDirectoryOption, preferLosslessOption, } = client_1.BrowserSafeApis.options;
31
- const renderCommand = async (args, remotionRoot, logLevel) => {
31
+ const renderCommand = async (args, remotionRoot, logLevel, implementation) => {
32
32
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
33
33
  const serveUrl = args[0];
34
34
  if (!serveUrl) {
@@ -310,7 +310,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
310
310
  let downloadOrNothing;
311
311
  if (downloadName) {
312
312
  const downloadStart = Date.now();
313
- const download = await (0, download_media_1.downloadMedia)({
313
+ const download = await (0, download_media_1.internalDownloadMedia)({
314
314
  bucketName: res.bucketName,
315
315
  outPath: downloadName,
316
316
  region: (0, get_aws_region_1.getAwsRegion)(),
@@ -326,6 +326,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
326
326
  overall: newStatus,
327
327
  }), false);
328
328
  },
329
+ providerSpecifics: implementation,
329
330
  });
330
331
  downloadOrNothing = download;
331
332
  progressBar.update((0, progress_1.makeProgressString)({
@@ -1,3 +1,5 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import type { ProviderSpecifics } from '@remotion/serverless';
3
+ import type { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const SITES_CREATE_SUBCOMMAND = "create";
3
- export declare const sitesCreateSubcommand: (args: string[], remotionRoot: string, logLevel: LogLevel) => Promise<void>;
5
+ export declare const sitesCreateSubcommand: (args: string[], remotionRoot: string, logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<void>;
@@ -4,11 +4,10 @@ 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
8
  const no_react_1 = require("remotion/no-react");
8
- const get_or_create_bucket_1 = require("../../../api/get-or-create-bucket");
9
9
  const internals_1 = require("../../../internals");
10
10
  const constants_1 = require("../../../shared/constants");
11
- const random_hash_1 = require("../../../shared/random-hash");
12
11
  const validate_site_name_1 = require("../../../shared/validate-site-name");
13
12
  const args_1 = require("../../args");
14
13
  const get_aws_region_1 = require("../../get-aws-region");
@@ -17,7 +16,7 @@ const quit_1 = require("../../helpers/quit");
17
16
  const log_1 = require("../../log");
18
17
  exports.SITES_CREATE_SUBCOMMAND = 'create';
19
18
  const { folderExpiryOption, publicDirOption, throwIfSiteExistsOption, disableGitSourceOption, } = client_1.BrowserSafeApis.options;
20
- const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
19
+ const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementation) => {
21
20
  var _a, _b, _c, _d;
22
21
  const { file, reason } = cli_1.CliInternals.findEntryPoint({
23
22
  args,
@@ -72,10 +71,11 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
72
71
  commandLine: cli_1.CliInternals.parsedCli,
73
72
  }).value;
74
73
  const cliBucketName = (_b = args_1.parsedLambdaCli['force-bucket-name']) !== null && _b !== void 0 ? _b : null;
75
- const bucketName = cliBucketName !== null && cliBucketName !== void 0 ? cliBucketName : (await (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
74
+ const bucketName = cliBucketName !== null && cliBucketName !== void 0 ? cliBucketName : (await (0, client_2.internalGetOrCreateBucket)({
76
75
  region: (0, get_aws_region_1.getAwsRegion)(),
77
76
  enableFolderExpiry,
78
77
  customCredentials: null,
78
+ providerSpecifics: implementation,
79
79
  })).bucketName;
80
80
  multiProgress.bucketProgress.doneIn = Date.now() - bucketStart;
81
81
  updateProgress(false);
@@ -93,7 +93,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
93
93
  const gitSource = cli_1.CliInternals.getGitSource({ remotionRoot, disableGitSource });
94
94
  const { serveUrl, siteName, stats } = await internals_1.LambdaInternals.internalDeploySite({
95
95
  entryPoint: file,
96
- siteName: desiredSiteName !== null && desiredSiteName !== void 0 ? desiredSiteName : (0, random_hash_1.randomHash)(),
96
+ siteName: desiredSiteName !== null && desiredSiteName !== void 0 ? desiredSiteName : implementation.randomHash(),
97
97
  bucketName,
98
98
  options: {
99
99
  publicDir,
@@ -127,6 +127,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
127
127
  indent: false,
128
128
  logLevel,
129
129
  throwIfSiteExists,
130
+ providerSpecifics: implementation,
130
131
  });
131
132
  const uploadDuration = Date.now() - uploadStart;
132
133
  multiProgress.deployProgress = {
@@ -1,3 +1,5 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import type { ProviderSpecifics } from '@remotion/serverless';
3
+ import type { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const SITES_COMMAND = "sites";
3
- export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel) => Promise<void> | undefined;
5
+ export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<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) => {
29
+ const sitesCommand = (args, remotionRoot, logLevel, implementation) => {
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);
34
+ return (0, rm_1.sitesRmSubcommand)(args.slice(1), logLevel, implementation);
35
35
  }
36
36
  if (args[0] === rmall_1.SITES_RMALL_COMMAND) {
37
- return (0, rmall_1.sitesRmallSubcommand)(logLevel);
37
+ return (0, rmall_1.sitesRmallSubcommand)(logLevel, implementation);
38
38
  }
39
39
  if (args[0] === create_1.SITES_CREATE_SUBCOMMAND) {
40
- return (0, create_1.sitesCreateSubcommand)(args.slice(1), remotionRoot, logLevel);
40
+ return (0, create_1.sitesCreateSubcommand)(args.slice(1), remotionRoot, logLevel, implementation);
41
41
  }
42
42
  if (args[0]) {
43
43
  cli_1.CliInternals.Log.error({ indent: false, logLevel }, `Subcommand ${args[0]} not found.`);
@@ -1,3 +1,5 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import type { ProviderSpecifics } from '@remotion/serverless';
3
+ import type { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const SITES_RM_COMMAND = "rm";
3
- export declare const sitesRmSubcommand: (args: string[], logLevel: LogLevel) => Promise<undefined>;
5
+ export declare const sitesRmSubcommand: (args: string[], logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<undefined>;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sitesRmSubcommand = exports.SITES_RM_COMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
+ const client_1 = require("@remotion/serverless/client");
5
6
  const delete_site_1 = require("../../../api/delete-site");
6
- const get_or_create_bucket_1 = require("../../../api/get-or-create-bucket");
7
7
  const get_sites_1 = require("../../../api/get-sites");
8
8
  const args_1 = require("../../args");
9
9
  const get_aws_region_1 = require("../../get-aws-region");
@@ -11,7 +11,7 @@ const confirm_1 = require("../../helpers/confirm");
11
11
  const quit_1 = require("../../helpers/quit");
12
12
  const log_1 = require("../../log");
13
13
  exports.SITES_RM_COMMAND = 'rm';
14
- const sitesRmSubcommand = async (args, logLevel) => {
14
+ const sitesRmSubcommand = async (args, logLevel, implementation) => {
15
15
  var _a;
16
16
  if (args.length === 0) {
17
17
  log_1.Log.error({ indent: false, logLevel }, 'No site name was passed. Run the command again and pass another argument <site-name>.');
@@ -26,10 +26,11 @@ const sitesRmSubcommand = async (args, logLevel) => {
26
26
  region,
27
27
  forceBucketName: args_1.parsedLambdaCli['force-bucket-name'],
28
28
  });
29
- const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
29
+ const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, client_1.internalGetOrCreateBucket)({
30
30
  region,
31
31
  enableFolderExpiry: false,
32
32
  customCredentials: null,
33
+ providerSpecifics: implementation,
33
34
  })).bucketName;
34
35
  for (const siteName of args) {
35
36
  const site = deployedSites.sites.find((s) => s.id === siteName.trim());
@@ -1,3 +1,5 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import type { ProviderSpecifics } from '@remotion/serverless';
3
+ import type { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const SITES_RMALL_COMMAND = "rmall";
3
- export declare const sitesRmallSubcommand: (logLevel: LogLevel) => Promise<void>;
5
+ export declare const sitesRmallSubcommand: (logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<void>;
@@ -2,24 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sitesRmallSubcommand = exports.SITES_RMALL_COMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
+ const client_1 = require("@remotion/serverless/client");
5
6
  const delete_site_1 = require("../../../api/delete-site");
6
- const get_or_create_bucket_1 = require("../../../api/get-or-create-bucket");
7
7
  const get_sites_1 = require("../../../api/get-sites");
8
8
  const args_1 = require("../../args");
9
9
  const get_aws_region_1 = require("../../get-aws-region");
10
10
  const confirm_1 = require("../../helpers/confirm");
11
11
  const log_1 = require("../../log");
12
12
  exports.SITES_RMALL_COMMAND = 'rmall';
13
- const sitesRmallSubcommand = async (logLevel) => {
13
+ const sitesRmallSubcommand = async (logLevel, implementation) => {
14
14
  var _a;
15
15
  const region = (0, get_aws_region_1.getAwsRegion)();
16
16
  const deployedSites = await (0, get_sites_1.getSites)({
17
17
  region,
18
18
  });
19
- const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
19
+ const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, client_1.internalGetOrCreateBucket)({
20
20
  region,
21
21
  enableFolderExpiry: false,
22
22
  customCredentials: null,
23
+ providerSpecifics: implementation,
23
24
  })).bucketName;
24
25
  for (const site of deployedSites.sites) {
25
26
  if (!(await (0, confirm_1.confirmCli)({
@@ -1,3 +1,5 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import type { ProviderSpecifics } from '@remotion/serverless';
3
+ import type { AwsProvider } from '../../functions/aws-implementation';
2
4
  export declare const STILL_COMMAND = "still";
3
- export declare const stillCommand: (args: string[], remotionRoot: string, logLevel: LogLevel) => Promise<void>;
5
+ export declare const stillCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<void>;
@@ -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) => {
29
+ const stillCommand = async (args, remotionRoot, logLevel, implementation) => {
30
30
  var _a, _b, _c, _d, _e;
31
31
  const serveUrl = args[0];
32
32
  if (!serveUrl) {
@@ -187,12 +187,13 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
187
187
  text: res.outKey,
188
188
  })), chalk.gray(formatBytes(res.sizeInBytes)));
189
189
  if (downloadName) {
190
- const { outputPath, sizeInBytes } = await (0, download_media_1.downloadMedia)({
190
+ const { outputPath, sizeInBytes } = await (0, download_media_1.internalDownloadMedia)({
191
191
  bucketName: res.bucketName,
192
192
  outPath: downloadName,
193
193
  region,
194
194
  renderId: res.renderId,
195
195
  logLevel,
196
+ providerSpecifics: implementation,
196
197
  });
197
198
  const relativePath = path_1.default.relative(process.cwd(), outputPath);
198
199
  log_1.Log.info({ indent: false, logLevel }, chalk.blue('↓'.padEnd(cli_1.CliInternals.LABEL_WIDTH)), chalk.blue(cli_1.CliInternals.makeHyperlink({
@@ -1,2 +1,2 @@
1
- import type { AwsRegion } from '../pricing/aws-regions';
1
+ import type { AwsRegion } from '../regions';
2
2
  export declare const getAwsRegion: () => AwsRegion;