adonisjs-server-stats 1.11.7 → 1.12.1

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.
Files changed (69) hide show
  1. package/dist/core/explain-utils.d.ts +77 -0
  2. package/dist/core/index.d.ts +8 -2
  3. package/dist/core/index.js +1089 -877
  4. package/dist/core/queries-columns.d.ts +42 -0
  5. package/dist/core/queries-controller.d.ts +94 -0
  6. package/dist/core/query-utils.d.ts +49 -0
  7. package/dist/react/{CacheSection-DOUnyUrw.js → CacheSection-ewL3Ss82.js} +1 -1
  8. package/dist/react/{CacheTab-D9o6bsPc.js → CacheTab-B1wjTs64.js} +1 -1
  9. package/dist/react/{ConfigSection-DzNC7pOJ.js → ConfigSection-DAHu9mfy.js} +1 -1
  10. package/dist/react/{ConfigTab-CT-Tu-ct.js → ConfigTab-B4E7Pitz.js} +1 -1
  11. package/dist/react/{CustomPaneTab-CvIPe7NP.js → CustomPaneTab-iP7K6TLu.js} +1 -1
  12. package/dist/react/{EmailsSection-B1LT7Nx3.js → EmailsSection-hUkyUnKo.js} +1 -1
  13. package/dist/react/{EmailsTab-DKxK322z.js → EmailsTab-zZ4ucCv5.js} +1 -1
  14. package/dist/react/{EventsSection-D3AK0mhw.js → EventsSection-CbGz-b_I.js} +1 -1
  15. package/dist/react/{EventsTab-BRRSW6RI.js → EventsTab-BUNTKy9p.js} +1 -1
  16. package/dist/react/{JobsSection-BMvj5886.js → JobsSection-D10TwmEZ.js} +1 -1
  17. package/dist/react/{JobsTab-CQXWCrl8.js → JobsTab-CGrcuRPt.js} +1 -1
  18. package/dist/react/{LogEntryRow-DFI52ZEw.js → LogEntryRow-CkS9LMbl.js} +1 -1
  19. package/dist/react/{LogsSection-CW2hQ976.js → LogsSection-BhS0Orbh.js} +2 -2
  20. package/dist/react/{LogsTab-CV4Gf_yb.js → LogsTab-TChjBgV3.js} +2 -2
  21. package/dist/react/{OverviewSection-CxF9cabq.js → OverviewSection-DhU9kO4C.js} +1 -1
  22. package/dist/react/QueriesContent-BDIx8zFn.js +288 -0
  23. package/dist/react/QueriesSection-Dz4Eird3.js +123 -0
  24. package/dist/react/QueriesTab-CGMtuFFF.js +87 -0
  25. package/dist/react/{RequestsSection-Cb5YeqvI.js → RequestsSection-CrwlbkXj.js} +2 -2
  26. package/dist/react/{RoutesSection-B43olD9v.js → RoutesSection-DNmTM3w6.js} +1 -1
  27. package/dist/react/{RoutesTab-RfhCUbkx.js → RoutesTab-BS4PNbRf.js} +1 -1
  28. package/dist/react/{SplitPaneWrapper-B05Mg6Sg.js → SplitPaneWrapper-CIygm7YI.js} +1 -1
  29. package/dist/react/{TimelineTab-Dx4686Ti.js → TimelineTab-M3wrwrmF.js} +2 -2
  30. package/dist/react/components/shared/QueriesContent.d.ts +33 -0
  31. package/dist/react/{index-C4EMJrkH.js → index-LkZK--Bi.js} +2 -2
  32. package/dist/react/index.js +1 -1
  33. package/dist/react/style.css +1 -1
  34. package/dist/src/dashboard/query_explain_handler.d.ts +11 -0
  35. package/dist/src/dashboard/query_explain_handler.js +64 -11
  36. package/dist/src/debug/query_collector.d.ts +1 -0
  37. package/dist/src/debug/query_collector.js +3 -0
  38. package/dist/src/edge/client/dashboard.js +2 -2
  39. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  40. package/dist/src/edge/client-vue/dashboard.js +4 -4
  41. package/dist/src/edge/client-vue/debug-panel-deferred.js +2 -2
  42. package/dist/src/provider/server_stats_provider.js +2 -0
  43. package/dist/src/routes/debug_routes.d.ts +4 -0
  44. package/dist/src/routes/debug_routes.js +45 -0
  45. package/dist/src/routes/register_routes.d.ts +4 -0
  46. package/dist/src/routes/register_routes.js +2 -0
  47. package/dist/src/styles/components.css +238 -0
  48. package/dist/src/styles/dashboard.css +6 -173
  49. package/dist/src/styles/debug-panel.css +2 -24
  50. package/dist/vue/{CacheSection-BAotiuQq.js → CacheSection-PpnXregU.js} +1 -1
  51. package/dist/vue/{ConfigSection-JZjK5E5F.js → ConfigSection-CX5Vg95P.js} +1 -1
  52. package/dist/vue/{EmailsSection-BLwyQO7B.js → EmailsSection-BGHPwUgY.js} +1 -1
  53. package/dist/vue/{EventsSection-BUEwO-0A.js → EventsSection-x1DFVMLb.js} +1 -1
  54. package/dist/vue/{JobsSection-21A0yQMq.js → JobsSection-BEiYKfvI.js} +1 -1
  55. package/dist/vue/{LogsSection-BmOx8SNa.js → LogsSection-ChxccWDj.js} +1 -1
  56. package/dist/vue/{OverviewSection-BRDK3Ony.js → OverviewSection-OAWpIQZS.js} +1 -1
  57. package/dist/vue/QueriesSection-gKNTbjZz.js +423 -0
  58. package/dist/vue/QueriesTab-DO5XwJ--.js +112 -0
  59. package/dist/vue/{RequestsSection-DLrjCfcE.js → RequestsSection-CgLTYSVg.js} +1 -1
  60. package/dist/vue/{RoutesSection-CPr9w42B.js → RoutesSection-Bhnj_f3a.js} +1 -1
  61. package/dist/vue/components/Dashboard/sections/QueriesSection.vue.d.ts +1 -41
  62. package/dist/vue/{index-CYaqRGIT.js → index-DQxTdRYT.js} +2 -2
  63. package/dist/vue/index.js +1 -1
  64. package/dist/vue/style.css +1 -1
  65. package/package.json +1 -1
  66. package/dist/react/QueriesSection-CZJ-imAb.js +0 -474
  67. package/dist/react/QueriesTab-CQHa1ck3.js +0 -97
  68. package/dist/vue/QueriesSection-D2WGsuR4.js +0 -444
  69. package/dist/vue/QueriesTab-6D_xfi7Q.js +0 -114
