@vercel/static-build 2.9.33 → 2.9.35
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/dist/index.js +61 -68
- 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
|
|
9337
|
-
slug: "sanity
|
|
9338
|
-
demo: "https://
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
9411
|
-
},
|
|
9412
|
-
{
|
|
9413
|
-
path: "sanity.config.jsx"
|
|
9414
|
-
},
|
|
9415
|
-
{
|
|
9416
|
-
path: "sanity.config.ts"
|
|
9417
|
-
},
|
|
9419
|
+
}
|
|
9420
|
+
],
|
|
9421
|
+
every: [
|
|
9418
9422
|
{
|
|
9419
|
-
path: "
|
|
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: "
|
|
23822
|
-
message: "No services detected. Configure
|
|
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
|
};
|
|
@@ -27676,7 +27659,12 @@ var require_detect_services = __commonJS({
|
|
|
27676
27659
|
return inferredConfig;
|
|
27677
27660
|
}
|
|
27678
27661
|
async function detectServices2(options) {
|
|
27679
|
-
const {
|
|
27662
|
+
const {
|
|
27663
|
+
fs: fs5,
|
|
27664
|
+
workPath,
|
|
27665
|
+
detectEntrypoint,
|
|
27666
|
+
configuredServices: providedConfiguredServices
|
|
27667
|
+
} = options;
|
|
27680
27668
|
const scopedFs = workPath ? fs5.chdir(workPath) : fs5;
|
|
27681
27669
|
const { config: vercelConfig, error: configError } = await (0, import_utils.readVercelConfig)(scopedFs);
|
|
27682
27670
|
if (configError) {
|
|
@@ -27689,8 +27677,8 @@ var require_detect_services = __commonJS({
|
|
|
27689
27677
|
warnings: []
|
|
27690
27678
|
});
|
|
27691
27679
|
}
|
|
27692
|
-
const
|
|
27693
|
-
const configuredServices =
|
|
27680
|
+
const hasProvidedConfiguredServices = providedConfiguredServices && Object.keys(providedConfiguredServices).length > 0;
|
|
27681
|
+
const configuredServices = hasProvidedConfiguredServices ? providedConfiguredServices : vercelConfig?.experimentalServices;
|
|
27694
27682
|
const hasConfiguredServices = configuredServices && Object.keys(configuredServices).length > 0;
|
|
27695
27683
|
if (!hasConfiguredServices) {
|
|
27696
27684
|
const detectors = [
|
|
@@ -27712,8 +27700,8 @@ var require_detect_services = __commonJS({
|
|
|
27712
27700
|
routes: emptyRoutes(),
|
|
27713
27701
|
errors: [
|
|
27714
27702
|
{
|
|
27715
|
-
code: "
|
|
27716
|
-
message: "No services configured. Add `
|
|
27703
|
+
code: "NO_EXPERIMENTAL_SERVICES_CONFIGURED",
|
|
27704
|
+
message: "No services configured. Add `experimentalServices` to vercel.json."
|
|
27717
27705
|
}
|
|
27718
27706
|
],
|
|
27719
27707
|
warnings: []
|
|
@@ -27722,20 +27710,14 @@ var require_detect_services = __commonJS({
|
|
|
27722
27710
|
const result = await (0, import_resolve.resolveAllConfiguredServices)(
|
|
27723
27711
|
configuredServices,
|
|
27724
27712
|
scopedFs,
|
|
27725
|
-
"configured"
|
|
27726
|
-
{
|
|
27727
|
-
requireFileEntrypointForBackendRuntimes: Boolean(
|
|
27728
|
-
hasNonEmptyPublicServicesConfig
|
|
27729
|
-
)
|
|
27730
|
-
}
|
|
27713
|
+
"configured"
|
|
27731
27714
|
);
|
|
27732
27715
|
const routes = generateServicesRoutes2(result.services);
|
|
27733
27716
|
return withResolvedResult({
|
|
27734
27717
|
services: result.services,
|
|
27735
27718
|
source: "configured",
|
|
27736
|
-
//
|
|
27737
|
-
|
|
27738
|
-
useImplicitEnvInjection: !hasNonEmptyPublicServicesConfig,
|
|
27719
|
+
// experimentalServices uses the legacy `{NAME}_URL` injection.
|
|
27720
|
+
useImplicitEnvInjection: true,
|
|
27739
27721
|
routes,
|
|
27740
27722
|
errors: result.errors,
|
|
27741
27723
|
warnings: []
|
|
@@ -28152,7 +28134,12 @@ var require_get_services_builders = __commonJS({
|
|
|
28152
28134
|
return env === "1" || env?.toLowerCase() === "true";
|
|
28153
28135
|
}
|
|
28154
28136
|
async function getServicesBuilders2(options) {
|
|
28155
|
-
const {
|
|
28137
|
+
const {
|
|
28138
|
+
workPath,
|
|
28139
|
+
configuredServices,
|
|
28140
|
+
configuredServicesType,
|
|
28141
|
+
projectFramework
|
|
28142
|
+
} = options;
|
|
28156
28143
|
const hasServiceDefinitions = configuredServices != null && Object.keys(configuredServices).length > 0;
|
|
28157
28144
|
if (projectFramework === "services" && !hasServiceDefinitions && !isExperimentalServicesAutoDetectionEnabled()) {
|
|
28158
28145
|
return {
|
|
@@ -28191,7 +28178,11 @@ var require_get_services_builders = __commonJS({
|
|
|
28191
28178
|
};
|
|
28192
28179
|
}
|
|
28193
28180
|
const fs5 = new import_local_file_system_detector.LocalFileSystemDetector(workPath);
|
|
28194
|
-
const result = await (0, import_detect_services.detectServices)({
|
|
28181
|
+
const result = await (0, import_detect_services.detectServices)({
|
|
28182
|
+
fs: fs5,
|
|
28183
|
+
configuredServices,
|
|
28184
|
+
configuredServicesType
|
|
28185
|
+
});
|
|
28195
28186
|
const warningResponses = result.warnings.map((w) => ({
|
|
28196
28187
|
code: w.code,
|
|
28197
28188
|
message: w.message
|
|
@@ -28217,8 +28208,8 @@ var require_get_services_builders = __commonJS({
|
|
|
28217
28208
|
builders: null,
|
|
28218
28209
|
errors: [
|
|
28219
28210
|
{
|
|
28220
|
-
code: "
|
|
28221
|
-
message: "No services configured. Add `
|
|
28211
|
+
code: "NO_EXPERIMENTAL_SERVICES_CONFIGURED",
|
|
28212
|
+
message: "No services configured. Add `experimentalServices` to vercel.json."
|
|
28222
28213
|
}
|
|
28223
28214
|
],
|
|
28224
28215
|
warnings: warningResponses,
|
|
@@ -28349,14 +28340,16 @@ var require_detect_builders = __commonJS({
|
|
|
28349
28340
|
return publicBuilder ? publicBuilder.src.replace("/**/*", "") : null;
|
|
28350
28341
|
}
|
|
28351
28342
|
async function detectBuilders2(files, pkg, options = {}) {
|
|
28352
|
-
const {
|
|
28343
|
+
const { experimentalServices, projectSettings = {} } = options;
|
|
28353
28344
|
const { framework } = projectSettings;
|
|
28354
|
-
const configuredServices =
|
|
28345
|
+
const configuredServices = experimentalServices;
|
|
28346
|
+
const configuredServicesType = "experimentalServices";
|
|
28355
28347
|
const hasServicesConfig = configuredServices != null && typeof configuredServices === "object";
|
|
28356
28348
|
if (hasServicesConfig || framework === "services") {
|
|
28357
28349
|
return (0, import_get_services_builders.getServicesBuilders)({
|
|
28358
28350
|
workPath: options.workPath,
|
|
28359
28351
|
configuredServices,
|
|
28352
|
+
configuredServicesType,
|
|
28360
28353
|
projectFramework: framework
|
|
28361
28354
|
});
|
|
28362
28355
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.35",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"ts-morph": "12.0.0",
|
|
17
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.2.12",
|
|
17
18
|
"@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
|
|
18
|
-
"@vercel/gatsby-plugin-vercel-builder": "2.2.10",
|
|
19
19
|
"@vercel/static-config": "3.4.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
@@ -37,11 +37,11 @@
|
|
|
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.
|
|
41
|
-
"@vercel/
|
|
40
|
+
"@vercel/build-utils": "13.26.6",
|
|
41
|
+
"@vercel/error-utils": "2.2.0",
|
|
42
|
+
"@vercel/frameworks": "3.27.0",
|
|
42
43
|
"@vercel/routing-utils": "6.2.0",
|
|
43
|
-
"@vercel/
|
|
44
|
-
"@vercel/error-utils": "2.1.0"
|
|
44
|
+
"@vercel/fs-detectors": "6.7.6"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "node ../../utils/build-builder.mjs",
|