adonisjs-server-stats 1.5.4 → 1.6.2

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 (527) hide show
  1. package/README.md +351 -171
  2. package/dist/configure.d.ts.map +1 -1
  3. package/dist/core/api-client.d.ts +73 -0
  4. package/dist/core/api-client.d.ts.map +1 -0
  5. package/dist/core/config-utils.d.ts +109 -0
  6. package/dist/core/config-utils.d.ts.map +1 -0
  7. package/dist/core/constants.d.ts +11 -0
  8. package/dist/core/constants.d.ts.map +1 -0
  9. package/dist/core/dashboard-api.d.ts +65 -0
  10. package/dist/core/dashboard-api.d.ts.map +1 -0
  11. package/dist/core/dashboard-data-controller.d.ts +157 -0
  12. package/dist/core/dashboard-data-controller.d.ts.map +1 -0
  13. package/dist/core/debug-data-controller.d.ts +89 -0
  14. package/dist/core/debug-data-controller.d.ts.map +1 -0
  15. package/dist/core/feature-detect.d.ts +67 -0
  16. package/dist/core/feature-detect.d.ts.map +1 -0
  17. package/dist/core/formatters.d.ts +189 -0
  18. package/dist/core/formatters.d.ts.map +1 -0
  19. package/dist/core/history-buffer.d.ts +23 -0
  20. package/dist/core/history-buffer.d.ts.map +1 -0
  21. package/dist/core/icons.d.ts +36 -0
  22. package/dist/core/icons.d.ts.map +1 -0
  23. package/dist/core/index.d.ts +39 -0
  24. package/dist/core/index.d.ts.map +1 -0
  25. package/dist/core/index.js +1961 -0
  26. package/dist/core/internals-utils.d.ts +71 -0
  27. package/dist/core/internals-utils.d.ts.map +1 -0
  28. package/dist/core/job-utils.d.ts +45 -0
  29. package/dist/core/job-utils.d.ts.map +1 -0
  30. package/dist/core/log-utils.d.ts +34 -0
  31. package/dist/core/log-utils.d.ts.map +1 -0
  32. package/dist/core/metrics.d.ts +41 -0
  33. package/dist/core/metrics.d.ts.map +1 -0
  34. package/dist/core/pagination.d.ts +128 -0
  35. package/dist/core/pagination.d.ts.map +1 -0
  36. package/dist/core/query-utils.d.ts +35 -0
  37. package/dist/core/query-utils.d.ts.map +1 -0
  38. package/dist/core/resizable-columns.d.ts +18 -0
  39. package/dist/core/resizable-columns.d.ts.map +1 -0
  40. package/dist/core/routes.d.ts +12 -0
  41. package/dist/core/routes.d.ts.map +1 -0
  42. package/dist/core/server-stats-controller.d.ts +106 -0
  43. package/dist/core/server-stats-controller.d.ts.map +1 -0
  44. package/dist/core/sparkline.d.ts +80 -0
  45. package/dist/core/sparkline.d.ts.map +1 -0
  46. package/dist/core/theme.d.ts +42 -0
  47. package/dist/core/theme.d.ts.map +1 -0
  48. package/dist/core/trace-utils.d.ts +62 -0
  49. package/dist/core/trace-utils.d.ts.map +1 -0
  50. package/dist/core/transmit-adapter.d.ts +59 -0
  51. package/dist/core/transmit-adapter.d.ts.map +1 -0
  52. package/dist/core/types.d.ts +619 -0
  53. package/dist/core/types.d.ts.map +1 -0
  54. package/dist/react/CacheSection-DGxMDlWK.js +146 -0
  55. package/dist/react/CacheTab-CnVW5PLs.js +123 -0
  56. package/dist/react/ConfigContent-CnsEI4j3.js +397 -0
  57. package/dist/react/ConfigSection-DPcrfqXY.js +11 -0
  58. package/dist/react/ConfigTab-BSWq_o2p.js +15 -0
  59. package/dist/react/CustomPaneTab-xjkYwTvH.js +104 -0
  60. package/dist/react/DataTable-YyShr5B-.js +55 -0
  61. package/dist/react/EmailsSection-CSyTg1aX.js +262 -0
  62. package/dist/react/EmailsTab-Dh2YSa_f.js +131 -0
  63. package/dist/react/EventsSection-C1pbJDfW.js +86 -0
  64. package/dist/react/EventsTab-eCh02cdd.js +63 -0
  65. package/dist/react/FilterBar-DQRXpWrb.js +50 -0
  66. package/dist/react/InternalsContent-DBzsI0CG.js +346 -0
  67. package/dist/react/InternalsSection-t7ihcWO-.js +32 -0
  68. package/dist/react/InternalsTab-Oij0A2fN.js +30 -0
  69. package/dist/react/JobsSection-CLAin5vU.js +187 -0
  70. package/dist/react/JobsTab-Dl5nrj2z.js +141 -0
  71. package/dist/react/LogsSection-C1p81fXO.js +212 -0
  72. package/dist/react/LogsTab-D-kR7PjX.js +88 -0
  73. package/dist/react/OverviewSection-nm3xdACz.js +539 -0
  74. package/dist/react/Pagination-BkmzUDY8.js +64 -0
  75. package/dist/react/QueriesSection-DB12HMfQ.js +461 -0
  76. package/dist/react/QueriesTab-fyBB1u_Y.js +90 -0
  77. package/dist/react/RequestsSection-DTqB81ac.js +209 -0
  78. package/dist/react/RoutesSection-DJWa4NPV.js +74 -0
  79. package/dist/react/RoutesTab-D3l8TOpu.js +74 -0
  80. package/dist/react/TimelineSection-C4d-jRX1.js +158 -0
  81. package/dist/react/TimelineTab-C5TFaSmQ.js +193 -0
  82. package/dist/react/WaterfallChart-Cj73WdfM.js +100 -0
  83. package/dist/react/core/api-client.d.ts +73 -0
  84. package/dist/react/core/api-client.d.ts.map +1 -0
  85. package/dist/react/core/config-utils.d.ts +109 -0
  86. package/dist/react/core/config-utils.d.ts.map +1 -0
  87. package/dist/react/core/constants.d.ts +11 -0
  88. package/dist/react/core/constants.d.ts.map +1 -0
  89. package/dist/react/core/dashboard-api.d.ts +65 -0
  90. package/dist/react/core/dashboard-api.d.ts.map +1 -0
  91. package/dist/react/core/dashboard-data-controller.d.ts +157 -0
  92. package/dist/react/core/dashboard-data-controller.d.ts.map +1 -0
  93. package/dist/react/core/debug-data-controller.d.ts +89 -0
  94. package/dist/react/core/debug-data-controller.d.ts.map +1 -0
  95. package/dist/react/core/feature-detect.d.ts +67 -0
  96. package/dist/react/core/feature-detect.d.ts.map +1 -0
  97. package/dist/react/core/formatters.d.ts +189 -0
  98. package/dist/react/core/formatters.d.ts.map +1 -0
  99. package/dist/react/core/history-buffer.d.ts +23 -0
  100. package/dist/react/core/history-buffer.d.ts.map +1 -0
  101. package/dist/react/core/icons.d.ts +36 -0
  102. package/dist/react/core/icons.d.ts.map +1 -0
  103. package/dist/react/core/index.d.ts +39 -0
  104. package/dist/react/core/index.d.ts.map +1 -0
  105. package/dist/react/core/internals-utils.d.ts +71 -0
  106. package/dist/react/core/internals-utils.d.ts.map +1 -0
  107. package/dist/react/core/job-utils.d.ts +45 -0
  108. package/dist/react/core/job-utils.d.ts.map +1 -0
  109. package/dist/react/core/log-utils.d.ts +34 -0
  110. package/dist/react/core/log-utils.d.ts.map +1 -0
  111. package/dist/react/core/metrics.d.ts +41 -0
  112. package/dist/react/core/metrics.d.ts.map +1 -0
  113. package/dist/react/core/pagination.d.ts +128 -0
  114. package/dist/react/core/pagination.d.ts.map +1 -0
  115. package/dist/react/core/query-utils.d.ts +35 -0
  116. package/dist/react/core/query-utils.d.ts.map +1 -0
  117. package/dist/react/core/resizable-columns.d.ts +18 -0
  118. package/dist/react/core/resizable-columns.d.ts.map +1 -0
  119. package/dist/react/core/routes.d.ts +12 -0
  120. package/dist/react/core/routes.d.ts.map +1 -0
  121. package/dist/react/core/server-stats-controller.d.ts +106 -0
  122. package/dist/react/core/server-stats-controller.d.ts.map +1 -0
  123. package/dist/react/core/sparkline.d.ts +80 -0
  124. package/dist/react/core/sparkline.d.ts.map +1 -0
  125. package/dist/react/core/theme.d.ts +42 -0
  126. package/dist/react/core/theme.d.ts.map +1 -0
  127. package/dist/react/core/trace-utils.d.ts +62 -0
  128. package/dist/react/core/trace-utils.d.ts.map +1 -0
  129. package/dist/react/core/transmit-adapter.d.ts +59 -0
  130. package/dist/react/core/transmit-adapter.d.ts.map +1 -0
  131. package/dist/react/core/types.d.ts +619 -0
  132. package/dist/react/core/types.d.ts.map +1 -0
  133. package/dist/react/index-UdTfSvtO.js +1074 -0
  134. package/dist/react/index.js +18 -0
  135. package/dist/react/react/components/Dashboard/DashboardPage.d.ts +17 -0
  136. package/dist/react/react/components/Dashboard/DashboardPage.d.ts.map +1 -0
  137. package/dist/react/react/components/Dashboard/sections/CacheSection.d.ts +7 -0
  138. package/dist/react/react/components/Dashboard/sections/CacheSection.d.ts.map +1 -0
  139. package/dist/react/react/components/Dashboard/sections/ConfigSection.d.ts +7 -0
  140. package/dist/react/react/components/Dashboard/sections/ConfigSection.d.ts.map +1 -0
  141. package/dist/react/react/components/Dashboard/sections/EmailsSection.d.ts +7 -0
  142. package/dist/react/react/components/Dashboard/sections/EmailsSection.d.ts.map +1 -0
  143. package/dist/react/react/components/Dashboard/sections/EventsSection.d.ts +7 -0
  144. package/dist/react/react/components/Dashboard/sections/EventsSection.d.ts.map +1 -0
  145. package/dist/react/react/components/Dashboard/sections/InternalsSection.d.ts +14 -0
  146. package/dist/react/react/components/Dashboard/sections/InternalsSection.d.ts.map +1 -0
  147. package/dist/react/react/components/Dashboard/sections/JobsSection.d.ts +7 -0
  148. package/dist/react/react/components/Dashboard/sections/JobsSection.d.ts.map +1 -0
  149. package/dist/react/react/components/Dashboard/sections/LogsSection.d.ts +7 -0
  150. package/dist/react/react/components/Dashboard/sections/LogsSection.d.ts.map +1 -0
  151. package/dist/react/react/components/Dashboard/sections/OverviewSection.d.ts +7 -0
  152. package/dist/react/react/components/Dashboard/sections/OverviewSection.d.ts.map +1 -0
  153. package/dist/react/react/components/Dashboard/sections/QueriesSection.d.ts +7 -0
  154. package/dist/react/react/components/Dashboard/sections/QueriesSection.d.ts.map +1 -0
  155. package/dist/react/react/components/Dashboard/sections/RequestsSection.d.ts +7 -0
  156. package/dist/react/react/components/Dashboard/sections/RequestsSection.d.ts.map +1 -0
  157. package/dist/react/react/components/Dashboard/sections/RoutesSection.d.ts +7 -0
  158. package/dist/react/react/components/Dashboard/sections/RoutesSection.d.ts.map +1 -0
  159. package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts +9 -0
  160. package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts.map +1 -0
  161. package/dist/react/react/components/Dashboard/shared/DataTable.d.ts +27 -0
  162. package/dist/react/react/components/Dashboard/shared/DataTable.d.ts.map +1 -0
  163. package/dist/react/react/components/Dashboard/shared/FilterBar.d.ts +17 -0
  164. package/dist/react/react/components/Dashboard/shared/FilterBar.d.ts.map +1 -0
  165. package/dist/react/react/components/Dashboard/shared/Pagination.d.ts +13 -0
  166. package/dist/react/react/components/Dashboard/shared/Pagination.d.ts.map +1 -0
  167. package/dist/react/react/components/Dashboard/shared/TimeRangeSelector.d.ts +12 -0
  168. package/dist/react/react/components/Dashboard/shared/TimeRangeSelector.d.ts.map +1 -0
  169. package/dist/react/react/components/Dashboard/shared/WaterfallChart.d.ts +16 -0
  170. package/dist/react/react/components/Dashboard/shared/WaterfallChart.d.ts.map +1 -0
  171. package/dist/react/react/components/DebugPanel/DebugPanel.d.ts +16 -0
  172. package/dist/react/react/components/DebugPanel/DebugPanel.d.ts.map +1 -0
  173. package/dist/react/react/components/DebugPanel/tabs/CacheTab.d.ts +8 -0
  174. package/dist/react/react/components/DebugPanel/tabs/CacheTab.d.ts.map +1 -0
  175. package/dist/react/react/components/DebugPanel/tabs/ConfigTab.d.ts +8 -0
  176. package/dist/react/react/components/DebugPanel/tabs/ConfigTab.d.ts.map +1 -0
  177. package/dist/react/react/components/DebugPanel/tabs/CustomPaneTab.d.ts +14 -0
  178. package/dist/react/react/components/DebugPanel/tabs/CustomPaneTab.d.ts.map +1 -0
  179. package/dist/react/react/components/DebugPanel/tabs/EmailsTab.d.ts +7 -0
  180. package/dist/react/react/components/DebugPanel/tabs/EmailsTab.d.ts.map +1 -0
  181. package/dist/react/react/components/DebugPanel/tabs/EventsTab.d.ts +7 -0
  182. package/dist/react/react/components/DebugPanel/tabs/EventsTab.d.ts.map +1 -0
  183. package/dist/react/react/components/DebugPanel/tabs/InternalsTab.d.ts +12 -0
  184. package/dist/react/react/components/DebugPanel/tabs/InternalsTab.d.ts.map +1 -0
  185. package/dist/react/react/components/DebugPanel/tabs/JobsTab.d.ts +9 -0
  186. package/dist/react/react/components/DebugPanel/tabs/JobsTab.d.ts.map +1 -0
  187. package/dist/react/react/components/DebugPanel/tabs/LogsTab.d.ts +7 -0
  188. package/dist/react/react/components/DebugPanel/tabs/LogsTab.d.ts.map +1 -0
  189. package/dist/react/react/components/DebugPanel/tabs/QueriesTab.d.ts +7 -0
  190. package/dist/react/react/components/DebugPanel/tabs/QueriesTab.d.ts.map +1 -0
  191. package/dist/react/react/components/DebugPanel/tabs/RoutesTab.d.ts +8 -0
  192. package/dist/react/react/components/DebugPanel/tabs/RoutesTab.d.ts.map +1 -0
  193. package/dist/react/react/components/DebugPanel/tabs/TimelineTab.d.ts +7 -0
  194. package/dist/react/react/components/DebugPanel/tabs/TimelineTab.d.ts.map +1 -0
  195. package/dist/react/react/components/StatsBar/MetricCard.d.ts +21 -0
  196. package/dist/react/react/components/StatsBar/MetricCard.d.ts.map +1 -0
  197. package/dist/react/react/components/StatsBar/Sparkline.d.ts +15 -0
  198. package/dist/react/react/components/StatsBar/Sparkline.d.ts.map +1 -0
  199. package/dist/react/react/components/StatsBar/StatsBar.d.ts +22 -0
  200. package/dist/react/react/components/StatsBar/StatsBar.d.ts.map +1 -0
  201. package/dist/react/react/components/shared/Badge.d.ts +32 -0
  202. package/dist/react/react/components/shared/Badge.d.ts.map +1 -0
  203. package/dist/react/react/components/shared/ConfigContent.d.ts +13 -0
  204. package/dist/react/react/components/shared/ConfigContent.d.ts.map +1 -0
  205. package/dist/react/react/components/shared/InternalsContent.d.ts +10 -0
  206. package/dist/react/react/components/shared/InternalsContent.d.ts.map +1 -0
  207. package/dist/react/react/components/shared/JsonViewer.d.ts +12 -0
  208. package/dist/react/react/components/shared/JsonViewer.d.ts.map +1 -0
  209. package/dist/react/react/components/shared/ThemeToggle.d.ts +13 -0
  210. package/dist/react/react/components/shared/ThemeToggle.d.ts.map +1 -0
  211. package/dist/react/react/components/shared/Tooltip.d.ts +16 -0
  212. package/dist/react/react/components/shared/Tooltip.d.ts.map +1 -0
  213. package/dist/react/react/hooks/useApiClient.d.ts +10 -0
  214. package/dist/react/react/hooks/useApiClient.d.ts.map +1 -0
  215. package/dist/react/react/hooks/useDashboardApiBase.d.ts +19 -0
  216. package/dist/react/react/hooks/useDashboardApiBase.d.ts.map +1 -0
  217. package/dist/react/react/hooks/useDashboardData.d.ts +27 -0
  218. package/dist/react/react/hooks/useDashboardData.d.ts.map +1 -0
  219. package/dist/react/react/hooks/useDebugData.d.ts +17 -0
  220. package/dist/react/react/hooks/useDebugData.d.ts.map +1 -0
  221. package/dist/react/react/hooks/useFeatures.d.ts +13 -0
  222. package/dist/react/react/hooks/useFeatures.d.ts.map +1 -0
  223. package/dist/react/react/hooks/useResizableTable.d.ts +13 -0
  224. package/dist/react/react/hooks/useResizableTable.d.ts.map +1 -0
  225. package/dist/react/react/hooks/useServerStats.d.ts +21 -0
  226. package/dist/react/react/hooks/useServerStats.d.ts.map +1 -0
  227. package/dist/react/react/hooks/useTheme.d.ts +12 -0
  228. package/dist/react/react/hooks/useTheme.d.ts.map +1 -0
  229. package/dist/react/react/index.d.ts +14 -0
  230. package/dist/react/react/index.d.ts.map +1 -0
  231. package/dist/react/style.css +1 -0
  232. package/dist/react/useApiClient-BVtNCmnL.js +9 -0
  233. package/dist/react/useDashboardApiBase-Bi36pJ2L.js +14 -0
  234. package/dist/react/useResizableTable-CNJmACdt.js +13 -0
  235. package/dist/src/collectors/app_collector.d.ts.map +1 -1
  236. package/dist/src/collectors/app_collector.js +30 -2
  237. package/dist/src/collectors/auto_detect.d.ts +31 -0
  238. package/dist/src/collectors/auto_detect.d.ts.map +1 -0
  239. package/dist/src/collectors/auto_detect.js +120 -0
  240. package/dist/src/collectors/collector.d.ts +17 -0
  241. package/dist/src/collectors/collector.d.ts.map +1 -1
  242. package/dist/src/collectors/db_pool_collector.d.ts.map +1 -1
  243. package/dist/src/collectors/db_pool_collector.js +35 -1
  244. package/dist/src/collectors/http_collector.d.ts +4 -3
  245. package/dist/src/collectors/http_collector.d.ts.map +1 -1
  246. package/dist/src/collectors/http_collector.js +28 -11
  247. package/dist/src/collectors/index.d.ts +2 -0
  248. package/dist/src/collectors/index.d.ts.map +1 -1
  249. package/dist/src/collectors/index.js +1 -0
  250. package/dist/src/collectors/log_collector.d.ts +11 -4
  251. package/dist/src/collectors/log_collector.d.ts.map +1 -1
  252. package/dist/src/collectors/log_collector.js +51 -5
  253. package/dist/src/collectors/process_collector.d.ts.map +1 -1
  254. package/dist/src/collectors/process_collector.js +4 -0
  255. package/dist/src/collectors/queue_collector.d.ts.map +1 -1
  256. package/dist/src/collectors/queue_collector.js +55 -1
  257. package/dist/src/collectors/redis_collector.d.ts.map +1 -1
  258. package/dist/src/collectors/redis_collector.js +42 -3
  259. package/dist/src/collectors/system_collector.d.ts.map +1 -1
  260. package/dist/src/collectors/system_collector.js +4 -0
  261. package/dist/src/controller/api_controller.d.ts +101 -0
  262. package/dist/src/controller/api_controller.d.ts.map +1 -0
  263. package/dist/src/controller/api_controller.js +131 -0
  264. package/dist/src/controller/debug_controller.d.ts +19 -10
  265. package/dist/src/controller/debug_controller.d.ts.map +1 -1
  266. package/dist/src/controller/debug_controller.js +118 -101
  267. package/dist/src/core/theme.d.ts +42 -0
  268. package/dist/src/core/theme.d.ts.map +1 -0
  269. package/dist/src/core/theme.js +115 -0
  270. package/dist/src/dashboard/chart_aggregator.d.ts.map +1 -1
  271. package/dist/src/dashboard/chart_aggregator.js +3 -2
  272. package/dist/src/dashboard/dashboard_controller.d.ts +10 -14
  273. package/dist/src/dashboard/dashboard_controller.d.ts.map +1 -1
  274. package/dist/src/dashboard/dashboard_controller.js +132 -250
  275. package/dist/src/dashboard/dashboard_store.d.ts +62 -19
  276. package/dist/src/dashboard/dashboard_store.d.ts.map +1 -1
  277. package/dist/src/dashboard/dashboard_store.js +242 -53
  278. package/dist/src/dashboard/integrations/cache_inspector.d.ts +19 -1
  279. package/dist/src/dashboard/integrations/cache_inspector.d.ts.map +1 -1
  280. package/dist/src/dashboard/integrations/config_inspector.d.ts +1 -1
  281. package/dist/src/dashboard/integrations/config_inspector.d.ts.map +1 -1
  282. package/dist/src/dashboard/integrations/config_inspector.js +3 -2
  283. package/dist/src/dashboard/integrations/queue_inspector.d.ts +55 -10
  284. package/dist/src/dashboard/integrations/queue_inspector.d.ts.map +1 -1
  285. package/dist/src/dashboard/integrations/queue_inspector.js +70 -24
  286. package/dist/src/dashboard/migrator.d.ts +5 -0
  287. package/dist/src/dashboard/migrator.d.ts.map +1 -1
  288. package/dist/src/dashboard/migrator.js +44 -9
  289. package/dist/src/dashboard/models/stats_event.d.ts +1 -1
  290. package/dist/src/dashboard/models/stats_event.d.ts.map +1 -1
  291. package/dist/src/dashboard/models/stats_log.d.ts +1 -1
  292. package/dist/src/dashboard/models/stats_log.d.ts.map +1 -1
  293. package/dist/src/dashboard/models/stats_query.d.ts +1 -1
  294. package/dist/src/dashboard/models/stats_query.d.ts.map +1 -1
  295. package/dist/src/dashboard/models/stats_saved_filter.d.ts +1 -1
  296. package/dist/src/dashboard/models/stats_saved_filter.d.ts.map +1 -1
  297. package/dist/src/dashboard/models/stats_trace.d.ts +2 -1
  298. package/dist/src/dashboard/models/stats_trace.d.ts.map +1 -1
  299. package/dist/src/data/data_access.d.ts +105 -0
  300. package/dist/src/data/data_access.d.ts.map +1 -0
  301. package/dist/src/data/data_access.js +310 -0
  302. package/dist/src/data/index.d.ts +3 -0
  303. package/dist/src/data/index.d.ts.map +1 -0
  304. package/dist/src/data/index.js +1 -0
  305. package/dist/src/debug/debug_store.d.ts +20 -1
  306. package/dist/src/debug/debug_store.d.ts.map +1 -1
  307. package/dist/src/debug/debug_store.js +43 -15
  308. package/dist/src/debug/email_collector.d.ts +6 -2
  309. package/dist/src/debug/email_collector.d.ts.map +1 -1
  310. package/dist/src/debug/email_collector.js +3 -0
  311. package/dist/src/debug/event_collector.d.ts +6 -2
  312. package/dist/src/debug/event_collector.d.ts.map +1 -1
  313. package/dist/src/debug/event_collector.js +12 -8
  314. package/dist/src/debug/query_collector.d.ts +6 -2
  315. package/dist/src/debug/query_collector.d.ts.map +1 -1
  316. package/dist/src/debug/query_collector.js +3 -0
  317. package/dist/src/debug/ring_buffer.d.ts +1 -0
  318. package/dist/src/debug/ring_buffer.d.ts.map +1 -1
  319. package/dist/src/debug/ring_buffer.js +5 -2
  320. package/dist/src/debug/route_inspector.d.ts +2 -2
  321. package/dist/src/debug/route_inspector.d.ts.map +1 -1
  322. package/dist/src/debug/route_inspector.js +4 -3
  323. package/dist/src/debug/trace_collector.d.ts +7 -3
  324. package/dist/src/debug/trace_collector.d.ts.map +1 -1
  325. package/dist/src/debug/trace_collector.js +7 -5
  326. package/dist/src/debug/types.d.ts +107 -2
  327. package/dist/src/debug/types.d.ts.map +1 -1
  328. package/dist/src/debug/types.js +1 -1
  329. package/dist/src/define_config.d.ts +49 -5
  330. package/dist/src/define_config.d.ts.map +1 -1
  331. package/dist/src/define_config.js +361 -4
  332. package/dist/src/edge/bootstrap.d.ts +17 -0
  333. package/dist/src/edge/bootstrap.d.ts.map +1 -0
  334. package/dist/src/edge/bootstrap.js +29 -0
  335. package/dist/src/edge/client/dashboard.js +2 -3619
  336. package/dist/src/edge/client/debug-panel-deferred.js +1 -0
  337. package/dist/src/edge/client/debug-panel.js +1 -2140
  338. package/dist/src/edge/client/stats-bar.js +1 -801
  339. package/dist/src/edge/client-vue/dashboard.js +5 -0
  340. package/dist/src/edge/client-vue/debug-panel-deferred.js +4 -0
  341. package/dist/src/edge/client-vue/debug-panel.js +4 -0
  342. package/dist/src/edge/client-vue/stats-bar.js +4 -0
  343. package/dist/src/edge/plugin.d.ts +35 -2
  344. package/dist/src/edge/plugin.d.ts.map +1 -1
  345. package/dist/src/edge/plugin.js +30 -66
  346. package/dist/src/edge/types.d.ts +46 -0
  347. package/dist/src/edge/types.d.ts.map +1 -0
  348. package/dist/src/edge/types.js +4 -0
  349. package/dist/src/edge/views/dashboard.edge +1 -358
  350. package/dist/src/edge/views/debug-panel.edge +2 -154
  351. package/dist/src/edge/views/stats-bar.edge +15 -48
  352. package/dist/src/engine/stats_engine.d.ts +18 -0
  353. package/dist/src/engine/stats_engine.d.ts.map +1 -1
  354. package/dist/src/engine/stats_engine.js +45 -2
  355. package/dist/src/index.d.ts +1 -1
  356. package/dist/src/index.d.ts.map +1 -1
  357. package/dist/src/log_stream/log_stream_provider.d.ts.map +1 -1
  358. package/dist/src/log_stream/log_stream_provider.js +21 -4
  359. package/dist/src/log_stream/log_stream_service.d.ts +8 -1
  360. package/dist/src/log_stream/log_stream_service.d.ts.map +1 -1
  361. package/dist/src/log_stream/log_stream_service.js +27 -3
  362. package/dist/src/middleware/request_tracking_middleware.d.ts +1 -1
  363. package/dist/src/middleware/request_tracking_middleware.d.ts.map +1 -1
  364. package/dist/src/middleware/request_tracking_middleware.js +21 -6
  365. package/dist/src/prometheus/prometheus_collector.d.ts +2 -1
  366. package/dist/src/prometheus/prometheus_collector.d.ts.map +1 -1
  367. package/dist/src/provider/server_stats_provider.d.ts +100 -0
  368. package/dist/src/provider/server_stats_provider.d.ts.map +1 -1
  369. package/dist/src/provider/server_stats_provider.js +460 -104
  370. package/dist/src/routes/access_middleware.d.ts +2 -1
  371. package/dist/src/routes/access_middleware.d.ts.map +1 -1
  372. package/dist/src/routes/access_middleware.js +7 -1
  373. package/dist/src/routes/index.d.ts +4 -0
  374. package/dist/src/routes/index.d.ts.map +1 -0
  375. package/dist/src/routes/index.js +1 -0
  376. package/dist/src/routes/register_routes.d.ts +103 -0
  377. package/dist/src/routes/register_routes.d.ts.map +1 -0
  378. package/dist/src/routes/register_routes.js +356 -0
  379. package/dist/src/routes/router_types.d.ts +29 -0
  380. package/dist/src/routes/router_types.d.ts.map +1 -0
  381. package/dist/src/routes/router_types.js +1 -0
  382. package/dist/src/stubs/config.stub +12 -32
  383. package/dist/src/styles/components.css +1048 -0
  384. package/dist/src/{edge/client → styles}/dashboard.css +299 -736
  385. package/dist/src/{edge/client → styles}/debug-panel.css +117 -633
  386. package/dist/src/{edge/client → styles}/stats-bar.css +28 -10
  387. package/dist/src/styles/tokens.css +153 -0
  388. package/dist/src/styles/utilities.css +75 -0
  389. package/dist/src/types.d.ts +119 -16
  390. package/dist/src/types.d.ts.map +1 -1
  391. package/dist/src/utils/app_import.d.ts +23 -0
  392. package/dist/src/utils/app_import.d.ts.map +1 -0
  393. package/dist/src/utils/app_import.js +44 -0
  394. package/dist/src/utils/json_helpers.d.ts +2 -2
  395. package/dist/src/utils/json_helpers.d.ts.map +1 -1
  396. package/dist/src/utils/logger.d.ts +17 -0
  397. package/dist/src/utils/logger.d.ts.map +1 -0
  398. package/dist/src/utils/logger.js +27 -0
  399. package/dist/src/utils/mail_helpers.d.ts +1 -1
  400. package/dist/src/utils/mail_helpers.d.ts.map +1 -1
  401. package/dist/src/utils/mail_helpers.js +1 -1
  402. package/dist/vue/CacheSection-C788Yfai.js +149 -0
  403. package/dist/vue/CacheTab-BPisYYiQ.js +104 -0
  404. package/dist/vue/ConfigSection-CRzYxqW2.js +576 -0
  405. package/dist/vue/ConfigTab-C8cafGUj.js +361 -0
  406. package/dist/vue/CustomPaneTab-BJxT5Dp7.js +172 -0
  407. package/dist/vue/EmailsSection-C8JFMtW7.js +206 -0
  408. package/dist/vue/EmailsTab-DhFhoNmU.js +157 -0
  409. package/dist/vue/EventsSection-C4wXUgxG.js +107 -0
  410. package/dist/vue/EventsTab-DQ4Nd6AK.js +97 -0
  411. package/dist/vue/FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js +62 -0
  412. package/dist/vue/InternalsSection-BJUXE-5F.js +468 -0
  413. package/dist/vue/InternalsTab-DEMjqtlw.js +471 -0
  414. package/dist/vue/JobsSection-CsKWTjgN.js +187 -0
  415. package/dist/vue/JobsTab-BCvhOARO.js +117 -0
  416. package/dist/vue/JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js +67 -0
  417. package/dist/vue/LogsSection-BFVjSZ24.js +227 -0
  418. package/dist/vue/LogsTab-DpEQ7euu.js +122 -0
  419. package/dist/vue/OverviewSection-CbMdAido.js +849 -0
  420. package/dist/vue/PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js +50 -0
  421. package/dist/vue/QueriesSection-BPiv7u3r.js +429 -0
  422. package/dist/vue/QueriesTab-C8_7oprC.js +107 -0
  423. package/dist/vue/RequestsSection-LtImH4rD.js +243 -0
  424. package/dist/vue/RoutesSection-CrxOxmzx.js +106 -0
  425. package/dist/vue/RoutesTab-Dz0MkZuF.js +80 -0
  426. package/dist/vue/TimelineSection-DLxMW2J_.js +186 -0
  427. package/dist/vue/TimelineTab-Db6lKKsD.js +250 -0
  428. package/dist/vue/WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js +118 -0
  429. package/dist/vue/components/Dashboard/DashboardPage.vue.d.ts +18 -0
  430. package/dist/vue/components/Dashboard/DashboardPage.vue.d.ts.map +1 -0
  431. package/dist/vue/components/Dashboard/sections/CacheSection.vue.d.ts +5 -0
  432. package/dist/vue/components/Dashboard/sections/CacheSection.vue.d.ts.map +1 -0
  433. package/dist/vue/components/Dashboard/sections/ConfigSection.vue.d.ts +3 -0
  434. package/dist/vue/components/Dashboard/sections/ConfigSection.vue.d.ts.map +1 -0
  435. package/dist/vue/components/Dashboard/sections/EmailsSection.vue.d.ts +5 -0
  436. package/dist/vue/components/Dashboard/sections/EmailsSection.vue.d.ts.map +1 -0
  437. package/dist/vue/components/Dashboard/sections/EventsSection.vue.d.ts +5 -0
  438. package/dist/vue/components/Dashboard/sections/EventsSection.vue.d.ts.map +1 -0
  439. package/dist/vue/components/Dashboard/sections/InternalsSection.vue.d.ts +3 -0
  440. package/dist/vue/components/Dashboard/sections/InternalsSection.vue.d.ts.map +1 -0
  441. package/dist/vue/components/Dashboard/sections/JobsSection.vue.d.ts +5 -0
  442. package/dist/vue/components/Dashboard/sections/JobsSection.vue.d.ts.map +1 -0
  443. package/dist/vue/components/Dashboard/sections/LogsSection.vue.d.ts +3 -0
  444. package/dist/vue/components/Dashboard/sections/LogsSection.vue.d.ts.map +1 -0
  445. package/dist/vue/components/Dashboard/sections/OverviewSection.vue.d.ts +5 -0
  446. package/dist/vue/components/Dashboard/sections/OverviewSection.vue.d.ts.map +1 -0
  447. package/dist/vue/components/Dashboard/sections/QueriesSection.vue.d.ts +45 -0
  448. package/dist/vue/components/Dashboard/sections/QueriesSection.vue.d.ts.map +1 -0
  449. package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts +5 -0
  450. package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts.map +1 -0
  451. package/dist/vue/components/Dashboard/sections/RoutesSection.vue.d.ts +5 -0
  452. package/dist/vue/components/Dashboard/sections/RoutesSection.vue.d.ts.map +1 -0
  453. package/dist/vue/components/Dashboard/sections/TimelineSection.vue.d.ts +11 -0
  454. package/dist/vue/components/Dashboard/sections/TimelineSection.vue.d.ts.map +1 -0
  455. package/dist/vue/components/Dashboard/shared/FilterBar.vue.d.ts +29 -0
  456. package/dist/vue/components/Dashboard/shared/FilterBar.vue.d.ts.map +1 -0
  457. package/dist/vue/components/Dashboard/shared/PaginationControls.vue.d.ts +12 -0
  458. package/dist/vue/components/Dashboard/shared/PaginationControls.vue.d.ts.map +1 -0
  459. package/dist/vue/components/Dashboard/shared/TimeRangeSelector.vue.d.ts +11 -0
  460. package/dist/vue/components/Dashboard/shared/TimeRangeSelector.vue.d.ts.map +1 -0
  461. package/dist/vue/components/Dashboard/shared/WaterfallChart.vue.d.ts +10 -0
  462. package/dist/vue/components/Dashboard/shared/WaterfallChart.vue.d.ts.map +1 -0
  463. package/dist/vue/components/DebugPanel/DebugPanel.vue.d.ts +21 -0
  464. package/dist/vue/components/DebugPanel/DebugPanel.vue.d.ts.map +1 -0
  465. package/dist/vue/components/DebugPanel/tabs/CacheTab.vue.d.ts +12 -0
  466. package/dist/vue/components/DebugPanel/tabs/CacheTab.vue.d.ts.map +1 -0
  467. package/dist/vue/components/DebugPanel/tabs/ConfigTab.vue.d.ts +11 -0
  468. package/dist/vue/components/DebugPanel/tabs/ConfigTab.vue.d.ts.map +1 -0
  469. package/dist/vue/components/DebugPanel/tabs/CustomPaneTab.vue.d.ts +11 -0
  470. package/dist/vue/components/DebugPanel/tabs/CustomPaneTab.vue.d.ts.map +1 -0
  471. package/dist/vue/components/DebugPanel/tabs/EmailsTab.vue.d.ts +12 -0
  472. package/dist/vue/components/DebugPanel/tabs/EmailsTab.vue.d.ts.map +1 -0
  473. package/dist/vue/components/DebugPanel/tabs/EventsTab.vue.d.ts +12 -0
  474. package/dist/vue/components/DebugPanel/tabs/EventsTab.vue.d.ts.map +1 -0
  475. package/dist/vue/components/DebugPanel/tabs/InternalsTab.vue.d.ts +11 -0
  476. package/dist/vue/components/DebugPanel/tabs/InternalsTab.vue.d.ts.map +1 -0
  477. package/dist/vue/components/DebugPanel/tabs/JobsTab.vue.d.ts +13 -0
  478. package/dist/vue/components/DebugPanel/tabs/JobsTab.vue.d.ts.map +1 -0
  479. package/dist/vue/components/DebugPanel/tabs/LogsTab.vue.d.ts +15 -0
  480. package/dist/vue/components/DebugPanel/tabs/LogsTab.vue.d.ts.map +1 -0
  481. package/dist/vue/components/DebugPanel/tabs/QueriesTab.vue.d.ts +12 -0
  482. package/dist/vue/components/DebugPanel/tabs/QueriesTab.vue.d.ts.map +1 -0
  483. package/dist/vue/components/DebugPanel/tabs/RoutesTab.vue.d.ts +12 -0
  484. package/dist/vue/components/DebugPanel/tabs/RoutesTab.vue.d.ts.map +1 -0
  485. package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts +15 -0
  486. package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts.map +1 -0
  487. package/dist/vue/components/StatsBar/MetricCard.vue.d.ts +19 -0
  488. package/dist/vue/components/StatsBar/MetricCard.vue.d.ts.map +1 -0
  489. package/dist/vue/components/StatsBar/Sparkline.vue.d.ts +17 -0
  490. package/dist/vue/components/StatsBar/Sparkline.vue.d.ts.map +1 -0
  491. package/dist/vue/components/StatsBar/StatsBar.vue.d.ts +22 -0
  492. package/dist/vue/components/StatsBar/StatsBar.vue.d.ts.map +1 -0
  493. package/dist/vue/components/shared/JsonViewer.vue.d.ts +13 -0
  494. package/dist/vue/components/shared/JsonViewer.vue.d.ts.map +1 -0
  495. package/dist/vue/components/shared/ThemeToggle.vue.d.ts +8 -0
  496. package/dist/vue/components/shared/ThemeToggle.vue.d.ts.map +1 -0
  497. package/dist/vue/composables/useApiClient.d.ts +9 -0
  498. package/dist/vue/composables/useApiClient.d.ts.map +1 -0
  499. package/dist/vue/composables/useDashboardData.d.ts +53 -0
  500. package/dist/vue/composables/useDashboardData.d.ts.map +1 -0
  501. package/dist/vue/composables/useDebugData.d.ts +25 -0
  502. package/dist/vue/composables/useDebugData.d.ts.map +1 -0
  503. package/dist/vue/composables/useFeatures.d.ts +80 -0
  504. package/dist/vue/composables/useFeatures.d.ts.map +1 -0
  505. package/dist/vue/composables/useResizableTable.d.ts +16 -0
  506. package/dist/vue/composables/useResizableTable.d.ts.map +1 -0
  507. package/dist/vue/composables/useServerStats.d.ts +104 -0
  508. package/dist/vue/composables/useServerStats.d.ts.map +1 -0
  509. package/dist/vue/composables/useTheme.d.ts +6 -0
  510. package/dist/vue/composables/useTheme.d.ts.map +1 -0
  511. package/dist/vue/index-qCQpBftQ.js +1233 -0
  512. package/dist/vue/index.d.ts +10 -0
  513. package/dist/vue/index.d.ts.map +1 -0
  514. package/dist/vue/index.js +11 -0
  515. package/dist/vue/style.css +1 -0
  516. package/dist/vue/useApiClient-BQQ9CF-q.js +10 -0
  517. package/dist/vue/useResizableTable-BoivAevK.js +17 -0
  518. package/package.json +72 -10
  519. package/dist/src/dashboard/dashboard_routes.d.ts +0 -16
  520. package/dist/src/dashboard/dashboard_routes.d.ts.map +0 -1
  521. package/dist/src/dashboard/dashboard_routes.js +0 -77
  522. package/dist/src/routes/debug_routes.d.ts +0 -14
  523. package/dist/src/routes/debug_routes.d.ts.map +0 -1
  524. package/dist/src/routes/debug_routes.js +0 -42
  525. package/dist/src/routes/stats_routes.d.ts +0 -14
  526. package/dist/src/routes/stats_routes.d.ts.map +0 -1
  527. package/dist/src/routes/stats_routes.js +0 -27
