@remotion/lambda-client 4.0.364 → 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 (103) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/esm/index.mjs +1 -1
  3. package/package.json +3 -3
  4. package/.turbo/turbo-formatting.log +0 -4
  5. package/.turbo/turbo-lint.log +0 -25
  6. package/.turbo/turbo-make.log +0 -3
  7. package/bundle.ts +0 -20
  8. package/dist/cjs/test/concurrency-payload.test.d.ts +0 -1
  9. package/dist/cjs/test/encode-aws-url.test.d.ts +0 -1
  10. package/dist/cjs/test/price-calculation.test.d.ts +0 -1
  11. package/dist/cjs/test/pricing.test.d.ts +0 -1
  12. package/dist/cjs/test/request-handler.test.d.ts +0 -1
  13. package/dist/cjs/test/validate-disk-size-in-mb.test.d.ts +0 -1
  14. package/dist/test/concurrency-payload.test.d.ts +0 -1
  15. package/dist/test/concurrency-payload.test.js +0 -119
  16. package/dist/test/encode-aws-url.test.d.ts +0 -1
  17. package/dist/test/encode-aws-url.test.js +0 -8
  18. package/dist/test/price-calculation.test.d.ts +0 -1
  19. package/dist/test/price-calculation.test.js +0 -62
  20. package/dist/test/pricing.test.d.ts +0 -1
  21. package/dist/test/pricing.test.js +0 -27
  22. package/dist/test/request-handler.test.d.ts +0 -1
  23. package/dist/test/request-handler.test.js +0 -36
  24. package/dist/test/validate-disk-size-in-mb.test.d.ts +0 -1
  25. package/dist/test/validate-disk-size-in-mb.test.js +0 -14
  26. package/dist/tsconfig.tsbuildinfo +0 -1
  27. package/eslint.config.mjs +0 -5
  28. package/src/app-router-webhook.ts +0 -73
  29. package/src/apply-lifecycle.ts +0 -30
  30. package/src/aws-clients.ts +0 -75
  31. package/src/aws-provider.ts +0 -139
  32. package/src/bucket-exists.ts +0 -35
  33. package/src/call-lambda-async.ts +0 -43
  34. package/src/call-lambda-streaming.ts +0 -226
  35. package/src/call-lambda-sync.ts +0 -59
  36. package/src/check-credentials.ts +0 -51
  37. package/src/clean-items.ts +0 -50
  38. package/src/constants.ts +0 -38
  39. package/src/content-disposition-header.ts +0 -64
  40. package/src/convert-to-serve-url.ts +0 -24
  41. package/src/create-bucket.ts +0 -87
  42. package/src/delete-file.ts +0 -38
  43. package/src/delete-function.ts +0 -28
  44. package/src/delete-render.ts +0 -114
  45. package/src/encode-aws-url-params.ts +0 -3
  46. package/src/estimate-price.ts +0 -95
  47. package/src/express-webhook.ts +0 -57
  48. package/src/get-account-id.ts +0 -22
  49. package/src/get-aws-client.ts +0 -63
  50. package/src/get-aws-urls.ts +0 -85
  51. package/src/get-buckets.ts +0 -84
  52. package/src/get-compositions-on-lambda.ts +0 -111
  53. package/src/get-credentials.ts +0 -81
  54. package/src/get-env-variable.ts +0 -15
  55. package/src/get-function-name.ts +0 -24
  56. package/src/get-function-version.ts +0 -49
  57. package/src/get-functions.ts +0 -114
  58. package/src/get-output-url-from-metadata.ts +0 -23
  59. package/src/get-render-progress.ts +0 -66
  60. package/src/get-s3-client.ts +0 -26
  61. package/src/get-service-client.ts +0 -195
  62. package/src/get-sites.ts +0 -136
  63. package/src/head-file.ts +0 -30
  64. package/src/index.ts +0 -152
  65. package/src/is-cli.ts +0 -7
  66. package/src/is-flaky-error.ts +0 -104
  67. package/src/is-in-lambda.ts +0 -5
  68. package/src/is-likely-to-have-aws-profile.ts +0 -55
  69. package/src/lambda-version-string.ts +0 -5
  70. package/src/lifecycle-rules.ts +0 -119
  71. package/src/lifecycle.ts +0 -44
  72. package/src/list-objects.ts +0 -87
  73. package/src/make-lambda-payload.ts +0 -328
  74. package/src/make-s3-url.ts +0 -13
  75. package/src/p-limit.ts +0 -75
  76. package/src/pages-router-webhook.ts +0 -68
  77. package/src/parse-function-name.ts +0 -24
  78. package/src/presign-url.ts +0 -121
  79. package/src/price-per-1s.ts +0 -863
  80. package/src/random-hash.ts +0 -10
  81. package/src/read-file.ts +0 -35
  82. package/src/regions.ts +0 -48
  83. package/src/render-media-on-lambda.ts +0 -227
  84. package/src/render-still-on-lambda.ts +0 -209
  85. package/src/runtime-preference.ts +0 -7
  86. package/src/speculate-function-name.ts +0 -60
  87. package/src/test/concurrency-payload.test.ts +0 -121
  88. package/src/test/encode-aws-url.test.ts +0 -7
  89. package/src/test/price-calculation.test.ts +0 -62
  90. package/src/test/pricing.test.ts +0 -32
  91. package/src/test/request-handler.test.ts +0 -42
  92. package/src/test/validate-disk-size-in-mb.test.ts +0 -15
  93. package/src/types.ts +0 -7
  94. package/src/validate-aws-region.ts +0 -14
  95. package/src/validate-bucketname.ts +0 -24
  96. package/src/validate-disk-size-in-mb.ts +0 -37
  97. package/src/validate-lambda-codec.ts +0 -28
  98. package/src/validate-memory-size.ts +0 -31
  99. package/src/validate-presign-expiration.ts +0 -46
  100. package/src/validate-serveurl.ts +0 -9
  101. package/src/validate-webhook-signature.ts +0 -42
  102. package/src/write-file.ts +0 -108
  103. package/tsconfig.json +0 -10
