adonisjs-server-stats 1.16.1 → 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 (109) hide show
  1. package/README.md +25 -8
  2. package/dist/core/core/dashboard-api.d.ts +6 -4
  3. package/dist/core/core/define-config-helpers.d.ts +1 -0
  4. package/dist/core/core/types-diagnostics.d.ts +2 -0
  5. package/dist/core/debug/types.d.ts +2 -0
  6. package/dist/core/index.js +9 -6
  7. package/dist/core/types.d.ts +55 -4
  8. package/dist/react/{CacheSection-DkLtukWz.js → CacheSection-B-lSIN8Q.js} +48 -44
  9. package/dist/react/{CacheTab-DWeXnEBI.js → CacheTab-BN0QgPXz.js} +1 -1
  10. package/dist/react/{ConfigSection-DaVbFPDg.js → ConfigSection-u_TSfb9f.js} +1 -1
  11. package/dist/react/{ConfigTab-D4640WJZ.js → ConfigTab-au26s-ON.js} +1 -1
  12. package/dist/react/{CustomPaneTab-DglmAVMC.js → CustomPaneTab-qvMnh8ss.js} +1 -1
  13. package/dist/react/{EmailsSection-vYx6ExTb.js → EmailsSection-HfEMeRex.js} +65 -57
  14. package/dist/react/{EmailsTab-DKDrRmRH.js → EmailsTab-BWwq-CxB.js} +1 -1
  15. package/dist/react/{EventsSection-CapH5xut.js → EventsSection-CA9b15dJ.js} +1 -1
  16. package/dist/react/{EventsTab-BNVEySAm.js → EventsTab-CgSdHbKU.js} +1 -1
  17. package/dist/react/{InternalsContent-C9lIA92C.js → InternalsContent-CI7HvBtH.js} +51 -47
  18. package/dist/react/{InternalsSection-lOv_UcSV.js → InternalsSection-IEeWXJqP.js} +1 -1
  19. package/dist/react/{InternalsTab-BygoSorC.js → InternalsTab-CoVLHQbF.js} +1 -1
  20. package/dist/react/{JobsSection-ZIQsJWid.js → JobsSection-DgsS_VwU.js} +1 -1
  21. package/dist/react/{JobsTab-DXQzXrDt.js → JobsTab-CzwLSRUC.js} +1 -1
  22. package/dist/react/{LogEntryRow-BWkHE51-.js → LogEntryRow-VCCzwD1H.js} +1 -1
  23. package/dist/react/{LogsSection-ConXdBkL.js → LogsSection-BujNn_cO.js} +2 -2
  24. package/dist/react/{LogsTab-CJM47LPn.js → LogsTab-BtD1h7DM.js} +2 -2
  25. package/dist/react/{OverviewSection-DOMu2qvl.js → OverviewSection-B28em0gQ.js} +119 -111
  26. package/dist/react/{QueriesSection-DFsaOSJI.js → QueriesSection-B0tFn_Dc.js} +1 -1
  27. package/dist/react/{QueriesTab-CY9CG_7L.js → QueriesTab-DJY7aavR.js} +1 -1
  28. package/dist/react/{RequestsSection-CC-eVHsl.js → RequestsSection-DPmYM7tq.js} +2 -2
  29. package/dist/react/{RoutesSection-p1DMq41y.js → RoutesSection-Ck-RcFVS.js} +1 -1
  30. package/dist/react/{RoutesTab-Cnqy8UcK.js → RoutesTab-Ch3PDLzo.js} +1 -1
  31. package/dist/react/{SplitPaneWrapper-XgkA0QxE.js → SplitPaneWrapper-BZ6VrBr-.js} +1 -1
  32. package/dist/react/{TimelineTab-1YOERxe5.js → TimelineTab-_byxh2mJ.js} +2 -2
  33. package/dist/react/components/Dashboard/overview-data-context.d.ts +15 -0
  34. package/dist/react/components/Dashboard/sections/OverviewSection.d.ts +9 -0
  35. package/dist/react/{index-DOSlCpZ9.js → index-De7nsWBN.js} +148 -141
  36. package/dist/react/index.js +1 -1
  37. package/dist/src/collectors/app_collector.d.ts +11 -0
  38. package/dist/src/collectors/app_collector.js +11 -0
  39. package/dist/src/collectors/redis_collector.js +13 -13
  40. package/dist/src/dashboard/cache_handlers.d.ts +17 -3
  41. package/dist/src/dashboard/cache_handlers.js +14 -19
  42. package/dist/src/dashboard/coalesce_cache.d.ts +2 -8
  43. package/dist/src/dashboard/coalesce_cache.js +25 -0
  44. package/dist/src/dashboard/dashboard_controller.d.ts +1 -0
  45. package/dist/src/dashboard/dashboard_controller.js +8 -3
  46. package/dist/src/dashboard/dashboard_store.d.ts +0 -1
  47. package/dist/src/dashboard/dashboard_store.js +18 -18
  48. package/dist/src/dashboard/filter_handlers.js +26 -4
  49. package/dist/src/dashboard/flush_manager.d.ts +1 -0
  50. package/dist/src/dashboard/flush_manager.js +6 -1
  51. package/dist/src/dashboard/format_helpers.d.ts +0 -4
  52. package/dist/src/dashboard/format_helpers.js +0 -19
  53. package/dist/src/dashboard/integrations/config_inspector.js +6 -3
  54. package/dist/src/dashboard/knex_factory.js +8 -0
  55. package/dist/src/dashboard/migrator.d.ts +7 -2
  56. package/dist/src/dashboard/migrator.js +140 -6
  57. package/dist/src/dashboard/migrator_tables.js +8 -0
  58. package/dist/src/dashboard/paginate_helper.js +21 -11
  59. package/dist/src/dashboard/sensitive_patterns.d.ts +37 -0
  60. package/dist/src/dashboard/sensitive_patterns.js +146 -5
  61. package/dist/src/dashboard/storage_stats.d.ts +5 -0
  62. package/dist/src/dashboard/storage_stats.js +15 -1
  63. package/dist/src/dashboard/write_queue.d.ts +20 -21
  64. package/dist/src/dashboard/write_queue.js +37 -60
  65. package/dist/src/debug/query_collector.js +6 -1
  66. package/dist/src/debug/trace_collector.js +26 -13
  67. package/dist/src/debug/types.d.ts +2 -0
  68. package/dist/src/define_config.js +2 -0
  69. package/dist/src/edge/client/dashboard.js +2 -2
  70. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  71. package/dist/src/edge/client-vue/dashboard.js +5 -5
  72. package/dist/src/edge/client-vue/debug-panel-deferred.js +2 -2
  73. package/dist/src/edge/views/dashboard.edge +1 -1
  74. package/dist/src/edge/views/debug-panel.edge +1 -1
  75. package/dist/src/edge/views/stats-bar.edge +1 -1
  76. package/dist/src/middleware/request_tracking_middleware.js +7 -2
  77. package/dist/src/provider/dashboard_init.d.ts +9 -1
  78. package/dist/src/provider/dashboard_init.js +10 -0
  79. package/dist/src/provider/dashboard_setup.js +14 -0
  80. package/dist/src/provider/diagnostics.d.ts +2 -0
  81. package/dist/src/provider/diagnostics.js +1 -0
  82. package/dist/src/provider/email_helpers.js +20 -5
  83. package/dist/src/provider/server_stats_provider.d.ts +10 -0
  84. package/dist/src/provider/server_stats_provider.js +26 -7
  85. package/dist/src/provider/shutdown_helpers.js +3 -1
  86. package/dist/src/provider/toolbar_setup.js +21 -15
  87. package/dist/src/stubs/config.stub +4 -0
  88. package/dist/src/types.d.ts +55 -4
  89. package/dist/vue/CacheSection-z2TQRez9.js +161 -0
  90. package/dist/vue/{ConfigSection-BiRAiaHj.js → ConfigSection-CFEaig69.js} +1 -1
  91. package/dist/vue/{EmailsSection-Dl44qyqY.js → EmailsSection-CYohBo62.js} +89 -85
  92. package/dist/vue/{EventsSection-CWjeitjU.js → EventsSection-B_TuVrGj.js} +1 -1
  93. package/dist/vue/{InternalsSection-jhTCuK3j.js → InternalsSection-B1P2kNT-.js} +92 -84
  94. package/dist/vue/{InternalsTab-Z3c82glB.js → InternalsTab-CRI-IFTo.js} +155 -147
  95. package/dist/vue/{JobsSection-DOBb4LjZ.js → JobsSection-AjkEzyiv.js} +1 -1
  96. package/dist/vue/{LogsSection-CXx-HOWJ.js → LogsSection-DZD0CCDi.js} +1 -1
  97. package/dist/vue/{OverviewSection-CyfNQ8uV.js → OverviewSection-BEc4Gktf.js} +1 -1
  98. package/dist/vue/{QueriesSection-CXBsFp-y.js → QueriesSection-BMImGXTn.js} +1 -1
  99. package/dist/vue/{RequestsSection-YTIaZGZd.js → RequestsSection-DOI2MUFX.js} +1 -1
  100. package/dist/vue/{RoutesSection-CDKMey49.js → RoutesSection-C1sxt-AW.js} +1 -1
  101. package/dist/vue/composables/useDashboardData.d.ts +1 -1
  102. package/dist/vue/{index-14x39RI_.js → index-BfPAAjL5.js} +95 -95
  103. package/dist/vue/index.js +1 -1
  104. package/package.json +12 -3
  105. package/dist/src/dashboard/explain_query.d.ts +0 -8
  106. package/dist/src/dashboard/explain_query.js +0 -22
  107. package/dist/src/provider/boot_initializer.d.ts +0 -28
  108. package/dist/src/provider/boot_initializer.js +0 -35
  109. package/dist/vue/CacheSection-CxEBVVkF.js +0 -156
