@vercel/build-utils 13.26.5 → 13.26.6

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 13.26.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 3019788: [services] Remove the `services` field from `vercel.json` and the `VERCEL_USE_SERVICES` gate.
8
+ - fe893ec: [services] Add `experimentalServicesV2` field to `vercel.json` implementing the new schema for services.
9
+
3
10
  ## 13.26.5
4
11
 
5
12
  ### Patch Changes
package/dist/index.js CHANGED
@@ -18367,6 +18367,8 @@ var require_dist = __commonJS({
18367
18367
  var src_exports2 = {};
18368
18368
  __export2(src_exports2, {
18369
18369
  errorToString: () => errorToString,
18370
+ errorToStringFriendly: () => errorToStringFriendly,
18371
+ getSystemErrorMessage: () => getSystemErrorMessage,
18370
18372
  isErrnoException: () => isErrnoException3,
18371
18373
  isError: () => isError,
18372
18374
  isErrorLike: () => isErrorLike,
@@ -18383,6 +18385,10 @@ var require_dist = __commonJS({
18383
18385
  var isErrnoException3 = (error) => {
18384
18386
  return isError(error) && "code" in error;
18385
18387
  };
18388
+ var nativeGetSystemErrorMessage = import_node_util.default.getSystemErrorMessage;
18389
+ var getSystemErrorMessageFallback = (errno) => {
18390
+ return import_node_util.default.getSystemErrorMap().get(errno)?.[1] ?? `Unknown system error ${errno}`;
18391
+ };
18386
18392
  var isErrorLike = (error) => isObject(error) && "message" in error;
18387
18393
  var errorToString = (error, fallback) => {
18388
18394
  if (isError(error) || isErrorLike(error))
@@ -18391,6 +18397,13 @@ var require_dist = __commonJS({
18391
18397
  return error;
18392
18398
  return fallback ?? "An unknown error has ocurred.";
18393
18399
  };
18400
+ var getSystemErrorMessage = nativeGetSystemErrorMessage ?? getSystemErrorMessageFallback;
18401
+ var errorToStringFriendly = (error, fallback) => {
18402
+ if (isErrnoException3(error) && typeof error.errno === "number") {
18403
+ return getSystemErrorMessage(error.errno);
18404
+ }
18405
+ return errorToString(error, fallback);
18406
+ };
18394
18407
  var normalizeError = (error) => {
18395
18408
  if (isError(error))
18396
18409
  return error;
package/dist/types.d.ts CHANGED
@@ -5,7 +5,7 @@ import type { Lambda, LambdaArchitecture } from './lambda';
5
5
  import type { Prerender } from './prerender';
6
6
  import type { EdgeFunction } from './edge-function';
7
7
  import type { Span } from './trace';
8
- import type { HasField } from '@vercel/routing-utils';
8
+ import type { HasField, Route, Rewrite, Redirect, Header } from '@vercel/routing-utils';
9
9
  export interface Env {
10
10
  [name: string]: string | undefined;
11
11
  }
@@ -775,54 +775,64 @@ export interface ExperimentalServiceConfig {
775
775
  */
776
776
  export type ExperimentalServices = Record<string, ExperimentalServiceConfig>;
777
777
  /**
778
- * Public configuration for a service in vercel.json.
778
+ * Map of service group name to array of service names belonging to that group.
779
+ * @experimental This feature is experimental and may change.
780
+ * @example
781
+ * {
782
+ * "app": ["site", "backend"],
783
+ * "admin": ["admin", "backend"]
784
+ * }
779
785
  */
780
- export interface ServiceConfig {
781
- type?: ServiceType;
782
- trigger?: JobTrigger;
783
- /**
784
- * Path to the service's root directory relative to the project root.
785
- * Should contain a manifest file (package.json, pyproject.toml, etc.).
786
- * Defaults to ".".
787
- */
788
- root?: string;
786
+ export type ExperimentalServiceGroups = Record<string, string[]>;
787
+ export interface ExperimentalServiceV2Binding {
788
+ /** Must be `"service"` for Service-to-Service HTTP bindings. */
789
+ type: 'service';
790
+ /** Target service name from `experimentalServicesV2`. */
791
+ service: string;
792
+ /** Generated value shape, must be `"url"`. */
793
+ format: 'url';
794
+ /** Environment variable name that will store the generated value */
795
+ env: string;
796
+ }
797
+ /**
798
+ * Configuration for a service in `experimentalServicesV2` in `vercel.json`.
799
+ *
800
+ * @experimental This feature is experimental and may change.
801
+ */
802
+ export interface ExperimentalServiceV2Config {
803
+ /** Path to the service root, relative to `vercel.json`. */
804
+ root: string;
805
+ /** Framework for this service. */
806
+ framework?: string;
807
+ /** Runtime for this service. */
808
+ runtime?: string;
789
809
  /**
790
810
  * Service entrypoint, relative to the service root directory.
791
- * Can be either a file path (runtime entrypoint) or a directory path
792
- * (service workspace for framework-based services).
811
+ * Can be a file path or a module specification (for Python).
793
812
  */
794
813
  entrypoint?: string;
795
- /** Framework to use */
796
- framework?: string;
797
- /** Specific lambda runtime to use, e.g. nodejs24.x, python3.14 */
798
- runtime?: string;
814
+ installCommand?: string;
799
815
  buildCommand?: string;
800
- preDeployCommand?: string;
801
- /** Lambda config */
802
- memory?: number;
803
- maxDuration?: MaxDuration;
804
- includeFiles?: string | string[];
805
- excludeFiles?: string | string[];
806
- /** Preferred routing config for route paths. */
807
- mount?: string | ServiceMount;
808
- /** Cron schedule expression(s) (e.g., "0 0 * * *") */
809
- schedule?: string | string[];
810
- topics?: ServiceTopics;
816
+ devCommand?: string;
817
+ ignoreCommand?: string;
818
+ outputDirectory?: string;
819
+ /** Caller-side bindings that grant this service access to another service. */
820
+ bindings?: ExperimentalServiceV2Binding[];
821
+ /** Function configuration scoped to this service root. */
822
+ functions?: BuilderFunctions;
823
+ headers?: Header[];
824
+ redirects?: Redirect[];
825
+ rewrites?: Rewrite[];
826
+ routes?: Route[];
827
+ cleanUrls?: boolean;
828
+ trailingSlash?: boolean;
811
829
  }
812
830
  /**
813
- * Map of service name to public service configuration.
814
- */
815
- export type Services = Record<string, ServiceConfig>;
816
- /**
817
- * Map of service group name to array of service names belonging to that group.
831
+ * Map of service name to service configuration for `experimentalServicesV2`.
832
+ *
818
833
  * @experimental This feature is experimental and may change.
819
- * @example
820
- * {
821
- * "app": ["site", "backend"],
822
- * "admin": ["admin", "backend"]
823
- * }
824
834
  */
825
- export type ExperimentalServiceGroups = Record<string, string[]>;
835
+ export type ExperimentalServicesV2 = Record<string, ExperimentalServiceV2Config>;
826
836
  /**
827
837
  * Result of a runtime builder's normalized entrypoint detection.
828
838
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "13.26.5",
3
+ "version": "13.26.6",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -55,7 +55,7 @@
55
55
  "vitest": "2.0.1",
56
56
  "typescript": "4.9.5",
57
57
  "yazl": "2.5.1",
58
- "@vercel/error-utils": "2.1.0",
58
+ "@vercel/error-utils": "2.2.0",
59
59
  "@vercel/routing-utils": "6.2.0"
60
60
  },
61
61
  "scripts": {