@vercel/static-build 22.0.0 → 24.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 +35 -22
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -32255,12 +32255,26 @@ var require_detect_builders = __commonJS({
|
|
|
32255
32255
|
".rb": "ruby",
|
|
32256
32256
|
".ru": "ruby"
|
|
32257
32257
|
};
|
|
32258
|
-
var BUILDER_RUNTIMES =
|
|
32259
|
-
Object.
|
|
32260
|
-
builder
|
|
32261
|
-
|
|
32262
|
-
|
|
32263
|
-
|
|
32258
|
+
var BUILDER_RUNTIMES = {
|
|
32259
|
+
...Object.fromEntries(
|
|
32260
|
+
Object.entries(RUNTIME_BUILDERS).map(([runtime, builder]) => [
|
|
32261
|
+
builder,
|
|
32262
|
+
runtime
|
|
32263
|
+
])
|
|
32264
|
+
),
|
|
32265
|
+
"@vercel/node": "node",
|
|
32266
|
+
"@vercel/next": "node",
|
|
32267
|
+
"@vercel/remix-builder": "node",
|
|
32268
|
+
"@vercel/redwood": "node",
|
|
32269
|
+
"@vercel/hydrogen": "node",
|
|
32270
|
+
"@vercel/express": "node",
|
|
32271
|
+
"@vercel/hono": "node",
|
|
32272
|
+
"@vercel/h3": "node",
|
|
32273
|
+
"@vercel/koa": "node",
|
|
32274
|
+
"@vercel/nestjs": "node",
|
|
32275
|
+
"@vercel/fastify": "node",
|
|
32276
|
+
"@vercel/elysia": "node"
|
|
32277
|
+
};
|
|
32264
32278
|
var STATIC_BUILDERS = /* @__PURE__ */ new Set([
|
|
32265
32279
|
"@vercel/static-build",
|
|
32266
32280
|
"@vercel/static"
|
|
@@ -32419,14 +32433,12 @@ var require_detect_builders = __commonJS({
|
|
|
32419
32433
|
if (!framework || framework === "container" || framework === "services")
|
|
32420
32434
|
return void 0;
|
|
32421
32435
|
const f = frameworksBySlug.get(framework);
|
|
32422
|
-
|
|
32436
|
+
if (!f)
|
|
32437
|
+
return void 0;
|
|
32438
|
+
const declaredBuilder = f.useRuntime?.use;
|
|
32423
32439
|
if (declaredBuilder)
|
|
32424
32440
|
return import_constants2.BUILDER_RUNTIMES[declaredBuilder];
|
|
32425
|
-
|
|
32426
|
-
...f?.detectors?.every ?? [],
|
|
32427
|
-
...f?.detectors?.some ?? []
|
|
32428
|
-
];
|
|
32429
|
-
return STATIC_BUILDER_RUNTIMES[framework] ?? (detectorItems.some((d) => d.matchPackage !== void 0) ? "node" : void 0);
|
|
32441
|
+
return STATIC_BUILDER_RUNTIMES[framework] ?? "node";
|
|
32430
32442
|
}
|
|
32431
32443
|
function isFrontendFramework(framework) {
|
|
32432
32444
|
return !!framework && !inferRuntimeFromFramework(framework);
|
|
@@ -32480,11 +32492,13 @@ var require_detect_builders = __commonJS({
|
|
|
32480
32492
|
var import_build_utils22 = require("@vercel/build-utils");
|
|
32481
32493
|
var import_fs5 = __toESM2(require("fs"));
|
|
32482
32494
|
var import_build_utils5 = require("@vercel/build-utils");
|
|
32483
|
-
var import_python_analysis = require_dist5();
|
|
32484
32495
|
async function isPythonEntrypoint(fsPath) {
|
|
32496
|
+
const {
|
|
32497
|
+
findAppOrHandler
|
|
32498
|
+
} = require_dist5();
|
|
32485
32499
|
try {
|
|
32486
32500
|
const content = await import_fs5.default.promises.readFile(fsPath, "utf-8");
|
|
32487
|
-
return await
|
|
32501
|
+
return await findAppOrHandler(content) !== null;
|
|
32488
32502
|
} catch (err) {
|
|
32489
32503
|
(0, import_build_utils5.debug)(`Failed to check Python entrypoint: ${err}`);
|
|
32490
32504
|
return false;
|
|
@@ -33024,21 +33038,20 @@ var require_detect_builders = __commonJS({
|
|
|
33024
33038
|
message: `The proxy entrypoint \`${proxy.entrypoint}\` does not exist.`
|
|
33025
33039
|
};
|
|
33026
33040
|
}
|
|
33027
|
-
if (framework === "nextjs" || framework === "astro") {
|
|
33028
|
-
return {
|
|
33029
|
-
code: "proxy_framework_conflict",
|
|
33030
|
-
message: `The \`proxy\` property cannot be used with ${framework === "nextjs" ? "Next.js" : "Astro"} because the framework builds its own routing middleware.`
|
|
33031
|
-
};
|
|
33032
|
-
}
|
|
33033
33041
|
const appRuntime = (0, import_framework.inferBuilderRuntimeFromFramework)(framework);
|
|
33034
|
-
const
|
|
33035
|
-
const proxyRuntime = import_constants.ENTRYPOINT_EXTENSIONS[(0, import_path7.extname)(proxyFile)];
|
|
33042
|
+
const proxyRuntime = import_constants.ENTRYPOINT_EXTENSIONS[(0, import_path7.extname)(file)];
|
|
33036
33043
|
if (appRuntime !== void 0 && proxyRuntime !== void 0 && appRuntime !== proxyRuntime) {
|
|
33037
33044
|
return {
|
|
33038
33045
|
code: "proxy_runtime_mismatch",
|
|
33039
33046
|
message: `The proxy entrypoint \`${proxy.entrypoint}\` uses the ${proxyRuntime} runtime, but the app uses the ${appRuntime} runtime. The proxy and app must use the same runtime.`
|
|
33040
33047
|
};
|
|
33041
33048
|
}
|
|
33049
|
+
if (framework === "nextjs" || framework === "astro") {
|
|
33050
|
+
return {
|
|
33051
|
+
code: "proxy_framework_conflict",
|
|
33052
|
+
message: `The \`proxy\` property cannot be used with ${framework === "nextjs" ? "Next.js" : "Astro"} because the framework builds its own routing middleware.`
|
|
33053
|
+
};
|
|
33054
|
+
}
|
|
33042
33055
|
return null;
|
|
33043
33056
|
}
|
|
33044
33057
|
function hasBuildScript(pkg) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"ts-morph": "12.0.0",
|
|
17
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.2.78",
|
|
17
18
|
"@vercel/gatsby-plugin-vercel-analytics": "1.0.12",
|
|
18
|
-
"@vercel/gatsby-plugin-vercel-builder": "2.2.76",
|
|
19
19
|
"@vercel/static-config": "3.4.4"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@vercel/build-utils": "
|
|
22
|
+
"@vercel/build-utils": "15.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/aws-lambda": "8.10.64",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"semver": "7.5.2",
|
|
41
41
|
"tree-kill": "1.2.2",
|
|
42
42
|
"vitest": "4.1.10",
|
|
43
|
-
"@vercel/build-utils": "
|
|
43
|
+
"@vercel/build-utils": "15.0.0",
|
|
44
44
|
"@vercel/error-utils": "2.2.1",
|
|
45
45
|
"@vercel/frameworks": "3.35.0",
|
|
46
|
-
"@vercel/fs-detectors": "7.
|
|
46
|
+
"@vercel/fs-detectors": "7.10.1",
|
|
47
47
|
"@vercel/routing-utils": "6.6.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|