@vercel/fs-detectors 7.9.12 → 7.10.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/detect-builders.js +31 -20
- package/package.json +6 -6
package/dist/detect-builders.js
CHANGED
|
@@ -96,12 +96,26 @@ var require_constants = __commonJS({
|
|
|
96
96
|
".rb": "ruby",
|
|
97
97
|
".ru": "ruby"
|
|
98
98
|
};
|
|
99
|
-
var BUILDER_RUNTIMES =
|
|
100
|
-
Object.
|
|
101
|
-
builder
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
var BUILDER_RUNTIMES = {
|
|
100
|
+
...Object.fromEntries(
|
|
101
|
+
Object.entries(RUNTIME_BUILDERS).map(([runtime, builder]) => [
|
|
102
|
+
builder,
|
|
103
|
+
runtime
|
|
104
|
+
])
|
|
105
|
+
),
|
|
106
|
+
"@vercel/node": "node",
|
|
107
|
+
"@vercel/next": "node",
|
|
108
|
+
"@vercel/remix-builder": "node",
|
|
109
|
+
"@vercel/redwood": "node",
|
|
110
|
+
"@vercel/hydrogen": "node",
|
|
111
|
+
"@vercel/express": "node",
|
|
112
|
+
"@vercel/hono": "node",
|
|
113
|
+
"@vercel/h3": "node",
|
|
114
|
+
"@vercel/koa": "node",
|
|
115
|
+
"@vercel/nestjs": "node",
|
|
116
|
+
"@vercel/fastify": "node",
|
|
117
|
+
"@vercel/elysia": "node"
|
|
118
|
+
};
|
|
105
119
|
var STATIC_BUILDERS = /* @__PURE__ */ new Set([
|
|
106
120
|
"@vercel/static-build",
|
|
107
121
|
"@vercel/static"
|
|
@@ -264,14 +278,12 @@ var require_framework = __commonJS({
|
|
|
264
278
|
if (!framework || framework === "container" || framework === "services")
|
|
265
279
|
return void 0;
|
|
266
280
|
const f = frameworksBySlug.get(framework);
|
|
267
|
-
|
|
281
|
+
if (!f)
|
|
282
|
+
return void 0;
|
|
283
|
+
const declaredBuilder = f.useRuntime?.use;
|
|
268
284
|
if (declaredBuilder)
|
|
269
285
|
return import_constants2.BUILDER_RUNTIMES[declaredBuilder];
|
|
270
|
-
|
|
271
|
-
...f?.detectors?.every ?? [],
|
|
272
|
-
...f?.detectors?.some ?? []
|
|
273
|
-
];
|
|
274
|
-
return STATIC_BUILDER_RUNTIMES[framework] ?? (detectorItems.some((d) => d.matchPackage !== void 0) ? "node" : void 0);
|
|
286
|
+
return STATIC_BUILDER_RUNTIMES[framework] ?? "node";
|
|
275
287
|
}
|
|
276
288
|
function isFrontendFramework(framework) {
|
|
277
289
|
return !!framework && !inferRuntimeFromFramework(framework);
|
|
@@ -881,21 +893,20 @@ function validateProxy(options, files, framework) {
|
|
|
881
893
|
message: `The proxy entrypoint \`${proxy.entrypoint}\` does not exist.`
|
|
882
894
|
};
|
|
883
895
|
}
|
|
884
|
-
if (framework === "nextjs" || framework === "astro") {
|
|
885
|
-
return {
|
|
886
|
-
code: "proxy_framework_conflict",
|
|
887
|
-
message: `The \`proxy\` property cannot be used with ${framework === "nextjs" ? "Next.js" : "Astro"} because the framework builds its own routing middleware.`
|
|
888
|
-
};
|
|
889
|
-
}
|
|
890
896
|
const appRuntime = (0, import_framework.inferBuilderRuntimeFromFramework)(framework);
|
|
891
|
-
const
|
|
892
|
-
const proxyRuntime = import_constants.ENTRYPOINT_EXTENSIONS[(0, import_path.extname)(proxyFile)];
|
|
897
|
+
const proxyRuntime = import_constants.ENTRYPOINT_EXTENSIONS[(0, import_path.extname)(file)];
|
|
893
898
|
if (appRuntime !== void 0 && proxyRuntime !== void 0 && appRuntime !== proxyRuntime) {
|
|
894
899
|
return {
|
|
895
900
|
code: "proxy_runtime_mismatch",
|
|
896
901
|
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.`
|
|
897
902
|
};
|
|
898
903
|
}
|
|
904
|
+
if (framework === "nextjs" || framework === "astro") {
|
|
905
|
+
return {
|
|
906
|
+
code: "proxy_framework_conflict",
|
|
907
|
+
message: `The \`proxy\` property cannot be used with ${framework === "nextjs" ? "Next.js" : "Astro"} because the framework builds its own routing middleware.`
|
|
908
|
+
};
|
|
909
|
+
}
|
|
899
910
|
return null;
|
|
900
911
|
}
|
|
901
912
|
function hasBuildScript(pkg) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/fs-detectors",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.10.0",
|
|
4
4
|
"description": "Vercel filesystem detectors",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"minimatch": "3.1.2",
|
|
21
21
|
"semver": "6.3.1",
|
|
22
22
|
"smol-toml": "1.5.2",
|
|
23
|
-
"@vercel/
|
|
24
|
-
"@vercel/python-analysis": "0.15.1",
|
|
25
|
-
"@vercel/routing-utils": "6.6.0",
|
|
23
|
+
"@vercel/build-utils": "14.23.0",
|
|
26
24
|
"@vercel/error-utils": "2.2.1",
|
|
27
|
-
"@vercel/
|
|
25
|
+
"@vercel/frameworks": "3.35.0",
|
|
26
|
+
"@vercel/python-analysis": "0.15.2",
|
|
27
|
+
"@vercel/routing-utils": "6.6.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/glob": "7.2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@types/node": "20.11.0",
|
|
34
34
|
"@types/semver": "7.3.10",
|
|
35
35
|
"vitest": "4.1.10",
|
|
36
|
-
"@vercel-internals/runtimes": "1.
|
|
36
|
+
"@vercel-internals/runtimes": "1.2.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "node build.mjs",
|