adonisjs-server-stats 1.17.0 → 1.18.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.
Files changed (66) hide show
  1. package/README.md +11 -6
  2. package/dist/core/core/define-config-helpers.d.ts +1 -0
  3. package/dist/core/core/types-diagnostics.d.ts +2 -0
  4. package/dist/core/debug/types.d.ts +2 -0
  5. package/dist/core/types.d.ts +31 -3
  6. package/dist/react/{CacheSection-C-X2Tnca.js → CacheSection-B-lSIN8Q.js} +1 -1
  7. package/dist/react/{CacheTab-D55mfmeE.js → CacheTab-BN0QgPXz.js} +1 -1
  8. package/dist/react/{ConfigSection-C-HGnZfd.js → ConfigSection-u_TSfb9f.js} +1 -1
  9. package/dist/react/{ConfigTab-CNnsOXBh.js → ConfigTab-au26s-ON.js} +1 -1
  10. package/dist/react/{CustomPaneTab-D-267UVd.js → CustomPaneTab-qvMnh8ss.js} +1 -1
  11. package/dist/react/{EmailsSection-Bqw4DI4r.js → EmailsSection-HfEMeRex.js} +1 -1
  12. package/dist/react/{EmailsTab-CkHOhj2F.js → EmailsTab-BWwq-CxB.js} +1 -1
  13. package/dist/react/{EventsSection-CMeyjzVC.js → EventsSection-CA9b15dJ.js} +1 -1
  14. package/dist/react/{EventsTab-DgS2v1HX.js → EventsTab-CgSdHbKU.js} +1 -1
  15. package/dist/react/{InternalsContent-C9lIA92C.js → InternalsContent-CI7HvBtH.js} +51 -47
  16. package/dist/react/{InternalsSection-lOv_UcSV.js → InternalsSection-IEeWXJqP.js} +1 -1
  17. package/dist/react/{InternalsTab-BygoSorC.js → InternalsTab-CoVLHQbF.js} +1 -1
  18. package/dist/react/{JobsSection-oWH6pbrG.js → JobsSection-DgsS_VwU.js} +1 -1
  19. package/dist/react/{JobsTab-zdxX_as-.js → JobsTab-CzwLSRUC.js} +1 -1
  20. package/dist/react/{LogEntryRow-Cn8Ee_X0.js → LogEntryRow-VCCzwD1H.js} +1 -1
  21. package/dist/react/{LogsSection-XmiI2MMs.js → LogsSection-BujNn_cO.js} +2 -2
  22. package/dist/react/{LogsTab-ixusY4v7.js → LogsTab-BtD1h7DM.js} +2 -2
  23. package/dist/react/{OverviewSection-CvhObTLP.js → OverviewSection-B28em0gQ.js} +1 -1
  24. package/dist/react/{QueriesSection-BvledwBI.js → QueriesSection-B0tFn_Dc.js} +1 -1
  25. package/dist/react/{QueriesTab-smQQJvJa.js → QueriesTab-DJY7aavR.js} +1 -1
  26. package/dist/react/{RequestsSection-DKuYpViv.js → RequestsSection-DPmYM7tq.js} +2 -2
  27. package/dist/react/{RoutesSection-5RNVurQ6.js → RoutesSection-Ck-RcFVS.js} +1 -1
  28. package/dist/react/{RoutesTab-CpXNO-Rx.js → RoutesTab-Ch3PDLzo.js} +1 -1
  29. package/dist/react/{SplitPaneWrapper-DQvJnsuk.js → SplitPaneWrapper-BZ6VrBr-.js} +1 -1
  30. package/dist/react/{TimelineTab-LHQHHKkO.js → TimelineTab-_byxh2mJ.js} +2 -2
  31. package/dist/react/{index-LlFvooUN.js → index-De7nsWBN.js} +2 -2
  32. package/dist/react/index.js +1 -1
  33. package/dist/src/dashboard/dashboard_store.js +4 -12
  34. package/dist/src/dashboard/knex_factory.js +8 -0
  35. package/dist/src/dashboard/migrator.d.ts +7 -2
  36. package/dist/src/dashboard/migrator.js +140 -6
  37. package/dist/src/dashboard/migrator_tables.js +4 -0
  38. package/dist/src/dashboard/storage_stats.d.ts +5 -0
  39. package/dist/src/dashboard/storage_stats.js +15 -1
  40. package/dist/src/debug/types.d.ts +2 -0
  41. package/dist/src/define_config.js +2 -0
  42. package/dist/src/edge/client/dashboard.js +2 -2
  43. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  44. package/dist/src/edge/client-vue/dashboard.js +3 -3
  45. package/dist/src/edge/client-vue/debug-panel-deferred.js +2 -2
  46. package/dist/src/provider/dashboard_setup.js +14 -0
  47. package/dist/src/provider/diagnostics.d.ts +2 -0
  48. package/dist/src/provider/diagnostics.js +1 -0
  49. package/dist/src/provider/server_stats_provider.d.ts +1 -0
  50. package/dist/src/stubs/config.stub +4 -0
  51. package/dist/src/types.d.ts +31 -3
  52. package/dist/vue/{CacheSection-Bm0goqX6.js → CacheSection-z2TQRez9.js} +1 -1
  53. package/dist/vue/{ConfigSection-BrYslIMN.js → ConfigSection-CFEaig69.js} +1 -1
  54. package/dist/vue/{EmailsSection-B8N5vaWA.js → EmailsSection-CYohBo62.js} +1 -1
  55. package/dist/vue/{EventsSection-D2Y_xt0m.js → EventsSection-B_TuVrGj.js} +1 -1
  56. package/dist/vue/{InternalsSection-jhTCuK3j.js → InternalsSection-B1P2kNT-.js} +92 -84
  57. package/dist/vue/{InternalsTab-Z3c82glB.js → InternalsTab-CRI-IFTo.js} +155 -147
  58. package/dist/vue/{JobsSection-cEKqELLC.js → JobsSection-AjkEzyiv.js} +1 -1
  59. package/dist/vue/{LogsSection-C3H2c0S3.js → LogsSection-DZD0CCDi.js} +1 -1
  60. package/dist/vue/{OverviewSection-I2swuHDa.js → OverviewSection-BEc4Gktf.js} +1 -1
  61. package/dist/vue/{QueriesSection-CF1IE3SN.js → QueriesSection-BMImGXTn.js} +1 -1
  62. package/dist/vue/{RequestsSection-CuwgXzmU.js → RequestsSection-DOI2MUFX.js} +1 -1
  63. package/dist/vue/{RoutesSection-BhJCF7Rn.js → RoutesSection-C1sxt-AW.js} +1 -1
  64. package/dist/vue/{index-DUsImuIN.js → index-BfPAAjL5.js} +2 -2
  65. package/dist/vue/index.js +1 -1
  66. package/package.json +1 -1
