@remotion/lambda-client 4.0.363 → 4.0.365

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 (168) hide show
  1. package/dist/cjs/app-router-webhook.d.ts +10 -0
  2. package/dist/cjs/apply-lifecycle.d.ts +8 -0
  3. package/dist/cjs/aws-clients.d.ts +12 -0
  4. package/dist/cjs/aws-provider.d.ts +27 -0
  5. package/dist/cjs/bucket-exists.d.ts +3 -0
  6. package/dist/cjs/call-lambda-async.d.ts +2 -0
  7. package/dist/cjs/call-lambda-streaming.d.ts +6 -0
  8. package/dist/cjs/call-lambda-sync.d.ts +2 -0
  9. package/dist/cjs/check-credentials.d.ts +1 -0
  10. package/dist/cjs/clean-items.d.ts +17 -0
  11. package/dist/cjs/constants.d.ts +25 -0
  12. package/dist/cjs/constants.js +75 -0
  13. package/dist/cjs/content-disposition-header.d.ts +2 -0
  14. package/dist/cjs/convert-to-serve-url.d.ts +6 -0
  15. package/dist/cjs/create-bucket.d.ts +3 -0
  16. package/dist/cjs/delete-file.d.ts +3 -0
  17. package/dist/cjs/delete-function.d.ts +7 -0
  18. package/dist/cjs/delete-render.d.ts +22 -0
  19. package/dist/cjs/encode-aws-url-params.d.ts +1 -0
  20. package/dist/cjs/estimate-price.d.ts +17 -0
  21. package/dist/cjs/express-webhook.d.ts +3 -0
  22. package/dist/cjs/get-account-id.d.ts +3 -0
  23. package/dist/cjs/get-aws-client.d.ts +32 -0
  24. package/dist/cjs/get-aws-urls.d.ts +25 -0
  25. package/dist/cjs/get-buckets.d.ts +9 -0
  26. package/dist/cjs/get-compositions-on-lambda.d.ts +20 -0
  27. package/dist/cjs/get-credentials.d.ts +9 -0
  28. package/dist/cjs/get-env-variable.d.ts +1 -0
  29. package/dist/cjs/get-function-name.d.ts +8 -0
  30. package/dist/cjs/get-function-version.d.ts +9 -0
  31. package/dist/cjs/get-functions.d.ts +10 -0
  32. package/dist/cjs/get-output-url-from-metadata.d.ts +3 -0
  33. package/dist/cjs/get-render-progress.d.ts +17 -0
  34. package/dist/cjs/get-s3-client.d.ts +11 -0
  35. package/dist/cjs/get-service-client.d.ts +25 -0
  36. package/dist/cjs/get-sites.d.ts +31 -0
  37. package/dist/cjs/head-file.d.ts +3 -0
  38. package/dist/cjs/index.d.ts +129 -0
  39. package/dist/cjs/index.js +72692 -0
  40. package/dist/cjs/is-cli.d.ts +2 -0
  41. package/dist/cjs/is-flaky-error.d.ts +1 -0
  42. package/dist/cjs/is-in-lambda.d.ts +1 -0
  43. package/dist/cjs/is-likely-to-have-aws-profile.d.ts +1 -0
  44. package/dist/cjs/lambda-version-string.d.ts +1 -0
  45. package/dist/cjs/lifecycle-rules.d.ts +12 -0
  46. package/dist/cjs/lifecycle.d.ts +7 -0
  47. package/dist/cjs/list-objects.d.ts +3 -0
  48. package/dist/cjs/make-lambda-payload.d.ts +59 -0
  49. package/dist/cjs/make-s3-url.d.ts +6 -0
  50. package/dist/cjs/p-limit.d.ts +1 -0
  51. package/dist/cjs/pages-router-webhook.d.ts +5 -0
  52. package/dist/cjs/parse-function-name.d.ts +8 -0
  53. package/dist/cjs/presign-url.d.ts +17 -0
  54. package/dist/cjs/price-per-1s.d.ts +37 -0
  55. package/dist/cjs/random-hash.d.ts +1 -0
  56. package/dist/cjs/read-file.d.ts +11 -0
  57. package/dist/cjs/regions.d.ts +3 -0
  58. package/dist/cjs/regions.js +80 -0
  59. package/dist/cjs/render-media-on-lambda.d.ts +66 -0
  60. package/dist/cjs/render-still-on-lambda.d.ts +61 -0
  61. package/dist/cjs/runtime-preference.d.ts +2 -0
  62. package/dist/cjs/speculate-function-name.d.ts +7 -0
  63. package/dist/cjs/types.d.ts +4 -0
  64. package/dist/cjs/validate-aws-region.d.ts +2 -0
  65. package/dist/cjs/validate-bucketname.d.ts +4 -0
  66. package/dist/cjs/validate-disk-size-in-mb.d.ts +1 -0
  67. package/dist/cjs/validate-lambda-codec.d.ts +2 -0
  68. package/dist/cjs/validate-memory-size.d.ts +1 -0
  69. package/dist/cjs/validate-presign-expiration.d.ts +1 -0
  70. package/dist/cjs/validate-serveurl.d.ts +1 -0
  71. package/dist/cjs/validate-webhook-signature.d.ts +5 -0
  72. package/dist/cjs/write-file.d.ts +5 -0
  73. package/dist/esm/index.mjs +64284 -13659
  74. package/package.json +15 -16
  75. package/.turbo/turbo-formatting.log +0 -4
  76. package/.turbo/turbo-lint.log +0 -25
  77. package/.turbo/turbo-make.log +0 -3
  78. package/bundle.ts +0 -24
  79. package/dist/test/concurrency-payload.test.d.ts +0 -1
  80. package/dist/test/concurrency-payload.test.js +0 -119
  81. package/dist/test/encode-aws-url.test.d.ts +0 -1
  82. package/dist/test/encode-aws-url.test.js +0 -8
  83. package/dist/test/price-calculation.test.d.ts +0 -1
  84. package/dist/test/price-calculation.test.js +0 -62
  85. package/dist/test/pricing.test.d.ts +0 -1
  86. package/dist/test/pricing.test.js +0 -27
  87. package/dist/test/request-handler.test.d.ts +0 -1
  88. package/dist/test/request-handler.test.js +0 -36
  89. package/dist/test/validate-disk-size-in-mb.test.d.ts +0 -1
  90. package/dist/test/validate-disk-size-in-mb.test.js +0 -14
  91. package/eslint.config.mjs +0 -5
  92. package/src/app-router-webhook.ts +0 -73
  93. package/src/apply-lifecycle.ts +0 -30
  94. package/src/aws-clients.ts +0 -75
  95. package/src/aws-provider.ts +0 -139
  96. package/src/bucket-exists.ts +0 -35
  97. package/src/call-lambda-async.ts +0 -43
  98. package/src/call-lambda-streaming.ts +0 -226
  99. package/src/call-lambda-sync.ts +0 -59
  100. package/src/check-credentials.ts +0 -51
  101. package/src/clean-items.ts +0 -50
  102. package/src/constants.ts +0 -38
  103. package/src/content-disposition-header.ts +0 -64
  104. package/src/convert-to-serve-url.ts +0 -24
  105. package/src/create-bucket.ts +0 -87
  106. package/src/delete-file.ts +0 -38
  107. package/src/delete-function.ts +0 -28
  108. package/src/delete-render.ts +0 -114
  109. package/src/encode-aws-url-params.ts +0 -3
  110. package/src/estimate-price.ts +0 -95
  111. package/src/express-webhook.ts +0 -57
  112. package/src/get-account-id.ts +0 -22
  113. package/src/get-aws-client.ts +0 -63
  114. package/src/get-aws-urls.ts +0 -85
  115. package/src/get-buckets.ts +0 -84
  116. package/src/get-compositions-on-lambda.ts +0 -111
  117. package/src/get-credentials.ts +0 -81
  118. package/src/get-env-variable.ts +0 -15
  119. package/src/get-function-name.ts +0 -24
  120. package/src/get-function-version.ts +0 -49
  121. package/src/get-functions.ts +0 -114
  122. package/src/get-output-url-from-metadata.ts +0 -23
  123. package/src/get-render-progress.ts +0 -66
  124. package/src/get-s3-client.ts +0 -26
  125. package/src/get-service-client.ts +0 -195
  126. package/src/get-sites.ts +0 -136
  127. package/src/head-file.ts +0 -30
  128. package/src/index.ts +0 -152
  129. package/src/is-cli.ts +0 -7
  130. package/src/is-flaky-error.ts +0 -104
  131. package/src/is-in-lambda.ts +0 -5
  132. package/src/is-likely-to-have-aws-profile.ts +0 -55
  133. package/src/lambda-version-string.ts +0 -5
  134. package/src/lifecycle-rules.ts +0 -119
  135. package/src/lifecycle.ts +0 -44
  136. package/src/list-objects.ts +0 -87
  137. package/src/make-lambda-payload.ts +0 -328
  138. package/src/make-s3-url.ts +0 -13
  139. package/src/p-limit.ts +0 -75
  140. package/src/pages-router-webhook.ts +0 -68
  141. package/src/parse-function-name.ts +0 -24
  142. package/src/presign-url.ts +0 -121
  143. package/src/price-per-1s.ts +0 -863
  144. package/src/random-hash.ts +0 -10
  145. package/src/read-file.ts +0 -35
  146. package/src/regions.ts +0 -48
  147. package/src/render-media-on-lambda.ts +0 -227
  148. package/src/render-still-on-lambda.ts +0 -209
  149. package/src/runtime-preference.ts +0 -7
  150. package/src/speculate-function-name.ts +0 -60
  151. package/src/test/concurrency-payload.test.ts +0 -121
  152. package/src/test/encode-aws-url.test.ts +0 -7
  153. package/src/test/price-calculation.test.ts +0 -62
  154. package/src/test/pricing.test.ts +0 -32
  155. package/src/test/request-handler.test.ts +0 -42
  156. package/src/test/validate-disk-size-in-mb.test.ts +0 -15
  157. package/src/types.ts +0 -7
  158. package/src/validate-aws-region.ts +0 -14
  159. package/src/validate-bucketname.ts +0 -24
  160. package/src/validate-disk-size-in-mb.ts +0 -37
  161. package/src/validate-lambda-codec.ts +0 -28
  162. package/src/validate-memory-size.ts +0 -31
  163. package/src/validate-presign-expiration.ts +0 -46
  164. package/src/validate-serveurl.ts +0 -9
  165. package/src/validate-webhook-signature.ts +0 -42
  166. package/src/write-file.ts +0 -108
  167. package/tsconfig.json +0 -9
  168. package/tsconfig.tsbuildinfo +0 -1