@@ -0,0 +1,77 @@
1
+ /**
2
+ * A node in a PostgreSQL EXPLAIN (JSON) plan tree.
3
+ */
4
+ export interface PlanNode {
5
+ 'Node Type'?: string;
6
+ 'Relation Name'?: string;
7
+ Alias?: string;
8
+ 'Index Name'?: string;
9
+ 'Startup Cost'?: number | null;
10
+ 'Total Cost'?: number | null;
11
+ 'Plan Rows'?: number | null;
12
+ 'Plan Width'?: number | null;
13
+ Filter?: string;
14
+ 'Index Cond'?: string;
15
+ 'Hash Cond'?: string;
16
+ 'Join Type'?: string;
17
+ 'Sort Key'?: string | string[];
18
+ Plans?: PlanNode[];
19
+ [key: string]: unknown;
20
+ }
21
+ /**
22
+ * A flattened plan node for iteration-based rendering (no recursion needed
23
+ * in the template layer).
24
+ */
25
+ export interface FlatPlanNode {
26
+ /** Nesting depth (0 = root). */
27
+ depth: number;
28
+ /** Node type label (e.g. `"Seq Scan"`, `"Hash Join"`). */
29
+ nodeType: string;
30
+ /** Relation (table) name, if any. */
31
+ relationName: string;
32
+ /** Alias for the relation, if different from `relationName`. */
33
+ alias: string;
34
+ /** Index name used, if any. */
35
+ indexName: string;
36
+ /** Human-readable metric strings (cost, rows, width, filters, etc.). */
37
+ metrics: string[];
38
+ /** Whether this is the root node (depth === 0). */
39
+ isRoot: boolean;
40
+ }
41
+ /**
42
+ * Extract human-readable metric strings from a plan node.
43
+ *
44
+ * Produces entries like `"cost=0.00..1.23"`, `"rows=100"`, `"width=50"`,
45
+ * `"filter: ..."`, etc.
46
+ */
47
+ export declare function formatPlanNodeMetrics(node: PlanNode): string[];
48
+ /**
49
+ * Recursively flatten a plan tree into an array of {@link FlatPlanNode}
50
+ * objects that any framework can render with simple iteration.
51
+ *
52
+ * @param node - The root (or current) plan node.
53
+ * @param depth - Current nesting depth (default `0`).
54
+ */
55
+ export declare function flattenPlanTree(node: PlanNode, depth?: number): FlatPlanNode[];
56
+ /**
57
+ * Check whether an EXPLAIN result has a nested `Plan` structure (JSON
58
+ * format) as opposed to plain tabular rows.
59
+ *
60
+ * @param data - The first element of the EXPLAIN result array.
61
+ */
62
+ export declare function hasNestedPlan(data: unknown): boolean;
63
+ /**
64
+ * Extract column headers from plain (non-JSON) EXPLAIN rows.
65
+ *
66
+ * Returns the keys of the first row object, which serve as column headers
67
+ * for a simple table display.
68
+ *
69
+ * @param rows - Array of row objects from the EXPLAIN result.
70
+ */
71
+ export declare function getExplainColumns(rows: Record<string, unknown>[]): string[];
72
+ /**
73
+ * Format a cell value for display in an EXPLAIN result table.
74
+ *
75
+ * Returns `'-'` for `null` / `undefined` values.
76
+ */
77
+ export declare function formatCellValue(value: unknown): string;
@@ -28,8 +28,14 @@ export { DebugDataController } from './debug-data-controller.js';
28
28
  export type { DebugDataControllerConfig, DebugDataControllerCallbacks, } from './debug-data-controller.js';
