@vercel/build-utils 13.4.0 → 13.4.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/CHANGELOG.md +15 -0
- package/dist/index.js +19 -0
- package/dist/lambda.d.ts +3 -1
- package/dist/lambda.js +13 -0
- package/dist/schemas.d.ts +6 -0
- package/dist/schemas.js +6 -0
- package/dist/types.d.ts +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 13.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`88353afe588b95709af20ba2b82ba83d8a60f90c`](https://github.com/vercel/vercel/commit/88353afe588b95709af20ba2b82ba83d8a60f90c)]:
|
|
8
|
+
- @vercel/python-analysis@0.5.0
|
|
9
|
+
|
|
10
|
+
## 13.4.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Add support for `functions[*].functionFailoverRegions` in `vercel.json` and build output config generation. ([#14969](https://github.com/vercel/vercel/pull/14969))
|
|
15
|
+
|
|
16
|
+
This enables per-function failover region configuration instead of only top-level defaults for all functions.
|
|
17
|
+
|
|
3
18
|
## 13.4.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -22442,6 +22442,7 @@ var Lambda = class {
|
|
|
22442
22442
|
environment = {},
|
|
22443
22443
|
allowQuery,
|
|
22444
22444
|
regions,
|
|
22445
|
+
functionFailoverRegions,
|
|
22445
22446
|
supportsMultiPayloads,
|
|
22446
22447
|
supportsWrapper,
|
|
22447
22448
|
supportsResponseStreaming,
|
|
@@ -22511,6 +22512,16 @@ var Lambda = class {
|
|
|
22511
22512
|
'"regions" is not a string Array'
|
|
22512
22513
|
);
|
|
22513
22514
|
}
|
|
22515
|
+
if (functionFailoverRegions !== void 0) {
|
|
22516
|
+
(0, import_assert4.default)(
|
|
22517
|
+
Array.isArray(functionFailoverRegions),
|
|
22518
|
+
'"functionFailoverRegions" is not an Array'
|
|
22519
|
+
);
|
|
22520
|
+
(0, import_assert4.default)(
|
|
22521
|
+
functionFailoverRegions.every((r) => typeof r === "string"),
|
|
22522
|
+
'"functionFailoverRegions" is not a string Array'
|
|
22523
|
+
);
|
|
22524
|
+
}
|
|
22514
22525
|
if (framework !== void 0) {
|
|
22515
22526
|
(0, import_assert4.default)(typeof framework === "object", '"framework" is not an object');
|
|
22516
22527
|
(0, import_assert4.default)(
|
|
@@ -22619,6 +22630,7 @@ var Lambda = class {
|
|
|
22619
22630
|
this.environment = environment;
|
|
22620
22631
|
this.allowQuery = allowQuery;
|
|
22621
22632
|
this.regions = regions;
|
|
22633
|
+
this.functionFailoverRegions = functionFailoverRegions;
|
|
22622
22634
|
this.zipBuffer = "zipBuffer" in opts ? opts.zipBuffer : void 0;
|
|
22623
22635
|
this.supportsMultiPayloads = supportsMultiPayloads;
|
|
22624
22636
|
this.supportsWrapper = supportsWrapper;
|
|
@@ -22715,6 +22727,7 @@ async function getLambdaOptionsFromFunction({
|
|
|
22715
22727
|
memory: fn.memory,
|
|
22716
22728
|
maxDuration: fn.maxDuration,
|
|
22717
22729
|
regions: fn.regions,
|
|
22730
|
+
functionFailoverRegions: fn.functionFailoverRegions,
|
|
22718
22731
|
experimentalTriggers,
|
|
22719
22732
|
supportsCancellation: fn.supportsCancellation
|
|
22720
22733
|
};
|
|
@@ -24738,6 +24751,12 @@ var functionsSchema = {
|
|
|
24738
24751
|
type: "string"
|
|
24739
24752
|
}
|
|
24740
24753
|
},
|
|
24754
|
+
functionFailoverRegions: {
|
|
24755
|
+
type: "array",
|
|
24756
|
+
items: {
|
|
24757
|
+
type: "string"
|
|
24758
|
+
}
|
|
24759
|
+
},
|
|
24741
24760
|
includeFiles: {
|
|
24742
24761
|
type: "string",
|
|
24743
24762
|
maxLength: 256
|
package/dist/lambda.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export interface LambdaOptionsBase {
|
|
|
31
31
|
environment?: Env;
|
|
32
32
|
allowQuery?: string[];
|
|
33
33
|
regions?: string[];
|
|
34
|
+
functionFailoverRegions?: string[];
|
|
34
35
|
supportsMultiPayloads?: boolean;
|
|
35
36
|
supportsWrapper?: boolean;
|
|
36
37
|
supportsResponseStreaming?: boolean;
|
|
@@ -105,6 +106,7 @@ export declare class Lambda {
|
|
|
105
106
|
environment: Env;
|
|
106
107
|
allowQuery?: string[];
|
|
107
108
|
regions?: string[];
|
|
109
|
+
functionFailoverRegions?: string[];
|
|
108
110
|
/**
|
|
109
111
|
* @deprecated Use `await lambda.createZip()` instead.
|
|
110
112
|
*/
|
|
@@ -152,4 +154,4 @@ export declare class Lambda {
|
|
|
152
154
|
*/
|
|
153
155
|
export declare function createLambda(opts: LambdaOptions): Promise<Lambda>;
|
|
154
156
|
export declare function createZip(files: Files): Promise<Buffer>;
|
|
155
|
-
export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'architecture' | 'memory' | 'maxDuration' | 'regions' | 'experimentalTriggers' | 'supportsCancellation'>>;
|
|
157
|
+
export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'architecture' | 'memory' | 'maxDuration' | 'regions' | 'functionFailoverRegions' | 'experimentalTriggers' | 'supportsCancellation'>>;
|
package/dist/lambda.js
CHANGED
|
@@ -85,6 +85,7 @@ class Lambda {
|
|
|
85
85
|
environment = {},
|
|
86
86
|
allowQuery,
|
|
87
87
|
regions,
|
|
88
|
+
functionFailoverRegions,
|
|
88
89
|
supportsMultiPayloads,
|
|
89
90
|
supportsWrapper,
|
|
90
91
|
supportsResponseStreaming,
|
|
@@ -154,6 +155,16 @@ class Lambda {
|
|
|
154
155
|
'"regions" is not a string Array'
|
|
155
156
|
);
|
|
156
157
|
}
|
|
158
|
+
if (functionFailoverRegions !== void 0) {
|
|
159
|
+
(0, import_assert.default)(
|
|
160
|
+
Array.isArray(functionFailoverRegions),
|
|
161
|
+
'"functionFailoverRegions" is not an Array'
|
|
162
|
+
);
|
|
163
|
+
(0, import_assert.default)(
|
|
164
|
+
functionFailoverRegions.every((r) => typeof r === "string"),
|
|
165
|
+
'"functionFailoverRegions" is not a string Array'
|
|
166
|
+
);
|
|
167
|
+
}
|
|
157
168
|
if (framework !== void 0) {
|
|
158
169
|
(0, import_assert.default)(typeof framework === "object", '"framework" is not an object');
|
|
159
170
|
(0, import_assert.default)(
|
|
@@ -262,6 +273,7 @@ class Lambda {
|
|
|
262
273
|
this.environment = environment;
|
|
263
274
|
this.allowQuery = allowQuery;
|
|
264
275
|
this.regions = regions;
|
|
276
|
+
this.functionFailoverRegions = functionFailoverRegions;
|
|
265
277
|
this.zipBuffer = "zipBuffer" in opts ? opts.zipBuffer : void 0;
|
|
266
278
|
this.supportsMultiPayloads = supportsMultiPayloads;
|
|
267
279
|
this.supportsWrapper = supportsWrapper;
|
|
@@ -358,6 +370,7 @@ async function getLambdaOptionsFromFunction({
|
|
|
358
370
|
memory: fn.memory,
|
|
359
371
|
maxDuration: fn.maxDuration,
|
|
360
372
|
regions: fn.regions,
|
|
373
|
+
functionFailoverRegions: fn.functionFailoverRegions,
|
|
361
374
|
experimentalTriggers,
|
|
362
375
|
supportsCancellation: fn.supportsCancellation
|
|
363
376
|
};
|
package/dist/schemas.d.ts
CHANGED
package/dist/schemas.js
CHANGED
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/build-utils",
|
|
3
|
-
"version": "13.4.
|
|
3
|
+
"version": "13.4.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/now-build-utils"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@vercel/python-analysis": "0.
|
|
14
|
+
"@vercel/python-analysis": "0.5.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@iarna/toml": "2.2.3",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"yazl": "2.5.1",
|
|
51
51
|
"vitest": "2.0.1",
|
|
52
52
|
"json5": "2.2.3",
|
|
53
|
-
"@vercel/
|
|
54
|
-
"@vercel/
|
|
53
|
+
"@vercel/error-utils": "2.0.3",
|
|
54
|
+
"@vercel/routing-utils": "5.3.3"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "node build.mjs",
|