hono 3.11.6 → 3.11.7

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 (45) hide show
  1. package/dist/cjs/router/trie-router/node.js +5 -7
  2. package/dist/router/trie-router/node.js +5 -7
  3. package/dist/types/adapter/aws-lambda/custom-context.d.ts +1 -1
  4. package/dist/types/adapter/aws-lambda/handler.d.ts +2 -2
  5. package/dist/types/adapter/aws-lambda/types.d.ts +2 -2
  6. package/dist/types/adapter/bun/serve-static.d.ts +1 -1
  7. package/dist/types/adapter/cloudflare-pages/handler.d.ts +2 -2
  8. package/dist/types/adapter/cloudflare-workers/serve-static.d.ts +1 -1
  9. package/dist/types/adapter/cloudflare-workers/server-static-module.d.ts +1 -1
  10. package/dist/types/adapter/deno/serve-static.d.ts +1 -1
  11. package/dist/types/adapter/lambda-edge/handler.d.ts +1 -1
  12. package/dist/types/adapter/netlify/handler.d.ts +1 -1
  13. package/dist/types/client/types.d.ts +12 -12
  14. package/dist/types/context.d.ts +4 -4
  15. package/dist/types/helper/adapter/index.d.ts +1 -1
  16. package/dist/types/helper/testing/index.d.ts +1 -1
  17. package/dist/types/hono-base.d.ts +2 -2
  18. package/dist/types/http-exception.d.ts +1 -1
  19. package/dist/types/jsx/components.d.ts +2 -2
  20. package/dist/types/jsx/index.d.ts +3 -3
  21. package/dist/types/middleware/cors/index.d.ts +1 -1
  22. package/dist/types/middleware/etag/index.d.ts +1 -1
  23. package/dist/types/middleware/jsx-renderer/index.d.ts +2 -2
  24. package/dist/types/middleware/logger/index.d.ts +1 -1
  25. package/dist/types/middleware/pretty-json/index.d.ts +1 -1
  26. package/dist/types/middleware/secure-headers/index.d.ts +1 -1
  27. package/dist/types/request.d.ts +2 -2
  28. package/dist/types/router/reg-exp-router/node.d.ts +1 -1
  29. package/dist/types/router/reg-exp-router/router.d.ts +1 -1
  30. package/dist/types/router/reg-exp-router/trie.d.ts +1 -1
  31. package/dist/types/router/trie-router/node.d.ts +1 -2
  32. package/dist/types/router.d.ts +4 -4
  33. package/dist/types/types.d.ts +30 -30
  34. package/dist/types/utils/body.d.ts +2 -2
  35. package/dist/types/utils/cloudflare.d.ts +1 -1
  36. package/dist/types/utils/cookie.d.ts +3 -3
  37. package/dist/types/utils/crypto.d.ts +2 -2
  38. package/dist/types/utils/filepath.d.ts +1 -1
  39. package/dist/types/utils/html.d.ts +5 -5
  40. package/dist/types/utils/http-status.d.ts +1 -1
  41. package/dist/types/utils/jwt/jwt.d.ts +1 -1
  42. package/dist/types/utils/types.d.ts +15 -15
  43. package/dist/types/utils/url.d.ts +1 -1
  44. package/dist/types/validator/validator.d.ts +3 -3
  45. package/package.json +7 -16
