@vercel/build-utils 2.12.3-canary.13 → 2.12.3-canary.17

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/dist/lambda.d.ts CHANGED
@@ -27,6 +27,7 @@ interface GetLambdaOptionsFromFunctionOptions {
27
27
  sourceFile: string;
28
28
  config?: Config;
29
29
  }
30
+ export declare const FILES_SYMBOL: unique symbol;
30
31
  export declare class Lambda {
31
32
  type: 'Lambda';
32
33
  zipBuffer: Buffer;
package/dist/lambda.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getLambdaOptionsFromFunction = exports.createZip = exports.createLambda = exports.Lambda = void 0;
6
+ exports.getLambdaOptionsFromFunction = exports.createZip = exports.createLambda = exports.Lambda = exports.FILES_SYMBOL = void 0;
7
7
  const assert_1 = __importDefault(require("assert"));
8
8
  const async_sema_1 = __importDefault(require("async-sema"));
9
9
  const yazl_1 = require("yazl");
@@ -11,6 +11,7 @@ const minimatch_1 = __importDefault(require("minimatch"));
11
11
  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
+ exports.FILES_SYMBOL = Symbol('files');
14
15
  class Lambda {
15
16
  constructor({ zipBuffer, handler, runtime, maxDuration, memory, environment, allowQuery, regions, }) {
16
17
  this.type = 'Lambda';
@@ -49,7 +50,7 @@ async function createLambda({ files, handler, runtime, memory, maxDuration, envi
49
50
  await sema.acquire();
50
51
  try {
51
52
  const zipBuffer = await createZip(files);
52
- return new Lambda({
53
+ const lambda = new Lambda({
53
54
  zipBuffer,
54
55
  handler,
55
56
  runtime,
@@ -58,6 +59,9 @@ async function createLambda({ files, handler, runtime, memory, maxDuration, envi
58
59
  environment,
59
60
  regions,
60
61
  });
62
+ // @ts-ignore This symbol is a private API
63
+ lambda[exports.FILES_SYMBOL] = files;
64
+ return lambda;
61
65
  }
62
66
  finally {
63
67
  sema.release();
package/dist/types.d.ts CHANGED
@@ -9,6 +9,7 @@ export interface File {
9
9
  mode: number;
10
10
  contentType?: string;
11
11
  toStream: () => NodeJS.ReadableStream;
12
+ toStreamAsync?: () => Promise<NodeJS.ReadableStream>;
12
13
  /**
13
14
  * The absolute path to the file in the filesystem
14
15
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "2.12.3-canary.13",
3
+ "version": "2.12.3-canary.17",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -21,7 +21,7 @@
21
21
  "@types/async-retry": "^1.2.1",
22
22
  "@types/cross-spawn": "6.0.0",
23
23
  "@types/end-of-stream": "^1.4.0",
24
- "@types/fs-extra": "^5.0.5",
24
+ "@types/fs-extra": "9.0.13",
25
25
  "@types/glob": "^7.1.1",
26
26
  "@types/jest": "27.0.1",
27
27
  "@types/js-yaml": "3.12.1",
@@ -30,7 +30,7 @@
30
30
  "@types/node-fetch": "^2.1.6",
31
31
  "@types/semver": "6.0.0",
32
32
  "@types/yazl": "^2.4.1",
33
- "@vercel/frameworks": "0.5.1-canary.9",
33
+ "@vercel/frameworks": "0.5.1-canary.11",
34
34
  "@vercel/ncc": "0.24.0",
35
35
  "aggregate-error": "3.0.1",
36
36
  "async-retry": "1.2.3",
@@ -38,7 +38,7 @@
38
38
  "boxen": "4.2.0",
39
39
  "cross-spawn": "6.0.5",
40
40
  "end-of-stream": "1.4.1",
41
- "fs-extra": "7.0.0",
41
+ "fs-extra": "10.0.0",
42
42
  "glob": "7.1.3",
43
43
  "into-stream": "5.0.0",
44
44
  "js-yaml": "3.13.1",
@@ -49,5 +49,5 @@
49
49
  "typescript": "4.3.4",
50
50
  "yazl": "2.4.3"
51
51
  },
52
- "gitHead": "cd7185a872a5767cfc010b849a4064cbc4e9f679"
52
+ "gitHead": "ed1dacd27698f3bb181f32b516af6953655b37e9"
53
53
  }