UNPKG

@dudousxd/nestjs-telescope

Version:

Laravel Telescope-style observability console for NestJS — core: watchers, recorder, correlation, SQLite store, headless API.

31 lines 1.61 kB
import type { Entry, RecordInput } from '../entry/entry.js'; import type { Watcher } from '../nest/watcher.js'; import type { DashboardSpec, DataProvider, ExtensionContext, ExtensionEntryType, TelescopeExtension } from './types.js'; /** * Resolves the registered extensions once at module init. Each multi-hook runs for * every extension and the results accumulate; an id/name claimed twice is a hard * error naming both owners (mirrors nestjs-codegen's `mergeExclusive`). Resolution is * eager so collisions fail at boot, not on first request. */ export declare class ExtensionRegistry { private readonly _watchers; private readonly _entryTypes; private readonly _dashboards; private readonly _providers; /** Provider name → the `name` of the extension that contributed it. */ private readonly _providerOwners; private readonly _recordObservers; private readonly _flushObservers; constructor(extensions: readonly TelescopeExtension[], ctx: ExtensionContext); /** Fan out a recorded input to every observer; isolate throwers (hot path). */ notifyRecord(input: RecordInput): void; /** Await every flush observer; isolate throwers/rejections (off the host path). */ notifyFlush(entries: Entry[]): Promise<void>; watchers(): Watcher[]; entryTypes(): ExtensionEntryType[]; dashboards(): DashboardSpec[]; findProvider(name: string): DataProvider | undefined; /** The `name` of the extension that contributed the given provider, or undefined. */ providerOwner(name: string): string | undefined; } //# sourceMappingURL=registry.d.ts.map