nestlens 0.10.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api/api.controller.d.ts +52 -27
- package/dist/api/api.controller.js +122 -153
- package/dist/api/api.guard.d.ts +46 -4
- package/dist/api/api.guard.js +145 -42
- package/dist/api/constants/error-codes.d.ts +2 -0
- package/dist/api/constants/error-codes.js +7 -0
- package/dist/api/dashboard-server.js +16 -9
- package/dist/api/dashboard.controller.js +12 -1
- package/dist/api/dto/cursor-query.dto.d.ts +23 -0
- package/dist/api/dto/cursor-query.dto.js +37 -22
- package/dist/api/dto/entries-query.dto.d.ts +57 -0
- package/dist/api/dto/entries-query.dto.js +140 -0
- package/dist/api/dto/entry-types.d.ts +9 -0
- package/dist/api/dto/entry-types.js +31 -0
- package/dist/api/dto/index.d.ts +2 -0
- package/dist/api/dto/index.js +2 -0
- package/dist/api/dto/tags.dto.d.ts +22 -0
- package/dist/api/dto/tags.dto.js +47 -4
- package/dist/api/dto/transformers/query-transformers.d.ts +38 -1
- package/dist/api/dto/transformers/query-transformers.js +55 -4
- package/dist/api/filters/api-exception.filter.d.ts +11 -0
- package/dist/api/filters/api-exception.filter.js +30 -3
- package/dist/api/pipes/nestlens-validation.pipe.js +12 -0
- package/dist/api/route-path.d.ts +7 -4
- package/dist/api/route-path.js +50 -6
- package/dist/api/tag.controller.d.ts +2 -2
- package/dist/api/tag.controller.js +5 -11
- package/dist/core/alerting.service.d.ts +21 -0
- package/dist/core/alerting.service.js +71 -2
- package/dist/core/client-ip.d.ts +40 -0
- package/dist/core/client-ip.js +58 -0
- package/dist/core/collector.service.d.ts +53 -0
- package/dist/core/collector.service.js +154 -7
- package/dist/core/data-masker.service.d.ts +109 -0
- package/dist/core/data-masker.service.js +397 -38
- package/dist/core/family-hash.service.d.ts +0 -6
- package/dist/core/family-hash.service.js +37 -6
- package/dist/core/masking-terms.d.ts +4 -2
- package/dist/core/pruning.service.d.ts +48 -1
- package/dist/core/pruning.service.js +78 -16
- package/dist/core/safe-assign.d.ts +33 -0
- package/dist/core/safe-assign.js +47 -0
- package/dist/core/storage/entry-filter.d.ts +10 -0
- package/dist/core/storage/entry-filter.js +135 -15
- package/dist/core/storage/memory.storage.d.ts +12 -0
- package/dist/core/storage/memory.storage.js +49 -4
- package/dist/core/storage/redis.storage.d.ts +191 -2
- package/dist/core/storage/redis.storage.js +673 -169
- package/dist/core/storage/serialize-payload.d.ts +17 -0
- package/dist/core/storage/serialize-payload.js +30 -0
- package/dist/core/storage/sqlite.storage.d.ts +117 -8
- package/dist/core/storage/sqlite.storage.js +330 -61
- package/dist/core/storage/storage.factory.d.ts +13 -0
- package/dist/core/storage/storage.factory.js +32 -4
- package/dist/core/storage/tag-normalization.d.ts +30 -0
- package/dist/core/storage/tag-normalization.js +32 -1
- package/dist/core/tag.service.js +24 -6
- package/dist/core/thenable.d.ts +30 -0
- package/dist/core/thenable.js +35 -0
- package/dist/dashboard/public/assets/BatchDetailView-Kz8lmg7b.js +1 -0
- package/dist/dashboard/public/assets/BatchesPage-DFiQiYm9.js +1 -0
- package/dist/dashboard/public/assets/{CacheDetailView-BDg0OXAi.js → CacheDetailView-gWQ36gpT.js} +1 -1
- package/dist/dashboard/public/assets/CachePage-CcP5UUIo.js +1 -0
- package/dist/dashboard/public/assets/CommandDetailView-tLDOIYKo.js +1 -0
- package/dist/dashboard/public/assets/CommandsPage-x_pU8uSm.js +1 -0
- package/dist/dashboard/public/assets/{CopyButton-oI0f2BPa.js → CopyButton-Dp88z3zD.js} +1 -1
- package/dist/dashboard/public/assets/DashboardPage-CHgsQI3w.js +21 -0
- package/dist/dashboard/public/assets/DataTable-CiPeRzYj.js +53 -0
- package/dist/dashboard/public/assets/DetailRow-ZFijkJy9.js +1 -0
- package/dist/dashboard/public/assets/{DumpDetailView-c1-zovWx.js → DumpDetailView-BQ_0UMzI.js} +1 -1
- package/dist/dashboard/public/assets/DumpsPage-D0o-EOvX.js +1 -0
- package/dist/dashboard/public/assets/EntryDetailPage-BhGVuHY8.js +27 -0
- package/dist/dashboard/public/assets/{EntrySearchInput-ZRceRlzI.js → EntrySearchInput-BhuYJjcJ.js} +1 -1
- package/dist/dashboard/public/assets/EventDetailView-CqB1VO-o.js +1 -0
- package/dist/dashboard/public/assets/EventsPage-BWvlMQOM.js +1 -0
- package/dist/dashboard/public/assets/{ExceptionDetailView-BguHjEHJ.js → ExceptionDetailView-BrwzI-Ny.js} +1 -1
- package/dist/dashboard/public/assets/ExceptionsPage-7wZOjI4L.js +6 -0
- package/dist/dashboard/public/assets/{GateDetailView-NwkvH8ib.js → GateDetailView-DETgnBEJ.js} +1 -1
- package/dist/dashboard/public/assets/GatesPage-Biem1pTa.js +1 -0
- package/dist/dashboard/public/assets/GraphQLDetailView-Z2P5Z_wK.js +6 -0
- package/dist/dashboard/public/assets/GraphQLPage-D7IVeu7T.js +6 -0
- package/dist/dashboard/public/assets/HttpClientDetailView-DjgiZtq7.js +1 -0
- package/dist/dashboard/public/assets/HttpClientPage-D-9rOwxW.js +1 -0
- package/dist/dashboard/public/assets/{JobDetailView-Do3XVw-b.js → JobDetailView-DVKXNyhm.js} +1 -1
- package/dist/dashboard/public/assets/JobsPage-DudumyIp.js +1 -0
- package/dist/dashboard/public/assets/LogDetailView-Cdwx8HAo.js +1 -0
- package/dist/dashboard/public/assets/LogsPage-DWkRIHul.js +1 -0
- package/dist/dashboard/public/assets/{MailDetailView-FNWdO4I6.js → MailDetailView-5VJ2aebx.js} +4 -4
- package/dist/dashboard/public/assets/MailPage-ClZNTH_r.js +1 -0
- package/dist/dashboard/public/assets/ModelDetailView-Btpt8H6c.js +1 -0
- package/dist/dashboard/public/assets/ModelsPage-PxJ57v2N.js +1 -0
- package/dist/dashboard/public/assets/NotificationDetailView-84rPC1SX.js +1 -0
- package/dist/dashboard/public/assets/NotificationsPage-qNuVSo-j.js +1 -0
- package/dist/dashboard/public/assets/PageHeader-BlZTS6Mp.js +1 -0
- package/dist/dashboard/public/assets/QueriesPage-BY0lUO0g.js +1 -0
- package/dist/dashboard/public/assets/{QueryDetailView-58AnmJUd.js → QueryDetailView-CIJHScnv.js} +1 -1
- package/dist/dashboard/public/assets/RedisDetailView-C2MB0DYY.js +1 -0
- package/dist/dashboard/public/assets/RedisPage-C0MTmo7p.js +1 -0
- package/dist/dashboard/public/assets/RequestDetailView-w80IdX1R.js +1 -0
- package/dist/dashboard/public/assets/RequestsPage-DDoBHD10.js +1 -0
- package/dist/dashboard/public/assets/ScheduleDetailView-DJyMNKdl.js +1 -0
- package/dist/dashboard/public/assets/SchedulePage-D3Y5zH7a.js +1 -0
- package/dist/dashboard/public/assets/UserCard-DWitStWv.js +1 -0
- package/dist/dashboard/public/assets/ViewDetailView-DVM9EkE8.js +1 -0
- package/dist/dashboard/public/assets/ViewsPage-CvOj7zwQ.js +1 -0
- package/dist/dashboard/public/assets/{calendar-iGz7imq4.js → calendar-DSvr3OS6.js} +1 -1
- package/dist/dashboard/public/assets/{circle-alert-BRXuJPBy.js → circle-alert-sFDCyGtd.js} +1 -1
- package/dist/dashboard/public/assets/{circle-check-big-DVxhxYns.js → circle-check-big-1nqSueTn.js} +1 -1
- package/dist/dashboard/public/assets/{circle-x-v0VbdG9M.js → circle-x-DuabRgyL.js} +1 -1
- package/dist/dashboard/public/assets/{badgeColors-DQ_P_DOX.js → date-Dwgqy666.js} +1 -1
- package/dist/dashboard/public/assets/{eye-DcMaRsYF.js → eye-Bx7jqdVx.js} +1 -1
- package/dist/dashboard/public/assets/index-C256oDAK.css +1 -0
- package/dist/dashboard/public/assets/index-QEFm0Hwa.js +361 -0
- package/dist/dashboard/public/assets/{search-BERxF7dG.js → search-CzOe6pQ2.js} +1 -1
- package/dist/dashboard/public/assets/{send-IiapMYKZ.js → send-CQVyUZLn.js} +1 -1
- package/dist/dashboard/public/assets/{timer-2vIduyIC.js → timer-Wzp2Wnna.js} +1 -1
- package/dist/dashboard/public/assets/types-Dd6NUxj7.js +1 -0
- package/dist/dashboard/public/assets/{users-BlF2EBBP.js → users-64hxmfDp.js} +1 -1
- package/dist/dashboard/public/assets/{zap-CEj-5YGt.js → zap-DvUE0l48.js} +1 -1
- package/dist/dashboard/public/index.html +2 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +58 -22
- package/dist/nestlens.config.d.ts +42 -2
- package/dist/nestlens.config.js +8 -3
- package/dist/nestlens.module.d.ts +10 -0
- package/dist/nestlens.module.js +39 -1
- package/dist/types/entry.types.d.ts +32 -11
- package/dist/types/graphql.types.d.ts +18 -1
- package/dist/types/graphql.types.js +19 -0
- package/dist/types/tag.types.d.ts +0 -16
- package/dist/watchers/batch.watcher.d.ts +4 -5
- package/dist/watchers/batch.watcher.js +18 -45
- package/dist/watchers/cache.watcher.js +2 -14
- package/dist/watchers/capture-payload.d.ts +21 -0
- package/dist/watchers/capture-payload.js +34 -0
- package/dist/watchers/command.watcher.d.ts +0 -1
- package/dist/watchers/command.watcher.js +3 -19
- package/dist/watchers/dump.watcher.d.ts +4 -3
- package/dist/watchers/dump.watcher.js +14 -33
- package/dist/watchers/event.watcher.d.ts +14 -2
- package/dist/watchers/event.watcher.js +22 -16
- package/dist/watchers/exception.watcher.d.ts +41 -4
- package/dist/watchers/exception.watcher.js +59 -19
- package/dist/watchers/gate.watcher.d.ts +12 -4
- package/dist/watchers/gate.watcher.js +21 -32
- package/dist/watchers/graphql/adapters/apollo.adapter.d.ts +18 -0
- package/dist/watchers/graphql/adapters/apollo.adapter.js +292 -181
- package/dist/watchers/graphql/adapters/base.adapter.d.ts +45 -0
- package/dist/watchers/graphql/adapters/base.adapter.js +67 -38
- package/dist/watchers/graphql/adapters/mercurius.adapter.d.ts +56 -34
- package/dist/watchers/graphql/adapters/mercurius.adapter.js +126 -26
- package/dist/watchers/graphql/field-instrumentation.d.ts +15 -0
- package/dist/watchers/graphql/field-instrumentation.js +127 -0
- package/dist/watchers/graphql/graphql.watcher.d.ts +52 -15
- package/dist/watchers/graphql/graphql.watcher.js +107 -46
- package/dist/watchers/graphql/index.d.ts +8 -8
- package/dist/watchers/graphql/index.js +4 -22
- package/dist/watchers/graphql/never-breaks-the-response.d.ts +20 -0
- package/dist/watchers/graphql/never-breaks-the-response.js +83 -0
- package/dist/watchers/graphql/subscription/connection.store.d.ts +6 -12
- package/dist/watchers/graphql/subscription/connection.store.js +9 -28
- package/dist/watchers/graphql/subscription/index.d.ts +1 -1
- package/dist/watchers/graphql/subscription/index.js +1 -1
- package/dist/watchers/graphql/subscription/schema-instrumentation.d.ts +6 -0
- package/dist/watchers/graphql/subscription/schema-instrumentation.js +227 -0
- package/dist/watchers/graphql/subscription/subscription.tracker.d.ts +0 -1
- package/dist/watchers/graphql/subscription/subscription.tracker.js +25 -23
- package/dist/watchers/graphql/types.d.ts +12 -1
- package/dist/watchers/graphql/types.js +8 -1
- package/dist/watchers/graphql/utils/depth-calculator.d.ts +0 -13
- package/dist/watchers/graphql/utils/depth-calculator.js +0 -87
- package/dist/watchers/graphql/utils/field-tracer.d.ts +0 -50
- package/dist/watchers/graphql/utils/field-tracer.js +6 -90
- package/dist/watchers/graphql/utils/n1-detector.d.ts +14 -35
- package/dist/watchers/graphql/utils/n1-detector.js +14 -72
- package/dist/watchers/graphql/utils/query-parser.d.ts +60 -15
- package/dist/watchers/graphql/utils/query-parser.js +209 -50
- package/dist/watchers/graphql/utils/variable-sanitizer.d.ts +0 -7
- package/dist/watchers/graphql/utils/variable-sanitizer.js +27 -17
- package/dist/watchers/http-client.watcher.d.ts +29 -2
- package/dist/watchers/http-client.watcher.js +69 -43
- package/dist/watchers/job.watcher.d.ts +48 -4
- package/dist/watchers/job.watcher.js +90 -52
- package/dist/watchers/log.watcher.d.ts +20 -0
- package/dist/watchers/log.watcher.js +33 -1
- package/dist/watchers/mail.watcher.d.ts +21 -1
- package/dist/watchers/mail.watcher.js +59 -44
- package/dist/watchers/model.watcher.d.ts +90 -7
- package/dist/watchers/model.watcher.js +205 -185
- package/dist/watchers/notification.watcher.js +14 -33
- package/dist/watchers/query/query.watcher.d.ts +25 -0
- package/dist/watchers/query/query.watcher.js +79 -11
- package/dist/watchers/query/types.d.ts +0 -1
- package/dist/watchers/query/types.js +0 -13
- package/dist/watchers/redis.watcher.d.ts +8 -0
- package/dist/watchers/redis.watcher.js +26 -46
- package/dist/watchers/request.watcher.d.ts +8 -0
- package/dist/watchers/request.watcher.js +28 -23
- package/dist/watchers/schedule.watcher.d.ts +68 -5
- package/dist/watchers/schedule.watcher.js +218 -46
- package/dist/watchers/thrown-value.d.ts +33 -0
- package/dist/watchers/thrown-value.js +89 -0
- package/dist/watchers/view.watcher.d.ts +26 -3
- package/dist/watchers/view.watcher.js +35 -28
- package/dist/watchers/watcher-config.d.ts +5 -3
- package/dist/watchers/watcher-config.js +5 -3
- package/dist/watchers/wrap-method.d.ts +36 -0
- package/dist/watchers/wrap-method.js +135 -0
- package/package.json +11 -1
- package/dist/dashboard/public/assets/BatchDetailView-BA_QXL7a.js +0 -1
- package/dist/dashboard/public/assets/BatchesPage-D4oKMowE.js +0 -1
- package/dist/dashboard/public/assets/CachePage-BZKgOAHR.js +0 -1
- package/dist/dashboard/public/assets/CommandDetailView-CbQKT7r5.js +0 -1
- package/dist/dashboard/public/assets/CommandsPage-BhYsUquS.js +0 -1
- package/dist/dashboard/public/assets/DashboardPage-w7CPjb-N.js +0 -16
- package/dist/dashboard/public/assets/DataTable-D39w-diZ.js +0 -53
- package/dist/dashboard/public/assets/DetailRow-BaSzSd02.js +0 -1
- package/dist/dashboard/public/assets/DumpsPage-94vKqo6p.js +0 -1
- package/dist/dashboard/public/assets/EntryDetailPage-CVC4IBjE.js +0 -27
- package/dist/dashboard/public/assets/EventDetailView-lK4heuew.js +0 -1
- package/dist/dashboard/public/assets/EventsPage-MzZxRRE9.js +0 -1
- package/dist/dashboard/public/assets/ExceptionsPage-DHGFjUxu.js +0 -6
- package/dist/dashboard/public/assets/GatesPage-D9K4YB2k.js +0 -1
- package/dist/dashboard/public/assets/GraphQLDetailView-PkcaoZ15.js +0 -6
- package/dist/dashboard/public/assets/GraphQLPage-C0vODDMm.js +0 -6
- package/dist/dashboard/public/assets/HttpClientDetailView-N79x9PvH.js +0 -1
- package/dist/dashboard/public/assets/HttpClientPage-C4uuDTkf.js +0 -1
- package/dist/dashboard/public/assets/JobsPage-Clr2WV32.js +0 -1
- package/dist/dashboard/public/assets/LogDetailView-pxP_iVYL.js +0 -1
- package/dist/dashboard/public/assets/LogsPage-CsuPichq.js +0 -1
- package/dist/dashboard/public/assets/MailPage-B7i0Esr8.js +0 -1
- package/dist/dashboard/public/assets/ModelDetailView-LhtccX11.js +0 -1
- package/dist/dashboard/public/assets/ModelsPage-Dob5tidP.js +0 -1
- package/dist/dashboard/public/assets/NotificationDetailView-RxHmfj-e.js +0 -1
- package/dist/dashboard/public/assets/NotificationsPage-C-HehjQ8.js +0 -1
- package/dist/dashboard/public/assets/PageHeader-BNjXB_Ja.js +0 -1
- package/dist/dashboard/public/assets/QueriesPage-DiA6xvVI.js +0 -1
- package/dist/dashboard/public/assets/RedisDetailView-B1CVesM0.js +0 -1
- package/dist/dashboard/public/assets/RedisPage-DQz69JsJ.js +0 -1
- package/dist/dashboard/public/assets/RequestDetailView-BlOK9Jv_.js +0 -1
- package/dist/dashboard/public/assets/RequestsPage-KWb78XZC.js +0 -1
- package/dist/dashboard/public/assets/ScheduleDetailView-GkR80TZl.js +0 -1
- package/dist/dashboard/public/assets/SchedulePage-GRqVQK96.js +0 -1
- package/dist/dashboard/public/assets/UserCard-BuRugclY.js +0 -1
- package/dist/dashboard/public/assets/ViewDetailView-Df4tzNxi.js +0 -1
- package/dist/dashboard/public/assets/ViewsPage-B3VLpJgd.js +0 -1
- package/dist/dashboard/public/assets/index-B9BCPNKv.css +0 -1
- package/dist/dashboard/public/assets/index-w_yLpa1c.js +0 -361
- package/dist/dashboard/public/assets/types-BblOEq1q.js +0 -1
- package/dist/watchers/graphql/subscription/ws-gateway.d.ts +0 -120
- package/dist/watchers/graphql/subscription/ws-gateway.js +0 -255
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ Watch requests, queries, and exceptions as they happen. No more console.log debu
|
|
|
54
54
|
|
|
55
55
|
### ✨ Zero Configuration
|
|
56
56
|
|
|
57
|
-
Import and go. Works with Express & Fastify.
|
|
57
|
+
Import and go. Works with Express & Fastify. Finds your TypeORM queries, GraphQL server and scheduled tasks on its own; Prisma, Bull and the rest take one line each.
|
|
58
58
|
|
|
59
59
|
</td>
|
|
60
60
|
<td width="33%" valign="top">
|
|
@@ -2,8 +2,8 @@ import { StorageInterface } from '../core';
|
|
|
2
2
|
import { PruningService } from '../core';
|
|
3
3
|
import { CollectorService } from '../core';
|
|
4
4
|
import { NestLensConfig } from '../nestlens.config';
|
|
5
|
-
import {
|
|
6
|
-
import { CursorQueryDto, PauseRecordingDto } from './dto';
|
|
5
|
+
import { CursorPaginatedResponse, Entry } from '../types';
|
|
6
|
+
import { CheckNewQueryDto, CursorQueryDto, EntriesQueryDto, LatestSequenceQueryDto, LogsQueryDto, PauseRecordingDto, QueriesQueryDto } from './dto';
|
|
7
7
|
/**
|
|
8
8
|
* Every handler here takes an unused `@Res() _res` parameter. It is not a
|
|
9
9
|
* mistake and the value is never touched: its presence is how a handler tells
|
|
@@ -20,18 +20,8 @@ export declare class NestLensApiController {
|
|
|
20
20
|
private readonly config;
|
|
21
21
|
private readonly pruningService;
|
|
22
22
|
private readonly collectorService;
|
|
23
|
-
private lastPruneRun;
|
|
24
|
-
private nextPruneRun;
|
|
25
|
-
/**
|
|
26
|
-
* Safely parse and bound pagination limit
|
|
27
|
-
*/
|
|
28
|
-
private parseLimit;
|
|
29
|
-
/**
|
|
30
|
-
* Safely parse pagination offset
|
|
31
|
-
*/
|
|
32
|
-
private parseOffset;
|
|
33
23
|
constructor(storage: StorageInterface, config: NestLensConfig, pruningService: PruningService, collectorService: CollectorService);
|
|
34
|
-
getEntries(
|
|
24
|
+
getEntries(query: EntriesQueryDto, _res?: unknown): Promise<{
|
|
35
25
|
data: Entry[];
|
|
36
26
|
meta: {
|
|
37
27
|
total: number;
|
|
@@ -39,16 +29,36 @@ export declare class NestLensApiController {
|
|
|
39
29
|
offset: number;
|
|
40
30
|
};
|
|
41
31
|
}>;
|
|
32
|
+
/**
|
|
33
|
+
* A page of one type, narrowed by a filter the storage applies.
|
|
34
|
+
*
|
|
35
|
+
* `logs` and `queries` used to read a page and then filter what came back,
|
|
36
|
+
* which chooses the matches out of the newest fifty rather than the newest
|
|
37
|
+
* fifty matches. On 5,005 logs whose five errors were the oldest,
|
|
38
|
+
* `?level=error` returned nothing at all and reported a total of 5,005 —
|
|
39
|
+
* a hundred pages to click through to reach the first match.
|
|
40
|
+
*
|
|
41
|
+
* `findWithCursor` applies filters before it chooses a page, in every
|
|
42
|
+
* backend, and counts what matches. Offset paging on top of it asks for
|
|
43
|
+
* `offset + limit` matches and drops the ones already shown, which is what
|
|
44
|
+
* an offset costs anywhere.
|
|
45
|
+
*
|
|
46
|
+
* Every list endpoint goes through here now. `entries`, `requests` and
|
|
47
|
+
* `exceptions` used `find`, which takes no filters at all, so they accepted
|
|
48
|
+
* `minDuration` and ignored it — the same silence, one path over. Two ways
|
|
49
|
+
* to answer the same question is how the two came to disagree.
|
|
50
|
+
*/
|
|
51
|
+
private filteredPage;
|
|
42
52
|
/**
|
|
43
53
|
* Cursor-based pagination with comprehensive filtering
|
|
44
54
|
* Uses CursorQueryDto to validate and transform all query parameters
|
|
45
55
|
* NOTE: Must come BEFORE @Get('entries/:id') to avoid route conflicts
|
|
46
56
|
*/
|
|
47
57
|
getEntriesWithCursor(query: CursorQueryDto, _res?: unknown): Promise<CursorPaginatedResponse<Entry>>;
|
|
48
|
-
getLatestSequence(
|
|
58
|
+
getLatestSequence(query: LatestSequenceQueryDto, _res?: unknown): Promise<{
|
|
49
59
|
data: number | null;
|
|
50
60
|
}>;
|
|
51
|
-
checkNewEntries(
|
|
61
|
+
checkNewEntries(query: CheckNewQueryDto, _res?: unknown): Promise<{
|
|
52
62
|
data: {
|
|
53
63
|
count: number;
|
|
54
64
|
hasNew: boolean;
|
|
@@ -58,7 +68,7 @@ export declare class NestLensApiController {
|
|
|
58
68
|
* Get entries grouped by family hash
|
|
59
69
|
* NOTE: Must come BEFORE @Get('entries/:id') to avoid route conflict
|
|
60
70
|
*/
|
|
61
|
-
getGroupedEntries(
|
|
71
|
+
getGroupedEntries(query: EntriesQueryDto, _res?: unknown): Promise<{
|
|
62
72
|
data: {
|
|
63
73
|
familyHash: string;
|
|
64
74
|
count: number;
|
|
@@ -69,7 +79,7 @@ export declare class NestLensApiController {
|
|
|
69
79
|
* Get all entries with the same family hash
|
|
70
80
|
* NOTE: Must come BEFORE @Get('entries/:id') to avoid route conflict
|
|
71
81
|
*/
|
|
72
|
-
getEntriesByFamilyHash(hash: string,
|
|
82
|
+
getEntriesByFamilyHash(hash: string, query: EntriesQueryDto, _res?: unknown): Promise<{
|
|
73
83
|
data: Entry[];
|
|
74
84
|
}>;
|
|
75
85
|
getEntry(id: number, _res?: unknown): Promise<{
|
|
@@ -82,7 +92,7 @@ export declare class NestLensApiController {
|
|
|
82
92
|
getStats(_res?: unknown): Promise<{
|
|
83
93
|
data: import("../types").EntryStats;
|
|
84
94
|
}>;
|
|
85
|
-
getRequests(
|
|
95
|
+
getRequests(query: EntriesQueryDto, _res?: unknown): Promise<{
|
|
86
96
|
data: Entry[];
|
|
87
97
|
meta: {
|
|
88
98
|
total: number;
|
|
@@ -90,7 +100,7 @@ export declare class NestLensApiController {
|
|
|
90
100
|
offset: number;
|
|
91
101
|
};
|
|
92
102
|
}>;
|
|
93
|
-
getQueries(
|
|
103
|
+
getQueries(query: QueriesQueryDto, _res?: unknown): Promise<{
|
|
94
104
|
data: Entry[];
|
|
95
105
|
meta: {
|
|
96
106
|
total: number;
|
|
@@ -98,7 +108,7 @@ export declare class NestLensApiController {
|
|
|
98
108
|
offset: number;
|
|
99
109
|
};
|
|
100
110
|
}>;
|
|
101
|
-
getExceptions(
|
|
111
|
+
getExceptions(query: EntriesQueryDto, _res?: unknown): Promise<{
|
|
102
112
|
data: Entry[];
|
|
103
113
|
meta: {
|
|
104
114
|
total: number;
|
|
@@ -106,7 +116,7 @@ export declare class NestLensApiController {
|
|
|
106
116
|
offset: number;
|
|
107
117
|
};
|
|
108
118
|
}>;
|
|
109
|
-
getLogs(
|
|
119
|
+
getLogs(query: LogsQueryDto, _res?: unknown): Promise<{
|
|
110
120
|
data: Entry[];
|
|
111
121
|
meta: {
|
|
112
122
|
total: number;
|
|
@@ -136,12 +146,20 @@ export declare class NestLensApiController {
|
|
|
136
146
|
databaseSize: number | undefined;
|
|
137
147
|
};
|
|
138
148
|
}>;
|
|
149
|
+
/**
|
|
150
|
+
* Prunes now, by the same rules as the timer.
|
|
151
|
+
*
|
|
152
|
+
* This used to compute its own window from `config.pruning.maxAge`, which
|
|
153
|
+
* the service refuses to take at face value: `maxAge: 0` is ignored there
|
|
154
|
+
* and was honoured here, so pressing *Run pruning* with it set deleted every
|
|
155
|
+
* entry the application had recorded.
|
|
156
|
+
*/
|
|
139
157
|
runPruning(_res?: unknown): Promise<{
|
|
140
158
|
success: boolean;
|
|
141
159
|
data: {
|
|
142
160
|
deleted: number;
|
|
143
|
-
lastRun: string;
|
|
144
|
-
nextRun: string;
|
|
161
|
+
lastRun: string | null;
|
|
162
|
+
nextRun: string | null;
|
|
145
163
|
};
|
|
146
164
|
}>;
|
|
147
165
|
clearEntries(_res?: unknown): Promise<{
|
|
@@ -149,19 +167,26 @@ export declare class NestLensApiController {
|
|
|
149
167
|
message: string;
|
|
150
168
|
}>;
|
|
151
169
|
/**
|
|
152
|
-
* Mark an entry (exception) as resolved
|
|
170
|
+
* Mark an entry (exception) as resolved.
|
|
171
|
+
*
|
|
172
|
+
* An entry that is not there answers 404 rather than `success: true` with
|
|
173
|
+
* nothing attached. Both are reachable while a page is open — pruning
|
|
174
|
+
* deletes by age, the store evicts by size — and the dashboard applied what
|
|
175
|
+
* came back to the row it clicked, so `null` reached a list update and
|
|
176
|
+
* failed there instead, with a message about a property of null.
|
|
153
177
|
*/
|
|
154
178
|
resolveEntry(id: number, _res?: unknown): Promise<{
|
|
155
179
|
success: boolean;
|
|
156
|
-
data: Entry
|
|
180
|
+
data: Entry;
|
|
157
181
|
}>;
|
|
158
182
|
/**
|
|
159
|
-
* Mark an entry as unresolved
|
|
183
|
+
* Mark an entry as unresolved. See {@link resolveEntry} for the 404.
|
|
160
184
|
*/
|
|
161
185
|
unresolveEntry(id: number, _res?: unknown): Promise<{
|
|
162
186
|
success: boolean;
|
|
163
|
-
data: Entry
|
|
187
|
+
data: Entry;
|
|
164
188
|
}>;
|
|
189
|
+
private entryOr404;
|
|
165
190
|
/**
|
|
166
191
|
* Pause recording
|
|
167
192
|
*/
|
|
@@ -36,56 +36,54 @@ const exceptions_1 = require("../api/exceptions");
|
|
|
36
36
|
* envelope shape lives in one place — the interceptor.
|
|
37
37
|
*/
|
|
38
38
|
let NestLensApiController = class NestLensApiController {
|
|
39
|
-
/**
|
|
40
|
-
* Safely parse and bound pagination limit
|
|
41
|
-
*/
|
|
42
|
-
parseLimit(limit) {
|
|
43
|
-
if (!limit)
|
|
44
|
-
return dto_1.DEFAULT_LIMIT;
|
|
45
|
-
const parsed = parseInt(limit, 10);
|
|
46
|
-
if (isNaN(parsed) || parsed < 1)
|
|
47
|
-
return dto_1.DEFAULT_LIMIT;
|
|
48
|
-
return Math.min(parsed, dto_1.MAX_LIMIT);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Safely parse pagination offset
|
|
52
|
-
*/
|
|
53
|
-
parseOffset(offset) {
|
|
54
|
-
if (!offset)
|
|
55
|
-
return 0;
|
|
56
|
-
const parsed = parseInt(offset, 10);
|
|
57
|
-
return isNaN(parsed) || parsed < 0 ? 0 : parsed;
|
|
58
|
-
}
|
|
59
39
|
constructor(storage, config, pruningService, collectorService) {
|
|
60
40
|
this.storage = storage;
|
|
61
41
|
this.config = config;
|
|
62
42
|
this.pruningService = pruningService;
|
|
63
43
|
this.collectorService = collectorService;
|
|
64
|
-
this.lastPruneRun = null;
|
|
65
|
-
this.nextPruneRun = null;
|
|
66
|
-
// Calculate next prune run
|
|
67
|
-
const intervalMinutes = this.config.pruning?.interval ?? 60;
|
|
68
|
-
this.nextPruneRun = new Date(Date.now() + intervalMinutes * 60 * 1000);
|
|
69
44
|
}
|
|
70
|
-
async getEntries(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
45
|
+
async getEntries(query, _res) {
|
|
46
|
+
return this.filteredPage(query.type, query);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A page of one type, narrowed by a filter the storage applies.
|
|
50
|
+
*
|
|
51
|
+
* `logs` and `queries` used to read a page and then filter what came back,
|
|
52
|
+
* which chooses the matches out of the newest fifty rather than the newest
|
|
53
|
+
* fifty matches. On 5,005 logs whose five errors were the oldest,
|
|
54
|
+
* `?level=error` returned nothing at all and reported a total of 5,005 —
|
|
55
|
+
* a hundred pages to click through to reach the first match.
|
|
56
|
+
*
|
|
57
|
+
* `findWithCursor` applies filters before it chooses a page, in every
|
|
58
|
+
* backend, and counts what matches. Offset paging on top of it asks for
|
|
59
|
+
* `offset + limit` matches and drops the ones already shown, which is what
|
|
60
|
+
* an offset costs anywhere.
|
|
61
|
+
*
|
|
62
|
+
* Every list endpoint goes through here now. `entries`, `requests` and
|
|
63
|
+
* `exceptions` used `find`, which takes no filters at all, so they accepted
|
|
64
|
+
* `minDuration` and ignored it — the same silence, one path over. Two ways
|
|
65
|
+
* to answer the same question is how the two came to disagree.
|
|
66
|
+
*/
|
|
67
|
+
async filteredPage(type, query, filters) {
|
|
68
|
+
const limit = query.limit ?? dto_1.DEFAULT_LIMIT;
|
|
69
|
+
const offset = query.offset ?? 0;
|
|
70
|
+
const result = await this.storage.findWithCursor(type, {
|
|
71
|
+
limit: offset + limit,
|
|
72
|
+
filters: {
|
|
73
|
+
// The window and the duration bounds these endpoints accept. The
|
|
74
|
+
// window reached the storage on the `entries` path and not on this
|
|
75
|
+
// one, so `logs` and `queries` took a `from` and ignored it.
|
|
76
|
+
from: query.from?.toISOString(),
|
|
77
|
+
to: query.to?.toISOString(),
|
|
78
|
+
minDuration: query.minDuration,
|
|
79
|
+
maxDuration: query.maxDuration,
|
|
80
|
+
requestId: query.requestId,
|
|
81
|
+
...filters,
|
|
82
|
+
},
|
|
80
83
|
});
|
|
81
|
-
const total = await this.storage.count(type);
|
|
82
84
|
return {
|
|
83
|
-
data:
|
|
84
|
-
meta: {
|
|
85
|
-
total,
|
|
86
|
-
limit: parsedLimit,
|
|
87
|
-
offset: parsedOffset,
|
|
88
|
-
},
|
|
85
|
+
data: result.data.slice(offset),
|
|
86
|
+
meta: { total: result.meta.total, limit, offset },
|
|
89
87
|
};
|
|
90
88
|
}
|
|
91
89
|
/**
|
|
@@ -101,29 +99,32 @@ let NestLensApiController = class NestLensApiController {
|
|
|
101
99
|
filters: query.toFilters(),
|
|
102
100
|
});
|
|
103
101
|
}
|
|
104
|
-
async getLatestSequence(
|
|
105
|
-
const sequence = await this.storage.getLatestSequence(type);
|
|
102
|
+
async getLatestSequence(query, _res) {
|
|
103
|
+
const sequence = await this.storage.getLatestSequence(query.type);
|
|
106
104
|
return { data: sequence };
|
|
107
105
|
}
|
|
108
|
-
async checkNewEntries(
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
async checkNewEntries(query, _res) {
|
|
107
|
+
// `parseInt` of a missing or unreadable parameter is NaN, and NaN reached
|
|
108
|
+
// the storage: Redis was asked for `zcount (NaN +inf` and answered with an
|
|
109
|
+
// error. The live tail calls this on a timer, so it would have been a 500
|
|
110
|
+
// every few seconds rather than once.
|
|
111
|
+
const count = await this.storage.hasEntriesAfter(query.afterSequence, query.type);
|
|
111
112
|
return { data: { count, hasNew: count > 0 } };
|
|
112
113
|
}
|
|
113
114
|
/**
|
|
114
115
|
* Get entries grouped by family hash
|
|
115
116
|
* NOTE: Must come BEFORE @Get('entries/:id') to avoid route conflict
|
|
116
117
|
*/
|
|
117
|
-
async getGroupedEntries(
|
|
118
|
-
const groups = await this.storage.getGroupedByFamilyHash(type,
|
|
118
|
+
async getGroupedEntries(query, _res) {
|
|
119
|
+
const groups = await this.storage.getGroupedByFamilyHash(query.type, query.limit ?? dto_1.DEFAULT_LIMIT);
|
|
119
120
|
return { data: groups };
|
|
120
121
|
}
|
|
121
122
|
/**
|
|
122
123
|
* Get all entries with the same family hash
|
|
123
124
|
* NOTE: Must come BEFORE @Get('entries/:id') to avoid route conflict
|
|
124
125
|
*/
|
|
125
|
-
async getEntriesByFamilyHash(hash,
|
|
126
|
-
const entries = await this.storage.findByFamilyHash(hash,
|
|
126
|
+
async getEntriesByFamilyHash(hash, query, _res) {
|
|
127
|
+
const entries = await this.storage.findByFamilyHash(hash, query.limit ?? dto_1.DEFAULT_LIMIT);
|
|
127
128
|
return { data: entries };
|
|
128
129
|
}
|
|
129
130
|
async getEntry(id, _res) {
|
|
@@ -148,53 +149,17 @@ let NestLensApiController = class NestLensApiController {
|
|
|
148
149
|
const stats = await this.storage.getStats();
|
|
149
150
|
return { data: stats };
|
|
150
151
|
}
|
|
151
|
-
async getRequests(
|
|
152
|
-
return this.getEntries('request'
|
|
152
|
+
async getRequests(query, _res) {
|
|
153
|
+
return this.getEntries({ ...query, type: 'request' });
|
|
153
154
|
}
|
|
154
|
-
async getQueries(
|
|
155
|
-
|
|
156
|
-
const parsedOffset = this.parseOffset(offset);
|
|
157
|
-
const entries = await this.storage.find({
|
|
158
|
-
type: 'query',
|
|
159
|
-
limit: parsedLimit,
|
|
160
|
-
offset: parsedOffset,
|
|
161
|
-
});
|
|
162
|
-
// Filter slow queries if requested
|
|
163
|
-
const filtered = slow === 'true' ? entries.filter((e) => e.type === 'query' && e.payload.slow) : entries;
|
|
164
|
-
const total = await this.storage.count('query');
|
|
165
|
-
return {
|
|
166
|
-
data: filtered,
|
|
167
|
-
meta: {
|
|
168
|
-
total,
|
|
169
|
-
limit: parsedLimit,
|
|
170
|
-
offset: parsedOffset,
|
|
171
|
-
},
|
|
172
|
-
};
|
|
155
|
+
async getQueries(query, _res) {
|
|
156
|
+
return this.filteredPage('query', query, query.slow === 'true' ? { slow: true } : undefined);
|
|
173
157
|
}
|
|
174
|
-
async getExceptions(
|
|
175
|
-
return this.getEntries('exception'
|
|
158
|
+
async getExceptions(query, _res) {
|
|
159
|
+
return this.getEntries({ ...query, type: 'exception' });
|
|
176
160
|
}
|
|
177
|
-
async getLogs(
|
|
178
|
-
|
|
179
|
-
const parsedOffset = this.parseOffset(offset);
|
|
180
|
-
const entries = await this.storage.find({
|
|
181
|
-
type: 'log',
|
|
182
|
-
limit: parsedLimit,
|
|
183
|
-
offset: parsedOffset,
|
|
184
|
-
});
|
|
185
|
-
// Filter by level if requested
|
|
186
|
-
const filtered = level
|
|
187
|
-
? entries.filter((e) => e.type === 'log' && e.payload.level === level)
|
|
188
|
-
: entries;
|
|
189
|
-
const total = await this.storage.count('log');
|
|
190
|
-
return {
|
|
191
|
-
data: filtered,
|
|
192
|
-
meta: {
|
|
193
|
-
total,
|
|
194
|
-
limit: parsedLimit,
|
|
195
|
-
offset: parsedOffset,
|
|
196
|
-
},
|
|
197
|
-
};
|
|
161
|
+
async getLogs(query, _res) {
|
|
162
|
+
return this.filteredPage('log', query, query.level ? { levels: [query.level] } : undefined);
|
|
198
163
|
}
|
|
199
164
|
/**
|
|
200
165
|
* Storage stats endpoint
|
|
@@ -207,15 +172,18 @@ let NestLensApiController = class NestLensApiController {
|
|
|
207
172
|
* Pruning endpoints
|
|
208
173
|
*/
|
|
209
174
|
async getPruningStatus(_res) {
|
|
210
|
-
const config = this.config.pruning;
|
|
211
175
|
const storageStats = await this.storage.getStorageStats();
|
|
176
|
+
// Read from the service rather than from the configuration: a setting it
|
|
177
|
+
// refused or clamped is not the one in effect, and reporting the written
|
|
178
|
+
// value would describe pruning that is not happening.
|
|
179
|
+
const { lastRun, nextRun } = this.pruningService.schedule;
|
|
212
180
|
return {
|
|
213
181
|
data: {
|
|
214
|
-
enabled: config?.enabled !== false,
|
|
215
|
-
maxAge:
|
|
216
|
-
interval:
|
|
217
|
-
lastRun:
|
|
218
|
-
nextRun:
|
|
182
|
+
enabled: this.config.pruning?.enabled !== false,
|
|
183
|
+
maxAge: this.pruningService.maxAgeHours,
|
|
184
|
+
interval: this.pruningService.intervalMinutes,
|
|
185
|
+
lastRun: lastRun?.toISOString() ?? null,
|
|
186
|
+
nextRun: nextRun?.toISOString() ?? null,
|
|
219
187
|
totalEntries: storageStats.total,
|
|
220
188
|
oldestEntry: storageStats.oldestEntry,
|
|
221
189
|
newestEntry: storageStats.newestEntry,
|
|
@@ -223,19 +191,23 @@ let NestLensApiController = class NestLensApiController {
|
|
|
223
191
|
},
|
|
224
192
|
};
|
|
225
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Prunes now, by the same rules as the timer.
|
|
196
|
+
*
|
|
197
|
+
* This used to compute its own window from `config.pruning.maxAge`, which
|
|
198
|
+
* the service refuses to take at face value: `maxAge: 0` is ignored there
|
|
199
|
+
* and was honoured here, so pressing *Run pruning* with it set deleted every
|
|
200
|
+
* entry the application had recorded.
|
|
201
|
+
*/
|
|
226
202
|
async runPruning(_res) {
|
|
227
|
-
const
|
|
228
|
-
const
|
|
229
|
-
const deleted = await this.storage.prune(before);
|
|
230
|
-
this.lastPruneRun = new Date();
|
|
231
|
-
const intervalMinutes = this.config.pruning?.interval ?? 60;
|
|
232
|
-
this.nextPruneRun = new Date(Date.now() + intervalMinutes * 60 * 1000);
|
|
203
|
+
const deleted = await this.pruningService.pruneNow();
|
|
204
|
+
const { lastRun, nextRun } = this.pruningService.schedule;
|
|
233
205
|
return {
|
|
234
206
|
success: true,
|
|
235
207
|
data: {
|
|
236
208
|
deleted,
|
|
237
|
-
lastRun:
|
|
238
|
-
nextRun:
|
|
209
|
+
lastRun: lastRun?.toISOString() ?? null,
|
|
210
|
+
nextRun: nextRun?.toISOString() ?? null,
|
|
239
211
|
},
|
|
240
212
|
};
|
|
241
213
|
}
|
|
@@ -245,20 +217,30 @@ let NestLensApiController = class NestLensApiController {
|
|
|
245
217
|
}
|
|
246
218
|
// ==================== Resolution Endpoints ====================
|
|
247
219
|
/**
|
|
248
|
-
* Mark an entry (exception) as resolved
|
|
220
|
+
* Mark an entry (exception) as resolved.
|
|
221
|
+
*
|
|
222
|
+
* An entry that is not there answers 404 rather than `success: true` with
|
|
223
|
+
* nothing attached. Both are reachable while a page is open — pruning
|
|
224
|
+
* deletes by age, the store evicts by size — and the dashboard applied what
|
|
225
|
+
* came back to the row it clicked, so `null` reached a list update and
|
|
226
|
+
* failed there instead, with a message about a property of null.
|
|
249
227
|
*/
|
|
250
228
|
async resolveEntry(id, _res) {
|
|
251
229
|
await this.storage.resolveEntry(id);
|
|
252
|
-
|
|
253
|
-
return { success: true, data: entry };
|
|
230
|
+
return { success: true, data: this.entryOr404(await this.storage.findById(id), id) };
|
|
254
231
|
}
|
|
255
232
|
/**
|
|
256
|
-
* Mark an entry as unresolved
|
|
233
|
+
* Mark an entry as unresolved. See {@link resolveEntry} for the 404.
|
|
257
234
|
*/
|
|
258
235
|
async unresolveEntry(id, _res) {
|
|
259
236
|
await this.storage.unresolveEntry(id);
|
|
260
|
-
|
|
261
|
-
|
|
237
|
+
return { success: true, data: this.entryOr404(await this.storage.findById(id), id) };
|
|
238
|
+
}
|
|
239
|
+
entryOr404(entry, id) {
|
|
240
|
+
if (!entry) {
|
|
241
|
+
throw exceptions_1.NestLensApiException.entryNotFound(id);
|
|
242
|
+
}
|
|
243
|
+
return entry;
|
|
262
244
|
}
|
|
263
245
|
// ==================== Recording Control Endpoints ====================
|
|
264
246
|
/**
|
|
@@ -288,15 +270,10 @@ let NestLensApiController = class NestLensApiController {
|
|
|
288
270
|
exports.NestLensApiController = NestLensApiController;
|
|
289
271
|
__decorate([
|
|
290
272
|
(0, common_1.Get)('entries'),
|
|
291
|
-
__param(0, (0, common_1.Query)(
|
|
292
|
-
__param(1, (0, common_1.
|
|
293
|
-
__param(2, (0, common_1.Query)('limit')),
|
|
294
|
-
__param(3, (0, common_1.Query)('offset')),
|
|
295
|
-
__param(4, (0, common_1.Query)('from')),
|
|
296
|
-
__param(5, (0, common_1.Query)('to')),
|
|
297
|
-
__param(6, (0, common_1.Res)()),
|
|
273
|
+
__param(0, (0, common_1.Query)()),
|
|
274
|
+
__param(1, (0, common_1.Res)()),
|
|
298
275
|
__metadata("design:type", Function),
|
|
299
|
-
__metadata("design:paramtypes", [
|
|
276
|
+
__metadata("design:paramtypes", [dto_1.EntriesQueryDto, Object]),
|
|
300
277
|
__metadata("design:returntype", Promise)
|
|
301
278
|
], NestLensApiController.prototype, "getEntries", null);
|
|
302
279
|
__decorate([
|
|
@@ -309,37 +286,35 @@ __decorate([
|
|
|
309
286
|
], NestLensApiController.prototype, "getEntriesWithCursor", null);
|
|
310
287
|
__decorate([
|
|
311
288
|
(0, common_1.Get)('entries/latest-sequence'),
|
|
312
|
-
__param(0, (0, common_1.Query)(
|
|
289
|
+
__param(0, (0, common_1.Query)()),
|
|
313
290
|
__param(1, (0, common_1.Res)()),
|
|
314
291
|
__metadata("design:type", Function),
|
|
315
|
-
__metadata("design:paramtypes", [
|
|
292
|
+
__metadata("design:paramtypes", [dto_1.LatestSequenceQueryDto, Object]),
|
|
316
293
|
__metadata("design:returntype", Promise)
|
|
317
294
|
], NestLensApiController.prototype, "getLatestSequence", null);
|
|
318
295
|
__decorate([
|
|
319
296
|
(0, common_1.Get)('entries/check-new'),
|
|
320
|
-
__param(0, (0, common_1.Query)(
|
|
321
|
-
__param(1, (0, common_1.
|
|
322
|
-
__param(2, (0, common_1.Res)()),
|
|
297
|
+
__param(0, (0, common_1.Query)()),
|
|
298
|
+
__param(1, (0, common_1.Res)()),
|
|
323
299
|
__metadata("design:type", Function),
|
|
324
|
-
__metadata("design:paramtypes", [
|
|
300
|
+
__metadata("design:paramtypes", [dto_1.CheckNewQueryDto, Object]),
|
|
325
301
|
__metadata("design:returntype", Promise)
|
|
326
302
|
], NestLensApiController.prototype, "checkNewEntries", null);
|
|
327
303
|
__decorate([
|
|
328
304
|
(0, common_1.Get)('entries/grouped'),
|
|
329
|
-
__param(0, (0, common_1.Query)(
|
|
330
|
-
__param(1, (0, common_1.
|
|
331
|
-
__param(2, (0, common_1.Res)()),
|
|
305
|
+
__param(0, (0, common_1.Query)()),
|
|
306
|
+
__param(1, (0, common_1.Res)()),
|
|
332
307
|
__metadata("design:type", Function),
|
|
333
|
-
__metadata("design:paramtypes", [
|
|
308
|
+
__metadata("design:paramtypes", [dto_1.EntriesQueryDto, Object]),
|
|
334
309
|
__metadata("design:returntype", Promise)
|
|
335
310
|
], NestLensApiController.prototype, "getGroupedEntries", null);
|
|
336
311
|
__decorate([
|
|
337
312
|
(0, common_1.Get)('entries/family/:hash'),
|
|
338
313
|
__param(0, (0, common_1.Param)('hash')),
|
|
339
|
-
__param(1, (0, common_1.Query)(
|
|
314
|
+
__param(1, (0, common_1.Query)()),
|
|
340
315
|
__param(2, (0, common_1.Res)()),
|
|
341
316
|
__metadata("design:type", Function),
|
|
342
|
-
__metadata("design:paramtypes", [String,
|
|
317
|
+
__metadata("design:paramtypes", [String, dto_1.EntriesQueryDto, Object]),
|
|
343
318
|
__metadata("design:returntype", Promise)
|
|
344
319
|
], NestLensApiController.prototype, "getEntriesByFamilyHash", null);
|
|
345
320
|
__decorate([
|
|
@@ -359,40 +334,34 @@ __decorate([
|
|
|
359
334
|
], NestLensApiController.prototype, "getStats", null);
|
|
360
335
|
__decorate([
|
|
361
336
|
(0, common_1.Get)('requests'),
|
|
362
|
-
__param(0, (0, common_1.Query)(
|
|
363
|
-
__param(1, (0, common_1.
|
|
364
|
-
__param(2, (0, common_1.Res)()),
|
|
337
|
+
__param(0, (0, common_1.Query)()),
|
|
338
|
+
__param(1, (0, common_1.Res)()),
|
|
365
339
|
__metadata("design:type", Function),
|
|
366
|
-
__metadata("design:paramtypes", [
|
|
340
|
+
__metadata("design:paramtypes", [dto_1.EntriesQueryDto, Object]),
|
|
367
341
|
__metadata("design:returntype", Promise)
|
|
368
342
|
], NestLensApiController.prototype, "getRequests", null);
|
|
369
343
|
__decorate([
|
|
370
344
|
(0, common_1.Get)('queries'),
|
|
371
|
-
__param(0, (0, common_1.Query)(
|
|
372
|
-
__param(1, (0, common_1.
|
|
373
|
-
__param(2, (0, common_1.Query)('slow')),
|
|
374
|
-
__param(3, (0, common_1.Res)()),
|
|
345
|
+
__param(0, (0, common_1.Query)()),
|
|
346
|
+
__param(1, (0, common_1.Res)()),
|
|
375
347
|
__metadata("design:type", Function),
|
|
376
|
-
__metadata("design:paramtypes", [
|
|
348
|
+
__metadata("design:paramtypes", [dto_1.QueriesQueryDto, Object]),
|
|
377
349
|
__metadata("design:returntype", Promise)
|
|
378
350
|
], NestLensApiController.prototype, "getQueries", null);
|
|
379
351
|
__decorate([
|
|
380
352
|
(0, common_1.Get)('exceptions'),
|
|
381
|
-
__param(0, (0, common_1.Query)(
|
|
382
|
-
__param(1, (0, common_1.
|
|
383
|
-
__param(2, (0, common_1.Res)()),
|
|
353
|
+
__param(0, (0, common_1.Query)()),
|
|
354
|
+
__param(1, (0, common_1.Res)()),
|
|
384
355
|
__metadata("design:type", Function),
|
|
385
|
-
__metadata("design:paramtypes", [
|
|
356
|
+
__metadata("design:paramtypes", [dto_1.EntriesQueryDto, Object]),
|
|
386
357
|
__metadata("design:returntype", Promise)
|
|
387
358
|
], NestLensApiController.prototype, "getExceptions", null);
|
|
388
359
|
__decorate([
|
|
389
360
|
(0, common_1.Get)('logs'),
|
|
390
|
-
__param(0, (0, common_1.Query)(
|
|
391
|
-
__param(1, (0, common_1.
|
|
392
|
-
__param(2, (0, common_1.Query)('level')),
|
|
393
|
-
__param(3, (0, common_1.Res)()),
|
|
361
|
+
__param(0, (0, common_1.Query)()),
|
|
362
|
+
__param(1, (0, common_1.Res)()),
|
|
394
363
|
__metadata("design:type", Function),
|
|
395
|
-
__metadata("design:paramtypes", [
|
|
364
|
+
__metadata("design:paramtypes", [dto_1.LogsQueryDto, Object]),
|
|
396
365
|
__metadata("design:returntype", Promise)
|
|
397
366
|
], NestLensApiController.prototype, "getLogs", null);
|
|
398
367
|
__decorate([
|