@@ -1 +1 @@
1
- {"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../configure.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,SAAS,MAAM,mCAAmC,CAAA;AAE9D,wBAAsB,SAAS,CAAC,OAAO,EAAE,SAAS,iBAWjD"}
1
+ {"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../configure.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,SAAS,MAAM,mCAAmC,CAAA;AAO9D,wBAAsB,SAAS,CAAC,OAAO,EAAE,SAAS,iBAWjD"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Error thrown when the server responds with 401 or 403.
3
+ */
4
+ export declare class UnauthorizedError extends Error {
5
+ readonly status: number;
6
+ constructor(status?: number);
7
+ }
8
+ /**
9
+ * Error thrown for non-OK responses that are not auth-related.
10
+ */
11
+ export declare class ApiError extends Error {
12
+ readonly status: number;
13
+ readonly body: string;
14
+ constructor(status: number, body: string);
15
+ }
16
+ /**
17
+ * Configuration for {@link ApiClient}.
18
+ */
19
+ export interface ApiClientConfig {
20
+ /** Base URL for all requests (e.g. `''` for same origin, or `'https://api.example.com'`). */
21
+ baseUrl: string;
22
+ /** Optional Bearer token. When provided, `credentials` is set to `'omit'`. */
23
+ authToken?: string;
24
+ }
25
+ /**
26
+ * Lightweight HTTP client for the server-stats API endpoints.
27
+ *
28
+ * Auth strategy:
29
+ * - If `authToken` is provided, sends `Authorization: Bearer <token>`
30
+ * with `credentials: 'omit'` (no cookies).
31
+ * - Otherwise uses `credentials: 'include'` for cookie-based auth.
32
+ *
33
+ * All non-OK responses are thrown as typed errors:
34
+ * - 401 / 403 -> {@link UnauthorizedError}
35
+ * - Other non-OK -> {@link ApiError}
36
+ */
37
+ export declare class ApiClient {
38
+ private baseUrl;
39
+ private authToken;
40
+ constructor(config: ApiClientConfig);
41
+ /**
42
+ * Perform a JSON fetch against the configured base URL.
43
+ *
44
+ * @param path - URL path appended to `baseUrl` (must start with `/`).
45
+ * @param init - Optional `RequestInit` overrides. Headers are merged.
46
+ * @returns Parsed JSON response body typed as `T`.
47
+ */
48
+ fetch<T>(path: string, init?: RequestInit): Promise<T>;
49
+ /**
50
+ * Perform a GET request.
51
+ *
52
+ * @param path - URL path appended to `baseUrl`.
53
+ * @param query - Optional query string (without leading `?`).
54
+ * @returns Parsed JSON response body typed as `T`.
55
+ */
56
+ get<T>(path: string, query?: string): Promise<T>;
57
+ /**
58
+ * Perform a POST request with an optional JSON body.
59
+ *
60
+ * @param path - URL path appended to `baseUrl`.
61
+ * @param body - Optional request body (will be JSON-serialized).
62
+ * @returns Parsed JSON response body typed as `T`.
63
+ */
64
+ post<T>(path: string, body?: unknown): Promise<T>;
65
+ /**
66
+ * Perform a DELETE request.
67
+ *
68
+ * @param path - URL path appended to `baseUrl`.
69
+ * @returns Parsed JSON response body typed as `T`.
70
+ */
71
+ delete<T>(path: string): Promise<T>;
72
+ }
73
+ //# sourceMappingURL=api-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../src/core/api-client.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,SAAgB,MAAM,EAAE,MAAM,CAAA;gBAElB,MAAM,GAAE,MAAY;CAKjC;AAED;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,SAAgB,MAAM,EAAE,MAAM,CAAA;IAC9B,SAAgB,IAAI,EAAE,MAAM,CAAA;gBAEhB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAMzC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,6FAA6F;IAC7F,OAAO,EAAE,MAAM,CAAA;IACf,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,SAAS,CAAoB;gBAEzB,MAAM,EAAE,eAAe;IAMnC;;;;;;OAMG;IACG,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC;IA6B5D;;;;;;OAMG;IACG,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAKtD;;;;;;OAMG;IACG,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAavD;;;;;OAKG;IACG,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CAG1C"}
@@ -0,0 +1,109 @@
1
+ export interface RedactedValue {
2
+ __redacted: true;
3
+ display: string;
4
+ value: string;
5
+ }
6
+ export type ConfigValue = string | number | boolean | null | undefined | RedactedValue | ConfigValue[] | {
7
+ [key: string]: ConfigValue;
8
+ };
9
+ export interface FlatEntry {
10
+ path: string;
11
+ value: ConfigValue;
12
+ }
13
+ export interface FormattedValue {
14
+ text: string;
15
+ color?: string;
16
+ }
17
+ /**
18
+ * Check whether a config value is a server-redacted object.
19
+ *
20
+ * Redacted objects have the shape `{ __redacted: true, display: string, value: string }`.
21
+ */
22
+ export declare function isRedactedValue(val: ConfigValue): val is RedactedValue;
23
+ /**
24
+ * Recursively flatten a nested config object into a list of dot-path entries.
25
+ *
26
+ * Objects are recursed into; arrays, redacted values, and primitives are
27
+ * treated as leaf entries.
28
+ *
29
+ * @param obj - The config value to flatten.
30
+ * @param prefix - Dot-path prefix for keys (default `''`).
31
+ */
32
+ export declare function flattenConfig(obj: ConfigValue, prefix?: string): FlatEntry[];
33
+ /**
34
+ * Format a leaf config value for display, returning both text and an
35
+ * optional CSS color string.
36
+ *
37
+ * - `null` / `undefined` -> `"null"` (dim)
38
+ * - `boolean` -> `"true"` (green) / `"false"` (red)
39
+ * - `number` -> stringified (amber)
40
+ * - `array` -> comma-separated items in brackets (purple)
41
+ * - `object` -> JSON string (dim)
42
+ * - `string` -> as-is (no color)
43
+ */
44
+ export declare function formatFlatValue(value: ConfigValue): FormattedValue;
45
+ /**
46
+ * Count the number of leaf entries in a (possibly nested) config object.
47
+ *
48
+ * Primitives, arrays, and redacted objects each count as 1.
49
+ */
50
+ export declare function countLeaves(obj: ConfigValue): number;
51
+ /**
52
+ * Return the keys of top-level properties that are plain objects
53
+ * (i.e. collapsible sections in the config tree).
54
+ *
55
+ * Useful for "Expand All" / "Collapse All" functionality.
56
+ */
57
+ export declare function collectTopLevelObjectKeys(obj: ConfigValue): string[];
58
+ /**
59
+ * Check if a config entry's key or stringified value matches a search term.
60
+ *
61
+ * Matching is case-insensitive. Redacted values are matched against their
62
+ * display string.
63
+ *
64
+ * @param key - The config key (or dot-path).
65
+ * @param value - The config value.
66
+ * @param searchTerm - Lowercased search term.
67
+ */
68
+ export declare function matchesConfigSearch(key: string, value: ConfigValue, searchTerm: string): boolean;
69
+ /**
70
+ * Copy text to the clipboard and briefly show a checkmark on the button.
71
+ *
72
+ * This is a DOM-aware helper used by both React and Vue config viewers.
73
+ *
74
+ * @param text - Text to copy.
75
+ * @param btnRef - The button element to animate (may be `null`).
76
+ * @param prefix - CSS class prefix (e.g. `"ss-dbg"` or `"ss-dash"`).
77
+ */
78
+ export declare function copyWithFeedback(text: string, btnRef: HTMLButtonElement | null, prefix: string): void;
79
+ /**
80
+ * Determine whether a config key (or full dot-path) should be redacted.
81
+ *
82
+ * Tokenises the key into individual words and checks each against a
83
+ * known set of sensitive terms. Case-insensitive.
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * shouldRedact('stripe.secretKey') // true ("secret")
88
+ * shouldRedact('stripe.publishableKey') // true ("key")
89
+ * shouldRedact('database.password') // true ("password")
90
+ * shouldRedact('auth.token') // true ("auth", "token")
91
+ * shouldRedact('app.key') // true ("key")
92
+ * shouldRedact('app.name') // false
93
+ * shouldRedact('keyboard.layout') // false ("keyboard" is one word)
94
+ * shouldRedact('monkey.patch') // false ("monkey" is one word)
95
+ * ```
96
+ */
97
+ export declare function shouldRedact(key: string): boolean;
98
+ /**
99
+ * Regex pattern matching common secret-like key names.
100
+ *
101
+ * @deprecated Use {@link shouldRedact} instead for accurate word-boundary
102
+ * aware matching that avoids false positives (e.g. "keyboard", "monkey").
103
+ *
104
+ * Kept for backward compatibility. The pattern now uses word-boundary
105
+ * assertions for "key" to reduce false positives, and includes additional
106
+ * sensitive terms (pass, pwd, encryption).
107
+ */
108
+ export declare const REDACT_PATTERN: RegExp;
109
+ //# sourceMappingURL=config-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-utils.d.ts","sourceRoot":"","sources":["../../src/core/config-utils.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,IAAI,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,GACT,aAAa,GACb,WAAW,EAAE,GACb;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;CAAE,CAAA;AAElC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,WAAW,CAAA;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAMD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,GAAG,IAAI,aAAa,CAOtE;AAMD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,GAAE,MAAW,GAAG,SAAS,EAAE,CAkBhF;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,cAAc,CAkBlE;AAMD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM,CAepD;AAMD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM,EAAE,CAuBpE;AAMD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAShG;AAMD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,iBAAiB,GAAG,IAAI,EAChC,MAAM,EAAE,MAAM,GACb,IAAI,CAgBN;AAsDD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGjD;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,QAC2G,CAAA"}
@@ -0,0 +1,11 @@
1
+ /** Refresh interval for the overview section (ms). */
2
+ export declare const OVERVIEW_REFRESH_MS = 5000;
3
+ /** Refresh interval for other dashboard sections (ms). */
4
+ export declare const SECTION_REFRESH_MS = 10000;
5
+ /** Refresh interval for debug panel tabs (ms). */
6
+ export declare const DEBUG_REFRESH_MS = 3000;
7
+ /** Duration (ms) above which a query/request is considered slow. */
8
+ export declare const SLOW_DURATION_MS = 100;
9
+ /** Duration (ms) above which a query/request is considered very slow. */
10
+ export declare const VERY_SLOW_DURATION_MS = 500;
11
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAQA,sDAAsD;AACtD,eAAO,MAAM,mBAAmB,OAAO,CAAA;AAEvC,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB,QAAQ,CAAA;AAEvC,kDAAkD;AAClD,eAAO,MAAM,gBAAgB,OAAO,CAAA;AAMpC,oEAAoE;AACpE,eAAO,MAAM,gBAAgB,MAAM,CAAA;AAEnC,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,MAAM,CAAA"}
@@ -0,0 +1,65 @@
1
+ import { ApiClient } from './api-client.js';
2
+ /**
3
+ * High-level API client for dashboard-specific operations.
4
+ *
5
+ * Wraps the low-level {@link ApiClient} with domain methods for
6
+ * chart data, grouped queries, job management, cache operations,
7
+ * and email previews.
8
+ */
9
+ export declare class DashboardApi {
10
+ private client;
11
+ private basePath;
12
+ constructor(client: ApiClient, basePath: string);
13
+ /**
14
+ * Fetch data for a dashboard section, optionally with a query string.
15
+ *
16
+ * @param section - Section identifier (e.g. `'overview'`, `'queries'`).
17
+ * @param queryString - Optional query string (without leading `?`).
18
+ */
19
+ fetchSection(section: string, queryString?: string): Promise<Record<string, unknown>>;
20
+ /**
21
+ * Fetch chart time-series data for the overview section.
22
+ *
23
+ * @param range - Time range identifier (e.g. `'1h'`, `'24h'`).
24
+ */
25
+ fetchChart(range: string): Promise<Record<string, unknown>>;
26
+ /**
27
+ * Fetch grouped/aggregated query patterns.
28
+ */
29
+ fetchGroupedQueries(): Promise<Record<string, unknown>[]>;
30
+ /**
31
+ * Run EXPLAIN on a specific query by ID.
32
+ *
33
+ * @param id - Query record ID.
34
+ */
35
+ explainQuery(id: number): Promise<Record<string, unknown>>;
36
+ /**
37
+ * Retry a failed job by ID.
38
+ *
39
+ * @param id - Job record ID.
40
+ */
41
+ retryJob(id: string): Promise<{
42
+ message: string;
43
+ }>;
44
+ /**
45
+ * Fetch the value of a specific cache key.
46
+ *
47
+ * @param key - Cache key (will be URI-encoded).
48
+ */
49
+ fetchCacheKey(key: string): Promise<Record<string, unknown>>;
50
+ /**
51
+ * Delete a cache entry by key.
52
+ *
53
+ * @param key - Cache key (will be URI-encoded).
54
+ */
55
+ deleteCacheKey(key: string): Promise<{
56
+ deleted: boolean;
57
+ }>;
58
+ /**
59
+ * Fetch the HTML preview for an email record.
60
+ *
61
+ * @param id - Email record ID.
62
+ */
63
+ fetchEmailPreview(id: number): Promise<string>;
64
+ }
65
+ //# sourceMappingURL=dashboard-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-api.d.ts","sourceRoot":"","sources":["../../src/core/dashboard-api.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD;;;;;;GAMG;AACH,qBAAa,YAAY;IAErB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ;gBADR,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,MAAM;IAG1B;;;;;OAKG;IACG,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;IAMxD;;;;OAIG;IACG,UAAU,CAAC,KAAK,EAAE,MAAM;IAM9B;;OAEG;IACG,mBAAmB;IAIzB;;;;OAIG;IACG,YAAY,CAAC,EAAE,EAAE,MAAM;IAI7B;;;;OAIG;IACG,QAAQ,CAAC,EAAE,EAAE,MAAM;iBACa,MAAM;;IAK5C;;;;OAIG;IACG,aAAa,CAAC,GAAG,EAAE,MAAM;IAM/B;;;;OAIG;IACG,cAAc,CAAC,GAAG,EAAE,MAAM;iBACM,OAAO;;IAQ7C;;;;OAIG;IACG,iBAAiB,CAAC,EAAE,EAAE,MAAM;CAGnC"}
@@ -0,0 +1,157 @@
1
+ import { ApiClient } from './api-client.js';
2
+ import { DashboardApi } from './dashboard-api.js';
3
+ import { DashboardSection, PaginatedResponse } from './types.js';
4
+ /**
5
+ * Callbacks invoked by the controller to push state changes into
6
+ * the host framework's reactivity layer.
7
+ */
8
+ export interface DashboardDataCallbacks {
9
+ /** Called with the latest data payload (or `null` on reset). */
10
+ onData: (data: unknown) => void;
11
+ /** Called with pagination meta (or `null` when non-paginated). */
12
+ onPagination: (meta: PaginatedResponse<unknown>['meta'] | null) => void;
13
+ /** Called when the loading flag changes. */
14
+ onLoading: (loading: boolean) => void;
15
+ /** Called when an error occurs (or `null` to clear). */
16
+ onError: (error: Error | null) => void;
17
+ /** Called when an `UnauthorizedError` is detected. */
18
+ onUnauthorized: () => void;
19
+ }
20
+ /**
21
+ * Configuration supplied at construction time.
22
+ */
23
+ export interface DashboardDataControllerConfig {
24
+ /** Base URL for API requests (e.g. `''` for same origin). */
25
+ baseUrl: string;
26
+ /** Dashboard API base path. Defaults to `'/__stats/api'`. */
27
+ endpoint: string;
28
+ /** Optional Bearer auth token. */
29
+ authToken?: string;
30
+ /** Initial dashboard section to fetch. */
31
+ section: DashboardSection;
32
+ /** Items per page. */
33
+ perPage: number;
34
+ /** Callbacks that bridge state changes into the host framework. */
35
+ callbacks: DashboardDataCallbacks;
36
+ }
37
+ /**
38
+ * Framework-agnostic controller for the dashboard data lifecycle.
39
+ *
40
+ * Encapsulates:
41
+ * - Query parameter building (with camelCase-to-snake_case sort conversion)
42
+ * - Silent vs non-silent fetch distinction
43
+ * - Paginated / non-paginated response detection
44
+ * - `UnauthorizedError` handling with timer cleanup
45
+ * - Section-aware auto-refresh intervals
46
+ * - `fetchId` race-condition guard
47
+ * - `explicitFetchPending` guard to prevent silent fetch races
48
+ * - Mutation (POST/DELETE) support
49
+ */
50
+ export declare class DashboardDataController {
51
+ private client;
52
+ private api;
53
+ private callbacks;
54
+ private endpoint;
55
+ private perPage;
56
+ private section;
57
+ private page;
58
+ private search;
59
+ private sort;
60
+ private sortDir;
61
+ private filters;
62
+ private timeRange;
63
+ private timer;
64
+ /** Monotonically increasing fetch ID to discard stale responses. */
65
+ private fetchId;
66
+ /** Whether a non-silent (explicit) fetch is currently in-flight. */
67
+ private explicitFetchPending;
68
+ /** Whether we have successfully fetched data at least once. */
69
+ private hasFetched;
70
+ /** Whether the controller has been stopped (disposed). */
71
+ private stopped;
72
+ constructor(config: DashboardDataControllerConfig);
73
+ /**
74
+ * Start the controller: perform an initial fetch and begin auto-refresh.
75
+ */
76
+ start(): void;
77
+ /**
78
+ * Stop the controller: clear timers and mark as disposed.
79
+ * Outstanding in-flight responses will be discarded via fetchId.
80
+ */
81
+ stop(): void;
82
+ /**
83
+ * Perform a data fetch.
84
+ *
85
+ * @param silent - When `true`, errors are swallowed (keeps stale data)
86
+ * and loading state is not modified.
87
+ */
88
+ fetch(silent?: boolean): Promise<void>;
89
+ /**
90
+ * Change the active section. Resets pagination, filters, sort, and
91
+ * performs a full (non-silent) fetch.
92
+ */
93
+ setSection(section: DashboardSection): void;
94
+ /**
95
+ * Navigate to a specific page. Triggers a non-silent fetch.
96
+ */
97
+ setPage(page: number): void;
98
+ /**
99
+ * Update the search query. Resets to page 1. Triggers a non-silent fetch.
100
+ */
101
+ setSearch(search: string): void;
102
+ /**
103
+ * Set a filter key-value pair. Resets to page 1. Triggers a non-silent fetch.
104
+ */
105
+ setFilter(key: string, value: string | number | boolean): void;
106
+ /**
107
+ * Update sort column and direction. Triggers a non-silent fetch.
108
+ *
109
+ * If the same column is passed without a direction, toggles asc/desc.
110
+ */
111
+ setSort(column: string, direction?: 'asc' | 'desc'): void;
112
+ /**
113
+ * Update the time range. Triggers a non-silent fetch.
114
+ */
115
+ setTimeRange(range: string): void;
116
+ /**
117
+ * Execute a mutation (POST/DELETE) against the dashboard API,
118
+ * then silently refresh the current data.
119
+ */
120
+ mutate(path: string, method?: 'post' | 'delete', body?: unknown): Promise<unknown>;
121
+ /**
122
+ * Bulk-update query parameters without triggering a fetch.
123
+ *
124
+ * Used by props-driven frameworks (React) where the host component
125
+ * controls pagination/search/sort state externally and passes it in
126
+ * as props on each render cycle.
127
+ */
128
+ configure(params: {
129
+ page?: number;
130
+ perPage?: number;
131
+ search?: string;
132
+ sort?: string;
133
+ sortDir?: 'asc' | 'desc';
134
+ filters?: Record<string, string>;
135
+ timeRange?: string;
136
+ }): void;
137
+ /**
138
+ * Whether data has been fetched at least once.
139
+ */
140
+ hasData(): boolean;
141
+ /**
142
+ * Handle an external signal (e.g. SSE refreshKey) by performing
143
+ * a silent refresh if data has already been fetched once.
144
+ */
145
+ handleRefreshSignal(): void;
146
+ /**
147
+ * Get the underlying `DashboardApi` instance for direct API calls.
148
+ */
149
+ getApi(): DashboardApi;
150
+ /**
151
+ * Get the underlying `ApiClient` instance.
152
+ */
153
+ getClient(): ApiClient;
154
+ private startRefreshTimer;
155
+ private stopRefreshTimer;
156
+ }
157
+ //# sourceMappingURL=dashboard-data-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-data-controller.d.ts","sourceRoot":"","sources":["../../src/core/dashboard-data-controller.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAqB,MAAM,iBAAiB,CAAA;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAMrE;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,gEAAgE;IAChE,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAC/B,kEAAkE;IAClE,YAAY,EAAE,CAAC,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,KAAK,IAAI,CAAA;IACvE,4CAA4C;IAC5C,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,wDAAwD;IACxD,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,CAAA;IACtC,sDAAsD;IACtD,cAAc,EAAE,MAAM,IAAI,CAAA;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAA;IACf,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAA;IAChB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0CAA0C;IAC1C,OAAO,EAAE,gBAAgB,CAAA;IACzB,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,mEAAmE;IACnE,SAAS,EAAE,sBAAsB,CAAA;CAClC;AAMD;;;;;;;;;;;;GAYG;AACH,qBAAa,uBAAuB;IAElC,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,GAAG,CAAc;IACzB,OAAO,CAAC,SAAS,CAAwB;IAGzC,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,OAAO,CAAQ;IAGvB,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,IAAI,CAAY;IACxB,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,IAAI,CAAoB;IAChC,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,SAAS,CAAoB;IAGrC,OAAO,CAAC,KAAK,CAA8C;IAC3D,oEAAoE;IACpE,OAAO,CAAC,OAAO,CAAY;IAC3B,oEAAoE;IACpE,OAAO,CAAC,oBAAoB,CAAiB;IAC7C,+DAA+D;IAC/D,OAAO,CAAC,UAAU,CAAiB;IACnC,0DAA0D;IAC1D,OAAO,CAAC,OAAO,CAAiB;gBAEpB,MAAM,EAAE,6BAA6B;IAWjD;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb;;;OAGG;IACH,IAAI,IAAI,IAAI;IAKZ;;;;;OAKG;IACG,KAAK,CAAC,MAAM,GAAE,OAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAoFlD;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAqB3C;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK3B;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAM/B;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI;IAS9D;;;;OAIG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI;IAUzD;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKjC;;;OAGG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,GAAG,QAAiB,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAahG;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,EAAE;QAChB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;QACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAChC,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,GAAG,IAAI;IAUR;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;;OAGG;IACH,mBAAmB,IAAI,IAAI;IAM3B;;OAEG;IACH,MAAM,IAAI,YAAY;IAItB;;OAEG;IACH,SAAS,IAAI,SAAS;IAMtB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,gBAAgB;CAMzB"}
@@ -0,0 +1,89 @@
1
+ import { UnauthorizedError } from './api-client.js';
2
+ /**
3
+ * Callback configuration for {@link DebugDataController}.
4
+ *
5
+ * The controller itself holds no UI state — it communicates every
6
+ * state change through these callbacks so the framework wrapper
7
+ * (React hook / Vue composable) can update its own reactive state.
8
+ */
9
+ export interface DebugDataControllerCallbacks<T = unknown> {
10
+ /** Called with the parsed JSON payload after a successful fetch. */
11
+ onData: (data: T) => void;
12
+ /** Called whenever the loading flag changes. */
13
+ onLoading: (loading: boolean) => void;
14
+ /** Called with an `Error` (or `null` to clear) on fetch failure. */
15
+ onError: (error: Error | null) => void;
16
+ /** Called when the server responds with 401/403. */
17
+ onUnauthorized: (error: UnauthorizedError) => void;
18
+ }
19
+ /**
20
+ * Configuration for {@link DebugDataController}.
21
+ */
22
+ export interface DebugDataControllerConfig<T = unknown> extends DebugDataControllerCallbacks<T> {
23
+ /** Base URL for API requests (e.g. `''` for same-origin). */
24
+ baseUrl: string;
25
+ /** Debug API endpoint base path (default `'/admin/api/debug'`). */
26
+ endpoint?: string;
27
+ /** Optional Bearer token. */
28
+ authToken?: string;
29
+ /** Auto-refresh interval in ms (default {@link DEBUG_REFRESH_MS}). */
30
+ refreshInterval?: number;
31
+ }
32
+ /**
33
+ * Framework-agnostic controller that owns the debug-tab data
34
+ * fetching lifecycle: initial fetch, auto-refresh timer, fetchOnce
35
+ * cache, and `UnauthorizedError` handling.
36
+ *
37
+ * Designed to be instantiated once per component mount and driven
38
+ * by a thin framework wrapper that bridges the callbacks to the
39
+ * framework's reactive primitives.
40
+ */
41
+ export declare class DebugDataController<T = unknown> {
42
+ private client;
43
+ private endpoint;
44
+ private refreshInterval;
45
+ private callbacks;
46
+ private timer;
47
+ private currentTab;
48
+ private fetchOnceCache;
49
+ constructor(config: DebugDataControllerConfig<T>);
50
+ /**
51
+ * Begin fetching data for `tab` and start the auto-refresh timer.
52
+ *
53
+ * If a timer is already running it will be stopped first.
54
+ */
55
+ start(tab: string): void;
56
+ /**
57
+ * Stop the auto-refresh timer.
58
+ */
59
+ stop(): void;
60
+ /**
61
+ * Switch to a different tab.
62
+ *
63
+ * Stops the current timer, resets loading/error state, and starts
64
+ * fetching for the new tab.
65
+ */
66
+ switchTab(tab: string): void;
67
+ /**
68
+ * Force an immediate re-fetch of the current tab (ignoring the
69
+ * fetchOnce cache).
70
+ */
71
+ refresh(): void;
72
+ /**
73
+ * Fetch a custom pane endpoint. Optionally honours the fetchOnce
74
+ * cache so a pane that has already been loaded is not re-requested.
75
+ */
76
+ fetchCustomPane(panePath: string, fetchOnce?: boolean): Promise<void>;
77
+ /**
78
+ * Store a value in the fetchOnce cache for a given tab name.
79
+ * Subsequent `start()` / `switchTab()` calls for this tab will
80
+ * serve the cached value instead of hitting the network.
81
+ */
82
+ cacheForTab(tabName: string, data: unknown): void;
83
+ /**
84
+ * Clear all cached fetchOnce data.
85
+ */
86
+ clearCache(): void;
87
+ private fetchData;
88
+ }
89
+ //# sourceMappingURL=debug-data-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug-data-controller.d.ts","sourceRoot":"","sources":["../../src/core/debug-data-controller.ts"],"names":[],"mappings":"AAUA,OAAO,EAAa,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAI9D;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B,CAAC,CAAC,GAAG,OAAO;IACvD,oEAAoE;IACpE,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;IACzB,gDAAgD;IAChD,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,oEAAoE;IACpE,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,CAAA;IACtC,oDAAoD;IACpD,cAAc,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,4BAA4B,CAAC,CAAC,CAAC;IAC7F,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAA;IACf,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sEAAsE;IACtE,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;;;;;;GAQG;AACH,qBAAa,mBAAmB,CAAC,CAAC,GAAG,OAAO;IAC1C,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,eAAe,CAAQ;IAC/B,OAAO,CAAC,SAAS,CAAiC;IAElD,OAAO,CAAC,KAAK,CAA8C;IAC3D,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,cAAc,CAA8B;gBAExC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC;IAmBhD;;;;OAIG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IASxB;;OAEG;IACH,IAAI,IAAI,IAAI;IAOZ;;;;;OAKG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI5B;;;OAGG;IACH,OAAO,IAAI,IAAI;IAMf;;;OAGG;IACG,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BlF;;;;OAIG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI;IAIjD;;OAEG;IACH,UAAU,IAAI,IAAI;YAQJ,SAAS;CA6BxB"}
@@ -0,0 +1,67 @@
1
+ import { ApiClient } from './api-client.js';
2
+ import { FeatureFlags, FeatureConfig } from './types.js';
3
+ /**
4
+ * Default flattened feature config used before the config endpoint responds.
5
+ *
6
+ * All features default to `false` so the UI starts in a minimal state
7
+ * and progressively enables sections as the server confirms support.
8
+ */
9
+ export declare const DEFAULT_FEATURES: FeatureConfig;
10
+ /**
11
+ * Fetch feature flags and configuration from the server.
12
+ *
13
+ * Calls `GET {debugEndpoint}/config` and returns the full
14
+ * {@link FeatureFlags} response, which tells the UI which
15
+ * sections to render and where to find endpoints.
16
+ *
17
+ * @param apiClient - Configured {@link ApiClient} instance.
18
+ * @param debugEndpoint - Base path for the debug API. Defaults to `'/admin/api/debug'`.
19
+ * @returns The parsed feature flags.
20
+ */
21
+ export declare function fetchFeatures(apiClient: ApiClient, debugEndpoint?: string): Promise<FeatureFlags>;
22
+ /**
23
+ * Convenience wrapper around {@link fetchFeatures} that accepts flat options
24
+ * instead of a pre-built {@link ApiClient}.
25
+ *
26
+ * Used by React / Vue hooks that pass simple option objects.
27
+ * Returns a flattened {@link FeatureConfig} for easy property access.
28
+ *
29
+ * @param options - Connection options (baseUrl, debugEndpoint, authToken).
30
+ * @returns The flattened feature config, or {@link DEFAULT_FEATURES} on error.
31
+ */
32
+ export declare function detectFeatures(options: {
33
+ baseUrl?: string;
34
+ debugEndpoint?: string;
35
+ authToken?: string;
36
+ }): Promise<FeatureConfig>;
37
+ /**
38
+ * Determine which metric groups should be visible based on feature flags.
39
+ *
40
+ * Returns a `Set` of group identifiers that the stats bar should display.
41
+ * Groups include: `'process'`, `'memory'`, `'http'`, `'db'`, `'app'`, `'redis'`, `'queue'`, `'log'`.
42
+ *
43
+ * Accepts either a nested {@link FeatureFlags} or a flat {@link FeatureConfig}.
44
+ *
45
+ * @param features - The resolved feature flags (nested or flat).
46
+ * @returns A set of visible metric group names.
47
+ */
48
+ export declare function getVisibleMetricGroups(features: FeatureFlags | FeatureConfig): Set<string>;
49
+ /**
50
+ * Detect which metric groups should be visible based on the actual stats
51
+ * data received from the server.
52
+ *
53
+ * This is used as the primary mechanism for the stats bar to determine
54
+ * which groups to show, mirroring the old vanilla JS behavior where
55
+ * groups were displayed based on what data the server actually sends.
56
+ *
57
+ * Unlike {@link getVisibleMetricGroups} which relies on the debug config
58
+ * endpoint, this function inspects the stats payload directly. This
59
+ * ensures groups are shown even when the debug endpoint is unavailable
60
+ * or not configured (e.g. when `showDebug` is false).
61
+ *
62
+ * @param stats - The server stats snapshot (partial, since not all fields
63
+ * may be present depending on configured collectors).
64
+ * @returns A set of visible metric group names.
65
+ */
66
+ export declare function detectMetricGroupsFromStats(stats: Record<string, unknown>): Set<string>;
67
+ //# sourceMappingURL=feature-detect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-detect.d.ts","sourceRoot":"","sources":["../../src/core/feature-detect.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAO7D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAc9B,CAAA;AAuBD;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CACjC,SAAS,EAAE,SAAS,EACpB,aAAa,GAAE,MAA+B,GAC7C,OAAO,CAAC,YAAY,CAAC,CAGvB;AAED;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,OAAO,CAAC,aAAa,CAAC,CASzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,YAAY,GAAG,aAAa,GAAG,GAAG,CAAC,MAAM,CAAC,CAsB1F;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAiEvF"}