@@ -62,6 +62,7 @@ const TOOLBAR_DEFAULTS = {
62
62
  dashboard: false,
63
63
  dashboardPath: '/__stats',
64
64
  retentionDays: 7,
65
+ maxDbSizeMb: 500,
65
66
  dbPath: '.adonisjs/server-stats/dashboard.sqlite3',
66
67
  debugEndpoint: '/admin/api/debug',
67
68
  };
@@ -110,6 +111,18 @@ function resolveRetentionDays(ctx, explicit) {
110
111
  return explicit;
111
112
  return ctx?.inProduction ? PRODUCTION_RETENTION_DAYS : TOOLBAR_DEFAULTS.retentionDays;
112
113
  }
114
+ /**
115
+ * Resolve the database size cap. Order: `production.maxDbSizeMb` when in
116
+ * production, then whatever `dashboard` set, then the 500 MB default.
117
+ */
118
+ function resolveMaxDbSizeMb(ctx, explicit) {
119
+ const fromProduction = ctx?.inProduction ? ctx.production?.maxDbSizeMb : undefined;
120
+ if (fromProduction !== undefined)
121
+ return fromProduction;
122
+ if (explicit !== undefined)
123
+ return explicit;
124
+ return TOOLBAR_DEFAULTS.maxDbSizeMb;
125
+ }
113
126
  /**
114
127
  * Resolve a partial DevToolbarConfig by filling in all defaults.
115
128
  *
@@ -125,6 +138,7 @@ export function resolveToolbarConfig(partial, ctx) {
125
138
  return {
126
139
  ...merged,
127
140
  retentionDays: resolveRetentionDays(ctx, partial.retentionDays),
141
+ maxDbSizeMb: resolveMaxDbSizeMb(ctx, partial.maxDbSizeMb),
128
142
  capture: resolveCapture(ctx, merged.tracing),
129
143
  };
130
144
  }
@@ -47,6 +47,7 @@ interface DiagnosticsToolbar {
47
47
  dashboard?: boolean;
48
48
  dashboardPath?: string;
49
49
  retentionDays?: number;
50
+ maxDbSizeMb?: number;
50
51
  dbPath?: string;
51
52
  persistDebugData?: boolean | string;
52
53
  debugEndpoint?: string;
@@ -118,6 +119,7 @@ export declare function buildDiagnostics(input: DiagnosticsInput): {
118
119
  tracing: boolean;
119
120
  dashboard: boolean;
120
121
  retentionDays: number;
122
+ maxDbSizeMb: number;
121
123
  persistDebugData: string | boolean;
122
124
  renderer: string;
123
125
  excludeFromTracing: string[];
@@ -85,6 +85,7 @@ function pickToolbarFeatures(tb) {
85
85
  tracing: tb.tracing ?? true,
86
86
  dashboard: tb.dashboard ?? false,
87
87
  retentionDays: tb.retentionDays ?? 7,
88
+ maxDbSizeMb: tb.maxDbSizeMb ?? 500,
88
89
  persistDebugData: tb.persistDebugData ?? false,
89
90
  renderer: tb.renderer ?? 'preact',
90
91
  excludeFromTracing: tb.excludeFromTracing ?? [],
@@ -132,6 +132,7 @@ export default class ServerStatsProvider {
132
132
  tracing: boolean;
133
133
  dashboard: boolean;
134
134
  retentionDays: number;
135
+ maxDbSizeMb: number;
135
136
  persistDebugData: string | boolean;
136
137
  renderer: string;
137
138
  excludeFromTracing: string[];
@@ -17,6 +17,10 @@ export default defineConfig({
17
17
  // Enable the full-page dashboard at /__stats
18
18
  // dashboard: true,
19
19
 
20
+ // History window and disk budget for persisted stats. When the database
21
+ // outgrows the size cap the oldest records are pruned regardless of age.
22
+ // dashboard: { retentionDays: 7, maxDbSizeMb: 500 },
23
+
20
24
  // Log detailed initialization steps (SQLite, migrations, routes, etc.)
21
25
  // verbose: true,
22
26
 
@@ -263,6 +263,15 @@ export interface DevToolbarOptions {
263
263
  * @default 7
264
264
  */
265
265
  retentionDays?: number;
266
+ /**
267
+ * Size cap in MB for the SQLite database's live data. When exceeded,
268
+ * the hourly cleanup deletes the oldest records — regardless of age —
269
+ * until usage drops below the cap, effectively shortening the retention
270
+ * window when write volume outruns `retentionDays`. Set to `0` to
271
+ * disable the cap.
272
+ * @default 500
273
+ */
274
+ maxDbSizeMb?: number;
266
275
  /**
267
276
  * Path to the SQLite database file for historical persistence.
268
277
  * Relative to app root.
@@ -434,6 +443,17 @@ export interface DashboardConfig {
434
443
  * @default 7
435
444
  */
