@trpc/server 11.0.0-alpha-tmp-app-router-example.370 → 11.0.0-alpha-tmp-app-router-example.372

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ws.d.ts","sourceRoot":"","sources":["../../src/adapters/ws.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EACV,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAQzB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAY/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAQlE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,8BAA8B,CAAC,eAAe,EAAE,EAAE,CAAC,SAAS,CAAC,EAC7D,MAAM,CACP,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,OAAO,SAAS,SAAS,IAAI,CAC1D,IAAI,EAAE,yBAAyB,KAC5B,YAAY,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;AAE/C,MAAM,MAAM,0BAA0B,CAAC,OAAO,SAAS,SAAS,IAC9D,kBAAkB,CAAC,OAAO,EAAE,eAAe,CAAC,GAC1C,qBAAqB,CACnB,kBAAkB,CAAC,OAAO,CAAC,EAC3B,kBAAkB,CAAC,OAAO,CAAC,CAC5B,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,SAAS,IACrD,0BAA0B,CAAC,OAAO,CAAC,GAAG;IACpC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC;IACxB,MAAM,CAAC,EA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AE,eAAe,CAAC,GAC1C,qBAAqB,CACnB,kBAAkB,CAAC,OAAO,CAAC,EAC3B,kBAAkB,CAAC,OAAO,CAAC,CAC5B,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,SAAS,IACrD,0BAA0B,CAAC,OAAO,CAAC,GAAG;IACpC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE;QACV;;;WAGG;QACH,OAAO,EAAE,OAAO,CAAC;QACjB;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC;AAEJ,wBAAgB,sBAAsB,CAAC,OAAO,SAAS,SAAS,EAC9D,IAAI,EAAE,0BAA0B,CAAC,OAAO,CAAC,YAKnB,YAAY,OAAO,eAAe,mBAoPzD;AAiCD,wBAAgB,eAAe,CAAC,OAAO,SAAS,SAAS,EACvD,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC;;EA+BjC"}
@@ -181,6 +181,7 @@ function getWSConnectionHandler(opts) {
181
181
  }
