UNPKG

@dudousxd/nestjs-telescope

Version:

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

24 lines 1.13 kB
/** * Build a stable route family from a request method + url, suitable as both a * `familyHash` group key and a human label. Strips the query string, then * replaces id-like segments (UUID / all-digits / long hex) with `:id`. * * @example * normalizeRoute('GET', '/api/base/3c07e056-08bf-4dcb-ae21-9d426fb204df/mel/focus/123') * // => 'GET /api/base/:id/mel/focus/:id' */ export declare function normalizeRoute(method: string, url: string): string; /** * Build a stable family for an OUTGOING HTTP call from a method + (possibly * absolute) url. Keeps the host and normalizes the path's id-like segments, so * calls to the same external endpoint group together regardless of ids: * * @example * normalizeHttpTarget('GET', 'https://api.stripe.com/v1/charges/ch_123?foo=1') * // => 'GET api.stripe.com/v1/charges/:id' * * Falls back to {@link normalizeRoute} over the raw url when it can't be parsed * as absolute (e.g. a relative target), so a family is always produced. */ export declare function normalizeHttpTarget(method: string, url: string): string; //# sourceMappingURL=normalize-route.d.ts.map