@vercel/backends 2.0.0 → 3.0.3

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.d.mts CHANGED
@@ -78,9 +78,15 @@ declare const introspectApp: (args: {
78
78
  handle: string;
79
79
  src?: undefined;
80
80
  dest?: undefined;
81
+ transforms?: undefined;
81
82
  } | {
82
83
  src: string;
83
84
  dest: string;
85
+ transforms: {
86
+ type: "request.path";
87
+ op: "set";
88
+ args: string;
89
+ }[];
84
90
  handle?: undefined;
85
91
  })[];
86
92
  framework: {
@@ -96,9 +102,15 @@ declare const introspectApp: (args: {
96
102
  handle: string;
97
103
  src?: undefined;
98
104
  dest?: undefined;
105
+ transforms?: undefined;
99
106
  } | {
100
107
  src: string;
101
108
  dest: string;
109
+ transforms: {
110
+ type: "request.path";
111
+ op: "set";
112
+ args: string;
113
+ }[];
102
114
  handle?: undefined;
103
115
  })[];
104
116
  framework: {
package/dist/index.mjs CHANGED
@@ -1907,7 +1907,12 @@ const introspectApp = async (args) => {
1907
1907
  ...introspectionData.routes,
1908
1908
  {
1909
1909
  src: "/(.*)",
1910
- dest: "/"
1910
+ dest: "/",
1911
+ transforms: [{
1912
+ type: "request.path",
1913
+ op: "set",
1914
+ args: "/$1"
1915
+ }]
1911
1916
  }
1912
1917
  ];
1913
1918
  introspectionSpan.setAttributes({
@@ -1926,7 +1931,12 @@ const defaultResult = (args) => {
1926
1931
  return {
1927
1932
  routes: [{ handle: "filesystem" }, {
1928
1933
  src: "/(.*)",
1929
- dest: "/"
1934
+ dest: "/",
1935
+ transforms: [{
1936
+ type: "request.path",
1937
+ op: "set",
1938
+ args: "/$1"
1939
+ }]
1930
1940
  }],
1931
1941
  framework: getFramework(args)
1932
1942
  };
@@ -2442,7 +2452,12 @@ const build = async (args) => {
2442
2452
  ...introspectionResult.routes.map(remapRouteDestination),
2443
2453
  {
2444
2454
  src: getServiceCatchallSource(serviceRoutePrefix),
2445
- dest: serviceFunctionPath ?? "/"
2455
+ dest: serviceFunctionPath ?? "/",
2456
+ transforms: [{
2457
+ type: "request.path",
2458
+ op: "set",
2459
+ args: serviceRoutePrefix ? `${serviceRoutePrefix}/$1` : "/$1"
2460
+ }]
2446
2461
  }
2447
2462
  ];
2448
2463
  const output = serviceOutputPath ? { [serviceOutputPath]: lambda } : { index: lambda };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/backends",
3
- "version": "2.0.0",
3
+ "version": "3.0.3",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.mjs",
6
6
  "homepage": "https://vercel.com/docs",
@@ -37,10 +37,10 @@
37
37
  "ts-morph": "12.0.0",
38
38
  "tsx": "4.21.0",
39
39
  "zod": "3.22.4",
40
- "@vercel/static-config": "3.4.1"
40
+ "@vercel/static-config": "3.4.3"
41
41
  },
42
42
  "peerDependencies": {
43
- "@vercel/build-utils": "14.4.0"
43
+ "@vercel/build-utils": "14.5.1"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/express": "5.0.3",
@@ -51,7 +51,7 @@
51
51
  "tsdown": "0.16.3",
52
52
  "vite": "^6.4.3",
53
53
  "vitest": "^4.1.10",
54
- "@vercel/build-utils": "14.4.0"
54
+ "@vercel/build-utils": "14.5.1"
55
55
  },
56
56
  "module": "./dist/index.mjs",
57
57
  "types": "./dist/index.d.mts",