@remotion/lambda 4.0.0-alpha5 → 4.0.0-alpha7

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 (54) hide show
  1. package/dist/admin/bundle-lambda.js +11 -10
  2. package/dist/admin/generate-etag-list.js +4 -4
  3. package/dist/api/create-function.js +2 -2
  4. package/dist/api/deploy-site.js +2 -2
  5. package/dist/api/download-media.js +2 -2
  6. package/dist/api/get-sites.d.ts +0 -1
  7. package/dist/api/make-lambda-payload.d.ts +41 -0
  8. package/dist/api/make-lambda-payload.js +65 -0
  9. package/dist/api/render-media-on-lambda.d.ts +2 -2
  10. package/dist/api/render-media-on-lambda.js +4 -60
  11. package/dist/api/upload-dir.js +7 -7
  12. package/dist/cli/commands/functions/deploy.js +6 -3
  13. package/dist/cli/commands/functions/ls.js +8 -3
  14. package/dist/cli/commands/functions/rm.js +12 -5
  15. package/dist/cli/commands/functions/rmall.js +12 -6
  16. package/dist/cli/commands/quotas/increase.js +2 -2
  17. package/dist/cli/commands/render/render.js +9 -6
  18. package/dist/cli/commands/sites/create.js +4 -1
  19. package/dist/cli/commands/still.js +1 -1
  20. package/dist/cli/help.js +4 -0
  21. package/dist/cli/index.js +3 -3
  22. package/dist/cli/log.d.ts +2 -0
  23. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
  24. package/dist/functions/helpers/clean-tmpdir.js +7 -7
  25. package/dist/functions/helpers/concat-videos.js +7 -7
  26. package/dist/functions/helpers/get-browser-instance.js +1 -0
  27. package/dist/functions/helpers/get-chromium-executable-path.js +4 -8
  28. package/dist/functions/helpers/get-files-in-folder.js +5 -5
  29. package/dist/functions/helpers/io.d.ts +1 -1
  30. package/dist/functions/launch.js +10 -12
  31. package/dist/functions/renderer.js +6 -6
  32. package/dist/functions/still.js +6 -6
  33. package/dist/index.d.ts +1 -1
  34. package/dist/internals.d.ts +40 -0
  35. package/dist/internals.js +2 -0
  36. package/dist/shared/aws-clients.js +2 -2
  37. package/dist/shared/call-lambda.js +11 -0
  38. package/dist/shared/function-zip-path.js +2 -2
  39. package/dist/shared/get-etag.js +4 -4
  40. package/dist/shared/hosted-layers.js +0 -84
  41. package/dist/shared/invoke-webhook.d.ts +3 -1
  42. package/dist/shared/invoke-webhook.js +4 -4
  43. package/dist/shared/make-s3-key.js +2 -2
  44. package/dist/shared/make-s3-url.js +2 -2
  45. package/dist/shared/read-dir.js +2 -2
  46. package/dist/shared/serialize-input-props.js +1 -1
  47. package/dist/shared/validate-privacy.js +1 -1
  48. package/package.json +8 -8
  49. package/remotionlambda-arm64.zip +0 -0
  50. package/dist/functions/helpers/get-current-architecture.d.ts +0 -2
  51. package/dist/functions/helpers/get-current-architecture.js +0 -11
  52. package/dist/shared/validate-architecture.d.ts +0 -4
  53. package/dist/shared/validate-architecture.js +0 -14
  54. package/remotionlambda-x64.zip +0 -0
@@ -8,10 +8,6 @@ exports.hostedLayers = {
8
8
  layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-fonts-arm64',
9
9
  version: 8,
10
10
  },
