@vercel/static-build 31.0.0-snapshot-224301946cd2 → 31.0.0
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 +29 -18
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -52507,6 +52507,7 @@ var require_detect_builders = __commonJS({
|
|
|
52507
52507
|
detectApiExtensions: () => detectApiExtensions2,
|
|
52508
52508
|
detectBuilders: () => detectBuilders2,
|
|
52509
52509
|
detectOutputDirectory: () => detectOutputDirectory2,
|
|
52510
|
+
escapeMinimatchPath: () => escapeMinimatchPath,
|
|
52510
52511
|
getProxyBuilder: () => getProxyBuilder2,
|
|
52511
52512
|
parseProxyEntrypoint: () => parseProxyEntrypoint,
|
|
52512
52513
|
resolveProxy: () => resolveProxy2,
|
|
@@ -59024,7 +59025,6 @@ var require_resolve_v2 = __commonJS({
|
|
|
59024
59025
|
var import_resolve = require_resolve();
|
|
59025
59026
|
var import_utils = require_utils5();
|
|
59026
59027
|
var import_detect_builders = require_detect_builders();
|
|
59027
|
-
var import_detect_builders2 = require_detect_builders();
|
|
59028
59028
|
var frameworksBySlug = new Map(import_frameworks2.frameworkList.map((f) => [f.slug, f]));
|
|
59029
59029
|
var MAX_SERVICE_NAME_LENGTH = 64;
|
|
59030
59030
|
var SERVICE_NAME_REGEX = /^[a-z]([a-z_-]*[a-z])?$/;
|
|
@@ -59152,18 +59152,23 @@ var require_resolve_v2 = __commonJS({
|
|
|
59152
59152
|
field: `services.${name}.proxy`,
|
|
59153
59153
|
level: "service"
|
|
59154
59154
|
};
|
|
59155
|
-
const
|
|
59155
|
+
const toServiceError = (error2) => ({
|
|
59156
|
+
code: error2.code.toUpperCase(),
|
|
59157
|
+
message: error2.message,
|
|
59158
|
+
serviceName: name
|
|
59159
|
+
});
|
|
59160
|
+
const configError = (0, import_detect_builders.validateProxyConfig)(proxy, validationOptions);
|
|
59161
|
+
if (configError) {
|
|
59162
|
+
return toServiceError(configError);
|
|
59163
|
+
}
|
|
59164
|
+
const { file } = (0, import_detect_builders.parseProxyEntrypoint)(proxy.entrypoint);
|
|
59156
59165
|
const files = await (0, import_utils.hasFile)(serviceFs, file) ? [file] : [];
|
|
59157
|
-
const error = (0,
|
|
59166
|
+
const error = (0, import_detect_builders.validateProxy)({ proxy }, files, framework, validationOptions) ?? (0, import_detect_builders.validateResolvedProxy)(
|
|
59158
59167
|
{ source: "vercel-config", entrypoint: proxy.entrypoint, file },
|
|
59159
59168
|
framework,
|
|
59160
59169
|
validationOptions
|
|
59161
59170
|
);
|
|
59162
|
-
return error ?
|
|
59163
|
-
code: error.code.toUpperCase(),
|
|
59164
|
-
message: error.message,
|
|
59165
|
-
serviceName: name
|
|
59166
|
-
} : null;
|
|
59171
|
+
return error ? toServiceError(error) : null;
|
|
59167
59172
|
}
|
|
59168
59173
|
function validateServiceConfigV22(name, config) {
|
|
59169
59174
|
if (!isValidServiceName(name)) {
|
|
@@ -59450,8 +59455,23 @@ var require_resolve_v2 = __commonJS({
|
|
|
59450
59455
|
if (builderUse === "@vercel/backends") {
|
|
59451
59456
|
builderConfig.serviceName = name;
|
|
59452
59457
|
}
|
|
59458
|
+
const proxyError = await validateServiceProxy(
|
|
59459
|
+
name,
|
|
59460
|
+
config,
|
|
59461
|
+
serviceFs,
|
|
59462
|
+
framework
|
|
59463
|
+
);
|
|
59464
|
+
if (proxyError) {
|
|
59465
|
+
return { error: proxyError };
|
|
59466
|
+
}
|
|
59467
|
+
const proxyFileExclusions = config.proxy ? [(0, import_detect_builders.escapeMinimatchPath)((0, import_detect_builders.parseProxyEntrypoint)(config.proxy.entrypoint).file)] : [];
|
|
59453
59468
|
if (builderUse === "@vercel/static") {
|
|
59454
|
-
builderConfig.excludeFiles = [
|
|
59469
|
+
builderConfig.excludeFiles = [
|
|
59470
|
+
...import_detect_builders.VERCEL_PLATFORM_FILES,
|
|
59471
|
+
...proxyFileExclusions
|
|
59472
|
+
];
|
|
59473
|
+
} else if (builderUse === "@vercel/static-build" && proxyFileExclusions.length > 0) {
|
|
59474
|
+
builderConfig.excludeFiles = proxyFileExclusions;
|
|
59455
59475
|
}
|
|
59456
59476
|
if (framework) {
|
|
59457
59477
|
builderConfig.framework = framework;
|
|
@@ -59473,15 +59493,6 @@ var require_resolve_v2 = __commonJS({
|
|
|
59473
59493
|
builderConfig.handlerFunction = moduleAttr.attrName;
|
|
59474
59494
|
}
|
|
59475
59495
|
const runtime = import_constants.STATIC_BUILDERS.has(builderUse) ? void 0 : inferredRuntime;
|
|
59476
|
-
const proxyError = await validateServiceProxy(
|
|
59477
|
-
name,
|
|
59478
|
-
config,
|
|
59479
|
-
serviceFs,
|
|
59480
|
-
framework
|
|
59481
|
-
);
|
|
59482
|
-
if (proxyError) {
|
|
59483
|
-
return { error: proxyError };
|
|
59484
|
-
}
|
|
59485
59496
|
return {
|
|
59486
59497
|
service: {
|
|
59487
59498
|
schema: "experimentalServicesV2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "31.0.0
|
|
3
|
+
"version": "31.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"ts-morph": "12.0.0",
|
|
17
17
|
"@vercel/gatsby-plugin-vercel-analytics": "1.0.12",
|
|
18
|
-
"@vercel/
|
|
19
|
-
"@vercel/
|
|
18
|
+
"@vercel/static-config": "3.4.4",
|
|
19
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.2.91"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@vercel/build-utils": "15.7.0
|
|
22
|
+
"@vercel/build-utils": "15.7.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/aws-lambda": "8.10.64",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"semver": "7.5.2",
|
|
41
41
|
"tree-kill": "1.2.2",
|
|
42
42
|
"vitest": "4.1.10",
|
|
43
|
-
"@vercel/build-utils": "15.7.0-snapshot-224301946cd2",
|
|
44
43
|
"@vercel/error-utils": "2.2.1",
|
|
45
|
-
"@vercel-internals/builder-orchestration": "1.2.0",
|
|
46
44
|
"@vercel/frameworks": "3.35.1",
|
|
47
|
-
"@vercel/
|
|
48
|
-
"@vercel/
|
|
45
|
+
"@vercel-internals/builder-orchestration": "1.2.0",
|
|
46
|
+
"@vercel/build-utils": "15.7.0",
|
|
47
|
+
"@vercel/fs-detectors": "7.14.0",
|
|
48
|
+
"@vercel/routing-utils": "6.6.1"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "node ../../utils/build-builder.mjs",
|