hono 1.6.3 → 1.6.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.
- package/dist/compose.d.ts +5 -1
- package/dist/context.d.ts +1 -1
- package/dist/hono.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/middleware/mustache/module.d.mts +3 -1
- package/dist/middleware/serve-static/module.d.mts +3 -1
- package/dist/middleware/serve-static/serve-static.d.ts +1 -2
- package/package.json +1 -1
package/dist/compose.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { ErrorHandler, NotFoundHandler } from './hono';
|
|
2
|
-
export declare const compose: <C>(middleware: Function[], onError?: ErrorHandler<
|
|
2
|
+
export declare const compose: <C>(middleware: Function[], onError?: ErrorHandler<{
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
}> | undefined, onNotFound?: NotFoundHandler<{
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
}> | undefined) => (context: C, next?: Function | undefined) => Promise<C>;
|
package/dist/context.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { NotFoundHandler } from './hono';
|
|
|
3
3
|
import type { StatusCode } from './utils/http-status';
|
|
4
4
|
declare type Headers = Record<string, string>;
|
|
5
5
|
export declare type Data = string | ArrayBuffer | ReadableStream;
|
|
6
|
-
|
|
6
|
+
declare type Env = Record<string, any>;
|
|
7
7
|
export declare class Context<RequestParamKeyType extends string = string, E = Env> {
|
|
8
8
|
req: Request<RequestParamKeyType>;
|
|
9
9
|
env: E;
|
package/dist/hono.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
2
|
import { Context } from './context';
|
|
3
|
-
import type { Env } from './context';
|
|
4
3
|
import type { Router } from './router';
|
|
4
|
+
declare type Env = Record<string, any>;
|
|
5
5
|
export declare type Handler<RequestParamKeyType extends string = string, E = Env> = (c: Context<RequestParamKeyType, E>, next: Next) => Response | Promise<Response> | Promise<void> | Promise<Response | undefined>;
|
|
6
6
|
export declare type NotFoundHandler<E = Env> = (c: Context<string, E>) => Response | Promise<Response>;
|
|
7
7
|
export declare type ErrorHandler<E = Env> = (err: Error, c: Context<string, E>) => Response;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { MustacheOptions } from './mustache';
|
|
2
|
-
declare const module: (options?: MustacheOptions) => (c: import("../../context").Context<string,
|
|
2
|
+
declare const module: (options?: MustacheOptions) => (c: import("../../context").Context<string, {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
}>, next: import("../../hono").Next) => Promise<void>;
|
|
3
5
|
export { module as mustache };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { ServeStaticOptions } from './serve-static';
|
|
2
|
-
declare const module: (options?: ServeStaticOptions) => import("../../hono").Handler<string,
|
|
2
|
+
declare const module: (options?: ServeStaticOptions) => import("../../hono").Handler<string, {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
}>;
|
|
3
5
|
export { module as serveStatic };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import type { Env } from '../../context';
|
|
3
2
|
import type { Handler } from '../../hono';
|
|
4
3
|
export declare type ServeStaticOptions = {
|
|
5
4
|
root?: string;
|
|
@@ -7,4 +6,4 @@ export declare type ServeStaticOptions = {
|
|
|
7
6
|
manifest?: object | string;
|
|
8
7
|
namespace?: KVNamespace;
|
|
9
8
|
};
|
|
10
|
-
export declare const serveStatic: (options?: ServeStaticOptions) => Handler
|
|
9
|
+
export declare const serveStatic: (options?: ServeStaticOptions) => Handler;
|