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.
Files changed (79) hide show
  1. package/dist/cjs/jsx/utils.js +1 -1
  2. package/dist/cjs/middleware/combine/index.js +3 -1
  3. package/dist/cjs/middleware/etag/index.js +2 -2
  4. package/dist/jsx/utils.js +1 -1
  5. package/dist/middleware/combine/index.js +3 -1
  6. package/dist/middleware/etag/index.js +2 -2
  7. package/dist/middleware/language/language.js +1 -1
  8. package/dist/types/adapter/aws-lambda/handler.d.ts +2 -1
  9. package/dist/types/adapter/aws-lambda/types.d.ts +2 -1
  10. package/dist/types/adapter/bun/websocket.d.ts +2 -1
  11. package/dist/types/adapter/cloudflare-pages/handler.d.ts +2 -1
  12. package/dist/types/adapter/cloudflare-workers/serve-static-module.d.ts +2 -1
  13. package/dist/types/adapter/lambda-edge/handler.d.ts +2 -1
  14. package/dist/types/adapter/service-worker/handler.d.ts +2 -1
  15. package/dist/types/adapter/service-worker/index.d.ts +2 -1
  16. package/dist/types/adapter/service-worker/types.d.ts +2 -1
  17. package/dist/types/client/types.d.ts +2 -1
  18. package/dist/types/context.d.ts +2 -1
  19. package/dist/types/helper/cookie/index.d.ts +2 -1
  20. package/dist/types/helper/css/common.d.ts +2 -1
  21. package/dist/types/helper/css/index.d.ts +2 -1
  22. package/dist/types/helper/dev/index.d.ts +2 -1
  23. package/dist/types/helper/factory/index.d.ts +2 -1
  24. package/dist/types/helper/proxy/index.d.ts +2 -1
  25. package/dist/types/helper/ssg/middleware.d.ts +2 -1
  26. package/dist/types/helper/ssg/utils.d.ts +2 -1
  27. package/dist/types/helper/testing/index.d.ts +2 -1
  28. package/dist/types/hono-base.d.ts +2 -1
  29. package/dist/types/http-exception.d.ts +2 -1
  30. package/dist/types/jsx/base.d.ts +4 -3
  31. package/dist/types/jsx/context.d.ts +2 -1
  32. package/dist/types/jsx/dom/client.d.ts +2 -1
  33. package/dist/types/jsx/dom/css.d.ts +2 -1
  34. package/dist/types/jsx/dom/hooks/index.d.ts +2 -1
  35. package/dist/types/jsx/dom/index.d.ts +2 -1
  36. package/dist/types/jsx/dom/render.d.ts +2 -1
  37. package/dist/types/jsx/dom/server.d.ts +2 -1
  38. package/dist/types/jsx/hooks/index.d.ts +2 -1
  39. package/dist/types/jsx/index.d.ts +2 -1
  40. package/dist/types/jsx/types.d.ts +2 -1
  41. package/dist/types/middleware/basic-auth/index.d.ts +2 -1
  42. package/dist/types/middleware/bearer-auth/index.d.ts +2 -1
  43. package/dist/types/middleware/body-limit/index.d.ts +2 -1
  44. package/dist/types/middleware/combine/index.d.ts +2 -1
  45. package/dist/types/middleware/compress/index.d.ts +2 -1
  46. package/dist/types/middleware/cors/index.d.ts +2 -1
  47. package/dist/types/middleware/csrf/index.d.ts +2 -1
  48. package/dist/types/middleware/etag/index.d.ts +2 -1
  49. package/dist/types/middleware/ip-restriction/index.d.ts +2 -1
  50. package/dist/types/middleware/jsx-renderer/index.d.ts +2 -1
  51. package/dist/types/middleware/jwt/index.d.ts +2 -1
  52. package/dist/types/middleware/language/index.d.ts +2 -1
  53. package/dist/types/middleware/logger/index.d.ts +2 -1
  54. package/dist/types/middleware/method-not-allowed/index.d.ts +2 -1
  55. package/dist/types/middleware/method-override/index.d.ts +2 -1
  56. package/dist/types/middleware/powered-by/index.d.ts +2 -1
  57. package/dist/types/middleware/pretty-json/index.d.ts +2 -1
  58. package/dist/types/middleware/request-id/index.d.ts +2 -1
  59. package/dist/types/middleware/secure-headers/index.d.ts +2 -1
  60. package/dist/types/middleware/secure-headers/permissions-policy.d.ts +2 -1
  61. package/dist/types/middleware/secure-headers/secure-headers.d.ts +2 -1
  62. package/dist/types/middleware/timing/index.d.ts +2 -1
  63. package/dist/types/middleware/timing/timing.d.ts +2 -1
  64. package/dist/types/middleware/trailing-slash/index.d.ts +2 -1
  65. package/dist/types/request.d.ts +2 -1
  66. package/dist/types/router/reg-exp-router/prepared-router.d.ts +2 -1
  67. package/dist/types/types.d.ts +2 -1
  68. package/dist/types/utils/body.d.ts +2 -1
  69. package/dist/types/utils/buffer.d.ts +2 -1
  70. package/dist/types/utils/cookie.d.ts +2 -1
  71. package/dist/types/utils/crypto.d.ts +2 -1
  72. package/dist/types/utils/filepath.d.ts +2 -1
  73. package/dist/types/utils/html.d.ts +2 -1
  74. package/dist/types/utils/mime.d.ts +2 -1
  75. package/dist/types/utils/types.d.ts +2 -1
  76. package/dist/types/utils/url.d.ts +2 -1
  77. package/dist/types/validator/utils.d.ts +2 -1
  78. package/dist/types/validator/validator.d.ts +2 -1
  79. package/package.json +2 -2
