@remotion/lambda 4.0.244 → 4.0.246

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 (258) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/admin/make-layer-public.js +10 -11
  3. package/dist/api/app-router-webhook.d.ts +10 -0
  4. package/dist/api/app-router-webhook.js +43 -0
  5. package/dist/api/create-function.d.ts +1 -2
  6. package/dist/api/create-function.js +10 -10
  7. package/dist/api/delete-function.d.ts +4 -13
  8. package/dist/api/delete-function.js +2 -5
  9. package/dist/api/delete-render.d.ts +0 -8
  10. package/dist/api/delete-render.js +4 -10
  11. package/dist/api/delete-site.d.ts +0 -10
  12. package/dist/api/delete-site.js +4 -11
  13. package/dist/api/deploy-function.d.ts +8 -15
  14. package/dist/api/deploy-function.js +21 -27
  15. package/dist/api/deploy-site.d.ts +2 -11
  16. package/dist/api/deploy-site.js +14 -22
  17. package/dist/api/download-media.d.ts +0 -11
  18. package/dist/api/download-media.js +3 -12
  19. package/dist/api/estimate-price.d.ts +0 -6
  20. package/dist/api/estimate-price.js +1 -3
  21. package/dist/api/get-aws-client.d.ts +1 -9
  22. package/dist/api/get-aws-client.js +2 -6
  23. package/dist/api/get-compositions-on-lambda.d.ts +1 -14
  24. package/dist/api/get-compositions-on-lambda.js +12 -17
  25. package/dist/api/get-function-info.d.ts +1 -14
  26. package/dist/api/get-function-info.js +2 -5
  27. package/dist/api/get-functions.d.ts +1 -8
  28. package/dist/api/get-functions.js +2 -5
  29. package/dist/api/get-or-create-bucket.d.ts +0 -6
  30. package/dist/api/get-or-create-bucket.js +3 -5
  31. package/dist/api/get-regions.d.ts +0 -5
  32. package/dist/api/get-regions.js +3 -4
  33. package/dist/api/get-render-progress.d.ts +0 -10
  34. package/dist/api/get-render-progress.js +3 -11
  35. package/dist/api/get-sites.d.ts +0 -6
  36. package/dist/api/get-sites.js +4 -7
  37. package/dist/api/iam-validation/simulate.d.ts +0 -7
  38. package/dist/api/iam-validation/simulate.js +2 -5
  39. package/dist/api/iam-validation/suggested-policy.d.ts +0 -10
  40. package/dist/api/iam-validation/suggested-policy.js +2 -4
  41. package/dist/api/make-lambda-payload.d.ts +2 -1
  42. package/dist/api/make-lambda-payload.js +19 -13
  43. package/dist/api/pages-router-webhook.d.ts +3 -0
  44. package/dist/api/pages-router-webhook.js +47 -0
  45. package/dist/api/presign-url.d.ts +0 -10
  46. package/dist/api/presign-url.js +2 -8
  47. package/dist/api/render-media-on-lambda.d.ts +1 -20
  48. package/dist/api/render-media-on-lambda.js +4 -19
  49. package/dist/api/render-still-on-lambda.d.ts +2 -19
  50. package/dist/api/render-still-on-lambda.js +6 -17
  51. package/dist/api/speculate-function-name.d.ts +0 -8
  52. package/dist/api/speculate-function-name.js +3 -7
  53. package/dist/api/upload-dir.d.ts +1 -7
  54. package/dist/api/upload-dir.js +1 -5
  55. package/dist/api/validate-webhook-signature.d.ts +0 -8
  56. package/dist/api/validate-webhook-signature.js +3 -7
  57. package/dist/cli/args.d.ts +2 -1
  58. package/dist/cli/commands/compositions/index.d.ts +7 -1
  59. package/dist/cli/commands/compositions/index.js +2 -2
  60. package/dist/cli/commands/functions/deploy.d.ts +7 -1
  61. package/dist/cli/commands/functions/deploy.js +7 -2
  62. package/dist/cli/commands/functions/index.d.ts +8 -1
  63. package/dist/cli/commands/functions/index.js +8 -4
  64. package/dist/cli/commands/functions/ls.d.ts +6 -1
  65. package/dist/cli/commands/functions/ls.js +2 -3
  66. package/dist/cli/commands/functions/rmall.d.ts +6 -1
  67. package/dist/cli/commands/functions/rmall.js +2 -3
  68. package/dist/cli/commands/render/render.d.ts +6 -1
  69. package/dist/cli/commands/render/render.js +9 -7
  70. package/dist/cli/commands/sites/create.js +2 -0
  71. package/dist/cli/commands/sites/index.d.ts +1 -1
  72. package/dist/cli/commands/sites/index.js +4 -4
  73. package/dist/cli/commands/still.d.ts +2 -2
  74. package/dist/cli/commands/still.js +5 -5
  75. package/dist/cli/get-aws-region.js +0 -4
  76. package/dist/cli/helpers/find-function-name.d.ts +6 -1
  77. package/dist/cli/helpers/find-function-name.js +4 -5
  78. package/dist/cli/index.d.ts +2 -2
  79. package/dist/cli/index.js +36 -16
  80. package/dist/client.d.ts +17 -22
  81. package/dist/client.js +17 -13
  82. package/dist/functions/aws-implementation.d.ts +13 -1
  83. package/dist/functions/aws-implementation.js +46 -0
  84. package/dist/functions/aws-server-implementation.d.ts +2 -0
  85. package/dist/functions/aws-server-implementation.js +25 -0
  86. package/dist/functions/full-client-implementation.d.ts +3 -0
  87. package/dist/functions/full-client-implementation.js +16 -0
  88. package/dist/functions/helpers/clean-tmpdir.js +1 -3
  89. package/dist/functions/helpers/get-current-region.js +0 -4
  90. package/dist/functions/helpers/get-output-url-from-metadata.d.ts +3 -7
  91. package/dist/functions/helpers/get-output-url-from-metadata.js +1 -1
  92. package/dist/functions/helpers/lifecycle.d.ts +4 -2
  93. package/dist/functions/helpers/lifecycle.js +3 -18
  94. package/dist/functions/helpers/timer.d.ts +2 -4
  95. package/dist/functions/http-client.d.ts +7 -0
  96. package/dist/functions/http-client.js +22 -0
  97. package/dist/functions/index.d.ts +1 -8
  98. package/dist/functions/index.js +12 -235
  99. package/dist/index.d.ts +6 -6
  100. package/dist/index.js +27 -6
  101. package/dist/internals.d.ts +6 -5
  102. package/dist/pricing/price-per-1-s.js +102 -0
  103. package/dist/regions.d.ts +1 -1
  104. package/dist/regions.js +3 -0
  105. package/dist/shared/call-lambda-async.d.ts +3 -0
  106. package/dist/shared/call-lambda-async.js +20 -0
  107. package/dist/shared/call-lambda-streaming.d.ts +7 -0
  108. package/dist/shared/{call-lambda.js → call-lambda-streaming.js} +36 -61
  109. package/dist/shared/call-lambda-sync.d.ts +3 -0
  110. package/dist/shared/call-lambda-sync.js +30 -0
  111. package/dist/shared/check-credentials.js +2 -3
  112. package/dist/shared/constants.d.ts +2 -91
  113. package/dist/shared/constants.js +1 -8
  114. package/dist/shared/convert-to-serve-url.js +2 -2
  115. package/dist/shared/get-account-id.d.ts +3 -4
  116. package/dist/shared/get-account-id.js +3 -3
  117. package/dist/shared/get-aws-urls.d.ts +4 -8
  118. package/dist/shared/get-aws-urls.js +1 -1
  119. package/dist/shared/get-function-version.js +4 -4
  120. package/dist/shared/get-layers.d.ts +1 -2
  121. package/dist/shared/get-layers.js +2 -4
  122. package/dist/shared/get-s3-operations.d.ts +4 -1
  123. package/dist/shared/get-s3-operations.js +2 -3
  124. package/dist/shared/get-service-client.js +2 -2
  125. package/dist/shared/hosted-layers.d.ts +0 -1
  126. package/dist/shared/hosted-layers.js +139 -537
  127. package/dist/shared/lambda-insights-extensions.d.ts +1 -1
  128. package/dist/shared/lambda-insights-extensions.js +3 -0
  129. package/dist/shared/read-dir.d.ts +2 -10
  130. package/dist/shared/read-dir.js +5 -4
  131. package/dist/shared/validate-aws-region.js +1 -1
  132. package/dist/shared/validate-bucketname.d.ts +1 -1
  133. package/package.json +15 -15
  134. package/remotionlambda-arm64.zip +0 -0
  135. package/dist/api/__mocks__/clean-items.d.ts +0 -2
  136. package/dist/api/__mocks__/clean-items.js +0 -24
  137. package/dist/api/__mocks__/create-function.d.ts +0 -2
  138. package/dist/api/__mocks__/create-function.js +0 -21
  139. package/dist/api/__mocks__/delete-function.d.ts +0 -2
  140. package/dist/api/__mocks__/delete-function.js +0 -9
  141. package/dist/api/__mocks__/get-functions.d.ts +0 -2
  142. package/dist/api/__mocks__/get-functions.js +0 -9
  143. package/dist/api/__mocks__/upload-dir.d.ts +0 -3
  144. package/dist/api/__mocks__/upload-dir.js +0 -47
  145. package/dist/api/mock-functions.d.ts +0 -18
  146. package/dist/api/mock-functions.js +0 -36
  147. package/dist/cli/helpers/__mocks__/quit.d.ts +0 -1
  148. package/dist/cli/helpers/__mocks__/quit.js +0 -7
  149. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +0 -7
  150. package/dist/functions/chunk-optimization/plan-frame-ranges.js +0 -17
  151. package/dist/functions/chunk-optimization/types.d.ts +0 -8
  152. package/dist/functions/chunk-optimization/types.js +0 -2
  153. package/dist/functions/helpers/__mocks__/get-browser-instance.d.ts +0 -3
  154. package/dist/functions/helpers/__mocks__/get-browser-instance.js +0 -12
  155. package/dist/functions/helpers/__mocks__/leak-detection.d.ts +0 -4
  156. package/dist/functions/helpers/__mocks__/leak-detection.js +0 -9
  157. package/dist/functions/helpers/__mocks__/timer.d.ts +0 -2
  158. package/dist/functions/helpers/__mocks__/timer.js +0 -10
  159. package/dist/functions/helpers/best-frames-per-lambda-param.d.ts +0 -1
  160. package/dist/functions/helpers/best-frames-per-lambda-param.js +0 -17
  161. package/dist/functions/helpers/calculate-chunk-times.d.ts +0 -5
  162. package/dist/functions/helpers/calculate-chunk-times.js +0 -29
  163. package/dist/functions/helpers/calculate-price-from-bucket.d.ts +0 -15
  164. package/dist/functions/helpers/calculate-price-from-bucket.js +0 -30
  165. package/dist/functions/helpers/can-concat-seamlessly.d.ts +0 -3
  166. package/dist/functions/helpers/can-concat-seamlessly.js +0 -17
  167. package/dist/functions/helpers/cleanup-props.d.ts +0 -8
  168. package/dist/functions/helpers/cleanup-props.js +0 -23
  169. package/dist/functions/helpers/concat-videos.d.ts +0 -23
  170. package/dist/functions/helpers/concat-videos.js +0 -54
  171. package/dist/functions/helpers/create-post-render-data.d.ts +0 -17
  172. package/dist/functions/helpers/create-post-render-data.js +0 -67
  173. package/dist/functions/helpers/find-output-file-in-bucket.d.ts +0 -14
  174. package/dist/functions/helpers/find-output-file-in-bucket.js +0 -38
  175. package/dist/functions/helpers/format-costs-info.d.ts +0 -2
  176. package/dist/functions/helpers/format-costs-info.js +0 -23
  177. package/dist/functions/helpers/get-overall-progress-s3.d.ts +0 -10
  178. package/dist/functions/helpers/get-overall-progress-s3.js +0 -24
  179. package/dist/functions/helpers/get-overall-progress.d.ts +0 -9
  180. package/dist/functions/helpers/get-overall-progress.js +0 -23
  181. package/dist/functions/helpers/get-progress.d.ts +0 -15
  182. package/dist/functions/helpers/get-progress.js +0 -254
  183. package/dist/functions/helpers/get-retry-stats.d.ts +0 -5
  184. package/dist/functions/helpers/get-retry-stats.js +0 -2
  185. package/dist/functions/helpers/inspect-errors.d.ts +0 -4
  186. package/dist/functions/helpers/inspect-errors.js +0 -39
  187. package/dist/functions/helpers/is-warm.d.ts +0 -2
  188. package/dist/functions/helpers/is-warm.js +0 -10
  189. package/dist/functions/helpers/leak-detection.d.ts +0 -4
  190. package/dist/functions/helpers/leak-detection.js +0 -40
  191. package/dist/functions/helpers/make-timeout-error.d.ts +0 -10
  192. package/dist/functions/helpers/make-timeout-error.js +0 -31
  193. package/dist/functions/helpers/make-timeout-message.d.ts +0 -10
  194. package/dist/functions/helpers/make-timeout-message.js +0 -75
  195. package/dist/functions/helpers/merge-chunks.d.ts +0 -36
  196. package/dist/functions/helpers/merge-chunks.js +0 -84
  197. package/dist/functions/helpers/min-max.d.ts +0 -2
  198. package/dist/functions/helpers/min-max.js +0 -33
  199. package/dist/functions/helpers/on-downloads-logger.d.ts +0 -2
  200. package/dist/functions/helpers/on-downloads-logger.js +0 -29
  201. package/dist/functions/helpers/overall-render-progress.d.ts +0 -59
  202. package/dist/functions/helpers/overall-render-progress.js +0 -180
  203. package/dist/functions/helpers/print-concurrency-curve.d.ts +0 -1
  204. package/dist/functions/helpers/print-concurrency-curve.js +0 -8
  205. package/dist/functions/helpers/print-logging-helper.d.ts +0 -4
  206. package/dist/functions/helpers/print-logging-helper.js +0 -12
  207. package/dist/functions/helpers/render-has-audio-video.d.ts +0 -6
  208. package/dist/functions/helpers/render-has-audio-video.js +0 -21
  209. package/dist/functions/helpers/request-context.d.ts +0 -5
  210. package/dist/functions/helpers/request-context.js +0 -2
  211. package/dist/functions/helpers/stream-renderer.d.ts +0 -17
  212. package/dist/functions/helpers/stream-renderer.js +0 -148
  213. package/dist/functions/launch.d.ts +0 -10
  214. package/dist/functions/launch.js +0 -596
  215. package/dist/functions/progress.d.ts +0 -11
  216. package/dist/functions/progress.js +0 -51
  217. package/dist/functions/renderer.d.ts +0 -17
  218. package/dist/functions/renderer.js +0 -341
  219. package/dist/functions/start.d.ts +0 -13
  220. package/dist/functions/start.js +0 -113
  221. package/dist/functions/still.d.ts +0 -19
  222. package/dist/functions/still.js +0 -330
  223. package/dist/shared/__mocks__/aws-clients.d.ts +0 -2
  224. package/dist/shared/__mocks__/aws-clients.js +0 -62
  225. package/dist/shared/__mocks__/bundle-site.d.ts +0 -2
  226. package/dist/shared/__mocks__/bundle-site.js +0 -32
  227. package/dist/shared/__mocks__/check-credentials.d.ts +0 -1
  228. package/dist/shared/__mocks__/check-credentials.js +0 -5
  229. package/dist/shared/__mocks__/get-account-id.d.ts +0 -2
  230. package/dist/shared/__mocks__/get-account-id.js +0 -11
  231. package/dist/shared/__mocks__/read-dir.d.ts +0 -2
  232. package/dist/shared/__mocks__/read-dir.js +0 -13
  233. package/dist/shared/call-lambda.d.ts +0 -16
  234. package/dist/shared/cleanup-serialized-input-props.d.ts +0 -14
  235. package/dist/shared/cleanup-serialized-input-props.js +0 -34
  236. package/dist/shared/docs-url.d.ts +0 -1
  237. package/dist/shared/docs-url.js +0 -4
  238. package/dist/shared/get-most-expensive-chunks.d.ts +0 -8
  239. package/dist/shared/get-most-expensive-chunks.js +0 -28
  240. package/dist/shared/invoke-webhook.d.ts +0 -48
  241. package/dist/shared/invoke-webhook.js +0 -140
  242. package/dist/shared/parse-lambda-timings-key.d.ts +0 -5
  243. package/dist/shared/parse-lambda-timings-key.js +0 -2
  244. package/dist/shared/return-values.d.ts +0 -16
  245. package/dist/shared/return-values.js +0 -2
  246. package/dist/shared/stackback.d.ts +0 -6
  247. package/dist/shared/stackback.js +0 -59
  248. package/dist/shared/validate-download-behavior.d.ts +0 -1
  249. package/dist/shared/validate-download-behavior.js +0 -21
  250. package/dist/shared/validate-frames-per-lambda.d.ts +0 -4
  251. package/dist/shared/validate-frames-per-lambda.js +0 -29
  252. package/dist/shared/validate-privacy.d.ts +0 -2
  253. package/dist/shared/validate-privacy.js +0 -14
  254. package/dist/shared/validate.d.ts +0 -4
  255. package/dist/shared/validate.js +0 -8
  256. package/dist/shared/why-is-node-running.d.ts +0 -15
  257. package/dist/shared/why-is-node-running.js +0 -88
  258. package/vitest.config.mts +0 -11
