UNPKG

@backan/core

Version:

All in one web API builder. Create endpoints with type validations and OpenApi documentation, safely and quickly.

157 lines (105 loc) 4.1 kB
import { accepts } from 'hono/accepts'; import { appendTrailingSlash } from 'hono/trailing-slash'; import { bodyLimit } from 'hono/body-limit'; import { cache } from 'hono/cache'; import { compress } from 'hono/compress'; import { contextStorage } from 'hono/context-storage'; import { cors } from 'hono/cors'; import { hc as createClient } from 'hono/client'; import { csrf } from 'hono/csrf'; import { deleteCookie } from 'hono/cookie'; import { env } from 'hono/adapter'; import { etag } from 'hono/etag'; import { every } from 'hono/combine'; import { except } from 'hono/combine'; import { GetConnInfo } from 'hono/conninfo'; import { getContext } from 'hono/context-storage'; import { getCookie } from 'hono/cookie'; import { getRuntimeKey } from 'hono/adapter'; import { getSignedCookie } from 'hono/cookie'; import { HTTPException } from 'hono/http-exception'; import { ipRestriction } from 'hono/ip-restriction'; import { jwk } from 'hono/jwk'; import { jwt } from 'hono/jwt'; import { languageDetector } from 'hono/language'; import { logger } from 'hono/logger'; import { methodOverride } from 'hono/method-override'; import { poweredBy } from 'hono/powered-by'; import { prettyJSON } from 'hono/pretty-json'; import { proxy } from 'hono/proxy'; import { secureHeaders } from 'hono/secure-headers'; import { setCookie } from 'hono/cookie'; import { setSignedCookie } from 'hono/cookie'; import { some } from 'hono/combine'; import { stream } from 'hono/streaming'; import { streamSSE } from 'hono/streaming'; import { streamText } from 'hono/streaming'; import { swaggerUI } from '@hono/swagger-ui'; import { timeout } from 'hono/timeout'; import { trimTrailingSlash } from 'hono/trailing-slash'; import { z } from '@hono/zod-openapi'; export { accepts } export { appendTrailingSlash } export { bodyLimit } export { cache } export { compress } export { contextStorage } export { cors } export { createClient } export declare const createLiteralObjectValues: <T extends ObjectInput>(obj: T) => LiteralObjectValuesResponse<T>; export { csrf } export { deleteCookie } export { env } export { etag } export { every } export { except } export declare const getConnInfo: (type: "bun" | "deno" | "cf-workers" | "vercel") => Promise<GetConnInfo | undefined>; export { getContext } export { getCookie } export { getRuntimeKey } export { getSignedCookie } /** * Hooks the stdout and stderr streams to intercept their outputs. * @param callback - A function to be called with the intercepted output. * The callback receives four parameters: the output string, encoding, file descriptor, and a boolean indicating if it's stderr. * @returns {void} - A function to restore the original stdout and stderr behavior. */ declare const hookStdout: (callback: hookStdoutCallback) => () => void; declare type hookStdoutCallback = (string: string, encoding: BufferEncoding, isError: boolean, fd?: number) => void; export { HTTPException } export { ipRestriction } export { jwk } export { jwt } export { languageDetector } declare type LiteralObjectValue<T> = z.ZodLiteral<T[keyof T]>; declare type LiteralObjectValues<T> = [LiteralObjectValue<T>, ...LiteralObjectValue<T>[]]; declare type LiteralObjectValuesResponse<T> = z.ZodUnion<LiteralObjectValues<T>>; export { logger } export { methodOverride } declare type ObjectInput = { [key: string]: string | number; }; export { poweredBy } export { prettyJSON } export { proxy } export { secureHeaders } export { setCookie } export { setSignedCookie } export { some } export { stream } export { streamSSE } export { streamText } export { swaggerUI } export { timeout } export { trimTrailingSlash } declare namespace utils { export { hookStdout } } export { utils } export { z as Validate } export { z as validate } export * from "hono/factory"; export * from "hono/streaming"; export { }