436
445
  retentionDays?: number;
446
+ /**
447
+ * Size cap in MB for the SQLite database's live data.
448
+ *
449
+ * When exceeded, the cleanup deletes the oldest records — regardless
450
+ * of age — until usage drops below the cap. This bounds disk usage
451
+ * when write volume (tracing, verbose query logging) outruns what
452
+ * `retentionDays` alone would keep small. Set to `0` to disable.
453
+ *
454
+ * @default 500
455
+ */
456
+ maxDbSizeMb?: number;
437
457
  }
438
458
  /**
439
459
  * Access-control callback signature.
@@ -515,13 +535,21 @@ export interface ProductionConfig {
515
535
  capture?: CaptureConfig;
516
536
  /**
517
537
  * How many days of history to keep in SQLite, overriding the usual default
518
- * of 7. Retention deletes rows hourly but never runs `VACUUM`, so the
519
- * database file reuses pages rather than shrinking — watch actual size via
520
- * the dashboard's storage panel.
538
+ * of 7. Retention deletes rows hourly and returns freed pages to the OS
539
+ * incrementally — watch actual size via the dashboard's storage panel.
521
540
  *
522
541
  * @default 3
523
542
  */
524
543
  retentionDays?: number;
544
+ /**
545
+ * Size cap in MB for the SQLite database's live data in production,
546
+ * overriding the usual default. When exceeded, the hourly cleanup deletes
547
+ * the oldest records — regardless of age — until usage drops below the
548
+ * cap. Set to `0` to disable.
549
+ *
550
+ * @default 500
551
+ */
552
+ maxDbSizeMb?: number;
525
553
  }
