@debugkit/dashboard 0.7.0 → 0.8.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 (58) hide show
  1. package/dist/client/assets/_authed-CNObwuZh.js +7 -0
  2. package/dist/client/assets/_authed-CuP-He8G.js +1 -0
  3. package/dist/client/assets/{charts-XyOWJI9T.js → charts-CUvev8lV.js} +7 -7
  4. package/dist/client/assets/copy-button-ORgLIh59.js +1 -0
  5. package/dist/client/assets/customers-DTMEprFQ.js +1 -0
  6. package/dist/client/assets/endpoints-lMSO2CdM.js +1 -0
  7. package/dist/client/assets/events._eventId-bWag-i8J.js +3 -0
  8. package/dist/client/assets/index-BNpacHyi.js +10 -0
  9. package/dist/client/assets/invite._token-CxXek2SP.js +1 -0
  10. package/dist/client/assets/issues._fingerprint-BQr85TVY.js +1 -0
  11. package/dist/client/assets/login-Dlk3GyyC.js +1 -0
  12. package/dist/client/assets/sessions._sessionId-3wNImMqM.js +1 -0
  13. package/dist/client/assets/settings-CzbEYB7k.js +1 -0
  14. package/dist/client/assets/src-Dq5mIUf0.js +3 -0
  15. package/dist/client/assets/styles-DPsgRH7g.css +2 -0
  16. package/dist/client/assets/team-Bud2-07A.js +1 -0
  17. package/dist/client/assets/timeline-BSDhQPpY.js +1 -0
  18. package/dist/client/assets/ui-CEv2y56s.js +1 -0
  19. package/dist/server/assets/{_authed-CrjuC0O3.js → _authed-DkkRwdZl.js} +19 -5
  20. package/dist/server/assets/{_authed-C-sIPXSO.js → _authed-DsB8kjZB.js} +318 -126
  21. package/dist/server/assets/_tanstack-start-manifest_v-D1_ErrJK.js +97 -0
  22. package/dist/server/assets/copy-button-D3RddzTw.js +52 -0
  23. package/dist/server/assets/customers-CvSLt_xV.js +163 -0
  24. package/dist/server/assets/{demo-BsMMDk_F.js → demo-BRTkdmQJ.js} +25 -4
  25. package/dist/server/assets/{dynamodb-Zkk1-mgz.js → dynamodb-B0V3ZO20.js} +45 -17
  26. package/dist/server/assets/endpoints-mPQXpH8C.js +371 -0
  27. package/dist/server/assets/{queries-BJxX3Kjp.js → errors-C2KEDL7l.js} +842 -62
  28. package/dist/server/assets/events._eventId-pkQBQ9sL.js +765 -0
  29. package/dist/server/assets/{firestore-C52q_vwM.js → firestore-Jd-LeWZI.js} +15 -6
  30. package/dist/server/assets/fns-B3PHbFwV.js +1295 -0
  31. package/dist/server/assets/{fns-DwGaMi8S.js → fns-Di0vMpkQ.js} +25 -3
  32. package/dist/server/assets/{invite._token-xnpnkdRv.js → invite._token-LwWF5YxP.js} +3 -3
  33. package/dist/server/assets/{issues._fingerprint-e7ubdJf0.js → issues._fingerprint-DAA0QCuA.js} +89 -11
  34. package/dist/server/assets/{login-EopnOJXA.js → login-DqjCU4DJ.js} +3 -3
  35. package/dist/server/assets/{memory-BssaqdZm.js → memory-aqsrtEUn.js} +377 -26
  36. package/dist/server/assets/router-C0Dauj2C.js +510 -0
  37. package/dist/server/assets/sessions._sessionId-D7JPV0M4.js +264 -0
  38. package/dist/server/assets/{settings-CaJN69N6.js → settings-Drjd64d7.js} +165 -5
  39. package/dist/server/assets/{src-D83GYTrp.js → src-C4fNgijW.js} +1 -1
  40. package/dist/server/assets/{team-B1UcM1jA.js → team-D7iXYnSE.js} +3 -3
  41. package/dist/server/assets/timeline-MDRNDhiA.js +132 -0
  42. package/dist/server/assets/{ui-BJokJdYa.js → ui-B_XHlLUQ.js} +53 -13
  43. package/dist/server/server.js +37 -21
  44. package/package.json +4 -4
  45. package/dist/client/assets/_authed-BN39b-7H.js +0 -1
  46. package/dist/client/assets/_authed-CspAf0jN.js +0 -7
  47. package/dist/client/assets/index-Bfb2UOzB.js +0 -10
  48. package/dist/client/assets/invite._token-B4HN51-h.js +0 -1
  49. package/dist/client/assets/issues._fingerprint-BV1QrETY.js +0 -1
  50. package/dist/client/assets/login-COlvJ5Je.js +0 -1
  51. package/dist/client/assets/preload-helper-Dscj_TcA.js +0 -3
  52. package/dist/client/assets/settings-Dl4EWeWC.js +0 -1
  53. package/dist/client/assets/styles-DztngwT9.css +0 -2
  54. package/dist/client/assets/team-7Zekz_Er.js +0 -1
  55. package/dist/client/assets/ui-C0HGOza2.js +0 -1
  56. package/dist/server/assets/_tanstack-start-manifest_v-CqaE4wze.js +0 -61
  57. package/dist/server/assets/fns-mbUIXXep.js +0 -529
  58. package/dist/server/assets/router-G99085_Q.js +0 -315
