@vercel/build-utils 14.9.3 → 14.10.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 +25 -0
- package/dist/container-image.js +2 -0
- package/dist/fs/run-user-scripts.js +50 -11
- package/dist/get-installed-package-version.js +19 -12
- package/dist/index.js +15 -15
- package/dist/lambda.js +2 -6
- package/dist/max-concurrency.d.ts +2 -0
- package/dist/max-concurrency.js +49 -0
- package/dist/schemas.d.ts +2 -0
- package/dist/schemas.js +3 -1
- package/dist/types.d.ts +10 -2
- package/package.json +2 -2
package/dist/lambda.js
CHANGED
|
@@ -36,6 +36,7 @@ __export(lambda_exports, {
|
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(lambda_exports);
|
|
38
38
|
var import_assert = __toESM(require("assert"));
|
|
39
|
+
var import_max_concurrency = require("./max-concurrency");
|
|
39
40
|
var import_async_sema = __toESM(require("async-sema"));
|
|
40
41
|
var import_yazl = require("yazl");
|
|
41
42
|
var import_minimatch = __toESM(require("minimatch"));
|
|
@@ -140,12 +141,7 @@ class Lambda {
|
|
|
140
141
|
'"affinity" must be an object with only `mode: "strict"`'
|
|
141
142
|
);
|
|
142
143
|
}
|
|
143
|
-
|
|
144
|
-
(0, import_assert.default)(
|
|
145
|
-
Number.isInteger(maxConcurrency) && maxConcurrency >= 1,
|
|
146
|
-
'"maxConcurrency" must be an integer greater than or equal to 1'
|
|
147
|
-
);
|
|
148
|
-
}
|
|
144
|
+
(0, import_max_concurrency.validateMaxConcurrency)(maxConcurrency);
|
|
149
145
|
if (allowQuery !== void 0) {
|
|
150
146
|
(0, import_assert.default)(Array.isArray(allowQuery), '"allowQuery" is not an Array');
|
|
151
147
|
(0, import_assert.default)(
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var max_concurrency_exports = {};
|
|
30
|
+
__export(max_concurrency_exports, {
|
|
31
|
+
MAX_CONCURRENCY: () => MAX_CONCURRENCY,
|
|
32
|
+
validateMaxConcurrency: () => validateMaxConcurrency
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(max_concurrency_exports);
|
|
35
|
+
var import_assert = __toESM(require("assert"));
|
|
36
|
+
const MAX_CONCURRENCY = 8192;
|
|
37
|
+
function validateMaxConcurrency(value) {
|
|
38
|
+
if (value !== void 0) {
|
|
39
|
+
(0, import_assert.default)(
|
|
40
|
+
Number.isInteger(value) && value >= 1 && value <= MAX_CONCURRENCY,
|
|
41
|
+
'"maxConcurrency" must be an integer from 1 to 8192'
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
MAX_CONCURRENCY,
|
|
48
|
+
validateMaxConcurrency
|
|
49
|
+
});
|
package/dist/schemas.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export declare const getFunctionsSchema: () => {
|
|
|
45
45
|
maxConcurrency: {
|
|
46
46
|
type: string;
|
|
47
47
|
minimum: number;
|
|
48
|
+
maximum: number;
|
|
48
49
|
};
|
|
49
50
|
regions: {
|
|
50
51
|
type: string;
|
|
@@ -142,6 +143,7 @@ export declare const functionsSchema: {
|
|
|
142
143
|
maxConcurrency: {
|
|
143
144
|
type: string;
|
|
144
145
|
minimum: number;
|
|
146
|
+
maximum: number;
|
|
145
147
|
};
|
|
146
148
|
regions: {
|
|
147
149
|
type: string;
|
package/dist/schemas.js
CHANGED
|
@@ -25,6 +25,7 @@ __export(schemas_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(schemas_exports);
|
|
27
27
|
var import_max_duration = require("./max-duration");
|
|
28
|
+
var import_max_concurrency = require("./max-concurrency");
|
|
28
29
|
const triggerEventSchemaV1 = {
|
|
29
30
|
type: "object",
|
|
30
31
|
properties: {
|
|
@@ -145,7 +146,8 @@ const getFunctionsSchema = () => ({
|
|
|
145
146
|
},
|
|
146
147
|
maxConcurrency: {
|
|
147
148
|
type: "integer",
|
|
148
|
-
minimum: 1
|
|
149
|
+
minimum: 1,
|
|
150
|
+
maximum: import_max_concurrency.MAX_CONCURRENCY
|
|
149
151
|
},
|
|
150
152
|
regions: {
|
|
151
153
|
type: "array",
|
package/dist/types.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ export interface Config {
|
|
|
50
50
|
middlewareMatcher?: string | string[];
|
|
51
51
|
/** Owning service name; scopes per-function config such as the v2beta consumer. */
|
|
52
52
|
serviceName?: string;
|
|
53
|
+
/** Buildpack runtime slug (e.g. "ruby"). */
|
|
54
|
+
buildpack?: string;
|
|
53
55
|
[key: string]: unknown;
|
|
54
56
|
}
|
|
55
57
|
export type { HasField };
|
|
@@ -560,6 +562,10 @@ export interface BuildResultBuildOutput {
|
|
|
560
562
|
* @example "/path/to/.vercel/output"
|
|
561
563
|
*/
|
|
562
564
|
buildOutputPath: string;
|
|
565
|
+
framework?: {
|
|
566
|
+
slug: string;
|
|
567
|
+
version: string;
|
|
568
|
+
};
|
|
563
569
|
}
|
|
564
570
|
export interface Cron {
|
|
565
571
|
path: string;
|
|
@@ -568,8 +574,8 @@ export interface Cron {
|
|
|
568
574
|
export interface ScheduleExpression {
|
|
569
575
|
/** Cron expression describing when the schedule fires (REQUIRED) */
|
|
570
576
|
cron: string;
|
|
571
|
-
/** Maximum random delay applied to each firing,
|
|
572
|
-
jitter?:
|
|
577
|
+
/** Maximum random delay applied to each firing, from 1 to 15 whole minutes (OPTIONAL) */
|
|
578
|
+
jitter?: number;
|
|
573
579
|
}
|
|
574
580
|
export type ScheduleTarget = {
|
|
575
581
|
/** Build output path of the function to invoke, e.g. "api/cron" */
|
|
@@ -582,6 +588,8 @@ export interface Schedule {
|
|
|
582
588
|
/** Unique name of the schedule within the deployment (REQUIRED) */
|
|
583
589
|
name: string;
|
|
584
590
|
expression: ScheduleExpression;
|
|
591
|
+
/** IANA timezone for cron evaluation, e.g. "America/New_York". Defaults to UTC. */
|
|
592
|
+
timezone?: string;
|
|
585
593
|
target: ScheduleTarget;
|
|
586
594
|
/** Payload delivered with each firing (OPTIONAL) */
|
|
587
595
|
payload?: unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/build-utils",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.10.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"vitest": "4.1.10",
|
|
53
53
|
"typescript": "4.9.5",
|
|
54
54
|
"yazl": "2.5.1",
|
|
55
|
-
"@vercel/routing-utils": "6.
|
|
55
|
+
"@vercel/routing-utils": "6.6.0",
|
|
56
56
|
"@vercel/error-utils": "2.2.1"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|