@vercel/build-utils
Advanced tools
+10
-0
| # @vercel/build-utils | ||
| ## 13.29.0 | ||
| ### Minor Changes | ||
| - 8d8e871: Evaluate the `maxDuration` upper bound at validation time so `VERCEL_CLI_SKIP_MAX_DURATION_LIMIT` works regardless of import order. | ||
| The gate was read when `@vercel/build-utils`' `functionsSchema` was constructed and when the CLI compiled its `vercel.json` validator — both at module load. Any process that imports these modules before setting the env var baked in the default 900-second maximum and ignored the flag, failing with `Invalid vercel.json - functions[...].maxDuration should be <= 900`. | ||
| `@vercel/build-utils` now exposes `getFunctionsSchema()`, which reads the limit at call time (the existing `functionsSchema` const is kept but deprecated). The CLI builds and compiles its config validator lazily, caching one validator per resolved limit, so setting the variable after import takes effect. Default behavior is unchanged — the 900s maximum, the lower bound, and the integer check are all still enforced when the variable is unset. | ||
| ## 13.28.0 | ||
@@ -4,0 +14,0 @@ |
+102
-0
@@ -0,1 +1,103 @@ | ||
| export declare const getFunctionsSchema: () => { | ||
| type: string; | ||
| minProperties: number; | ||
| maxProperties: number; | ||
| additionalProperties: boolean; | ||
| patternProperties: { | ||
| '^.{1,256}$': { | ||
| type: string; | ||
| additionalProperties: boolean; | ||
| properties: { | ||
| architecture: { | ||
| type: string; | ||
| enum: string[]; | ||
| }; | ||
| runtime: { | ||
| type: string; | ||
| maxLength: number; | ||
| }; | ||
| memory: { | ||
| minimum: number; | ||
| maximum: number; | ||
| }; | ||
| maxDuration: { | ||
| oneOf: ({ | ||
| maximum?: number | undefined; | ||
| type: string; | ||
| minimum: number; | ||
| enum?: undefined; | ||
| } | { | ||
| type: string; | ||
| enum: string[]; | ||
| })[]; | ||
| }; | ||
| regions: { | ||
| type: string; | ||
| items: { | ||
| type: string; | ||
| }; | ||
| }; | ||
| functionFailoverRegions: { | ||
| type: string; | ||
| items: { | ||
| type: string; | ||
| }; | ||
| }; | ||
| includeFiles: { | ||
| type: string; | ||
| maxLength: number; | ||
| }; | ||
| excludeFiles: { | ||
| type: string; | ||
| maxLength: number; | ||
| }; | ||
| experimentalTriggers: { | ||
| type: string; | ||
| items: { | ||
| oneOf: { | ||
| type: string; | ||
| properties: { | ||
| type: { | ||
| type: string; | ||
| const: string; | ||
| }; | ||
| topic: { | ||
| type: string; | ||
| minLength: number; | ||
| }; | ||
| maxDeliveries: { | ||
| type: string; | ||
| minimum: number; | ||
| }; | ||
| retryAfterSeconds: { | ||
| type: string; | ||
| exclusiveMinimum: number; | ||
| }; | ||
| initialDelaySeconds: { | ||
| type: string; | ||
| minimum: number; | ||
| }; | ||
| maxConcurrency: { | ||
| type: string; | ||
| minimum: number; | ||
| }; | ||
| }; | ||
| required: string[]; | ||
| additionalProperties: boolean; | ||
| }[]; | ||
| }; | ||
| }; | ||
| supportsCancellation: { | ||
| type: string; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
| /** | ||
| * @deprecated Evaluated once at module load, so it does not reflect | ||
| * `VERCEL_CLI_SKIP_MAX_DURATION_LIMIT` when the variable is set after this | ||
| * module is first imported. Prefer {@link getFunctionsSchema}, which reads the | ||
| * limit at call time. | ||
| */ | ||
| export declare const functionsSchema: { | ||
@@ -2,0 +104,0 @@ type: string; |
+5
-2
@@ -23,2 +23,3 @@ "use strict"; | ||
| functionsSchema: () => functionsSchema, | ||
| getFunctionsSchema: () => getFunctionsSchema, | ||
| packageManifestSchema: () => packageManifestSchema | ||
@@ -97,3 +98,3 @@ }); | ||
| }; | ||
| const functionsSchema = { | ||
| const getFunctionsSchema = () => ({ | ||
| type: "object", | ||
@@ -151,3 +152,4 @@ minProperties: 1, | ||
| } | ||
| }; | ||
| }); | ||
| const functionsSchema = getFunctionsSchema(); | ||
| const buildsSchema = { | ||
@@ -255,3 +257,4 @@ type: "array", | ||
| functionsSchema, | ||
| getFunctionsSchema, | ||
| packageManifestSchema | ||
| }); |
+2
-2
| { | ||
| "name": "@vercel/build-utils", | ||
| "version": "13.28.0", | ||
| "version": "13.29.0", | ||
| "license": "Apache-2.0", | ||
@@ -58,3 +58,3 @@ "main": "./dist/index.js", | ||
| "yazl": "2.5.1", | ||
| "@vercel/routing-utils": "6.2.0", | ||
| "@vercel/routing-utils": "6.3.0", | ||
| "@vercel/error-utils": "2.2.0" | ||
@@ -61,0 +61,0 @@ }, |
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
2074674
0.23%52221
0.21%