@trpc/server 11.0.0-rc.714 → 11.0.0-rc.716

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.
@@ -19,7 +19,7 @@ function createExpressMiddleware(opts) {
19
19
  return (req, res)=>{
20
20
  let path = '';
21
21
  utils.run(async ()=>{
22
- path = req.path.slice(1);
22
+ path = req.path.slice(req.path.lastIndexOf('/') + 1);
23
23
  await nodeHTTPRequestHandler.nodeHTTPRequestHandler({
24
24
  ...opts,
25
25
  req,
@@ -17,7 +17,7 @@ function createExpressMiddleware(opts) {
17
17
  return (req, res)=>{
18
18
  let path = '';
19
19
  run(async ()=>{
20
- path = req.path.slice(1);
20
+ path = req.path.slice(req.path.lastIndexOf('/') + 1);
21
21
  await nodeHTTPRequestHandler({
22
22
  ...opts,
23
23
  req,
@@ -1,7 +1,7 @@
1
1
  {
2
- "bundleSize": 193504,
3
- "bundleOrigSize": 223977,
4
- "bundleReduction": 13.61,
2
+ "bundleSize": 193532,
3
+ "bundleOrigSize": 224005,
4
+ "bundleReduction": 13.6,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
@@ -64,7 +64,7 @@
64
64
  "/src/unstable-core-do-not-import.ts",
65
65
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
66
66
  ],
67
- "percent": 6.53,
67
+ "percent": 6.52,
68
68
  "reduction": 0
69
69
  },
70
70
  {
@@ -207,7 +207,7 @@
207
207
  "dependents": [
208
208
  "/src/unstable-core-do-not-import/stream/sse.ts"
209
209
  ],
210
- "percent": 2.3,
210
+ "percent": 2.29,
211
211
  "reduction": 0
212
212
  },
213
213
  {
@@ -632,15 +632,15 @@
632
632
  },
633
633
  {
634
634
  "id": "/src/adapters/express.ts",
635
- "size": 859,
636
- "origSize": 1316,
635
+ "size": 887,
636
+ "origSize": 1344,
637
637
  "renderedExports": [
638
638
  "createExpressMiddleware"
639
639
  ],
640
640
  "removedExports": [],
641
641
  "dependents": [],
642
- "percent": 0.44,
643
- "reduction": 34.73
642
+ "percent": 0.46,
643
+ "reduction": 34
644
644
  },
645
645
  {
646
646
  "id": "/src/unstable-core-do-not-import/stream/tracked.ts",
@@ -868,16 +868,6 @@
868
868
  "percent": 0,
869
869
  "reduction": 100
870
870
  },
871
- {
872
- "id": "/src/shared.ts",
873
- "size": 0,
874
- "origSize": 653,
875
- "renderedExports": [],
876
- "removedExports": [],
877
- "dependents": [],
878
- "percent": 0,
879
- "reduction": 100
880
- },
881
871
  {
882
872
  "id": "/src/unstable-core-do-not-import.ts",
883
873
  "size": 0,
@@ -886,9 +876,9 @@
886
876
  "removedExports": [],
887
877
  "dependents": [
888
878
  "/src/adapters/express.ts",
879
+ "/src/adapters/standalone.ts",
889
880
  "/src/adapters/next.ts",
890
881
  "/src/adapters/ws.ts",
891
- "/src/adapters/standalone.ts",
892
882
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
893
883
  "/src/adapters/next-app-dir/nextAppDirCaller.ts",
894
884
  "/src/adapters/node-http/writeResponse.ts"
@@ -896,6 +886,16 @@
896
886
  "percent": 0,
897
887
  "reduction": 100
898
888
  },
889
+ {
890
+ "id": "/src/shared.ts",
891
+ "size": 0,
892
+ "origSize": 653,
893
+ "renderedExports": [],
894
+ "removedExports": [],
895
+ "dependents": [],
896
+ "percent": 0,
897
+ "reduction": 100
898
+ },
899
899
  {
900
900
  "id": "/src/adapters/next-app-dir.ts",
901
901
  "size": 0,
@@ -946,9 +946,9 @@
946
946
  "removedExports": [],
947
947
  "dependents": [
948
948
  "/src/adapters/express.ts",
949
+ "/src/adapters/standalone.ts",
949
950
  "/src/adapters/next.ts",
950
951
  "/src/adapters/ws.ts",
951
- "/src/adapters/standalone.ts",
952
952
  "/src/adapters/fastify/fastifyRequestHandler.ts"
953
953
  ],
954
954
  "percent": 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.0.0-rc.714+9ed47ef3c",
3
+ "version": "11.0.0-rc.716+77c939a3d",
4
4
  "description": "The tRPC server library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -152,5 +152,5 @@
152
152
  "peerDependencies": {
153
153
  "typescript": ">=5.7.2"
154
154
  },
155
- "gitHead": "9ed47ef3c4568acc7d2f3473307317cbf00e165c"
155
+ "gitHead": "77c939a3d0dd5ede02a3e216fdad35b2ad6ae2e5"
156
156
  }
@@ -28,7 +28,7 @@ export function createExpressMiddleware<TRouter extends AnyRouter>(
28
28
  return (req, res) => {
29
29
  let path = '';
30
30
  run(async () => {
31
- path = req.path.slice(1);
31
+ path = req.path.slice(req.path.lastIndexOf('/') + 1);
32
32
 
33
33
  await nodeHTTPRequestHandler({
34
34
  ...(opts as any),