11
- {
12
- layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
13
- version: 10,
14
- },
15
11
  {
16
12
  layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-chromium-arm64',
17
13
  version: 12,
@@ -22,10 +18,6 @@ exports.hostedLayers = {
22
18
  layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
23
19
  version: 8,
24
20
  },
25
- {
26
- layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
27
- version: 10,
28
- },
29
21
  {
30
22
  layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
31
23
  version: 12,
@@ -36,10 +28,6 @@ exports.hostedLayers = {
36
28
  layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-fonts-arm64',
37
29
  version: 8,
38
30
  },
39
- {
40
- layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
41
- version: 10,
42
- },
43
31
  {
44
32
  layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-chromium-arm64',
45
33
  version: 12,
@@ -50,10 +38,6 @@ exports.hostedLayers = {
50
38
  layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-fonts-arm64',
51
39
  version: 8,
52
40
  },
53
- {
54
- layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
55
- version: 10,
56
- },
57
41
  {
58
42
  layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-chromium-arm64',
59
43
  version: 12,
@@ -64,10 +48,6 @@ exports.hostedLayers = {
64
48
  layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-fonts-arm64',
65
49
  version: 17,
66
50
  },
67
- {
68
- layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
69
- version: 11,
70
- },
71
51
  {
72
52
  layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-chromium-arm64',
73
53
  version: 18,
@@ -78,10 +58,6 @@ exports.hostedLayers = {
78
58
  layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-fonts-arm64',
79
59
  version: 9,
80
60
  },
81
- {
82
- layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
83
- version: 10,
84
- },
85
61
  {
86
62
  layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-chromium-arm64',
87
63
  version: 12,
@@ -92,10 +68,6 @@ exports.hostedLayers = {
92
68
  layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-fonts-arm64',
93
69
  version: 8,
94
70
  },
95
- {
96
- layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
97
- version: 10,
98
- },
99
71
  {
100
72
  layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-chromium-arm64',
101
73
  version: 12,
@@ -106,10 +78,6 @@ exports.hostedLayers = {
106
78
  layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-fonts-arm64',
107
79
  version: 13,
108
80
  },
109
- {
110
- layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
111
- version: 19,
112
- },
113
81
  {
114
82
  layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-chromium-arm64',
115
83
  version: 21,
@@ -120,10 +88,6 @@ exports.hostedLayers = {
120
88
  layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-fonts-arm64',
121
89
  version: 8,
122
90
  },
123
- {
124
- layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
125
- version: 10,
126
- },
127
91
  {
128
92
  layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-chromium-arm64',
129
93
  version: 12,
@@ -134,10 +98,6 @@ exports.hostedLayers = {
134
98
  layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-fonts-arm64',
135
99
  version: 8,
136
100
  },
137
- {
138
- layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
139
- version: 10,
140
- },
141
101
  {
142
102
  layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-chromium-arm64',
143
103
  version: 12,
@@ -148,10 +108,6 @@ exports.hostedLayers = {
148
108
  layerArn: 'arn:aws:lambda:af-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
149
109
  version: 5,
150
110
  },
151
- {
152
- layerArn: 'arn:aws:lambda:af-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
153
- version: 3,
154
- },
155
111
  {
156
112
  layerArn: 'arn:aws:lambda:af-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
157
113
  version: 5,
@@ -162,10 +118,6 @@ exports.hostedLayers = {
162
118
  layerArn: 'arn:aws:lambda:ap-east-1:678892195805:layer:remotion-binaries-fonts-arm64',
163
119
  version: 5,
164
120
  },
165
- {
166
- layerArn: 'arn:aws:lambda:ap-east-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
167
- version: 3,
168
- },
169
121
  {
170
122
  layerArn: 'arn:aws:lambda:ap-east-1:678892195805:layer:remotion-binaries-chromium-arm64',
171
123
  version: 5,
@@ -176,10 +128,6 @@ exports.hostedLayers = {
176
128
  layerArn: 'arn:aws:lambda:ap-northeast-2:678892195805:layer:remotion-binaries-fonts-arm64',
177
129
  version: 5,
178
130
  },
179
- {
180
- layerArn: 'arn:aws:lambda:ap-northeast-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
181
- version: 3,
182
- },
183
131
  {
184
132
  layerArn: 'arn:aws:lambda:ap-northeast-2:678892195805:layer:remotion-binaries-chromium-arm64',
185
133
  version: 5,
@@ -190,10 +138,6 @@ exports.hostedLayers = {
190
138
  layerArn: 'arn:aws:lambda:ap-northeast-3:678892195805:layer:remotion-binaries-fonts-arm64',
191
139
  version: 5,
192
140
  },
193
- {
194
- layerArn: 'arn:aws:lambda:ap-northeast-3:678892195805:layer:remotion-binaries-ffmpeg-arm64',
195
- version: 3,
196
- },
197
141
  {
198
142
  layerArn: 'arn:aws:lambda:ap-northeast-3:678892195805:layer:remotion-binaries-chromium-arm64',
199
143
  version: 5,
@@ -204,10 +148,6 @@ exports.hostedLayers = {
204
148
  layerArn: 'arn:aws:lambda:ca-central-1:678892195805:layer:remotion-binaries-fonts-arm64',
205
149
  version: 5,
206
150
  },
207
- {
208
- layerArn: 'arn:aws:lambda:ca-central-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
209
- version: 3,
210
- },
211
151
  {
212
152
  layerArn: 'arn:aws:lambda:ca-central-1:678892195805:layer:remotion-binaries-chromium-arm64',
213
153
  version: 5,
@@ -218,10 +158,6 @@ exports.hostedLayers = {
218
158
  layerArn: 'arn:aws:lambda:eu-north-1:678892195805:layer:remotion-binaries-fonts-arm64',
219
159
  version: 5,
220
160
  },
221
- {
222
- layerArn: 'arn:aws:lambda:eu-north-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
223
- version: 3,
224
- },
225
161
  {
226
162
  layerArn: 'arn:aws:lambda:eu-north-1:678892195805:layer:remotion-binaries-chromium-arm64',
227
163
  version: 5,
@@ -232,10 +168,6 @@ exports.hostedLayers = {
232
168
  layerArn: 'arn:aws:lambda:eu-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
233
169
  version: 5,
234
170
  },
235
- {
236
- layerArn: 'arn:aws:lambda:eu-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
237
- version: 3,
238
- },
239
171
  {
240
172
  layerArn: 'arn:aws:lambda:eu-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
241
173
  version: 5,
@@ -246,10 +178,6 @@ exports.hostedLayers = {
246
178
  layerArn: 'arn:aws:lambda:eu-west-3:678892195805:layer:remotion-binaries-fonts-arm64',
247
179
  version: 5,
248
180
  },
249
- {
250
- layerArn: 'arn:aws:lambda:eu-west-3:678892195805:layer:remotion-binaries-ffmpeg-arm64',
251
- version: 3,
252
- },
253
181
  {
254
182
  layerArn: 'arn:aws:lambda:eu-west-3:678892195805:layer:remotion-binaries-chromium-arm64',
255
183
  version: 5,
@@ -260,10 +188,6 @@ exports.hostedLayers = {
260
188
  layerArn: 'arn:aws:lambda:me-south-1:678892195805:layer:remotion-binaries-fonts-arm64',
261
189
  version: 5,
262
190
  },
263
- {
264
- layerArn: 'arn:aws:lambda:me-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
265
- version: 3,
266
- },
267
191
  {
268
192
  layerArn: 'arn:aws:lambda:me-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
269
193
  version: 5,
@@ -274,10 +198,6 @@ exports.hostedLayers = {
274
198
  layerArn: 'arn:aws:lambda:sa-east-1:678892195805:layer:remotion-binaries-fonts-arm64',
275
199
  version: 5,
276
200
  },
277
- {
278
- layerArn: 'arn:aws:lambda:sa-east-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
279
- version: 3,
280
- },
281
201
  {
282
202
  layerArn: 'arn:aws:lambda:sa-east-1:678892195805:layer:remotion-binaries-chromium-arm64',
283
203
  version: 5,
@@ -288,10 +208,6 @@ exports.hostedLayers = {
288
208
  layerArn: 'arn:aws:lambda:us-west-1:678892195805:layer:remotion-binaries-fonts-arm64',
289
209
  version: 5,
290
210
  },
291
- {
292
- layerArn: 'arn:aws:lambda:us-west-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
293
- version: 3,
294
- },
295
211
  {
296
212
  layerArn: 'arn:aws:lambda:us-west-1:678892195805:layer:remotion-binaries-chromium-arm64',
297
213
  version: 5,
@@ -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
@@ -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)();
@@ -6,7 +6,7 @@ function validatePrivacy(privacy) {
6
6
  throw new TypeError('Privacy must be a string');
7
7
  }
8
8
  if (privacy !== 'private' && privacy !== 'public' && privacy !== 'no-acl') {
9
- throw new TypeError('Privacy must be either "private", "public-read" or "no-acl"');
9
+ throw new TypeError('Privacy must be either "private", "public" or "no-acl"');
10
10
  }
11
11
  }
12
12
  exports.validatePrivacy = validatePrivacy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "4.0.0-alpha5",
3
+ "version": "4.0.0-alpha7",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -23,17 +23,17 @@
23
23
  "@aws-sdk/credential-providers": "3.272.0",
24
24
  "@aws-sdk/lib-storage": "3.272.0",
25
25
  "@aws-sdk/s3-request-presigner": "3.272.0",
26
- "@remotion/bundler": "4.0.0-alpha5",
27
- "@remotion/cli": "4.0.0-alpha5",
28
- "@remotion/renderer": "4.0.0-alpha5",
26
+ "@remotion/bundler": "4.0.0-alpha7",
27
+ "@remotion/cli": "4.0.0-alpha7",
28
+ "@remotion/renderer": "4.0.0-alpha7",
29
29
  "aws-policies": "^1.0.1",
30
30
  "mime-types": "2.1.34",
31
- "remotion": "4.0.0-alpha5"
31
+ "remotion": "4.0.0-alpha7"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@jonny/eslint-config": "3.0.266",
35
- "@remotion/bundler": "4.0.0-alpha5",
36
- "@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha5",
35
+ "@remotion/bundler": "4.0.0-alpha7",
36
+ "@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha7",
37
37
  "@types/mime-types": "2.1.1",
38
38
  "@types/minimist": "1.2.2",
39
39
  "@types/node": "^18.16.0",
@@ -47,7 +47,7 @@
47
47
  "zip-lib": "^0.7.2"
48
48
  },
49
49
  "peerDependencies": {
50
- "@remotion/bundler": "4.0.0-alpha5"
50
+ "@remotion/bundler": "4.0.0-alpha7"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
Binary file
@@ -1,2 +0,0 @@
1
- import type { LambdaArchitecture } from '../../shared/validate-architecture';
2
- export declare const getCurrentArchitecture: () => LambdaArchitecture;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCurrentArchitecture = void 0;
4
- const is_in_lambda_1 = require("../../shared/is-in-lambda");
5
- const getCurrentArchitecture = () => {
6
- if (!(0, is_in_lambda_1.isInsideLambda)()) {
7
- throw new Error('Should not call getCurrentArchitecture() if not inside a lambda function');
8
- }
9
- return process.arch.includes('arm') ? 'arm64' : 'x86_64';
10
- };
11
- exports.getCurrentArchitecture = getCurrentArchitecture;
@@ -1,4 +0,0 @@
1
- declare const validArchitectures: readonly ["arm64", "x86_64"];
2
- export declare type LambdaArchitecture = typeof validArchitectures[number];
3
- export declare const validateArchitecture: (architecture: unknown) => void;
4
- export {};
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateArchitecture = void 0;
4
- const validArchitectures = ['arm64', 'x86_64'];
5
- const validateArchitecture = (architecture) => {
6
- if (typeof architecture !== 'string') {
7
- throw new TypeError('You must pass an architecture when deploying: One of ' +
8
- validArchitectures.join(', '));
9
- }
10
- if (!validArchitectures.find((a) => a === architecture)) {
11
- throw new TypeError(`You must pass an "architecture" when deploying a function: either "arm64" or "x86_64"`);
12
- }
13
- };
14
- exports.validateArchitecture = validateArchitecture;
Binary file