@remotion/lambda 4.0.0-alpha.217 → 4.0.0-alpha10

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 (86) hide show
  1. package/dist/admin/bundle-lambda.js +12 -12
  2. package/dist/admin/generate-etag-list.js +4 -4
  3. package/dist/admin/make-layer-public.js +4 -5
  4. package/dist/api/create-bucket.js +34 -1
  5. package/dist/api/create-function.js +4 -4
  6. package/dist/api/delete-function.d.ts +2 -2
  7. package/dist/api/delete-function.js +2 -2
  8. package/dist/api/delete-site.d.ts +4 -4
  9. package/dist/api/delete-site.js +4 -4
  10. package/dist/api/deploy-function.d.ts +8 -7
  11. package/dist/api/deploy-function.js +26 -25
  12. package/dist/api/deploy-site.d.ts +2 -1
  13. package/dist/api/deploy-site.js +7 -4
  14. package/dist/api/download-media.d.ts +1 -1
  15. package/dist/api/download-media.js +3 -3
  16. package/dist/api/get-compositions-on-lambda.d.ts +1 -1
  17. package/dist/api/get-functions.d.ts +3 -3
  18. package/dist/api/get-functions.js +7 -7
  19. package/dist/api/get-or-create-bucket.d.ts +2 -2
  20. package/dist/api/get-or-create-bucket.js +6 -6
  21. package/dist/api/get-render-progress.d.ts +1 -1
  22. package/dist/api/get-render-progress.js +5 -10
  23. package/dist/api/get-sites.d.ts +0 -1
  24. package/dist/api/iam-validation/user-permissions.js +2 -0
  25. package/dist/api/make-lambda-payload.d.ts +5 -0
  26. package/dist/api/make-lambda-payload.js +77 -0
  27. package/dist/api/render-media-on-lambda.d.ts +3 -3
  28. package/dist/api/render-media-on-lambda.js +4 -60
  29. package/dist/api/render-still-on-lambda.d.ts +1 -1
  30. package/dist/api/speculate-function-name.d.ts +3 -3
  31. package/dist/api/speculate-function-name.js +3 -3
  32. package/dist/api/upload-dir.js +7 -7
  33. package/dist/cli/commands/functions/deploy.js +6 -3
  34. package/dist/cli/commands/functions/ls.js +8 -3
  35. package/dist/cli/commands/functions/rm.js +12 -5
  36. package/dist/cli/commands/functions/rmall.js +12 -6
  37. package/dist/cli/commands/quotas/increase.js +2 -2
  38. package/dist/cli/commands/render/render.js +32 -14
  39. package/dist/cli/commands/sites/create.js +5 -1
  40. package/dist/cli/commands/sites/index.js +3 -0
  41. package/dist/cli/commands/still.js +24 -9
  42. package/dist/cli/help.js +4 -0
  43. package/dist/cli/index.js +3 -3
  44. package/dist/cli/log.d.ts +2 -0
  45. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
  46. package/dist/functions/helpers/clean-tmpdir.js +7 -7
  47. package/dist/functions/helpers/concat-videos.js +7 -7
  48. package/dist/functions/helpers/get-browser-instance.js +1 -0
  49. package/dist/functions/helpers/get-chromium-executable-path.js +7 -6
  50. package/dist/functions/helpers/get-current-region.d.ts +1 -1
  51. package/dist/functions/helpers/get-files-in-folder.js +5 -5
  52. package/dist/functions/helpers/io.d.ts +8 -2
  53. package/dist/functions/helpers/io.js +22 -2
  54. package/dist/functions/helpers/streamify-response.d.ts +16 -0
  55. package/dist/functions/helpers/streamify-response.js +67 -0
  56. package/dist/functions/helpers/validate-composition.d.ts +4 -3
  57. package/dist/functions/helpers/validate-composition.js +9 -12
  58. package/dist/functions/index.d.ts +1 -18
  59. package/dist/functions/index.js +31 -10
  60. package/dist/functions/launch.js +12 -13
  61. package/dist/functions/renderer.js +6 -6
  62. package/dist/functions/still.js +8 -7
  63. package/dist/index.d.ts +1 -1
  64. package/dist/internals.d.ts +2 -0
  65. package/dist/internals.js +3 -0
  66. package/dist/shared/aws-clients.js +2 -2
  67. package/dist/shared/call-lambda.js +27 -2
  68. package/dist/shared/constants.d.ts +47 -45
  69. package/dist/shared/deserialize-input-props.d.ts +1 -1
  70. package/dist/shared/function-zip-path.js +2 -2
  71. package/dist/shared/get-etag.js +4 -4
  72. package/dist/shared/hosted-layers.js +35 -119
  73. package/dist/shared/invoke-webhook.d.ts +3 -1
  74. package/dist/shared/invoke-webhook.js +4 -4
  75. package/dist/shared/make-s3-key.js +2 -2
  76. package/dist/shared/make-s3-url.js +2 -2
  77. package/dist/shared/read-dir.js +2 -2
  78. package/dist/shared/return-values.d.ts +5 -0
  79. package/dist/shared/serialize-input-props.d.ts +1 -1
  80. package/dist/shared/serialize-input-props.js +1 -1
  81. package/dist/shared/validate-privacy.d.ts +1 -1
  82. package/dist/shared/validate-privacy.js +5 -2
  83. package/package.json +89 -90
  84. package/remotionlambda-arm64.zip +0 -0
  85. package/remotionlambda-x64.zip +0 -0
  86. package/remotionlambda.zip +0 -0
