hono 3.2.0-rc.3 → 3.2.0-rc.4

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.
@@ -67,6 +67,11 @@ class Hono extends defineDynamicClass() {
67
67
  const req = new Request(path, requestInit);
68
68
  return await this.fetch(req);
69
69
  };
70
+ this.fire = () => {
71
+ addEventListener("fetch", (event) => {
72
+ void event.respondWith(this.handleEvent(event));
73
+ });
74
+ };
70
75
  const allMethods = [...import_router.METHODS, import_router.METHOD_NAME_ALL_LOWERCASE];
71
76
  allMethods.map((method) => {
72
77
  this[method] = (args1, ...args) => {
package/dist/cjs/index.js CHANGED
@@ -22,11 +22,6 @@ __export(src_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(src_exports);
24
24
  var import_hono = require("./hono");
25
- import_hono.Hono.prototype.fire = function() {
26
- addEventListener("fetch", (event) => {
27
- void event.respondWith(this.handleEvent(event));
28
- });
29
- };
30
25
  // Annotate the CommonJS export names for ESM import in node:
31
26
  0 && (module.exports = {
32
27
  Hono
package/dist/hono-base.js CHANGED
@@ -45,6 +45,11 @@ var Hono = class extends defineDynamicClass() {
45
45
  const req = new Request(path, requestInit);
46
46
  return await this.fetch(req);
47
47
  };
48
+ this.fire = () => {
49
+ addEventListener("fetch", (event) => {
50
+ void event.respondWith(this.handleEvent(event));
51
+ });
52
+ };
48
53
  const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE];
49
54
  allMethods.map((method) => {
50
55
  this[method] = (args1, ...args) => {
package/dist/index.js CHANGED
@@ -1,10 +1,5 @@
1
1
  // src/index.ts
2
2
  import { Hono } from "./hono.js";
3
- Hono.prototype.fire = function() {
4
- addEventListener("fetch", (event) => {
5
- void event.respondWith(this.handleEvent(event));
6
- });
7
- };
8
3
  export {
9
4
  Hono
10
5
  };
@@ -50,5 +50,6 @@ declare class Hono<E extends Env = Env, S = {}, BasePath extends string = '/'> e
50
50
  handleEvent: (event: FetchEvent) => Response | Promise<Response>;
51
51
  fetch: (request: Request, Env?: E['Bindings'] | {}, executionCtx?: ExecutionContext) => Response | Promise<Response>;
52
52
  request: (input: Request | string | URL, requestInit?: RequestInit) => Promise<Response>;
53
+ fire: () => void;
53
54
  }
54
55
  export { Hono as HonoBase };
@@ -2,9 +2,4 @@ import { Hono } from './hono';
2
2
  export type { Env, ErrorHandler, Handler, MiddlewareHandler, Next, NotFoundHandler, ValidationTargets, Input, } from './types';
3
3
  export type { Context, ContextVariableMap } from './context';
4
4
  export type { HonoRequest } from './request';
5
- declare module './hono-base' {
6
- interface HonoBase {
7
- fire(): void;
8
- }
9
- }
10
5
  export { Hono };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono",
3
- "version": "3.2.0-rc.3",
3
+ "version": "3.2.0-rc.4",
4
4
  "description": "Ultrafast web framework for the Edges",
5
5
  "main": "dist/cjs/index.js",
6
6
  "type": "module",