hono 3.7.4 → 3.7.5
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/cjs/context.js +2 -1
- package/dist/cjs/types.js +4 -0
- package/dist/context.js +1 -0
- package/dist/types/adapter/vercel/handler.d.ts +1 -0
- package/dist/types/context.d.ts +1 -2
- package/dist/types/hono-base.d.ts +1 -1
- package/dist/types/types.d.ts +2 -0
- package/dist/types.js +3 -0
- package/package.json +1 -1
package/dist/cjs/context.js
CHANGED
|
@@ -21,6 +21,7 @@ __export(context_exports, {
|
|
|
21
21
|
Context: () => Context
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(context_exports);
|
|
24
|
+
var import_types = require("./types");
|
|
24
25
|
var import_cookie = require("./utils/cookie");
|
|
25
26
|
var import_stream = require("./utils/stream");
|
|
26
27
|
const TEXT_PLAIN = "text/plain; charset=UTF-8";
|
|
@@ -199,7 +200,7 @@ class Context {
|
|
|
199
200
|
}
|
|
200
201
|
}
|
|
201
202
|
get event() {
|
|
202
|
-
if (this._exCtx instanceof FetchEvent) {
|
|
203
|
+
if (this._exCtx instanceof import_types.FetchEvent) {
|
|
203
204
|
return this._exCtx;
|
|
204
205
|
} else {
|
|
205
206
|
throw Error("This context has no FetchEvent");
|
package/dist/cjs/types.js
CHANGED
|
@@ -18,12 +18,16 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var types_exports = {};
|
|
20
20
|
__export(types_exports, {
|
|
21
|
+
FetchEvent: () => FetchEvent,
|
|
21
22
|
FetchEventLike: () => FetchEventLike
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(types_exports);
|
|
24
25
|
class FetchEventLike {
|
|
25
26
|
}
|
|
27
|
+
class FetchEvent extends FetchEventLike {
|
|
28
|
+
}
|
|
26
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
27
30
|
0 && (module.exports = {
|
|
31
|
+
FetchEvent,
|
|
28
32
|
FetchEventLike
|
|
29
33
|
});
|
package/dist/context.js
CHANGED
package/dist/types/context.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference lib="es2022" />
|
|
2
|
-
/// <reference lib="webworker" />
|
|
3
1
|
import type { HonoRequest } from './request';
|
|
4
2
|
import type { Env, NotFoundHandler, Input, TypedResponse } from './types';
|
|
3
|
+
import { FetchEvent } from './types';
|
|
5
4
|
import type { CookieOptions } from './utils/cookie';
|
|
6
5
|
import type { StatusCode } from './utils/http-status';
|
|
7
6
|
import { StreamingApi } from './utils/stream';
|
|
@@ -10,11 +10,11 @@ interface RouterRoute {
|
|
|
10
10
|
}
|
|
11
11
|
declare const Hono_base: new <E_1 extends Env = Env, S_1 extends Schema = {}, BasePath_1 extends string = "/">() => {
|
|
12
12
|
all: HandlerInterface<E_1, "all", S_1, BasePath_1>;
|
|
13
|
+
options: HandlerInterface<E_1, "options", S_1, BasePath_1>;
|
|
13
14
|
get: HandlerInterface<E_1, "get", S_1, BasePath_1>;
|
|
14
15
|
post: HandlerInterface<E_1, "post", S_1, BasePath_1>;
|
|
15
16
|
put: HandlerInterface<E_1, "put", S_1, BasePath_1>;
|
|
16
17
|
delete: HandlerInterface<E_1, "delete", S_1, BasePath_1>;
|
|
17
|
-
options: HandlerInterface<E_1, "options", S_1, BasePath_1>;
|
|
18
18
|
patch: HandlerInterface<E_1, "patch", S_1, BasePath_1>;
|
|
19
19
|
} & {
|
|
20
20
|
on: OnHandlerInterface<E_1, S_1, BasePath_1>;
|
package/dist/types/types.d.ts
CHANGED
package/dist/types.js
CHANGED