@hot-updater/console 1.0.0-rc.2 → 1.0.0-rc.3
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/.output/nitro.json +1 -1
- package/.output/public/assets/InsightsErrorAlert-1cg6LDJG.js +1 -0
- package/.output/public/assets/InsightsPageHeader-oNIg_lcd.js +1 -0
- package/.output/public/assets/InsightsRolloutCard-Zsv9gBjU.js +42 -0
- package/.output/public/assets/{api-keys-BzKocqRy.js → api-keys-ChJjsbP2.js} +1 -1
- package/.output/public/assets/{api-keys-api-BHcODB7q.js → api-keys-api-LchP65vQ.js} +1 -1
- package/.output/public/assets/{card-Dhr_eFYj.js → card-iD7iiy4T.js} +1 -1
- package/.output/public/assets/{chart-no-axes-combined-Dy4WJv2U.js → chart-no-axes-combined-C0G0fQ3J.js} +1 -1
- package/.output/public/assets/createServerFn-DHc2erub.js +3 -0
- package/.output/public/assets/dialog-DX6o8qCL.js +1 -0
- package/.output/public/assets/{dist-C_NydL0e.js → dist-BPrb_vuw.js} +1 -1
- package/.output/public/assets/index-C6Nb14xG.js +10 -0
- package/.output/public/assets/{input-group-cSOG4wh_.js → input-group-Pa3SAbEI.js} +1 -1
- package/.output/public/assets/insights-C1uKy3p2.js +1 -0
- package/.output/public/assets/installations-Bj5AzZ3T.js +1 -0
- package/.output/public/assets/{installations-CE33wgbY.js → installations-DDTw9DSK.js} +2 -2
- package/.output/public/assets/{lazyRouteComponent-Ccp3bwBY.js → lazyRouteComponent-BN0MS05o.js} +1 -1
- package/.output/public/assets/{link-CI8idAUi.js → link-BG06whwB.js} +1 -1
- package/.output/public/assets/{loader-circle-BoxLrsOu.js → loader-circle-Bbp8LGVC.js} +1 -1
- package/.output/public/assets/{refresh-cw-Bqc72UZG.js → refresh-cw-DZgiAOMk.js} +1 -1
- package/.output/public/assets/routes-9E2okfpG.js +1 -0
- package/.output/public/assets/{routes-DGVXdzpw.js → routes-B3JviaDV.js} +2 -2
- package/.output/public/assets/{shield-check-uK3MHWJZ.js → shield-check-DoIiaaXU.js} +1 -1
- package/.output/public/assets/{signing-CMf4aqDO.js → signing-BKy9fIdB.js} +1 -1
- package/.output/public/assets/styles-C5-su40i.css +2 -0
- package/.output/public/assets/{table-2vcV89QB.js → table-bpgpQkPz.js} +1 -1
- package/.output/public/assets/useOpenInteractionType-4dPacbwb.js +1 -0
- package/.output/public/assets/x-Cr_sPM8E.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-B7ioJhtE.mjs → __23tanstack-start-server-fn-resolver-EMel9KYs.mjs} +36 -32
- package/.output/server/_libs/@base-ui/react+[...].mjs +1051 -1051
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
- package/.output/server/_libs/d3-array.mjs +231 -0
- package/.output/server/_libs/d3-color.mjs +330 -0
- package/.output/server/_libs/d3-format.mjs +252 -0
- package/.output/server/_libs/d3-interpolate.mjs +207 -0
- package/.output/server/_libs/d3-path.mjs +77 -0
- package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
- package/.output/server/_libs/d3-shape.mjs +818 -0
- package/.output/server/_libs/decimal.js-light.mjs +884 -0
- package/.output/server/_libs/es-toolkit.mjs +1159 -0
- package/.output/server/_libs/eventemitter3.mjs +236 -0
- package/.output/server/_libs/immer.mjs +532 -0
- package/.output/server/_libs/lucide-react.mjs +1 -1
- package/.output/server/_libs/next-themes.mjs +1 -1
- package/.output/server/_libs/react-redux+[...].mjs +205 -0
- package/.output/server/_libs/recharts+[...].mjs +14636 -0
- package/.output/server/_libs/sonner.mjs +1 -1
- package/.output/server/_libs/tanstack__react-query.mjs +1 -1
- package/.output/server/_runtime.mjs +10 -1
- package/.output/server/_ssr/InsightsErrorAlert-DzDVdfgW.mjs +169 -0
- package/.output/server/_ssr/{InsightsPageHeader-Df4Brj8u.mjs → InsightsPageHeader-CZ2AaQGk.mjs} +8 -120
- package/.output/server/_ssr/InsightsRolloutCard-DHB2iM4t.mjs +693 -0
- package/.output/server/_ssr/{api-keys-CZeTPQys.mjs → api-keys-BBl84_lN.mjs} +7 -7
- package/.output/server/_ssr/{api-keys-api-BUPQVSpk.mjs → api-keys-api-KSH04dLB.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-Cs7tS5_j.mjs → api-keys-rpc-DBmgnW5o.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-tAupfGQm.mjs → api-rpc-DX5B6b-L.mjs} +25 -25
- package/.output/server/_ssr/{auth-rpc-DUaeOWKK.mjs → auth-rpc-gaibR719.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-DW71WzsD.mjs → auth.server-DF_shCeq.mjs} +1 -1
- package/.output/server/_ssr/{bundle-signing-rpc-BhnBw0-d.mjs → bundle-signing-rpc-C01EKpb-.mjs} +2 -2
- package/.output/server/_ssr/{bundle-signing.server-C4NW5mWx.mjs → bundle-signing.server-Co_zHdJx.mjs} +1 -1
- package/.output/server/_ssr/{card-BRiPmi0C.mjs → card-gGh8F6kQ.mjs} +1 -1
- package/.output/server/_ssr/{config.server-afDuAwaG.mjs → config.server-NIXXHk-e.mjs} +5 -5
- package/.output/server/_ssr/{createSsrRpc-DjWNJ0uc.mjs → createSsrRpc-4rr4IJh3.mjs} +3 -3
- package/.output/server/_ssr/{deleteBundle-BTGwBgzx.mjs → deleteBundle-C71v1GBr.mjs} +1 -1
- package/.output/server/_ssr/{dialog-DS-nw-pA.mjs → dialog-DNtKYR5K.mjs} +1 -1
- package/.output/server/_ssr/{downloadBundle-CNnYxYO2.mjs → downloadBundle-A9zYC2go.mjs} +1 -1
- package/.output/server/_ssr/{getBundleChildren-C0vh4ZvE.mjs → getBundleChildren-CMGSGBWv.mjs} +1 -1
- package/.output/server/_ssr/{input-group-BpsnmvZw.mjs → input-group-Oj4kUnE4.mjs} +1 -1
- package/.output/server/_ssr/{insights-BdS364Xu.mjs → insights-oK2n5WBp.mjs} +13 -67
- package/.output/server/_ssr/insights-recovery-DSFM-YTL.mjs +21 -0
- package/.output/server/_ssr/insights-recovery-rpc-CgeCAs2K.mjs +16 -0
- package/.output/server/_ssr/{insights-rpc-38DujK0G.mjs → insights-rpc-DBf0ouen.mjs} +2 -2
- package/.output/server/_ssr/insightsRecovery-DFkXGFjd.mjs +108 -0
- package/.output/server/_ssr/{installations-CtA59MQG.mjs → installations-DBmYuVBi.mjs} +2 -2
- package/.output/server/_ssr/{installations-DiVKEF5T.mjs → installations-DQyJN-pZ.mjs} +9 -9
- package/.output/server/_ssr/{router-B9wG_9f8.mjs → router-C8J4nYEG.mjs} +13 -13
- package/.output/server/_ssr/{routes-CKrrS2q2.mjs → routes-C2RIYhyl.mjs} +2 -2
- package/.output/server/_ssr/{routes-D7Yh_jfj.mjs → routes-NlTRKPML.mjs} +21 -86
- package/.output/server/_ssr/{runtime.server-DacU1TBV.mjs → runtime.server-DLZpzphL.mjs} +1 -1
- package/.output/server/_ssr/{server-D_C2rMzf.mjs → server-hgrXpJQY.mjs} +3 -3
- package/.output/server/_ssr/{signing-Dz1WkZOf.mjs → signing-bfOvUMSJ.mjs} +3 -3
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{table-CnZmon_Z.mjs → table-QQ9cnWf2.mjs} +3 -3
- package/.output/server/_tanstack-start-manifest_v-BAb_a_eC.mjs +97 -0
- package/.output/server/index.mjs +152 -152
- package/package.json +5 -5
- package/src/components/features/insights/InsightsRolloutCard.tsx +505 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +13 -0
- package/src/components/ui/empty.tsx +101 -0
- package/src/lib/insights-recovery-rpc.ts +14 -0
- package/src/lib/insights-recovery.ts +55 -0
- package/src/lib/server/insightsRecovery.ts +157 -0
- package/src/routes/insights.tsx +2 -0
- package/.output/public/assets/HashValueDisplay-CB0Eskit.js +0 -1
- package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +0 -1
- package/.output/public/assets/composite-Bp98A0Ld.js +0 -1
- package/.output/public/assets/createServerFn-CA8fs7QD.js +0 -3
- package/.output/public/assets/dialog-CUTrcPlB.js +0 -1
- package/.output/public/assets/index-DdAz-CXv.js +0 -10
- package/.output/public/assets/insights-C0PBSZ-n.js +0 -1
- package/.output/public/assets/installations-CStZja8x.js +0 -1
- package/.output/public/assets/routes-DTlwOr8I.js +0 -1
- package/.output/public/assets/styles-BCvbtKsm.css +0 -2
- package/.output/public/assets/useCompositeListItem-CHLITE_4.js +0 -1
- package/.output/public/assets/x-DCd0j8c6.js +0 -1
- package/.output/server/_ssr/HashValueDisplay-DwpGLfrl.mjs +0 -55
- package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +0 -97
- /package/.output/public/assets/{preload-helper-CQ36nxok.js → preload-helper-B_l5jfgx.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { H as require_react_dom, J as require_react } from "./@base-ui/react+[...].mjs";
|
|
3
3
|
//#region ../../node_modules/.pnpm/sonner@2.0.7_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/sonner/dist/index.mjs
|
|
4
4
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { J as require_react, q as require_jsx_runtime } from "./@base-ui/react+[...].mjs";
|
|
3
3
|
import { c as noop, i as notifyManager, l as shouldThrowError, n as MutationObserver, r as QueryObserver, s as environmentManager } from "./tanstack__query-core.mjs";
|
|
4
4
|
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
@@ -7,6 +7,15 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
10
|
+
var __exportAll = (all, no_symbols) => {
|
|
11
|
+
let target = {};
|
|
12
|
+
for (var name in all) __defProp(target, name, {
|
|
13
|
+
get: all[name],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
17
|
+
return target;
|
|
18
|
+
};
|
|
10
19
|
var __copyProps = (to, from, except, desc) => {
|
|
11
20
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
21
|
key = keys[i];
|
|
@@ -23,4 +32,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
32
|
}) : target, mod));
|
|
24
33
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
25
34
|
//#endregion
|
|
26
|
-
export {
|
|
35
|
+
export { __toESM as i, __exportAll as n, __require as r, __commonJSMin as t };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { i as __toESM } from "../_runtime.mjs";
|
|
2
|
+
import { J as require_react, q as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
+
import { N as ChevronDown, P as Check, h as PackageCheck, n as TriangleAlert, u as RotateCcw, z as Activity } from "../_libs/lucide-react.mjs";
|
|
4
|
+
import { C as cn, v as Tooltip$1, x as TooltipTrigger, y as TooltipContent } from "./createSsrRpc-4rr4IJh3.mjs";
|
|
5
|
+
import { a as Badge, i as AlertTitle, r as AlertDescription, t as Alert } from "./card-gGh8F6kQ.mjs";
|
|
6
|
+
import { n as toast } from "../_libs/sonner.mjs";
|
|
7
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/InsightsErrorAlert-DzDVdfgW.js
|
|
8
|
+
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
9
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
10
|
+
var shortenIdentifier = (value, maxLength = 12) => value.length > maxLength ? `${value.slice(0, Math.max(1, maxLength - 4))}…${value.slice(-4)}` : value;
|
|
11
|
+
function HashValueDisplay({ value, maxLength = 12, className, buttonClassName }) {
|
|
12
|
+
const isTruncated = value.length > maxLength;
|
|
13
|
+
const truncated = shortenIdentifier(value, maxLength);
|
|
14
|
+
const copyValue = async () => {
|
|
15
|
+
try {
|
|
16
|
+
await navigator.clipboard.writeText(value);
|
|
17
|
+
toast.success("Copied to clipboard", { description: value });
|
|
18
|
+
} catch {
|
|
19
|
+
toast.error("Failed to copy value");
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const handleClick = (event) => {
|
|
23
|
+
event.preventDefault();
|
|
24
|
+
event.stopPropagation();
|
|
25
|
+
copyValue();
|
|
26
|
+
};
|
|
27
|
+
const handleKeyDown = (event) => {
|
|
28
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
event.stopPropagation();
|
|
31
|
+
copyValue();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
35
|
+
translate: "no",
|
|
36
|
+
className: cn("font-mono text-xs tabular-nums whitespace-nowrap", className),
|
|
37
|
+
children: truncated
|
|
38
|
+
});
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip$1, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipTrigger, {
|
|
40
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
41
|
+
type: "button",
|
|
42
|
+
"aria-label": `Copy full value: ${value}`,
|
|
43
|
+
translate: "no",
|
|
44
|
+
className: cn("ring-ring/30 bg-muted/40 border-border/70 inline-flex min-w-0 max-w-full cursor-pointer items-center rounded-md border px-1.5 py-0.5 align-top shadow-xs outline-none transition-[background-color,border-color,transform,box-shadow]", "hover:bg-muted/70 active:scale-[0.98] active:bg-muted/85 focus-visible:ring-[2px]", "touch-manipulation select-none motion-reduce:transition-none motion-reduce:active:scale-100", !isTruncated && "cursor-copy", buttonClassName),
|
|
45
|
+
onClick: handleClick,
|
|
46
|
+
onKeyDown: handleKeyDown
|
|
47
|
+
}),
|
|
48
|
+
children: content
|
|
49
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipContent, {
|
|
50
|
+
hidden: !isTruncated,
|
|
51
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
52
|
+
translate: "no",
|
|
53
|
+
className: "break-all font-mono text-xs tabular-nums",
|
|
54
|
+
children: value
|
|
55
|
+
})
|
|
56
|
+
})] });
|
|
57
|
+
}
|
|
58
|
+
var eventTypes = {
|
|
59
|
+
UPDATE_APPLIED: {
|
|
60
|
+
label: "Bundle applied",
|
|
61
|
+
variant: "success",
|
|
62
|
+
icon: Check
|
|
63
|
+
},
|
|
64
|
+
RECOVERED: {
|
|
65
|
+
label: "Recovered",
|
|
66
|
+
variant: "warning",
|
|
67
|
+
icon: RotateCcw
|
|
68
|
+
},
|
|
69
|
+
RELEASE_ADOPTED: {
|
|
70
|
+
label: "Bundle adopted",
|
|
71
|
+
variant: "success",
|
|
72
|
+
icon: PackageCheck
|
|
73
|
+
},
|
|
74
|
+
UNCHANGED: {
|
|
75
|
+
label: "Activity reported",
|
|
76
|
+
variant: "secondary",
|
|
77
|
+
icon: Activity
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
function useInsightsTimeFormat() {
|
|
81
|
+
const [timeZone, setTimeZone] = (0, import_react.useState)("UTC");
|
|
82
|
+
(0, import_react.useEffect)(() => {
|
|
83
|
+
setTimeZone(Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
84
|
+
}, []);
|
|
85
|
+
return new Intl.DateTimeFormat("en", {
|
|
86
|
+
timeZone,
|
|
87
|
+
timeZoneName: "shortOffset",
|
|
88
|
+
year: "numeric",
|
|
89
|
+
month: "2-digit",
|
|
90
|
+
day: "2-digit",
|
|
91
|
+
hour: "2-digit",
|
|
92
|
+
minute: "2-digit",
|
|
93
|
+
second: "2-digit",
|
|
94
|
+
hourCycle: "h23"
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function formatInsightsTimestamp(value, formatter) {
|
|
98
|
+
const parts = Object.fromEntries(formatter.formatToParts(new Date(value)).map(({ type, value }) => [type, value]));
|
|
99
|
+
const offset = parts.timeZoneName === "GMT" ? "GMT+0" : parts.timeZoneName;
|
|
100
|
+
return `${parts.year}/${parts.month}/${parts.day} ${parts.hour}:${parts.minute}:${parts.second} ${offset}`;
|
|
101
|
+
}
|
|
102
|
+
function EventTimestamp({ value, formatter, touch = false }) {
|
|
103
|
+
const date = new Date(value);
|
|
104
|
+
const localTime = formatInsightsTimestamp(value, formatter);
|
|
105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", {
|
|
106
|
+
className: "group/time",
|
|
107
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("summary", {
|
|
108
|
+
className: `cursor-pointer list-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/30 [&::-webkit-details-marker]:hidden ${touch ? "flex min-h-11 items-center" : ""}`,
|
|
109
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
110
|
+
className: "flex items-center gap-1",
|
|
111
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("time", {
|
|
112
|
+
dateTime: date.toISOString(),
|
|
113
|
+
className: "whitespace-nowrap",
|
|
114
|
+
children: localTime
|
|
115
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, {
|
|
116
|
+
"aria-hidden": "true",
|
|
117
|
+
className: "size-3 text-muted-foreground group-open/time:rotate-180"
|
|
118
|
+
})]
|
|
119
|
+
})
|
|
120
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
121
|
+
className: "mt-2 text-muted-foreground",
|
|
122
|
+
children: date.toISOString().replace("T", " ").replace("Z", " UTC")
|
|
123
|
+
})]
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function EventTypeBadge({ type }) {
|
|
127
|
+
const eventType = eventTypes[type];
|
|
128
|
+
const Icon = eventType.icon;
|
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Badge, {
|
|
130
|
+
variant: eventType.variant,
|
|
131
|
+
className: "gap-1 whitespace-nowrap [&_svg]:size-3",
|
|
132
|
+
title: type === "UNCHANGED" ? "App activity reported on the current bundle without a bundle transition." : type === "RELEASE_ADOPTED" ? "A different release was adopted without changing the bundle." : void 0,
|
|
133
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { "aria-hidden": "true" }), eventType.label]
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function EventBundleTransition({ event, touch = false }) {
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
|
|
138
|
+
className: "grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2 gap-y-2",
|
|
139
|
+
children: [
|
|
140
|
+
event.fromBundleId ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
|
|
141
|
+
className: "text-muted-foreground",
|
|
142
|
+
children: "From"
|
|
143
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HashValueDisplay, {
|
|
144
|
+
value: event.fromBundleId,
|
|
145
|
+
buttonClassName: touch ? "min-h-11 px-3" : void 0
|
|
146
|
+
}) })] }) : null,
|
|
147
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
|
|
148
|
+
className: "text-muted-foreground",
|
|
149
|
+
children: event.type === "UNCHANGED" ? "Current" : "To"
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HashValueDisplay, {
|
|
152
|
+
value: event.toBundleId,
|
|
153
|
+
buttonClassName: touch ? "min-h-11 px-3" : void 0
|
|
154
|
+
}) })
|
|
155
|
+
]
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
function InsightsErrorAlert({ fallbackTitle }) {
|
|
159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
|
|
160
|
+
variant: "destructive",
|
|
161
|
+
children: [
|
|
162
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, { "aria-hidden": "true" }),
|
|
163
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: fallbackTitle }),
|
|
164
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "Refresh to try again. If this keeps happening, check your Insights provider connection." })
|
|
165
|
+
]
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
export { InsightsErrorAlert as a, HashValueDisplay as i, EventTimestamp as n, shortenIdentifier as o, EventTypeBadge as r, useInsightsTimeFormat as s, EventBundleTransition as t };
|
package/.output/server/_ssr/{InsightsPageHeader-Df4Brj8u.mjs → InsightsPageHeader-CZ2AaQGk.mjs}
RENAMED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { r as __toESM } from "../_runtime.mjs";
|
|
2
1
|
import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { F as ChartNoAxesCombined, I as ArrowUpRight,
|
|
5
|
-
import { S as buttonVariants, _ as Skeleton, g as SidebarTrigger, t as Button$1, w as createSsrRpc } from "./createSsrRpc-
|
|
2
|
+
import { q as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
+
import { F as ChartNoAxesCombined, I as ArrowUpRight, d as RefreshCw } from "../_libs/lucide-react.mjs";
|
|
4
|
+
import { S as buttonVariants, _ as Skeleton, g as SidebarTrigger, t as Button$1, w as createSsrRpc } from "./createSsrRpc-4rr4IJh3.mjs";
|
|
6
5
|
import { m as Link } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
7
6
|
import { n as useQuery } from "../_libs/tanstack__react-query.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import { c as TableBody, d as TableHeader, f as TableRow, l as TableCell, s as Table, u as TableHead } from "./table-
|
|
10
|
-
import {
|
|
11
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/InsightsPageHeader-
|
|
12
|
-
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
7
|
+
import { d as CardTitle, o as Card, s as CardContent, u as CardHeader } from "./card-gGh8F6kQ.mjs";
|
|
8
|
+
import { c as TableBody, d as TableHeader, f as TableRow, l as TableCell, s as Table, u as TableHead } from "./table-QQ9cnWf2.mjs";
|
|
9
|
+
import { a as InsightsErrorAlert, i as HashValueDisplay, n as EventTimestamp, r as EventTypeBadge, s as useInsightsTimeFormat, t as EventBundleTransition } from "./InsightsErrorAlert-DzDVdfgW.mjs";
|
|
10
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/InsightsPageHeader-CZ2AaQGk.js
|
|
13
11
|
var import_jsx_runtime = require_jsx_runtime();
|
|
14
12
|
var readOverview = (input) => input;
|
|
15
13
|
var readEventsPage = (input) => input;
|
|
@@ -81,106 +79,6 @@ var useInsightsInstallationEventsQuery = (input, enabled) => useQuery({
|
|
|
81
79
|
refetchOnWindowFocus: true,
|
|
82
80
|
staleTime: STALE_TIME_MS
|
|
83
81
|
});
|
|
84
|
-
var eventTypes = {
|
|
85
|
-
UPDATE_APPLIED: {
|
|
86
|
-
label: "Bundle applied",
|
|
87
|
-
variant: "success",
|
|
88
|
-
icon: Check
|
|
89
|
-
},
|
|
90
|
-
RECOVERED: {
|
|
91
|
-
label: "Recovered",
|
|
92
|
-
variant: "warning",
|
|
93
|
-
icon: RotateCcw
|
|
94
|
-
},
|
|
95
|
-
RELEASE_ADOPTED: {
|
|
96
|
-
label: "Bundle adopted",
|
|
97
|
-
variant: "success",
|
|
98
|
-
icon: PackageCheck
|
|
99
|
-
},
|
|
100
|
-
UNCHANGED: {
|
|
101
|
-
label: "Activity reported",
|
|
102
|
-
variant: "secondary",
|
|
103
|
-
icon: Activity
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
function useInsightsTimeFormat() {
|
|
107
|
-
const [timeZone, setTimeZone] = (0, import_react.useState)("UTC");
|
|
108
|
-
(0, import_react.useEffect)(() => {
|
|
109
|
-
setTimeZone(Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
110
|
-
}, []);
|
|
111
|
-
return new Intl.DateTimeFormat("en", {
|
|
112
|
-
timeZone,
|
|
113
|
-
timeZoneName: "shortOffset",
|
|
114
|
-
year: "numeric",
|
|
115
|
-
month: "2-digit",
|
|
116
|
-
day: "2-digit",
|
|
117
|
-
hour: "2-digit",
|
|
118
|
-
minute: "2-digit",
|
|
119
|
-
second: "2-digit",
|
|
120
|
-
hourCycle: "h23"
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
function formatInsightsTimestamp(value, formatter) {
|
|
124
|
-
const parts = Object.fromEntries(formatter.formatToParts(new Date(value)).map(({ type, value }) => [type, value]));
|
|
125
|
-
const offset = parts.timeZoneName === "GMT" ? "GMT+0" : parts.timeZoneName;
|
|
126
|
-
return `${parts.year}/${parts.month}/${parts.day} ${parts.hour}:${parts.minute}:${parts.second} ${offset}`;
|
|
127
|
-
}
|
|
128
|
-
function EventTimestamp({ value, formatter, touch = false }) {
|
|
129
|
-
const date = new Date(value);
|
|
130
|
-
const localTime = formatInsightsTimestamp(value, formatter);
|
|
131
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", {
|
|
132
|
-
className: "group/time",
|
|
133
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("summary", {
|
|
134
|
-
className: `cursor-pointer list-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/30 [&::-webkit-details-marker]:hidden ${touch ? "flex min-h-11 items-center" : ""}`,
|
|
135
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
136
|
-
className: "flex items-center gap-1",
|
|
137
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("time", {
|
|
138
|
-
dateTime: date.toISOString(),
|
|
139
|
-
className: "whitespace-nowrap",
|
|
140
|
-
children: localTime
|
|
141
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, {
|
|
142
|
-
"aria-hidden": "true",
|
|
143
|
-
className: "size-3 text-muted-foreground group-open/time:rotate-180"
|
|
144
|
-
})]
|
|
145
|
-
})
|
|
146
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
147
|
-
className: "mt-2 text-muted-foreground",
|
|
148
|
-
children: date.toISOString().replace("T", " ").replace("Z", " UTC")
|
|
149
|
-
})]
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
function EventTypeBadge({ type }) {
|
|
153
|
-
const eventType = eventTypes[type];
|
|
154
|
-
const Icon = eventType.icon;
|
|
155
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Badge, {
|
|
156
|
-
variant: eventType.variant,
|
|
157
|
-
className: "gap-1 whitespace-nowrap [&_svg]:size-3",
|
|
158
|
-
title: type === "UNCHANGED" ? "App activity reported on the current bundle without a bundle transition." : type === "RELEASE_ADOPTED" ? "A different release was adopted without changing the bundle." : void 0,
|
|
159
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { "aria-hidden": "true" }), eventType.label]
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
function EventBundleTransition({ event, touch = false }) {
|
|
163
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
|
|
164
|
-
className: "grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2 gap-y-2",
|
|
165
|
-
children: [
|
|
166
|
-
event.fromBundleId ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
|
|
167
|
-
className: "text-muted-foreground",
|
|
168
|
-
children: "From"
|
|
169
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HashValueDisplay, {
|
|
170
|
-
value: event.fromBundleId,
|
|
171
|
-
buttonClassName: touch ? "min-h-11 px-3" : void 0
|
|
172
|
-
}) })] }) : null,
|
|
173
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
|
|
174
|
-
className: "text-muted-foreground",
|
|
175
|
-
children: event.type === "UNCHANGED" ? "Current" : "To"
|
|
176
|
-
}),
|
|
177
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HashValueDisplay, {
|
|
178
|
-
value: event.toBundleId,
|
|
179
|
-
buttonClassName: touch ? "min-h-11 px-3" : void 0
|
|
180
|
-
}) })
|
|
181
|
-
]
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
82
|
function EventHistoryList({ events, formatter, renderIdentity }) {
|
|
185
83
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
186
84
|
className: "px-4 pb-2 text-xs text-muted-foreground sm:px-6",
|
|
@@ -235,16 +133,6 @@ function EventHistoryList({ events, formatter, renderIdentity }) {
|
|
|
235
133
|
}, event.id))
|
|
236
134
|
})] });
|
|
237
135
|
}
|
|
238
|
-
function InsightsErrorAlert({ fallbackTitle }) {
|
|
239
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
|
|
240
|
-
variant: "destructive",
|
|
241
|
-
children: [
|
|
242
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, { "aria-hidden": "true" }),
|
|
243
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: fallbackTitle }),
|
|
244
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "Refresh to try again. If this keeps happening, check your Insights provider connection." })
|
|
245
|
-
]
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
136
|
function InsightsPagination({ hasPrevious, label, nextCursor, onNext, onPrevious, pageLength, pageNumber }) {
|
|
249
137
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("nav", {
|
|
250
138
|
"aria-label": `${label} pagination`,
|
|
@@ -481,4 +369,4 @@ function InsightsPageHeader({ view }) {
|
|
|
481
369
|
});
|
|
482
370
|
}
|
|
483
371
|
//#endregion
|
|
484
|
-
export {
|
|
372
|
+
export { useInsightsEventsQuery as a, useInsightsInstallationsQuery as c, InsightsPagination as i, useReportingInstallationsQuery as l, EventHistoryList as n, useInsightsInstallationEventsQuery as o, InsightsPageHeader as r, useInsightsInstallationQuery as s, EventHistoryCard as t };
|