@@ -1,65 +1,73 @@
1
- import { jsx as s, jsxs as y, Fragment as P } from "react/jsx-runtime";
2
- import { useState as l, useEffect as T, useCallback as j } from "react";
3
- import { resolveCcAddr as N, resolveToAddr as f, resolveFromAddr as b, resolveAttachmentCount as F, resolveTimestamp as _ } from "adonisjs-server-stats/core";
4
- import { T as $ } from "./TimeAgoCell-o3KigGfM.js";
5
- import { a as D } from "./index-DOSlCpZ9.js";
6
- import { D as E } from "./DataTable-YyShr5B-.js";
7
- import { F as O } from "./FilterBar-CQ7bD669.js";
8
- import { E as B } from "./EmailPreviewOverlay-BmXOAvqG.js";
9
- import { P as H } from "./Pagination-BkmzUDY8.js";
10
- function Q({ options: o = {} }) {
11
- const [x, d] = l(1), [i, g] = l(""), [m, n] = l(null), [p, c] = l(null), { data: h, meta: r, isLoading: k } = D("emails", { ...o, page: x, search: i }), u = h || [];
12
- T(() => d(1), [i]);
13
- const A = j(
1
+ import { jsx as s, jsxs as b, Fragment as E } from "react/jsx-runtime";
2
+ import { useState as o, useRef as N, useEffect as y, useCallback as F } from "react";
3
+ import { resolveCcAddr as _, resolveToAddr as g, resolveFromAddr as x, resolveAttachmentCount as $, resolveTimestamp as D } from "adonisjs-server-stats/core";
4
+ import { a as O } from "./index-De7nsWBN.js";
5
+ import { E as R } from "./EmailPreviewOverlay-BmXOAvqG.js";
6
+ import { F as B } from "./FilterBar-CQ7bD669.js";
7
+ import { T as H } from "./TimeAgoCell-o3KigGfM.js";
8
+ import { D as I } from "./DataTable-YyShr5B-.js";
9
+ import { P as L } from "./Pagination-BkmzUDY8.js";
10
+ function X({ options: n = {} }) {
11
+ const [k, m] = o(1), [i, A] = o(""), [p, c] = o(null), [h, d] = o(null), a = N(null), { data: u, meta: l, isLoading: C } = O("emails", { ...n, page: k, search: i }), w = u || [];
12
+ y(() => m(1), [i]);
13
+ const S = F(
14
14
  async (e) => {
15
- if (e.html) {
16
- n(e.id), c(e.html);
15
+ if (a.current?.abort(), e.html) {
16
+ a.current = null, c(e.id), d(e.html);
17
17
  return;
18
18
  }
19
+ const t = new AbortController();
20
+ a.current = t;
19
21
  try {
20
- const { baseUrl: t = "", dashboardEndpoint: a = "/__stats/api", authToken: w } = o, S = `${t}${a}/emails/${e.id}/preview`, v = { Accept: "text/html" };
21
- w && (v.Authorization = `Bearer ${w}`);
22
- const C = await (await fetch(S, { headers: v, credentials: "same-origin" })).text();
23
- n(e.id), c(C);
24
- } catch {
22
+ const { baseUrl: r = "", dashboardEndpoint: P = "/__stats/api", authToken: v } = n, T = `${r}${P}/emails/${e.id}/preview`, f = { Accept: "text/html" };
23
+ v && (f.Authorization = `Bearer ${v}`);
24
+ const j = await (await fetch(T, {
25
+ headers: f,
26
+ credentials: "same-origin",
27
+ signal: t.signal
28
+ })).text();
29
+ if (a.current !== t) return;
30
+ c(e.id), d(j);
31
+ } catch (r) {
32
+ if (r instanceof Error && r.name === "AbortError") return;
25
33
  }
26
34
  },
27
- [o]
35
+ [n]
28
36
  );
29
- if (m && p) {
30
- const e = u.find((a) => a.id === m), t = e ? {
37
+ if (y(() => () => a.current?.abort(), []), p && h) {
38
+ const e = w.find((r) => r.id === p), t = e ? {
31
39
  subject: e.subject,
32
- from: b(e),
33
- to: f(e),
34
- cc: N(e) || null,
40
+ from: x(e),
41
+ to: g(e),
42
+ cc: _(e) || null,
35
43
  status: e.status,
36
44
  mailer: e.mailer
37
45
  } : null;
38
46
  return /* @__PURE__ */ s(
39
- B,
47
+ R,
40
48
  {
41
49
  email: t,
42
- previewHtml: p,
50
+ previewHtml: h,
43
51
  onClose: () => {
44
- n(null), c(null);
52
+ c(null), d(null);
45
53
  },
46
54
  className: "ss-dash-email-preview"
47
55
  }
48
56
  );
49
57
  }
50
- return /* @__PURE__ */ y("div", { children: [
58
+ return /* @__PURE__ */ b("div", { children: [
51
59
  /* @__PURE__ */ s(
52
- O,
60
+ B,
53
61
  {
54
62
  search: i,
55
- onSearchChange: g,
63
+ onSearchChange: A,
56
64
  placeholder: "Filter emails...",
57
- summary: `${r?.total ?? 0} emails`
65
+ summary: `${l?.total ?? 0} emails`
58
66
  }
59
67
  ),
60
- k && !h ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", children: "Loading emails..." }) : /* @__PURE__ */ y(P, { children: [
68
+ C && !u ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", children: "Loading emails..." }) : /* @__PURE__ */ b(E, { children: [
61
69
  /* @__PURE__ */ s("div", { className: "ss-dash-table-wrap", children: /* @__PURE__ */ s(
62
- E,
70
+ I,
63
71
  {
64
72
  columns: [
65
73
  {
@@ -73,11 +81,11 @@ function Q({ options: o = {} }) {
73
81
  label: "From",
74
82
  width: "150px",
75
83
  render: (e, t) => {
76
- const a = b(t);
84
+ const r = x(t);
77
85
  return /* @__PURE__ */ s(
78
86
  "span",
79
87
  {
80
- title: a,
88
+ title: r,
81
89
  style: {
82
90
  color: "var(--ss-text-secondary)",
83
91
  overflow: "hidden",
@@ -85,7 +93,7 @@ function Q({ options: o = {} }) {
85
93
  whiteSpace: "nowrap",
86
94
  display: "block"
87
95
  },
88
- children: a
96
+ children: r
89
97
  }
90
98
  );
91
99
  }
@@ -95,11 +103,11 @@ function Q({ options: o = {} }) {
95
103
  label: "To",
96
104
  width: "150px",
97
105
  render: (e, t) => {
98
- const a = f(t);
106
+ const r = g(t);
99
107
  return /* @__PURE__ */ s(
100
108
  "span",
101
109
  {
102
- title: a,
110
+ title: r,
103
111
  style: {
104
112
  color: "var(--ss-text-secondary)",
105
113
  overflow: "hidden",
@@ -107,7 +115,7 @@ function Q({ options: o = {} }) {
107
115
  whiteSpace: "nowrap",
108
116
  display: "block"
109
117
  },
110
- children: a
118
+ children: r
111
119
  }
112
120
  );
113
121
  }
@@ -147,12 +155,12 @@ function Q({ options: o = {} }) {
147
155
  label: "ATT",
148
156
  width: "40px",
149
157
  render: (e, t) => {
150
- const a = F(t);
151
- return a > 0 ? /* @__PURE__ */ s(
158
+ const r = $(t);
159
+ return r > 0 ? /* @__PURE__ */ s(
152
160
  "span",
153
161
  {
154
162
  style: { color: "var(--ss-dim)", textAlign: "center", display: "block" },
155
- children: a
163
+ children: r
156
164
  }
157
165
  ) : /* @__PURE__ */ s(
158
166
  "span",
@@ -190,11 +198,11 @@ function Q({ options: o = {} }) {
190
198
  label: "Time",
191
199
  width: "80px",
192
200
  render: (e, t) => {
193
- const a = _(t);
201
+ const r = D(t);
194
202
  return /* @__PURE__ */ s(
195
- $,
203
+ H,
196
204
  {
197
- ts: a,
205
+ ts: r,
198
206
  className: "ss-dash-event-time",
199
207
  style: { whiteSpace: "nowrap" }
200
208
  }
@@ -202,25 +210,25 @@ function Q({ options: o = {} }) {
202
210
  }
203
211
  }
204
212
  ],
205
- data: u,
206
- onRowClick: A,
213
+ data: w,
214
+ onRowClick: S,
207
215
  rowClassName: "ss-dash-email-row",
208
216
  emptyMessage: "No emails captured yet"
209
217
  }
210
218
  ) }),
211
- r && /* @__PURE__ */ s(
212
- H,
219
+ l && /* @__PURE__ */ s(
220
+ L,
213
221
  {
214
- page: r.page,
215
- lastPage: r.lastPage,
216
- total: r.total,
217
- onPageChange: d
222
+ page: l.page,
223
+ lastPage: l.lastPage,
224
+ total: l.total,
225
+ onPageChange: m
218
226
  }
219
227
  )
220
228
  ] })
221
229
  ] });
222
230
  }
223
231
  export {
224
- Q as EmailsSection,
225
- Q as default
232
+ X as EmailsSection,
233
+ X as default
226
234
  };
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
2
  import { useState as c, useRef as A, useMemo as v, useCallback as y, useEffect as S } from "react";
3
3
  import { resolveTimestamp as j } from "adonisjs-server-stats/core";
4
4
  import { T as q } from "./TimeAgoCell-o3KigGfM.js";
5
- import { u as $ } from "./index-DOSlCpZ9.js";
5
+ import { u as $ } from "./index-De7nsWBN.js";
6
6
  import { u as F } from "./useResizableTable-CNJmACdt.js";
7
7
  import { F as R } from "./FilterBar-CQ7bD669.js";
8
8
  import { E as M } from "./EmailPreviewOverlay-BmXOAvqG.js";
@@ -2,7 +2,7 @@ import { jsxs as i, jsx as e, Fragment as g } from "react/jsx-runtime";
2
2
  import { useState as m, useEffect as f } from "react";
3
3
  import { resolveEventName as y, resolveTimestamp as u } from "adonisjs-server-stats/core";
4
4
  import { T as w } from "./TimeAgoCell-o3KigGfM.js";
5
- import { a as b, J as N } from "./index-DOSlCpZ9.js";
5
+ import { a as b, J as N } from "./index-De7nsWBN.js";
6
6
  import { D as x } from "./DataTable-YyShr5B-.js";
7
7
  import { F as P } from "./FilterBar-CQ7bD669.js";
8
8
  import { P as k } from "./Pagination-BkmzUDY8.js";
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import { useState as p, useMemo as u } from "react";
3
3
  import { resolveTimestamp as g } from "adonisjs-server-stats/core";
4
4
  import { T as b } from "./TimeAgoCell-o3KigGfM.js";
5
- import { u as f, J as v } from "./index-DOSlCpZ9.js";
5
+ import { u as f, J as v } from "./index-De7nsWBN.js";
6
6
  import { u as w } from "./useResizableTable-CNJmACdt.js";
7
7
  import { F as y } from "./FilterBar-CQ7bD669.js";
8
8
  function E({ options: c }) {
@@ -1,33 +1,33 @@
1
- import { useState as f, useRef as T, useCallback as x, useEffect as M } from "react";
2
- import { UnauthorizedError as E, formatConfigVal as I, isSecretKey as C, formatUptime as R, timeAgo as N, getTimerLabel as j, formatDuration as w, getIntegrationLabel as z, TAB_ICONS as y, classifyStatus as D } from "adonisjs-server-stats/core";
1
+ import { useState as f, useRef as z, useCallback as x, useEffect as A } from "react";
2
+ import { UnauthorizedError as T, formatConfigVal as C, isSecretKey as I, formatUptime as D, timeAgo as N, getTimerLabel as E, formatDuration as w, getIntegrationLabel as R, TAB_ICONS as S, classifyStatus as j } from "adonisjs-server-stats/core";
3
3
  import { u as B } from "./useApiClient-CtEG7rHs.js";
4
- import { jsx as e, jsxs as n, Fragment as $ } from "react/jsx-runtime";
4
+ import { jsx as e, jsxs as n, Fragment as y } from "react/jsx-runtime";
5
5
  function H(t = {}) {
6
6
  const {
7
7
  baseUrl: c = "",
8
- debugEndpoint: s = "/admin/api/debug",
8
+ debugEndpoint: d = "/admin/api/debug",
9
9
  authToken: i,
10
- refreshInterval: d = 3e3
11
- } = t, [u, b] = f(null), [v, g] = f(!0), [S, r] = f(null), l = T(null), a = B(c, i), h = x(async () => {
10
+ refreshInterval: s = 3e3
11
+ } = t, [u, b] = f(null), [v, g] = f(!0), [$, r] = f(null), l = z(null), a = B(c, i), h = x(async () => {
12
12
  try {
13
- const A = await a().get(`${s}/diagnostics`);
14
- b(A), r(null), g(!1);
13
+ const M = await a().get(`${d}/diagnostics`);
14
+ b(M), r(null), g(!1);
15
15
  } catch (o) {
16
- if (o instanceof E) {
16
+ if (o instanceof T) {
17
17
  r(o), g(!1), l.current && (clearInterval(l.current), l.current = null);
18
18
  return;
19
19
  }
20
20
  r(o instanceof Error ? o : new Error(String(o))), g(!1);
21
21
  }
22
- }, [s, a]);
23
- return M(() => (g(!0), r(null), h(), l.current = setInterval(h, d), () => {
22
+ }, [d, a]);
23
+ return A(() => (g(!0), r(null), h(), l.current = setInterval(h, s), () => {
24
24
  l.current && (clearInterval(l.current), l.current = null);
25
- }), [h, d]), { data: u, isLoading: v, error: S };
25
+ }), [h, s]), { data: u, isLoading: v, error: $ };
26
26
  }
27
27
  function p({ status: t, prefix: c }) {
28
- const s = D(t);
28
+ const d = j(t);
29
29
  let i = `${c}-dot`;
30
- return s === "ok" ? i += ` ${c}-dot-ok` : s === "err" && (i += ` ${c}-dot-err`), /* @__PURE__ */ e("span", { className: i });
30
+ return d === "ok" ? i += ` ${c}-dot-ok` : d === "err" && (i += ` ${c}-dot-err`), /* @__PURE__ */ e("span", { className: i });
31
31
  }
32
32
  const L = () => /* @__PURE__ */ e(
33
33
  "svg",
@@ -35,13 +35,13 @@ const L = () => /* @__PURE__ */ e(
35
35
  xmlns: "http://www.w3.org/2000/svg",
36
36
  width: "12",
37
37
  height: "12",
38
- viewBox: y.eye.viewBox,
38
+ viewBox: S.eye.viewBox,
39
39
  fill: "none",
40
40
  stroke: "currentColor",
41
41
  strokeWidth: "2",
42
42
  strokeLinecap: "round",
43
43
  strokeLinejoin: "round",
44
- dangerouslySetInnerHTML: { __html: y.eye.elements.join("") }
44
+ dangerouslySetInnerHTML: { __html: S.eye.elements.join("") }
45
45
  }
46
46
  ), k = () => /* @__PURE__ */ e(
47
47
  "svg",
@@ -49,17 +49,17 @@ const L = () => /* @__PURE__ */ e(
49
49
  xmlns: "http://www.w3.org/2000/svg",
50
50
  width: "12",
51
51
  height: "12",
52
- viewBox: y["eye-off"].viewBox,
52
+ viewBox: S["eye-off"].viewBox,
53
53
  fill: "none",
54
54
  stroke: "currentColor",
55
55
  strokeWidth: "2",
56
56
  strokeLinecap: "round",
57
57
  strokeLinejoin: "round",
58
- dangerouslySetInnerHTML: { __html: y["eye-off"].elements.join("") }
58
+ dangerouslySetInnerHTML: { __html: S["eye-off"].elements.join("") }
59
59
  }
60
60
  );
61
61
  function V({ value: t }) {
62
- const [c, s] = f(!1);
62
+ const [c, d] = f(!1);
63
63
  return /* @__PURE__ */ n("span", { children: [
64
64
  c ? t : "••••••••",
65
65
  " ",
@@ -67,7 +67,7 @@ function V({ value: t }) {
67
67
  "button",
68
68
  {
69
69
  type: "button",
70
- onClick: () => s((i) => !i),
70
+ onClick: () => d((i) => !i),
71
71
  style: {
72
72
  background: "none",
73
73
  border: "1px solid var(--ss-border)",
@@ -83,39 +83,39 @@ function V({ value: t }) {
83
83
  )
84
84
  ] });
85
85
  }
86
- function O({ current: t, max: c, prefix: s }) {
87
- const i = c > 0 ? Math.min(100, Math.round(t / c * 100)) : 0, d = i >= 100;
88
- return /* @__PURE__ */ n("div", { className: `${s}-bar`, children: [
89
- /* @__PURE__ */ e("div", { className: `${s}-bar-track`, children: /* @__PURE__ */ e(
86
+ function O({ current: t, max: c, prefix: d }) {
87
+ const i = c > 0 ? Math.min(100, Math.round(t / c * 100)) : 0, s = i >= 100;
88
+ return /* @__PURE__ */ n("div", { className: `${d}-bar`, children: [
89
+ /* @__PURE__ */ e("div", { className: `${d}-bar-track`, children: /* @__PURE__ */ e(
90
90
  "div",
91
91
  {
92
- className: `${s}-bar-fill${d ? ` ${s}-bar-fill-warn` : ""}`,
92
+ className: `${d}-bar-fill${s ? ` ${d}-bar-fill-warn` : ""}`,
93
93
  style: { width: `${i}%` }
94
94
  }
95
95
  ) }),
96
- /* @__PURE__ */ n("span", { className: `${s}-bar-pct${d ? ` ${s}-bar-pct-warn` : ""}`, children: [
96
+ /* @__PURE__ */ n("span", { className: `${d}-bar-pct${s ? ` ${d}-bar-pct-warn` : ""}`, children: [
97
97
  i,
98
98
  "%"
99
99
  ] })
100
100
  ] });
101
101
  }
102
102
  function P({ config: t, prefix: c }) {
103
- const s = Object.entries(t);
104
- return s.length === 0 ? /* @__PURE__ */ e("span", { className: `${c}-c-dim`, children: "-" }) : /* @__PURE__ */ e("span", { className: `${c}-c-muted`, children: s.map(([i, d], u) => /* @__PURE__ */ n("span", { children: [
103
+ const d = Object.entries(t);
104
+ return d.length === 0 ? /* @__PURE__ */ e("span", { className: `${c}-c-dim`, children: "-" }) : /* @__PURE__ */ e("span", { className: `${c}-c-muted`, children: d.map(([i, s], u) => /* @__PURE__ */ n("span", { children: [
105
105
  u > 0 && ", ",
106
106
  /* @__PURE__ */ e("span", { className: `${c}-c-dim`, children: i }),
107
107
  "=",
108
- C(i) && typeof d == "string" ? /* @__PURE__ */ e(V, { value: d }) : /* @__PURE__ */ e("span", { children: I(d) })
108
+ I(i) && typeof s == "string" ? /* @__PURE__ */ e(V, { value: s }) : /* @__PURE__ */ e("span", { children: C(s) })
109
109
  ] }, i)) });
110
110
  }
111
- function m({ label: t, value: c, prefix: s }) {
112
- return /* @__PURE__ */ n("div", { className: `${s}-info-card`, children: [
113
- /* @__PURE__ */ e("span", { className: `${s}-info-card-label`, children: t }),
114
- /* @__PURE__ */ e("span", { className: `${s}-info-card-value`, children: c })
111
+ function m({ label: t, value: c, prefix: d }) {
112
+ return /* @__PURE__ */ n("div", { className: `${d}-info-card`, children: [
113
+ /* @__PURE__ */ e("span", { className: `${d}-info-card-label`, children: t }),
114
+ /* @__PURE__ */ e("span", { className: `${d}-info-card-value`, children: c })
115
115
  ] });
116
116
  }
117
- function W({ data: t, tableClassName: c, classPrefix: s }) {
118
- const i = s || "ss-dash", [d, u] = f(/* @__PURE__ */ new Set()), b = x((r) => {
117
+ function W({ data: t, tableClassName: c, classPrefix: d }) {
118
+ const i = d || "ss-dash", [s, u] = f(/* @__PURE__ */ new Set()), b = x((r) => {
119
119
  u((l) => {
120
120
  const a = new Set(l);
121
121
  return a.has(r) ? a.delete(r) : a.add(r), a;
@@ -126,9 +126,9 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
126
126
  if (typeof l == "boolean")
127
127
  return /* @__PURE__ */ e("span", { className: l ? `${i}-c-green` : `${i}-c-red`, children: String(l) });
128
128
  if (Array.isArray(l)) return /* @__PURE__ */ e("span", { children: l.join(", ") || "-" });
129
- const a = I(l);
130
- if (C(r)) {
131
- const h = d.has(r);
129
+ const a = C(l);
130
+ if (I(r)) {
131
+ const h = s.has(r);
132
132
  return /* @__PURE__ */ n("span", { children: [
133
133
  h ? a : "••••••••",
134
134
  " ",
@@ -154,10 +154,10 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
154
154
  }
155
155
  return /* @__PURE__ */ e("span", { children: a });
156
156
  },
157
- [d, b, i]
158
- ), S = t.collectors?.some((r) => r.name === "db_pool" || r.name === "app") && Array.isArray(t.lucidDebugConnections) && t.lucidDebugConnections.length === 0;
157
+ [s, b, i]
158
+ ), $ = t.collectors?.some((r) => r.name === "db_pool" || r.name === "app") && Array.isArray(t.lucidDebugConnections) && t.lucidDebugConnections.length === 0;
159
159
  return /* @__PURE__ */ n("div", { children: [
160
- S && /* @__PURE__ */ n(
160
+ $ && /* @__PURE__ */ n(
161
161
  "div",
162
162
  {
163
163
  style: {
@@ -185,10 +185,10 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
185
185
  /* @__PURE__ */ e(m, { label: "Version", value: t.package.version || "-", prefix: i }),
186
186
  /* @__PURE__ */ e(m, { label: "Node.js", value: t.package.nodeVersion || "-", prefix: i }),
187
187
  /* @__PURE__ */ e(m, { label: "AdonisJS", value: t.package.adonisVersion || "-", prefix: i }),
188
- /* @__PURE__ */ e(m, { label: "Uptime", value: R(t.package.uptime), prefix: i }),
188
+ /* @__PURE__ */ e(m, { label: "Uptime", value: D(t.package.uptime), prefix: i }),
189
189
  /* @__PURE__ */ e(m, { label: "Renderer", value: t.devToolbar?.renderer || "preact", prefix: i })
190
190
  ] }),
191
- t.collectors.length > 0 && /* @__PURE__ */ n($, { children: [
191
+ t.collectors.length > 0 && /* @__PURE__ */ n(y, { children: [
192
192
  /* @__PURE__ */ e("h3", { className: `${i}-internals-title`, children: "Collectors" }),
193
193
  /* @__PURE__ */ n("table", { className: c, children: [
194
194
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
@@ -209,7 +209,7 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
209
209
  /* @__PURE__ */ e(p, { status: r.status, prefix: i }),
210
210
  r.status
211
211
  ] }),
212
- /* @__PURE__ */ e("td", { className: r.lastError ? `${i}-c-red` : `${i}-c-dim`, children: r.lastError ? /* @__PURE__ */ n($, { children: [
212
+ /* @__PURE__ */ e("td", { className: r.lastError ? `${i}-c-red` : `${i}-c-dim`, children: r.lastError ? /* @__PURE__ */ n(y, { children: [
213
213
  r.lastError,
214
214
  r.lastErrorAt && /* @__PURE__ */ e("span", { className: `${i}-c-dim`, style: { fontSize: "10px" }, children: N(r.lastErrorAt) })
215
215
  ] }) : "-" }),
@@ -242,7 +242,7 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
242
242
  /* @__PURE__ */ e("th", { children: "Interval" })
243
243
  ] }) }),
244
244
  /* @__PURE__ */ e("tbody", { children: Object.entries(t.timers).map(([r, l]) => /* @__PURE__ */ n("tr", { children: [
245
- /* @__PURE__ */ e("td", { children: j(r) }),
245
+ /* @__PURE__ */ e("td", { children: E(r) }),
246
246
  /* @__PURE__ */ n("td", { children: [
247
247
  /* @__PURE__ */ e(p, { status: l.active ? "active" : "inactive", prefix: i }),
248
248
  /* @__PURE__ */ e("span", { className: l.active ? `${i}-c-green` : `${i}-c-dim`, children: l.active ? "active" : "inactive" })
@@ -270,7 +270,7 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
270
270
  const a = l.active ?? l.available ?? !1, h = l.active ? "active" : l.available ? "available" : "unavailable";
271
271
  let o = l.mode ? `Mode: ${l.mode}` : "-";
272
272
  return r === "edgePlugin" && l.active ? o = "@serverStats() tag registered" : r === "cacheInspector" && l.available ? o = "Redis dependency detected" : r === "queueInspector" && l.available && (o = "Queue dependency detected"), /* @__PURE__ */ n("tr", { children: [
273
- /* @__PURE__ */ e("td", { children: z(r) }),
273
+ /* @__PURE__ */ e("td", { children: R(r) }),
274
274
  /* @__PURE__ */ n("td", { children: [
275
275
  /* @__PURE__ */ e(p, { status: a ? "active" : "inactive", prefix: i }),
276
276
  h
@@ -280,7 +280,7 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
280
280
  })
281
281
  ] })
282
282
  ] }),
283
- t.storage && /* @__PURE__ */ n($, { children: [
283
+ t.storage && /* @__PURE__ */ n(y, { children: [
284
284
  /* @__PURE__ */ e("h3", { className: `${i}-internals-title`, children: "Storage (SQLite)" }),
285
285
  /* @__PURE__ */ n("table", { className: c, children: [
286
286
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
@@ -320,6 +320,10 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
320
320
  " days"
321
321
  ] })
322
322
  ] }),
323
+ /* @__PURE__ */ n("tr", { children: [
324
+ /* @__PURE__ */ e("td", { children: "Size Cap" }),
325
+ /* @__PURE__ */ e("td", { children: t.storage.maxDbSizeMb > 0 ? `${t.storage.maxDbSizeMb} MB` : "off" })
326
+ ] }),
323
327
  /* @__PURE__ */ n("tr", { children: [
324
328
  /* @__PURE__ */ e("td", { children: "Last Cleanup" }),
325
329
  /* @__PURE__ */ e("td", { children: t.storage.lastCleanupAt ? N(t.storage.lastCleanupAt) : "-" })
@@ -1,6 +1,6 @@
1
1
  import { jsx as a, jsxs as n } from "react/jsx-runtime";
2
2
  import { SECTION_REFRESH_MS as o } from "adonisjs-server-stats/core";
3
- import { u as d, I as l } from "./InternalsContent-C9lIA92C.js";
3
+ import { u as d, I as l } from "./InternalsContent-CI7HvBtH.js";
4
4
  function u({
5
5
  options: e = {},
6
6
  debugEndpoint: t = "/admin/api/debug"
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { u as i, I as d } from "./InternalsContent-C9lIA92C.js";
2
+ import { u as i, I as d } from "./InternalsContent-CI7HvBtH.js";
3
3
  function b({ options: s }) {
4
4
  const { data: a, isLoading: t, error: r } = i({
5
5
  baseUrl: s?.baseUrl,
@@ -1,7 +1,7 @@
1
1
  import { jsxs as y, jsx as t, Fragment as T } from "react/jsx-runtime";
2
2
  import { useState as l, useCallback as C } from "react";
3
3
  import { extractJobs as D, extractJobStats as F, JOB_STATUS_FILTERS as j, getJobStatusBadgeColor as B, formatDuration as A, resolveJobTimestamp as L } from "adonisjs-server-stats/core";
4
- import { a as R, B as _, J as $ } from "./index-DOSlCpZ9.js";
4
+ import { a as R, B as _, J as $ } from "./index-De7nsWBN.js";
5
5
  import { J as M } from "./JobStatsBar-C7RslAFE.js";
6
6
  import { T as O } from "./TimeAgoCell-o3KigGfM.js";
7
7
  import { D as U } from "./DataTable-YyShr5B-.js";
@@ -3,7 +3,7 @@ import { useState as m, useMemo as C, useCallback as A } from "react";
3
3
  import { extractJobs as B, extractJobStats as $, JOB_STATUS_FILTERS as D, getJobStatusCssClass as F, formatDuration as L, resolveJobTimestamp as R } from "adonisjs-server-stats/core";
4
4
  import { T as P } from "./TimeAgoCell-o3KigGfM.js";
5
5
  import { u as k } from "./useDashboardApiBase-Bi36pJ2L.js";
6
- import { u as E, J as O } from "./index-DOSlCpZ9.js";
6
+ import { u as E, J as O } from "./index-De7nsWBN.js";
7
7
  import { u as q } from "./useResizableTable-CNJmACdt.js";
8
8
  import { F as z } from "./FilterBar-CQ7bD669.js";
9
9
  import { J as M } from "./JobStatsBar-C7RslAFE.js";
@@ -2,7 +2,7 @@ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
2
  import g from "react";
3
3
  import { T as v } from "./TimeAgoCell-o3KigGfM.js";
4
4
  import { resolveLogLevel as u, resolveLogMessage as f, resolveLogTimestamp as h, resolveLogRequestId as L, getStructuredData as x, getLogLevelCssClass as N } from "adonisjs-server-stats/core";
5
- import { J as y } from "./index-DOSlCpZ9.js";
5
+ import { J as y } from "./index-De7nsWBN.js";
6
6
  function $({ log: o, index: c, expanded: l, onToggleExpand: m, onReqIdClick: e }) {
7
7
  const n = u(o), d = f(o), p = h(o), a = L(o), t = x(o);
8
8
  return /* @__PURE__ */ i(g.Fragment, { children: [
@@ -1,9 +1,9 @@
1
1
  import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as a, useCallback as c } from "react";
3
3
  import { LOG_LEVELS as B } from "adonisjs-server-stats/core";
4
- import { a as G } from "./index-DOSlCpZ9.js";
4
+ import { a as G } from "./index-De7nsWBN.js";
5
5
  import { F as T } from "./FilterBar-CQ7bD669.js";
6
- import { L as z } from "./LogEntryRow-BWkHE51-.js";
6
+ import { L as z } from "./LogEntryRow-VCCzwD1H.js";
7
7
  import { P as H } from "./Pagination-BkmzUDY8.js";
8
8
  function Z({ options: L = {} }) {
9
9
  const [E, i] = a(1), [b, x] = a(""), [r, q] = a("all"), [n, h] = a(""), [u, p] = a(""), [m, y] = a([]), [v, R] = a("level"), [g, $] = a("equals"), [f, C] = a(""), [F, P] = a(null), o = {};
@@ -1,9 +1,9 @@
1
1
  import { jsx as o, jsxs as i } from "react/jsx-runtime";
2
2
  import { useState as n, useMemo as x, useCallback as C } from "react";
3
3
  import { filterLogsByLevel as N, resolveLogRequestId as F, resolveLogMessage as k, LOG_LEVELS as w } from "adonisjs-server-stats/core";
4
- import { u as E } from "./index-DOSlCpZ9.js";
4
+ import { u as E } from "./index-De7nsWBN.js";
5
5
  import { F as q } from "./FilterBar-CQ7bD669.js";
6
- import { L as R } from "./LogEntryRow-BWkHE51-.js";
6
+ import { L as R } from "./LogEntryRow-VCCzwD1H.js";
7
7
  function K({ options: f }) {
8
8
  const { data: r, isLoading: p, error: g } = E("logs", f), [d, L] = n("all"), [a, h] = n(""), [l, m] = n(""), [b, y] = n(null), c = x(() => {
9
9
  let e = Array.isArray(r) ? r : r?.logs || r?.entries || [];