@vercel/build-utils
Advanced tools
+6
-0
| # @vercel/build-utils | ||
| ## 13.27.1 | ||
| ### Patch Changes | ||
| - 0a170fd: [services] wire `experimentalServicesV2` into `fs-detectors`. | ||
| ## 13.27.0 | ||
@@ -4,0 +10,0 @@ |
@@ -25,2 +25,3 @@ "use strict"; | ||
| module.exports = __toCommonJS(get_service_url_env_vars_exports); | ||
| var import_types = require("./types"); | ||
| function serviceNameToEnvVar(name) { | ||
@@ -60,3 +61,4 @@ return `${name.replace(/-/g, "_").toUpperCase()}_URL`; | ||
| return {}; | ||
| const servicesByName = new Map(services.map((s) => [s.name, s])); | ||
| const v1Services = services.filter(import_types.isExperimentalService); | ||
| const servicesByName = new Map(v1Services.map((s) => [s.name, s])); | ||
| const consumerEnvPrefix = getFrameworkEnvPrefix( | ||
@@ -95,5 +97,6 @@ consumerService?.framework, | ||
| } | ||
| const v1Services = services.filter(import_types.isExperimentalService); | ||
| const envVars = {}; | ||
| const frameworkPrefixes = /* @__PURE__ */ new Set(); | ||
| for (const service of services) { | ||
| for (const service of v1Services) { | ||
| const prefix = getFrameworkEnvPrefix(service.framework, frameworkList); | ||
@@ -104,3 +107,3 @@ if (prefix) { | ||
| } | ||
| for (const service of services) { | ||
| for (const service of v1Services) { | ||
| if (service.type !== "web" || !service.routePrefix) { | ||
@@ -107,0 +110,0 @@ continue; |
+32
-1
@@ -516,3 +516,4 @@ import type FileRef from './file-ref'; | ||
| export type EnvVars = Record<string, EnvVar>; | ||
| export interface Service { | ||
| export interface ExperimentalService { | ||
| schema: 'experimentalServices'; | ||
| name: string; | ||
@@ -538,2 +539,32 @@ type: ServiceType; | ||
| } | ||
| export interface ExperimentalServiceV2 { | ||
| schema: 'experimentalServicesV2'; | ||
| name: string; | ||
| /** Path to the service root, relative to the project root. */ | ||
| root: string; | ||
| framework?: string; | ||
| runtime?: string; | ||
| /** Resolved entrypoint, relative to the service root. */ | ||
| entrypoint?: string; | ||
| /** Builder selected by the resolver. */ | ||
| builder: Builder; | ||
| installCommand?: string; | ||
| buildCommand?: string; | ||
| devCommand?: string; | ||
| ignoreCommand?: string; | ||
| outputDirectory?: string; | ||
| /** Caller-side bindings to other services. */ | ||
| bindings?: ExperimentalServiceV2Binding[]; | ||
| /** Function configuration scoped to this service. */ | ||
| functions?: BuilderFunctions; | ||
| headers?: Header[]; | ||
| redirects?: Redirect[]; | ||
| rewrites?: Rewrite[]; | ||
| routes?: Route[]; | ||
| cleanUrls?: boolean; | ||
| trailingSlash?: boolean; | ||
| } | ||
| export type Service = ExperimentalService | ExperimentalServiceV2; | ||
| export declare function isExperimentalService(service: Service): service is ExperimentalService; | ||
| export declare function isExperimentalServiceV2(service: Service): service is ExperimentalServiceV2; | ||
| export declare function getServiceQueueTopicConfigs(config: { | ||
@@ -540,0 +571,0 @@ type?: ServiceType; |
+10
-0
@@ -28,2 +28,4 @@ "use strict"; | ||
| getServiceQueueTopics: () => getServiceQueueTopics, | ||
| isExperimentalService: () => isExperimentalService, | ||
| isExperimentalServiceV2: () => isExperimentalServiceV2, | ||
| isQueueBackedService: () => isQueueBackedService, | ||
@@ -60,2 +62,8 @@ isQueueTriggeredService: () => isQueueTriggeredService, | ||
| const JOB_TRIGGERS = ["queue", "schedule", "workflow"]; | ||
| function isExperimentalService(service) { | ||
| return service.schema === "experimentalServices"; | ||
| } | ||
| function isExperimentalServiceV2(service) { | ||
| return service.schema === "experimentalServicesV2"; | ||
| } | ||
| function getServiceQueueTopicConfigs(config) { | ||
@@ -111,2 +119,4 @@ if (Array.isArray(config.topics) && config.topics.length > 0) { | ||
| getServiceQueueTopics, | ||
| isExperimentalService, | ||
| isExperimentalServiceV2, | ||
| isQueueBackedService, | ||
@@ -113,0 +123,0 @@ isQueueTriggeredService, |
+1
-1
| { | ||
| "name": "@vercel/build-utils", | ||
| "version": "13.27.0", | ||
| "version": "13.27.1", | ||
| "license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
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
2010543
0.12%51555
0.11%