@remotion/lambda 4.0.259 → 4.0.261

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/build.ts +1 -1
  2. package/dist/admin/make-layer-public.js +3 -3
  3. package/dist/api/create-function.d.ts +1 -2
  4. package/dist/api/create-function.js +8 -8
  5. package/dist/api/delete-site.d.ts +2 -2
  6. package/dist/api/delete-site.js +3 -4
  7. package/dist/api/deploy-function.d.ts +2 -2
  8. package/dist/api/deploy-function.js +9 -13
  9. package/dist/api/deploy-site.d.ts +2 -2
  10. package/dist/api/deploy-site.js +19 -13
  11. package/dist/api/download-media.d.ts +3 -3
  12. package/dist/api/download-media.js +11 -5
  13. package/dist/api/get-function-info.d.ts +1 -1
  14. package/dist/api/get-function-info.js +6 -8
  15. package/dist/api/get-or-create-bucket.d.ts +3 -3
  16. package/dist/api/get-or-create-bucket.js +4 -4
  17. package/dist/api/get-regions.d.ts +1 -1
  18. package/dist/api/get-regions.js +1 -1
  19. package/dist/api/iam-validation/role-permissions.js +6 -7
  20. package/dist/api/iam-validation/simulate-rule.d.ts +1 -1
  21. package/dist/api/iam-validation/simulate-rule.js +2 -2
  22. package/dist/api/iam-validation/simulate.d.ts +1 -1
  23. package/dist/api/iam-validation/simulate.js +2 -2
  24. package/dist/api/iam-validation/user-permissions.js +4 -5
  25. package/dist/api/upload-dir.d.ts +2 -3
  26. package/dist/api/upload-dir.js +7 -4
  27. package/dist/cli/args.d.ts +2 -4
  28. package/dist/cli/commands/compositions/index.d.ts +1 -1
  29. package/dist/cli/commands/compositions/index.js +5 -6
  30. package/dist/cli/commands/functions/deploy.d.ts +1 -1
  31. package/dist/cli/commands/functions/deploy.js +8 -9
  32. package/dist/cli/commands/functions/index.d.ts +1 -1
  33. package/dist/cli/commands/functions/index.js +6 -6
  34. package/dist/cli/commands/functions/ls.d.ts +1 -1
  35. package/dist/cli/commands/functions/rm.js +4 -4
  36. package/dist/cli/commands/functions/rmall.d.ts +1 -1
  37. package/dist/cli/commands/functions/rmall.js +2 -2
  38. package/dist/cli/commands/policies/policies.js +5 -5
  39. package/dist/cli/commands/quotas/increase.js +5 -5
  40. package/dist/cli/commands/quotas/list.js +4 -4
  41. package/dist/cli/commands/render/progress.js +4 -4
  42. package/dist/cli/commands/render/render.d.ts +1 -1
  43. package/dist/cli/commands/render/render.js +13 -16
  44. package/dist/cli/commands/sites/create.d.ts +1 -1
  45. package/dist/cli/commands/sites/create.js +9 -5
  46. package/dist/cli/commands/sites/index.d.ts +1 -1
  47. package/dist/cli/commands/sites/index.js +6 -6
  48. package/dist/cli/commands/sites/ls.js +2 -2
  49. package/dist/cli/commands/sites/rm.d.ts +1 -1
  50. package/dist/cli/commands/sites/rm.js +4 -4
  51. package/dist/cli/commands/sites/rmall.d.ts +1 -1
  52. package/dist/cli/commands/sites/rmall.js +4 -4
  53. package/dist/cli/commands/still.d.ts +1 -1
  54. package/dist/cli/commands/still.js +10 -12
  55. package/dist/cli/get-aws-region.d.ts +1 -1
  56. package/dist/cli/get-aws-region.js +6 -7
  57. package/dist/cli/help.js +10 -10
  58. package/dist/cli/helpers/find-function-name.d.ts +1 -1
  59. package/dist/cli/helpers/find-function-name.js +5 -5
  60. package/dist/cli/index.d.ts +2 -2
  61. package/dist/cli/index.js +15 -17
  62. package/dist/cli/log.d.ts +5 -5
  63. package/dist/client.d.ts +1 -19
  64. package/dist/client.js +15 -30
  65. package/dist/defaults.d.ts +1 -1
  66. package/dist/defaults.js +1 -1
  67. package/dist/functions/aws-server-implementation.d.ts +2 -1
  68. package/dist/functions/aws-server-implementation.js +11 -2
  69. package/dist/functions/full-client-implementation.d.ts +1 -1
  70. package/dist/functions/full-client-implementation.js +0 -2
  71. package/dist/functions/helpers/get-current-region.d.ts +1 -1
  72. package/dist/functions/helpers/get-folder-files.d.ts +1 -1
  73. package/dist/functions/helpers/make-aws-artifact.d.ts +1 -1
  74. package/dist/functions/helpers/read-with-progress.d.ts +2 -3
  75. package/dist/functions/helpers/read-with-progress.js +6 -2
  76. package/dist/functions/index.d.ts +2 -3
  77. package/dist/functions/index.js +2 -4
  78. package/dist/index.d.ts +13 -32
  79. package/dist/index.js +24 -35
  80. package/dist/internals.d.ts +8 -12
  81. package/dist/internals.js +0 -4
  82. package/dist/shared/get-layers.d.ts +1 -4
  83. package/dist/shared/get-layers.js +3 -3
  84. package/dist/shared/get-s3-operations.d.ts +1 -1
  85. package/dist/shared/hosted-layers.d.ts +1 -1
  86. package/dist/shared/lambda-insights-extensions.d.ts +1 -1
  87. package/dist/shared/validate-timeout.js +3 -3
  88. package/package.json +22 -30
  89. package/remotionlambda-arm64.zip +0 -0
  90. package/dist/api/app-router-webhook.d.ts +0 -10
  91. package/dist/api/app-router-webhook.js +0 -43
  92. package/dist/api/bucket-exists.d.ts +0 -3
  93. package/dist/api/bucket-exists.js +0 -26
  94. package/dist/api/clean-items.d.ts +0 -16
  95. package/dist/api/clean-items.js +0 -25
  96. package/dist/api/create-bucket.d.ts +0 -3
  97. package/dist/api/create-bucket.js +0 -45
  98. package/dist/api/delete-function.d.ts +0 -4
  99. package/dist/api/delete-function.js +0 -15
  100. package/dist/api/delete-render.d.ts +0 -20
  101. package/dist/api/delete-render.js +0 -78
  102. package/dist/api/estimate-price.d.ts +0 -17
  103. package/dist/api/estimate-price.js +0 -45
  104. package/dist/api/express-webhook.d.ts +0 -3
  105. package/dist/api/express-webhook.js +0 -46
  106. package/dist/api/get-aws-client.d.ts +0 -30
  107. package/dist/api/get-aws-client.js +0 -56
  108. package/dist/api/get-buckets.d.ts +0 -9
  109. package/dist/api/get-buckets.js +0 -62
  110. package/dist/api/get-compositions-on-lambda.d.ts +0 -20
  111. package/dist/api/get-compositions-on-lambda.js +0 -60
  112. package/dist/api/get-functions.d.ts +0 -9
  113. package/dist/api/get-functions.js +0 -77
  114. package/dist/api/get-render-progress.d.ts +0 -16
  115. package/dist/api/get-render-progress.js +0 -45
  116. package/dist/api/get-sites.d.ts +0 -29
  117. package/dist/api/get-sites.js +0 -79
  118. package/dist/api/make-lambda-payload.d.ts +0 -57
  119. package/dist/api/make-lambda-payload.js +0 -150
  120. package/dist/api/pages-router-webhook.d.ts +0 -5
  121. package/dist/api/pages-router-webhook.js +0 -48
  122. package/dist/api/presign-url.d.ts +0 -14
  123. package/dist/api/presign-url.js +0 -59
  124. package/dist/api/render-media-on-lambda.d.ts +0 -63
  125. package/dist/api/render-media-on-lambda.js +0 -128
  126. package/dist/api/render-still-on-lambda.d.ts +0 -56
  127. package/dist/api/render-still-on-lambda.js +0 -118
  128. package/dist/api/speculate-function-name.d.ts +0 -6
  129. package/dist/api/speculate-function-name.js +0 -20
  130. package/dist/api/validate-webhook-signature.d.ts +0 -5
  131. package/dist/api/validate-webhook-signature.js +0 -28
  132. package/dist/cli/is-cli.d.ts +0 -2
  133. package/dist/cli/is-cli.js +0 -10
  134. package/dist/functions/aws-implementation.d.ts +0 -23
  135. package/dist/functions/aws-implementation.js +0 -97
  136. package/dist/functions/helpers/apply-lifecyle.d.ts +0 -8
  137. package/dist/functions/helpers/apply-lifecyle.js +0 -18
  138. package/dist/functions/helpers/get-output-url-from-metadata.d.ts +0 -3
  139. package/dist/functions/helpers/get-output-url-from-metadata.js +0 -12
  140. package/dist/functions/helpers/lifecycle.d.ts +0 -8
  141. package/dist/functions/helpers/lifecycle.js +0 -24
  142. package/dist/functions/helpers/parse-function-name.d.ts +0 -8
  143. package/dist/functions/helpers/parse-function-name.js +0 -17
  144. package/dist/functions/http-client.d.ts +0 -2
  145. package/dist/functions/http-client.js +0 -18
  146. package/dist/io/delete-file.d.ts +0 -3
  147. package/dist/io/delete-file.js +0 -12
  148. package/dist/io/head-file.d.ts +0 -3
  149. package/dist/io/head-file.js +0 -17
  150. package/dist/io/list-objects.d.ts +0 -3
  151. package/dist/io/list-objects.js +0 -67
  152. package/dist/io/read-file.d.ts +0 -9
  153. package/dist/io/read-file.js +0 -18
  154. package/dist/io/write-file.d.ts +0 -5
  155. package/dist/io/write-file.js +0 -55
  156. package/dist/pricing/price-per-1-s.d.ts +0 -37
  157. package/dist/pricing/price-per-1-s.js +0 -822
  158. package/dist/regions.d.ts +0 -3
  159. package/dist/regions.js +0 -48
  160. package/dist/shared/aws-clients.d.ts +0 -11
  161. package/dist/shared/aws-clients.js +0 -51
  162. package/dist/shared/call-lambda-async.d.ts +0 -3
  163. package/dist/shared/call-lambda-async.js +0 -20
  164. package/dist/shared/call-lambda-streaming.d.ts +0 -7
  165. package/dist/shared/call-lambda-streaming.js +0 -126
  166. package/dist/shared/call-lambda-sync.d.ts +0 -3
  167. package/dist/shared/call-lambda-sync.js +0 -30
  168. package/dist/shared/check-credentials.d.ts +0 -1
  169. package/dist/shared/check-credentials.js +0 -39
  170. package/dist/shared/constants.d.ts +0 -26
  171. package/dist/shared/constants.js +0 -29
  172. package/dist/shared/content-disposition-header.d.ts +0 -2
  173. package/dist/shared/content-disposition-header.js +0 -50
  174. package/dist/shared/convert-to-serve-url.d.ts +0 -6
  175. package/dist/shared/convert-to-serve-url.js +0 -14
  176. package/dist/shared/encode-aws-url-params.d.ts +0 -1
  177. package/dist/shared/encode-aws-url-params.js +0 -7
  178. package/dist/shared/get-account-id.d.ts +0 -3
  179. package/dist/shared/get-account-id.js +0 -15
  180. package/dist/shared/get-aws-urls.d.ts +0 -26
  181. package/dist/shared/get-aws-urls.js +0 -31
  182. package/dist/shared/get-credentials.d.ts +0 -9
  183. package/dist/shared/get-credentials.js +0 -55
  184. package/dist/shared/get-env-variable.d.ts +0 -1
  185. package/dist/shared/get-env-variable.js +0 -15
  186. package/dist/shared/get-function-version.d.ts +0 -7
  187. package/dist/shared/get-function-version.js +0 -32
  188. package/dist/shared/get-s3-client.d.ts +0 -9
  189. package/dist/shared/get-s3-client.js +0 -14
  190. package/dist/shared/get-service-client.d.ts +0 -23
  191. package/dist/shared/get-service-client.js +0 -121
  192. package/dist/shared/is-flaky-error.d.ts +0 -1
  193. package/dist/shared/is-flaky-error.js +0 -77
  194. package/dist/shared/is-in-lambda.d.ts +0 -1
  195. package/dist/shared/is-in-lambda.js +0 -9
  196. package/dist/shared/is-likely-to-have-aws-profile.d.ts +0 -1
  197. package/dist/shared/is-likely-to-have-aws-profile.js +0 -50
  198. package/dist/shared/lambda-version-string.d.ts +0 -1
  199. package/dist/shared/lambda-version-string.js +0 -7
  200. package/dist/shared/lifecycle-rules.d.ts +0 -10
  201. package/dist/shared/lifecycle-rules.js +0 -61
  202. package/dist/shared/make-s3-url.d.ts +0 -6
  203. package/dist/shared/make-s3-url.js +0 -7
  204. package/dist/shared/p-limit.d.ts +0 -1
  205. package/dist/shared/p-limit.js +0 -57
  206. package/dist/shared/random-hash.d.ts +0 -1
  207. package/dist/shared/random-hash.js +0 -13
  208. package/dist/shared/validate-aws-region.d.ts +0 -2
  209. package/dist/shared/validate-aws-region.js +0 -9
  210. package/dist/shared/validate-bucketname.d.ts +0 -4
  211. package/dist/shared/validate-bucketname.js +0 -15
  212. package/dist/shared/validate-disk-size-in-mb.d.ts +0 -1
  213. package/dist/shared/validate-disk-size-in-mb.js +0 -23
  214. package/dist/shared/validate-lambda-codec.d.ts +0 -2
  215. package/dist/shared/validate-lambda-codec.js +0 -21
  216. package/dist/shared/validate-memory-size.d.ts +0 -1
  217. package/dist/shared/validate-memory-size.js +0 -22
  218. package/dist/shared/validate-presign-expiration.d.ts +0 -1
  219. package/dist/shared/validate-presign-expiration.js +0 -29
  220. package/dist/shared/validate-serveurl.d.ts +0 -1
  221. package/dist/shared/validate-serveurl.js +0 -9