package/package.json CHANGED
@@ -3,8 +3,8 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda-client"
4
4
  },
5
5
  "name": "@remotion/lambda-client",
6
- "version": "4.0.363",
7
- "main": "dist/index.js",
6
+ "version": "4.0.365",
7
+ "main": "dist/cjs/index.js",
8
8
  "sideEffects": false,
9
9
  "scripts": {
10
10
  "formatting": "prettier --experimental-cli src --check",
@@ -14,7 +14,8 @@
14
14
  },
15
15
  "author": "Jonny Burger <jonny@remotion.dev>",
16
16
  "license": "UNLICENSED",
17
- "dependencies": {
17
+ "dependencies": {},
18
+ "devDependencies": {
18
19
  "@aws-sdk/client-cloudwatch-logs": "3.787.0",
19
20
  "@aws-sdk/client-iam": "3.787.0",
20
21
  "@aws-sdk/client-lambda": "3.787.0",
@@ -23,14 +24,12 @@
23
24
  "@aws-sdk/client-service-quotas": "3.787.0",
24
25
  "@aws-sdk/client-sts": "3.787.0",
25
26
  "@aws-sdk/lib-storage": "3.787.0",
26
- "mime-types": "2.1.34"
27
- },
28
- "devDependencies": {
27
+ "mime-types": "2.1.34",
29
28
  "@aws-sdk/credential-provider-ini": "3.787.0",
30
- "@remotion/serverless-client": "4.0.363",
29
+ "@remotion/serverless-client": "4.0.365",
31
30
  "@types/express": "^5.0.0",
32
31
  "express": "4.21.0",
33
- "@remotion/eslint-config-internal": "4.0.363",
32
+ "@remotion/eslint-config-internal": "4.0.365",
34
33
  "eslint": "9.19.0",
35
34
  "next": "15.4.7",
36
35
  "@types/mime-types": "2.1.1"
@@ -41,20 +40,20 @@
41
40
  "exports": {
42
41
  "./package.json": "./package.json",
43
42
  ".": {
44
- "types": "./dist/index.d.ts",
45
- "require": "./dist/index.js",
43
+ "types": "./dist/cjs/index.d.ts",
44
+ "require": "./dist/cjs/index.js",
46
45
  "module": "./dist/esm/index.mjs",
47
46
  "import": "./dist/esm/index.mjs"
48
47
  },
49
48
  "./constants": {
50
- "types": "./dist/constants.d.ts",
51
- "require": "./dist/constants.js",
49
+ "types": "./dist/cjs/constants.d.ts",
50
+ "require": "./dist/cjs/constants.js",
52
51
  "module": "./dist/esm/constants.mjs",
53
52
  "import": "./dist/esm/constants.mjs"
54
53
  },
55
54
  "./regions": {
56
- "types": "./dist/regions.d.ts",
57
- "require": "./dist/regions.js",
55
+ "types": "./dist/cjs/regions.d.ts",
56
+ "require": "./dist/cjs/regions.js",
58
57
  "module": "./dist/esm/regions.mjs",
59
58
  "import": "./dist/esm/regions.mjs"
60
59
  }
@@ -62,10 +61,10 @@
62
61
  "typesVersions": {
63
62
  ">=1.0": {
64
63
  "constants": [
65
- "./dist/constants.d.ts"
64
+ "./dist/cjs/constants.d.ts"
66
65
  ],
67
66
  "regions": [
68
- "./dist/regions.d.ts"
67
+ "./dist/cjs/regions.d.ts"
69
68
  ]
70
69
  }
71
70
  }
@@ -1,4 +0,0 @@
1
-
2
- $ prettier --experimental-cli src --check
3
- [?25l- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ src/delete-file.ts- src/delete-file.ts\ src/delete-file.ts| src/encode-aws-url-params.ts/ src/delete-render.ts- src/delete-render.ts\ src/estimate-price.ts| src/express-webhook.ts/ src/get-account-id.ts- src/get-aws-urls.ts\ src/get-credentials.ts| src/get-credentials.ts/ src/get-function-name.ts- src/call-lambda-async.ts\ src/call-lambda-async.ts| src/app-router-webhook.ts/ src/head-file.ts- src/is-cli.ts\ src/get-render-progress.ts| src/lambda-version-string.ts/ src/random-hash.ts- src/runtime-preference.ts\ src/check-credentials.ts| src/speculate-function-name.ts/ src/validate-presign-expiration.ts- src/constants.ts\ src/validate-aws-region.ts| src/presign-url.ts/ src/test/price-calculation.test.ts- src/test/validate-disk-size-in-mb.test.ts\ src/aws-clients.ts| src/write-file.ts/ src/write-file.ts[?25hChecking formatting...
4
- [?25hAll matched files use Prettier code style!
@@ -1,25 +0,0 @@
1
-
2
- $ eslint src
3
- =============
4
-
5
- WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
6
-
7
- You may find that it works just fine, or you may not.
8
-
9
- SUPPORTED TYPESCRIPT VERSIONS: >=4.7.4 <5.7.0
10
-
11
- YOUR TYPESCRIPT VERSION: 5.8.2
12
-
13
- Please only submit bug reports when using the officially supported version.
14
-
15
- =============
16
- 
17
- /Users/jonathanburger/remotion/packages/lambda-client/src/aws-clients.ts
18
-  25:2 warning Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-unused-vars')
19
- 
20
- /Users/jonathanburger/remotion/packages/lambda-client/src/constants.ts
21
-  20:1 warning Unexpected 'todo' comment: 'TODO: In V5, Enable set this to 10240' no-warning-comments
22
- 
23
- ✖ 2 problems (0 errors, 2 warnings)
24
-  0 errors and 1 warning potentially fixable with the `--fix` option.
25
- 
@@ -1,3 +0,0 @@
1
-
2
- $ tsc -d && bun --env-file=../.env.bundle bundle.ts
3
- [61.98ms] Generated.
package/bundle.ts DELETED
@@ -1,24 +0,0 @@
1
- import {buildPackage} from '../.monorepo/builder';
2
-
3
- await buildPackage({
4
- formats: {
5
- cjs: 'use-tsc',
6
- esm: 'build',
7
- },
8
- external: 'dependencies',
9
-
10
- entrypoints: [
11
- {
12
- path: 'src/index.ts',
13
- target: 'node',
14
- },
15
- {
16
- path: 'src/constants.ts',
17
- target: 'browser',
18
- },
19
- {path: 'src/regions.ts', target: 'browser'},
20
- ],
21
- filterExternal: (external) => {
22
- return external.filter((e) => e !== '@aws-sdk/credential-provider-ini');
23
- },
24
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,119 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const serverless_client_1 = require("@remotion/serverless-client");
4
- const bun_test_1 = require("bun:test");
5
- const make_lambda_payload_1 = require("../make-lambda-payload");
6
- (0, bun_test_1.test)('Should include concurrency field in payload', async () => {
7
- const payload = await (0, make_lambda_payload_1.makeLambdaRenderMediaPayload)({
8
- region: 'us-east-1',
9
- functionName: 'test-function',
10
- serveUrl: 'https://example.com',
11
- composition: 'test-composition',
12
- inputProps: {},
13
- codec: 'h264',
14
- imageFormat: 'jpeg',
15
- crf: undefined,
16
- envVariables: {},
17
- pixelFormat: undefined,
18
- proResProfile: undefined,
19
- x264Preset: null,
20
- privacy: 'public',
21
- jpegQuality: 80,
22
- maxRetries: 1,
23
- framesPerLambda: null,
24
- concurrency: 10,
25
- logLevel: 'info',
26
- frameRange: null,
27
- outName: null,
28
- timeoutInMilliseconds: 30000,
29
- chromiumOptions: {},
30
- scale: 1,
31
- everyNthFrame: 1,
32
- numberOfGifLoops: null,
33
- concurrencyPerLambda: 1,
34
- downloadBehavior: { type: 'play-in-browser' },
35
- muted: false,
36
- overwrite: false,
37
- audioBitrate: null,
38
- videoBitrate: null,
39
- encodingMaxRate: null,
40
- encodingBufferSize: null,
41
- webhook: null,
42
- forceHeight: null,
43
- forceWidth: null,
44
- rendererFunctionName: null,
45
- forceBucketName: null,
46
- audioCodec: null,
47
- colorSpace: null,
48
- deleteAfter: null,
49
- indent: false,
50
- forcePathStyle: false,
51
- metadata: null,
52
- apiKey: null,
53
- offthreadVideoCacheSizeInBytes: null,
54
- mediaCacheSizeInBytes: null,
55
- offthreadVideoThreads: null,
56
- storageClass: null,
57
- requestHandler: null,
58
- preferLossless: false,
59
- });
60
- (0, bun_test_1.expect)(payload.type).toBe(serverless_client_1.ServerlessRoutines.start);
61
- (0, bun_test_1.expect)(payload.concurrency).toBe(10);
62
- });
63
- (0, bun_test_1.test)('Should handle null concurrency', async () => {
64
- const payload = await (0, make_lambda_payload_1.makeLambdaRenderMediaPayload)({
65
- region: 'us-east-1',
66
- functionName: 'test-function',
67
- serveUrl: 'https://example.com',
68
- composition: 'test-composition',
69
- inputProps: {},
70
- codec: 'h264',
71
- imageFormat: 'jpeg',
72
- crf: undefined,
73
- envVariables: {},
74
- pixelFormat: undefined,
75
- proResProfile: undefined,
76
- x264Preset: null,
77
- privacy: 'public',
78
- jpegQuality: 80,
79
- maxRetries: 1,
80
- framesPerLambda: null,
81
- concurrency: null,
82
- logLevel: 'info',
83
- frameRange: null,
84
- outName: null,
85
- timeoutInMilliseconds: 30000,
86
- chromiumOptions: {},
87
- scale: 1,
88
- everyNthFrame: 1,
89
- numberOfGifLoops: null,
90
- concurrencyPerLambda: 1,
91
- downloadBehavior: { type: 'play-in-browser' },
92
- muted: false,
93
- overwrite: false,
94
- audioBitrate: null,
95
- videoBitrate: null,
96
- encodingMaxRate: null,
97
- encodingBufferSize: null,
98
- webhook: null,
99
- forceHeight: null,
100
- forceWidth: null,
101
- rendererFunctionName: null,
102
- forceBucketName: null,
103
- audioCodec: null,
104
- colorSpace: null,
105
- deleteAfter: null,
106
- indent: false,
107
- forcePathStyle: false,
108
- metadata: null,
109
- apiKey: null,
110
- offthreadVideoCacheSizeInBytes: null,
111
- mediaCacheSizeInBytes: null,
112
- offthreadVideoThreads: null,
113
- storageClass: null,
114
- requestHandler: null,
115
- preferLossless: false,
116
- });
117
- (0, bun_test_1.expect)(payload.type).toBe(serverless_client_1.ServerlessRoutines.start);
118
- (0, bun_test_1.expect)(payload.concurrency).toBe(null);
119
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const bun_test_1 = require("bun:test");
4
- const encode_aws_url_params_1 = require("../encode-aws-url-params");
5
- (0, bun_test_1.test)('Encode AWS URL test', () => {
6
- const params = (0, encode_aws_url_params_1.encodeAwsUrlParams)('"method=test"');
7
- (0, bun_test_1.expect)(params).toBe('$2522method$253Dtest$2522');
8
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const serverless_client_1 = require("@remotion/serverless-client");
4
- const bun_test_1 = require("bun:test");
5
- const aws_provider_1 = require("../aws-provider");
6
- (0, bun_test_1.test)('Should not throw while calculating prices when time shifts occur', () => {
7
- const aDate = Date.now();
8
- process.env.AWS_REGION = 'us-east-1';
9
- const price = (0, serverless_client_1.estimatePriceFromMetadata)({
10
- memorySizeInMb: 1024,
11
- renderMetadata: {
12
- audioBitrate: null,
13
- codec: 'h264',
14
- compositionId: 'react-svg',
15
- estimatedRenderLambdaInvokations: 10,
16
- estimatedTotalLambdaInvokations: 10,
17
- framesPerLambda: 10,
18
- imageFormat: 'jpeg',
19
- inputProps: {
20
- type: 'payload',
21
- payload: '{}',
22
- },
23
- lambdaVersion: '2021-11-29',
24
- memorySizeInMb: 1024,
25
- region: 'eu-central-1',
26
- renderId: '123',
27
- deleteAfter: null,
28
- siteId: 'my-site',
29
- startedDate: aDate + 1000,
30
- totalChunks: 20,
31
- type: 'video',
32
- outName: 'out.mp4',
33
- privacy: 'public',
34
- everyNthFrame: 1,
35
- frameRange: [0, 99],
36
- audioCodec: null,
37
- downloadBehavior: { type: 'play-in-browser' },
38
- numberOfGifLoops: null,
39
- muted: false,
40
- metadata: { Author: 'Lunar' },
41
- functionName: 'remotion-render-la8ffw',
42
- rendererFunctionName: 'remotion-render-la8ffw',
43
- dimensions: {
44
- height: 1080,
45
- width: 1920,
46
- },
47
- scale: 1,
48
- },
49
- diskSizeInMb: 512,
50
- functionsInvoked: 1,
51
- timings: [
52
- {
53
- chunk: 1,
54
- rendered: aDate - 2000,
55
- start: aDate,
56
- },
57
- ],
58
- region: 'eu-central-1',
59
- providerSpecifics: aws_provider_1.awsImplementation,
60
- });
61
- (0, bun_test_1.expect)(price === null || price === void 0 ? void 0 : price.accruedSoFar).toBeGreaterThanOrEqual(0);
62
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const bun_test_1 = require("bun:test");
4
- const estimate_price_1 = require("../estimate-price");
5
- (0, bun_test_1.test)('Should calculate costs accurately', () => {
6
- (0, bun_test_1.expect)((0, estimate_price_1.estimatePrice)({
7
- region: 'us-east-1',
8
- durationInMiliseconds: 20000000,
9
- memorySizeInMb: 2048,
10
- diskSizeInMb: 512,
11
- lambdasInvoked: 1,
12
- })).toEqual(0.53334);
13
- (0, bun_test_1.expect)((0, estimate_price_1.estimatePrice)({
14
- region: 'us-east-1',
15
- durationInMilliseconds: 20000000,
16
- memorySizeInMb: 2048,
17
- diskSizeInMb: 10240,
18
- lambdasInvoked: 1,
19
- })).toEqual(0.53921);
20
- (0, bun_test_1.expect)((0, estimate_price_1.estimatePrice)({
21
- region: 'us-east-1',
22
- durationInMiliseconds: 20000000,
23
- memorySizeInMb: 2048,
24
- diskSizeInMb: 10240,
25
- lambdasInvoked: 1,
26
- })).toEqual(0.53921);
27
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const bun_test_1 = require("bun:test");
4
- (0, bun_test_1.test)('RequestHandler type should be properly exported and defined', () => {
5
- // Just verify the type can be imported
6
- const requestHandler = {
7
- httpsAgent: {
8
- maxSockets: 100,
9
- },
10
- };
11
- (0, bun_test_1.expect)(requestHandler).toBeDefined();
12
- (0, bun_test_1.expect)(typeof requestHandler).toBe('object');
13
- });
14
- (0, bun_test_1.test)('API input types should accept requestHandler option', () => {
15
- // Test that the type checking works for various API inputs
16
- const getAwsClientInput = {
17
- region: 'us-east-1',
18
- service: 'lambda',
19
- requestHandler: {
20
- httpsAgent: {
21
- maxSockets: 50,
22
- },
23
- },
24
- };
25
- const getFunctionsInput = {
26
- region: 'us-east-1',
27
- compatibleOnly: false,
28
- requestHandler: {
29
- httpsAgent: {
30
- maxSockets: 25,
31
- },
32
- },
33
- };
34
- (0, bun_test_1.expect)(getAwsClientInput.requestHandler).toBeDefined();
35
- (0, bun_test_1.expect)(getFunctionsInput.requestHandler).toBeDefined();
36
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const bun_test_1 = require("bun:test");
4
- const validate_disk_size_in_mb_1 = require("../validate-disk-size-in-mb");
5
- (0, bun_test_1.test)('Disk size tests', () => {
6
- (0, bun_test_1.expect)(() => (0, validate_disk_size_in_mb_1.validateDiskSizeInMb)(512)).not.toThrow();
7
- (0, bun_test_1.expect)(() => (0, validate_disk_size_in_mb_1.validateDiskSizeInMb)(10240)).not.toThrow();
8
- (0, bun_test_1.expect)(() => {
9
- (0, validate_disk_size_in_mb_1.validateDiskSizeInMb)(0);
10
- }).toThrow(/parameter 'diskSizeInMb' must be between 512 and 10240, but got 0/);
11
- (0, bun_test_1.expect)(() => {
12
- (0, validate_disk_size_in_mb_1.validateDiskSizeInMb)({});
13
- }).toThrow(/parameter 'diskSizeInMb' must be a number, got a object/);
14
- });
package/eslint.config.mjs DELETED
@@ -1,5 +0,0 @@
1
- import {remotionFlatConfig} from '@remotion/eslint-config-internal';
2
-
3
- const config = remotionFlatConfig({react: false});
4
-
5
- export default [config];
@@ -1,73 +0,0 @@
1
- import type {
2
- WebhookErrorPayload,
3
- WebhookPayload,
4
- WebhookSuccessPayload,
5
- WebhookTimeoutPayload,
6
- } from '@remotion/serverless-client';
7
- import {validateWebhookSignature} from './validate-webhook-signature';
8
-
9
- export type NextWebhookArgs = {
10
- testing?: boolean;
11
- extraHeaders?: Record<string, string>;
12
- secret: string;
13
- onSuccess?: (payload: WebhookSuccessPayload) => void | Promise<void>;
14
- onTimeout?: (payload: WebhookTimeoutPayload) => void | Promise<void>;
15
- onError?: (payload: WebhookErrorPayload) => void | Promise<void>;
16
- };
17
-
18
- export const appRouterWebhook = (
19
- options: NextWebhookArgs,
20
- ): ((req: Request) => Promise<Response>) => {
21
- const {testing, extraHeaders, secret, onSuccess, onTimeout, onError} =
22
- options;
23
- return async function (req: Request): Promise<Response> {
24
- let headers = extraHeaders || {};
25
-
26
- if (testing) {
27
- const testingheaders = {
28
- 'Access-Control-Allow-Origin': 'https://www.remotion.dev',
29
- 'Access-Control-Allow-Headers':
30
- 'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version, X-Remotion-Status, X-Remotion-Signature, X-Remotion-Mode',
31
- 'Access-Control-Allow-Methods': 'OPTIONS,POST',
32
- };
33
- headers = {...headers, ...testingheaders};
34
- }
35
-
36
- if (req.method === 'OPTIONS') {
37
- // do we have any use of the OPTIONS method other than the tester on webhooks page ? if so we can add a condition here to only return this if testing mode enabled
38
- return new Response(null, {
39
- headers,
40
- });
41
- }
42
-
43
- // Parse the body properly
44
- const body = await req.json();
45
-
46
- try {
47
- validateWebhookSignature({
48
- secret,
49
- body,
50
- signatureHeader: req.headers.get('X-Remotion-Signature') as string,
51
- });
52
-
53
- const payload = body as WebhookPayload;
54
- if (payload.type === 'success' && onSuccess) {
55
- await onSuccess(payload);
56
- } else if (payload.type === 'timeout' && onTimeout) {
57
- await onTimeout(payload);
58
- } else if (payload.type === 'error' && onError) {
59
- await onError(payload);
60
- }
61
- } catch (err) {
62
- return new Response(
63
- JSON.stringify({
64
- success: false,
65
- error: err instanceof Error ? err.message : String(err),
66
- }),
67
- {status: 500, headers},
68
- );
69
- }
70
-
71
- return new Response(JSON.stringify({success: true}), {headers});
72
- };
73
- };
@@ -1,30 +0,0 @@
1
- import type {
2
- DeleteBucketLifecycleCommandInput,
3
- LifecycleRule,
4
- PutBucketLifecycleConfigurationCommandInput,
5
- } from '@aws-sdk/client-s3';
6
-
7
- export const deleteLifeCycleInput = ({
8
- bucketName,
9
- }: {
10
- bucketName: string;
11
- }): DeleteBucketLifecycleCommandInput => {
12
- return {
13
- Bucket: bucketName,
14
- };
15
- };
16
-
17
- export const createLifeCycleInput = ({
18
- bucketName,
19
- lcRules,
20
- }: {
21
- bucketName: string;
22
- lcRules: LifecycleRule[];
23
- }): PutBucketLifecycleConfigurationCommandInput => {
24
- return {
25
- Bucket: bucketName,
26
- LifecycleConfiguration: {
27
- Rules: lcRules,
28
- },
29
- };
30
- };
@@ -1,75 +0,0 @@
1
- import type {CloudWatchLogsClient} from '@aws-sdk/client-cloudwatch-logs';
2
- import type {IAMClient} from '@aws-sdk/client-iam';
3
- import type {LambdaClient} from '@aws-sdk/client-lambda';
4
- import type {ServiceQuotasClient} from '@aws-sdk/client-service-quotas';
5
- import type {STSClient} from '@aws-sdk/client-sts';
6
- import {getServiceClient} from './get-service-client';
7
- import type {AwsRegion} from './regions';
8
- import type {RequestHandler} from './types';
9
-
10
- export const getCloudWatchLogsClient = (
11
- region: AwsRegion,
12
- requestHandler: RequestHandler | null,
13
- ): CloudWatchLogsClient => {
14
- return getServiceClient({
15
- region,
16
- service: 'cloudwatch',
17
- customCredentials: null,
18
- forcePathStyle: false,
19
- requestHandler,
20
- });
21
- };
22
-
23
- export const getLambdaClient = (
24
- region: AwsRegion,
25
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
26
- _timeoutInTest: number | undefined,
27
- requestHandler: RequestHandler | null,
28
- ): LambdaClient => {
29
- return getServiceClient({
30
- region,
31
- service: 'lambda',
32
- customCredentials: null,
33
- forcePathStyle: false,
34
- requestHandler,
35
- });
36
- };
37
-
38
- export const getIamClient = (
39
- region: AwsRegion,
40
- requestHandler: RequestHandler | null,
41
- ): IAMClient => {
42
- return getServiceClient({
43
- region,
44
- service: 'iam',
45
- customCredentials: null,
46
- forcePathStyle: false,
47
- requestHandler,
48
- });
49
- };
50
-
51
- export const getServiceQuotasClient = (
52
- region: AwsRegion,
53
- requestHandler: RequestHandler | null,
54
- ): ServiceQuotasClient => {
55
- return getServiceClient({
56
- region,
57
- service: 'servicequotas',
58
- customCredentials: null,
59
- forcePathStyle: false,
60
- requestHandler,
61
- });
62
- };
63
-
64
- export const getStsClient = (
65
- region: AwsRegion,
66
- requestHandler: RequestHandler | null,
67
- ): STSClient => {
68
- return getServiceClient({
69
- region,
70
- service: 'sts',
71
- customCredentials: null,
72
- forcePathStyle: false,
73
- requestHandler,
74
- });
75
- };