@@ -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.indexOf(key.toLowerCase()) === -1) c.res.headers.delete(key);
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.indexOf(key.toLowerCase()) === -1) c.res.headers.delete(key);
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
  };
@@ -1,5 +1,5 @@
1
- import { parseAccept } from "../../utils/accept.js";
2
1
  import { getCookie, setCookie } from "../../helper/cookie/index.js";
2
+ import { parseAccept } from "../../utils/accept.js";
3
3
  //#region src/middleware/language/language.ts
4
4
  const DEFAULT_OPTIONS = {
5
5
  order: [
@@ -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 {};
@@ -179,4 +179,5 @@ export interface LatticeRequestContextV2 {
179
179
  x509SubjectCn?: string;
180
180
  };
181
181
  }
182
- //#endregion
182
+ //#endregion
183
+ export {};
@@ -50,4 +50,5 @@ export declare const websocket: BunWebSocketHandler<BunWebSocketData>;
50
50
  * @returns A function to create a Bun WebSocket handler.
51
51
  */
52
52
  export declare const createBunWebSocket: <T>() => CreateWebSocket<T>;
53
- //#endregion
53
+ //#endregion
54
+ 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 {};
@@ -13,4 +13,5 @@ export interface FetchEvent extends ExtendableEvent {
13
13
  readonly resultingClientId: string;
14
14
  respondWith(r: Response | PromiseLike<Response>): void;
15
15
  }
16
- //#endregion
16
+ //#endregion
17
+ 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 {};
@@ -455,4 +455,5 @@ export declare class Context<E extends Env = any, P extends string = any, I exte
455
455
  */
456
456
  notFound: () => ReturnType<NotFoundHandler>;
457
457
  }
458
- //#endregion
458
+ //#endregion
459
+ export {};
@@ -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 {};
@@ -57,4 +57,5 @@ type ViewTransitionType = {
57
57
  (): CssClassName;
58
58
  };
59
59
  export declare const viewTransitionCommon: ViewTransitionType;