@@ -42,15 +42,9 @@ const internalPresignUrl = async ({ region, bucketName, objectKey, checkIfObject
42
42
  });
43
43
  return publicUrl;
44
44
  };
45
- /**
46
- * @description Returns a public url of an object stored in Remotion's S3 bucket.
45
+ /*
46
+ * @description Takes a private S3 object and turns it into a public URL by signing it with your AWS credentials.
47
47
  * @see [Documentation](https://remotion.dev/docs/lambda/presignurl)
48
- * @param {AwsRegion} params.region The region in which the S3 bucket resides in.
49
- * @param {string} params.bucketName The name of the bucket to fetch the object from.
50
- * @param {string} params.objectKey Key of the S3 object to get.
51
- * @param {string} params.expiresIn The number of seconds before the presigned URL expires. Default 120.
52
- * @param {boolean} params.checkIfObjectExists Whether the function should check if the object exists in the bucket before generating the presigned url.
53
- * @returns {Promise<string | null>} The public url of an object or `null` if `checkIfObjectExists=true` & object does not exist.
54
48
  */
55
49
  const presignUrl = ({ region, bucketName, objectKey, checkIfObjectExists, expiresInSeconds, forcePathStyle, }) => {
56
50
  return internalPresignUrl({
@@ -1,7 +1,7 @@
1
1
  import type { AudioCodec, ChromiumOptions, FrameRange, PixelFormat, ProResProfile, ToOptions, VideoImageFormat } from '@remotion/renderer';
2
2
  import type { BrowserSafeApis } from '@remotion/renderer/client';
3
3
  import type { DownloadBehavior, OutNameInput, Privacy, ServerlessCodec, WebhookOption } from '@remotion/serverless/client';
4
- import type { AwsProvider } from '../functions/aws-implementation';
4
+ import { type AwsProvider } from '../functions/aws-implementation';
5
5
  import type { AwsRegion } from '../regions';
6
6
  import type { InnerRenderMediaOnLambdaInput } from './make-lambda-payload';
7
7
  export type RenderMediaOnLambdaInput = {
@@ -56,25 +56,6 @@ export type RenderMediaOnLambdaOutput = {
56
56
  };
57
57
  export declare const internalRenderMediaOnLambdaRaw: (input: InnerRenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
58
58
  export declare const renderMediaOnLambdaOptionalToRequired: (options: RenderMediaOnLambdaInput) => InnerRenderMediaOnLambdaInput;
59
- /**
60
- * @description Triggers a render on a lambda given a composition and a lambda function.
61
- * @see [Documentation](https://remotion.dev/docs/lambda/rendermediaonlambda)
62
- * @param params.functionName The name of the Lambda function that should be used
63
- * @param params.serveUrl The URL of the deployed project
64
- * @param params.composition The ID of the composition which should be rendered.
65
- * @param params.inputProps The input props that should be passed to the composition.
66
- * @param params.codec The media codec which should be used for encoding.
67
- * @param params.imageFormat In which image format the frames should be rendered. Default "jpeg"
68
- * @param params.crf The constant rate factor to be used during encoding.
69
- * @param params.envVariables Object containing environment variables to be inserted into the video environment
70
- * @param params.proResProfile The ProRes profile if rendering a ProRes video
71
- * @param params.jpegQuality JPEG quality if JPEG was selected as the image format.
72
- * @param params.region The AWS region in which the media should be rendered.
73
- * @param params.maxRetries How often rendering a chunk may fail before the media render gets aborted. Default "1"
74
- * @param params.logLevel Level of logging that Lambda function should perform. Default "info".
75
- * @param params.webhook Configuration for webhook called upon completion or timeout of the render.
76
- * @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
77
- */
78
59
  export declare const renderMediaOnLambda: (options: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
79
60
  /**
80
61
  * @deprecated Renamed to renderMediaOnLambda()
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderVideoOnLambda = exports.renderMediaOnLambda = exports.renderMediaOnLambdaOptionalToRequired = exports.internalRenderMediaOnLambdaRaw = void 0;
4
4
  const error_handling_1 = require("@remotion/renderer/error-handling");
5
5
  const client_1 = require("@remotion/serverless/client");
6
- const call_lambda_1 = require("../shared/call-lambda");
6
+ const aws_implementation_1 = require("../functions/aws-implementation");
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) => {
10
10
  var _a;
11
11
  const { functionName, region, rendererFunctionName } = input;
12
12
  try {
13
- const res = await (0, call_lambda_1.callLambda)({
13
+ const res = await aws_implementation_1.awsImplementation.callFunctionSync({
14
14
  functionName,
15
15
  type: client_1.ServerlessRoutines.start,
16
16
  payload: await (0, make_lambda_payload_1.makeLambdaRenderMediaPayload)(input),
@@ -110,24 +110,9 @@ const renderMediaOnLambdaOptionalToRequired = (options) => {
110
110
  };
111
111
  exports.renderMediaOnLambdaOptionalToRequired = renderMediaOnLambdaOptionalToRequired;
112
112
  const wrapped = (0, error_handling_1.wrapWithErrorHandling)(exports.internalRenderMediaOnLambdaRaw);
113
- /**
114
- * @description Triggers a render on a lambda given a composition and a lambda function.
113
+ /*
114
+ * @description Kicks off a render process on Remotion Lambda. The progress can be tracked using getRenderProgress().
115
115
  * @see [Documentation](https://remotion.dev/docs/lambda/rendermediaonlambda)
116
- * @param params.functionName The name of the Lambda function that should be used
117
- * @param params.serveUrl The URL of the deployed project
118
- * @param params.composition The ID of the composition which should be rendered.
119
- * @param params.inputProps The input props that should be passed to the composition.
120
- * @param params.codec The media codec which should be used for encoding.
121
- * @param params.imageFormat In which image format the frames should be rendered. Default "jpeg"
122
- * @param params.crf The constant rate factor to be used during encoding.
123
- * @param params.envVariables Object containing environment variables to be inserted into the video environment
124
- * @param params.proResProfile The ProRes profile if rendering a ProRes video
125
- * @param params.jpegQuality JPEG quality if JPEG was selected as the image format.
126
- * @param params.region The AWS region in which the media should be rendered.
127
- * @param params.maxRetries How often rendering a chunk may fail before the media render gets aborted. Default "1"
128
- * @param params.logLevel Level of logging that Lambda function should perform. Default "info".
129
- * @param params.webhook Configuration for webhook called upon completion or timeout of the render.
130
- * @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
131
116
  */
132
117
  const renderMediaOnLambda = (options) => {
133
118
  if (options.quality) {
@@ -1,11 +1,10 @@
1
1
  import type { ChromiumOptions, StillImageFormat, ToOptions } from '@remotion/renderer';
2
2
  import type { BrowserSafeApis } from '@remotion/renderer/client';
3
3
  import type { DownloadBehavior } from '@remotion/serverless/client';
4
- import type { ReceivedArtifact } from '@remotion/serverless';
4
+ import type { CostsInfo, ReceivedArtifact } from '@remotion/serverless';
5
5
  import type { OutNameInput, Privacy } from '@remotion/serverless/client';
6
- import type { AwsProvider } from '../functions/aws-implementation';
6
+ import { type AwsProvider } from '../functions/aws-implementation';
7
7
  import type { AwsRegion } from '../regions';
8
- import type { CostsInfo } from '../shared/constants';
9
8
  type MandatoryParameters = {
10
9
  region: AwsRegion;
11
10
  functionName: string;
@@ -53,21 +52,5 @@ export type RenderStillOnLambdaOutput = {
53
52
  cloudWatchLogs: string;
54
53
  artifacts: ReceivedArtifact<AwsProvider>[];
55
54
  };
56
- /**
57
- * @description Renders a still frame on Lambda
58
- * @link https://remotion.dev/docs/lambda/renderstillonlambda
59
- * @param params.functionName The name of the Lambda function that should be used
60
- * @param params.serveUrl The URL of the deployed project
61
- * @param params.composition The ID of the composition which should be rendered.
62
- * @param params.inputProps The input props that should be passed to the composition.
63
- * @param params.imageFormat In which image format the frames should be rendered.
64
- * @param params.envVariables Object containing environment variables to be inserted into the video environment
65
- * @param params.jpegQuality JPEG quality if JPEG was selected as the image format.
66
- * @param params.region The AWS region in which the video should be rendered.
67
- * @param params.maxRetries How often rendering a chunk may fail before the video render gets aborted.
68
- * @param params.frame Which frame should be used for the still image. Default 0.
69
- * @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
70
- * @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
71
- */
72
55
  export declare const renderStillOnLambda: (input: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
73
56
  export {};
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderStillOnLambda = void 0;
4
4
  const client_1 = require("@remotion/serverless/client");
5
- const call_lambda_1 = require("../shared/call-lambda");
6
5
  const error_handling_1 = require("@remotion/renderer/error-handling");
6
+ const aws_implementation_1 = require("../functions/aws-implementation");
7
7
  const constants_1 = require("../shared/constants");
8
8
  const get_aws_urls_1 = require("../shared/get-aws-urls");
9
9
  const make_lambda_payload_1 = require("./make-lambda-payload");
@@ -13,7 +13,8 @@ const internalRenderStillOnLambda = async (input) => {
13
13
  try {
14
14
  const payload = await (0, make_lambda_payload_1.makeLambdaRenderStillPayload)(input);
15
15
  const res = await new Promise((resolve, reject) => {
16
- (0, call_lambda_1.callLambdaWithStreaming)({
16
+ aws_implementation_1.awsImplementation
17
+ .callFunctionStreaming({
17
18
  functionName,
18
19
  type: client_1.ServerlessRoutines.still,
19
20
  payload,
@@ -77,21 +78,9 @@ const internalRenderStillOnLambda = async (input) => {
77
78
  }
78
79
  };
79
80
  const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(internalRenderStillOnLambda);
80
- /**
81
- * @description Renders a still frame on Lambda
82
- * @link https://remotion.dev/docs/lambda/renderstillonlambda
83
- * @param params.functionName The name of the Lambda function that should be used
84
- * @param params.serveUrl The URL of the deployed project
85
- * @param params.composition The ID of the composition which should be rendered.
86
- * @param params.inputProps The input props that should be passed to the composition.
87
- * @param params.imageFormat In which image format the frames should be rendered.
88
- * @param params.envVariables Object containing environment variables to be inserted into the video environment
89
- * @param params.jpegQuality JPEG quality if JPEG was selected as the image format.
90
- * @param params.region The AWS region in which the video should be rendered.
91
- * @param params.maxRetries How often rendering a chunk may fail before the video render gets aborted.
92
- * @param params.frame Which frame should be used for the still image. Default 0.
93
- * @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
94
- * @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
81
+ /*
82
+ * @description Renders a still image inside a lambda function and writes it to the specified output location.
83
+ * @see [Documentation](https://remotion.dev/docs/lambda/renderstillonlambda)
95
84
  */
96
85
  const renderStillOnLambda = (input) => {
97
86
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
@@ -3,12 +3,4 @@ export type SpeculateFunctionNameInput = {
3
3
  diskSizeInMb: string | number;
4
4
  timeoutInSeconds: string | number;
5
5
  };
6
- /**
7
- * @description Speculate the name of a lambda function that will be created when you call `deployFunction`, based on the function configuration.
8
- * @see [Documentation](https://www.remotion.dev/docs/lambda/speculatefunctionname)
9
- * @param params.memorySizeInMb How much memory is allocated to the Lambda function.
10
- * @param params.diskSizeInMb The amount of storage the function is allocated.
11
- * @param params.timeoutInSeconds Time in seconds until the function times out.
12
- * @returns {string} The speculated lambda function name
13
- */
14
6
  export declare const speculateFunctionName: ({ memorySizeInMb, diskSizeInMb, timeoutInSeconds, }: SpeculateFunctionNameInput) => string;
@@ -3,13 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.speculateFunctionName = void 0;
4
4
  const defaults_1 = require("../defaults");
5
5
  const lambda_version_string_1 = require("../shared/lambda-version-string");
6
- /**
7
- * @description Speculate the name of a lambda function that will be created when you call `deployFunction`, based on the function configuration.
8
- * @see [Documentation](https://www.remotion.dev/docs/lambda/speculatefunctionname)
9
- * @param params.memorySizeInMb How much memory is allocated to the Lambda function.
10
- * @param params.diskSizeInMb The amount of storage the function is allocated.
11
- * @param params.timeoutInSeconds Time in seconds until the function times out.
12
- * @returns {string} The speculated lambda function name
6
+ /*
7
+ * @description Speculate the name of the Lambda function that will be created by `deployFunction()` or its CLI equivalent, based on the function configuration.
8
+ * @see [Documentation](https://remotion.dev/docs/lambda/speculatefunctionname)
13
9
  */
14
10
  const speculateFunctionName = ({ memorySizeInMb, diskSizeInMb, timeoutInSeconds, }) => {
15
11
  // find-function-name.ts uses this for templating
@@ -1,16 +1,10 @@
1
+ import type { UploadDirProgress } from '@remotion/serverless';
1
2
  import type { Privacy } from '@remotion/serverless/client';
2
3
  import type { AwsRegion } from '../regions';
3
- export type UploadDirProgress = {
4
- totalFiles: number;
5
- filesUploaded: number;
6
- totalSize: number;
7
- sizeUploaded: number;
8
- };
9
4
  export type MockFile = {
10
5
  name: string;
11
6
  content: string;
12
7
  };
13
- export declare const getDirFiles: (entry: string) => MockFile[];
14
8
  export declare const uploadDir: ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, forcePathStyle, }: {
15
9
  bucket: string;
16
10
  region: AwsRegion;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.uploadDir = exports.getDirFiles = void 0;
6
+ exports.uploadDir = void 0;
7
7
  const lib_storage_1 = require("@aws-sdk/lib-storage");
8
8
  const mime_types_1 = __importDefault(require("mime-types"));
9
9
  const node_fs_1 = require("node:fs");
@@ -11,10 +11,6 @@ const node_path_1 = __importDefault(require("node:path"));
11
11
  const get_s3_client_1 = require("../shared/get-s3-client");
12
12
  const make_s3_key_1 = require("../shared/make-s3-key");
13
13
  const p_limit_1 = require("../shared/p-limit");
14
- const getDirFiles = (entry) => {
15
- throw new TypeError('should only be executed in test ' + JSON.stringify(entry));
16
- };
17
- exports.getDirFiles = getDirFiles;
18
14
  async function getFiles(directory, originalDirectory, toUpload) {
19
15
  const dirents = await node_fs_1.promises.readdir(directory, { withFileTypes: true });
20
16
  const _files = await Promise.all(dirents
@@ -1,11 +1,3 @@
1
- /**
2
- * @description Throws if the signature of the finish webhook is missing or inauthentic
3
- * @see [Documentation](https://remotion.dev/docs/lambda/validate-webhook-signature)
4
- * @param params.secret The secret used for signing the webhook
5
- * @param params.body The body that was received by the endpoint
6
- * @param params.signatureHeader The `X-Remotion-Signature` header
7
- * @returns {void}
8
- */
9
1
  export declare const validateWebhookSignature: ({ secret, body, signatureHeader, }: {
10
2
  secret: string;
11
3
  body: unknown;
@@ -1,13 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateWebhookSignature = void 0;
4
- /**
5
- * @description Throws if the signature of the finish webhook is missing or inauthentic
6
- * @see [Documentation](https://remotion.dev/docs/lambda/validate-webhook-signature)
7
- * @param params.secret The secret used for signing the webhook
8
- * @param params.body The body that was received by the endpoint
9
- * @param params.signatureHeader The `X-Remotion-Signature` header
10
- * @returns {void}
4
+ /*
5
+ * @description Validates that the signature received by a webhook endpoint is authentic. If validation fails, an error is thrown.
6
+ * @see [Documentation](https://remotion.dev/docs/lambda/validatewebhooksignature)
11
7
  */
12
8
  const validateWebhookSignature = ({ secret, body, signatureHeader, }) => {
13
9
  if (!secret) {
@@ -1,6 +1,7 @@
1
1
  import type { BrowserSafeApis } from '@remotion/renderer/client';
2
- import type { AwsRegion, DeleteAfter } from '../client';
2
+ import type { DeleteAfter } from '../client';
3
3
  import type { Privacy } from '@remotion/serverless/client';
4
+ import { AwsRegion } from '../regions';
4
5
  import type { RuntimePreference } from '../shared/get-layers';
5
6
  type LambdaCommandLineOptions = {
6
7
  help: boolean;
@@ -1,3 +1,9 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { ProviderSpecifics } from '@remotion/serverless';
3
+ import { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const COMPOSITIONS_COMMAND = "compositions";
3
- export declare const compositionsCommand: (args: string[], logLevel: LogLevel) => Promise<void>;
5
+ export declare const compositionsCommand: ({ args, logLevel, providerSpecifics, }: {
6
+ args: string[];
7
+ logLevel: LogLevel;
8
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
9
+ }) => Promise<void>;
@@ -13,7 +13,7 @@ const quit_1 = require("../../helpers/quit");
13
13
  const log_1 = require("../../log");
14
14
  exports.COMPOSITIONS_COMMAND = 'compositions';
15
15
  const { enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, } = client_1.BrowserSafeApis.options;
16
- const compositionsCommand = async (args, logLevel) => {
16
+ const compositionsCommand = async ({ args, logLevel, providerSpecifics, }) => {
17
17
  const serveUrl = args[0];
18
18
  if (!serveUrl) {
19
19
  log_1.Log.error({ indent: false, logLevel }, 'No serve URL passed.');
@@ -47,7 +47,7 @@ const compositionsCommand = async (args, logLevel) => {
47
47
  };
48
48
  const region = (0, get_aws_region_1.getAwsRegion)();
49
49
  (0, validate_serveurl_1.validateServeUrl)(serveUrl);
50
- const functionName = await (0, find_function_name_1.findFunctionName)(logLevel);
50
+ const functionName = await (0, find_function_name_1.findFunctionName)({ logLevel, providerSpecifics });
51
51
  const comps = await (0, __1.getCompositionsOnLambda)({
52
52
  functionName,
53
53
  serveUrl,
@@ -1,3 +1,9 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { FullClientSpecifics, ProviderSpecifics } from '@remotion/serverless';
3
+ import { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const FUNCTIONS_DEPLOY_SUBCOMMAND = "deploy";
3
- export declare const functionsDeploySubcommand: (logLevel: LogLevel) => Promise<void>;
5
+ export declare const functionsDeploySubcommand: ({ logLevel, providerSpecifics, fullClientSpecifics, }: {
6
+ logLevel: LogLevel;
7
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
8
+ fullClientSpecifics: FullClientSpecifics<AwsProvider>;
9
+ }) => Promise<void>;
@@ -13,8 +13,9 @@ const validate_vpc_security_group_ids_1 = require("../../../shared/validate-vpc-
13
13
  const validate_vpc_subnet_ids_1 = require("../../../shared/validate-vpc-subnet-ids");
14
14
  const args_1 = require("../../args");
15
15
  const get_aws_region_1 = require("../../get-aws-region");
16
+ const log_1 = require("../../log");
16
17
  exports.FUNCTIONS_DEPLOY_SUBCOMMAND = 'deploy';
17
- const functionsDeploySubcommand = async (logLevel) => {
18
+ const functionsDeploySubcommand = async ({ logLevel, providerSpecifics, fullClientSpecifics, }) => {
18
19
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19
20
  const region = (0, get_aws_region_1.getAwsRegion)();
20
21
  const timeoutInSeconds = (_a = args_1.parsedLambdaCli.timeout) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_TIMEOUT;
@@ -25,6 +26,9 @@ const functionsDeploySubcommand = async (logLevel) => {
25
26
  const enableLambdaInsights = (_e = args_1.parsedLambdaCli['enable-lambda-insights']) !== null && _e !== void 0 ? _e : false;
26
27
  const cloudWatchLogRetentionPeriodInDays = (_f = args_1.parsedLambdaCli['retention-period']) !== null && _f !== void 0 ? _f : constants_1.DEFAULT_CLOUDWATCH_RETENTION_PERIOD;
27
28
  const enableV5Runtime = (_g = args_1.parsedLambdaCli['enable-v5-runtime']) !== null && _g !== void 0 ? _g : undefined;
29
+ if (enableV5Runtime) {
30
+ log_1.Log.warn({ logLevel, indent: false }, `The --enable-v5-runtime flag is now enabled by default and has no function anymore.`);
31
+ }
28
32
  const vpcSubnetIds = (_h = args_1.parsedLambdaCli['vpc-subnet-ids']) !== null && _h !== void 0 ? _h : undefined;
29
33
  const vpcSecurityGroupIds = (_j = args_1.parsedLambdaCli['vpc-security-group-ids']) !== null && _j !== void 0 ? _j : undefined;
30
34
  const runtimePreference = (_k = args_1.parsedLambdaCli['runtime-preference']) !== null && _k !== void 0 ? _k : 'default';
@@ -70,12 +74,13 @@ VPC Security Group IDs = ${vpcSecurityGroupIds}
70
74
  diskSizeInMb,
71
75
  customRoleArn,
72
76
  enableLambdaInsights,
73
- enableV5Runtime,
74
77
  indent: false,
75
78
  logLevel,
76
79
  vpcSubnetIds,
77
80
  vpcSecurityGroupIds,
78
81
  runtimePreference,
82
+ providerSpecifics,
83
+ fullClientSpecifics,
79
84
  });
80
85
  if (cli_1.CliInternals.quietFlagProvided()) {
81
86
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, functionName);
@@ -1,3 +1,10 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { FullClientSpecifics, ProviderSpecifics } from '@remotion/serverless';
3
+ import { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const FUNCTIONS_COMMAND = "functions";
3
- export declare const functionsCommand: (args: string[], logLevel: LogLevel) => Promise<void> | undefined;
5
+ export declare const functionsCommand: ({ args, logLevel, fullClientSpecifics, providerSpecifics, }: {
6
+ args: string[];
7
+ logLevel: LogLevel;
8
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
9
+ fullClientSpecifics: FullClientSpecifics<AwsProvider>;
10
+ }) => Promise<void> | undefined;
@@ -26,18 +26,22 @@ const printFunctionsHelp = (logLevel) => {
26
26
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.FUNCTIONS_COMMAND} ${rmall_1.FUNCTIONS_RMALL_SUBCOMMAND}`);
27
27
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Delete all functions in selected region'));
28
28
  };
29
- const functionsCommand = (args, logLevel) => {
29
+ const functionsCommand = ({ args, logLevel, fullClientSpecifics, providerSpecifics, }) => {
30
30
  if (args[0] === ls_1.FUNCTIONS_LS_SUBCOMMAND) {
31
- return (0, ls_1.functionsLsCommand)(logLevel);
31
+ return (0, ls_1.functionsLsCommand)({ logLevel, providerSpecifics });
32
32
  }
33
33
  if (args[0] === rm_1.FUNCTIONS_RM_SUBCOMMAND) {
34
34
  return (0, rm_1.functionsRmCommand)(args.slice(1), logLevel);
35
35
  }
36
36
  if (args[0] === rmall_1.FUNCTIONS_RMALL_SUBCOMMAND) {
37
- return (0, rmall_1.functionsRmallCommand)(logLevel);
37
+ return (0, rmall_1.functionsRmallCommand)({ logLevel, providerSpecifics });
38
38
  }
39
39
  if (args[0] === deploy_1.FUNCTIONS_DEPLOY_SUBCOMMAND) {
40
- return (0, deploy_1.functionsDeploySubcommand)(logLevel);
40
+ return (0, deploy_1.functionsDeploySubcommand)({
41
+ logLevel,
42
+ fullClientSpecifics,
43
+ providerSpecifics,
44
+ });
41
45
  }
42
46
  if (args[0]) {
43
47
  cli_1.CliInternals.Log.error({ indent: false, logLevel }, `Subcommand ${args[0]} not found.`);
@@ -1,3 +1,8 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { ProviderSpecifics } from '@remotion/serverless';
3
+ import { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const FUNCTIONS_LS_SUBCOMMAND = "ls";
3
- export declare const functionsLsCommand: (logLevel: LogLevel) => Promise<void>;
5
+ export declare const functionsLsCommand: ({ logLevel, providerSpecifics, }: {
6
+ logLevel: LogLevel;
7
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
8
+ }) => Promise<void>;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.functionsLsCommand = exports.FUNCTIONS_LS_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
- const get_functions_1 = require("../../../api/get-functions");
6
5
  const args_1 = require("../../args");
7
6
  const get_aws_region_1 = require("../../get-aws-region");
8
7
  const NAME_COLS = 70;
@@ -11,7 +10,7 @@ const DISK_COLS = 15;
11
10
  const TIMEOUT_COLS = 15;
12
11
  const VERSION_COLS = 15;
13
12
  exports.FUNCTIONS_LS_SUBCOMMAND = 'ls';
14
- const functionsLsCommand = async (logLevel) => {
13
+ const functionsLsCommand = async ({ logLevel, providerSpecifics, }) => {
15
14
  const region = (0, get_aws_region_1.getAwsRegion)();
16
15
  const fetchingOutput = cli_1.CliInternals.createOverwriteableCliOutput({
17
16
  quiet: cli_1.CliInternals.quietFlagProvided(),
@@ -23,7 +22,7 @@ const functionsLsCommand = async (logLevel) => {
23
22
  });
24
23
  fetchingOutput.update('Getting functions...', false);
25
24
  const compatibleOnly = args_1.parsedLambdaCli['compatible-only'] || false;
26
- const functions = await (0, get_functions_1.getFunctions)({
25
+ const functions = await providerSpecifics.getFunctions({
27
26
  region,
28
27
  compatibleOnly,
29
28
  });
@@ -1,3 +1,8 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ import { ProviderSpecifics } from '@remotion/serverless';
3
+ import { AwsProvider } from '../../../functions/aws-implementation';
2
4
  export declare const FUNCTIONS_RMALL_SUBCOMMAND = "rmall";
3
- export declare const functionsRmallCommand: (logLevel: LogLevel) => Promise<void>;
5
+ export declare const functionsRmallCommand: ({ logLevel, providerSpecifics, }: {
6
+ logLevel: LogLevel;
7
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
8
+ }) => Promise<void>;
@@ -4,14 +4,13 @@ exports.functionsRmallCommand = exports.FUNCTIONS_RMALL_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
5
  const delete_function_1 = require("../../../api/delete-function");
6
6
  const get_function_info_1 = require("../../../api/get-function-info");
7
- const get_functions_1 = require("../../../api/get-functions");
8
7
  const get_aws_region_1 = require("../../get-aws-region");
9
8
  const confirm_1 = require("../../helpers/confirm");
10
9
  exports.FUNCTIONS_RMALL_SUBCOMMAND = 'rmall';
11
10
  const LEFT_COL = 16;
12
- const functionsRmallCommand = async (logLevel) => {
11
+ const functionsRmallCommand = async ({ logLevel, providerSpecifics, }) => {
13
12
  const region = (0, get_aws_region_1.getAwsRegion)();
14
- const functions = await (0, get_functions_1.getFunctions)({
13
+ const functions = await providerSpecifics.getFunctions({
15
14
  region,
16
15
  compatibleOnly: false,
17
16
  });
@@ -2,4 +2,9 @@ import type { LogLevel } from '@remotion/renderer';
2
2
  import type { ProviderSpecifics } from '@remotion/serverless';
3
3
  import type { AwsProvider } from '../../../functions/aws-implementation';
4
4
  export declare const RENDER_COMMAND = "render";
5
- export declare const renderCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<never>;
5
+ export declare const renderCommand: ({ args, remotionRoot, logLevel, providerSpecifics, }: {
6
+ args: string[];
7
+ remotionRoot: string;
8
+ logLevel: LogLevel;
9
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
10
+ }) => Promise<never>;
@@ -13,11 +13,10 @@ const no_react_1 = require("remotion/no-react");
13
13
  const download_media_1 = require("../../../api/download-media");
14
14
  const get_render_progress_1 = require("../../../api/get-render-progress");
15
15
  const render_media_on_lambda_1 = require("../../../api/render-media-on-lambda");
16
+ const client_2 = require("@remotion/serverless/client");
16
17
  const parse_function_name_1 = require("../../../functions/helpers/parse-function-name");
17
18
  const constants_1 = require("../../../shared/constants");
18
19
  const sleep_1 = require("../../../shared/sleep");
19
- const validate_frames_per_lambda_1 = require("../../../shared/validate-frames-per-lambda");
20
- const validate_privacy_1 = require("../../../shared/validate-privacy");
21
20
  const validate_retries_1 = require("../../../shared/validate-retries");
22
21
  const validate_serveurl_1 = require("../../../shared/validate-serveurl");
23
22
  const args_1 = require("../../args");
@@ -29,7 +28,7 @@ const log_1 = require("../../log");
29
28
  const progress_1 = require("./progress");
30
29
  exports.RENDER_COMMAND = 'render';
31
30
  const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, mutedOption, colorSpaceOption, deleteAfterOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, overwriteOption, binariesDirectoryOption, preferLosslessOption, metadataOption, } = client_1.BrowserSafeApis.options;
32
- const renderCommand = async (args, remotionRoot, logLevel, implementation) => {
31
+ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }) => {
33
32
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
34
33
  const serveUrl = args[0];
35
34
  if (!serveUrl) {
@@ -180,13 +179,16 @@ const renderCommand = async (args, remotionRoot, logLevel, implementation) => {
180
179
  codec,
181
180
  uiImageFormat: null,
182
181
  });
183
- const functionName = await (0, find_function_name_1.findFunctionName)(logLevel);
182
+ const functionName = await (0, find_function_name_1.findFunctionName)({ logLevel, providerSpecifics });
184
183
  const maxRetries = (_c = args_1.parsedLambdaCli['max-retries']) !== null && _c !== void 0 ? _c : constants_1.DEFAULT_MAX_RETRIES;
185
184
  (0, validate_retries_1.validateMaxRetries)(maxRetries);
186
185
  const privacy = (_d = args_1.parsedLambdaCli.privacy) !== null && _d !== void 0 ? _d : constants_1.DEFAULT_OUTPUT_PRIVACY;
187
- (0, validate_privacy_1.validatePrivacy)(privacy, true);
186
+ (0, client_2.validatePrivacy)(privacy, true);
188
187
  const framesPerLambda = (_e = args_1.parsedLambdaCli['frames-per-lambda']) !== null && _e !== void 0 ? _e : undefined;
189
- (0, validate_frames_per_lambda_1.validateFramesPerLambda)({ framesPerLambda, durationInFrames: 1 });
188
+ (0, client_2.validateFramesPerFunction)({
189
+ framesPerFunction: framesPerLambda,
190
+ durationInFrames: 1,
191
+ });
190
192
  const webhookCustomData = (0, get_webhook_custom_data_1.getWebhookCustomData)(logLevel);
191
193
  const res = await (0, render_media_on_lambda_1.internalRenderMediaOnLambdaRaw)({
192
194
  functionName,
@@ -334,7 +336,7 @@ const renderCommand = async (args, remotionRoot, logLevel, implementation) => {
334
336
  overall: newStatus,
335
337
  }), false);
336
338
  },
337
- providerSpecifics: implementation,
339
+ providerSpecifics: providerSpecifics,
338
340
  forcePathStyle: args_1.parsedLambdaCli['force-path-style'],
339
341
  });
340
342
  downloadOrNothing = download;
@@ -6,6 +6,7 @@ const config_1 = require("@remotion/cli/config");
6
6
  const client_1 = require("@remotion/renderer/client");
7
7
  const client_2 = require("@remotion/serverless/client");
8
8
  const no_react_1 = require("remotion/no-react");
9
+ const full_client_implementation_1 = require("../../../functions/full-client-implementation");
9
10
  const internals_1 = require("../../../internals");
10
11
  const constants_1 = require("../../../shared/constants");
11
12
  const validate_site_name_1 = require("../../../shared/validate-site-name");
@@ -149,6 +150,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel, implementatio
149
150
  throwIfSiteExists,
150
151
  providerSpecifics: implementation,
151
152
  forcePathStyle: (_e = args_1.parsedLambdaCli['force-path-style']) !== null && _e !== void 0 ? _e : false,
153
+ fullClientSpecifics: full_client_implementation_1.awsFullClientSpecifics,
152
154
  });
153
155
  const uploadDuration = Date.now() - uploadStart;
154
156
  multiProgress.deployProgress = {
@@ -2,4 +2,4 @@ import type { LogLevel } from '@remotion/renderer';
2
2
  import type { ProviderSpecifics } from '@remotion/serverless';
3
3
  import type { AwsProvider } from '../../../functions/aws-implementation';
4
4
  export declare const SITES_COMMAND = "sites";
5
- export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, implementation: ProviderSpecifics<AwsProvider>) => Promise<boolean | void> | undefined;
5
+ export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel, providerSpecifics: ProviderSpecifics<AwsProvider>) => Promise<boolean | void> | undefined;
@@ -26,18 +26,18 @@ const printSitesHelp = (logLevel) => {
26
26
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rmall_1.SITES_RMALL_COMMAND}`);
27
27
  cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Remove all sites from the S3 bucket.'));
28
28
  };
29
- const sitesCommand = (args, remotionRoot, logLevel, implementation) => {
29
+ const sitesCommand = (args, remotionRoot, logLevel, providerSpecifics) => {
30
30
  if (args[0] === ls_1.SITES_LS_SUBCOMMAND) {
31
31
  return (0, ls_1.sitesLsSubcommand)(logLevel);
32
32
  }
33
33
  if (args[0] === rm_1.SITES_RM_COMMAND) {
34
- return (0, rm_1.sitesRmSubcommand)(args.slice(1), logLevel, implementation);
34
+ return (0, rm_1.sitesRmSubcommand)(args.slice(1), logLevel, providerSpecifics);
35
35
  }
36
36
  if (args[0] === rmall_1.SITES_RMALL_COMMAND) {
37
- return (0, rmall_1.sitesRmallSubcommand)(logLevel, implementation);
37
+ return (0, rmall_1.sitesRmallSubcommand)(logLevel, providerSpecifics);
38
38
  }
39
39
  if (args[0] === create_1.SITES_CREATE_SUBCOMMAND) {
40
- return (0, create_1.sitesCreateSubcommand)(args.slice(1), remotionRoot, logLevel, implementation);
40
+ return (0, create_1.sitesCreateSubcommand)(args.slice(1), remotionRoot, logLevel, providerSpecifics);
41
41
  }
42
42
  if (args[0]) {
43
43
  cli_1.CliInternals.Log.error({ indent: false, logLevel }, `Subcommand ${args[0]} not found.`);
@@ -2,9 +2,9 @@ import type { LogLevel } from '@remotion/renderer';
2
2
  import type { ProviderSpecifics } from '@remotion/serverless';
3
3
  import type { AwsProvider } from '../../functions/aws-implementation';
4
4
  export declare const STILL_COMMAND = "still";
5
- export declare const stillCommand: ({ args, remotionRoot, logLevel, implementation, }: {
5
+ export declare const stillCommand: ({ args, remotionRoot, logLevel, providerSpecifics, }: {
6
6
  args: string[];
7
7
  remotionRoot: string;
8
8
  logLevel: LogLevel;
9
- implementation: ProviderSpecifics<AwsProvider>;
9
+ providerSpecifics: ProviderSpecifics<AwsProvider>;
10
10
  }) => Promise<void>;