29
29
  export { LOG_LEVELS, resolveLogLevel, resolveLogMessage, resolveLogTimestamp, resolveLogRequestId, getLogLevelCssClass, filterLogsByLevel, getStructuredData, } from './log-utils.js';
30
30
  export type { LogEntry } from './log-utils.js';
31
- export { filterQueries, countDuplicateQueries, computeQuerySummary } from './query-utils.js';
32
- export type { QuerySummary } from './query-utils.js';
31
+ export { filterQueries, countDuplicateQueries, computeQuerySummary, computeDashboardQuerySummary, normalizeDashboardQuery, buildSqlCounts, } from './query-utils.js';
32
+ export type { QuerySummary, NormalizedQuery } from './query-utils.js';
33
+ export { formatPlanNodeMetrics, flattenPlanTree, hasNestedPlan, getExplainColumns, formatCellValue, } from './explain-utils.js';
34
+ export type { PlanNode, FlatPlanNode } from './explain-utils.js';
35
+ export { getDebugPaneColumns, getDashboardListColumns, getDashboardGroupedColumns, } from './queries-columns.js';
36
+ export type { QueriesColumnDef } from './queries-columns.js';
37
+ export { QueriesController } from './queries-controller.js';
38
+ export type { QueriesControllerState, ExplainResult, ExplainEntry, } from './queries-controller.js';
33
39
  export { JOB_STATUS_FILTERS, getJobStatusCssClass, getJobStatusBadgeColor, extractJobs, extractJobStats, } from './job-utils.js';
34
40
  export type { JobStatusFilter } from './job-utils.js';
35
41
  export { parseTraceSpans, parseTraceWarnings, resolveTraceField, normalizeTraceFields, } from './trace-utils.js';