@trpc/server 9.19.0 → 9.20.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.
@@ -11,7 +11,7 @@ require('../../../dist/codes-33cef953.cjs.dev.js');
11
11
  /* eslint-disable @typescript-eslint/no-explicit-any */
12
12
  function createExpressMiddleware(opts) {
13
13
  return (req, res) => {
14
- const endpoint = req.path.substr(1);
14
+ const endpoint = req.path.slice(1);
15
15
  nodeHTTPRequestHandler.nodeHTTPRequestHandler({ ...opts,
16
16
  req,
17
17
  res,
@@ -11,7 +11,7 @@ require('../../../dist/codes-e0df67c4.cjs.prod.js');
11
11
  /* eslint-disable @typescript-eslint/no-explicit-any */
12
12
  function createExpressMiddleware(opts) {
13
13
  return (req, res) => {
14
- const endpoint = req.path.substr(1);
14
+ const endpoint = req.path.slice(1);
15
15
  nodeHTTPRequestHandler.nodeHTTPRequestHandler({ ...opts,
16
16
  req,
17
17
  res,
@@ -7,7 +7,7 @@ import '../../../dist/codes-fe07bf82.esm.js';
7
7
  /* eslint-disable @typescript-eslint/no-explicit-any */
8
8
  function createExpressMiddleware(opts) {
9
9
  return (req, res) => {
10
- const endpoint = req.path.substr(1);
10
+ const endpoint = req.path.slice(1);
11
11
  nodeHTTPRequestHandler({ ...opts,
12
12
  req,
13
13
  res,
@@ -17,7 +17,7 @@ var url__default = /*#__PURE__*/_interopDefault(url);
17
17
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
18
18
  function createHTTPHandler(opts) {
19
19
  return async (req, res) => {
20
- const endpoint = url__default['default'].parse(req.url).pathname.substr(1);
20
+ const endpoint = url__default['default'].parse(req.url).pathname.slice(1);
21
21
  await nodeHTTPRequestHandler.nodeHTTPRequestHandler({ ...opts,
22
22
  req,
23
23
  res,
@@ -17,7 +17,7 @@ var url__default = /*#__PURE__*/_interopDefault(url);
17
17
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
18
18
  function createHTTPHandler(opts) {
19
19
  return async (req, res) => {
20
- const endpoint = url__default['default'].parse(req.url).pathname.substr(1);
20
+ const endpoint = url__default['default'].parse(req.url).pathname.slice(1);
21
21
  await nodeHTTPRequestHandler.nodeHTTPRequestHandler({ ...opts,
22
22
  req,
23
23
  res,
@@ -8,7 +8,7 @@ import '../../../dist/codes-fe07bf82.esm.js';
8
8
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
9
9
  function createHTTPHandler(opts) {
10
10
  return async (req, res) => {
11
- const endpoint = url.parse(req.url).pathname.substr(1);
11
+ const endpoint = url.parse(req.url).pathname.slice(1);
12
12
  await nodeHTTPRequestHandler({ ...opts,
13
13
  req,
14
14
  res,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "9.19.0",
3
+ "version": "9.20.0",
4
4
  "description": "tRPC Server",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -70,7 +70,7 @@
70
70
  "yup": "^0.32.8",
71
71
  "zod": "^3.0.0"
72
72
  },
73
- "gitHead": "6eb1642a4a0aba9eb5fe4c1aa2648f5bdf65fcde",
73
+ "gitHead": "5fdcafe81b10022de48477ee6d8b9c115ab2bab7",
74
74
  "dependencies": {
75
75
  "tslib": "^2.1.0"
76
76
  }
@@ -16,7 +16,7 @@ export function createExpressMiddleware<TRouter extends AnyRouter>(
16
16
  opts: NodeHTTPHandlerOptions<TRouter, express.Request, express.Response>,
17
17
  ): express.Handler {
18
18
  return (req, res) => {
19
- const endpoint = req.path.substr(1);
19
+ const endpoint = req.path.slice(1);
20
20
 
21
21
  nodeHTTPRequestHandler({
22
22
  ...opts,
@@ -21,7 +21,7 @@ export function createHTTPHandler<TRouter extends AnyRouter>(
21
21
  opts: CreateHTTPHandlerOptions<TRouter>,
22
22
  ) {
23
23
  return async (req: http.IncomingMessage, res: http.ServerResponse) => {
24
- const endpoint = url.parse(req.url!).pathname!.substr(1);
24
+ const endpoint = url.parse(req.url!).pathname!.slice(1);
25
25
  await nodeHTTPRequestHandler({
26
26
  ...opts,
27
27
  req,