@kaito-http/core 4.0.0-beta.1 → 4.0.0-beta.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.cjs CHANGED
@@ -385,8 +385,8 @@ var Router = class _Router {
385
385
  });
386
386
  return this.add("GET", "/openapi.json", async () => Response.json(doc));
387
387
  };
388
- method = (method) => (path, route) => {
389
- return this.add(method, path, route);
388
+ method = (method) => {
389
+ return (path, route) => this.add(method, path, route);
390
390
  };
391
391
  get = this.method("GET");
392
392
  post = this.method("POST");
package/dist/index.d.cts CHANGED
@@ -27,7 +27,7 @@ declare class KaitoRequest {
27
27
  get request(): Request;
28
28
  }
29
29
 
30
- type KaitoMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE';
30
+ type KaitoMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
31
31
 
32
32
  /**
33
33
  * This class is merely a wrapper around a `Headers` object and a status code.
package/dist/index.d.ts CHANGED
@@ -27,7 +27,7 @@ declare class KaitoRequest {
27
27
  get request(): Request;
28
28
  }
29
29
 
30
- type KaitoMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE';
30
+ type KaitoMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
31
31
 
32
32
  /**
33
33
  * This class is merely a wrapper around a `Headers` object and a status code.
package/dist/index.js CHANGED
@@ -354,8 +354,8 @@ var Router = class _Router {
354
354
  });
355
355
  return this.add("GET", "/openapi.json", async () => Response.json(doc));
356
356
  };
357
- method = (method) => (path, route) => {
358
- return this.add(method, path, route);
357
+ method = (method) => {
358
+ return (path, route) => this.add(method, path, route);
359
359
  };
360
360
  get = this.method("GET");
361
361
  post = this.method("POST");
@@ -38,6 +38,9 @@ var KaitoSSEResponse = class extends Response {
38
38
  headers
39
39
  });
40
40
  }
41
+ get [Symbol.toStringTag]() {
42
+ return "KaitoSSEResponse";
43
+ }
41
44
  };
42
45
  function sseEventToString(event) {
43
46
  let result = "";
@@ -1,5 +1,6 @@
1
1
  declare class KaitoSSEResponse<_T> extends Response {
2
2
  constructor(body: ReadableStream<string>, init?: ResponseInit);
3
+ get [Symbol.toStringTag](): string;
3
4
  }
4
5
  type SSEEvent<T, E extends string> = ({
5
6
  data: T;
@@ -1,5 +1,6 @@
1
1
  declare class KaitoSSEResponse<_T> extends Response {
2
2
  constructor(body: ReadableStream<string>, init?: ResponseInit);
3
+ get [Symbol.toStringTag](): string;
3
4
  }
4
5
  type SSEEvent<T, E extends string> = ({
5
6
  data: T;
@@ -10,6 +10,9 @@ var KaitoSSEResponse = class extends Response {
10
10
  headers
11
11
  });
12
12
  }
13
+ get [Symbol.toStringTag]() {
14
+ return "KaitoSSEResponse";
15
+ }
13
16
  };
14
17
  function sseEventToString(event) {
15
18
  let result = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaito-http/core",
3
- "version": "4.0.0-beta.1",
3
+ "version": "4.0.0-beta.3",
4
4
  "author": "Alistair Smith <hi@alistair.sh>",
5
5
  "repository": "https://github.com/kaito-http/kaito",
6
6
  "devDependencies": {