UNPKG

@getcronit/pylon

Version:

![Pylon cover](https://github.com/user-attachments/assets/c28e49b2-5672-4849-826e-8b2eab0360cc)

25 lines (24 loc) 786 B
import { Context as HonoContext } from 'hono'; import type { Toucan } from 'toucan-js'; import type { AuthState } from './plugins/use-auth'; import { AsyncLocalStorage } from 'async_hooks'; import type { GraphQLResolveInfo } from 'graphql'; export interface Bindings { NODE_ENV: string; AUTH_PROJECT_ID?: string; AUTH_KEY?: string; AUTH_ISSUER?: string; } export interface Variables { auth: AuthState; sentry: Toucan; graphqlResolveInfo?: GraphQLResolveInfo; } export type Env = { Bindings: Bindings; Variables: Variables; }; export type Context = HonoContext<Env, string, {}>; export declare const asyncContext: AsyncLocalStorage<Context>; export declare const getContext: () => Context; export declare const setContext: (context: Context) => void;