526
554
  /**
527
555
  * Advanced options that most users never need to touch.
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as L, inject as y, ref as h, onMounted as x, computed as w, onUnmounted as F, openBlock as l, createElementBlock as n, createElementVNode as e, toDisplayString as c, createCommentVNode as z, createVNode as N, unref as p, Fragment as U, renderList as B, withModifiers as M, createBlock as H } from "vue";
2
- import { u as I } from "./index-DUsImuIN.js";
2
+ import { u as I } from "./index-BfPAAjL5.js";
3
3
  import { u as j } from "./useResizableTable-BoivAevK.js";
4
4
  import { DashboardApi as q, formatCacheSize as P, formatTtl as G } from "adonisjs-server-stats/core";
5
5
  import { u as J } from "./useApiClient-BQQ9CF-q.js";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as nt, inject as L, ref as h, computed as k, openBlock as r, createElementBlock as c, createElementVNode as n, normalizeClass as a, createCommentVNode as g, Fragment as x, toDisplayString as u, unref as d, renderList as E, normalizeStyle as j } from "vue";
2
- import { u as lt } from "./index-DUsImuIN.js";
2
+ import { u as lt } from "./index-BfPAAjL5.js";
3
3
  import { isRedactedValue as p, flattenConfig as O, countLeaves as ot, collectTopLevelObjectKeys as st, copyWithFeedback as at, formatFlatValue as rt } from "adonisjs-server-stats/core";
4
4
  const ct = { style: { position: "relative", flex: 1 } }, ut = ["value"], it = ["onClick"], pt = { key: 0 }, dt = ["onClick"], vt = { key: 0 }, ft = { style: { padding: "4px 16px", fontSize: "10px", color: "var(--ss-muted)" } }, yt = ["onClick"], gt = ["title"], bt = ["title"], ht = ["onClick"], $t = {
5
5
  key: 1,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as B, inject as f, ref as w, computed as g, onUnmounted as D, openBlock as s, createElementBlock as n, createElementVNode as t, Fragment as m, createTextVNode as d, toDisplayString as i, createCommentVNode as _, normalizeClass as k, createVNode as R, unref as r, renderList as U, createBlock as z } from "vue";
2
2
  import { formatTime as L, timeAgo as M } from "adonisjs-server-stats/core";
3
- import { u as q } from "./index-DUsImuIN.js";
3
+ import { u as q } from "./index-BfPAAjL5.js";
4
4
  import { u as H } from "./useResizableTable-BoivAevK.js";
5
5
  import { _ as I } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
6
6
  import { _ as K } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as E, inject as i, ref as p, computed as P, openBlock as s, createElementBlock as l, createVNode as v, unref as a, Fragment as h, createElementVNode as e, renderList as T, toDisplayString as c, createBlock as C, createCommentVNode as D } from "vue";
2
2
  import { formatTime as S, timeAgo as V } from "adonisjs-server-stats/core";
3
- import { u as $ } from "./index-DUsImuIN.js";
3
+ import { u as $ } from "./index-BfPAAjL5.js";
4
4
  import { u as A } from "./useResizableTable-BoivAevK.js";
5
5
  import { _ as B } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
6
6
  import { _ as R } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
@@ -1,5 +1,5 @@
1
- import { defineComponent as B, inject as x, ref as k, onMounted as F, onUnmounted as R, watch as U, computed as C, openBlock as a, createElementBlock as o, toDisplayString as s, Fragment as u, createElementVNode as l, createTextVNode as d, createCommentVNode as h, renderList as v, unref as T, normalizeClass as y, normalizeStyle as w } from "vue";
2
- import { SECTION_REFRESH_MS as O, fillPercent as Q, getTimerLabel as H, getIntegrationDetails as K, getIntegrationStatus as q, getIntegrationLabel as J, formatUptime as W, timeAgo as I, formatCollectorConfig as G, UnauthorizedError as X, classifyStatus as Y, formatDuration as M } from "adonisjs-server-stats/core";
1
+ import { defineComponent as j, inject as x, ref as k, onMounted as F, onUnmounted as R, watch as U, computed as C, openBlock as a, createElementBlock as o, toDisplayString as s, Fragment as u, createElementVNode as l, createTextVNode as d, createCommentVNode as h, renderList as v, unref as S, normalizeClass as m, normalizeStyle as M } from "vue";
2
+ import { SECTION_REFRESH_MS as O, fillPercent as Q, getTimerLabel as H, getIntegrationDetails as K, getIntegrationStatus as q, getIntegrationLabel as J, formatUptime as W, timeAgo as $, formatCollectorConfig as G, UnauthorizedError as X, classifyStatus as Y, formatDuration as w } from "adonisjs-server-stats/core";
3
3
  import { u as Z } from "./useApiClient-BQQ9CF-q.js";
4
4
  const _ = {
5
5
  key: 0,
@@ -36,7 +36,7 @@ const _ = {
36
36
  }, gl = {
37
37
  key: 4,
38
38
  class: "ss-dash-table"
39
- }, yl = { class: "ss-dash-bar" }, ml = {
39
+ }, ml = { class: "ss-dash-bar" }, yl = {
40
40
  class: "ss-dash-bar-track",
41
41
  style: { "max-width": "120px" }
42
42
  }, kl = {
@@ -48,36 +48,36 @@ const _ = {
48
48
  }, cl = { style: { color: "var(--ss-dim)" } }, xl = {
49
49
  key: 7,
50
50
  class: "ss-dash-empty"
51
- }, Tl = {
51
+ }, Sl = {
52
52
  key: 8,
53
53
  class: "ss-dash-table"
54
- }, Sl = { style: { color: "var(--ss-dim)", "font-size": "11px" } }, Cl = { class: "ss-dash-table" }, El = { style: { "font-family": "monospace", "font-size": "11px" } }, zl = {
54
+ }, Tl = { style: { color: "var(--ss-dim)", "font-size": "11px" } }, Cl = { class: "ss-dash-table" }, zl = { style: { "font-family": "monospace", "font-size": "11px" } }, El = {
55
55
  key: 0,
56
56
  class: "ss-dash-table",
57
57
  style: { "margin-top": "8px" }
58
- }, Dl = { style: { "font-family": "monospace", "font-size": "11px" } }, wl = { class: "ss-dash-table" }, Il = { class: "ss-dash-table" }, Ml = { style: { "font-family": "monospace", "font-size": "11px" } }, $l = { style: { "font-family": "monospace", "font-size": "11px" } }, Pl = { style: { "font-family": "monospace", "font-size": "11px" } }, Ll = { style: { "font-size": "11px" } }, Bl = /* @__PURE__ */ B({
58
+ }, Dl = { style: { "font-family": "monospace", "font-size": "11px" } }, Ml = { class: "ss-dash-table" }, $l = { class: "ss-dash-table" }, wl = { style: { "font-family": "monospace", "font-size": "11px" } }, Il = { style: { "font-family": "monospace", "font-size": "11px" } }, Pl = { style: { "font-family": "monospace", "font-size": "11px" } }, Ll = { style: { "font-size": "11px" } }, jl = /* @__PURE__ */ j({
59
59
  __name: "InternalsSection",
60
60
  setup(Nl) {
61
- const $ = x("ss-refresh-key", k(0)), P = x("ss-base-url", ""), L = x("ss-debug-endpoint", "/admin/api/debug"), N = x("ss-auth-token", void 0), e = k(null), m = k(!0), b = k(null), f = k(/* @__PURE__ */ new Set()), A = Z(P, N);
61
+ const I = x("ss-refresh-key", k(0)), P = x("ss-base-url", ""), L = x("ss-debug-endpoint", "/admin/api/debug"), N = x("ss-auth-token", void 0), e = k(null), y = k(!0), b = k(null), f = k(/* @__PURE__ */ new Set()), A = Z(P, N);
62
62
  let p = null;
63
- async function S() {
63
+ async function T() {
64
64
  try {
65
65
  const r = await A().fetch(`${L}/diagnostics`);
66
- e.value = r, b.value = null, m.value = !1;
66
+ e.value = r, b.value = null, y.value = !1;
67
67
  } catch (r) {
68
68
  if (r instanceof X) {
69
- b.value = r, m.value = !1, p && (clearInterval(p), p = null);
69
+ b.value = r, y.value = !1, p && (clearInterval(p), p = null);
70
70
  return;
71
71
  }
72
- b.value = r instanceof Error ? r : new Error(String(r)), m.value = !1;
72
+ b.value = r instanceof Error ? r : new Error(String(r)), y.value = !1;
73
73
  }
74
74
  }
75
75
  F(() => {
76
- m.value = !0, b.value = null, S(), p = setInterval(S, O);
76
+ y.value = !0, b.value = null, T(), p = setInterval(T, O);
77
77
  }), R(() => {
78
78
  p && clearInterval(p);
79
- }), U($, () => {
80
- S();
79
+ }), U(I, () => {
80
+ T();
81
81
  });
82
82
  function g(r) {
83
83
  f.value.has(r) ? f.value.delete(r) : f.value.add(r);
@@ -86,18 +86,18 @@ const _ = {
86
86
  const t = Y(r);
87
87
  return t === "ok" ? "ss-dash-dot-ok" : t === "err" ? "ss-dash-dot-err" : "";
88
88
  }
89
- function V(r) {
90
- return r.debounceMs !== void 0 ? `${M(r.debounceMs)} (debounce)` : r.intervalMs !== void 0 ? M(r.intervalMs) : "-";
89
+ function B(r) {
90
+ return r.debounceMs !== void 0 ? `${w(r.debounceMs)} (debounce)` : r.intervalMs !== void 0 ? w(r.intervalMs) : "-";
91
91
  }
92
- const E = C(() => e.value?.buffers ? Object.entries(e.value.buffers).map(([r, t]) => ({
92
+ const z = C(() => e.value?.buffers ? Object.entries(e.value.buffers).map(([r, t]) => ({
93
93
  name: r.charAt(0).toUpperCase() + r.slice(1),
94
94
  ...t,
95
95
  percent: Q(t.current, t.max)
96
- })) : []), z = C(() => e.value?.timers ? Object.entries(e.value.timers).map(([r, t]) => ({
96
+ })) : []), E = C(() => e.value?.timers ? Object.entries(e.value.timers).map(([r, t]) => ({
97
97
  key: r,
98
98
  label: H(r),
99
99
  ...t,
100
- interval: V(t)
100
+ interval: B(t)
101
101
  })) : []), D = C(() => {
102
102
  if (!e.value) return [];
103
103
  const r = [];
@@ -117,7 +117,7 @@ const _ = {
117
117
  return r;
118
118
  });
119
119
  return (r, t) => (a(), o("div", null, [
120
- m.value && !e.value ? (a(), o("div", _, "Loading diagnostics...")) : b.value && !e.value ? (a(), o("div", ll, "Error: " + s(b.value.message), 1)) : e.value ? (a(), o(u, { key: 3 }, [
120
+ y.value && !e.value ? (a(), o("div", _, "Loading diagnostics...")) : b.value && !e.value ? (a(), o("div", ll, "Error: " + s(b.value.message), 1)) : e.value ? (a(), o(u, { key: 3 }, [
121
121
  e.value.collectors?.some((n) => n.name === "db_pool" || n.name === "app") && Array.isArray(e.value.lucidDebugConnections) && e.value.lucidDebugConnections.length === 0 ? (a(), o("div", el, [...t[4] || (t[4] = [
122
122
  l("strong", null, "Query capture disabled", -1),
123
123
  d(" — no Lucid connections have ", -1),
@@ -126,7 +126,7 @@ const _ = {
126
126
  l("code", { style: { "font-size": "11px" } }, "config/database.ts", -1),
127
127
  d(" to see queries in the Queries panel. ", -1)
128
128
  ])])) : h("", !0),
129
- t[42] || (t[42] = l("h3", { class: "ss-dash-section-title" }, "Package Info", -1)),
129
+ t[44] || (t[44] = l("h3", { class: "ss-dash-section-title" }, "Package Info", -1)),
130
130
  l("div", nl, [
131
131
  (a(!0), o(u, null, v([
132
132
  { label: "Version", value: e.value.package?.version || "-" },
@@ -134,7 +134,7 @@ const _ = {
134
134
  { label: "AdonisJS", value: e.value.package?.adonisVersion || "-" },
135
135
  {
136
136
  label: "Uptime",
137
- value: T(W)(e.value.uptime || e.value.package?.uptime)
137
+ value: S(W)(e.value.uptime || e.value.package?.uptime)
138
138
  },
139
139
  { label: "Renderer", value: e.value.devToolbar?.renderer || "preact" }
140
140
  ], (n) => (a(), o("div", {
@@ -145,7 +145,7 @@ const _ = {
145
145
  l("span", al, s(n.value), 1)
146
146
  ]))), 128))
147
147
  ]),
148
- t[43] || (t[43] = l("h3", { class: "ss-dash-section-title" }, "Collectors", -1)),
148
+ t[45] || (t[45] = l("h3", { class: "ss-dash-section-title" }, "Collectors", -1)),
149
149
  e.value.collectors?.length ? (a(), o("table", rl, [
150
150
  t[5] || (t[5] = l("thead", null, [
151
151
  l("tr", null, [
@@ -165,22 +165,22 @@ const _ = {
165
165
  ]),
166
166
  l("td", null, [
167
167
  l("span", {
168
- class: y(["ss-dash-dot", c(n.status)])
168
+ class: m(["ss-dash-dot", c(n.status)])
169
169
  }, null, 2),
170
170
  d(" " + s(n.status), 1)
171
171
  ]),
172
172
  l("td", {
173
- style: w(n.lastError ? { color: "var(--ss-red-fg)" } : {})
173
+ style: M(n.lastError ? { color: "var(--ss-red-fg)" } : {})
174
174
  }, [
175
175
  n.lastError ? (a(), o(u, { key: 0 }, [
176
176
  d(s(n.lastError) + " ", 1),
177
- l("span", il, s(T(I)(n.lastErrorAt ?? 0)), 1)
177
+ l("span", il, s(S($)(n.lastErrorAt ?? 0)), 1)
178
178
  ], 64)) : (a(), o(u, { key: 1 }, [
179
179
  d("-")
180
180
  ], 64))
181
181
  ], 4),
182
182
  l("td", vl, [
183
- Object.keys(n.config || {}).length ? (a(!0), o(u, { key: 0 }, v(T(G)(n.config), (i) => (a(), o("span", {
183
+ Object.keys(n.config || {}).length ? (a(!0), o(u, { key: 0 }, v(S(G)(n.config), (i) => (a(), o("span", {
184
184
  key: i.key,
185
185
  style: { "margin-right": "8px" }
186
186
  }, [
@@ -188,13 +188,13 @@ const _ = {
188
188
  i.secret && !f.value.has(`collector-${n.name}-${i.key}`) ? (a(), o("span", {
189
189
  key: 0,
190
190
  style: { color: "var(--ss-muted)", cursor: "pointer" },
191
- onClick: (j) => g(`collector-${n.name}-${i.key}`)
191
+ onClick: (V) => g(`collector-${n.name}-${i.key}`)
192
192
  }, "••••••••", 8, bl)) : (a(), o(u, { key: 1 }, [
193
193
  l("span", null, s(i.value), 1),
194
194
  i.secret ? (a(), o("button", {
195
195
  key: 0,
196
196
  style: { background: "none", border: "none", color: "var(--ss-link-color, #3b82f6)", cursor: "pointer", "font-size": "10px", "margin-left": "4px", padding: "0" },
197
- onClick: (j) => g(`collector-${n.name}-${i.key}`)
197
+ onClick: (V) => g(`collector-${n.name}-${i.key}`)
198
198
  }, " Hide ", 8, fl)) : h("", !0)
199
199
  ], 64))
200
200
  ]))), 128)) : (a(), o(u, { key: 1 }, [
@@ -204,8 +204,8 @@ const _ = {
204
204
  ]))), 128))
205
205
  ])
206
206
  ])) : (a(), o("div", ol, "No collectors")),
207
- t[44] || (t[44] = l("h3", { class: "ss-dash-section-title" }, "Buffers", -1)),
208
- E.value.length ? (a(), o("table", gl, [
207
+ t[46] || (t[46] = l("h3", { class: "ss-dash-section-title" }, "Buffers", -1)),
208
+ z.value.length ? (a(), o("table", gl, [
209
209
  t[6] || (t[6] = l("thead", null, [
210
210
  l("tr", null, [
211
211
  l("th", null, "Buffer"),
@@ -214,29 +214,29 @@ const _ = {
214
214
  ])
215
215
  ], -1)),
216
216
  l("tbody", null, [
217
- (a(!0), o(u, null, v(E.value, (n) => (a(), o("tr", {
217
+ (a(!0), o(u, null, v(z.value, (n) => (a(), o("tr", {
218
218
  key: n.name
219
219
  }, [
220
220
  l("td", null, s(n.name), 1),
221
221
  l("td", null, s(n.current.toLocaleString()) + " / " + s(n.max.toLocaleString()), 1),
222
222
  l("td", null, [
223
- l("div", yl, [
224
- l("div", ml, [
223
+ l("div", ml, [
224
+ l("div", yl, [
225
225
  l("div", {
226
- class: y(["ss-dash-bar-fill", n.percent >= 100 ? "ss-dash-bar-fill-warn" : ""]),
227
- style: w({ width: n.percent + "%" })
226
+ class: m(["ss-dash-bar-fill", n.percent >= 100 ? "ss-dash-bar-fill-warn" : ""]),
227
+ style: M({ width: n.percent + "%" })
228
228
  }, null, 6)
229
229
  ]),
230
230
  l("span", {
231
- class: y(["ss-dash-bar-pct", n.percent >= 100 ? "ss-dash-bar-pct-warn" : ""])
231
+ class: m(["ss-dash-bar-pct", n.percent >= 100 ? "ss-dash-bar-pct-warn" : ""])
232
232
  }, s(n.percent) + "%", 3)
233
233
  ])
234
234
  ])
235
235
  ]))), 128))
236
236
  ])
237
237
  ])) : (a(), o("div", pl, "No buffer data")),
238
- t[45] || (t[45] = l("h3", { class: "ss-dash-section-title" }, "Timers", -1)),
239
- z.value.length ? (a(), o("table", hl, [
238
+ t[47] || (t[47] = l("h3", { class: "ss-dash-section-title" }, "Timers", -1)),
239
+ E.value.length ? (a(), o("table", hl, [
240
240
  t[7] || (t[7] = l("thead", null, [
241
241
  l("tr", null, [
242
242
  l("th", null, "Timer"),
@@ -245,13 +245,13 @@ const _ = {
245
245
  ])
246
246
  ], -1)),
247
247
  l("tbody", null, [
248
- (a(!0), o(u, null, v(z.value, (n) => (a(), o("tr", {
248
+ (a(!0), o(u, null, v(E.value, (n) => (a(), o("tr", {
249
249
  key: n.key
250
250
  }, [
251
251
  l("td", null, s(n.label), 1),
252
252
  l("td", null, [
253
253
  l("span", {
254
- class: y(["ss-dash-dot", c(n.active ? "active" : "inactive")])
254
+ class: m(["ss-dash-dot", c(n.active ? "active" : "inactive")])
255
255
  }, null, 2),
256
256
  d(" " + s(n.active ? "active" : "inactive"), 1)
257
257
  ]),
@@ -259,8 +259,8 @@ const _ = {
259
259
  ]))), 128))
260
260
  ])
261
261
  ])) : (a(), o("div", kl, "No timer data")),
262
- t[46] || (t[46] = l("h3", { class: "ss-dash-section-title" }, "Integrations", -1)),
263
- D.value.length ? (a(), o("table", Tl, [
262
+ t[48] || (t[48] = l("h3", { class: "ss-dash-section-title" }, "Integrations", -1)),
263
+ D.value.length ? (a(), o("table", Sl, [
264
264
  t[8] || (t[8] = l("thead", null, [
265
265
  l("tr", null, [
266
266
  l("th", null, "Integration"),
@@ -275,18 +275,18 @@ const _ = {
275
275
  l("td", null, s(n.label), 1),
276
276
  l("td", null, [
277
277
  l("span", {
278
- class: y(["ss-dash-dot", c(n.status)])
278
+ class: m(["ss-dash-dot", c(n.status)])
279
279
  }, null, 2),
280
280
  d(" " + s(n.status), 1)
281
281
  ]),
282
- l("td", Sl, s(n.details), 1)
282
+ l("td", Tl, s(n.details), 1)
283
283
  ]))), 128))
284
284
  ])
285
285
  ])) : (a(), o("div", xl, "No integration data")),
286
286
  e.value.storage ? (a(), o(u, { key: 9 }, [
287
- t[17] || (t[17] = l("h3", { class: "ss-dash-section-title" }, "Storage", -1)),
287
+ t[18] || (t[18] = l("h3", { class: "ss-dash-section-title" }, "Storage", -1)),
288
288
  l("table", Cl, [
289
- t[15] || (t[15] = l("thead", null, [
289
+ t[16] || (t[16] = l("thead", null, [
290
290
  l("tr", null, [
291
291
  l("th", null, "Metric"),
292
292
  l("th", null, "Value")
@@ -297,7 +297,7 @@ const _ = {
297
297
  t[9] || (t[9] = l("td", null, "Status", -1)),
298
298
  l("td", null, [
299
299
  l("span", {
300
- class: y([
300
+ class: m([
301
301
  "ss-dash-dot",
302
302
  c(e.value.storage.ready ? "ready" : "unavailable")
303
303
  ])
@@ -307,7 +307,7 @@ const _ = {
307
307
  ]),
308
308
  l("tr", null, [
309
309
  t[10] || (t[10] = l("td", null, "DB Path", -1)),
310
- l("td", El, s(e.value.storage.dbPath), 1)
310
+ l("td", zl, s(e.value.storage.dbPath), 1)
311
311
  ]),
312
312
  l("tr", null, [
313
313
  t[11] || (t[11] = l("td", null, "File Size", -1)),
@@ -322,13 +322,17 @@ const _ = {
322
322
  l("td", null, s(e.value.storage.retentionDays) + " days", 1)
323
323
  ]),
324
324
  l("tr", null, [
325
- t[14] || (t[14] = l("td", null, "Last Cleanup", -1)),
326
- l("td", null, s(T(I)(e.value.storage.lastCleanupAt ?? 0)), 1)
325
+ t[14] || (t[14] = l("td", null, "Size Cap", -1)),
326
+ l("td", null, s(e.value.storage.maxDbSizeMb > 0 ? `${e.value.storage.maxDbSizeMb} MB` : "off"), 1)
327
+ ]),
328
+ l("tr", null, [
329
+ t[15] || (t[15] = l("td", null, "Last Cleanup", -1)),
330
+ l("td", null, s(S($)(e.value.storage.lastCleanupAt ?? 0)), 1)
327
331
  ])
328
332
  ])
329
333
  ]),
330
- e.value.storage.tables?.length ? (a(), o("table", zl, [
331
- t[16] || (t[16] = l("thead", null, [
334
+ e.value.storage.tables?.length ? (a(), o("table", El, [
335
+ t[17] || (t[17] = l("thead", null, [
332
336
  l("tr", null, [
333
337
  l("th", null, "Table"),
334
338
  l("th", null, "Rows")
@@ -344,9 +348,9 @@ const _ = {
344
348
  ])
345
349
  ])) : h("", !0)
346
350
  ], 64)) : h("", !0),
347
- t[47] || (t[47] = l("h3", { class: "ss-dash-section-title" }, "Resolved Config", -1)),
348
- l("table", wl, [
349
- t[25] || (t[25] = l("thead", null, [
351
+ t[49] || (t[49] = l("h3", { class: "ss-dash-section-title" }, "Resolved Config", -1)),
352
+ l("table", Ml, [
353
+ t[26] || (t[26] = l("thead", null, [
350
354
  l("tr", null, [
351
355
  l("th", null, "Setting"),
352
356
  l("th", null, "Value")
@@ -354,38 +358,38 @@ const _ = {
354
358
  ], -1)),
355
359
  l("tbody", null, [
356
360
  l("tr", null, [
357
- t[18] || (t[18] = l("td", null, "intervalMs", -1)),
361
+ t[19] || (t[19] = l("td", null, "intervalMs", -1)),
358
362
  l("td", null, s(e.value.config?.intervalMs), 1)
359
363
  ]),
360
364
  l("tr", null, [
361
- t[19] || (t[19] = l("td", null, "transport", -1)),
365
+ t[20] || (t[20] = l("td", null, "transport", -1)),
362
366
  l("td", null, s(e.value.config?.transport), 1)
363
367
  ]),
364
368
  l("tr", null, [
365
- t[20] || (t[20] = l("td", null, "channelName", -1)),
369
+ t[21] || (t[21] = l("td", null, "channelName", -1)),
366
370
  l("td", null, s(e.value.config?.channelName), 1)
367
371
  ]),
368
372
  l("tr", null, [
369
- t[21] || (t[21] = l("td", null, "endpoint", -1)),
373
+ t[22] || (t[22] = l("td", null, "endpoint", -1)),
370
374
  l("td", null, s(e.value.config?.endpoint === !1 ? "false" : e.value.config?.endpoint), 1)
371
375
  ]),
372
376
  l("tr", null, [
373
- t[22] || (t[22] = l("td", null, "skipInTest", -1)),
377
+ t[23] || (t[23] = l("td", null, "skipInTest", -1)),
374
378
  l("td", null, s(e.value.config?.skipInTest), 1)
375
379
  ]),
376
380
  l("tr", null, [
377
- t[23] || (t[23] = l("td", null, "onStats callback", -1)),
381
+ t[24] || (t[24] = l("td", null, "onStats callback", -1)),
378
382
  l("td", null, s(e.value.config?.hasOnStatsCallback ? "defined" : "not defined"), 1)
379
383
  ]),
380
384
  l("tr", null, [
381
- t[24] || (t[24] = l("td", null, "shouldShow callback", -1)),
385
+ t[25] || (t[25] = l("td", null, "shouldShow callback", -1)),
382
386
  l("td", null, s(e.value.config?.hasShouldShowCallback ? "defined" : "not defined"), 1)
383
387
  ])
384
388
  ])
385
389
  ]),
386
- t[48] || (t[48] = l("h4", { class: "ss-dash-section-title" }, "DevToolbar", -1)),
387
- l("table", Il, [
388
- t[41] || (t[41] = l("thead", null, [
390
+ t[50] || (t[50] = l("h4", { class: "ss-dash-section-title" }, "DevToolbar", -1)),
391
+ l("table", $l, [
392
+ t[43] || (t[43] = l("thead", null, [
389
393
  l("tr", null, [
390
394
  l("th", null, "Setting"),
391
395
  l("th", null, "Value")
@@ -393,24 +397,24 @@ const _ = {
393
397
  ], -1)),
394
398
  l("tbody", null, [
395
399
  l("tr", null, [
396
- t[26] || (t[26] = l("td", null, "enabled", -1)),
400
+ t[27] || (t[27] = l("td", null, "enabled", -1)),
397
401
  l("td", null, s(e.value.devToolbar?.enabled), 1)
398
402
  ]),
399
403
  l("tr", null, [
400
- t[27] || (t[27] = l("td", null, "tracing", -1)),
404
+ t[28] || (t[28] = l("td", null, "tracing", -1)),
401
405
  l("td", null, s(e.value.devToolbar?.tracing), 1)
402
406
  ]),
403
407
  l("tr", null, [
404
- t[28] || (t[28] = l("td", null, "dashboard", -1)),
408
+ t[29] || (t[29] = l("td", null, "dashboard", -1)),
405
409
  l("td", null, s(e.value.devToolbar?.dashboard), 1)
406
410
  ]),
407
411
  l("tr", null, [
408
- t[29] || (t[29] = l("td", null, "dashboardPath", -1)),
409
- l("td", Ml, s(e.value.devToolbar?.dashboardPath), 1)
412
+ t[30] || (t[30] = l("td", null, "dashboardPath", -1)),
413
+ l("td", wl, s(e.value.devToolbar?.dashboardPath), 1)
410
414
  ]),
411
415
  l("tr", null, [
412
- t[30] || (t[30] = l("td", null, "debugEndpoint", -1)),
413
- l("td", $l, [
416
+ t[31] || (t[31] = l("td", null, "debugEndpoint", -1)),
417
+ l("td", Il, [
414
418
  f.value.has("cfg-debugEndpoint") ? (a(), o(u, { key: 1 }, [
415
419
  d(s(e.value.devToolbar?.debugEndpoint) + " ", 1),
416
420
  l("button", {
@@ -425,31 +429,35 @@ const _ = {
425
429
  ])
426
430
  ]),
427
431
  l("tr", null, [
428
- t[31] || (t[31] = l("td", null, "maxQueries", -1)),
432
+ t[32] || (t[32] = l("td", null, "maxQueries", -1)),
429
433
  l("td", null, s(e.value.devToolbar?.maxQueries), 1)
430
434
  ]),
431
435
  l("tr", null, [
432
- t[32] || (t[32] = l("td", null, "maxEvents", -1)),
436
+ t[33] || (t[33] = l("td", null, "maxEvents", -1)),
433
437
  l("td", null, s(e.value.devToolbar?.maxEvents), 1)
434
438
  ]),
435
439
  l("tr", null, [
436
- t[33] || (t[33] = l("td", null, "maxEmails", -1)),
440
+ t[34] || (t[34] = l("td", null, "maxEmails", -1)),
437
441
  l("td", null, s(e.value.devToolbar?.maxEmails), 1)
438
442
  ]),
439
443
  l("tr", null, [
440
- t[34] || (t[34] = l("td", null, "maxTraces", -1)),
444
+ t[35] || (t[35] = l("td", null, "maxTraces", -1)),
441
445
  l("td", null, s(e.value.devToolbar?.maxTraces), 1)
442
446
  ]),
443
447
  l("tr", null, [
444
- t[35] || (t[35] = l("td", null, "slowQueryThresholdMs", -1)),
448
+ t[36] || (t[36] = l("td", null, "slowQueryThresholdMs", -1)),
445
449
  l("td", null, s(e.value.devToolbar?.slowQueryThresholdMs), 1)
446
450
  ]),
447
451
  l("tr", null, [
448
- t[36] || (t[36] = l("td", null, "retentionDays", -1)),
452
+ t[37] || (t[37] = l("td", null, "retentionDays", -1)),
449
453
  l("td", null, s(e.value.devToolbar?.retentionDays), 1)
450
454
  ]),
451
455
  l("tr", null, [
452
- t[37] || (t[37] = l("td", null, "dbPath", -1)),
456
+ t[38] || (t[38] = l("td", null, "maxDbSizeMb", -1)),
457
+ l("td", null, s(e.value.devToolbar?.maxDbSizeMb), 1)
458
+ ]),
459
+ l("tr", null, [
460
+ t[39] || (t[39] = l("td", null, "dbPath", -1)),
453
461
  l("td", Pl, [
454
462
  f.value.has("cfg-dbPath") ? (a(), o(u, { key: 1 }, [
455
463
  d(s(e.value.devToolbar?.dbPath) + " ", 1),
@@ -465,15 +473,15 @@ const _ = {
465
473
  ])
466
474
  ]),
467
475
  l("tr", null, [
468
- t[38] || (t[38] = l("td", null, "persistDebugData", -1)),
476
+ t[40] || (t[40] = l("td", null, "persistDebugData", -1)),
469
477
  l("td", null, s(e.value.devToolbar?.persistDebugData), 1)
470
478
  ]),
471
479
  l("tr", null, [
472
- t[39] || (t[39] = l("td", null, "excludeFromTracing", -1)),
480
+ t[41] || (t[41] = l("td", null, "excludeFromTracing", -1)),
473
481
  l("td", Ll, s(e.value.devToolbar?.excludeFromTracing?.join(", ") || "-"), 1)
474
482
  ]),
475
483
  l("tr", null, [
476
- t[40] || (t[40] = l("td", null, "customPanes", -1)),
484
+ t[42] || (t[42] = l("td", null, "customPanes", -1)),
477
485
  l("td", null, s(e.value.devToolbar?.customPaneCount ?? 0) + " registered", 1)
478
486
  ])
479
487
  ])
@@ -483,5 +491,5 @@ const _ = {
483
491
  }
484
492
  });
485
493
  export {
486
- Bl as default
494
+ jl as default
487
495
  };