@@ -6,295 +6,211 @@ exports.hostedLayers = {
6
6
  'ap-northeast-1': [
7
7
  {
8
8
  layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-fonts-arm64',
9
- version: 4,
10
- },
11
- {
12
- layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
13
9
  version: 8,
14
10
  },
15
11
  {
16
12
  layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-chromium-arm64',
17
- version: 8,
13
+ version: 12,
18
14
  },
19
15
  ],
20
16
  'ap-south-1': [
21
17
  {
22
18
  layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
23
- version: 4,
24
- },
25
- {
26
- layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
27
19
  version: 8,
28
20
  },
29
21
  {
30
22
  layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
31
- version: 8,
23
+ version: 12,
32
24
  },
33
25
  ],
34
26
  'ap-southeast-1': [
35
27
  {
36
28
  layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-fonts-arm64',
37
- version: 4,
38
- },
39
- {
40
- layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
41
29
  version: 8,
42
30
  },
43
31
  {
44
32
  layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-chromium-arm64',
45
- version: 8,
33
+ version: 12,
46
34
  },
47
35
  ],
48
36
  'ap-southeast-2': [
49
37
  {
50
38
  layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-fonts-arm64',
51
- version: 4,
52
- },
53
- {
54
- layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
55
39
  version: 8,
56
40
  },
57
41
  {
58
42
  layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-chromium-arm64',
59
- version: 8,
43
+ version: 12,
60
44
  },
61
45
  ],
62
46
  'eu-central-1': [
63
47
  {
64
48
  layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-fonts-arm64',
65
- version: 4,
66
- },
67
- {
68
- layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
69
- version: 8,
49
+ version: 17,
70
50
  },
71
51
  {
72
52
  layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-chromium-arm64',
73
- version: 8,
53
+ version: 18,
74
54
  },
75
55
  ],
76
56
  'eu-west-1': [
77
57
  {
78
58
  layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-fonts-arm64',
79
- version: 4,
80
- },
81
- {
82
- layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
83
- version: 8,
59
+ version: 9,
84
60
  },
85
61
  {
86
62
  layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-chromium-arm64',
87
- version: 8,
63
+ version: 12,
88
64
  },
89
65
  ],
90
66
  'eu-west-2': [
91
67
  {
92
68
  layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-fonts-arm64',
93
- version: 4,
94
- },
95
- {
96
- layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
97
69
  version: 8,
98
70
  },
99
71
  {
100
72
  layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-chromium-arm64',
101
- version: 8,
73
+ version: 12,
102
74
  },
103
75
  ],
104
76
  'us-east-1': [
105
77
  {
106
78
  layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-fonts-arm64',
107
- version: 9,
108
- },
109
- {
110
- layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
111
- version: 17,
79
+ version: 13,
112
80
  },
113
81
  {
114
82
  layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-chromium-arm64',
115
- version: 17,
83
+ version: 21,
116
84
  },
117
85
  ],
118
86
  'us-east-2': [
119
87
  {
120
88
  layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-fonts-arm64',
121
- version: 4,
122
- },
123
- {
124
- layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
125
89
  version: 8,
126
90
  },
127
91
  {
128
92
  layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-chromium-arm64',
129
- version: 8,
93
+ version: 12,
130
94
  },
131
95
  ],
132
96
  'us-west-2': [
133
97
  {
134
98
  layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-fonts-arm64',
135
- version: 4,
136
- },
137
- {
138
- layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
139
99
  version: 8,
140
100
  },
141
101
  {
142
102
  layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-chromium-arm64',
143
- version: 8,
103
+ version: 12,
144
104
  },
145
105
  ],
146
106
  'af-south-1': [
147
107
  {
148
108
  layerArn: 'arn:aws:lambda:af-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
149
- version: 1,
150
- },
151
- {
152
- layerArn: 'arn:aws:lambda:af-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
153
- version: 1,
109
+ version: 5,
154
110
  },
155
111
  {
156
112
  layerArn: 'arn:aws:lambda:af-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
157
- version: 1,
113
+ version: 5,
158
114
  },
159
115
  ],
160
116
  'ap-east-1': [
161
117
  {
162
118
  layerArn: 'arn:aws:lambda:ap-east-1:678892195805:layer:remotion-binaries-fonts-arm64',
163
- version: 1,
164
- },
165
- {
166
- layerArn: 'arn:aws:lambda:ap-east-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
167
- version: 1,
119
+ version: 5,
168
120
  },
169
121
  {
170
122
  layerArn: 'arn:aws:lambda:ap-east-1:678892195805:layer:remotion-binaries-chromium-arm64',
171
- version: 1,
123
+ version: 5,
172
124
  },
173
125
  ],
174
126
  'ap-northeast-2': [
175
127
  {
176
128
  layerArn: 'arn:aws:lambda:ap-northeast-2:678892195805:layer:remotion-binaries-fonts-arm64',
177
- version: 1,
178
- },
179
- {
180
- layerArn: 'arn:aws:lambda:ap-northeast-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
181
- version: 1,
129
+ version: 5,
182
130
  },
183
131
  {
184
132
  layerArn: 'arn:aws:lambda:ap-northeast-2:678892195805:layer:remotion-binaries-chromium-arm64',
185
- version: 1,
133
+ version: 5,
186
134
  },
187
135
  ],
188
136
  'ap-northeast-3': [
189
137
  {
190
138
  layerArn: 'arn:aws:lambda:ap-northeast-3:678892195805:layer:remotion-binaries-fonts-arm64',
191
- version: 1,
192
- },
193
- {
194
- layerArn: 'arn:aws:lambda:ap-northeast-3:678892195805:layer:remotion-binaries-ffmpeg-arm64',
195
- version: 1,
139
+ version: 5,
196
140
  },
197
141
  {
198
142
  layerArn: 'arn:aws:lambda:ap-northeast-3:678892195805:layer:remotion-binaries-chromium-arm64',
199
- version: 1,
143
+ version: 5,
200
144
  },
201
145
  ],
202
146
  'ca-central-1': [
203
147
  {
204
148
  layerArn: 'arn:aws:lambda:ca-central-1:678892195805:layer:remotion-binaries-fonts-arm64',
205
- version: 1,
206
- },
207
- {
208
- layerArn: 'arn:aws:lambda:ca-central-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
209
- version: 1,
149
+ version: 5,
210
150
  },
211
151
  {
212
152
  layerArn: 'arn:aws:lambda:ca-central-1:678892195805:layer:remotion-binaries-chromium-arm64',
213
- version: 1,
153
+ version: 5,
214
154
  },
215
155
  ],
216
156
  'eu-north-1': [
217
157
  {
218
158
  layerArn: 'arn:aws:lambda:eu-north-1:678892195805:layer:remotion-binaries-fonts-arm64',
219
- version: 1,
220
- },
221
- {
222
- layerArn: 'arn:aws:lambda:eu-north-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
223
- version: 1,
159
+ version: 5,
224
160
  },
225
161
  {
226
162
  layerArn: 'arn:aws:lambda:eu-north-1:678892195805:layer:remotion-binaries-chromium-arm64',
227
- version: 1,
163
+ version: 5,
228
164
  },
229
165
  ],
230
166
  'eu-south-1': [
231
167
  {
232
168
  layerArn: 'arn:aws:lambda:eu-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
233
- version: 1,
234
- },
235
- {
236
- layerArn: 'arn:aws:lambda:eu-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
237
- version: 1,
169
+ version: 5,
238
170
  },
239
171
  {
240
172
  layerArn: 'arn:aws:lambda:eu-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
241
- version: 1,
173
+ version: 5,
242
174
  },
243
175
  ],
244
176
  'eu-west-3': [
245
177
  {
246
178
  layerArn: 'arn:aws:lambda:eu-west-3:678892195805:layer:remotion-binaries-fonts-arm64',
247
- version: 1,
248
- },
249
- {
250
- layerArn: 'arn:aws:lambda:eu-west-3:678892195805:layer:remotion-binaries-ffmpeg-arm64',
251
- version: 1,
179
+ version: 5,
252
180
  },
253
181
  {
254
182
  layerArn: 'arn:aws:lambda:eu-west-3:678892195805:layer:remotion-binaries-chromium-arm64',
255
- version: 1,
183
+ version: 5,
256
184
  },
257
185
  ],
258
186
  'me-south-1': [
259
187
  {
260
188
  layerArn: 'arn:aws:lambda:me-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
261
- version: 1,
262
- },
263
- {
264
- layerArn: 'arn:aws:lambda:me-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
265
- version: 1,
189
+ version: 5,
266
190
  },
267
191
  {
268
192
  layerArn: 'arn:aws:lambda:me-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
269
- version: 1,
193
+ version: 5,
270
194
  },
271
195
  ],
272
196
  'sa-east-1': [
273
197
  {
274
198
  layerArn: 'arn:aws:lambda:sa-east-1:678892195805:layer:remotion-binaries-fonts-arm64',
275
- version: 1,
276
- },
277
- {
278
- layerArn: 'arn:aws:lambda:sa-east-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
279
- version: 1,
199
+ version: 5,
280
200
  },
281
201
  {
282
202
  layerArn: 'arn:aws:lambda:sa-east-1:678892195805:layer:remotion-binaries-chromium-arm64',
283
- version: 1,
203
+ version: 5,
284
204
  },
285
205
  ],
286
206
  'us-west-1': [
287
207
  {
288
208
  layerArn: 'arn:aws:lambda:us-west-1:678892195805:layer:remotion-binaries-fonts-arm64',
289
- version: 1,
290
- },
291
- {
292
- layerArn: 'arn:aws:lambda:us-west-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
293
- version: 1,
209
+ version: 5,
294
210
  },
295
211
  {
296
212
  layerArn: 'arn:aws:lambda:us-west-1:678892195805:layer:remotion-binaries-chromium-arm64',
297
- version: 1,
213
+ version: 5,
298
214
  },
299
215
  ],
300
216
  };
