hono 4.13.11 → 4.13.12
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/jsx/utils.js +1 -1
- package/dist/cjs/middleware/combine/index.js +3 -1
- package/dist/cjs/middleware/etag/index.js +2 -2
- package/dist/jsx/utils.js +1 -1
- package/dist/middleware/combine/index.js +3 -1
- package/dist/middleware/etag/index.js +2 -2
- package/dist/middleware/language/language.js +1 -1
- package/dist/types/adapter/aws-lambda/handler.d.ts +2 -1
- package/dist/types/adapter/aws-lambda/types.d.ts +2 -1
- package/dist/types/adapter/bun/websocket.d.ts +2 -1
- package/dist/types/adapter/cloudflare-pages/handler.d.ts +2 -1
- package/dist/types/adapter/cloudflare-workers/serve-static-module.d.ts +2 -1
- package/dist/types/adapter/lambda-edge/handler.d.ts +2 -1
- package/dist/types/adapter/service-worker/handler.d.ts +2 -1
- package/dist/types/adapter/service-worker/index.d.ts +2 -1
- package/dist/types/adapter/service-worker/types.d.ts +2 -1
- package/dist/types/client/types.d.ts +2 -1
- package/dist/types/context.d.ts +2 -1
- package/dist/types/helper/cookie/index.d.ts +2 -1
- package/dist/types/helper/css/common.d.ts +2 -1
- package/dist/types/helper/css/index.d.ts +2 -1
- package/dist/types/helper/dev/index.d.ts +2 -1
- package/dist/types/helper/factory/index.d.ts +2 -1
- package/dist/types/helper/proxy/index.d.ts +2 -1
- package/dist/types/helper/ssg/middleware.d.ts +2 -1
- package/dist/types/helper/ssg/utils.d.ts +2 -1
- package/dist/types/helper/testing/index.d.ts +2 -1
- package/dist/types/hono-base.d.ts +2 -1
- package/dist/types/http-exception.d.ts +2 -1
- package/dist/types/jsx/base.d.ts +4 -3
- package/dist/types/jsx/context.d.ts +2 -1
- package/dist/types/jsx/dom/client.d.ts +2 -1
- package/dist/types/jsx/dom/css.d.ts +2 -1
- package/dist/types/jsx/dom/hooks/index.d.ts +2 -1
- package/dist/types/jsx/dom/index.d.ts +2 -1
- package/dist/types/jsx/dom/render.d.ts +2 -1
- package/dist/types/jsx/dom/server.d.ts +2 -1
- package/dist/types/jsx/hooks/index.d.ts +2 -1
- package/dist/types/jsx/index.d.ts +2 -1
- package/dist/types/jsx/types.d.ts +2 -1
- package/dist/types/middleware/basic-auth/index.d.ts +2 -1
- package/dist/types/middleware/bearer-auth/index.d.ts +2 -1
- package/dist/types/middleware/body-limit/index.d.ts +2 -1
- package/dist/types/middleware/combine/index.d.ts +2 -1
- package/dist/types/middleware/compress/index.d.ts +2 -1
- package/dist/types/middleware/cors/index.d.ts +2 -1
- package/dist/types/middleware/csrf/index.d.ts +2 -1
- package/dist/types/middleware/etag/index.d.ts +2 -1
- package/dist/types/middleware/ip-restriction/index.d.ts +2 -1
- package/dist/types/middleware/jsx-renderer/index.d.ts +2 -1
- package/dist/types/middleware/jwt/index.d.ts +2 -1
- package/dist/types/middleware/language/index.d.ts +2 -1
- package/dist/types/middleware/logger/index.d.ts +2 -1
- package/dist/types/middleware/method-not-allowed/index.d.ts +2 -1
- package/dist/types/middleware/method-override/index.d.ts +2 -1
- package/dist/types/middleware/powered-by/index.d.ts +2 -1
- package/dist/types/middleware/pretty-json/index.d.ts +2 -1
- package/dist/types/middleware/request-id/index.d.ts +2 -1
- package/dist/types/middleware/secure-headers/index.d.ts +2 -1
- package/dist/types/middleware/secure-headers/permissions-policy.d.ts +2 -1
- package/dist/types/middleware/secure-headers/secure-headers.d.ts +2 -1
- package/dist/types/middleware/timing/index.d.ts +2 -1
- package/dist/types/middleware/timing/timing.d.ts +2 -1
- package/dist/types/middleware/trailing-slash/index.d.ts +2 -1
- package/dist/types/request.d.ts +2 -1
- package/dist/types/router/reg-exp-router/prepared-router.d.ts +2 -1
- package/dist/types/types.d.ts +2 -1
- package/dist/types/utils/body.d.ts +2 -1
- package/dist/types/utils/buffer.d.ts +2 -1
- package/dist/types/utils/cookie.d.ts +2 -1
- package/dist/types/utils/crypto.d.ts +2 -1
- package/dist/types/utils/filepath.d.ts +2 -1
- package/dist/types/utils/html.d.ts +2 -1
- package/dist/types/utils/mime.d.ts +2 -1
- package/dist/types/utils/types.d.ts +2 -1
- package/dist/types/utils/url.d.ts +2 -1
- package/dist/types/validator/utils.d.ts +2 -1
- package/dist/types/validator/validator.d.ts +2 -1
- package/package.json +2 -2
package/dist/cjs/jsx/utils.js
CHANGED
|
@@ -101,7 +101,7 @@ const styleObjectForEach = (style, fn) => {
|
|
|
101
101
|
continue;
|
|
102
102
|
}
|
|
103
103
|
let value;
|
|
104
|
-
if (typeof v === "number") value = !key.match(/^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/) ? `${v}px` : `${v}`;
|
|
104
|
+
if (typeof v === "number") value = !key.match(/^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?!.*gap)(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/) ? `${v}px` : `${v}`;
|
|
105
105
|
else if (typeof v === "string") {
|
|
106
106
|
if (hasUnsafeStyleValue(v)) continue;
|
|
107
107
|
value = v;
|
|
@@ -40,13 +40,14 @@ const some = (...middleware) => {
|
|
|
40
40
|
return next();
|
|
41
41
|
};
|
|
42
42
|
let lastError;
|
|
43
|
+
let response;
|
|
43
44
|
for (const handler of middleware) try {
|
|
44
45
|
const result = await handler(c, wrappedNext);
|
|
45
46
|
if (result === true && !c.finalized) await wrappedNext();
|
|
46
47
|
else if (result === false) {
|
|
47
48
|
lastError = /* @__PURE__ */ new Error("No successful middleware found");
|
|
48
49
|
continue;
|
|
49
|
-
}
|
|
50
|
+
} else if (result && result !== true) response = result;
|
|
50
51
|
lastError = void 0;
|
|
51
52
|
break;
|
|
52
53
|
} catch (error) {
|
|
@@ -54,6 +55,7 @@ const some = (...middleware) => {
|
|
|
54
55
|
if (isNextCalled) break;
|
|
55
56
|
}
|
|
56
57
|
if (lastError) throw lastError;
|
|
58
|
+
return response;
|
|
57
59
|
};
|
|
58
60
|
};
|
|
59
61
|
/**
|
|
@@ -49,7 +49,7 @@ function initializeGenerator(generator) {
|
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
51
|
const etag = (options) => {
|
|
52
|
-
const retainedHeaders = options?.retainedHeaders ?? RETAINED_304_HEADERS;
|
|
52
|
+
const retainedHeaders = new Set((options?.retainedHeaders ?? RETAINED_304_HEADERS).map((header) => header.toLowerCase()));
|
|
53
53
|
const weak = options?.weak ?? false;
|
|
54
54
|
const generator = initializeGenerator(options?.generateDigest);
|
|
55
55
|
return async function etag(c, next) {
|
|
@@ -70,7 +70,7 @@ const etag = (options) => {
|
|
|
70
70
|
statusText: "Not Modified",
|
|
71
71
|
headers: { ETag: etag }
|
|
72
72
|
});
|
|
73
|
-
for (const key of Array.from(c.res.headers.keys())) if (retainedHeaders.
|
|
73
|
+
for (const key of Array.from(c.res.headers.keys())) if (!retainedHeaders.has(key.toLowerCase())) c.res.headers.delete(key);
|
|
74
74
|
} else c.res.headers.set("ETag", etag);
|
|
75
75
|
};
|
|
76
76
|
};
|
package/dist/jsx/utils.js
CHANGED
|
@@ -100,7 +100,7 @@ const styleObjectForEach = (style, fn) => {
|
|
|
100
100
|
continue;
|
|
101
101
|
}
|
|
102
102
|
let value;
|
|
103
|
-
if (typeof v === "number") value = !key.match(/^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/) ? `${v}px` : `${v}`;
|
|
103
|
+
if (typeof v === "number") value = !key.match(/^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?!.*gap)(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/) ? `${v}px` : `${v}`;
|
|
104
104
|
else if (typeof v === "string") {
|
|
105
105
|
if (hasUnsafeStyleValue(v)) continue;
|
|
106
106
|
value = v;
|
|
@@ -39,13 +39,14 @@ const some = (...middleware) => {
|
|
|
39
39
|
return next();
|
|
40
40
|
};
|
|
41
41
|
let lastError;
|
|
42
|
+
let response;
|
|
42
43
|
for (const handler of middleware) try {
|
|
43
44
|
const result = await handler(c, wrappedNext);
|
|
44
45
|
if (result === true && !c.finalized) await wrappedNext();
|
|
45
46
|
else if (result === false) {
|
|
46
47
|
lastError = /* @__PURE__ */ new Error("No successful middleware found");
|
|
47
48
|
continue;
|
|
48
|
-
}
|
|
49
|
+
} else if (result && result !== true) response = result;
|
|
49
50
|
lastError = void 0;
|
|
50
51
|
break;
|
|
51
52
|
} catch (error) {
|
|
@@ -53,6 +54,7 @@ const some = (...middleware) => {
|
|
|
53
54
|
if (isNextCalled) break;
|
|
54
55
|
}
|
|
55
56
|
if (lastError) throw lastError;
|
|
57
|
+
return response;
|
|
56
58
|
};
|
|
57
59
|
};
|
|
58
60
|
/**
|
|
@@ -48,7 +48,7 @@ function initializeGenerator(generator) {
|
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
50
|
const etag = (options) => {
|
|
51
|
-
const retainedHeaders = options?.retainedHeaders ?? RETAINED_304_HEADERS;
|
|
51
|
+
const retainedHeaders = new Set((options?.retainedHeaders ?? RETAINED_304_HEADERS).map((header) => header.toLowerCase()));
|
|
52
52
|
const weak = options?.weak ?? false;
|
|
53
53
|
const generator = initializeGenerator(options?.generateDigest);
|
|
54
54
|
return async function etag(c, next) {
|
|
@@ -69,7 +69,7 @@ const etag = (options) => {
|
|
|
69
69
|
statusText: "Not Modified",
|
|
70
70
|
headers: { ETag: etag }
|
|
71
71
|
});
|
|
72
|
-
for (const key of Array.from(c.res.headers.keys())) if (retainedHeaders.
|
|
72
|
+
for (const key of Array.from(c.res.headers.keys())) if (!retainedHeaders.has(key.toLowerCase())) c.res.headers.delete(key);
|
|
73
73
|
} else c.res.headers.set("ETag", etag);
|
|
74
74
|
};
|
|
75
75
|
};
|
|
@@ -226,4 +226,5 @@ export declare const defaultIsContentTypeBinary: (contentType: string) => boolea
|
|
|
226
226
|
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
|
|
227
227
|
*/
|
|
228
228
|
export declare const isContentEncodingBinary: (contentEncoding: string | null) => boolean;
|
|
229
|
-
//#endregion
|
|
229
|
+
//#endregion
|
|
230
|
+
export {};
|
|
@@ -41,4 +41,5 @@ export declare function handleMiddleware<E extends Env = {}, P extends string =
|
|
|
41
41
|
* @deprecated `hono/cloudflare-pages` will be removed in v5. Cloudflare recommends Workers with static assets; use `hono` on Workers instead.
|
|
42
42
|
*/
|
|
43
43
|
export declare const serveStatic: () => MiddlewareHandler;
|
|
44
|
-
//#endregion
|
|
44
|
+
//#endregion
|
|
45
|
+
export {};
|
|
@@ -3,4 +3,5 @@ import { ServeStaticOptions } from "./serve-static.js";
|
|
|
3
3
|
//#region src/adapter/cloudflare-workers/serve-static-module.d.ts
|
|
4
4
|
declare const module: <E extends Env = Env>(options: Omit<ServeStaticOptions<E>, "namespace">) => MiddlewareHandler;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { module as serveStatic };
|
|
6
|
+
export { module as serveStatic };
|
|
7
|
+
export {};
|
|
@@ -109,4 +109,5 @@ export declare const createBody: (method: string, requestBody: CloudFrontRequest
|
|
|
109
109
|
* @deprecated `hono/lambda-edge` will be removed in v5. Install `@hono/lambda-edge` and import from there instead.
|
|
110
110
|
*/
|
|
111
111
|
export declare const isContentTypeBinary: (contentType: string) => boolean;
|
|
112
|
-
//#endregion
|
|
112
|
+
//#endregion
|
|
113
|
+
export {};
|
|
@@ -14,4 +14,5 @@ export type HandleOptions = {
|
|
|
14
14
|
* @deprecated `hono/service-worker` will be removed in v5. Install `@hono/service-worker` and import from there instead.
|
|
15
15
|
*/
|
|
16
16
|
export declare const handle: <E extends Env, S extends Schema, BasePath extends string>(app: Hono<E, S, BasePath>, opts?: HandleOptions) => Handler;
|
|
17
|
-
//#endregion
|
|
17
|
+
//#endregion
|
|
18
|
+
export {};
|
|
@@ -22,4 +22,5 @@ import { HandleOptions, handle } from "./handler.js";
|
|
|
22
22
|
*/
|
|
23
23
|
declare const fire: <E extends Env, S extends Schema, BasePath extends string>(app: Hono<E, S, BasePath>, options?: HandleOptions) => void;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { fire, handle };
|
|
25
|
+
export { fire, handle };
|
|
26
|
+
export {};
|
|
@@ -200,4 +200,5 @@ type PickSchema<D, U extends StatusCode> = { [K in keyof D]: { [M in keyof D[K]]
|
|
|
200
200
|
* ```
|
|
201
201
|
*/
|
|
202
202
|
export type PickResponseByStatusCode<App, U extends StatusCode> = App extends Hono<infer E, infer _ extends Schema, infer B> ? PickSchema<ExtractSchema<App>, U> extends (infer S extends Schema) ? Hono$1<E, S, B> : never : never;
|
|
203
|
-
//#endregion
|
|
203
|
+
//#endregion
|
|
204
|
+
export {};
|
package/dist/types/context.d.ts
CHANGED
|
@@ -18,4 +18,5 @@ export declare const setCookie: (c: Context, name: string, value: string, opt?:
|
|
|
18
18
|
export declare const generateSignedCookie: (name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise<string>;
|
|
19
19
|
export declare const setSignedCookie: (c: Context, name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise<void>;
|
|
20
20
|
export declare const deleteCookie: (c: Context, name: string, opt?: CookieOptions) => string | undefined;
|
|
21
|
-
//#endregion
|
|
21
|
+
//#endregion
|
|
22
|
+
export {};
|
|
@@ -74,4 +74,5 @@ export declare const viewTransition: ViewTransitionType;
|
|
|
74
74
|
*/
|
|
75
75
|
export declare const Style: StyleType;
|
|
76
76
|
//#endregion
|
|
77
|
-
export { type ClassNameSlug, type OnInvalidSlug, rawCssString };
|
|
77
|
+
export { type ClassNameSlug, type OnInvalidSlug, rawCssString };
|
|
78
|
+
export {};
|
|
@@ -14,4 +14,5 @@ interface RouteData {
|
|
|
14
14
|
export declare const inspectRoutes: <E extends Env>(hono: Hono<E>) => RouteData[];
|
|
15
15
|
export declare const showRoutes: <E extends Env>(hono: Hono<E>, opts?: ShowRoutesOptions) => void;
|
|
16
16
|
export declare const getRouterName: <E extends Env>(app: Hono<E>) => string;
|
|
17
|
-
//#endregion
|
|
17
|
+
//#endregion
|
|
18
|
+
export {};
|
|
@@ -31,4 +31,5 @@ export declare const createFactory: <E extends Env = Env, P extends string = str
|
|
|
31
31
|
defaultAppOptions?: HonoOptions<E>;
|
|
32
32
|
}) => Factory<E, P>;
|
|
33
33
|
export declare const createMiddleware: <E extends Env = any, P extends string = string, I extends Input = {}, R extends HandlerResponse<any> | void = void>(middleware: MiddlewareHandler<E, P, I, R extends void ? Response : R>) => MiddlewareHandler<E, P, I, R extends void ? Response : R>;
|
|
34
|
-
//#endregion
|
|
34
|
+
//#endregion
|
|
35
|
+
export {};
|
|
@@ -14,4 +14,5 @@ interface FilterStaticGenerateRouteData {
|
|
|
14
14
|
export declare const filterStaticGenerateRoutes: <E extends Env>(hono: Hono<E>) => FilterStaticGenerateRouteData[];
|
|
15
15
|
export declare const isDynamicRoute: (path: string) => boolean;
|
|
16
16
|
export declare const ensureWithinOutDir: (outDir: string, filePath: string) => void;
|
|
17
|
-
//#endregion
|
|
17
|
+
//#endregion
|
|
18
|
+
export {};
|
|
@@ -6,4 +6,5 @@ import { Client, ClientRequestOptions } from "../../client/types.js";
|
|
|
6
6
|
//#region src/helper/testing/index.d.ts
|
|
7
7
|
type ExtractEnv<T> = T extends Hono<infer E, Schema, string> ? E : never;
|
|
8
8
|
export declare const testClient: <T extends Hono<any, Schema, string>>(app: T, Env?: ExtractEnv<T>["Bindings"] | {}, executionCtx?: ExecutionContext, options?: Omit<ClientRequestOptions, "fetch">) => UnionToIntersection<Client<T, "http://localhost">>;
|
|
9
|
-
//#endregion
|
|
9
|
+
//#endregion
|
|
10
|
+
export {};
|
package/dist/types/jsx/base.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HtmlEscaped, HtmlEscapedString, StringBufferWithCallbacks } from "../utils/html.js";
|
|
2
2
|
import { DOM_MEMO } from "./constants.js";
|
|
3
|
-
import {
|
|
3
|
+
import { JSX as JSX$1 } from "./intrinsic-elements.js";
|
|
4
4
|
import { Context } from "./context.js";
|
|
5
5
|
//#region src/jsx/base.d.ts
|
|
6
6
|
export type Props = Record<string, any>;
|
|
@@ -17,7 +17,7 @@ export declare namespace JSX {
|
|
|
17
17
|
interface ElementChildrenAttribute {
|
|
18
18
|
children: Child;
|
|
19
19
|
}
|
|
20
|
-
interface IntrinsicElements extends IntrinsicElements {
|
|
20
|
+
interface IntrinsicElements extends JSX$1.IntrinsicElements {
|
|
21
21
|
[tagName: string]: Props;
|
|
22
22
|
}
|
|
23
23
|
interface IntrinsicAttributes {
|
|
@@ -59,4 +59,5 @@ export declare const Fragment: ({ children }: {
|
|
|
59
59
|
export declare const isValidElement: (element: unknown) => element is JSXNode;
|
|
60
60
|
export declare const cloneElement: <T extends JSXNode | JSX.Element>(element: T, props: Partial<Props>, ...children: Child[]) => T;
|
|
61
61
|
export declare const reactAPICompatVersion = "19.0.0-hono-jsx";
|
|
62
|
-
//#endregion
|
|
62
|
+
//#endregion
|
|
63
|
+
export {};
|
|
@@ -34,4 +34,5 @@ export declare const useOptimistic: <T, N>(state: T, updateState: (currentState:
|
|
|
34
34
|
* @returns [T, (data: FormData) => void]
|
|
35
35
|
*/
|
|
36
36
|
export declare const useActionState: <T>(fn: Function, initialState: T, permalink?: string) => [T, Function];
|
|
37
|
-
//#endregion
|
|
37
|
+
//#endregion
|
|
38
|
+
export {};
|
|
@@ -80,4 +80,5 @@ declare const _default: {
|
|
|
80
80
|
createPortal: (children: Child, container: HTMLElement, key?: string) => Child;
|
|
81
81
|
};
|
|
82
82
|
//#endregion
|
|
83
|
-
export { type AnimationEvent, type CSSProperties, type Child, Children, type ClipboardEvent, type ComponentClass, type Context, type DOMAttributes, type DragEvent, ErrorBoundary, type Event, type FC, type FocusEvent, Fragment, Fragment as StrictMode, type InputEvent, type JSXNode, type KeyboardEvent, type MouseEvent, type PointerEvent, type PropsWithChildren, type ReactElement, type ReactNode, type RefObject, Suspense, type TouchEvent, type TransitionEvent, type WheelEvent, cloneElement, createContext, createElement, createElement as jsx, createPortal, createRef, _default as default, flushSync, forwardRef, isValidElement, memo, render, startTransition, startViewTransition, use, useActionState, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, useFormStatus, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useOptimistic, useReducer, useRef, useState, useSyncExternalStore, useTransition, useViewTransition, reactAPICompatVersion as version };
|
|
83
|
+
export { type AnimationEvent, type CSSProperties, type Child, Children, type ClipboardEvent, type ComponentClass, type Context, type DOMAttributes, type DragEvent, ErrorBoundary, type Event, type FC, type FocusEvent, Fragment, Fragment as StrictMode, type InputEvent, type JSXNode, type KeyboardEvent, type MouseEvent, type PointerEvent, type PropsWithChildren, type ReactElement, type ReactNode, type RefObject, Suspense, type TouchEvent, type TransitionEvent, type WheelEvent, cloneElement, createContext, createElement, createElement as jsx, createPortal, createRef, _default as default, flushSync, forwardRef, isValidElement, memo, render, startTransition, startViewTransition, use, useActionState, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, useFormStatus, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useOptimistic, useReducer, useRef, useState, useSyncExternalStore, useTransition, useViewTransition, reactAPICompatVersion as version };
|
|
84
|
+
export {};
|
|
@@ -51,4 +51,5 @@ export declare const renderNode: (node: NodeObject, container: Container) => voi
|
|
|
51
51
|
export declare const render: (jsxNode: Child, container: Container) => void;
|
|
52
52
|
export declare const flushSync: (callback: () => void) => void;
|
|
53
53
|
export declare const createPortal: (children: Child, container: HTMLElement, key?: string) => Child;
|
|
54
|
-
//#endregion
|
|
54
|
+
//#endregion
|
|
55
|
+
export {};
|
|
@@ -104,4 +104,5 @@ declare const _default: {
|
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
106
|
//#endregion
|
|
107
|
-
export { _default as default, renderToReadableStream, renderToString, _default$1 as version };
|
|
107
|
+
export { _default as default, renderToReadableStream, renderToString, _default$1 as version };
|
|
108
|
+
export {};
|
|
@@ -43,4 +43,5 @@ export declare const forwardRef: <T, P = {}>(Component: (props: P, ref?: RefObje
|
|
|
43
43
|
}) => JSX.Element);
|
|
44
44
|
export declare const useImperativeHandle: <T>(ref: RefObject<T | null>, createHandle: () => T, deps: readonly unknown[]) => void;
|
|
45
45
|
export declare const useSyncExternalStore: <T>(subscribe: (callback: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T) => T;
|
|
46
|
-
//#endregion
|
|
46
|
+
//#endregion
|
|
47
|
+
export {};
|
|
@@ -69,4 +69,5 @@ declare const _default: {
|
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
71
|
//#endregion
|
|
72
|
-
export { type AnimationEvent, type CSSProperties, type Child, Children, type ClipboardEvent, type ComponentClass, type Context, type DOMAttributes, type DragEvent, ErrorBoundary, type Event, type FC, type FocusEvent, Fragment, Fragment as StrictMode, type InputEvent, type JSX, type JSXNode, type KeyboardEvent, type MouseEvent, type PointerEvent, type PropsWithChildren, type ReactElement, type ReactNode, type RefObject, Suspense, type TouchEvent, type TransitionEvent, type WheelEvent, cloneElement, createContext, jsx as createElement, jsx, createRef, _default as default, forwardRef, isValidElement, memo, startTransition, startViewTransition, use, useActionState, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useOptimistic, useReducer, useRef, useState, useSyncExternalStore, useTransition, useViewTransition, reactAPICompatVersion as version };
|
|
72
|
+
export { type AnimationEvent, type CSSProperties, type Child, Children, type ClipboardEvent, type ComponentClass, type Context, type DOMAttributes, type DragEvent, ErrorBoundary, type Event, type FC, type FocusEvent, Fragment, Fragment as StrictMode, type InputEvent, type JSX, type JSXNode, type KeyboardEvent, type MouseEvent, type PointerEvent, type PropsWithChildren, type ReactElement, type ReactNode, type RefObject, Suspense, type TouchEvent, type TransitionEvent, type WheelEvent, cloneElement, createContext, jsx as createElement, jsx, createRef, _default as default, forwardRef, isValidElement, memo, startTransition, startViewTransition, use, useActionState, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useOptimistic, useReducer, useRef, useState, useSyncExternalStore, useTransition, useViewTransition, reactAPICompatVersion as version };
|
|
73
|
+
export {};
|
|
@@ -30,4 +30,5 @@ export type AnimationEvent = globalThis.AnimationEvent;
|
|
|
30
30
|
export type TransitionEvent = globalThis.TransitionEvent;
|
|
31
31
|
export type DragEvent = globalThis.DragEvent;
|
|
32
32
|
//#endregion
|
|
33
|
-
export type { Child, ComponentClass, Context, FC, JSXNode, ReactElement, ReactNode, RefObject };
|
|
33
|
+
export type { Child, ComponentClass, Context, FC, JSXNode, ReactElement, ReactNode, RefObject };
|
|
34
|
+
export {};
|
|
@@ -81,4 +81,5 @@ export declare const every: (...middleware: (MiddlewareHandler | Condition)[]) =
|
|
|
81
81
|
* ```
|
|
82
82
|
*/
|
|
83
83
|
export declare const except: (condition: string | Condition | (string | Condition)[], ...middleware: MiddlewareHandler[]) => MiddlewareHandler;
|
|
84
|
-
//#endregion
|
|
84
|
+
//#endregion
|
|
85
|
+
export {};
|
|
@@ -73,4 +73,5 @@ export declare const jsxRenderer: <E extends Env = Env>(component?: ComponentWit
|
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
75
|
export declare const useRequestContext: <E extends Env = any, P extends string = any, I extends Input = {}>() => Context<E, P, I>;
|
|
76
|
-
//#endregion
|
|
76
|
+
//#endregion
|
|
77
|
+
export {};
|
|
@@ -5,4 +5,5 @@ declare module '../..' {
|
|
|
5
5
|
interface ContextVariableMap extends JwtVariables<unknown> {}
|
|
6
6
|
}
|
|
7
7
|
//#endregion
|
|
8
|
-
export { AlgorithmTypes, type JwtVariables, decode, jwt, sign, verify, verifyWithJwks };
|
|
8
|
+
export { AlgorithmTypes, type JwtVariables, decode, jwt, sign, verify, verifyWithJwks };
|
|
9
|
+
export {};
|
|
@@ -4,4 +4,5 @@ declare module '../..' {
|
|
|
4
4
|
interface ContextVariableMap extends LanguageVariables {}
|
|
5
5
|
}
|
|
6
6
|
//#endregion
|
|
7
|
-
export { type CacheType, type DetectorOptions, type DetectorType, type LanguageVariables, detectFromCookie, detectFromHeader, detectFromPath, detectFromQuery, languageDetector };
|
|
7
|
+
export { type CacheType, type DetectorOptions, type DetectorType, type LanguageVariables, detectFromCookie, detectFromHeader, detectFromPath, detectFromQuery, languageDetector };
|
|
8
|
+
export {};
|
|
@@ -4,4 +4,5 @@ declare module '../..' {
|
|
|
4
4
|
interface ContextVariableMap extends SecureHeadersVariables {}
|
|
5
5
|
}
|
|
6
6
|
//#endregion
|
|
7
|
-
export { type ContentSecurityPolicyOptionHandler, NONCE, type SecureHeadersVariables, secureHeaders };
|
|
7
|
+
export { type ContentSecurityPolicyOptionHandler, NONCE, type SecureHeadersVariables, secureHeaders };
|
|
8
|
+
export {};
|
|
@@ -12,4 +12,5 @@ type ProposedFeatures = 'autofill' | 'clipboardRead' | 'clipboardWrite' | 'defer
|
|
|
12
12
|
* These features generally have an explainer only, but may be available for experimentation by web developers.
|
|
13
13
|
*/
|
|
14
14
|
type ExperimentalFeatures = 'allScreensCapture' | 'browsingTopics' | 'capturedSurfaceControl' | 'conversionMeasurement' | 'digitalCredentialsCreate' | 'digitalCredentialsGet' | 'focusWithoutUserActivation' | 'joinAdInterestGroup' | 'localFonts' | 'monetization' | 'runAdAuction' | 'smartCard' | 'syncScript' | 'trustTokenRedemption' | 'unload' | 'verticalScroll';
|
|
15
|
-
//#endregion
|
|
15
|
+
//#endregion
|
|
16
|
+
export {};
|
|
@@ -4,4 +4,5 @@ declare module '../..' {
|
|
|
4
4
|
interface ContextVariableMap extends TimingVariables {}
|
|
5
5
|
}
|
|
6
6
|
//#endregion
|
|
7
|
-
export { type TimingVariables, endTime, setMetric, startTime, timing, wrapTime };
|
|
7
|
+
export { type TimingVariables, endTime, setMetric, startTime, timing, wrapTime };
|
|
8
|
+
export {};
|
|
@@ -122,4 +122,5 @@ export declare const endTime: (c: Context, name: string, precision?: number) =>
|
|
|
122
122
|
* ```
|
|
123
123
|
* */
|
|
124
124
|
export declare function wrapTime<T>(c: Context, name: string, callable: Promise<T>, description?: string, precision?: number): Promise<T>;
|
|
125
|
-
//#endregion
|
|
125
|
+
//#endregion
|
|
126
|
+
export {};
|
package/dist/types/request.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ export declare const buildInitParams: (params: {
|
|
|
14
14
|
paths: string[];
|
|
15
15
|
}) => ConstructorParameters<typeof PreparedRegExpRouter>;
|
|
16
16
|
export declare const serializeInitParams: (params: ConstructorParameters<typeof PreparedRegExpRouter>) => string;
|
|
17
|
-
//#endregion
|
|
17
|
+
//#endregion
|
|
18
|
+
export {};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -15,4 +15,5 @@ type TimingSafeEqual = {
|
|
|
15
15
|
export declare const timingSafeEqual: TimingSafeEqual;
|
|
16
16
|
export declare const bufferToString: (buffer: ArrayBuffer) => string;
|
|
17
17
|
export declare const bufferToFormData: (arrayBuffer: ArrayBuffer, contentType: string) => Promise<FormData>;
|
|
18
|
-
//#endregion
|
|
18
|
+
//#endregion
|
|
19
|
+
export {};
|
|
@@ -38,4 +38,5 @@ export declare const parse: (cookie: string, name?: string) => Cookie;
|
|
|
38
38
|
export declare const parseSigned: (cookie: string, secret: string | BufferSource, name?: string) => Promise<SignedCookie>;
|
|
39
39
|
export declare const serialize: <Name extends string>(name: Name, value: string, opt?: CookieConstraint<Name>) => string;
|
|
40
40
|
export declare const serializeSigned: (name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise<string>;
|
|
41
|
-
//#endregion
|
|
41
|
+
//#endregion
|
|
42
|
+
export {};
|
|
@@ -9,4 +9,5 @@ export declare const sha256: (data: Data) => Promise<string | null>;
|
|
|
9
9
|
export declare const sha1: (data: Data) => Promise<string | null>;
|
|
10
10
|
export declare const md5: (data: Data) => Promise<string | null>;
|
|
11
11
|
export declare const createHash: (data: Data, algorithm: Algorithm) => Promise<string | null>;
|
|
12
|
-
//#endregion
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
@@ -10,4 +10,5 @@ type FilePathOptions = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare const getFilePath: (options: FilePathOptions) => string | undefined;
|
|
12
12
|
export declare const getFilePathWithoutDefaultDocument: (options: Omit<FilePathOptions, "defaultDocument">) => string | undefined;
|
|
13
|
-
//#endregion
|
|
13
|
+
//#endregion
|
|
14
|
+
export {};
|
|
@@ -42,4 +42,5 @@ export declare const stringBufferToString: (buffer: StringBuffer, callbacks: Htm
|
|
|
42
42
|
export declare const escapeToBuffer: (str: string, buffer: StringBuffer) => void;
|
|
43
43
|
export declare const resolveCallbackSync: (str: string | HtmlEscapedString) => string;
|
|
44
44
|
export declare const resolveCallback: (str: string | HtmlEscapedString | Promise<string>, phase: (typeof HtmlEscapedCallbackPhase)[keyof typeof HtmlEscapedCallbackPhase], preserveCallbacks: boolean, context: object, buffer?: [string]) => Promise<string>;
|
|
45
|
-
//#endregion
|
|
45
|
+
//#endregion
|
|
46
|
+
export {};
|
|
@@ -58,4 +58,5 @@ export type IsAny<T> = boolean extends (T extends never ? true : false) ? true :
|
|
|
58
58
|
* @see https://github.com/Microsoft/TypeScript/issues/29729
|
|
59
59
|
*/
|
|
60
60
|
export type StringLiteralUnion<T> = T | (string & Record<never, never>);
|
|
61
|
-
//#endregion
|
|
61
|
+
//#endregion
|
|
62
|
+
export {};
|
|
@@ -42,4 +42,5 @@ export declare const tryDecodeURIComponent: (str: string) => string;
|
|
|
42
42
|
export declare const getQueryParam: (url: string, key?: string) => string | undefined | Record<string, string>;
|
|
43
43
|
export declare const getQueryParams: (url: string, key?: string) => string[] | undefined | Record<string, string[]>;
|
|
44
44
|
export declare const decodeURIComponent_: typeof decodeURIComponent;
|
|
45
|
-
//#endregion
|
|
45
|
+
//#endregion
|
|
46
|
+
export {};
|
|
@@ -23,4 +23,5 @@ type InferInputInner<Output, Target extends keyof ValidationTargets, T extends F
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
export type InferInput<Output, Target extends keyof ValidationTargets, T extends FormValue = ParsedFormValue> = [Exclude<Output, undefined>] extends [never] ? {} : [Exclude<Output, undefined>] extends [object] ? undefined extends Output ? SimplifyDeep<InferInputInner<Exclude<Output, undefined>, Target, T>> | undefined : SimplifyDeep<InferInputInner<Output, Target, T>> : {};
|
|
26
|
-
//#endregion
|
|
26
|
+
//#endregion
|
|
27
|
+
export {};
|
|
@@ -14,4 +14,5 @@ export declare const validator: <InputType, P extends string, M extends string,
|
|
|
14
14
|
out: { [K in U]: ExtractValidatorOutput<VF>; };
|
|
15
15
|
}, E extends Env = any>(target: U, validationFunc: VF) => MiddlewareHandler<E, P, V, ExtractValidationResponse<VF>>;
|
|
16
16
|
export type ExtractValidatorOutput<VF> = VF extends ((value: any, c: any) => infer R) ? R extends Promise<infer PR> ? PR extends Response | TypedResponse<any, any, any> ? never : PR : R extends Response | TypedResponse<any, any, any> ? never : R : never;
|
|
17
|
-
//#endregion
|
|
17
|
+
//#endregion
|
|
18
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hono",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.12",
|
|
4
4
|
"description": "Web framework built on Web Standards",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -693,7 +693,7 @@
|
|
|
693
693
|
"rolldown": "^1.2.10",
|
|
694
694
|
"typescript": "^6.0.3",
|
|
695
695
|
"vite-plugin-fastly-js-compute": "^0.4.2",
|
|
696
|
-
"vite-plus": "1.0.0
|
|
696
|
+
"vite-plus": "1.0.0",
|
|
697
697
|
"vitest": "5.0.1",
|
|
698
698
|
"wrangler": "4.107.0",
|
|
699
699
|
"ws": "^8.21.0",
|