hoa 0.2.0 → 0.2.1
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/CHANGELOG.md +4 -0
- package/dist/cjs/hoa.js +1 -1
- package/dist/esm/hoa.js +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +2 -2
package/CHANGELOG.md
CHANGED
package/dist/cjs/hoa.js
CHANGED
|
@@ -60,7 +60,7 @@ class Hoa {
|
|
|
60
60
|
/**
|
|
61
61
|
* Extend the application with a plugin initializer.
|
|
62
62
|
*
|
|
63
|
-
* @param {
|
|
63
|
+
* @param {HoaExtension} fn - Plugin function that receives the app instance
|
|
64
64
|
* @returns {Hoa} The Hoa instance for method chaining
|
|
65
65
|
* @throws {TypeError}
|
|
66
66
|
* @public
|
package/dist/esm/hoa.js
CHANGED
|
@@ -22,7 +22,7 @@ class Hoa {
|
|
|
22
22
|
/**
|
|
23
23
|
* Extend the application with a plugin initializer.
|
|
24
24
|
*
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {HoaExtension} fn - Plugin function that receives the app instance
|
|
26
26
|
* @returns {Hoa} The Hoa instance for method chaining
|
|
27
27
|
* @throws {TypeError}
|
|
28
28
|
* @public
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ interface ResJSON {
|
|
|
20
20
|
headers: Record<string, string>;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export type
|
|
23
|
+
export type HoaExtension = (app: Hoa) => void;
|
|
24
24
|
|
|
25
25
|
export type HoaMiddleware = (ctx: HoaContext, next?: () => Promise<void>) => Promise<void> | void;
|
|
26
26
|
|
|
@@ -34,7 +34,7 @@ export declare class Hoa {
|
|
|
34
34
|
readonly HoaResponse: typeof HoaResponse;
|
|
35
35
|
readonly middlewares: HoaMiddleware[];
|
|
36
36
|
|
|
37
|
-
extend(fn:
|
|
37
|
+
extend(fn: HoaExtension): this;
|
|
38
38
|
use(fn: HoaMiddleware): this;
|
|
39
39
|
fetch(request: Request, env?: any, executionCtx?: any): Promise<Response>;
|
|
40
40
|
protected handleRequest(ctx: HoaContext, middlewareFn: HoaMiddleware): Promise<Response>;
|