60
- //#endregion
60
+ //#endregion
61
+ 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 {};
@@ -66,4 +66,5 @@ interface ProxyFetch {
66
66
  * ```
67
67
  */
68
68
  export declare const proxy: ProxyFetch;
69
- //#endregion
69
+ //#endregion
70
+ export {};
@@ -42,4 +42,5 @@ export declare const disableSSG: () => MiddlewareHandler;
42
42
  * The API might be changed.
43
43
  */
44
44
  export declare const onlySSG: () => MiddlewareHandler;
45
- //#endregion
45
+ //#endregion
46
+ 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 {};
@@ -215,4 +215,5 @@ declare class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends
215
215
  fire: () => void;
216
216
  }
217
217
  //#endregion
218
- export { Hono as HonoBase };
218
+ export { Hono as HonoBase };
219
+ export {};
@@ -53,4 +53,5 @@ export declare class HTTPException extends Error {
53
53
  */
54
54
  getResponse(): Response;
55
55
  }
56
- //#endregion
56
+ //#endregion
57
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { HtmlEscaped, HtmlEscapedString, StringBufferWithCallbacks } from "../utils/html.js";
2
2
  import { DOM_MEMO } from "./constants.js";
3
- import { IntrinsicElements, JSX as JSX$1 } from "./intrinsic-elements.js";
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 {};
@@ -50,4 +50,5 @@ export declare const createContext: <T>(defaultValue: T) => Context<T>;
50
50
  * for the per-runtime isolation guarantees.
51
51
  */
52
52
  export declare const useContext: <T>(context: Context<T>) => T;
53
- //#endregion
53
+ //#endregion
54
+ export {};
@@ -26,4 +26,5 @@ declare const _default: {
26
26
  hydrateRoot: (element: HTMLElement | DocumentFragment, reactNode: Child, options?: RootOptions) => Root;
27
27
  };
28
28
  //#endregion
29
- export { _default as default };
29
+ export { _default as default };
30
+ export {};
@@ -76,4 +76,5 @@ export declare const viewTransition: ViewTransitionType;
76
76
  */
77
77
  export declare const Style: FC<PropsWithChildren<void>>;
78
78
  //#endregion
79
- export { rawCssString };
79
+ export { rawCssString };
80
+ 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 {};
@@ -69,4 +69,5 @@ export declare const basicAuth: (options: BasicAuthOptions, ...users: {
69
69
  username: string;
70
70
  password: string;
71
71
  }[]) => MiddlewareHandler;
72
- //#endregion
72
+ //#endregion
73
+ export {};
@@ -86,4 +86,5 @@ type BearerAuthOptions<E extends Env = Env> = {
86
86
  * ```
87
87
  */
88
88
  export declare const bearerAuth: <E extends Env = Env>(options: BearerAuthOptions<E>) => MiddlewareHandler<E>;
89
- //#endregion
89
+ //#endregion
90
+ export {};
@@ -39,4 +39,5 @@ type BodyLimitOptions = {
39
39
  * ```
40
40
  */
41
41
  export declare const bodyLimit: (options: BodyLimitOptions) => MiddlewareHandler;
42
- //#endregion
42
+ //#endregion
43
+ 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 {};
@@ -35,4 +35,5 @@ interface CompressionOptions {
35
35
  */
36
36
  export declare const compress: (options?: CompressionOptions) => MiddlewareHandler;
37
37
  //#endregion
38
- export { COMPRESSIBLE_CONTENT_TYPE_REGEX };
38
+ export { COMPRESSIBLE_CONTENT_TYPE_REGEX };
39
+ export {};
@@ -49,4 +49,5 @@ type CORSOptions = {
49
49
  * ```
50
50
  */
51
51
  export declare const cors: (options?: CORSOptions) => MiddlewareHandler;
52
- //#endregion
52
+ //#endregion
53
+ export {};
@@ -72,4 +72,5 @@ interface CSRFOptions {
72
72
  * ```
73
73
  */
74
74
  export declare const csrf: (options?: CSRFOptions) => MiddlewareHandler;
75
- //#endregion
75
+ //#endregion
76
+ export {};
@@ -36,4 +36,5 @@ export declare const RETAINED_304_HEADERS: string[];
36
36
  * ```
37
37
  */
38
38
  export declare const etag: (options?: ETagOptions) => MiddlewareHandler;
39
- //#endregion
39
+ //#endregion
40
+ export {};
@@ -62,4 +62,5 @@ export declare const ipRestriction: (getIP: GetIPAddr, { denyList, allowList }:
62
62
  addr: string;
63
63
  type: AddressType;
64
64
  }, c: Context) => Response | Promise<Response>) => MiddlewareHandler;
65
- //#endregion
65
+ //#endregion
66
+ 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 {};
@@ -18,4 +18,5 @@ type PrintFunc = (str: string, ...rest: string[]) => void;
18
18
  * ```
19
19
  */
20
20
  export declare const logger: (fn?: PrintFunc) => MiddlewareHandler;
21
- //#endregion
21
+ //#endregion
22
+ export {};
@@ -43,4 +43,5 @@ type MethodNotAllowedOptions<E extends Env> = {
43
43
  * ```
44
44
  */
45
45
  export declare const methodNotAllowed: <E extends Env = Env>(options: MethodNotAllowedOptions<E>) => MiddlewareHandler<E>;
46
- //#endregion
46
+ //#endregion
47
+ export {};
@@ -42,4 +42,5 @@ type MethodOverrideOptions = {
42
42
  * ```
43
43
  */
44
44
  export declare const methodOverride: (options: MethodOverrideOptions) => MiddlewareHandler;
45
- //#endregion
45
+ //#endregion
46
+ export {};
@@ -23,4 +23,5 @@ type PoweredByOptions = {
23
23
  * ```
24
24
  */
25
25
  export declare const poweredBy: (options?: PoweredByOptions) => MiddlewareHandler;
26
- //#endregion
26
+ //#endregion
27
+ export {};
@@ -36,4 +36,5 @@ interface PrettyOptions {
36
36
  * ```
37
37
  */
38
38
  export declare const prettyJSON: (options?: PrettyOptions) => MiddlewareHandler;
39
- //#endregion
39
+ //#endregion
40
+ export {};
@@ -4,4 +4,5 @@ declare module '../..' {
4
4
  interface ContextVariableMap extends RequestIdVariables {}
5
5
  }
6
6
  //#endregion
7
- export { type RequestIdVariables, requestId };
7
+ export { type RequestIdVariables, requestId };
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 {};
@@ -103,4 +103,5 @@ export declare const NONCE: ContentSecurityPolicyOptionHandler;
103
103
  * ```
104
104
  */
105
105
  export declare const secureHeaders: (customOptions?: SecureHeadersOptions) => MiddlewareHandler;
106
- //#endregion
106
+ //#endregion
107
+ 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 {};
@@ -88,4 +88,5 @@ type AppendTrailingSlashOptions = {
88
88
  * ```
89
89
  */
90
90
  export declare const appendTrailingSlash: (options?: AppendTrailingSlashOptions) => MiddlewareHandler;
91
- //#endregion
91
+ //#endregion
92
+ export {};
@@ -322,4 +322,5 @@ export declare class HonoRequest<P extends string = '/', I extends Input['out']
322
322
  * ```
323
323
  */
324
324
  export declare const cloneRawRequest: (req: HonoRequest) => Promise<Request>;
325
- //#endregion
325
+ //#endregion
326
+ export {};
@@ -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 {};
@@ -210,4 +210,5 @@ export declare abstract class FetchEventLike {
210
210
  abstract passThroughOnException(): void;
211
211
  abstract waitUntil(promise: Promise<void>): void;
212
212
  }
213
- //#endregion
213
+ //#endregion
214
+ export {};
@@ -71,4 +71,5 @@ interface ParseBody {
71
71
  <T extends BodyData>(request: HonoRequest | Request, options?: Partial<ParseBodyOptions>): Promise<T>;
72
72
  }
73
73
  export declare const parseBody: ParseBody;
74
- //#endregion
74
+ //#endregion
75
+ export {};
@@ -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 {};
@@ -69,4 +69,5 @@ declare const _baseMimes: {
69
69
  };
70
70
  declare const baseMimes: Record<string, BaseMime>;
71
71
  //#endregion
72
- export { baseMimes as mimes };
72
+ export { baseMimes as mimes };
73
+ 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.11",
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-rc.1",
696
+ "vite-plus": "1.0.0",
697
697
  "vitest": "5.0.1",
698
698
  "wrangler": "4.107.0",
699
699
  "ws": "^8.21.0",