import { Server, Subprocess } from "bun"; import { Logger } from "pino"; import { RadixRouter } from "radix3"; import { syncronize } from "y-pojo"; import type * as Y from "yjs"; import { PrismaClient } from "../../../app/db/db"; type SingleRoute = { url: string; args: string[]; fn: (...arg: any[]) => Promise; path: string; }; export const g = global as unknown as { status: "init" | "ready"; datadir: string; db: PrismaClient; dburl: string; mode: "dev" | "prod"; server: Server; log: Logger; api: Record; domains: null | Record; router: RadixRouter; port: number; frm: { js: string; etag: string; }; parcel: Subprocess; apiPrepared: boolean; Y: typeof Y; syncronize: typeof syncronize; };