vercel 48.8.0 → 48.8.1

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 +57 -65
  2. package/package.json +10 -10
package/dist/index.js CHANGED
@@ -49640,7 +49640,7 @@ var require_package = __commonJS2({
49640
49640
  "../client/package.json"(exports2, module2) {
49641
49641
  module2.exports = {
49642
49642
  name: "@vercel/client",
49643
- version: "17.2.0",
49643
+ version: "17.2.1",
49644
49644
  main: "dist/index.js",
49645
49645
  typings: "dist/index.d.ts",
49646
49646
  homepage: "https://vercel.com",
@@ -49679,7 +49679,7 @@ var require_package = __commonJS2({
49679
49679
  vitest: "2.0.1"
49680
49680
  },
49681
49681
  dependencies: {
49682
- "@vercel/build-utils": "12.2.3",
49682
+ "@vercel/build-utils": "12.2.4",
49683
49683
  "@vercel/error-utils": "2.0.3",
49684
49684
  "@vercel/microfrontends": "1.2.2",
49685
49685
  "@vercel/routing-utils": "5.2.1",
@@ -146394,35 +146394,33 @@ async function writeBuildResultV2(repoRootPath, outputDir, buildResult, build2,
146394
146394
  }
146395
146395
  async function writeBuildResultV3(repoRootPath, outputDir, buildResult, build2, vercelConfig, standalone = false) {
146396
146396
  const { output: output2 } = buildResult;
146397
- if (process.env.VERCEL_EXPERIMENTAL_ROUTES_JSON === "1") {
146398
- const routesJsonPath = (0, import_path21.join)(outputDir, "..", "routes.json");
146399
- if ((0, import_fs_extra12.existsSync)(routesJsonPath)) {
146400
- try {
146401
- const newOutput = {
146402
- index: output2
146403
- };
146404
- const routesJson = await import_fs_extra12.default.readJSON(routesJsonPath);
146405
- if (routesJson && typeof routesJson === "object" && "routes" in routesJson && Array.isArray(routesJson.routes)) {
146406
- for (const route of routesJson.routes) {
146407
- if (route.source === "/") {
146408
- continue;
146409
- }
146410
- if (route.source) {
146411
- newOutput[route.source] = output2;
146412
- }
146397
+ const routesJsonPath = (0, import_path21.join)(outputDir, "..", "routes.json");
146398
+ if ((0, import_build_utils11.isBackendBuilder)(build2) && (0, import_fs_extra12.existsSync)(routesJsonPath)) {
146399
+ try {
146400
+ const newOutput = {
146401
+ index: output2
146402
+ };
146403
+ const routesJson = await import_fs_extra12.default.readJSON(routesJsonPath);
146404
+ if (routesJson && typeof routesJson === "object" && "routes" in routesJson && Array.isArray(routesJson.routes)) {
146405
+ for (const route of routesJson.routes) {
146406
+ if (route.source === "/") {
146407
+ continue;
146408
+ }
146409
+ if (route.source) {
146410
+ newOutput[route.source] = output2;
146413
146411
  }
146414
146412
  }
146415
- return writeBuildResultV2(
146416
- repoRootPath,
146417
- outputDir,
146418
- { output: newOutput, routes: buildResult.routes },
146419
- build2,
146420
- vercelConfig,
146421
- standalone
146422
- );
146423
- } catch (error3) {
146424
- output_manager_default.error(`Failed to read routes.json: ${error3}`);
146425
146413
  }
146414
+ return writeBuildResultV2(
146415
+ repoRootPath,
146416
+ outputDir,
146417
+ { output: newOutput, routes: buildResult.routes },
146418
+ build2,
146419
+ vercelConfig,
146420
+ standalone
146421
+ );
146422
+ } catch (error3) {
146423
+ output_manager_default.error(`Failed to read routes.json: ${error3}`);
146426
146424
  }
146427
146425
  }
146428
146426
  const src = build2.src;
@@ -148715,46 +148713,38 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
148715
148713
  });
148716
148714
  }
148717
148715
  }
148718
- const backendBuilders = [
148719
- "@vercel/express",
148720
- "@vercel/hono",
148721
- "@vercel/fastify"
148722
- ];
148723
- const isBackendBuilder = build2.use && backendBuilders.includes(build2.use);
148724
- if (process.env.VERCEL_EXPERIMENTAL_ROUTES_JSON === "1") {
148725
- if ("output" in buildResult && buildResult.output && isBackendBuilder) {
148726
- const routesJsonPath = (0, import_path27.join)(outputDir, "..", "routes.json");
148727
- if ((0, import_fs_extra18.existsSync)(routesJsonPath)) {
148728
- try {
148729
- const routesJson = await readJSONFile(routesJsonPath);
148730
- if (routesJson && typeof routesJson === "object" && "routes" in routesJson && Array.isArray(routesJson.routes)) {
148731
- const convertedRoutes = [];
148732
- for (const route of routesJson.routes) {
148733
- if (typeof route.source !== "string") {
148734
- continue;
148735
- }
148736
- const { src } = (0, import_routing_utils2.sourceToRegex)(route.source);
148737
- const newRoute = {
148738
- src,
148739
- dest: route.source
148740
- };
148741
- if (route.methods) {
148742
- newRoute.methods = route.methods;
148743
- }
148744
- if (route.source === "/") {
148745
- continue;
148746
- }
148747
- convertedRoutes.push(newRoute);
148716
+ if ("output" in buildResult && buildResult.output && (0, import_build_utils13.isBackendBuilder)(build2)) {
148717
+ const routesJsonPath = (0, import_path27.join)(outputDir, "..", "routes.json");
148718
+ if ((0, import_fs_extra18.existsSync)(routesJsonPath)) {
148719
+ try {
148720
+ const routesJson = await readJSONFile(routesJsonPath);
148721
+ if (routesJson && typeof routesJson === "object" && "routes" in routesJson && Array.isArray(routesJson.routes)) {
148722
+ const convertedRoutes = [];
148723
+ for (const route of routesJson.routes) {
148724
+ if (typeof route.source !== "string") {
148725
+ continue;
148726
+ }
148727
+ const { src } = (0, import_routing_utils2.sourceToRegex)(route.source);
148728
+ const newRoute = {
148729
+ src,
148730
+ dest: route.source
148731
+ };
148732
+ if (route.methods) {
148733
+ newRoute.methods = route.methods;
148734
+ }
148735
+ if (route.source === "/") {
148736
+ continue;
148748
148737
  }
148749
- buildResult.routes = [
148750
- { handle: "filesystem" },
148751
- ...convertedRoutes,
148752
- { src: "/(.*)", dest: "/" }
148753
- ];
148738
+ convertedRoutes.push(newRoute);
148754
148739
  }
148755
- } catch (error3) {
148756
- output_manager_default.error(`Failed to read routes.json: ${error3}`);
148740
+ buildResult.routes = [
148741
+ { handle: "filesystem" },
148742
+ ...convertedRoutes,
148743
+ { src: "/(.*)", dest: "/" }
148744
+ ];
148757
148745
  }
148746
+ } catch (error3) {
148747
+ output_manager_default.error(`Failed to read routes.json: ${error3}`);
148758
148748
  }
148759
148749
  }
148760
148750
  }
@@ -170263,6 +170253,8 @@ async function getBuildMatches(vercelConfig, cwd, devServer, fileList) {
170263
170253
  const existing = candidates.filter((p) => fileList.includes(p));
170264
170254
  if (existing.length > 0) {
170265
170255
  src = existing[0];
170256
+ } else if (fileList.includes("pyproject.toml")) {
170257
+ src = "pyproject.toml";
170266
170258
  }
170267
170259
  }
170268
170260
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "48.8.0",
3
+ "version": "48.8.1",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -22,20 +22,20 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@vercel/blob": "1.0.2",
25
- "@vercel/build-utils": "12.2.3",
25
+ "@vercel/build-utils": "12.2.4",
26
26
  "@vercel/fun": "1.1.6",
27
27
  "@vercel/go": "3.2.3",
28
- "@vercel/express": "0.1.4",
29
- "@vercel/hono": "0.2.4",
30
- "@vercel/h3": "0.1.10",
28
+ "@vercel/express": "0.1.5",
29
+ "@vercel/hono": "0.2.5",
30
+ "@vercel/h3": "0.1.11",
31
31
  "@vercel/hydrogen": "1.3.0",
32
- "@vercel/next": "4.15.0",
33
- "@vercel/node": "5.5.3",
34
- "@vercel/python": "6.0.0",
32
+ "@vercel/next": "4.15.1",
33
+ "@vercel/node": "5.5.4",
34
+ "@vercel/python": "6.0.1",
35
35
  "@vercel/redwood": "2.4.0",
36
36
  "@vercel/remix-builder": "5.5.0",
37
37
  "@vercel/ruby": "2.2.1",
38
- "@vercel/static-build": "2.8.3",
38
+ "@vercel/static-build": "2.8.4",
39
39
  "chokidar": "4.0.0",
40
40
  "jose": "5.9.6",
41
41
  "@vercel/detect-agent": "1.0.0",
@@ -84,7 +84,7 @@
84
84
  "@types/which": "3.0.0",
85
85
  "@types/write-json-file": "2.2.1",
86
86
  "@types/yauzl-promise": "2.1.0",
87
- "@vercel/client": "17.2.0",
87
+ "@vercel/client": "17.2.1",
88
88
  "@vercel/error-utils": "2.0.3",
89
89
  "@vercel/frameworks": "3.15.0",
90
90
  "@vercel/fs-detectors": "5.7.3",