@@ -1,5 +1,7 @@
1
- import http from 'http';
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import https from 'https';
4
+ import http from 'node:http';
3
5
  import type { EnhancedErrorInfo } from '../functions/helpers/write-lambda-error';
4
6
  import type { AfterRenderCost } from './constants';
5
7
  /**
@@ -27,9 +27,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.invokeWebhook = exports.mockableHttpClients = exports.calculateSignature = void 0;
30
- const Crypto = __importStar(require("crypto"));
31
- const http_1 = __importDefault(require("http"));
32
30
  const https_1 = __importDefault(require("https"));
31
+ const Crypto = __importStar(require("node:crypto"));
32
+ const node_http_1 = __importDefault(require("node:http"));
33
33
  /**
34
34
  * @description Calculates cryptographically secure signature for webhooks using Hmac.
35
35
  * @link https://remotion.dev/docs/lambda/webhooks#validate-webhooks
@@ -56,7 +56,7 @@ const getWebhookClient = (url) => {
56
56
  throw new Error('Can only request URLs starting with http:// or https://');
57
57
  };
58
58
  exports.mockableHttpClients = {
59
- http: http_1.default.request,
59
+ http: node_http_1.default.request,
60
60
  https: https_1.default.request,
61
61
  };
62
62
  function invokeWebhook({ payload, secret, url, }) {
@@ -74,7 +74,7 @@ function invokeWebhook({ payload, secret, url, }) {
74
74
  timeout: 5000,
75
75
  }, (res) => {
76
76
  if (res.statusCode && res.statusCode > 299) {
77
- reject(new Error(`Sent a webhook but got a status code of ${res.statusCode} with message '${res.statusMessage}'`));
77
+ reject(new Error(`Sent a webhook to ${url} but got a status code of ${res.statusCode} with message '${res.statusMessage}'`));
78
78
  return;
79
79
  }
80
80
  resolve();
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.makeS3Key = void 0;
7
- const path_1 = __importDefault(require("path"));
7
+ const node_path_1 = __importDefault(require("node:path"));
8
8
  const makeS3Key = (folder, dir, filePath) => {
9
- return `${folder}/${path_1.default.relative(dir, filePath).split(path_1.default.sep).join('/')}`;
9
+ return `${folder}/${node_path_1.default.relative(dir, filePath).split(node_path_1.default.sep).join('/')}`;
10
10
  };
11
11
  exports.makeS3Key = makeS3Key;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getServeUrlHash = exports.makeS3ServeUrl = void 0;
7
- const crypto_1 = __importDefault(require("crypto"));
7
+ const node_crypto_1 = __importDefault(require("node:crypto"));
8
8
  const makeS3ServeUrl = ({ bucketName, subFolder, region, }) => {
9
9
  return `https://${bucketName}.s3.${region}.amazonaws.com/${subFolder}/index.html`;
10
10
  };
@@ -14,7 +14,7 @@ const getServeUrlHash = (url) => {
14
14
  if (hashCache[url]) {
15
15
  return hashCache[url];
16
16
  }
17
- const hash = crypto_1.default.createHash('md5').update(url).digest('hex');
17
+ const hash = node_crypto_1.default.createHash('md5').update(url).digest('hex');
18
18
  hashCache[url] = hash;
19
19
  return hash;
20
20
  };
@@ -24,8 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.readDirectory = void 0;
27
- const fs = __importStar(require("fs"));
28
- const path = __importStar(require("path"));
27
+ const fs = __importStar(require("node:fs"));
28
+ const path = __importStar(require("node:path"));
29
29
  const get_etag_1 = require("./get-etag");
30
30
  // Function to recursively read a directory and return a list of files
31
31
  // with their etags and file names
@@ -15,3 +15,8 @@ export interface LambdaReturnValues {
15
15
  [LambdaRoutines.still]: ReturnType<typeof stillHandler>;
16
16
  [LambdaRoutines.compositions]: ReturnType<typeof compositionsHandler>;
17
17
  }
18
+ export declare type StreamedResponse = {
19
+ statusCode: number;
20
+ headers: Record<string, string>;
21
+ body: string;
22
+ };
@@ -1,7 +1,7 @@
1
1
  import type { AwsRegion } from '../client';
2
2
  import type { SerializedInputProps } from './constants';
3
3
  export declare const serializeInputProps: ({ inputProps, region, type, userSpecifiedBucketName, }: {
4
- inputProps: unknown;
4
+ inputProps: Record<string, unknown>;
5
5
  region: AwsRegion;
6
6
  type: 'still' | 'video-or-audio';
7
7
  userSpecifiedBucketName: string | null;
@@ -5,7 +5,7 @@ const get_or_create_bucket_1 = require("../api/get-or-create-bucket");
5
5
  const io_1 = require("../functions/helpers/io");
6
6
  const constants_1 = require("./constants");
7
7
  const random_hash_1 = require("./random-hash");
8
- const serializeInputProps = async ({ inputProps, region, type, userSpecifiedBucketName, }) => {
8
+ const serializeInputProps = async ({ inputProps = {}, region, type, userSpecifiedBucketName, }) => {
9
9
  try {
10
10
  const payload = JSON.stringify(inputProps);
11
11
  const hash = (0, random_hash_1.randomHash)();
@@ -1,2 +1,2 @@
1
1
  import type { Privacy } from './constants';
2
- export declare function validatePrivacy(privacy: unknown): asserts privacy is Privacy;
2
+ export declare function validatePrivacy(privacy: unknown, allowPrivate: boolean): asserts privacy is Privacy;
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validatePrivacy = void 0;
4
- function validatePrivacy(privacy) {
4
+ function validatePrivacy(privacy, allowPrivate) {
5
5
  if (typeof privacy !== 'string') {
6
6
  throw new TypeError('Privacy must be a string');
7
7
  }
8
+ if (!allowPrivate && privacy === 'private') {
9
+ throw new TypeError('Privacy must be either "public" or "no-acl"');
10
+ }
8
11
  if (privacy !== 'private' && privacy !== 'public' && privacy !== 'no-acl') {
9
- throw new TypeError('Privacy must be either "private", "public-read" or "no-acl"');
12
+ throw new TypeError('Privacy must be either "private", "public" or "no-acl"');
10
13
  }
11
14
  }
12
15
  exports.validatePrivacy = validatePrivacy;
package/package.json CHANGED
@@ -1,91 +1,90 @@
1
1
  {
2
- "name": "@remotion/lambda",
3
- "version": "4.0.0-alpha.217+27eff7599",
4
- "description": "Distributed renderer for Remotion based on AWS Lambda",
5
- "main": "dist/index.js",
6
- "sideEffects": false,
7
- "bin": {
8
- "remotion-lambda": "remotion-lambda-cli.js"
9
- },
10
- "scripts": {
11
- "testintegration": "vitest src/test/integration --run",
12
- "lint": "eslint src --ext ts,tsx",
13
- "test": "vitest src/test/unit --run",
14
- "watch": "tsc -w",
15
- "build": "tsc -d && pnpm run buildlambda",
16
- "buildlambda": "ts-node src/admin/bundle-lambda.ts",
17
- "start": "ts-node src/run.ts",
18
- "prepublishOnly": "ts-node src/admin/bundle-lambda.ts && node ensure-version-match.js"
19
- },
20
- "author": "Jonny Burger <jonny@remotion.dev>",
21
- "license": "MIT",
22
- "repository": {
23
- "url": "https://github.com/JonnyBurger/remotion"
24
- },
25
- "dependencies": {
26
- "@aws-sdk/abort-controller": "3.272.0",
27
- "@aws-sdk/client-cloudwatch-logs": "3.272.0",
28
- "@aws-sdk/client-iam": "3.272.0",
29
- "@aws-sdk/client-lambda": "3.272.0",
30
- "@aws-sdk/client-s3": "3.272.0",
31
- "@aws-sdk/client-service-quotas": "3.272.0",
32
- "@aws-sdk/client-sts": "3.272.0",
33
- "@aws-sdk/credential-providers": "3.272.0",
34
- "@aws-sdk/lib-storage": "3.272.0",
35
- "@aws-sdk/s3-request-presigner": "3.272.0",
36
- "@remotion/bundler": "4.0.0-alpha.217+27eff7599",
37
- "@remotion/cli": "4.0.0-alpha.217+27eff7599",
38
- "@remotion/renderer": "4.0.0-alpha.217+27eff7599",
39
- "aws-policies": "^1.0.1",
40
- "mime-types": "2.1.34",
41
- "remotion": "4.0.0-alpha.217+27eff7599"
42
- },
43
- "devDependencies": {
44
- "@jonny/eslint-config": "3.0.266",
45
- "@remotion/bundler": "workspace:*",
46
- "@remotion/compositor-linux-arm64-musl": "4.0.0-alpha.217+27eff7599",
47
- "@types/mime-types": "2.1.1",
48
- "@types/minimist": "1.2.2",
49
- "@types/node": "^14.14.14",
50
- "@types/prompt": "^1.1.0",
51
- "eslint": "8.25.0",
52
- "prettier": "^2.4.1",
53
- "prettier-plugin-organize-imports": "^2.3.4",
54
- "ts-node": "^10.8.0",
55
- "typescript": "^4.7.0",
56
- "vitest": "^0.24.3",
57
- "zip-lib": "^0.7.2"
58
- },
59
- "peerDependencies": {
60
- "@remotion/bundler": "workspace:*"
61
- },
62
- "publishConfig": {
63
- "access": "public"
64
- },
65
- "exports": {
66
- "./package.json": "./package.json",
67
- ".": "./dist/index.js",
68
- "./defaults": "./dist/defaults.js",
69
- "./regions": "./dist/regions.js",
70
- "./policies": "./dist/api/iam-validation/suggested-policy.js",
71
- "./client": "./dist/client.js",
72
- "./layers": "./dist/shared/hosted-layers.js"
73
- },
74
- "typesVersions": {
75
- ">=1.0": {
76
- "defaults": [
77
- "dist/defaults.d.ts"
78
- ],
79
- "regions": [
80
- "dist/regions.d.ts"
81
- ],
82
- "policies": [
83
- "dist/api/iam-validation/suggested-policy.d.ts"
84
- ],
85
- "client": [
86
- "dist/client.d.ts"
87
- ]
88
- }
89
- },
90
- "gitHead": "27eff759935b19b666e29f4f46dd5bdd6214e188"
91
- }
2
+ "name": "@remotion/lambda",
3
+ "version": "4.0.0-alpha10",
4
+ "description": "Distributed renderer for Remotion based on AWS Lambda",
5
+ "main": "dist/index.js",
6
+ "sideEffects": false,
7
+ "bin": {
8
+ "remotion-lambda": "remotion-lambda-cli.js"
9
+ },
10
+ "author": "Jonny Burger <jonny@remotion.dev>",
11
+ "license": "MIT",
12
+ "repository": {
13
+ "url": "https://github.com/JonnyBurger/remotion"
14
+ },
15
+ "dependencies": {
16
+ "@aws-sdk/abort-controller": "3.338.0",
17
+ "@aws-sdk/client-cloudwatch-logs": "3.338.0",
18
+ "@aws-sdk/client-iam": "3.338.0",
19
+ "@aws-sdk/client-lambda": "3.338.0",
20
+ "@aws-sdk/client-s3": "3.338.0",
21
+ "@aws-sdk/client-service-quotas": "3.338.0",
22
+ "@aws-sdk/client-sts": "3.338.0",
23
+ "@aws-sdk/credential-providers": "3.338.0",
24
+ "@aws-sdk/lib-storage": "3.338.0",
25
+ "@aws-sdk/s3-request-presigner": "3.338.0",
26
+ "aws-policies": "^1.0.1",
27
+ "mime-types": "2.1.34",
28
+ "@remotion/bundler": "4.0.0-alpha10",
29
+ "remotion": "4.0.0-alpha10",
30
+ "@remotion/renderer": "4.0.0-alpha10",
31
+ "@remotion/cli": "4.0.0-alpha10"
32
+ },
33
+ "devDependencies": {
34
+ "@jonny/eslint-config": "3.0.266",
35
+ "@types/mime-types": "2.1.1",
36
+ "@types/minimist": "1.2.2",
37
+ "@types/node": "18.14.6",
38
+ "@types/prompt": "^1.1.0",
39
+ "eslint": "8.25.0",
40
+ "prettier": "^2.4.1",
41
+ "prettier-plugin-organize-imports": "^2.3.4",
42
+ "ts-node": "^10.8.0",
43
+ "typescript": "^4.7.0",
44
+ "vitest": "^0.24.3",
45
+ "zip-lib": "^0.7.2",
46
+ "@remotion/bundler": "4.0.0-alpha10",
47
+ "@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha10"
48
+ },
49
+ "peerDependencies": {
50
+ "@remotion/bundler": "4.0.0-alpha10"
51
+ },
52
+ "publishConfig": {
53
+ "access": "public"
54
+ },
55
+ "exports": {
56
+ "./package.json": "./package.json",
57
+ ".": "./dist/index.js",
58
+ "./defaults": "./dist/defaults.js",
59
+ "./regions": "./dist/regions.js",
60
+ "./policies": "./dist/api/iam-validation/suggested-policy.js",
61
+ "./client": "./dist/client.js",
62
+ "./layers": "./dist/shared/hosted-layers.js"
63
+ },
64
+ "typesVersions": {
65
+ ">=1.0": {
66
+ "defaults": [
67
+ "dist/defaults.d.ts"
68
+ ],
69
+ "regions": [
70
+ "dist/regions.d.ts"
71
+ ],
72
+ "policies": [
73
+ "dist/api/iam-validation/suggested-policy.d.ts"
74
+ ],
75
+ "client": [
76
+ "dist/client.d.ts"
77
+ ]
78
+ }
79
+ },
80
+ "scripts": {
81
+ "formatting": "prettier src --check",
82
+ "testintegration": "vitest src/test/integration --run",
83
+ "lint": "eslint src --ext ts,tsx",
84
+ "test": "vitest src/test/unit --run",
85
+ "watch": "tsc -w",
86
+ "build": "tsc -d && pnpm run buildlambda",
87
+ "buildlambda": "ts-node src/admin/bundle-lambda.ts",
88
+ "start": "ts-node src/run.ts"
89
+ }
90
+ }
Binary file