@vercel/static-build 2.9.34 → 2.9.36

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.
Files changed (2) hide show
  1. package/dist/index.js +43 -68
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -6979,6 +6979,8 @@ var require_dist2 = __commonJS({
6979
6979
  var src_exports2 = {};
6980
6980
  __export2(src_exports2, {
6981
6981
  errorToString: () => errorToString,
6982
+ errorToStringFriendly: () => errorToStringFriendly,
6983
+ getSystemErrorMessage: () => getSystemErrorMessage,
6982
6984
  isErrnoException: () => isErrnoException3,
6983
6985
  isError: () => isError,
6984
6986
  isErrorLike: () => isErrorLike,
@@ -6995,6 +6997,10 @@ var require_dist2 = __commonJS({
6995
6997
  var isErrnoException3 = (error) => {
6996
6998
  return isError(error) && "code" in error;
6997
6999
  };
7000
+ var nativeGetSystemErrorMessage = import_node_util.default.getSystemErrorMessage;
7001
+ var getSystemErrorMessageFallback = (errno) => {
7002
+ return import_node_util.default.getSystemErrorMap().get(errno)?.[1] ?? `Unknown system error ${errno}`;
7003
+ };
6998
7004
  var isErrorLike = (error) => isObject(error) && "message" in error;
6999
7005
  var errorToString = (error, fallback) => {
7000
7006
  if (isError(error) || isErrorLike(error))
@@ -7003,6 +7009,13 @@ var require_dist2 = __commonJS({
7003
7009
  return error;
7004
7010
  return fallback ?? "An unknown error has ocurred.";
7005
7011
  };
7012
+ var getSystemErrorMessage = nativeGetSystemErrorMessage ?? getSystemErrorMessageFallback;
7013
+ var errorToStringFriendly = (error, fallback) => {
7014
+ if (isErrnoException3(error) && typeof error.errno === "number") {
7015
+ return getSystemErrorMessage(error.errno);
7016
+ }
7017
+ return errorToString(error, fallback);
7018
+ };
7006
7019
  var normalizeError = (error) => {
7007
7020
  if (isError(error))
7008
7021
  return error;
@@ -9333,19 +9346,17 @@ var require_frameworks = __commonJS({
9333
9346
  experimental: true
9334
9347
  },
9335
9348
  {
9336
- name: "Sanity (v3)",
9337
- slug: "sanity-v3",
9338
- demo: "https://sanity-studio-template.vercel.app",
9349
+ name: "Sanity",
9350
+ slug: "sanity",
9351
+ demo: "https://template-studio-clean.sanity.dev",
9339
9352
  logo: "https://api-frameworks.vercel.sh/framework-logos/sanity.svg",
9340
- tagline: "The structured content platform.",
9353
+ darkModeLogo: "https://api-frameworks.vercel.sh/framework-logos/sanity-dark.svg",
9354
+ tagline: "The back-end built for AI content operations. Power web, mobile, and agentic applications at scale.",
9341
9355
  description: "A Sanity Studio",
9342
9356
  website: "https://www.sanity.io",
9343
9357
  envPrefix: "SANITY_STUDIO_",
9344
9358
  detectors: {
9345
9359
  some: [
9346
- {
9347
- path: "sanity.json"
9348
- },
9349
9360
  {
9350
9361
  path: "sanity.config.js"
9351
9362
  },
@@ -9361,8 +9372,7 @@ var require_frameworks = __commonJS({
9361
9372
  ],
9362
9373
  every: [
9363
9374
  {
9364
- path: "package.json",
9365
- matchContent: '"(dev)?(d|D)ependencies":\\s*{[^}]*"sanity":\\s*"\\^?3\\..*"[^}]*}'
9375
+ matchPackage: "sanity"
9366
9376
  }
9367
9377
  ]
9368
9378
  },
@@ -9381,6 +9391,7 @@ var require_frameworks = __commonJS({
9381
9391
  value: "dist"
9382
9392
  }
9383
9393
  },
9394
+ dependency: "sanity",
9384
9395
  getOutputDirName: async () => "dist",
9385
9396
  defaultRoutes: [
9386
9397
  {
@@ -9393,10 +9404,10 @@ var require_frameworks = __commonJS({
9393
9404
  ]
9394
9405
  },
9395
9406
  {
9396
- name: "Sanity",
9397
- slug: "sanity",
9407
+ name: "Sanity (v2)",
9408
+ slug: "sanity-v2",
9398
9409
  demo: "https://sanity-studio-template.vercel.app",
9399
- logo: "https://api-frameworks.vercel.sh/framework-logos/sanity.svg",
9410
+ logo: "https://api-frameworks.vercel.sh/framework-logos/sanity-v2.svg",
9400
9411
  tagline: "The structured content platform.",
9401
9412
  description: "A Sanity Studio",
9402
9413
  website: "https://www.sanity.io",
@@ -9405,18 +9416,12 @@ var require_frameworks = __commonJS({
9405
9416
  some: [
9406
9417
  {
9407
9418
  path: "sanity.json"
9408
- },
9409
- {
9410
- path: "sanity.config.js"
9411
- },
9412
- {
9413
- path: "sanity.config.jsx"
9414
- },
9415
- {
9416
- path: "sanity.config.ts"
9417
- },
9419
+ }
9420
+ ],
9421
+ every: [
9418
9422
  {
9419
- path: "sanity.config.tsx"
9423
+ path: "package.json",
9424
+ matchContent: '"(dev)?(d|D)ependencies":\\s*{[^}]*"@sanity/cli":\\s*"\\^?2\\..*"[^}]*}'
9420
9425
  }
9421
9426
  ]
9422
9427
  },
@@ -22404,11 +22409,9 @@ var require_utils4 = __commonJS({
22404
22409
  inferRuntimeFromFramework: () => inferRuntimeFromFramework,
22405
22410
  inferServiceRuntime: () => inferServiceRuntime,
22406
22411
  isFrontendFramework: () => isFrontendFramework,
22407
- isPublicServicesEnabled: () => isPublicServicesEnabled,
22408
22412
  isRouteOwningBuilder: () => isRouteOwningBuilder2,
22409
22413
  isStaticBuild: () => isStaticBuild2,
22410
- readVercelConfig: () => readVercelConfig,
22411
- validateServicesConfigGate: () => validateServicesConfigGate
22414
+ readVercelConfig: () => readVercelConfig
22412
22415
  });
22413
22416
  module2.exports = __toCommonJS2(utils_exports);
22414
22417
  var import_framework_helpers = require("@vercel/build-utils/dist/framework-helpers");
@@ -22425,18 +22428,6 @@ var require_utils4 = __commonJS({
22425
22428
  return false;
22426
22429
  }
22427
22430
  }
22428
- function isPublicServicesEnabled() {
22429
- return process.env.VERCEL_USE_SERVICES === "1" || process.env.VERCEL_USE_SERVICES?.toLowerCase() === "true";
22430
- }
22431
- function validateServicesConfigGate(config) {
22432
- if (config?.services !== void 0 && !isPublicServicesEnabled()) {
22433
- return {
22434
- code: "INVALID_VERCEL_CONFIG",
22435
- message: "Invalid vercel.json - should NOT have additional property `services`. Please remove it."
22436
- };
22437
- }
22438
- return null;
22439
- }
22440
22431
  var INTERNAL_QUEUES_PREFIX = "/_svc/_queues";
22441
22432
  function normalizeInternalServiceEntrypoint(entrypoint) {
22442
22433
  const normalized = entrypoint.replace(/\\/g, "/").replace(/^\/+/, "").replace(/\.[^/.]+$/, "");
@@ -22521,10 +22512,6 @@ var require_utils4 = __commonJS({
22521
22512
  try {
22522
22513
  const content = await fs5.readFile("vercel.json");
22523
22514
  const config = JSON.parse(content.toString());
22524
- const gateError = validateServicesConfigGate(config);
22525
- if (gateError) {
22526
- return { config: null, error: gateError };
22527
- }
22528
22515
  return { config, error: null };
22529
22516
  } catch {
22530
22517
  return {
@@ -22542,10 +22529,6 @@ var require_utils4 = __commonJS({
22542
22529
  const { parse: tomlParse } = await Promise.resolve().then(() => (init_dist(), dist_exports));
22543
22530
  const content = await fs5.readFile("vercel.toml");
22544
22531
  const config = tomlParse(content.toString());
22545
- const gateError = validateServicesConfigGate(config);
22546
- if (gateError) {
22547
- return { config: null, error: gateError };
22548
- }
22549
22532
  return { config, error: null };
22550
22533
  } catch {
22551
22534
  return {
@@ -23818,8 +23801,8 @@ var require_auto_detect = __commonJS({
23818
23801
  warnings: [],
23819
23802
  errors: [
23820
23803
  {
23821
- code: "NO_SERVICES_CONFIGURED",
23822
- message: "No services detected. Configure services in vercel.json or ensure a framework exists at project root, frontend/, or apps/web/."
23804
+ code: "NO_EXPERIMENTAL_SERVICES_CONFIGURED",
23805
+ message: "No services detected. Configure `experimentalServices` in vercel.json or ensure a framework exists at project root, frontend/, or apps/web/."
23823
23806
  }
23824
23807
  ]
23825
23808
  };
@@ -27680,8 +27663,7 @@ var require_detect_services = __commonJS({
27680
27663
  fs: fs5,
27681
27664
  workPath,
27682
27665
  detectEntrypoint,
27683
- configuredServices: providedConfiguredServices,
27684
- configuredServicesType
27666
+ configuredServices: providedConfiguredServices
27685
27667
  } = options;
27686
27668
  const scopedFs = workPath ? fs5.chdir(workPath) : fs5;
27687
27669
  const { config: vercelConfig, error: configError } = await (0, import_utils.readVercelConfig)(scopedFs);
@@ -27696,8 +27678,7 @@ var require_detect_services = __commonJS({
27696
27678
  });
27697
27679
  }
27698
27680
  const hasProvidedConfiguredServices = providedConfiguredServices && Object.keys(providedConfiguredServices).length > 0;
27699
- const hasNonEmptyPublicServicesConfig = hasProvidedConfiguredServices && configuredServicesType === "services" || !hasProvidedConfiguredServices && vercelConfig?.services && Object.keys(vercelConfig.services).length > 0;
27700
- const configuredServices = hasProvidedConfiguredServices ? providedConfiguredServices : hasNonEmptyPublicServicesConfig ? vercelConfig?.services : vercelConfig?.experimentalServices;
27681
+ const configuredServices = hasProvidedConfiguredServices ? providedConfiguredServices : vercelConfig?.experimentalServices;
27701
27682
  const hasConfiguredServices = configuredServices && Object.keys(configuredServices).length > 0;
27702
27683
  if (!hasConfiguredServices) {
27703
27684
  const detectors = [
@@ -27719,8 +27700,8 @@ var require_detect_services = __commonJS({
27719
27700
  routes: emptyRoutes(),
27720
27701
  errors: [
27721
27702
  {
27722
- code: "NO_SERVICES_CONFIGURED",
27723
- message: "No services configured. Add `services` to vercel.json."
27703
+ code: "NO_EXPERIMENTAL_SERVICES_CONFIGURED",
27704
+ message: "No services configured. Add `experimentalServices` to vercel.json."
27724
27705
  }
27725
27706
  ],
27726
27707
  warnings: []
@@ -27729,20 +27710,14 @@ var require_detect_services = __commonJS({
27729
27710
  const result = await (0, import_resolve.resolveAllConfiguredServices)(
27730
27711
  configuredServices,
27731
27712
  scopedFs,
27732
- "configured",
27733
- {
27734
- requireFileEntrypointForBackendRuntimes: Boolean(
27735
- hasNonEmptyPublicServicesConfig
27736
- )
27737
- }
27713
+ "configured"
27738
27714
  );
27739
27715
  const routes = generateServicesRoutes2(result.services);
27740
27716
  return withResolvedResult({
27741
27717
  services: result.services,
27742
27718
  source: "configured",
27743
- // GA `services` opts into explicit `env`; experimentalServices keeps
27744
- // the legacy `{NAME}_URL` injection.
27745
- useImplicitEnvInjection: !hasNonEmptyPublicServicesConfig,
27719
+ // experimentalServices uses the legacy `{NAME}_URL` injection.
27720
+ useImplicitEnvInjection: true,
27746
27721
  routes,
27747
27722
  errors: result.errors,
27748
27723
  warnings: []
@@ -28233,8 +28208,8 @@ var require_get_services_builders = __commonJS({
28233
28208
  builders: null,
28234
28209
  errors: [
28235
28210
  {
28236
- code: "NO_SERVICES_CONFIGURED",
28237
- message: "No services configured. Add `services` to vercel.json."
28211
+ code: "NO_EXPERIMENTAL_SERVICES_CONFIGURED",
28212
+ message: "No services configured. Add `experimentalServices` to vercel.json."
28238
28213
  }
28239
28214
  ],
28240
28215
  warnings: warningResponses,
@@ -28365,10 +28340,10 @@ var require_detect_builders = __commonJS({
28365
28340
  return publicBuilder ? publicBuilder.src.replace("/**/*", "") : null;
28366
28341
  }
28367
28342
  async function detectBuilders2(files, pkg, options = {}) {
28368
- const { services, experimentalServices, projectSettings = {} } = options;
28343
+ const { experimentalServices, projectSettings = {} } = options;
28369
28344
  const { framework } = projectSettings;
28370
- const configuredServices = services ?? experimentalServices;
28371
- const configuredServicesType = services != null ? "services" : "experimentalServices";
28345
+ const configuredServices = experimentalServices;
28346
+ const configuredServicesType = "experimentalServices";
28372
28347
  const hasServicesConfig = configuredServices != null && typeof configuredServices === "object";
28373
28348
  if (hasServicesConfig || framework === "services") {
28374
28349
  return (0, import_get_services_builders.getServicesBuilders)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/static-build",
3
- "version": "2.9.34",
3
+ "version": "2.9.36",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "ts-morph": "12.0.0",
17
17
  "@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
18
- "@vercel/gatsby-plugin-vercel-builder": "2.2.11",
18
+ "@vercel/gatsby-plugin-vercel-builder": "2.2.13",
19
19
  "@vercel/static-config": "3.4.0"
20
20
  },
21
21
  "devDependencies": {
@@ -37,10 +37,10 @@
37
37
  "semver": "7.5.2",
38
38
  "tree-kill": "1.2.2",
39
39
  "vitest": "2.0.3",
40
- "@vercel/build-utils": "13.26.5",
41
- "@vercel/error-utils": "2.1.0",
42
- "@vercel/fs-detectors": "6.7.5",
43
- "@vercel/frameworks": "3.26.1",
40
+ "@vercel/build-utils": "13.27.0",
41
+ "@vercel/error-utils": "2.2.0",
42
+ "@vercel/frameworks": "3.27.0",
43
+ "@vercel/fs-detectors": "6.7.7",
44
44
  "@vercel/routing-utils": "6.2.0"
45
45
  },
46
46
  "scripts": {