/**
* @module
* Combine Middleware for Hono.
*/
import type { Context } from '../../context'
import type { MiddlewareHandler, Next } from '../../types'
import { TrieRouter } from '../../router/trie-router'
import { METHOD_NAME_ALL } from '../../router'
* @returns A composed middleware.
*
* @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.
* // Otherwise, apply rate limiting.
* @returns A composed middleware.
*
* @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'
*
* // If client is in local network, then skip authentication and rate limiting.
* @param middleware - A composed middleware
*
* @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.
* app.use('/api/*', except(