@@ -0,0 +1,510 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D8jQpDG7.js";
2
+ import { a as getInvite, c as getOverview, d as getSettings, f as getTeam, i as getEventDetail, l as getSessionDetail, n as findCustomer, o as getIssueDetail, r as getEndpoints, s as getLoginInfo, u as getSessionUser } from "./fns-Di0vMpkQ.js";
3
+ import { S as OWNER_INFO, b as IMPACT_INFO, v as CATEGORY_INFO } from "./memory-aqsrtEUn.js";
4
+ import { r as rangeSearch } from "./range-picker-0zbSGr3Z.js";
5
+ import { C as ingest, L as getLocalWriteStore, R as getStore, S as CORS_HEADERS, a as buildSummary, i as buildIssueDetail, r as SUMMARY_FIELDS, t as isIndexError, u as authorizeApi, w as parseIngestKeys, z as config } from "./errors-C2KEDL7l.js";
6
+ import { HeadContent, Outlet, Scripts, createFileRoute, createRootRoute, createRouter, lazyRouteComponent, notFound, redirect } from "@tanstack/react-router";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ // src/styles.css?url
9
+ var styles_default = "/assets/styles-DPsgRH7g.css";
10
+ // src/routes/__root.tsx
11
+ var Route$14 = createRootRoute({
12
+ head: () => ({
13
+ meta: [
14
+ { charSet: "utf-8" },
15
+ {
16
+ name: "viewport",
17
+ content: "width=device-width, initial-scale=1"
18
+ },
19
+ { title: "deBug" },
20
+ {
21
+ name: "robots",
22
+ content: "noindex"
23
+ }
24
+ ],
25
+ links: [{
26
+ rel: "stylesheet",
27
+ href: styles_default
28
+ }, {
29
+ rel: "icon",
30
+ href: "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' rx='8' fill='%23d1242f'/><text x='16' y='22' font-size='16' text-anchor='middle' fill='white' font-family='sans-serif' font-weight='700'>dB</text></svg>"
31
+ }]
32
+ }),
33
+ shellComponent: RootDocument,
34
+ component: Outlet
35
+ });
36
+ function RootDocument({ children }) {
37
+ return /* @__PURE__ */ jsxs("html", {
38
+ lang: "en",
39
+ children: [/* @__PURE__ */ jsx("head", { children: /* @__PURE__ */ jsx(HeadContent, {}) }), /* @__PURE__ */ jsxs("body", {
40
+ className: "min-h-screen",
41
+ children: [children, /* @__PURE__ */ jsx(Scripts, {})]
42
+ })]
43
+ });
44
+ }
45
+ // src/routes/_authed.tsx
46
+ var $$splitComponentImporter$10 = () => import("./_authed-DkkRwdZl.js");
47
+ var Route$13 = createFileRoute("/_authed")({
48
+ beforeLoad: async () => {
49
+ const user = await getSessionUser();
50
+ if (!user) throw redirect({ to: "/login" });
51
+ return { user };
52
+ },
53
+ component: lazyRouteComponent($$splitComponentImporter$10, "component")
54
+ });
55
+ // src/routes/login.tsx
56
+ var $$splitComponentImporter$9 = () => import("./login-DqjCU4DJ.js");
57
+ var Route$12 = createFileRoute("/login")({
58
+ beforeLoad: async () => {
59
+ if (await getSessionUser()) throw redirect({ to: "/" });
60
+ },
61
+ loader: () => getLoginInfo(),
62
+ component: lazyRouteComponent($$splitComponentImporter$9, "component")
63
+ });
64
+ // src/lib/issue-filter.ts
65
+ /**
66
+ * Narrowing the overview's issue list: by status, flow and the labels from docs/taxonomy.md.
67
+ * Shared by the overview page and GET /api/summary, so both filter the same way.
68
+ */
69
+ var STATUS_FILTERS = [
70
+ "open",
71
+ "resolved",
72
+ "ignored",
73
+ "all"
74
+ ];
75
+ /** The label filters, in the order they're shown: how bad, whose, what kind. */
76
+ var LABEL_FILTERS = {
77
+ impact: {
78
+ title: "Impact",
79
+ info: IMPACT_INFO
80
+ },
81
+ owner: {
82
+ title: "Owner",
83
+ info: OWNER_INFO
84
+ },
85
+ category: {
86
+ title: "Category",
87
+ info: CATEGORY_INFO
88
+ }
89
+ };
90
+ var LABEL_FILTER_KEYS = Object.keys(LABEL_FILTERS);
91
+ /** Every label filter unset, to spread into search params. */
92
+ var NO_LABEL_FILTERS = Object.fromEntries(LABEL_FILTER_KEYS.map((k) => [k, void 0]));
93
+ /** Read the label filters from search params or a query string. Unknown ids are dropped. */
94
+ function labelFilterOf(get) {
95
+ const out = {};
96
+ for (const k of LABEL_FILTER_KEYS) {
97
+ const v = get(k);
98
+ if (typeof v === "string" && Object.hasOwn(LABEL_FILTERS[k].info, v)) out[k] = v;
99
+ }
100
+ return out;
101
+ }
102
+ var isStatusFilter = (v) => typeof v === "string" && STATUS_FILTERS.includes(v);
103
+ /**
104
+ * The filters in a /api/summary query string, or what's wrong with them. Unlike the page, the API
105
+ * lists every status unless asked: scripts written before filters existed expect all issues.
106
+ */
107
+ function issueFilterFromQuery(q) {
108
+ const status = q.get("status") ?? "all";
109
+ if (!isStatusFilter(status)) return `status must be one of ${STATUS_FILTERS.join(", ")}`;
110
+ for (const k of LABEL_FILTER_KEYS) {
111
+ const v = q.get(k);
112
+ if (v !== null && !Object.hasOwn(LABEL_FILTERS[k].info, v)) return `Unknown ${k} "${v}": use one of ${Object.keys(LABEL_FILTERS[k].info).join(", ")}`;
113
+ }
114
+ return {
115
+ status,
116
+ flow: q.get("flow") ?? void 0,
117
+ ...labelFilterOf((k) => q.get(k))
118
+ };
119
+ }
120
+ function matchesStatus(i, status = "open") {
121
+ if (status === "all") return true;
122
+ if (status === "open") return i.status === "open" || i.status === "regressed";
123
+ return i.status === status;
124
+ }
125
+ /** Issues matching every filter that's set. An issue without labels never matches a label filter. */
126
+ function filterIssues(issues, f) {
127
+ return issues.filter((i) => matchesStatus(i, f.status) && (!f.flow || (i.flow ?? "untagged") === f.flow) && LABEL_FILTER_KEYS.every((k) => !f[k] || i.labels?.[k] === f[k]));
128
+ }
129
+ /**
130
+ * How many issues each label value would leave, given the other filters: the counts next to each
131
+ * option, and "whose is it" for the filtered list. Values with no issues are left out.
132
+ */
133
+ function labelCounts(issues, f, key) {
134
+ const rest = filterIssues(issues, {
135
+ ...f,
136
+ [key]: void 0
137
+ });
138
+ const out = /* @__PURE__ */ new Map();
139
+ for (const i of rest) {
140
+ const v = i.labels?.[key];
141
+ if (v) out.set(v, (out.get(v) ?? 0) + 1);
142
+ }
143
+ return out;
144
+ }
145
+ // src/routes/_authed/index.tsx
146
+ var $$splitComponentImporter$8 = () => import("./_authed-DsB8kjZB.js");
147
+ var Route$11 = createFileRoute("/_authed/")({
148
+ validateSearch: (s) => ({
149
+ app: typeof s.app === "string" ? s.app : void 0,
150
+ flow: typeof s.flow === "string" ? s.flow : void 0,
151
+ status: isStatusFilter(s.status) ? s.status : void 0,
152
+ ...labelFilterOf((k) => s[k]),
153
+ ...rangeSearch(s)
154
+ }),
155
+ loaderDeps: ({ search }) => ({
156
+ app: search.app,
157
+ range: search.range,
158
+ from: search.from,
159
+ to: search.to
160
+ }),
161
+ loader: ({ deps }) => getOverview({ data: deps }),
162
+ component: lazyRouteComponent($$splitComponentImporter$8, "component")
163
+ });
164
+ // src/routes/_authed/customers.tsx
165
+ var $$splitComponentImporter$7 = () => import("./customers-CvSLt_xV.js");
166
+ var Route$10 = createFileRoute("/_authed/customers")({
167
+ validateSearch: (s) => ({
168
+ app: typeof s.app === "string" ? s.app : void 0,
169
+ q: typeof s.q === "string" && s.q.trim() ? s.q : void 0
170
+ }),
171
+ loaderDeps: ({ search }) => ({
172
+ app: search.app,
173
+ q: search.q
174
+ }),
175
+ loader: ({ deps }) => findCustomer({ data: {
176
+ app: deps.app,
177
+ q: deps.q ?? ""
178
+ } }),
179
+ component: lazyRouteComponent($$splitComponentImporter$7, "component")
180
+ });
181
+ /** "No errors", "3 errors, all caught", "3 errors, 1 caught". */
182
+ // src/routes/_authed/endpoints.tsx
183
+ var $$splitComponentImporter$6 = () => import("./endpoints-mPQXpH8C.js");
184
+ var Route$9 = createFileRoute("/_authed/endpoints")({
185
+ validateSearch: (s) => ({
186
+ app: typeof s.app === "string" ? s.app : void 0,
187
+ endpoint: typeof s.endpoint === "string" ? s.endpoint : void 0,
188
+ sort: s.sort === "slow" || s.sort === "busy" ? s.sort : void 0,
189
+ ...rangeSearch(s)
190
+ }),
191
+ loaderDeps: ({ search }) => ({
192
+ app: search.app,
193
+ endpoint: search.endpoint,
194
+ range: search.range,
195
+ from: search.from,
196
+ to: search.to
197
+ }),
198
+ loader: ({ deps }) => getEndpoints({ data: deps }),
199
+ component: lazyRouteComponent($$splitComponentImporter$6, "component")
200
+ });
201
+ /** Endpoints added up per backend service: which one is failing or slow, at a glance. */
202
+ /** The endpoints in the order picked: most failures (as the server sends them), slowest p95, or most calls. */
203
+ // src/routes/_authed/settings.tsx
204
+ var $$splitComponentImporter$5 = () => import("./settings-Drjd64d7.js");
205
+ var Route$8 = createFileRoute("/_authed/settings")({
206
+ validateSearch: (s) => ({ app: typeof s.app === "string" ? s.app : void 0 }),
207
+ loaderDeps: ({ search }) => ({ app: search.app }),
208
+ loader: ({ deps }) => getSettings({ data: deps }),
209
+ component: lazyRouteComponent($$splitComponentImporter$5, "component")
210
+ });
211
+ /** Owners a host can be given; leaving it unset lets the classifier decide. */
212
+ // src/routes/_authed/team.tsx
213
+ var $$splitComponentImporter$4 = () => import("./team-D7iXYnSE.js");
214
+ var Route$7 = createFileRoute("/_authed/team")({
215
+ loader: () => getTeam(),
216
+ component: lazyRouteComponent($$splitComponentImporter$4, "component")
217
+ });
218
+ // src/routes/api/ingest.ts
219
+ /**
220
+ * POST /api/ingest — local development ingest, available only in demo mode.
221
+ * Point the SDK at http://localhost:4400/api/ingest with ingestKey "pk_local".
222
+ * In production, events go to the ingest function in your own cloud instead.
223
+ */
224
+ var Route$6 = createFileRoute("/api/ingest")({ server: { handlers: {
225
+ OPTIONS: async () => new Response(null, {
226
+ status: 204,
227
+ headers: CORS_HEADERS
228
+ }),
229
+ POST: async ({ request }) => {
230
+ const store = await getLocalWriteStore();
231
+ if (!store) return Response.json({
232
+ ok: false,
233
+ error: "Local ingest is only available when DEBUG_STORE is demo or memory. Send events to your cloud ingest function."
234
+ }, {
235
+ status: 404,
236
+ headers: CORS_HEADERS
237
+ });
238
+ const out = await ingest(await request.text(), request.headers.get("x-debug-key") ?? void 0, {
239
+ store,
240
+ keys: parseIngestKeys(config().localIngestKeys)
241
+ });
242
+ return Response.json(out.body, {
243
+ status: out.status,
244
+ headers: CORS_HEADERS
245
+ });
246
+ }
247
+ } } });
248
+ // src/routes/api/summary.ts
249
+ /**
250
+ * GET /api/summary?app=<id> — the overview as JSON, for agents and scripts.
251
+ * Optional issue filters: status (open, resolved, ignored, all), flow, category, owner, impact.
252
+ */
253
+ var Route$5 = createFileRoute("/api/summary")({ server: { handlers: { GET: async ({ request }) => {
254
+ if (!await authorizeApi(request)) return Response.json({ error: "unauthorized" }, { status: 401 });
255
+ const q = new URL(request.url).searchParams;
256
+ const app = q.get("app") ?? void 0;
257
+ const range = {
258
+ range: q.get("range") ?? void 0,
259
+ from: q.get("from") ?? void 0,
260
+ to: q.get("to") ?? void 0
261
+ };
262
+ const summary = await buildSummary(await getStore(), app, config().severity, Date.now(), {
263
+ range,
264
+ retentionDays: config().retentionDays
265
+ });
266
+ if (!summary) return Response.json({ error: "no data" }, { status: 404 });
267
+ const filter = issueFilterFromQuery(q);
268
+ if (typeof filter === "string") return Response.json({ error: filter }, { status: 400 });
269
+ const issues = filterIssues(summary.issues, filter);
270
+ return Response.json({
271
+ ...summary,
272
+ issues,
273
+ _filter: filter,
274
+ _fields: SUMMARY_FIELDS,
275
+ _severityThresholds24h: config().severity
276
+ });
277
+ } } } });
278
+ // src/routes/invite.$token.tsx
279
+ var $$splitComponentImporter$3 = () => import("./invite._token-LwWF5YxP.js");
280
+ var Route$4 = createFileRoute("/invite/$token")({
281
+ loader: ({ params }) => getInvite({ data: { token: params.token } }),
282
+ component: lazyRouteComponent($$splitComponentImporter$3, "component")
283
+ });
284
+ // src/routes/_authed/events.$eventId.tsx
285
+ var $$splitComponentImporter$2 = () => import("./events._eventId-pkQBQ9sL.js");
286
+ var Route$3 = createFileRoute("/_authed/events/$eventId")({
287
+ validateSearch: (s) => ({
288
+ app: typeof s.app === "string" ? s.app : "",
289
+ issue: typeof s.issue === "string" ? s.issue : "",
290
+ view: s.view === "support" ? "support" : void 0,
291
+ ...rangeSearch(s)
292
+ }),
293
+ loaderDeps: ({ search }) => ({
294
+ app: search.app,
295
+ issue: search.issue
296
+ }),
297
+ loader: async ({ params, deps }) => {
298
+ const d = await getEventDetail({ data: {
299
+ app: deps.app,
300
+ fingerprint: deps.issue,
301
+ eventId: params.eventId
302
+ } });
303
+ if (!d) throw notFound();
304
+ return d;
305
+ },
306
+ component: lazyRouteComponent($$splitComponentImporter$2, "component")
307
+ });
308
+ /** The failed call; with what the SDK captured, its request and response in tabs of their own. */
309
+ /** Headers and body of one side of the call. */
310
+ /** Label/value rows; empty values are left out. */
311
+ // src/routes/_authed/issues.$fingerprint.tsx
312
+ var $$splitComponentImporter$1 = () => import("./issues._fingerprint-DAA0QCuA.js");
313
+ var Route$2 = createFileRoute("/_authed/issues/$fingerprint")({
314
+ validateSearch: (s) => ({
315
+ app: typeof s.app === "string" ? s.app : "",
316
+ ...rangeSearch(s)
317
+ }),
318
+ loaderDeps: ({ search }) => ({
319
+ app: search.app,
320
+ range: search.range,
321
+ from: search.from,
322
+ to: search.to
323
+ }),
324
+ loader: async ({ params, deps }) => {
325
+ const d = await getIssueDetail({ data: {
326
+ ...deps,
327
+ fingerprint: params.fingerprint
328
+ } });
329
+ if (!d) throw notFound();
330
+ return d;
331
+ },
332
+ component: lazyRouteComponent($$splitComponentImporter$1, "component")
333
+ });
334
+ /** Resolve (with the fixed version), ignore or reopen, and open a prefilled ticket. */
335
+ /** Explanations mark code with backticks for Markdown; on the page they read as plain text. */
336
+ // src/routes/_authed/sessions.$sessionId.tsx
337
+ var $$splitComponentImporter = () => import("./sessions._sessionId-D7JPV0M4.js");
338
+ var Route$1 = createFileRoute("/_authed/sessions/$sessionId")({
339
+ validateSearch: (s) => ({ app: typeof s.app === "string" ? s.app : "" }),
340
+ loaderDeps: ({ search }) => ({ app: search.app }),
341
+ loader: async ({ params, deps }) => {
342
+ const out = await getSessionDetail({ data: {
343
+ app: deps.app,
344
+ sessionId: params.sessionId
345
+ } });
346
+ if (!out.session && !out.missingIndex) throw notFound();
347
+ return out;
348
+ },
349
+ component: lazyRouteComponent($$splitComponentImporter, "component")
350
+ });
351
+ /** Opens the error whose trail holds this row, where the steps around it are shown. */
352
+ /** "+1:05" from the session's start; the first row is "+0:00". */
353
+ // src/routes/api/issues/$fingerprint.ts
354
+ /** GET /api/issues/<fingerprint>?app=<id> — one issue with breakdowns, sample stack, breadcrumbs and hints. */
355
+ var Route = createFileRoute("/api/issues/$fingerprint")({ server: { handlers: { GET: async ({ request, params }) => {
356
+ if (!await authorizeApi(request)) return Response.json({ error: "unauthorized" }, { status: 401 });
357
+ const q = new URL(request.url).searchParams;
358
+ const app = q.get("app");
359
+ if (!app) return Response.json({ error: "app query param required" }, { status: 400 });
360
+ const range = {
361
+ range: q.get("range") ?? void 0,
362
+ from: q.get("from") ?? void 0,
363
+ to: q.get("to") ?? void 0
364
+ };
365
+ const detail = await buildIssueDetail(await getStore(), app, params.fingerprint, config().severity, Date.now(), {
366
+ range,
367
+ retentionDays: config().retentionDays,
368
+ trackers: config().trackers
369
+ });
370
+ if (!detail) return Response.json({ error: "not found" }, { status: 404 });
371
+ return Response.json(detail);
372
+ } } } });
373
+ // src/routeTree.gen.ts
374
+ var AuthedRoute = Route$13.update({
375
+ id: "/_authed",
376
+ getParentRoute: () => Route$14
377
+ });
378
+ var LoginRoute = Route$12.update({
379
+ id: "/login",
380
+ path: "/login",
381
+ getParentRoute: () => Route$14
382
+ });
383
+ var AuthedIndexRoute = Route$11.update({
384
+ id: "/",
385
+ path: "/",
386
+ getParentRoute: () => AuthedRoute
387
+ });
388
+ var AuthedCustomersRoute = Route$10.update({
389
+ id: "/customers",
390
+ path: "/customers",
391
+ getParentRoute: () => AuthedRoute
392
+ });
393
+ var AuthedEndpointsRoute = Route$9.update({
394
+ id: "/endpoints",
395
+ path: "/endpoints",
396
+ getParentRoute: () => AuthedRoute
397
+ });
398
+ var AuthedSettingsRoute = Route$8.update({
399
+ id: "/settings",
400
+ path: "/settings",
401
+ getParentRoute: () => AuthedRoute
402
+ });
403
+ var AuthedTeamRoute = Route$7.update({
404
+ id: "/team",
405
+ path: "/team",
406
+ getParentRoute: () => AuthedRoute
407
+ });
408
+ var ApiIngestRoute = Route$6.update({
409
+ id: "/api/ingest",
410
+ path: "/api/ingest",
411
+ getParentRoute: () => Route$14
412
+ });
413
+ var ApiSummaryRoute = Route$5.update({
414
+ id: "/api/summary",
415
+ path: "/api/summary",
416
+ getParentRoute: () => Route$14
417
+ });
418
+ var InviteTokenRoute = Route$4.update({
419
+ id: "/invite/$token",
420
+ path: "/invite/$token",
421
+ getParentRoute: () => Route$14
422
+ });
423
+ var AuthedEventsEventIdRoute = Route$3.update({
424
+ id: "/events/$eventId",
425
+ path: "/events/$eventId",
426
+ getParentRoute: () => AuthedRoute
427
+ });
428
+ var AuthedIssuesFingerprintRoute = Route$2.update({
429
+ id: "/issues/$fingerprint",
430
+ path: "/issues/$fingerprint",
431
+ getParentRoute: () => AuthedRoute
432
+ });
433
+ var AuthedSessionsSessionIdRoute = Route$1.update({
434
+ id: "/sessions/$sessionId",
435
+ path: "/sessions/$sessionId",
436
+ getParentRoute: () => AuthedRoute
437
+ });
438
+ var ApiIssuesFingerprintRoute = Route.update({
439
+ id: "/api/issues/$fingerprint",
440
+ path: "/api/issues/$fingerprint",
441
+ getParentRoute: () => Route$14
442
+ });
443
+ var AuthedRouteChildren = {
444
+ AuthedCustomersRoute,
445
+ AuthedEndpointsRoute,
446
+ AuthedSettingsRoute,
447
+ AuthedTeamRoute,
448
+ AuthedIndexRoute,
449
+ AuthedEventsEventIdRoute,
450
+ AuthedIssuesFingerprintRoute,
451
+ AuthedSessionsSessionIdRoute
452
+ };
453
+ var rootRouteChildren = {
454
+ AuthedRoute: AuthedRoute._addFileChildren(AuthedRouteChildren),
455
+ LoginRoute,
456
+ ApiIngestRoute,
457
+ ApiSummaryRoute,
458
+ InviteTokenRoute,
459
+ ApiIssuesFingerprintRoute
460
+ };
461
+ var routeTree = Route$14._addFileChildren(rootRouteChildren)._addFileTypes();
462
+ // src/router.tsx
463
+ var router_exports = /* @__PURE__ */ __exportAll({ getRouter: () => getRouter });
464
+ function ErrorPage({ error }) {
465
+ const message = error instanceof Error ? error.message : String(error);
466
+ if (isIndexError(message)) {
467
+ const building = /currently building/i.test(message);
468
+ return /* @__PURE__ */ jsxs("div", {
469
+ className: "mx-auto max-w-xl p-8",
470
+ children: [
471
+ /* @__PURE__ */ jsx("h1", {
472
+ className: "text-lg font-semibold",
473
+ children: building ? "Firestore is still building deBug's indexes" : "Firestore is missing an index deBug needs"
474
+ }),
475
+ /* @__PURE__ */ jsx("p", {
476
+ className: "mt-2 text-sm text-muted",
477
+ children: building ? "This takes a few minutes after setup or an upgrade. Reload the page shortly." : "Usually this means deBug was upgraded but its indexes weren't. Run npx debugkit deploy-dashboard (or npx debugkit init) to add them; your other indexes are left alone."
478
+ }),
479
+ /* @__PURE__ */ jsx("button", {
480
+ className: "mt-4 rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2",
481
+ onClick: () => window.location.reload(),
482
+ children: "Reload"
483
+ })
484
+ ]
485
+ });
486
+ }
487
+ return /* @__PURE__ */ jsxs("div", {
488
+ className: "mx-auto max-w-xl p-8",
489
+ children: [/* @__PURE__ */ jsx("h1", {
490
+ className: "text-lg font-semibold",
491
+ children: "Something went wrong"
492
+ }), /* @__PURE__ */ jsx("pre", {
493
+ className: "mt-3 overflow-auto rounded-md bg-panel-2 p-3 text-xs",
494
+ children: message
495
+ })]
496
+ });
497
+ }
498
+ function getRouter() {
499
+ return createRouter({
500
+ routeTree,
501
+ scrollRestoration: true,
502
+ defaultPreload: "intent",
503
+ defaultErrorComponent: ErrorPage,
504
+ defaultNotFoundComponent: () => /* @__PURE__ */ jsx("div", {
505
+ className: "p-8 text-muted",
506
+ children: "Not found."
507
+ })
508
+ });
509
+ }
510
+ export { Route$12 as _, Route$4 as a, Route$9 as c, LABEL_FILTERS as d, LABEL_FILTER_KEYS as f, labelCounts as g, getRouter, filterIssues as h, Route$3 as i, Route$10 as l, STATUS_FILTERS as m, Route$1 as n, Route$7 as o, NO_LABEL_FILTERS as p, Route$2 as r, Route$8 as s, router_exports as t, Route$11 as u, Route$13 as v };