package/dist/cjs/index.js CHANGED
@@ -67361,7 +67361,7 @@ var validateDownloadBehavior = (downloadBehavior) => {
67361
67361
  }
67362
67362
  }
67363
67363
  };
67364
- var VERSION = "4.0.364";
67364
+ var VERSION = "4.0.365";
67365
67365
  var isColorSupported = () => {
67366
67366
  const env = process.env || {};
67367
67367
  const isForceDisabled = "NO_COLOR" in env;
@@ -67314,7 +67314,7 @@ var validateDownloadBehavior = (downloadBehavior) => {
67314
67314
  }
67315
67315
  }
67316
67316
  };
67317
- var VERSION = "4.0.364";
67317
+ var VERSION = "4.0.365";
67318
67318
  var isColorSupported = () => {
67319
67319
  const env = process.env || {};
67320
67320
  const isForceDisabled = "NO_COLOR" in env;
package/package.json CHANGED
@@ -3,7 +3,7 @@
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.364",
6
+ "version": "4.0.365",
7
7
  "main": "dist/cjs/index.js",
8
8
  "sideEffects": false,
9
9
  "scripts": {
@@ -26,10 +26,10 @@
26
26
  "@aws-sdk/lib-storage": "3.787.0",
27
27
  "mime-types": "2.1.34",
28
28
  "@aws-sdk/credential-provider-ini": "3.787.0",
29
- "@remotion/serverless-client": "4.0.364",
29
+ "@remotion/serverless-client": "4.0.365",
30
30
  "@types/express": "^5.0.0",
31
31
  "express": "4.21.0",
32
- "@remotion/eslint-config-internal": "4.0.364",
32
+ "@remotion/eslint-config-internal": "4.0.365",
33
33
  "eslint": "9.19.0",
34
34
  "next": "15.4.7",
35
35
  "@types/mime-types": "2.1.1"
@@ -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
- [135.05ms] Generated.
package/bundle.ts DELETED
@@ -1,20 +0,0 @@
1
- import {buildPackage} from '../.monorepo/builder';
2
-
3
- await buildPackage({
4
- formats: {
5
- cjs: 'build',
6
- esm: 'build',
7
- },
8
- external: 'dependencies',
9
- entrypoints: [
10
- {
11
- path: 'src/index.ts',
12
- target: 'node',
13
- },
14
- {
15
- path: 'src/constants.ts',
16
- target: 'browser',
17
- },
18
- {path: 'src/regions.ts', target: 'browser'},
19
- ],
20
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -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
- });