@@ -32,7 +32,7 @@ class Node {
32
32
  this.name = "";
33
33
  if (method && handler) {
34
34
  const m = {};
35
- m[method] = { handler, params: {}, possibleKeys: [], score: 0, name: this.name };
35
+ m[method] = { handler, possibleKeys: [], score: 0, name: this.name };
36
36
  this.methods = [m];
37
37
  }
38
38
  this.patterns = [];
@@ -70,7 +70,6 @@ class Node {
70
70
  const m = {};
71
71
  const handlerSet = {
72
72
  handler,
73
- params: {},
74
73
  possibleKeys,
75
74
  name: this.name,
76
75
  score: this.order
@@ -85,6 +84,7 @@ class Node {
85
84
  const m = node.methods[i];
86
85
  const handlerSet = m[method] || m[import_router.METHOD_NAME_ALL];
87
86
  if (handlerSet !== void 0) {
87
+ handlerSet.params = {};
88
88
  handlerSet.possibleKeys.map((key) => {
89
89
  handlerSet.params[key] = params[key];
90
90
  });
@@ -110,11 +110,9 @@ class Node {
110
110
  if (nextNode) {
111
111
  if (isLast === true) {
112
112
  if (nextNode.children["*"]) {
113
- handlerSets.push(
114
- ...this.gHSets(nextNode.children["*"], method, { ...params, ...node.params })
115
- );
113
+ handlerSets.push(...this.gHSets(nextNode.children["*"], method, node.params));
116
114
  }
117
- handlerSets.push(...this.gHSets(nextNode, method, { ...params, ...node.params }));
115
+ handlerSets.push(...this.gHSets(nextNode, method, node.params));
118
116
  } else {
119
117
  tempNodes.push(nextNode);
120
118
  }
@@ -124,7 +122,7 @@ class Node {
124
122
  if (pattern === "*") {
125
123
  const astNode = node.children["*"];
126
124
  if (astNode) {
127
- handlerSets.push(...this.gHSets(astNode, method, { ...params, ...node.params }));
125
+ handlerSets.push(...this.gHSets(astNode, method, node.params));
128
126
  tempNodes.push(astNode);
129
127
  }
130
128
  continue;
@@ -10,7 +10,7 @@ var Node = class {
10
10
  this.name = "";
11
11
  if (method && handler) {
12
12
  const m = {};
13
- m[method] = { handler, params: {}, possibleKeys: [], score: 0, name: this.name };
13
+ m[method] = { handler, possibleKeys: [], score: 0, name: this.name };
14
14
  this.methods = [m];
15
15
  }
16
16
  this.patterns = [];
@@ -48,7 +48,6 @@ var Node = class {
48
48
  const m = {};
49
49
  const handlerSet = {
50
50
  handler,
51
- params: {},
52
51
  possibleKeys,
53
52
  name: this.name,
54
53
  score: this.order
@@ -63,6 +62,7 @@ var Node = class {
63
62
  const m = node.methods[i];
64
63
  const handlerSet = m[method] || m[METHOD_NAME_ALL];
65
64
  if (handlerSet !== void 0) {
65
+ handlerSet.params = {};
66
66
  handlerSet.possibleKeys.map((key) => {
67
67
  handlerSet.params[key] = params[key];
68
68
  });
@@ -88,11 +88,9 @@ var Node = class {
88
88
  if (nextNode) {
89
89
  if (isLast === true) {
90
90
  if (nextNode.children["*"]) {
91
- handlerSets.push(
92
- ...this.gHSets(nextNode.children["*"], method, { ...params, ...node.params })
93
- );
91
+ handlerSets.push(...this.gHSets(nextNode.children["*"], method, node.params));
94
92
  }
95
- handlerSets.push(...this.gHSets(nextNode, method, { ...params, ...node.params }));
93
+ handlerSets.push(...this.gHSets(nextNode, method, node.params));
96
94
  } else {
97
95
  tempNodes.push(nextNode);
98
96
  }
@@ -102,7 +100,7 @@ var Node = class {
102
100
  if (pattern === "*") {
103
101
  const astNode = node.children["*"];
104
102
  if (astNode) {
105
- handlerSets.push(...this.gHSets(astNode, method, { ...params, ...node.params }));
103
+ handlerSets.push(...this.gHSets(astNode, method, node.params));
106
104
  tempNodes.push(astNode);
107
105
  }
108
106
  continue;
@@ -83,5 +83,5 @@ export interface ALBRequestContext {
83
83
  /**
84
84
  * @deprecated Use ApiGatewayRequestContextV2 instead.
85
85
  */
86
- export declare type LambdaFunctionUrlRequestContext = ApiGatewayRequestContextV2;
86
+ export type LambdaFunctionUrlRequestContext = ApiGatewayRequestContextV2;
87
87
  export {};
@@ -2,7 +2,7 @@ import type { Hono } from '../../hono';
2
2
  import type { Env, Schema } from '../../types';
3
3
  import type { ApiGatewayRequestContext, ApiGatewayRequestContextV2, ALBRequestContext } from './custom-context';
4
4
  import type { LambdaContext } from './types';
5
- export declare type LambdaEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2 | ALBProxyEvent;
5
+ export type LambdaEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2 | ALBProxyEvent;
6
6
  export interface APIGatewayProxyEventV2 {
7
7
  version: string;
8
8
  routeKey: string;
@@ -62,7 +62,7 @@ export interface APIGatewayProxyResult {
62
62
  };
63
63
  isBase64Encoded: boolean;
64
64
  }
65
- export declare const streamHandle: <E extends Env = Env, S extends Schema = {}, BasePath extends string = "/">(app: Hono<E, S, BasePath>) => import("./types").Handler<any, any>;
65
+ export declare const streamHandle: <E extends Env = Env, S extends Schema = {}, BasePath extends string = "/">(app: Hono<E, S, BasePath>) => import("./types").Handler;
66
66
  /**
67
67
  * Accepts events from API Gateway/ELB(`APIGatewayProxyEvent`) and directly through Function Url(`APIGatewayProxyEventV2`)
68
68
  */
@@ -38,6 +38,6 @@ export interface LambdaContext {
38
38
  clientContext?: ClientContext | undefined;
39
39
  getRemainingTimeInMillis(): number;
40
40
  }
41
- declare type Callback<TResult = any> = (error?: Error | string | null, result?: TResult) => void;
42
- export declare type Handler<TEvent = any, TResult = any> = (event: TEvent, context: LambdaContext, callback: Callback<TResult>) => void | Promise<TResult>;
41
+ type Callback<TResult = any> = (error?: Error | string | null, result?: TResult) => void;
42
+ export type Handler<TEvent = any, TResult = any> = (event: TEvent, context: LambdaContext, callback: Callback<TResult>) => void | Promise<TResult>;
43
43
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { Context } from '../../context';
2
2
  import type { Next } from '../../types';
3
- export declare type ServeStaticOptions = {
3
+ export type ServeStaticOptions = {
4
4
  root?: string;
5
5
  path?: string;
6
6
  rewriteRequestPath?: (path: string) => string;
@@ -1,7 +1,7 @@
1
1
  import { Hono } from '../../hono';
2
2
  import type { Env, MiddlewareHandler } from '../../types';
3
- declare type Params<P extends string = any> = Record<P, string | string[]>;
4
- export declare type EventContext<Env = {}, P extends string = any, Data = {}> = {
3
+ type Params<P extends string = any> = Record<P, string | string[]>;
4
+ export type EventContext<Env = {}, P extends string = any, Data = {}> = {
5
5
  request: Request;
6
6
  functionPath: string;
7
7
  waitUntil: (promise: Promise<unknown>) => void;
@@ -1,6 +1,6 @@
1
1
  import type { KVNamespace } from '@cloudflare/workers-types';
2
2
  import type { MiddlewareHandler } from '../../types';
3
- export declare type ServeStaticOptions = {
3
+ export type ServeStaticOptions = {
4
4
  root?: string;
5
5
  path?: string;
6
6
  manifest?: object | string;
@@ -1,3 +1,3 @@
1
1
  import type { ServeStaticOptions } from './serve-static';
2
- declare const module: (options?: ServeStaticOptions) => import("../..").MiddlewareHandler<any, string, {}>;
2
+ declare const module: (options?: ServeStaticOptions) => import("../..").MiddlewareHandler;
3
3
  export { module as serveStatic };
@@ -1,6 +1,6 @@
1
1
  import type { Context } from '../../context';
2
2
  import type { Next } from '../../types';
3
- export declare type ServeStaticOptions = {
3
+ export type ServeStaticOptions = {
4
4
  root?: string;
5
5
  path?: string;
6
6
  rewriteRequestPath?: (path: string) => string;
@@ -53,7 +53,7 @@ interface CloudFrontEvent {
53
53
  export interface CloudFrontEdgeEvent {
54
54
  Records: CloudFrontEvent[];
55
55
  }
56
- declare type CloudFrontContext = {};
56
+ type CloudFrontContext = {};
57
57
  export interface Callback {
58
58
  (err: Error | null, result?: CloudFrontRequest | CloudFrontResult): void;
59
59
  }
@@ -1,6 +1,6 @@
1
1
  import type { Context } from 'https://edge.netlify.com/';
2
2
  import type { Hono } from '../../';
3
- export declare type Env = {
3
+ export type Env = {
4
4
  Bindings: {
5
5
  context: Context;
6
6
  };
@@ -1,15 +1,15 @@
1
1
  import type { Hono } from '../hono';
2
2
  import type { Schema } from '../types';
3
3
  import type { HasRequiredKeys } from '../utils/types';
4
- declare type HonoRequest = typeof Hono.prototype['request'];
5
- export declare type ClientRequestOptions<T = unknown> = keyof T extends never ? {
4
+ type HonoRequest = typeof Hono.prototype['request'];
5
+ export type ClientRequestOptions<T = unknown> = keyof T extends never ? {
6
6
  headers?: Record<string, string>;
7
7
  fetch?: typeof fetch | HonoRequest;
8
8
  } : {
9
9
  headers: T;
10
10
  fetch?: typeof fetch | HonoRequest;
11
11
  };
12
- declare type ClientRequest<S extends Schema> = {
12
+ type ClientRequest<S extends Schema> = {
13
13
  [M in keyof S]: S[M] extends {
14
14
  input: infer R;
15
15
  output: infer O;
@@ -17,7 +17,7 @@ declare type ClientRequest<S extends Schema> = {
17
17
  } & {
18
18
  $url: () => URL;
19
19
  };
20
- declare type BlankRecordToNever<T> = T extends any ? (keyof T extends never ? never : T) : never;
20
+ type BlankRecordToNever<T> = T extends any ? (keyof T extends never ? never : T) : never;
21
21
  export interface ClientResponse<T> {
22
22
  ok: boolean;
23
23
  status: number;
@@ -34,22 +34,22 @@ export interface ClientResponse<T> {
34
34
  }
35
35
  export interface Response extends ClientResponse<unknown> {
36
36
  }
37
- export declare type Fetch<T> = (args?: InferRequestType<T>, opt?: ClientRequestOptions) => Promise<ClientResponse<InferResponseType<T>>>;
38
- export declare type InferResponseType<T> = T extends (args: any | undefined, options: any | undefined) => Promise<ClientResponse<infer O>> ? O : never;
39
- export declare type InferRequestType<T> = T extends (args: infer R, options: any | undefined) => Promise<ClientResponse<unknown>> ? NonNullable<R> : never;
40
- export declare type InferRequestOptionsType<T> = T extends (args: any, options: infer R) => Promise<ClientResponse<unknown>> ? NonNullable<R> : never;
41
- declare type PathToChain<Path extends string, E extends Schema, Original extends string = ''> = Path extends `/${infer P}` ? PathToChain<P, E, Path> : Path extends `${infer P}/${infer R}` ? {
37
+ export type Fetch<T> = (args?: InferRequestType<T>, opt?: ClientRequestOptions) => Promise<ClientResponse<InferResponseType<T>>>;
38
+ export type InferResponseType<T> = T extends (args: any | undefined, options: any | undefined) => Promise<ClientResponse<infer O>> ? O : never;
39
+ export type InferRequestType<T> = T extends (args: infer R, options: any | undefined) => Promise<ClientResponse<unknown>> ? NonNullable<R> : never;
40
+ export type InferRequestOptionsType<T> = T extends (args: any, options: infer R) => Promise<ClientResponse<unknown>> ? NonNullable<R> : never;
41
+ type PathToChain<Path extends string, E extends Schema, Original extends string = ''> = Path extends `/${infer P}` ? PathToChain<P, E, Path> : Path extends `${infer P}/${infer R}` ? {
42
42
  [K in P]: PathToChain<R, E, Original>;
43
43
  } : {
44
44
  [K in Path extends '' ? 'index' : Path]: ClientRequest<E extends Record<string, unknown> ? E[Original] : never>;
45
45
  };
46
- export declare type Client<T> = T extends Hono<any, infer S, any> ? S extends Record<infer K, Schema> ? K extends string ? PathToChain<K, S> : never : never : never;
47
- export declare type Callback = (opts: CallbackOptions) => unknown;
46
+ export type Client<T> = T extends Hono<any, infer S, any> ? S extends Record<infer K, Schema> ? K extends string ? PathToChain<K, S> : never : never : never;
47
+ export type Callback = (opts: CallbackOptions) => unknown;
48
48
  interface CallbackOptions {
49
49
  path: string[];
50
50
  args: any[];
51
51
  }
52
- export declare type ObjectType<T = unknown> = {
52
+ export type ObjectType<T = unknown> = {
53
53
  [key: string]: T;
54
54
  };
55
55
  export {};
@@ -5,8 +5,8 @@ import type { CookieOptions } from './utils/cookie';
5
5
  import type { StatusCode } from './utils/http-status';
6
6
  import { StreamingApi } from './utils/stream';
7
7
  import type { JSONValue, InterfaceToType, JSONParsed } from './utils/types';
8
- declare type HeaderRecord = Record<string, string | string[]>;
9
- declare type Data = string | ArrayBuffer | ReadableStream;
8
+ type HeaderRecord = Record<string, string | string[]>;
9
+ type Data = string | ArrayBuffer | ReadableStream;
10
10
  export interface ExecutionContext {
11
11
  waitUntil(promise: Promise<unknown>): void;
12
12
  passThroughOnException(): void;
@@ -18,7 +18,7 @@ export interface ContextRenderer {
18
18
  interface DefaultRenderer {
19
19
  (content: string | Promise<string>): Response | Promise<Response>;
20
20
  }
21
- export declare type Renderer = ContextRenderer extends Function ? ContextRenderer : DefaultRenderer;
21
+ export type Renderer = ContextRenderer extends Function ? ContextRenderer : DefaultRenderer;
22
22
  interface Get<E extends Env> {
23
23
  <Key extends keyof ContextVariableMap>(key: Key): ContextVariableMap[Key];
24
24
  <Key extends keyof E['Variables']>(key: Key): E['Variables'][Key];
@@ -45,7 +45,7 @@ interface HTMLRespond {
45
45
  (html: string | Promise<string>, status?: StatusCode, headers?: HeaderRecord): Response | Promise<Response>;
46
46
  (html: string | Promise<string>, init?: ResponseInit): Response | Promise<Response>;
47
47
  }
48
- declare type ContextOptions<E extends Env> = {
48
+ type ContextOptions<E extends Env> = {
49
49
  env: E['Bindings'];
50
50
  executionCtx?: FetchEventLike | ExecutionContext | undefined;
51
51
  notFoundHandler?: NotFoundHandler<E>;
@@ -1,4 +1,4 @@
1
1
  import type { Context } from '../../context';
2
- export declare type Runtime = 'node' | 'deno' | 'bun' | 'workerd' | 'fastly' | 'edge-light' | 'lagon' | 'other';
2
+ export type Runtime = 'node' | 'deno' | 'bun' | 'workerd' | 'fastly' | 'edge-light' | 'lagon' | 'other';
3
3
  export declare const env: <T extends Record<string, unknown>, C extends Context<any, any, {}> = Context<{}, any, {}>>(c: C, runtime?: Runtime) => T & C["env"];
4
4
  export declare const getRuntimeKey: () => "other" | "node" | "deno" | "bun" | "workerd" | "fastly" | "edge-light" | "lagon";
@@ -1,4 +1,4 @@
1
1
  import type { Hono } from '../../hono';
2
- declare type ExtractEnv<T> = T extends Hono<infer E, any, any> ? E : never;
2
+ type ExtractEnv<T> = T extends Hono<infer E, any, any> ? E : never;
3
3
  export declare const testClient: <T extends Hono<any, any, any>>(app: T, Env?: {} | ExtractEnv<T>["Bindings"] | undefined, executionCtx?: any) => import("../../utils/types").UnionToIntersection<import("../../client/types").Client<T>>;
4
4
  export {};
@@ -2,10 +2,10 @@ import { Context } from './context';
2
2
  import type { ExecutionContext } from './context';
3
3
  import type { Router } from './router';
4
4
  import type { Env, ErrorHandler, H, HandlerInterface, MiddlewareHandlerInterface, NotFoundHandler, OnHandlerInterface, MergePath, MergeSchemaPath, FetchEventLike, Schema, RouterRoute } from './types';
5
- declare type GetPath<E extends Env> = (request: Request, options?: {
5
+ type GetPath<E extends Env> = (request: Request, options?: {
6
6
  env?: E['Bindings'];
7
7
  }) => string;
8
- export declare type HonoOptions<E extends Env> = {
8
+ export type HonoOptions<E extends Env> = {
9
9
  strict?: boolean;
10
10
  router?: Router<[H, RouterRoute]>;
11
11
  getPath?: GetPath<E>;
@@ -1,5 +1,5 @@
1
1
  import type { StatusCode } from './utils/http-status';
2
- declare type HTTPExceptionOptions = {
2
+ type HTTPExceptionOptions = {
3
3
  res?: Response;
4
4
  message?: string;
5
5
  };
@@ -1,8 +1,8 @@
1
1
  import type { HtmlEscapedString } from '../utils/html';
2
2
  import type { FC, Child } from './index';
3
3
  export declare const childrenToString: (children: Child[]) => Promise<HtmlEscapedString[]>;
4
- declare type ErrorHandler = (error: Error) => void;
5
- declare type FallbackRender = (error: Error) => Child;
4
+ type ErrorHandler = (error: Error) => void;
5
+ type FallbackRender = (error: Error) => Child;
6
6
  /**
7
7
  * @experimental
8
8
  * `ErrorBoundary` is an experimental feature.
@@ -1,7 +1,7 @@
1
1
  import type { StringBuffer, HtmlEscaped, HtmlEscapedString } from '../utils/html';
2
2
  import type { IntrinsicElements as IntrinsicElementsDefined } from './intrinsic-elements';
3
3
  export { ErrorBoundary } from './components';
4
- declare type Props = Record<string, any>;
4
+ type Props = Record<string, any>;
5
5
  declare global {
6
6
  namespace JSX {
7
7
  type Element = HtmlEscapedString | Promise<HtmlEscapedString>;
@@ -13,7 +13,7 @@ declare global {
13
13
  }
14
14
  }
15
15
  }
16
- export declare type Child = string | Promise<string> | number | JSXNode | Child[];
16
+ export type Child = string | Promise<string> | number | JSXNode | Child[];
17
17
  export declare class JSXNode implements HtmlEscaped {
18
18
  tag: string | Function;
19
19
  props: Props;
@@ -25,7 +25,7 @@ export declare class JSXNode implements HtmlEscaped {
25
25
  }
26
26
  export { jsxFn as jsx };
27
27
  declare const jsxFn: (tag: string | Function, props: Props, ...children: (string | HtmlEscapedString)[]) => JSXNode;
28
- export declare type FC<T = Props> = (props: T & {
28
+ export type FC<T = Props> = (props: T & {
29
29
  children?: Child;
30
30
  }) => HtmlEscapedString | Promise<HtmlEscapedString>;
31
31
  export declare const memo: <T>(component: FC<T>, propsAreEqual?: (prevProps: Readonly<T>, nextProps: Readonly<T>) => boolean) => FC<T>;
@@ -1,5 +1,5 @@
1
1
  import type { MiddlewareHandler } from '../../types';
2
- declare type CORSOptions = {
2
+ type CORSOptions = {
3
3
  origin: string | string[] | ((origin: string) => string | undefined | null);
4
4
  allowMethods?: string[];
5
5
  allowHeaders?: string[];
@@ -1,5 +1,5 @@
1
1
  import type { MiddlewareHandler } from '../../types';
2
- declare type ETagOptions = {
2
+ type ETagOptions = {
3
3
  retainedHeaders?: string[];
4
4
  weak?: boolean;
5
5
  };
@@ -2,8 +2,8 @@ import type { Context, Renderer } from '../../context';
2
2
  import type { FC } from '../../jsx';
3
3
  import type { Env, Input, MiddlewareHandler } from '../../types';
4
4
  export declare const RequestContext: import("../../jsx").Context<Context<any, any, {}> | null>;
5
- declare type PropsForRenderer = [...Required<Parameters<Renderer>>] extends [unknown, infer Props] ? Props : unknown;
6
- declare type RendererOptions = {
5
+ type PropsForRenderer = [...Required<Parameters<Renderer>>] extends [unknown, infer Props] ? Props : unknown;
6
+ type RendererOptions = {
7
7
  docType?: boolean | string;
8
8
  stream?: boolean | Record<string, string>;
9
9
  };
@@ -1,4 +1,4 @@
1
1
  import type { MiddlewareHandler } from '../../types';
2
- declare type PrintFunc = (str: string, ...rest: string[]) => void;
2
+ type PrintFunc = (str: string, ...rest: string[]) => void;
3
3
  export declare const logger: (fn?: PrintFunc) => MiddlewareHandler;
4
4
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { MiddlewareHandler } from '../../types';
2
- declare type prettyOptions = {
2
+ type prettyOptions = {
3
3
  space: number;
4
4
  };
5
5
  export declare const prettyJSON: (options?: prettyOptions) => MiddlewareHandler;
@@ -35,7 +35,7 @@ interface ReportingEndpointOptions {
35
35
  name: string;
36
36
  url: string;
37
37
  }
38
- declare type overridableHeader = boolean | string;
38
+ type overridableHeader = boolean | string;
39
39
  interface SecureHeadersOptions {
40
40
  contentSecurityPolicy?: ContentSecurityPolicyOptions;
41
41
  crossOriginEmbedderPolicy?: overridableHeader;
@@ -3,14 +3,14 @@ import type { Input, InputToDataByTarget, ParamKeys, ParamKeyToRecord, RemoveQue
3
3
  import type { BodyData, ParseBodyOptions } from './utils/body';
4
4
  import type { Cookie } from './utils/cookie';
5
5
  import type { UnionToIntersection } from './utils/types';
6
- declare type Body = {
6
+ type Body = {
7
7
  json: any;
8
8
  text: string;
9
9
  arrayBuffer: ArrayBuffer;
10
10
  blob: Blob;
11
11
  formData: FormData;
12
12
  };
13
- declare type BodyCache = Partial<Body & {
13
+ type BodyCache = Partial<Body & {
14
14
  parsedBody: BodyData;
15
15
  }>;
16
16
  export declare class HonoRequest<P extends string = '/', I extends Input['out'] = {}> {
@@ -1,5 +1,5 @@
1
1
  export declare const PATH_ERROR: unique symbol;
2
- export declare type ParamAssocArray = [string, number][];
2
+ export type ParamAssocArray = [string, number][];
3
3
  export interface Context {
4
4
  varIndex: number;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import type { Router, Result } from '../../router';
2
- declare type HandlerWithMetadata<T> = [T, number];
2
+ type HandlerWithMetadata<T> = [T, number];
3
3
  export declare class RegExpRouter<T> implements Router<T> {
4
4
  name: string;
5
5
  middleware?: Record<string, Record<string, HandlerWithMetadata<T>[]>>;
@@ -1,6 +1,6 @@
1
1
  import type { ParamAssocArray, Context } from './node';
2
2
  import { Node } from './node';
3
- export declare type ReplacementMap = number[];
3
+ export type ReplacementMap = number[];
4
4
  export declare class Trie {
5
5
  context: Context;
6
6
  root: Node;
@@ -1,8 +1,7 @@
1
1
  import type { Params } from '../../router';
2
2
  import type { Pattern } from '../../utils/url';
3
- declare type HandlerSet<T> = {
3
+ type HandlerSet<T> = {
4
4
  handler: T;
5
- params: Record<string, string>;
6
5
  possibleKeys: string[];
7
6
  score: number;
8
7
  name: string;
@@ -7,9 +7,9 @@ export interface Router<T> {
7
7
  add(method: string, path: string, handler: T): void;
8
8
  match(method: string, path: string): Result<T>;
9
9
  }
10
- export declare type ParamIndexMap = Record<string, number>;
11
- export declare type ParamStash = string[];
12
- export declare type Params = Record<string, string>;
13
- export declare type Result<T> = [[T, ParamIndexMap][], ParamStash] | [[T, Params][]];
10
+ export type ParamIndexMap = Record<string, number>;
11
+ export type ParamStash = string[];
12
+ export type Params = Record<string, string>;
13
+ export type Result<T> = [[T, ParamIndexMap][], ParamStash] | [[T, Params][]];
14
14
  export declare class UnsupportedPathError extends Error {
15
15
  }
@@ -1,14 +1,14 @@
1
1
  import type { Context } from './context';
2
2
  import type { Hono } from './hono';
3
3
  import type { IntersectNonAnyTypes, UnionToIntersection } from './utils/types';
4
- export declare type Bindings = Record<string, unknown>;
5
- export declare type Variables = Record<string, unknown>;
6
- export declare type Env = {
4
+ export type Bindings = Record<string, unknown>;
5
+ export type Variables = Record<string, unknown>;
6
+ export type Env = {
7
7
  Bindings?: Bindings;
8
8
  Variables?: Variables;
9
9
  };
10
- export declare type Next = () => Promise<void>;
11
- export declare type Input = {
10
+ export type Next = () => Promise<void>;
11
+ export type Input = {
12
12
  in?: Partial<ValidationTargets>;
13
13
  out?: Partial<{
14
14
  [K in keyof ValidationTargets]: unknown;
@@ -19,12 +19,12 @@ export interface RouterRoute {
19
19
  method: string;
20
20
  handler: H;
21
21
  }
22
- export declare type HandlerResponse<O> = Response | TypedResponse<O> | Promise<Response | TypedResponse<O>>;
23
- export declare type Handler<E extends Env = any, P extends string = any, I extends Input = Input, R extends HandlerResponse<any> = any> = (c: Context<E, P, I>, next: Next) => R;
24
- export declare type MiddlewareHandler<E extends Env = any, P extends string = string, I extends Input = {}> = (c: Context<E, P, I>, next: Next) => Promise<Response | void>;
25
- export declare type H<E extends Env = any, P extends string = any, I extends Input = {}, R extends HandlerResponse<any> = any> = Handler<E, P, I, R> | MiddlewareHandler<E, P, I>;
26
- export declare type NotFoundHandler<E extends Env = any> = (c: Context<E>) => Response | Promise<Response>;
27
- export declare type ErrorHandler<E extends Env = any> = (err: Error, c: Context<E>) => Response | Promise<Response>;
22
+ export type HandlerResponse<O> = Response | TypedResponse<O> | Promise<Response | TypedResponse<O>>;
23
+ export type Handler<E extends Env = any, P extends string = any, I extends Input = Input, R extends HandlerResponse<any> = any> = (c: Context<E, P, I>, next: Next) => R;
24
+ export type MiddlewareHandler<E extends Env = any, P extends string = string, I extends Input = {}> = (c: Context<E, P, I>, next: Next) => Promise<Response | void>;
25
+ export type H<E extends Env = any, P extends string = any, I extends Input = {}, R extends HandlerResponse<any> = any> = Handler<E, P, I, R> | MiddlewareHandler<E, P, I>;
26
+ export type NotFoundHandler<E extends Env = any> = (c: Context<E>) => Response | Promise<Response>;
27
+ export type ErrorHandler<E extends Env = any> = (err: Error, c: Context<E>) => Response | Promise<Response>;
28
28
  export interface HandlerInterface<E extends Env = Env, M extends string = string, S extends Schema = {}, BasePath extends string = '/'> {
29
29
  <P extends string = ExtractKey<S> extends never ? BasePath : ExtractKey<S>, I extends Input = {}, R extends HandlerResponse<any> = any, E2 extends Env = E>(handler: H<E2, P, I, R>): Hono<IntersectNonAnyTypes<[E, E2]>, S & ToSchema<M, P, I['in'], MergeTypedResponseData<R>>, BasePath>;
30
30
  <P extends string = ExtractKey<S> extends never ? BasePath : ExtractKey<S>, I extends Input = {}, I2 extends Input = I, R extends HandlerResponse<any> = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>>(...handlers: [H<E2, P, I>, H<E3, P, I2, R>]): Hono<IntersectNonAnyTypes<[E, E2, E3]>, S & ToSchema<M, P, I2['in'], MergeTypedResponseData<R>>, BasePath>;
@@ -291,8 +291,8 @@ export interface OnHandlerInterface<E extends Env = Env, S extends Schema = {},
291
291
  ]): Hono<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11]>, S & ToSchema<Ms[number], MergedPath, I10['in'], MergeTypedResponseData<HandlerResponse<any>>>, BasePath>;
292
292
  <P extends string, R extends HandlerResponse<any> = any, I extends Input = {}>(methods: string[], path: P, ...handlers: H<E, MergePath<BasePath, P>, I, R>[]): Hono<E, S & ToSchema<string, MergePath<BasePath, P>, I['in'], MergeTypedResponseData<R>>, BasePath>;
293
293
  }
294
- declare type ExtractKey<S> = S extends Record<infer Key, unknown> ? Key extends string ? Key : never : string;
295
- export declare type ToSchema<M extends string, P extends string, I extends Input['in'], O> = {
294
+ type ExtractKey<S> = S extends Record<infer Key, unknown> ? Key extends string ? Key : never : string;
295
+ export type ToSchema<M extends string, P extends string, I extends Input['in'], O> = {
296
296
  [K in P]: {
297
297
  [K2 in M as AddDollar<K2>]: {
298
298
  input: unknown extends I ? AddParam<{}, P> : AddParam<I, P>;
@@ -300,7 +300,7 @@ export declare type ToSchema<M extends string, P extends string, I extends Input
300
300
  };
301
301
  };
302
302
  };
303
- export declare type Schema = {
303
+ export type Schema = {
304
304
  [Path: string]: {
305
305
  [Method: `$${Lowercase<string>}`]: {
306
306
  input: Partial<ValidationTargets> & {
@@ -310,21 +310,21 @@ export declare type Schema = {
310
310
  };
311
311
  };
312
312
  };
313
- export declare type MergeSchemaPath<OrigSchema, SubPath extends string> = {
313
+ export type MergeSchemaPath<OrigSchema, SubPath extends string> = {
314
314
  [K in keyof OrigSchema as `${MergePath<SubPath, K & string>}`]: OrigSchema[K];
315
315
  };
316
- export declare type AddParam<I, P extends string> = ParamKeys<P> extends never ? I : I & {
316
+ export type AddParam<I, P extends string> = ParamKeys<P> extends never ? I : I & {
317
317
  param: UnionToIntersection<ParamKeyToRecord<ParamKeys<P>>>;
318
318
  };
319
- declare type AddDollar<T extends string> = `$${Lowercase<T>}`;
320
- export declare type MergePath<A extends string, B extends string> = A extends '' ? B : A extends '/' ? B : A extends `${infer P}/` ? B extends `/${infer Q}` ? `${P}/${Q}` : `${P}/${B}` : B extends `/${infer Q}` ? Q extends '' ? A : `${A}/${Q}` : `${A}/${B}`;
321
- export declare type TypedResponse<T = unknown> = {
319
+ type AddDollar<T extends string> = `$${Lowercase<T>}`;
320
+ export type MergePath<A extends string, B extends string> = A extends '' ? B : A extends '/' ? B : A extends `${infer P}/` ? B extends `/${infer Q}` ? `${P}/${Q}` : `${P}/${B}` : B extends `/${infer Q}` ? Q extends '' ? A : `${A}/${Q}` : `${A}/${B}`;
321
+ export type TypedResponse<T = unknown> = {
322
322
  data: T;
323
323
  format: 'json';
324
324
  };
325
- declare type ExtractResponseData<T> = T extends Promise<infer T2> ? T2 extends TypedResponse<infer U> ? U : {} : T extends TypedResponse<infer U> ? U : {};
326
- declare type MergeTypedResponseData<T> = ExtractResponseData<T>;
327
- export declare type ValidationTargets = {
325
+ type ExtractResponseData<T> = T extends Promise<infer T2> ? T2 extends TypedResponse<infer U> ? U : {} : T extends TypedResponse<infer U> ? U : {};
326
+ type MergeTypedResponseData<T> = ExtractResponseData<T>;
327
+ export type ValidationTargets = {
328
328
  json: any;
329
329
  form: Record<string, string | File>;
330
330
  query: Record<string, string | string[]>;
@@ -333,18 +333,18 @@ export declare type ValidationTargets = {
333
333
  header: Record<string, string>;
334
334
  cookie: Record<string, string>;
335
335
  };
336
- declare type ParamKeyName<NameWithPattern> = NameWithPattern extends `${infer Name}{${infer Rest}` ? Rest extends `${infer _Pattern}?` ? `${Name}?` : Name : NameWithPattern;
337
- declare type ParamKey<Component> = Component extends `:${infer NameWithPattern}` ? ParamKeyName<NameWithPattern> : never;
338
- export declare type ParamKeys<Path> = Path extends `${infer Component}/${infer Rest}` ? ParamKey<Component> | ParamKeys<Rest> : ParamKey<Path>;
339
- export declare type ParamKeyToRecord<T extends string> = T extends `${infer R}?` ? Record<R, string | undefined> : {
336
+ type ParamKeyName<NameWithPattern> = NameWithPattern extends `${infer Name}{${infer Rest}` ? Rest extends `${infer _Pattern}?` ? `${Name}?` : Name : NameWithPattern;
337
+ type ParamKey<Component> = Component extends `:${infer NameWithPattern}` ? ParamKeyName<NameWithPattern> : never;
338
+ export type ParamKeys<Path> = Path extends `${infer Component}/${infer Rest}` ? ParamKey<Component> | ParamKeys<Rest> : ParamKey<Path>;
339
+ export type ParamKeyToRecord<T extends string> = T extends `${infer R}?` ? Record<R, string | undefined> : {
340
340
  [K in T]: string;
341
341
  };
342
- export declare type InputToDataByTarget<T extends Input['out'], Target extends keyof ValidationTargets> = T extends {
342
+ export type InputToDataByTarget<T extends Input['out'], Target extends keyof ValidationTargets> = T extends {
343
343
  [K in Target]: infer R;
344
344
  } ? R : never;
345
- export declare type RemoveQuestion<T> = T extends `${infer R}?` ? R : T;
346
- export declare type UndefinedIfHavingQuestion<T> = T extends `${infer _}?` ? string | undefined : string;
347
- export declare type ExtractSchema<T> = UnionToIntersection<T extends Hono<infer _, infer S, any> ? S : never>;
345
+ export type RemoveQuestion<T> = T extends `${infer R}?` ? R : T;
346
+ export type UndefinedIfHavingQuestion<T> = T extends `${infer _}?` ? string | undefined : string;
347
+ export type ExtractSchema<T> = UnionToIntersection<T extends Hono<infer _, infer S, any> ? S : never>;
348
348
  export declare abstract class FetchEventLike {
349
349
  abstract readonly request: Request;
350
350
  abstract respondWith(promise: Response | Promise<Response>): void;
@@ -1,6 +1,6 @@
1
1
  import type { HonoRequest } from '../request';
2
- export declare type BodyData = Record<string, string | File | (string | File)[]>;
3
- export declare type ParseBodyOptions = {
2
+ export type BodyData = Record<string, string | File | (string | File)[]>;
3
+ export type ParseBodyOptions = {
4
4
  /**
5
5
  * Parse all fields with multiple values should be parsed as an array.
6
6
  * @default false
@@ -1,5 +1,5 @@
1
1
  import type { KVNamespace } from '@cloudflare/workers-types';
2
- export declare type KVAssetOptions = {
2
+ export type KVAssetOptions = {
3
3
  manifest?: object | string;
4
4
  namespace?: KVNamespace;
5
5
  };
@@ -1,6 +1,6 @@
1
- export declare type Cookie = Record<string, string>;
2
- export declare type SignedCookie = Record<string, string | false>;
3
- export declare type CookieOptions = {
1
+ export type Cookie = Record<string, string>;
2
+ export type SignedCookie = Record<string, string | false>;
3
+ export type CookieOptions = {
4
4
  domain?: string;
5
5
  expires?: Date;
6
6
  httpOnly?: boolean;
@@ -1,8 +1,8 @@
1
- declare type Algorithm = {
1
+ type Algorithm = {
2
2
  name: string;
3
3
  alias: string;
4
4
  };
5
- declare type Data = string | boolean | number | object | ArrayBufferView | ArrayBuffer | ReadableStream;
5
+ type Data = string | boolean | number | object | ArrayBufferView | ArrayBuffer | ReadableStream;
6
6
  export declare const sha256: (data: Data) => Promise<string | null>;
7
7
  export declare const sha1: (data: Data) => Promise<string | null>;
8
8
  export declare const md5: (data: Data) => Promise<string | null>;
@@ -1,4 +1,4 @@
1
- declare type FilePathOptions = {
1
+ type FilePathOptions = {
2
2
  filename: string;
3
3
  root?: string;
4
4
  defaultDocument?: string;
@@ -1,14 +1,14 @@
1
- declare type HtmlEscapedCallbackOpts = {
1
+ type HtmlEscapedCallbackOpts = {
2
2
  error?: Error;
3
3
  buffer?: [string];
4
4
  };
5
- export declare type HtmlEscapedCallback = (opts: HtmlEscapedCallbackOpts) => Promise<string>;
6
- export declare type HtmlEscaped = {
5
+ export type HtmlEscapedCallback = (opts: HtmlEscapedCallbackOpts) => Promise<string>;
6
+ export type HtmlEscaped = {
7
7
  isEscaped: true;
8
8
  callbacks?: HtmlEscapedCallback[];
9
9
  };
10
- export declare type HtmlEscapedString = string & HtmlEscaped;
11
- export declare type StringBuffer = (string | Promise<string>)[];
10
+ export type HtmlEscapedString = string & HtmlEscaped;
11
+ export type StringBuffer = (string | Promise<string>)[];
12
12
  export declare const stringBufferToString: (buffer: StringBuffer) => Promise<HtmlEscapedString>;
13
13
  export declare const escapeToBuffer: (str: string, buffer: StringBuffer) => void;
14
14
  export declare const resolveStream: (str: string | HtmlEscapedString, buffer?: [string]) => Promise<string>;
@@ -1 +1 @@
1
- export declare type StatusCode = number;
1
+ export type StatusCode = number;
@@ -1,5 +1,5 @@
1
1
  import type { AlgorithmTypes } from './types';
2
- declare type AlgorithmTypeName = keyof typeof AlgorithmTypes;
2
+ type AlgorithmTypeName = keyof typeof AlgorithmTypes;
3
3
  export declare const sign: (payload: unknown, secret: string, alg?: AlgorithmTypeName) => Promise<string>;
4
4
  export declare const verify: (token: string, secret: string, alg?: AlgorithmTypeName) => Promise<any>;
5
5
  export declare const decode: (token: string) => {
@@ -1,23 +1,23 @@
1
- export declare type Expect<T extends true> = T;
2
- export declare type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
3
- export declare type NotEqual<X, Y> = true extends Equal<X, Y> ? false : true;
4
- export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
5
- export declare type RemoveBlankRecord<T> = T extends Record<infer K, unknown> ? K extends string ? T : never : never;
6
- export declare type IfAnyThenEmptyObject<T> = 0 extends 1 & T ? {} : T;
7
- export declare type IntersectNonAnyTypes<T extends any[]> = T extends [infer Head, ...infer Rest] ? IfAnyThenEmptyObject<Head> & IntersectNonAnyTypes<Rest> : {};
8
- export declare type JSONPrimitive = string | boolean | number | null | undefined;
9
- export declare type JSONArray = (JSONPrimitive | JSONObject | JSONArray)[];
10
- export declare type JSONObject = {
1
+ export type Expect<T extends true> = T;
2
+ export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
3
+ export type NotEqual<X, Y> = true extends Equal<X, Y> ? false : true;
4
+ export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
5
+ export type RemoveBlankRecord<T> = T extends Record<infer K, unknown> ? K extends string ? T : never : never;
6
+ export type IfAnyThenEmptyObject<T> = 0 extends 1 & T ? {} : T;
7
+ export type IntersectNonAnyTypes<T extends any[]> = T extends [infer Head, ...infer Rest] ? IfAnyThenEmptyObject<Head> & IntersectNonAnyTypes<Rest> : {};
8
+ export type JSONPrimitive = string | boolean | number | null | undefined;
9
+ export type JSONArray = (JSONPrimitive | JSONObject | JSONArray)[];
10
+ export type JSONObject = {
11
11
  [key: string]: JSONPrimitive | JSONArray | JSONObject | object;
12
12
  };
13
- export declare type JSONValue = JSONObject | JSONArray | JSONPrimitive;
14
- export declare type JSONParsed<T> = {
13
+ export type JSONValue = JSONObject | JSONArray | JSONPrimitive;
14
+ export type JSONParsed<T> = {
15
15
  [k in keyof T]: T[k] extends JSONValue ? T[k] : string;
16
16
  };
17
- export declare type InterfaceToType<T> = T extends Function ? T : {
17
+ export type InterfaceToType<T> = T extends Function ? T : {
18
18
  [K in keyof T]: InterfaceToType<T[K]>;
19
19
  };
20
- export declare type RequiredKeysOf<BaseType extends object> = Exclude<{
20
+ export type RequiredKeysOf<BaseType extends object> = Exclude<{
21
21
  [Key in keyof BaseType]: BaseType extends Record<Key, BaseType[Key]> ? Key : never;
22
22
  }[keyof BaseType], undefined>;
23
- export declare type HasRequiredKeys<BaseType extends object> = RequiredKeysOf<BaseType> extends never ? false : true;
23
+ export type HasRequiredKeys<BaseType extends object> = RequiredKeysOf<BaseType> extends never ? false : true;
@@ -1,4 +1,4 @@
1
- export declare type Pattern = readonly [string, string, RegExp | true] | '*';
1
+ export type Pattern = readonly [string, string, RegExp | true] | '*';
2
2
  export declare const splitPath: (path: string) => string[];
3
3
  export declare const splitRoutingPath: (path: string) => string[];
4
4
  export declare const getPattern: (label: string) => Pattern | null;
@@ -1,8 +1,8 @@
1
1
  import type { Context } from '../context';
2
2
  import type { Env, ValidationTargets, MiddlewareHandler } from '../types';
3
- declare type ValidationTargetKeysWithBody = 'form' | 'json';
4
- declare type ValidationTargetByMethod<M> = M extends 'get' | 'head' ? Exclude<keyof ValidationTargets, ValidationTargetKeysWithBody> : keyof ValidationTargets;
5
- export declare type ValidationFunction<InputType, OutputType, E extends Env = {}, P extends string = string> = (value: InputType, c: Context<E, P>) => OutputType | Response | Promise<OutputType> | Promise<Response>;
3
+ type ValidationTargetKeysWithBody = 'form' | 'json';
4
+ type ValidationTargetByMethod<M> = M extends 'get' | 'head' ? Exclude<keyof ValidationTargets, ValidationTargetKeysWithBody> : keyof ValidationTargets;
5
+ export type ValidationFunction<InputType, OutputType, E extends Env = {}, P extends string = string> = (value: InputType, c: Context<E, P>) => OutputType | Response | Promise<OutputType> | Promise<Response>;
6
6
  export declare const validator: <InputType, P extends string, M extends string, U extends ValidationTargetByMethod<M>, OutputType = ValidationTargets[U], P2 extends string = P, V extends {
7
7
  in: { [K in U]: unknown extends InputType ? OutputType : InputType; };
8
8
  out: { [K_1 in U]: OutputType; };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono",
3
- "version": "3.11.6",
3
+ "version": "3.11.7",
4
4
  "description": "Ultrafast web framework for the Edges",
5
5
  "main": "dist/cjs/index.js",
6
6
  "type": "module",
@@ -20,8 +20,8 @@
20
20
  "test:lambda": "env NAME=Node vitest --run --config ./runtime_tests/lambda/vitest.config.ts",
21
21
  "test:lambda-edge": "env NAME=Node vitest --run --config ./runtime_tests/lambda-edge/vitest.config.ts",
22
22
  "test:all": "yarn test && yarn test:deno && yarn test:bun && yarn test:fastly && yarn test:lagon && yarn test:node && yarn test:wrangler && yarn test:lambda && yarn test:lambda-edge",
23
- "lint": "eslint --ext js,ts src runtime_tests .eslintrc.cjs",
24
- "lint:fix": "eslint --ext js,ts src runtime_tests .eslintrc.cjs --fix",
23
+ "lint": "eslint --ext js,ts src runtime_tests",
24
+ "lint:fix": "eslint --ext js,ts src runtime_tests --fix",
25
25
  "format": "prettier --check 'src/**/*.{js,ts}' 'runtime_tests/**/*.{js,ts}'",
26
26
  "format:fix": "prettier --write 'src/**/*.{js,ts}' 'runtime_tests/**/*.{js,ts}'",
27
27
  "denoify": "rimraf deno_dist && denoify && rimraf 'deno_dist/**/*.test.{ts,tsx}'",
@@ -442,6 +442,7 @@
442
442
  ],
443
443
  "devDependencies": {
444
444
  "@cloudflare/workers-types": "^4.20221111.1",
445
+ "@hono/eslint-config": "^0.0.2",
445
446
  "@hono/node-server": "^1.0.2",
446
447
  "@types/crypto-js": "^4.1.1",
447
448
  "@types/glob": "^8.0.0",
@@ -450,21 +451,12 @@
450
451
  "@types/node": "^20.8.2",
451
452
  "@types/node-fetch": "^2.6.2",
452
453
  "@types/supertest": "^2.0.12",
453
- "@typescript-eslint/eslint-plugin": "^5.59.2",
454
- "@typescript-eslint/parser": "^5.59.2",
455
454
  "@vitest/coverage-v8": "^0.34.3",
456
455
  "arg": "^5.0.2",
457
456
  "crypto-js": "^4.1.1",
458
457
  "denoify": "^1.6.6",
459
458
  "esbuild": "^0.15.12",
460
- "eslint": "^8.39.0",
461
- "eslint-config-prettier": "^8.8.0",
462
- "eslint-define-config": "^1.20.0",
463
- "eslint-import-resolver-typescript": "^3.5.5",
464
- "eslint-plugin-eslint-comments": "^3.2.0",
465
- "eslint-plugin-flowtype": "^8.0.3",
466
- "eslint-plugin-import": "^2.27.5",
467
- "eslint-plugin-node": "^11.1.0",
459
+ "eslint": "^8.55.0",
468
460
  "form-data": "^4.0.0",
469
461
  "jest": "^29.6.4",
470
462
  "jest-preset-fastly-js-compute": "^1.3.0",
@@ -479,13 +471,12 @@
479
471
  "supertest": "^6.3.3",
480
472
  "ts-jest": "^29.1.1",
481
473
  "tsx": "^3.11.0",
482
- "typescript": "^4.8.3",
474
+ "typescript": "^5.3.3",
483
475
  "vitest": "^0.34.3",
484
476
  "wrangler": "^2.12.0",
485
477
  "zod": "^3.20.2"
486
478
  },
487
479
  "engines": {
488
480
  "node": ">=16.0.0"
489
- },
490
- "dependencies": {}
481
+ }
491
482
  }