diff --git a/src/middleware/combine/index.ts b/src/middleware/combine/index.ts index 0adfbf35..a0c10f7e 100644 --- a/src/middleware/combine/index.ts +++ b/src/middleware/combine/index.ts @@ -1,3 +1,8 @@ +/** + * @module + * Combine Middleware for Hono. + */ + import type { Context } from '../../context' import type { MiddlewareHandler, Next } from '../../types' import { TrieRouter } from '../../router/trie-router' @@ -18,8 +23,8 @@ type Condition = (c: Context) => boolean * * @example * ```ts - * import { some } from 'combine' - * import { bearerAuth } from 'bearer-auth' + * import { some } from 'hono/combine' + * import { bearerAuth } from 'hono/bearer-auth' * import { myRateLimit } from '@/rate-limit' * * // If client has a valid token, then skip rate limiting. @@ -67,8 +72,8 @@ export const some = (...middleware: (MiddlewareHandler | Condition)[]): Middlewa * * @example * ```ts - * import { some, every } from 'combine' - * import { bearerAuth } from 'bearer-auth' + * import { some, every } from 'hono/combine' + * import { bearerAuth } from 'hono/bearer-auth' * import { myCheckLocalNetwork } from '@/check-local-network' * import { myRateLimit } from '@/rate-limit' * @@ -110,8 +115,8 @@ export const every = (...middleware: (MiddlewareHandler | Condition)[]): Middlew * * @example * ```ts - * import { except } from 'combine' - * import { bearerAuth } from 'bearer-auth + * import { except } from 'hono/combine' + * import { bearerAuth } from 'hono/bearer-auth * * // If client is accessing public API, then skip authentication. * // Otherwise, require a valid token. diff --git a/src/middleware/ip-restriction/index.ts b/src/middleware/ip-restriction/index.ts index 0e311ce4..b17b2f41 100644 --- a/src/middleware/ip-restriction/index.ts +++ b/src/middleware/ip-restriction/index.ts @@ -1,5 +1,5 @@ /** - * Middleware for restrict IP Address + * IP Restriction Middleware for Hono * @module */ @@ -113,7 +113,7 @@ const buildMatcher = ( } /** - * Rules for IP Limit Middleware + * Rules for IP Restriction Middleware */ export interface IPRestrictionRules { denyList?: IPRestrictionRule[] @@ -121,7 +121,7 @@ export interface IPRestrictionRules { } /** - * IP Limit Middleware + * IP Restriction Middleware * * @param getIP function to get IP Address */