@vercel/build-utils
Advanced tools
+10
-0
| # @vercel/build-utils | ||
| ## 13.3.4 | ||
| ### Patch Changes | ||
| - Add support for `regions` in `vercel.json` function-level configuration. ([#14963](https://github.com/vercel/vercel/pull/14963)) | ||
| Matching function `regions` are now parsed from `functions` config, written into lambda output config, and documented in config types so they override top-level deployment regions for that function. | ||
| - [services] set framework prefixed env var urls to relative path ([#14958](https://github.com/vercel/vercel/pull/14958)) | ||
| ## 13.3.3 | ||
@@ -4,0 +14,0 @@ |
@@ -19,6 +19,9 @@ import type { Service } from './types'; | ||
| * For each web service, generates: | ||
| * 1. A base env var (e.g., BACKEND_URL) | ||
| * 2. Framework-prefixed versions for each frontend framework in the deployment | ||
| * (e.g., VITE_BACKEND_URL, NEXT_PUBLIC_BACKEND_URL) so they can be accessed | ||
| * in client-side code. | ||
| * 1. A base env var with the full absolute URL (e.g., BACKEND_URL=https://deploy.vercel.app/api) | ||
| * for server-side use. | ||
| * 2. Framework-prefixed versions with only the route prefix path | ||
| * (e.g., NEXT_PUBLIC_BACKEND_URL=/api, VITE_BACKEND_URL=/api) for client-side use. | ||
| * Using relative paths avoids CORS issues since the browser resolves them against | ||
| * the current origin, which works correctly across production domains, preview | ||
| * deployments, and custom domains. | ||
| * | ||
@@ -25,0 +28,0 @@ * Environment variables that are already set in `currentEnv` will NOT be overwritten, |
@@ -60,5 +60,5 @@ "use strict"; | ||
| const baseEnvVarName = serviceNameToEnvVar(service.name); | ||
| const url = computeServiceUrl(deploymentUrl, service.routePrefix); | ||
| const absoluteUrl = computeServiceUrl(deploymentUrl, service.routePrefix); | ||
| if (!(baseEnvVarName in currentEnv)) { | ||
| envVars[baseEnvVarName] = url; | ||
| envVars[baseEnvVarName] = absoluteUrl; | ||
| } | ||
@@ -68,3 +68,3 @@ for (const prefix of frameworkPrefixes) { | ||
| if (!(prefixedEnvVarName in currentEnv)) { | ||
| envVars[prefixedEnvVarName] = url; | ||
| envVars[prefixedEnvVarName] = service.routePrefix; | ||
| } | ||
@@ -71,0 +71,0 @@ } |
+1
-1
@@ -138,2 +138,2 @@ /// <reference types="node" /> | ||
| export declare function createZip(files: Files): Promise<Buffer>; | ||
| export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'architecture' | 'memory' | 'maxDuration' | 'experimentalTriggers' | 'supportsCancellation'>>; | ||
| export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'architecture' | 'memory' | 'maxDuration' | 'regions' | 'experimentalTriggers' | 'supportsCancellation'>>; |
+1
-0
@@ -325,2 +325,3 @@ "use strict"; | ||
| maxDuration: fn.maxDuration, | ||
| regions: fn.regions, | ||
| experimentalTriggers: fn.experimentalTriggers, | ||
@@ -327,0 +328,0 @@ supportsCancellation: fn.supportsCancellation |
@@ -28,2 +28,8 @@ export declare const functionsSchema: { | ||
| }; | ||
| regions: { | ||
| type: string; | ||
| items: { | ||
| type: string; | ||
| }; | ||
| }; | ||
| includeFiles: { | ||
@@ -30,0 +36,0 @@ type: string; |
+6
-0
@@ -87,2 +87,8 @@ "use strict"; | ||
| }, | ||
| regions: { | ||
| type: "array", | ||
| items: { | ||
| type: "string" | ||
| } | ||
| }, | ||
| includeFiles: { | ||
@@ -89,0 +95,0 @@ type: "string", |
+1
-0
@@ -347,2 +347,3 @@ /// <reference types="node" /> | ||
| maxDuration?: number; | ||
| regions?: string[]; | ||
| runtime?: string; | ||
@@ -349,0 +350,0 @@ includeFiles?: string; |
+1
-1
| { | ||
| "name": "@vercel/build-utils", | ||
| "version": "13.3.3", | ||
| "version": "13.3.4", | ||
| "license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 11 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 3 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 11 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 3 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
1395760
0.09%31921
0.08%