@samveys/inspector
Merekam request, query, job, mail dan exception saat development
Daftar ini dibaca dari versi 1.0.2; jalankan pnpm sync untuk memperbaruinya.
import { createInspector, inspector } from '@samveys/inspector'
Fungsi (2)
createInspector
Fungsi
The `'inspector'` binding: `record()` lets other packages add entries (mail, jobs).
function createInspector(limit?: number): {
Diekspor dari packages/inspector/src/inspector.ts
inspector
Fungsi
Development inspector. Outside `local`, `/_inspector` is a 404 unless `gate` allows.
function inspector(options?: InspectorOptions): import("@samveys/core").Plugin<InspectorOptions>;
Diekspor dari packages/inspector/src/inspector.ts
Interface (2)
InspectorEntry
Interface
Tidak ada komentar dokumentasi.
interface InspectorEntry {
readonly id: string;
readonly type: EntryType;
readonly at: number;
/** Request id of the request that produced it, when there is one. */
readonly requestId: string | undefined;
readonly data: Readonly<Record<string, unknown>>;
}
Diekspor dari packages/inspector/src/inspector.ts
InspectorOptions
Interface
Tidak ada komentar dokumentasi.
interface InspectorOptions {
/** Entries kept in memory (ring buffer). Default 1000. */
readonly limit?: number;
/** Default `/_inspector`. */
readonly path?: string;
/** Outside `local` the dashboard answers only when this returns true; otherwise 404. */
readonly gate?: (ctx: HttpContext) => boolean | Promise<boolean>;
Diekspor dari packages/inspector/src/inspector.ts
Tipe (2)
EntryType
Tipe
Tidak ada komentar dokumentasi.
type EntryType = 'request' | 'query' | 'exception' | 'job' | 'mail' | 'log' | (string & {});
Diekspor dari packages/inspector/src/inspector.ts
Inspector
Tipe
Tidak ada komentar dokumentasi.
type Inspector = ReturnType<typeof createInspector>;
Diekspor dari packages/inspector/src/inspector.ts