@debugkit/dashboard 0.8.0 → 0.9.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.
- package/dist/client/assets/_authed-C29P68T-.js +1 -0
- package/dist/client/assets/{_authed-CNObwuZh.js → _authed-D-dYbHoP.js} +1 -1
- package/dist/client/assets/{charts-CUvev8lV.js → charts--S1o8iId.js} +7 -7
- package/dist/client/assets/{copy-button-ORgLIh59.js → copy-button-BJkvWYRY.js} +1 -1
- package/dist/client/assets/{customers-DTMEprFQ.js → customers-Cwx5qEO1.js} +1 -1
- package/dist/client/assets/{endpoints-lMSO2CdM.js → endpoints-zz1TotR2.js} +1 -1
- package/dist/client/assets/{events._eventId-bWag-i8J.js → events._eventId-Bx6TfUjv.js} +2 -2
- package/dist/client/assets/index-COHr_cc3.js +10 -0
- package/dist/client/assets/{invite._token-CxXek2SP.js → invite._token-DiDJMnQu.js} +1 -1
- package/dist/client/assets/{issues._fingerprint-BQr85TVY.js → issues._fingerprint-Cv522h2j.js} +1 -1
- package/dist/client/assets/{login-Dlk3GyyC.js → login-CKkpc0t5.js} +1 -1
- package/dist/client/assets/{sessions._sessionId-3wNImMqM.js → sessions._sessionId-B0NxM46y.js} +1 -1
- package/dist/client/assets/settings-CIlF10MI.js +1 -0
- package/dist/client/assets/{src-Dq5mIUf0.js → src-BKSiJUs3.js} +1 -1
- package/dist/client/assets/styles-GAsMUS4-.css +2 -0
- package/dist/client/assets/{team-Bud2-07A.js → team-BRuVQ2bU.js} +1 -1
- package/dist/client/assets/{timeline-BSDhQPpY.js → timeline-BIGo9MCA.js} +1 -1
- package/dist/client/assets/{ui-CEv2y56s.js → ui-CaEZB1j2.js} +1 -1
- package/dist/client/assets/version-banner-VFvyqbPh.js +1 -0
- package/dist/server/assets/_authed-BJWDiF9i.js +92 -0
- package/dist/server/assets/{_authed-DsB8kjZB.js → _authed-X9u_5JUy.js} +2 -2
- package/dist/server/assets/{_tanstack-start-manifest_v-D1_ErrJK.js → _tanstack-start-manifest_v-C6vaeBdY.js} +30 -37
- package/dist/server/assets/{customers-CvSLt_xV.js → customers-827fC5I3.js} +2 -2
- package/dist/server/assets/{demo-BRTkdmQJ.js → demo-DDNiXCgj.js} +6 -5
- package/dist/server/assets/{dynamodb-B0V3ZO20.js → dynamodb-Cd4blXkh.js} +55 -2
- package/dist/server/assets/{endpoints-mPQXpH8C.js → endpoints-_T0NSOyA.js} +2 -2
- package/dist/server/assets/{errors-C2KEDL7l.js → errors-Po4Tt5zd.js} +57 -10
- package/dist/server/assets/{events._eventId-pkQBQ9sL.js → events._eventId-Dcsu4oVO.js} +2 -2
- package/dist/server/assets/{firestore-Jd-LeWZI.js → firestore-c8Sz2Q4O.js} +13 -2
- package/dist/server/assets/{fns-Di0vMpkQ.js → fns-BiUOnY1_.js} +6 -4
- package/dist/server/assets/{fns-B3PHbFwV.js → fns-CVbk8Gf9.js} +19 -4
- package/dist/server/assets/{invite._token-LwWF5YxP.js → invite._token-7DjEeeaD.js} +3 -3
- package/dist/server/assets/{issues._fingerprint-DAA0QCuA.js → issues._fingerprint-vc9r3jgg.js} +3 -3
- package/dist/server/assets/{login-DqjCU4DJ.js → login-CwKAx9Bj.js} +3 -3
- package/dist/server/assets/{memory-aqsrtEUn.js → memory-Bv4C8uyK.js} +55 -3
- package/dist/server/assets/{router-C0Dauj2C.js → router-Dk3XHn7B.js} +17 -15
- package/dist/server/assets/{sessions._sessionId-D7JPV0M4.js → sessions._sessionId-BvXxK9qF.js} +2 -2
- package/dist/server/assets/{settings-Drjd64d7.js → settings-B9NLQjl1.js} +60 -4
- package/dist/server/assets/{src-C4fNgijW.js → src-oWPSAvXv.js} +1 -1
- package/dist/server/assets/{team-D7iXYnSE.js → team-Bsm2wFG0.js} +3 -3
- package/dist/server/assets/{ui-B_XHlLUQ.js → ui-SAkSlP7f.js} +1 -1
- package/dist/server/assets/version-banner-nf-yZurq.js +106 -0
- package/dist/server/assets/versions-BOlL8jam.js +58 -0
- package/dist/server/server.js +29 -25
- package/package.json +4 -4
- package/dist/client/assets/_authed-CuP-He8G.js +0 -1
- package/dist/client/assets/index-BNpacHyi.js +0 -10
- package/dist/client/assets/settings-CzbEYB7k.js +0 -1
- package/dist/client/assets/styles-DPsgRH7g.css +0 -2
- package/dist/server/assets/_authed-DkkRwdZl.js +0 -87
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as getCookie, i as deleteCookie, o as getRequestHeader, s as setCookie } from "../server.js";
|
|
2
|
-
import { C as cleanFnName,
|
|
3
|
-
import { n as TEAM_ROLES, t as MAX_RETENTION_DAYS } from "./src-
|
|
2
|
+
import { C as CAUSE_INFO, D as cleanFnName, E as OWNER_INFO, O as markLibraryFrames, S as CATEGORY_INFO, _ as severityFromCount, b as normaliseHostMatch, d as SEVERITY_ORDER, f as compareVersions$1, g as releaseKey, h as percentileMs, l as Envelope, m as parseStack, r as compareVersions, u as DEFAULT_SEVERITY_THRESHOLDS, v as hostNameFor, w as IMPACT_INFO, x as validHostNames, y as nameUrlsIn } from "./memory-Bv4C8uyK.js";
|
|
3
|
+
import { n as TEAM_ROLES, t as MAX_RETENTION_DAYS } from "./src-oWPSAvXv.js";
|
|
4
4
|
import { createHash, createHmac, randomBytes, scryptSync, timingSafeEqual } from "node:crypto";
|
|
5
5
|
// src/server/config.ts
|
|
6
6
|
var loaded = false;
|
|
@@ -40,6 +40,8 @@ function config() {
|
|
|
40
40
|
/** The ingest function's admin routes (…/admin) and their token, for changing settings. */
|
|
41
41
|
adminUrl: env.DEBUG_ADMIN_URL?.replace(/\/+$/, ""),
|
|
42
42
|
adminToken: env.DEBUG_ADMIN_TOKEN,
|
|
43
|
+
/** The CLI environment this dashboard belongs to ("preview"), for commands it suggests (`--env preview`). */
|
|
44
|
+
environment: /^[a-z][a-z0-9-]{0,30}$/.test(env.DEBUG_ENVIRONMENT ?? "") ? env.DEBUG_ENVIRONMENT : void 0,
|
|
43
45
|
/** The deployment's default retention (what ingest uses before an app has a setting). */
|
|
44
46
|
retentionDays: num(env.DEBUG_RETENTION_DAYS, 0) || void 0,
|
|
45
47
|
/** "Create issue" buttons on the issue page. */
|
|
@@ -75,22 +77,22 @@ async function create() {
|
|
|
75
77
|
case "firestore": {
|
|
76
78
|
const { initializeApp, getApps } = await import("firebase-admin/app");
|
|
77
79
|
const { getFirestore } = await import("firebase-admin/firestore");
|
|
78
|
-
const { FirestoreStore } = await import("./firestore-
|
|
80
|
+
const { FirestoreStore } = await import("./firestore-c8Sz2Q4O.js");
|
|
79
81
|
if (!getApps().length) initializeApp();
|
|
80
82
|
return new FirestoreStore(getFirestore(), { root: cfg.firestoreRoot });
|
|
81
83
|
}
|
|
82
84
|
case "dynamodb": {
|
|
83
85
|
const { DynamoDBClient } = await import("@aws-sdk/client-dynamodb");
|
|
84
86
|
const { DynamoDBDocumentClient } = await import("@aws-sdk/lib-dynamodb");
|
|
85
|
-
const { DynamoStore } = await import("./dynamodb-
|
|
87
|
+
const { DynamoStore } = await import("./dynamodb-Cd4blXkh.js");
|
|
86
88
|
return new DynamoStore(DynamoDBDocumentClient.from(new DynamoDBClient({})), { table: cfg.dynamoTable });
|
|
87
89
|
}
|
|
88
90
|
case "memory": {
|
|
89
|
-
const { MemoryStore } = await import("./memory-
|
|
91
|
+
const { MemoryStore } = await import("./memory-Bv4C8uyK.js").then((n) => n.n);
|
|
90
92
|
return new MemoryStore();
|
|
91
93
|
}
|
|
92
94
|
default: {
|
|
93
|
-
const { seedDemo } = await import("./demo-
|
|
95
|
+
const { seedDemo } = await import("./demo-DDNiXCgj.js");
|
|
94
96
|
return seedDemo();
|
|
95
97
|
}
|
|
96
98
|
}
|
|
@@ -907,6 +909,11 @@ function fingerprint(e) {
|
|
|
907
909
|
function titleOf(e) {
|
|
908
910
|
return `${e.error.name}: ${e.error.message}`.slice(0, 200);
|
|
909
911
|
}
|
|
912
|
+
// ../../packages/ingest/src/version.ts
|
|
913
|
+
/** This ingest's version: the package's, which every release bumps with the SDK's (one changeset group). */
|
|
914
|
+
var INGEST_VERSION = "0.9.0";
|
|
915
|
+
/** Sent on every ingest response, so an SDK (or the CLI) can tell how old the ingest it talks to is. */
|
|
916
|
+
var VERSION_HEADER = "x-debugkit-version";
|
|
910
917
|
// ../../packages/ingest/src/index.ts
|
|
911
918
|
/** "pk_abc:megaton-native,pk_def:other-app" → { pk_abc: "megaton-native", ... } */
|
|
912
919
|
function parseIngestKeys(raw) {
|
|
@@ -1180,7 +1187,8 @@ async function ingest(rawBody, ingestKey, opts) {
|
|
|
1180
1187
|
stored.length ? opts.store.writeEvents(stored, { retentionDays }) : void 0,
|
|
1181
1188
|
opts.store.upsertIssues([...issues.values()]),
|
|
1182
1189
|
opts.store.incrementRollups(rollups),
|
|
1183
|
-
markUsers(opts.store, app, env.user?.id ?? env.user?.anonymousId ?? env.session.id, scopes, dayOf(receivedAt))
|
|
1190
|
+
markUsers(opts.store, app, env.user?.id ?? env.user?.anonymousId ?? env.session.id, scopes, dayOf(receivedAt)),
|
|
1191
|
+
noteVersions(opts.store, app, env.sdk.version, receivedAt)
|
|
1184
1192
|
]);
|
|
1185
1193
|
if (outcome && (outcome.created.length || outcome.regressed.length)) await sendAlerts(app, outcome, issues, settings);
|
|
1186
1194
|
return {
|
|
@@ -1191,6 +1199,42 @@ async function ingest(rawBody, ingestKey, opts) {
|
|
|
1191
1199
|
}
|
|
1192
1200
|
};
|
|
1193
1201
|
}
|
|
1202
|
+
/**
|
|
1203
|
+
* What this instance last recorded (or tried to) per store and app, so a steady app costs one
|
|
1204
|
+
* versions write a day, not one per batch, and a store that's down isn't retried on every batch.
|
|
1205
|
+
*/
|
|
1206
|
+
var recordedVersions = /* @__PURE__ */ new WeakMap();
|
|
1207
|
+
var VERSIONS_REFRESH_MS = 864e5;
|
|
1208
|
+
var VERSIONS_RETRY_MS = 6e5;
|
|
1209
|
+
/**
|
|
1210
|
+
* Record the app's SDK version and this ingest's, when the SDK is newer than what this instance last
|
|
1211
|
+
* recorded, or a day has passed. A failure here never fails the envelope; it's tried again in ten minutes.
|
|
1212
|
+
*/
|
|
1213
|
+
async function noteVersions(store, app, sdk, at) {
|
|
1214
|
+
let byApp = recordedVersions.get(store);
|
|
1215
|
+
if (!byApp) recordedVersions.set(store, byApp = /* @__PURE__ */ new Map());
|
|
1216
|
+
const had = byApp.get(app);
|
|
1217
|
+
const now = Date.parse(at);
|
|
1218
|
+
if (had && compareVersions(sdk, had.sdk) <= 0 && now - had.at < VERSIONS_REFRESH_MS) return;
|
|
1219
|
+
const newest = compareVersions(sdk, had?.sdk) > 0 ? sdk : had?.sdk;
|
|
1220
|
+
try {
|
|
1221
|
+
await store.recordVersions(app, {
|
|
1222
|
+
sdk,
|
|
1223
|
+
ingest: INGEST_VERSION,
|
|
1224
|
+
at
|
|
1225
|
+
});
|
|
1226
|
+
byApp.set(app, {
|
|
1227
|
+
sdk: newest,
|
|
1228
|
+
at: now
|
|
1229
|
+
});
|
|
1230
|
+
} catch (err) {
|
|
1231
|
+
byApp.set(app, {
|
|
1232
|
+
sdk: newest,
|
|
1233
|
+
at: now - VERSIONS_REFRESH_MS + VERSIONS_RETRY_MS
|
|
1234
|
+
});
|
|
1235
|
+
console.warn("[deBug] couldn't record versions", err);
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1194
1238
|
/** Recently written (scope, member, day) marks, so a busy user costs one write per day, not per batch. */
|
|
1195
1239
|
var seenMarks = /* @__PURE__ */ new Set();
|
|
1196
1240
|
/**
|
|
@@ -1214,11 +1258,14 @@ async function markUsers(store, app, who, scopes, day) {
|
|
|
1214
1258
|
if (seenMarks.size > 5e4) seenMarks.clear();
|
|
1215
1259
|
if (marks.length) await store.markUsers(app, marks);
|
|
1216
1260
|
}
|
|
1261
|
+
/** On every ingest response: CORS for browser SDKs, and this ingest's version, readable from the browser too. */
|
|
1217
1262
|
var CORS_HEADERS = {
|
|
1218
1263
|
"access-control-allow-origin": "*",
|
|
1219
1264
|
"access-control-allow-methods": "POST, OPTIONS",
|
|
1220
1265
|
"access-control-allow-headers": "content-type, x-debug-key",
|
|
1221
|
-
"access-control-
|
|
1266
|
+
"access-control-expose-headers": VERSION_HEADER,
|
|
1267
|
+
"access-control-max-age": "86400",
|
|
1268
|
+
[VERSION_HEADER]: INGEST_VERSION
|
|
1222
1269
|
};
|
|
1223
1270
|
// src/server/auth.ts
|
|
1224
1271
|
var cookie = () => config().cookieName;
|
|
@@ -1852,7 +1899,7 @@ async function buildSummary(store, appParam, thresholds, now = Date.now(), opts
|
|
|
1852
1899
|
const issueRange = /* @__PURE__ */ new Map();
|
|
1853
1900
|
for (const r of issueDays) issueRange.set(r.key, (issueRange.get(r.key) ?? 0) + r.errors);
|
|
1854
1901
|
const rangeStart = hourly ? (/* @__PURE__ */ new Date(now - DAY)).toISOString() : `${from}T00:00:00.000Z`;
|
|
1855
|
-
const versionsInRange = [...new Set(sessionRows.map((r) => r.key.split("|")[0]).filter((v) => v && v !== "unknown"))].sort(compareVersions);
|
|
1902
|
+
const versionsInRange = [...new Set(sessionRows.map((r) => r.key.split("|")[0]).filter((v) => v && v !== "unknown"))].sort(compareVersions$1);
|
|
1856
1903
|
const latestVersion = versionsInRange[versionsInRange.length - 1] ?? null;
|
|
1857
1904
|
const issueRows = issues.filter((i) => i.lastSeen >= rangeStart && i.firstSeen <= `${to}T23:59:59.999Z`).map((i) => toIssueRow(i, issue24h.get(i.fingerprint) ?? 0, hourly ? issue24h.get(i.fingerprint) ?? 0 : issueRange.get(i.fingerprint) ?? 0, thresholds, latestVersion, criticalFlows, hosts)).sort(bySeverityThenCount);
|
|
1858
1905
|
const active = issueRows.filter((i) => i.status !== "ignored" && i.status !== "resolved");
|
|
@@ -2069,7 +2116,7 @@ function buildHealth(sessionRows, endpointRows, today, hosts = []) {
|
|
|
2069
2116
|
...v,
|
|
2070
2117
|
crashFreeRate: rate(v.crashed, v.sessions),
|
|
2071
2118
|
errorFreeRate: rate(v.errored, v.sessions)
|
|
2072
|
-
})).filter((v) => v.sessions > 0).sort((a, b) => compareVersions(b.version, a.version)).slice(0, 8);
|
|
2119
|
+
})).filter((v) => v.sessions > 0).sort((a, b) => compareVersions$1(b.version, a.version)).slice(0, 8);
|
|
2073
2120
|
const sum = (k) => [...byVersion.values()].reduce((a, v) => a + v[k], 0);
|
|
2074
2121
|
const eps = /* @__PURE__ */ new Map();
|
|
2075
2122
|
for (const r of endpointRows) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as CopyButton } from "./copy-button-D3RddzTw.js";
|
|
2
2
|
import { a as joined, i as clock, n as ICON, o as offset, t as CrumbBody } from "./timeline-MDRNDhiA.js";
|
|
3
|
-
import { t as Card } from "./ui-
|
|
4
|
-
import { i as Route } from "./router-
|
|
3
|
+
import { t as Card } from "./ui-SAkSlP7f.js";
|
|
4
|
+
import { i as Route } from "./router-Dk3XHn7B.js";
|
|
5
5
|
import { useEffect, useState } from "react";
|
|
6
6
|
import { Link } from "@tanstack/react-router";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./src-
|
|
1
|
+
import { c as rollupId, i as mergeVersions, p as isRegression, s as coalesceRollups } from "./memory-Bv4C8uyK.js";
|
|
2
|
+
import "./src-oWPSAvXv.js";
|
|
3
3
|
import { FieldValue, Timestamp } from "firebase-admin/firestore";
|
|
4
4
|
// ../../packages/adapters/src/firestore.ts
|
|
5
5
|
/**
|
|
@@ -76,6 +76,17 @@ var FirestoreStore = class {
|
|
|
76
76
|
updatedAt: FieldValue.serverTimestamp()
|
|
77
77
|
}, { merge: true });
|
|
78
78
|
}
|
|
79
|
+
/** On the app's own document, in a transaction: two ingests seeing different SDKs keep the newer. */
|
|
80
|
+
async recordVersions(app, seen) {
|
|
81
|
+
const ref = this.app(app);
|
|
82
|
+
await this.db.runTransaction(async (tx) => {
|
|
83
|
+
const cur = (await tx.get(ref)).data()?.versions;
|
|
84
|
+
tx.set(ref, { versions: strip(mergeVersions(cur, seen)) }, { merge: true });
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
async getVersions(app) {
|
|
88
|
+
return (await this.app(app).get()).data()?.versions ?? {};
|
|
89
|
+
}
|
|
79
90
|
async writeEvents(events, opts = {}) {
|
|
80
91
|
const days = opts.retentionDays ?? this.opts.retentionDays ?? 30;
|
|
81
92
|
for (const chunk of chunks(events, 400)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as TSS_SERVER_FUNCTION, r as getServerFnById, t as createServerFn } from "../server.js";
|
|
2
|
-
import { N as validRetention } from "./errors-
|
|
3
|
-
import { n as TEAM_ROLES } from "./src-
|
|
4
|
-
import {
|
|
2
|
+
import { N as validRetention } from "./errors-Po4Tt5zd.js";
|
|
3
|
+
import { n as TEAM_ROLES } from "./src-oWPSAvXv.js";
|
|
4
|
+
import { x as validHostNames } from "./memory-Bv4C8uyK.js";
|
|
5
5
|
// ../../node_modules/.pnpm/@tanstack+start-server-core@1.169.45/node_modules/@tanstack/start-server-core/dist/esm/createSsrRpc.js
|
|
6
6
|
var createSsrRpc = (functionId) => {
|
|
7
7
|
const url = "/_serverFn/" + functionId;
|
|
@@ -17,6 +17,8 @@ var createSsrRpc = (functionId) => {
|
|
|
17
17
|
};
|
|
18
18
|
// src/server/fns.ts
|
|
19
19
|
var getSessionUser = createServerFn({ method: "GET" }).handler(createSsrRpc("1edaae661b4968edee65ebb4a946e246107684704b784b6359bf9af2dfaae23f"));
|
|
20
|
+
/** Whether the project's SDK, ingest and this dashboard are in step; null when the store can't be read. */
|
|
21
|
+
var getVersionStatus = createServerFn({ method: "GET" }).handler(createSsrRpc("c63a8340378de7fe78e1e8ba9aaeaa87b401e3838b3e5bfa029f155bcb39b2d2"));
|
|
20
22
|
var getLoginInfo = createServerFn({ method: "GET" }).handler(createSsrRpc("949e1fa91e479f6ad9193caee7087c38ca21191786f4b2c082ea643cbd30dec1"));
|
|
21
23
|
var login = createServerFn({ method: "POST" }).validator((d) => {
|
|
22
24
|
if (typeof d?.email !== "string" || typeof d?.password !== "string") throw new Error("email and password required");
|
|
@@ -126,4 +128,4 @@ var joinTeam = createServerFn({ method: "POST" }).validator((d) => {
|
|
|
126
128
|
password: d.password
|
|
127
129
|
};
|
|
128
130
|
}).handler(createSsrRpc("2598559c204c178bf26b98a0f3ae20e519cec3b9013f9d9b02ce14b170ada220"));
|
|
129
|
-
export {
|
|
131
|
+
export { setMemberRole as C, sendTestAlert as S, logout as _, getInvite as a, saveAppSettings as b, getOverview as c, getSettings as d, getTeam as f, login as g, joinTeam as h, getEventDetail as i, getSessionDetail as l, inviteToTeam as m, findCustomer as n, getIssueDetail as o, getVersionStatus as p, getEndpoints as r, getLoginInfo as s, cancelInvite as t, getSessionUser as u, removeFromTeam as v, updateIssueStatus as w, saveRetention as x, restampExisting as y };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { n as TSS_SERVER_FUNCTION, t as createServerFn } from "../server.js";
|
|
2
|
-
import { A as seenHosts, D as teamAction, E as hashInviteToken, F as writeRetention, I as writeSettings, L as getLocalWriteStore, M as testAlert, N as validRetention, O as readSettings, P as writeIssueStatus, R as getStore, T as isRequestCategory, _ as hashPassword, a as buildSummary, b as startSession, c as resolveRange, d as canManage, f as checkCredentials, g as forgetMember, h as envOwnerEmails, i as buildIssueDetail, j as settingsWriter, k as restampStep, l as DEMO_USER, m as endSession, n as isMissingIndex, o as endpointTimings, p as demoLoginEnabled, s as retentionFor, t as isIndexError, v as readSession, x as tooManyAttempts, y as recordFailure, z as config } from "./errors-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { A as seenHosts, D as teamAction, E as hashInviteToken, F as writeRetention, I as writeSettings, L as getLocalWriteStore, M as testAlert, N as validRetention, O as readSettings, P as writeIssueStatus, R as getStore, T as isRequestCategory, _ as hashPassword, a as buildSummary, b as startSession, c as resolveRange, d as canManage, f as checkCredentials, g as forgetMember, h as envOwnerEmails, i as buildIssueDetail, j as settingsWriter, k as restampStep, l as DEMO_USER, m as endSession, n as isMissingIndex, o as endpointTimings, p as demoLoginEnabled, s as retentionFor, t as isIndexError, v as readSession, x as tooManyAttempts, y as recordFailure, z as config } from "./errors-Po4Tt5zd.js";
|
|
3
|
+
import { v as hostNameFor, x as validHostNames, y as nameUrlsIn } from "./memory-Bv4C8uyK.js";
|
|
4
|
+
import { t as buildVersionStatus } from "./versions-BOlL8jam.js";
|
|
5
|
+
import { n as TEAM_ROLES } from "./src-oWPSAvXv.js";
|
|
5
6
|
import { redirect } from "@tanstack/react-router";
|
|
6
7
|
// ../../node_modules/.pnpm/@tanstack+start-server-core@1.169.45/node_modules/@tanstack/start-server-core/dist/esm/createServerRpc.js
|
|
7
8
|
var createServerRpc = (serverFnMeta, splitImportFn) => {
|
|
@@ -822,6 +823,20 @@ var getSessionUser_createServerFn_handler = createServerRpc({
|
|
|
822
823
|
filename: "src/server/fns.ts"
|
|
823
824
|
}, (opts) => getSessionUser.__executeServer(opts));
|
|
824
825
|
var getSessionUser = createServerFn({ method: "GET" }).handler(getSessionUser_createServerFn_handler, async () => readSession());
|
|
826
|
+
var getVersionStatus_createServerFn_handler = createServerRpc({
|
|
827
|
+
id: "c63a8340378de7fe78e1e8ba9aaeaa87b401e3838b3e5bfa029f155bcb39b2d2",
|
|
828
|
+
name: "getVersionStatus",
|
|
829
|
+
filename: "src/server/fns.ts"
|
|
830
|
+
}, (opts) => getVersionStatus.__executeServer(opts));
|
|
831
|
+
var getVersionStatus = createServerFn({ method: "GET" }).handler(getVersionStatus_createServerFn_handler, async () => {
|
|
832
|
+
await requireUser();
|
|
833
|
+
try {
|
|
834
|
+
return await buildVersionStatus(await getStore(), config().environment);
|
|
835
|
+
} catch (e) {
|
|
836
|
+
console.warn("[deBug] couldn't read versions", e.message);
|
|
837
|
+
return null;
|
|
838
|
+
}
|
|
839
|
+
});
|
|
825
840
|
var getLoginInfo_createServerFn_handler = createServerRpc({
|
|
826
841
|
id: "949e1fa91e479f6ad9193caee7087c38ca21191786f4b2c082ea643cbd30dec1",
|
|
827
842
|
name: "getLoginInfo",
|
|
@@ -1292,4 +1307,4 @@ var joinTeam = createServerFn({ method: "POST" }).validator((d) => {
|
|
|
1292
1307
|
};
|
|
1293
1308
|
}
|
|
1294
1309
|
});
|
|
1295
|
-
export { cancelInvite_createServerFn_handler, findCustomer_createServerFn_handler, getEndpoints_createServerFn_handler, getEventDetail_createServerFn_handler, getInvite_createServerFn_handler, getIssueDetail_createServerFn_handler, getLoginInfo_createServerFn_handler, getOverview_createServerFn_handler, getSessionDetail_createServerFn_handler, getSessionUser_createServerFn_handler, getSettings_createServerFn_handler, getTeam_createServerFn_handler, inviteToTeam_createServerFn_handler, joinTeam_createServerFn_handler, login_createServerFn_handler, logout_createServerFn_handler, removeFromTeam_createServerFn_handler, restampExisting_createServerFn_handler, saveAppSettings_createServerFn_handler, saveRetention_createServerFn_handler, sendTestAlert_createServerFn_handler, setMemberRole_createServerFn_handler, updateIssueStatus_createServerFn_handler };
|
|
1310
|
+
export { cancelInvite_createServerFn_handler, findCustomer_createServerFn_handler, getEndpoints_createServerFn_handler, getEventDetail_createServerFn_handler, getInvite_createServerFn_handler, getIssueDetail_createServerFn_handler, getLoginInfo_createServerFn_handler, getOverview_createServerFn_handler, getSessionDetail_createServerFn_handler, getSessionUser_createServerFn_handler, getSettings_createServerFn_handler, getTeam_createServerFn_handler, getVersionStatus_createServerFn_handler, inviteToTeam_createServerFn_handler, joinTeam_createServerFn_handler, login_createServerFn_handler, logout_createServerFn_handler, removeFromTeam_createServerFn_handler, restampExisting_createServerFn_handler, saveAppSettings_createServerFn_handler, saveRetention_createServerFn_handler, sendTestAlert_createServerFn_handler, setMemberRole_createServerFn_handler, updateIssueStatus_createServerFn_handler };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as Logo } from "./ui-
|
|
2
|
-
import {
|
|
3
|
-
import { a as Route } from "./router-
|
|
1
|
+
import { a as Logo } from "./ui-SAkSlP7f.js";
|
|
2
|
+
import { h as joinTeam } from "./fns-BiUOnY1_.js";
|
|
3
|
+
import { a as Route } from "./router-Dk3XHn7B.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { Link, useRouter } from "@tanstack/react-router";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/server/assets/{issues._fingerprint-DAA0QCuA.js → issues._fingerprint-vc9r3jgg.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as HourlyChart, r as TrendChart } from "./charts-DzTVqJ8z.js";
|
|
2
2
|
import { n as RetentionNote, t as RangePicker } from "./range-picker-0zbSGr3Z.js";
|
|
3
|
-
import { c as Stat, l as timeAgo, n as DataTable, o as SeverityBadge, r as IssueLabels, s as ShareBars, t as Card } from "./ui-
|
|
3
|
+
import { c as Stat, l as timeAgo, n as DataTable, o as SeverityBadge, r as IssueLabels, s as ShareBars, t as Card } from "./ui-SAkSlP7f.js";
|
|
4
4
|
import { t as CopyButton } from "./copy-button-D3RddzTw.js";
|
|
5
|
-
import {
|
|
6
|
-
import { r as Route } from "./router-
|
|
5
|
+
import { w as updateIssueStatus } from "./fns-BiUOnY1_.js";
|
|
6
|
+
import { r as Route } from "./router-Dk3XHn7B.js";
|
|
7
7
|
import { useState } from "react";
|
|
8
8
|
import { Link, useRouter } from "@tanstack/react-router";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as Logo } from "./ui-
|
|
2
|
-
import {
|
|
3
|
-
import { _ as Route } from "./router-
|
|
1
|
+
import { a as Logo } from "./ui-SAkSlP7f.js";
|
|
2
|
+
import { g as login } from "./fns-BiUOnY1_.js";
|
|
3
|
+
import { _ as Route } from "./router-Dk3XHn7B.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { useRouter } from "@tanstack/react-router";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -3862,7 +3862,7 @@ function validHostNames(x) {
|
|
|
3862
3862
|
/** The most of a failed call's captured body kept, in characters (16 KB). */
|
|
3863
3863
|
var MAX_CAPTURED_BODY = 16384;
|
|
3864
3864
|
/** "2.10.0" sorts after "2.9.1"; pre-release and build suffixes compare as text. */
|
|
3865
|
-
function compareVersions(a, b) {
|
|
3865
|
+
function compareVersions$1(a, b) {
|
|
3866
3866
|
const pa = a.split(/[.+-]/);
|
|
3867
3867
|
const pb = b.split(/[.+-]/);
|
|
3868
3868
|
for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
|
|
@@ -3906,7 +3906,7 @@ function percentileMs(buckets, p) {
|
|
|
3906
3906
|
}
|
|
3907
3907
|
/** Has an issue resolved in `resolvedIn` come back in `version`? */
|
|
3908
3908
|
function isRegression(resolvedIn, version, resolvedAt, ts) {
|
|
3909
|
-
if (resolvedIn && version) return compareVersions(version, resolvedIn) >= 0;
|
|
3909
|
+
if (resolvedIn && version) return compareVersions$1(version, resolvedIn) >= 0;
|
|
3910
3910
|
return !!resolvedAt && ts > resolvedAt;
|
|
3911
3911
|
}
|
|
3912
3912
|
/** Occurrences in the trailing 24h window. */
|
|
@@ -4185,6 +4185,51 @@ function coalesceRollups(incs) {
|
|
|
4185
4185
|
return [...map.values()];
|
|
4186
4186
|
}
|
|
4187
4187
|
var rollupId = (r) => `${r.day}__${r.dimension}__${encodeURIComponent(r.key)}`;
|
|
4188
|
+
// ../../packages/adapters/src/versions.ts
|
|
4189
|
+
var SEMVER = /^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
4190
|
+
/** "1.2.3", "1.2.3-beta.1" (a leading "v" and build metadata are allowed), or undefined. */
|
|
4191
|
+
function parseVersion(v) {
|
|
4192
|
+
const m = v ? SEMVER.exec(v.trim()) : null;
|
|
4193
|
+
return m ? {
|
|
4194
|
+
major: Number(m[1]),
|
|
4195
|
+
minor: Number(m[2]),
|
|
4196
|
+
patch: Number(m[3]),
|
|
4197
|
+
pre: m[4]
|
|
4198
|
+
} : void 0;
|
|
4199
|
+
}
|
|
4200
|
+
/**
|
|
4201
|
+
* A string that sorts like the version, so a store can keep the newest with a plain comparison:
|
|
4202
|
+
* "000001.000002.000003~" for a release, "000001.000002.000003-beta.000002" for a prerelease, which
|
|
4203
|
+
* sorts below it ("-" comes before "~"). Numeric prerelease parts are padded, so beta.10 sorts above
|
|
4204
|
+
* beta.2, and below letters, as semver has it. Undefined when it isn't a version.
|
|
4205
|
+
*/
|
|
4206
|
+
function versionKey(v) {
|
|
4207
|
+
const p = parseVersion(v);
|
|
4208
|
+
if (!p) return void 0;
|
|
4209
|
+
const pad = (n) => String(Math.min(n, 999999)).padStart(6, "0");
|
|
4210
|
+
const pre = p.pre?.split(".").map((part) => /^\d+$/.test(part) ? pad(Number(part)) : part).join(".");
|
|
4211
|
+
return `${pad(p.major)}.${pad(p.minor)}.${pad(p.patch)}${pre ? `-${pre}` : "~"}`;
|
|
4212
|
+
}
|
|
4213
|
+
/** Negative when a is older than b, 0 when the same, positive when newer; versions that don't parse sort lowest. */
|
|
4214
|
+
function compareVersions(a, b) {
|
|
4215
|
+
const ka = versionKey(a) ?? "";
|
|
4216
|
+
const kb = versionKey(b) ?? "";
|
|
4217
|
+
return ka < kb ? -1 : ka > kb ? 1 : 0;
|
|
4218
|
+
}
|
|
4219
|
+
/** The record after `seen`: the newer SDK of the two (seen again: its time moves on), and this ingest. */
|
|
4220
|
+
function mergeVersions(cur, seen) {
|
|
4221
|
+
const sdk = versionKey(seen.sdk) !== void 0 && compareVersions(seen.sdk, cur?.sdk?.version) >= 0 ? seen.sdk : void 0;
|
|
4222
|
+
return {
|
|
4223
|
+
...sdk ? { sdk: {
|
|
4224
|
+
version: sdk,
|
|
4225
|
+
seenAt: seen.at
|
|
4226
|
+
} } : cur?.sdk ? { sdk: cur.sdk } : {},
|
|
4227
|
+
ingest: {
|
|
4228
|
+
version: seen.ingest,
|
|
4229
|
+
at: seen.at
|
|
4230
|
+
}
|
|
4231
|
+
};
|
|
4232
|
+
}
|
|
4188
4233
|
// ../../packages/adapters/src/memory.ts
|
|
4189
4234
|
var memory_exports = /* @__PURE__ */ __exportAll({ MemoryStore: () => MemoryStore });
|
|
4190
4235
|
/** In-process store for tests and the dashboard's demo mode. */
|
|
@@ -4232,6 +4277,13 @@ var MemoryStore = class {
|
|
|
4232
4277
|
async registerApp(app) {
|
|
4233
4278
|
this.apps.add(app);
|
|
4234
4279
|
}
|
|
4280
|
+
versions = /* @__PURE__ */ new Map();
|
|
4281
|
+
async recordVersions(app, seen) {
|
|
4282
|
+
this.versions.set(app, mergeVersions(this.versions.get(app), seen));
|
|
4283
|
+
}
|
|
4284
|
+
async getVersions(app) {
|
|
4285
|
+
return this.versions.get(app) ?? {};
|
|
4286
|
+
}
|
|
4235
4287
|
async writeEvents(events, opts = {}) {
|
|
4236
4288
|
const days = opts.retentionDays ?? this.retentionDays;
|
|
4237
4289
|
for (const e of events) this.expiry.set(e.event.id, Date.parse(e.receivedAt) + days * 864e5);
|
|
@@ -4352,4 +4404,4 @@ var MemoryStore = class {
|
|
|
4352
4404
|
return this.events.filter((e) => e.app === app && e.fingerprint === fp).sort((a, b) => b.event.ts.localeCompare(a.event.ts)).slice(0, limit);
|
|
4353
4405
|
}
|
|
4354
4406
|
};
|
|
4355
|
-
export {
|
|
4407
|
+
export { CAUSE_INFO as C, cleanFnName as D, OWNER_INFO as E, markLibraryFrames as O, CATEGORY_INFO as S, OWNERS as T, severityFromCount as _, parseVersion as a, normaliseHostMatch as b, rollupId as c, SEVERITY_ORDER as d, compareVersions$1 as f, releaseKey as g, percentileMs as h, mergeVersions as i, Envelope as l, parseStack as m, memory_exports as n, versionKey as o, isRegression as p, compareVersions as r, coalesceRollups as s, MemoryStore as t, DEFAULT_SEVERITY_THRESHOLDS as u, hostNameFor as v, IMPACT_INFO as w, validHostNames as x, nameUrlsIn as y };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
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-
|
|
3
|
-
import {
|
|
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-BiUOnY1_.js";
|
|
3
|
+
import { E as OWNER_INFO, S as CATEGORY_INFO, w as IMPACT_INFO } from "./memory-Bv4C8uyK.js";
|
|
4
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-
|
|
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-Po4Tt5zd.js";
|
|
6
6
|
import { HeadContent, Outlet, Scripts, createFileRoute, createRootRoute, createRouter, lazyRouteComponent, notFound, redirect } from "@tanstack/react-router";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
// src/styles.css?url
|
|
9
|
-
var styles_default = "/assets/styles-
|
|
9
|
+
var styles_default = "/assets/styles-GAsMUS4-.css";
|
|
10
10
|
// src/routes/__root.tsx
|
|
11
11
|
var Route$14 = createRootRoute({
|
|
12
12
|
head: () => ({
|
|
@@ -43,7 +43,7 @@ function RootDocument({ children }) {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
// src/routes/_authed.tsx
|
|
46
|
-
var $$splitComponentImporter$10 = () => import("./_authed-
|
|
46
|
+
var $$splitComponentImporter$10 = () => import("./_authed-BJWDiF9i.js");
|
|
47
47
|
var Route$13 = createFileRoute("/_authed")({
|
|
48
48
|
beforeLoad: async () => {
|
|
49
49
|
const user = await getSessionUser();
|
|
@@ -53,7 +53,7 @@ var Route$13 = createFileRoute("/_authed")({
|
|
|
53
53
|
component: lazyRouteComponent($$splitComponentImporter$10, "component")
|
|
54
54
|
});
|
|
55
55
|
// src/routes/login.tsx
|
|
56
|
-
var $$splitComponentImporter$9 = () => import("./login-
|
|
56
|
+
var $$splitComponentImporter$9 = () => import("./login-CwKAx9Bj.js");
|
|
57
57
|
var Route$12 = createFileRoute("/login")({
|
|
58
58
|
beforeLoad: async () => {
|
|
59
59
|
if (await getSessionUser()) throw redirect({ to: "/" });
|
|
@@ -143,7 +143,7 @@ function labelCounts(issues, f, key) {
|
|
|
143
143
|
return out;
|
|
144
144
|
}
|
|
145
145
|
// src/routes/_authed/index.tsx
|
|
146
|
-
var $$splitComponentImporter$8 = () => import("./_authed-
|
|
146
|
+
var $$splitComponentImporter$8 = () => import("./_authed-X9u_5JUy.js");
|
|
147
147
|
var Route$11 = createFileRoute("/_authed/")({
|
|
148
148
|
validateSearch: (s) => ({
|
|
149
149
|
app: typeof s.app === "string" ? s.app : void 0,
|
|
@@ -162,7 +162,7 @@ var Route$11 = createFileRoute("/_authed/")({
|
|
|
162
162
|
component: lazyRouteComponent($$splitComponentImporter$8, "component")
|
|
163
163
|
});
|
|
164
164
|
// src/routes/_authed/customers.tsx
|
|
165
|
-
var $$splitComponentImporter$7 = () => import("./customers-
|
|
165
|
+
var $$splitComponentImporter$7 = () => import("./customers-827fC5I3.js");
|
|
166
166
|
var Route$10 = createFileRoute("/_authed/customers")({
|
|
167
167
|
validateSearch: (s) => ({
|
|
168
168
|
app: typeof s.app === "string" ? s.app : void 0,
|
|
@@ -180,7 +180,7 @@ var Route$10 = createFileRoute("/_authed/customers")({
|
|
|
180
180
|
});
|
|
181
181
|
/** "No errors", "3 errors, all caught", "3 errors, 1 caught". */
|
|
182
182
|
// src/routes/_authed/endpoints.tsx
|
|
183
|
-
var $$splitComponentImporter$6 = () => import("./endpoints-
|
|
183
|
+
var $$splitComponentImporter$6 = () => import("./endpoints-_T0NSOyA.js");
|
|
184
184
|
var Route$9 = createFileRoute("/_authed/endpoints")({
|
|
185
185
|
validateSearch: (s) => ({
|
|
186
186
|
app: typeof s.app === "string" ? s.app : void 0,
|
|
@@ -201,7 +201,7 @@ var Route$9 = createFileRoute("/_authed/endpoints")({
|
|
|
201
201
|
/** Endpoints added up per backend service: which one is failing or slow, at a glance. */
|
|
202
202
|
/** The endpoints in the order picked: most failures (as the server sends them), slowest p95, or most calls. */
|
|
203
203
|
// src/routes/_authed/settings.tsx
|
|
204
|
-
var $$splitComponentImporter$5 = () => import("./settings-
|
|
204
|
+
var $$splitComponentImporter$5 = () => import("./settings-B9NLQjl1.js");
|
|
205
205
|
var Route$8 = createFileRoute("/_authed/settings")({
|
|
206
206
|
validateSearch: (s) => ({ app: typeof s.app === "string" ? s.app : void 0 }),
|
|
207
207
|
loaderDeps: ({ search }) => ({ app: search.app }),
|
|
@@ -209,8 +209,10 @@ var Route$8 = createFileRoute("/_authed/settings")({
|
|
|
209
209
|
component: lazyRouteComponent($$splitComponentImporter$5, "component")
|
|
210
210
|
});
|
|
211
211
|
/** Owners a host can be given; leaving it unset lets the classifier decide. */
|
|
212
|
+
/** Only ingest or the dashboard a patch behind: nothing is missing yet. */
|
|
213
|
+
/** The project's deBug versions, and what to run when one is behind. */
|
|
212
214
|
// src/routes/_authed/team.tsx
|
|
213
|
-
var $$splitComponentImporter$4 = () => import("./team-
|
|
215
|
+
var $$splitComponentImporter$4 = () => import("./team-Bsm2wFG0.js");
|
|
214
216
|
var Route$7 = createFileRoute("/_authed/team")({
|
|
215
217
|
loader: () => getTeam(),
|
|
216
218
|
component: lazyRouteComponent($$splitComponentImporter$4, "component")
|
|
@@ -276,13 +278,13 @@ var Route$5 = createFileRoute("/api/summary")({ server: { handlers: { GET: async
|
|
|
276
278
|
});
|
|
277
279
|
} } } });
|
|
278
280
|
// src/routes/invite.$token.tsx
|
|
279
|
-
var $$splitComponentImporter$3 = () => import("./invite._token-
|
|
281
|
+
var $$splitComponentImporter$3 = () => import("./invite._token-7DjEeeaD.js");
|
|
280
282
|
var Route$4 = createFileRoute("/invite/$token")({
|
|
281
283
|
loader: ({ params }) => getInvite({ data: { token: params.token } }),
|
|
282
284
|
component: lazyRouteComponent($$splitComponentImporter$3, "component")
|
|
283
285
|
});
|
|
284
286
|
// src/routes/_authed/events.$eventId.tsx
|
|
285
|
-
var $$splitComponentImporter$2 = () => import("./events._eventId-
|
|
287
|
+
var $$splitComponentImporter$2 = () => import("./events._eventId-Dcsu4oVO.js");
|
|
286
288
|
var Route$3 = createFileRoute("/_authed/events/$eventId")({
|
|
287
289
|
validateSearch: (s) => ({
|
|
288
290
|
app: typeof s.app === "string" ? s.app : "",
|
|
@@ -309,7 +311,7 @@ var Route$3 = createFileRoute("/_authed/events/$eventId")({
|
|
|
309
311
|
/** Headers and body of one side of the call. */
|
|
310
312
|
/** Label/value rows; empty values are left out. */
|
|
311
313
|
// src/routes/_authed/issues.$fingerprint.tsx
|
|
312
|
-
var $$splitComponentImporter$1 = () => import("./issues._fingerprint-
|
|
314
|
+
var $$splitComponentImporter$1 = () => import("./issues._fingerprint-vc9r3jgg.js");
|
|
313
315
|
var Route$2 = createFileRoute("/_authed/issues/$fingerprint")({
|
|
314
316
|
validateSearch: (s) => ({
|
|
315
317
|
app: typeof s.app === "string" ? s.app : "",
|
|
@@ -334,7 +336,7 @@ var Route$2 = createFileRoute("/_authed/issues/$fingerprint")({
|
|
|
334
336
|
/** Resolve (with the fixed version), ignore or reopen, and open a prefilled ticket. */
|
|
335
337
|
/** Explanations mark code with backticks for Markdown; on the page they read as plain text. */
|
|
336
338
|
// src/routes/_authed/sessions.$sessionId.tsx
|
|
337
|
-
var $$splitComponentImporter = () => import("./sessions._sessionId-
|
|
339
|
+
var $$splitComponentImporter = () => import("./sessions._sessionId-BvXxK9qF.js");
|
|
338
340
|
var Route$1 = createFileRoute("/_authed/sessions/$sessionId")({
|
|
339
341
|
validateSearch: (s) => ({ app: typeof s.app === "string" ? s.app : "" }),
|
|
340
342
|
loaderDeps: ({ search }) => ({ app: search.app }),
|
package/dist/server/assets/{sessions._sessionId-D7JPV0M4.js → sessions._sessionId-BvXxK9qF.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as CopyButton } from "./copy-button-D3RddzTw.js";
|
|
2
2
|
import { a as joined, i as clock, n as ICON, r as OutcomeBadge, s as roundedSpan, t as CrumbBody } from "./timeline-MDRNDhiA.js";
|
|
3
|
-
import { t as Card } from "./ui-
|
|
4
|
-
import { n as Route } from "./router-
|
|
3
|
+
import { t as Card } from "./ui-SAkSlP7f.js";
|
|
4
|
+
import { n as Route } from "./router-Dk3XHn7B.js";
|
|
5
5
|
import { Link } from "@tanstack/react-router";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
// src/routes/_authed/sessions.$sessionId.tsx?tsr-split=component
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Card } from "./ui-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { E as OWNER_INFO, T as OWNERS, b as normaliseHostMatch } from "./memory-Bv4C8uyK.js";
|
|
2
|
+
import { l as timeAgo, t as Card } from "./ui-SAkSlP7f.js";
|
|
3
|
+
import { i as partText, r as useVersionStatus, t as UpgradeCommand } from "./version-banner-nf-yZurq.js";
|
|
4
|
+
import { S as sendTestAlert, b as saveAppSettings, x as saveRetention, y as restampExisting } from "./fns-BiUOnY1_.js";
|
|
5
|
+
import { s as Route } from "./router-Dk3XHn7B.js";
|
|
5
6
|
import { useState } from "react";
|
|
6
7
|
import { useNavigate, useRouter } from "@tanstack/react-router";
|
|
7
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -15,6 +16,7 @@ var CHOICES = [
|
|
|
15
16
|
];
|
|
16
17
|
function SettingsPage() {
|
|
17
18
|
const { apps, settings, seenHosts } = Route.useLoaderData();
|
|
19
|
+
const versions = useVersionStatus();
|
|
18
20
|
const navigate = useNavigate({ from: Route.fullPath });
|
|
19
21
|
const router = useRouter();
|
|
20
22
|
const [days, setDays] = useState(String(settings?.retentionDays ?? 60));
|
|
@@ -97,6 +99,7 @@ function SettingsPage() {
|
|
|
97
99
|
children: apps.map((a) => /* @__PURE__ */ jsx("option", { children: a }, a))
|
|
98
100
|
})]
|
|
99
101
|
}),
|
|
102
|
+
versions && /* @__PURE__ */ jsx(VersionsCard, { status: versions }),
|
|
100
103
|
/* @__PURE__ */ jsxs(Card, {
|
|
101
104
|
title: "Data retention",
|
|
102
105
|
subtitle: "Your data lives in your own database, so you decide how long to keep it.",
|
|
@@ -528,4 +531,57 @@ function HostNames({ app, hosts, seen, onStatus }) {
|
|
|
528
531
|
})
|
|
529
532
|
});
|
|
530
533
|
}
|
|
534
|
+
/** Only ingest or the dashboard a patch behind: nothing is missing yet. */
|
|
535
|
+
var patchOnly = (s) => s.level === "note" && s.behind.some((p) => p.part !== "sdk");
|
|
536
|
+
var upperFirst = (s) => s.charAt(0).toUpperCase() + s.slice(1);
|
|
537
|
+
var PART_LABEL = {
|
|
538
|
+
sdk: "App SDK (newest seen)",
|
|
539
|
+
ingest: "Ingest",
|
|
540
|
+
dashboard: "This dashboard"
|
|
541
|
+
};
|
|
542
|
+
/** The project's deBug versions, and what to run when one is behind. */
|
|
543
|
+
function VersionsCard({ status }) {
|
|
544
|
+
const behind = new Set(status.behind.map((p) => p.part));
|
|
545
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
546
|
+
title: "deBug versions",
|
|
547
|
+
subtitle: "Your app's SDK, your ingest and this dashboard are released together and work best on the same version.",
|
|
548
|
+
children: [/* @__PURE__ */ jsx("dl", {
|
|
549
|
+
className: "grid grid-cols-[minmax(8rem,auto)_1fr] gap-x-4 gap-y-1.5 text-sm",
|
|
550
|
+
children: status.parts.map((p) => /* @__PURE__ */ jsxs("div", {
|
|
551
|
+
className: "contents",
|
|
552
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
553
|
+
className: "text-muted",
|
|
554
|
+
children: PART_LABEL[p.part]
|
|
555
|
+
}), /* @__PURE__ */ jsxs("dd", {
|
|
556
|
+
className: behind.has(p.part) ? "font-medium text-sev-high" : "",
|
|
557
|
+
children: [p.version ?? (p.part === "sdk" ? "not seen yet" : "predates version tracking"), p.at && /* @__PURE__ */ jsxs("span", {
|
|
558
|
+
className: "ml-2 text-xs text-muted",
|
|
559
|
+
title: p.at,
|
|
560
|
+
children: [
|
|
561
|
+
p.part === "sdk" ? "seen" : "recorded",
|
|
562
|
+
" ",
|
|
563
|
+
timeAgo(p.at)
|
|
564
|
+
]
|
|
565
|
+
})]
|
|
566
|
+
})]
|
|
567
|
+
}, p.part))
|
|
568
|
+
}), status.level === "none" ? /* @__PURE__ */ jsx("p", {
|
|
569
|
+
className: "mt-3 text-xs text-muted",
|
|
570
|
+
children: "All in step."
|
|
571
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
572
|
+
className: "mt-3 space-y-2 text-sm",
|
|
573
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
574
|
+
className: status.level === "banner" ? "" : "text-muted",
|
|
575
|
+
children: [upperFirst(status.behind.map(partText).join(" and ")), patchOnly(status) ? `: a patch behind ${status.newest}, so nothing's missing, but worth catching up.` : `, behind ${status.newest}.`]
|
|
576
|
+
}), status.behind.some((p) => p.part !== "sdk") ? /* @__PURE__ */ jsx(UpgradeCommand, { status }) : /* @__PURE__ */ jsxs("p", {
|
|
577
|
+
className: "text-xs text-muted",
|
|
578
|
+
children: [
|
|
579
|
+
"Update @debugkit/sdk in your app to ",
|
|
580
|
+
status.newest,
|
|
581
|
+
"."
|
|
582
|
+
]
|
|
583
|
+
})]
|
|
584
|
+
})]
|
|
585
|
+
});
|
|
586
|
+
}
|
|
531
587
|
export { SettingsPage as component };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as timeAgo, t as Card } from "./ui-
|
|
2
|
-
import {
|
|
3
|
-
import { o as Route } from "./router-
|
|
1
|
+
import { l as timeAgo, t as Card } from "./ui-SAkSlP7f.js";
|
|
2
|
+
import { C as setMemberRole, m as inviteToTeam, t as cancelInvite, v as removeFromTeam } from "./fns-BiUOnY1_.js";
|
|
3
|
+
import { o as Route } from "./router-Dk3XHn7B.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { useRouter } from "@tanstack/react-router";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as OWNER_INFO, S as CATEGORY_INFO, w as IMPACT_INFO } from "./memory-Bv4C8uyK.js";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
// src/components/ui.tsx
|
|
4
4
|
function Logo() {
|