@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.
- package/.turbo/turbo-build.log +1 -1
- package/dist/index.js +5 -2
- package/dist/lambda.d.ts +5 -1
- package/dist/lambda.js +5 -2
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
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
|
-
|
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
|
-
|
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.
|
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": "
|
52
|
+
"gitHead": "28f3bf9ef6e492156eb127c7cbdcbfcfeafdf7e4"
|
53
53
|
}
|