@@ -1 +0,0 @@
1
- export declare const validateDiskSizeInMb: (diskSizeInMb: unknown) => void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateDiskSizeInMb = void 0;
4
- const constants_1 = require("./constants");
5
- const validateDiskSizeInMb = (diskSizeInMb) => {
6
- if (typeof diskSizeInMb !== 'number') {
7
- throw new TypeError(`parameter 'diskSizeInMb' must be a number, got a ${typeof diskSizeInMb}`);
8
- }
9
- if (Number.isNaN(diskSizeInMb)) {
10
- throw new TypeError(`parameter 'diskSizeInMb' must not be NaN, but is`);
11
- }
12
- if (!Number.isFinite(diskSizeInMb)) {
13
- throw new TypeError(`parameter 'diskSizeInMb' must be finite, but is ${diskSizeInMb}`);
14
- }
15
- if (diskSizeInMb < constants_1.MIN_EPHEMERAL_STORAGE_IN_MB ||
16
- diskSizeInMb > constants_1.MAX_EPHEMERAL_STORAGE_IN_MB) {
17
- throw new TypeError(`parameter 'diskSizeInMb' must be between ${constants_1.MIN_EPHEMERAL_STORAGE_IN_MB} and ${constants_1.MAX_EPHEMERAL_STORAGE_IN_MB}, but got ${diskSizeInMb}`);
18
- }
19
- if (diskSizeInMb % 1 !== 0) {
20
- throw new TypeError(`parameter 'diskSizeInMb' must be an integer but got ${diskSizeInMb}`);
21
- }
22
- };
23
- exports.validateDiskSizeInMb = validateDiskSizeInMb;
@@ -1,2 +0,0 @@
1
- import type { ServerlessCodec } from '@remotion/serverless/client';
2
- export declare const validateLambdaCodec: (codec: unknown) => ServerlessCodec;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateLambdaCodec = void 0;
4
- const client_1 = require("@remotion/serverless/client");
5
- const validateLambdaCodec = (codec) => {
6
- if (typeof codec !== 'string') {
7
- throw new TypeError('"codec" must be a string ');
8
- }
9
- if (!client_1.serverlessCodecs.includes(codec)) {
10
- throw new TypeError("'" +
11
- codec +
12
- "' is not a valid codec for Lambda. The following values are supported: " +
13
- client_1.serverlessCodecs.join(', '));
14
- }
15
- if (codec === 'h264-mkv') {
16
- console.warn('The "h264-mkv" codec for renderMediaOnLambda() is deprecated - it\'s now just "h264".');
17
- return 'h264';
18
- }
19
- return codec;
20
- };
21
- exports.validateLambdaCodec = validateLambdaCodec;
@@ -1 +0,0 @@
1
- export declare const validateMemorySize: (memorySizeInMb: unknown) => void;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateMemorySize = void 0;
4
- const constants_1 = require("./constants");
5
- const validateMemorySize = (memorySizeInMb) => {
6
- if (typeof memorySizeInMb !== 'number') {
7
- throw new TypeError(`parameter 'memorySizeInMb' must be a number, got a ${typeof memorySizeInMb}`);
8
- }
9
- if (Number.isNaN(memorySizeInMb)) {
10
- throw new TypeError(`parameter 'memorySizeInMb' must not be NaN, but is`);
11
- }
12
- if (!Number.isFinite(memorySizeInMb)) {
13
- throw new TypeError(`parameter 'memorySizeInMb' must be finite, but is ${memorySizeInMb}`);
14
- }
15
- if (memorySizeInMb < constants_1.MIN_MEMORY || memorySizeInMb > constants_1.MAX_MEMORY) {
16
- throw new TypeError(`parameter 'memorySizeInMb' must be between ${constants_1.MIN_MEMORY} and ${constants_1.MAX_MEMORY}, but got ${memorySizeInMb}`);
17
- }
18
- if (memorySizeInMb % 1 !== 0) {
19
- throw new TypeError(`parameter 'memorySizeInMb' must be an integer but got ${memorySizeInMb}`);
20
- }
21
- };
22
- exports.validateMemorySize = validateMemorySize;
@@ -1 +0,0 @@
1
- export declare const validatePresignExpiration: (presignExpiration: unknown) => void;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validatePresignExpiration = void 0;
4
- const MAX_PRESIGN_EXPIRATION = 604800;
5
- const MIN_PRESIGN_EXPIRATION = 1;
6
- const validatePresignExpiration = (presignExpiration) => {
7
- if (typeof presignExpiration === 'undefined' || presignExpiration === null) {
8
- return;
9
- }
10
- if (typeof presignExpiration !== 'number') {
11
- throw new TypeError(`'expiresIn' should be a number, but is ${JSON.stringify(presignExpiration)}`);
12
- }
13
- if (Number.isNaN(presignExpiration)) {
14
- throw new TypeError(`'expiresIn' should not be NaN, but is NaN`);
15
- }
16
- if (!Number.isFinite(presignExpiration)) {
17
- throw new TypeError(`'expiresIn' should be finite but is ${presignExpiration}`);
18
- }
19
- if (presignExpiration % 1 !== 0) {
20
- throw new TypeError(`'expiresIn' should be an integer but is ${JSON.stringify(presignExpiration)}`);
21
- }
22
- if (presignExpiration > MAX_PRESIGN_EXPIRATION) {
23
- throw new TypeError(`The 'expiresIn' parameter must be less or equal than ${MAX_PRESIGN_EXPIRATION} (7 days) as enforced by AWS`);
24
- }
25
- if (presignExpiration < MIN_PRESIGN_EXPIRATION) {
26
- throw new TypeError(`The 'expiresIn' parameter must be greater or equal than ${MIN_PRESIGN_EXPIRATION}`);
27
- }
28
- };
29
- exports.validatePresignExpiration = validatePresignExpiration;
@@ -1 +0,0 @@
1
- export declare const validateServeUrl: (serveUrl: unknown) => void;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateServeUrl = void 0;
4
- const validateServeUrl = (serveUrl) => {
5
- if (typeof serveUrl !== 'string') {
6
- throw new TypeError(`"serveURL" parameter must be a string, but is ${JSON.stringify(serveUrl)}`);
7
- }
8
- };
9
- exports.validateServeUrl = validateServeUrl;