@vercel/build-utils 6.6.0 → 6.7.0

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/index.js CHANGED
@@ -31851,7 +31851,7 @@ const download_1 = __webpack_require__(3166);
31851
31851
  const stream_to_buffer_1 = __importDefault(__webpack_require__(9688));
31852
31852
  class Lambda {
31853
31853
  constructor(opts) {
31854
- const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, experimentalResponseStreaming, operationType, framework, } = opts;
31854
+ const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, supportsResponseStreaming, experimentalResponseStreaming, operationType, framework, } = opts;
31855
31855
  if ('files' in opts) {
31856
31856
  assert_1.default(typeof opts.files === 'object', '"files" must be an object');
31857
31857
  }
@@ -31901,7 +31901,8 @@ class Lambda {
31901
31901
  this.zipBuffer = 'zipBuffer' in opts ? opts.zipBuffer : undefined;
31902
31902
  this.supportsMultiPayloads = supportsMultiPayloads;
31903
31903
  this.supportsWrapper = supportsWrapper;
31904
- this.experimentalResponseStreaming = experimentalResponseStreaming;
31904
+ this.supportsResponseStreaming =
31905
+ supportsResponseStreaming ?? experimentalResponseStreaming;
31905
31906
  this.framework = framework;
31906
31907
  }
31907
31908
  async createZip() {
@@ -31920,6 +31921,15 @@ class Lambda {
31920
31921
  }
31921
31922
  return zipBuffer;
31922
31923
  }
31924
+ /**
31925
+ * @deprecated Use the `supportsResponseStreaming` property instead.
31926
+ */
31927
+ get experimentalResponseStreaming() {
31928
+ return this.supportsResponseStreaming;
31929
+ }
31930
+ set experimentalResponseStreaming(v) {
31931
+ this.supportsResponseStreaming = v;
31932
+ }
31923
31933
  }
31924
31934
  exports.Lambda = Lambda;
31925
31935
  const sema = new async_sema_1.default(10);
package/dist/lambda.d.ts CHANGED
@@ -14,6 +14,10 @@ export interface LambdaOptionsBase {
14
14
  regions?: string[];
15
15
  supportsMultiPayloads?: boolean;
16
16
  supportsWrapper?: boolean;
17
+ supportsResponseStreaming?: boolean;
18
+ /**
19
+ * @deprecated Use the `supportsResponseStreaming` property instead.
20
+ */
17
21
  experimentalResponseStreaming?: boolean;
18
22
  operationType?: string;
19
23
  framework?: FunctionFramework;
@@ -56,10 +60,15 @@ export declare class Lambda {
56
60
  zipBuffer?: Buffer;
57
61
  supportsMultiPayloads?: boolean;
58
62
  supportsWrapper?: boolean;
59
- experimentalResponseStreaming?: boolean;
63
+ supportsResponseStreaming?: boolean;
60
64
  framework?: FunctionFramework;
61
65
  constructor(opts: LambdaOptions);
62
66
  createZip(): Promise<Buffer>;
67
+ /**
68
+ * @deprecated Use the `supportsResponseStreaming` property instead.
69
+ */
70
+ get experimentalResponseStreaming(): boolean | undefined;
71
+ set experimentalResponseStreaming(v: boolean | undefined);
63
72
  }
64
73
  /**
65
74
  * @deprecated Use `new Lambda()` instead.
package/dist/lambda.js CHANGED
@@ -13,7 +13,7 @@ const download_1 = require("./fs/download");
13
13
  const stream_to_buffer_1 = __importDefault(require("./fs/stream-to-buffer"));
14
14
  class Lambda {
15
15
  constructor(opts) {
16
- const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, experimentalResponseStreaming, operationType, framework, } = opts;
16
+ const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, supportsResponseStreaming, experimentalResponseStreaming, operationType, framework, } = opts;
17
17
  if ('files' in opts) {
18
18
  assert_1.default(typeof opts.files === 'object', '"files" must be an object');
19
19
  }
@@ -63,7 +63,8 @@ class Lambda {
63
63
  this.zipBuffer = 'zipBuffer' in opts ? opts.zipBuffer : undefined;
64
64
  this.supportsMultiPayloads = supportsMultiPayloads;
65
65
  this.supportsWrapper = supportsWrapper;
66
- this.experimentalResponseStreaming = experimentalResponseStreaming;
66
+ this.supportsResponseStreaming =
67
+ supportsResponseStreaming ?? experimentalResponseStreaming;
67
68
  this.framework = framework;
68
69
  }
69
70
  async createZip() {
@@ -82,6 +83,15 @@ class Lambda {
82
83
  }
83
84
  return zipBuffer;
84
85
  }
86
+ /**
87
+ * @deprecated Use the `supportsResponseStreaming` property instead.
88
+ */
89
+ get experimentalResponseStreaming() {
90
+ return this.supportsResponseStreaming;
91
+ }
92
+ set experimentalResponseStreaming(v) {
93
+ this.supportsResponseStreaming = v;
94
+ }
85
95
  }
86
96
  exports.Lambda = Lambda;
87
97
  const sema = new async_sema_1.default(10);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "6.6.0",
3
+ "version": "6.7.0",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -51,5 +51,5 @@
51
51
  "typescript": "4.3.4",
52
52
  "yazl": "2.5.1"
53
53
  },
54
- "gitHead": "54514a44afef48726220bc8be8d20f4fda8e8b4f"
54
+ "gitHead": "46348201b4eadb03b403f99dc5574c31d2b3926e"
55
55
  }