182
182
  client.on('message', async (message)=>{
183
183
  try {
184
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
184
185
  const msgJSON = JSON.parse(message.toString());
185
186
  const msgs = Array.isArray(msgJSON) ? msgJSON : [
186
187
  msgJSON
@@ -179,6 +179,7 @@ function getWSConnectionHandler(opts) {
179
179
  }
180
180
  client.on('message', async (message)=>{
181
181
  try {
182
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
182
183
  const msgJSON = JSON.parse(message.toString());
183
184
  const msgs = Array.isArray(msgJSON) ? msgJSON : [
184
185
  msgJSON
@@ -1,7 +1,7 @@
1
1
  {
2
- "bundleSize": 105420,
3
- "bundleOrigSize": 154135,
4
- "bundleReduction": 31.61,
2
+ "bundleSize": 105501,
3
+ "bundleOrigSize": 154208,
4
+ "bundleReduction": 31.59,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/unstable-core-do-not-import/stream/stream.ts",
@@ -17,13 +17,13 @@
17
17
  "/src/unstable-core-do-not-import.ts",
18
18
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
19
19
  ],
20
- "percent": 14.16,
20
+ "percent": 14.15,
21
21
  "reduction": 8.44
22
22
  },
23
23
  {
24
24
  "id": "/src/adapters/ws.ts",
25
- "size": 11160,
26
- "origSize": 10797,
25
+ "size": 11241,
26
+ "origSize": 10870,
27
27
  "renderedExports": [
28
28
  "getWSConnectionHandler",
29
29
  "applyWSSHandler"
@@ -32,7 +32,7 @@
32
32
  "dependents": [
33
33
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
34
34
  ],
35
- "percent": 10.59,
35
+ "percent": 10.65,
36
36
  "reduction": 0
37
37
  },
38
38
  {
@@ -46,7 +46,7 @@
46
46
  "dependents": [
47
47
  "/src/unstable-core-do-not-import.ts"
48
48
  ],
49
- "percent": 10.29,
49
+ "percent": 10.28,
50
50
  "reduction": 3.08
51
51
  },
52
52
  {
@@ -77,8 +77,8 @@
77
77
  "removedExports": [],
78
78
  "dependents": [
79
79
  "/src/unstable-core-do-not-import.ts",
80
- "/src/unstable-core-do-not-import/initTRPC.ts",
81
- "/src/unstable-core-do-not-import/http/resolveResponse.ts"
80
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
81
+ "/src/unstable-core-do-not-import/initTRPC.ts"
82
82
  ],
83
83
  "percent": 5.68,
84
84
  "reduction": 41.05
@@ -172,9 +172,9 @@
172
172
  "removedExports": [],
173
173
  "dependents": [
174
174
  "/src/unstable-core-do-not-import.ts",
175
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
175
176
  "/src/unstable-core-do-not-import/router.ts",
176
- "/src/unstable-core-do-not-import/initTRPC.ts",
177
- "/src/unstable-core-do-not-import/http/resolveResponse.ts"
177
+ "/src/unstable-core-do-not-import/initTRPC.ts"
178
178
  ],
179
179
  "percent": 2.6,
180
180
  "reduction": 45.94
@@ -239,7 +239,7 @@
239
239
  "/src/adapters/node-http/index.ts",
240
240
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
241
241
  ],
242
- "percent": 2.07,
242
+ "percent": 2.06,
243
243
  "reduction": 14.12
244
244
  },
245
245
  {
@@ -284,9 +284,9 @@
284
284
  "removedExports": [],
285
285
  "dependents": [
286
286
  "/src/unstable-core-do-not-import.ts",
287
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
287
288
  "/src/unstable-core-do-not-import/router.ts",
288
289
  "/src/unstable-core-do-not-import/middleware.ts",
289
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
290
290
  "/src/unstable-core-do-not-import/http/contentType.ts",
291
291
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
292
292
  ],
@@ -341,7 +341,7 @@
341
341
  ],
342
342
  "removedExports": [],
343
343
  "dependents": [],
344
- "percent": 1.45,
344
+ "percent": 1.44,
345
345
  "reduction": 27.6
346
346
  },
347
347
  {
@@ -369,8 +369,8 @@
369
369
  "removedExports": [],
370
370
  "dependents": [
371
371
  "/src/unstable-core-do-not-import.ts",
372
- "/src/unstable-core-do-not-import/error/getErrorShape.ts",
373
- "/src/unstable-core-do-not-import/http/resolveResponse.ts"
372
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
373
+ "/src/unstable-core-do-not-import/error/getErrorShape.ts"
374
374
  ],
375
375
  "percent": 1.2,
376
376
  "reduction": 23.5
@@ -390,12 +390,12 @@
390
390
  "removedExports": [],
391
391
  "dependents": [
392
392
  "/src/unstable-core-do-not-import.ts",
393
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
394
+ "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
393
395
  "/src/unstable-core-do-not-import/error/TRPCError.ts",
394
396
  "/src/unstable-core-do-not-import/router.ts",
395
397
  "/src/unstable-core-do-not-import/transformer.ts",
396
398
  "/src/unstable-core-do-not-import/middleware.ts",
397
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
398
- "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
399
399
  "/src/unstable-core-do-not-import/http/contentType.ts",
400
400
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
401
401
  "/src/unstable-core-do-not-import/stream/stream.ts"
@@ -633,9 +633,9 @@
633
633
  "reduction": 93.8
634
634
  },
635
635
  {
636
- "id": "/src/index.ts",
636
+ "id": "/src/http.ts",
637
637
  "size": 0,
638
- "origSize": 32,
638
+ "origSize": 37,
639
639
  "renderedExports": [],
640
640
  "removedExports": [],
641
641
  "dependents": [],
@@ -643,9 +643,9 @@
643
643
  "reduction": 100
644
644
  },
645
645
  {
646
- "id": "/src/http.ts",
646
+ "id": "/src/rpc.ts",
647
647
  "size": 0,
648
- "origSize": 37,
648
+ "origSize": 36,
649
649
  "renderedExports": [],
650
650
  "removedExports": [],
651
651
  "dependents": [],
@@ -653,9 +653,9 @@
653
653
  "reduction": 100
654
654
  },
655
655
  {
656
- "id": "/src/rpc.ts",
656
+ "id": "/src/index.ts",
657
657
  "size": 0,
658
- "origSize": 36,
658
+ "origSize": 32,
659
659
  "renderedExports": [],
660
660
  "removedExports": [],
661
661
  "dependents": [],
@@ -714,6 +714,16 @@
714
714
  "percent": 0,
715
715
  "reduction": 100
716
716
  },
717
+ {
718
+ "id": "/src/adapters/fetch/index.ts",
719
+ "size": 0,
720
+ "origSize": 64,
721
+ "renderedExports": [],
722
+ "removedExports": [],
723
+ "dependents": [],
724
+ "percent": 0,
725
+ "reduction": 100
726
+ },
717
727
  {
718
728
  "id": "/src/adapters/node-http/index.ts",
719
729
  "size": 0,
@@ -728,16 +738,6 @@
728
738
  ],
729
739
  "percent": 0,
730
740
  "reduction": 100
731
- },
732
- {
733
- "id": "/src/adapters/fetch/index.ts",
734
- "size": 0,
735
- "origSize": 64,
736
- "renderedExports": [],
737
- "removedExports": [],
738
- "dependents": [],
739
- "percent": 0,
740
- "reduction": 100
741
741
  }
742
742
  ],
743
743
  "moduleCount": 51
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.0.0-alpha-tmp-app-router-example.370+4e1730616",
3
+ "version": "11.0.0-alpha-tmp-app-router-example.372+cd2b8e923",
4
4
  "description": "The tRPC server library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -149,5 +149,5 @@
149
149
  "funding": [
150
150
  "https://trpc.io/sponsor"
151
151
  ],
152
- "gitHead": "4e173061689ffbe59e6a9647092d60b21c495b61"
152
+ "gitHead": "cd2b8e923924b7c11bbbb9e1f4c191eaa03b8d2a"
153
153
  }
@@ -250,6 +250,7 @@ export function getWSConnectionHandler<TRouter extends AnyRouter>(
250
250
  }
251
251
  client.on('message', async (message) => {
252
252
  try {
253
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
253
254
  const msgJSON: unknown = JSON.parse(message.toString());
254
255
  const msgs: unknown[] = Array.isArray(msgJSON) ? msgJSON : [msgJSON];
255
256
  const promises = msgs