@vercel/build-utils 13.7.0 → 13.8.1
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 +30 -0
- package/dist/fs/download.js +13 -1
- package/dist/index.js +21 -5
- package/dist/lambda.d.ts +3 -3
- package/dist/lambda.js +4 -1
- package/dist/schemas.d.ts +11 -3
- package/dist/schemas.js +4 -3
- package/dist/types.d.ts +8 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 13.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`3c4355fa1414aa3270ba4d36423aa647d49a9cf3`](https://github.com/vercel/vercel/commit/3c4355fa1414aa3270ba4d36423aa647d49a9cf3), [`267223f86eb578cc740db501fb2c2cbf43a27b37`](https://github.com/vercel/vercel/commit/267223f86eb578cc740db501fb2c2cbf43a27b37), [`e9a791d0fa04ef58695535fa508554415137fb58`](https://github.com/vercel/vercel/commit/e9a791d0fa04ef58695535fa508554415137fb58), [`12811e7bc827900d534aa25f5f3e2331a80ca6a8`](https://github.com/vercel/vercel/commit/12811e7bc827900d534aa25f5f3e2331a80ca6a8)]:
|
|
8
|
+
- @vercel/python-analysis@0.10.0
|
|
9
|
+
|
|
10
|
+
## 13.8.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- Support `maxDuration: 'max'` to allow the backend to resolve the maximum duration based on account plan type ([#15217](https://github.com/vercel/vercel/pull/15217))
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Fix EEXIST error when using `--standalone` flag in monorepos by handling pre-existing symlinks in the shared output directory. ([#15322](https://github.com/vercel/vercel/pull/15322))
|
|
19
|
+
|
|
20
|
+
## 13.7.2
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [[`a67131396956632b060895afe44b26bb99941817`](https://github.com/vercel/vercel/commit/a67131396956632b060895afe44b26bb99941817)]:
|
|
25
|
+
- @vercel/python-analysis@0.9.1
|
|
26
|
+
|
|
27
|
+
## 13.7.1
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [services] adds support for subdomai configuration in experimentalServices ([#15401](https://github.com/vercel/vercel/pull/15401))
|
|
32
|
+
|
|
3
33
|
## 13.7.0
|
|
4
34
|
|
|
5
35
|
### Minor Changes
|
package/dist/fs/download.js
CHANGED
|
@@ -75,7 +75,19 @@ async function downloadFile(file, fsPath) {
|
|
|
75
75
|
}
|
|
76
76
|
if (isSymbolicLink(mode)) {
|
|
77
77
|
const target = await prepareSymlinkTarget(file, fsPath);
|
|
78
|
-
|
|
78
|
+
try {
|
|
79
|
+
await (0, import_fs_extra.symlink)(target, fsPath);
|
|
80
|
+
} catch (err) {
|
|
81
|
+
if (err.code === "EEXIST") {
|
|
82
|
+
const existingTarget = await (0, import_fs_extra.readlink)(fsPath);
|
|
83
|
+
if (existingTarget !== target) {
|
|
84
|
+
await (0, import_fs_extra.remove)(fsPath);
|
|
85
|
+
await (0, import_fs_extra.symlink)(target, fsPath);
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
throw err;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
79
91
|
return import_file_fs_ref.default.fromFsPath({ mode, fsPath });
|
|
80
92
|
}
|
|
81
93
|
const stream = file.toStream();
|
package/dist/index.js
CHANGED
|
@@ -22346,7 +22346,19 @@ async function downloadFile(file, fsPath) {
|
|
|
22346
22346
|
}
|
|
22347
22347
|
if (isSymbolicLink(mode)) {
|
|
22348
22348
|
const target = await prepareSymlinkTarget(file, fsPath);
|
|
22349
|
-
|
|
22349
|
+
try {
|
|
22350
|
+
await (0, import_fs_extra2.symlink)(target, fsPath);
|
|
22351
|
+
} catch (err) {
|
|
22352
|
+
if (err.code === "EEXIST") {
|
|
22353
|
+
const existingTarget = await (0, import_fs_extra2.readlink)(fsPath);
|
|
22354
|
+
if (existingTarget !== target) {
|
|
22355
|
+
await (0, import_fs_extra2.remove)(fsPath);
|
|
22356
|
+
await (0, import_fs_extra2.symlink)(target, fsPath);
|
|
22357
|
+
}
|
|
22358
|
+
} else {
|
|
22359
|
+
throw err;
|
|
22360
|
+
}
|
|
22361
|
+
}
|
|
22350
22362
|
return file_fs_ref_default.fromFsPath({ mode, fsPath });
|
|
22351
22363
|
}
|
|
22352
22364
|
const stream = file.toStream();
|
|
@@ -22486,7 +22498,10 @@ var Lambda = class {
|
|
|
22486
22498
|
(0, import_assert4.default)(typeof memory === "number", '"memory" is not a number');
|
|
22487
22499
|
}
|
|
22488
22500
|
if (maxDuration !== void 0) {
|
|
22489
|
-
(0, import_assert4.default)(
|
|
22501
|
+
(0, import_assert4.default)(
|
|
22502
|
+
typeof maxDuration === "number" || maxDuration === "max",
|
|
22503
|
+
'"maxDuration" is not a number or "max"'
|
|
22504
|
+
);
|
|
22490
22505
|
}
|
|
22491
22506
|
if (allowQuery !== void 0) {
|
|
22492
22507
|
(0, import_assert4.default)(Array.isArray(allowQuery), '"allowQuery" is not an Array');
|
|
@@ -24751,9 +24766,10 @@ var functionsSchema = {
|
|
|
24751
24766
|
maximum: 10240
|
|
24752
24767
|
},
|
|
24753
24768
|
maxDuration: {
|
|
24754
|
-
|
|
24755
|
-
|
|
24756
|
-
|
|
24769
|
+
oneOf: [
|
|
24770
|
+
{ type: "integer", minimum: 1, maximum: 900 },
|
|
24771
|
+
{ type: "string", enum: ["max"] }
|
|
24772
|
+
]
|
|
24757
24773
|
},
|
|
24758
24774
|
regions: {
|
|
24759
24775
|
type: "array",
|
package/dist/lambda.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import type { Config, Env, Files, FunctionFramework, TriggerEvent, TriggerEventInput } from './types';
|
|
2
|
+
import type { Config, Env, Files, FunctionFramework, MaxDuration, TriggerEvent, TriggerEventInput } from './types';
|
|
3
3
|
export type { TriggerEvent, TriggerEventInput };
|
|
4
4
|
/**
|
|
5
5
|
* Encodes a function path into a valid consumer name using mnemonic escapes.
|
|
@@ -27,7 +27,7 @@ export interface LambdaOptionsBase {
|
|
|
27
27
|
runtimeLanguage?: LambdaExecutableRuntimeLanguages;
|
|
28
28
|
architecture?: LambdaArchitecture;
|
|
29
29
|
memory?: number;
|
|
30
|
-
maxDuration?:
|
|
30
|
+
maxDuration?: MaxDuration;
|
|
31
31
|
environment?: Env;
|
|
32
32
|
allowQuery?: string[];
|
|
33
33
|
regions?: string[];
|
|
@@ -102,7 +102,7 @@ export declare class Lambda {
|
|
|
102
102
|
runtimeLanguage?: LambdaExecutableRuntimeLanguages;
|
|
103
103
|
architecture: LambdaArchitecture;
|
|
104
104
|
memory?: number;
|
|
105
|
-
maxDuration?:
|
|
105
|
+
maxDuration?: MaxDuration;
|
|
106
106
|
environment: Env;
|
|
107
107
|
allowQuery?: string[];
|
|
108
108
|
regions?: string[];
|
package/dist/lambda.js
CHANGED
|
@@ -127,7 +127,10 @@ class Lambda {
|
|
|
127
127
|
(0, import_assert.default)(typeof memory === "number", '"memory" is not a number');
|
|
128
128
|
}
|
|
129
129
|
if (maxDuration !== void 0) {
|
|
130
|
-
(0, import_assert.default)(
|
|
130
|
+
(0, import_assert.default)(
|
|
131
|
+
typeof maxDuration === "number" || maxDuration === "max",
|
|
132
|
+
'"maxDuration" is not a number or "max"'
|
|
133
|
+
);
|
|
131
134
|
}
|
|
132
135
|
if (allowQuery !== void 0) {
|
|
133
136
|
(0, import_assert.default)(Array.isArray(allowQuery), '"allowQuery" is not an Array');
|
package/dist/schemas.d.ts
CHANGED
|
@@ -21,9 +21,17 @@ export declare const functionsSchema: {
|
|
|
21
21
|
maximum: number;
|
|
22
22
|
};
|
|
23
23
|
maxDuration: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
oneOf: ({
|
|
25
|
+
type: string;
|
|
26
|
+
minimum: number;
|
|
27
|
+
maximum: number;
|
|
28
|
+
enum?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
type: string;
|
|
31
|
+
enum: string[];
|
|
32
|
+
minimum?: undefined;
|
|
33
|
+
maximum?: undefined;
|
|
34
|
+
})[];
|
|
27
35
|
};
|
|
28
36
|
regions: {
|
|
29
37
|
type: string;
|
package/dist/schemas.js
CHANGED
|
@@ -114,9 +114,10 @@ const functionsSchema = {
|
|
|
114
114
|
maximum: 10240
|
|
115
115
|
},
|
|
116
116
|
maxDuration: {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
oneOf: [
|
|
118
|
+
{ type: "integer", minimum: 1, maximum: 900 },
|
|
119
|
+
{ type: "string", enum: ["max"] }
|
|
120
|
+
]
|
|
120
121
|
},
|
|
121
122
|
regions: {
|
|
122
123
|
type: "array",
|
package/dist/types.d.ts
CHANGED
|
@@ -110,6 +110,8 @@ export interface BuildOptions {
|
|
|
110
110
|
service?: {
|
|
111
111
|
/** URL path prefix where the service is mounted (e.g., "/api"). */
|
|
112
112
|
routePrefix?: string;
|
|
113
|
+
/** Optional subdomain this service is mounted on (e.g., "api"). */
|
|
114
|
+
subdomain?: string;
|
|
113
115
|
/** Workspace directory for this service, relative to the project root. */
|
|
114
116
|
workspace?: string;
|
|
115
117
|
};
|
|
@@ -349,11 +351,12 @@ export interface Builder {
|
|
|
349
351
|
src?: string;
|
|
350
352
|
config?: Config;
|
|
351
353
|
}
|
|
354
|
+
export type MaxDuration = number | 'max';
|
|
352
355
|
export interface BuilderFunctions {
|
|
353
356
|
[key: string]: {
|
|
354
357
|
architecture?: LambdaArchitecture;
|
|
355
358
|
memory?: number;
|
|
356
|
-
maxDuration?:
|
|
359
|
+
maxDuration?: MaxDuration;
|
|
357
360
|
regions?: string[];
|
|
358
361
|
functionFailoverRegions?: string[];
|
|
359
362
|
runtime?: string;
|
|
@@ -483,6 +486,7 @@ export interface Service {
|
|
|
483
486
|
installCommand?: string;
|
|
484
487
|
routePrefix?: string;
|
|
485
488
|
routePrefixSource?: 'configured' | 'generated';
|
|
489
|
+
subdomain?: string;
|
|
486
490
|
schedule?: string;
|
|
487
491
|
handlerFunction?: string;
|
|
488
492
|
topic?: string;
|
|
@@ -649,11 +653,13 @@ export interface ExperimentalServiceConfig {
|
|
|
649
653
|
installCommand?: string;
|
|
650
654
|
/** Lambda config */
|
|
651
655
|
memory?: number;
|
|
652
|
-
maxDuration?:
|
|
656
|
+
maxDuration?: MaxDuration;
|
|
653
657
|
includeFiles?: string | string[];
|
|
654
658
|
excludeFiles?: string | string[];
|
|
655
659
|
/** URL prefix for routing */
|
|
656
660
|
routePrefix?: string;
|
|
661
|
+
/** Subdomain this service should respond to (web services only). */
|
|
662
|
+
subdomain?: string;
|
|
657
663
|
/** Cron schedule expression (e.g., "0 0 * * *") */
|
|
658
664
|
schedule?: string;
|
|
659
665
|
topic?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/build-utils",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.8.1",
|
|
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.10.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@iarna/toml": "2.2.3",
|