@vercel/build-utils 2.13.1-canary.1 → 2.13.1-canary.2

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.
@@ -29,4 +29,4 @@ ncc: Using typescript@4.3.4 (local user-provided)
29
29
  4kB dist/main/fs/run-user-scripts.d.ts
30
30
  9kB dist/main/types.d.ts
31
31
  1245kB dist/main/index.js
32
- 1274kB [7772ms] - ncc 0.24.0
32
+ 1274kB [9973ms] - ncc 0.24.0
package/dist/index.js CHANGED
@@ -35458,8 +35458,10 @@ const fs_extra_1 = __webpack_require__(5392);
35458
35458
  const download_1 = __webpack_require__(1611);
35459
35459
  const stream_to_buffer_1 = __importDefault(__webpack_require__(2560));
35460
35460
  class Lambda {
35461
- constructor({ files, handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, }) {
35462
- assert_1.default(typeof files === 'object', '"files" must be an object');
35461
+ constructor({ files, handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, zipBuffer, }) {
35462
+ if (!zipBuffer) {
35463
+ assert_1.default(typeof files === 'object', '"files" must be an object');
35464
+ }
35463
35465
  assert_1.default(typeof handler === 'string', '"handler" is not a string');
35464
35466
  assert_1.default(typeof runtime === 'string', '"runtime" is not a string');
35465
35467
  assert_1.default(typeof environment === 'object', '"environment" is not an object');
@@ -35486,6 +35488,7 @@ class Lambda {
35486
35488
  this.environment = environment;
35487
35489
  this.allowQuery = allowQuery;
35488
35490
  this.regions = regions;
35491
+ this.zipBuffer = zipBuffer;
35489
35492
  }
35490
35493
  async createZip() {
35491
35494
  let { zipBuffer } = this;
package/dist/lambda.d.ts CHANGED
@@ -12,6 +12,10 @@ interface LambdaOptions {
12
12
  environment?: Environment;
13
13
  allowQuery?: string[];
14
14
  regions?: string[];
15
+ /**
16
+ * @deprecated Use `files` property instead.
17
+ */
18
+ zipBuffer?: Buffer;
15
19
  }
16
20
  interface GetLambdaOptionsFromFunctionOptions {
17
21
  sourceFile: string;
@@ -31,7 +35,7 @@ export declare class Lambda {
31
35
  * @deprecated Use `await lambda.createZip()` instead.
32
36
  */
33
37
  zipBuffer?: Buffer;
34
- constructor({ files, handler, runtime, maxDuration, memory, environment, allowQuery, regions, }: LambdaOptions);
38
+ constructor({ files, handler, runtime, maxDuration, memory, environment, allowQuery, regions, zipBuffer, }: LambdaOptions);
35
39
  createZip(): Promise<Buffer>;
36
40
  }
37
41
  /**
package/dist/lambda.js CHANGED
@@ -12,8 +12,10 @@ const fs_extra_1 = require("fs-extra");
12
12
  const download_1 = require("./fs/download");
13
13
  const stream_to_buffer_1 = __importDefault(require("./fs/stream-to-buffer"));
14
14
  class Lambda {
15
- constructor({ files, handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, }) {
16
- assert_1.default(typeof files === 'object', '"files" must be an object');
15
+ constructor({ files, handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, zipBuffer, }) {
16
+ if (!zipBuffer) {
17
+ assert_1.default(typeof files === 'object', '"files" must be an object');
18
+ }
17
19
  assert_1.default(typeof handler === 'string', '"handler" is not a string');
18
20
  assert_1.default(typeof runtime === 'string', '"runtime" is not a string');
19
21
  assert_1.default(typeof environment === 'object', '"environment" is not an object');
@@ -40,6 +42,7 @@ class Lambda {
40
42
  this.environment = environment;
41
43
  this.allowQuery = allowQuery;
42
44
  this.regions = regions;
45
+ this.zipBuffer = zipBuffer;
43
46
  }
44
47
  async createZip() {
45
48
  let { zipBuffer } = this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "2.13.1-canary.1",
3
+ "version": "2.13.1-canary.2",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -49,5 +49,5 @@
49
49
  "typescript": "4.3.4",
50
50
  "yazl": "2.4.3"
51
51
  },
52
- "gitHead": "ab1decf79da76e85f7f562d1c4ee5e5dcf4c2a17"
52
+ "gitHead": "28f3bf9ef6e492156eb127c7cbdcbfcfeafdf7e4"
53
53
  }