@hot-updater/console 1.0.0-rc.0 → 1.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/HashValueDisplay-CB0Eskit.js +1 -0
- package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +1 -0
- package/.output/public/assets/api-keys-BzKocqRy.js +1 -0
- package/.output/public/assets/api-keys-api-BHcODB7q.js +1 -0
- package/.output/public/assets/card-Dhr_eFYj.js +1 -0
- package/.output/public/assets/{chart-no-axes-combined-FaYMGmQS.js → chart-no-axes-combined-Dy4WJv2U.js} +1 -1
- package/.output/public/assets/composite-Bp98A0Ld.js +1 -0
- package/.output/public/assets/createServerFn-CA8fs7QD.js +3 -0
- package/.output/public/assets/dialog-CUTrcPlB.js +1 -0
- package/.output/public/assets/{dist-DspNKfMj.js → dist-C_NydL0e.js} +1 -1
- package/.output/public/assets/index-DdAz-CXv.js +10 -0
- package/.output/public/assets/input-group-cSOG4wh_.js +1 -0
- package/.output/public/assets/insights-C0PBSZ-n.js +1 -0
- package/.output/public/assets/installations-CE33wgbY.js +2 -0
- package/.output/public/assets/installations-CStZja8x.js +1 -0
- package/.output/public/assets/lazyRouteComponent-Ccp3bwBY.js +1 -0
- package/.output/public/assets/link-CI8idAUi.js +1 -0
- package/.output/public/assets/loader-circle-BoxLrsOu.js +1 -0
- package/.output/public/assets/refresh-cw-Bqc72UZG.js +1 -0
- package/.output/public/assets/{routes-DcQnVajO.js → routes-DGVXdzpw.js} +2 -2
- package/.output/public/assets/routes-DTlwOr8I.js +1 -0
- package/.output/public/assets/{shield-check-DE_hVuHu.js → shield-check-uK3MHWJZ.js} +1 -1
- package/.output/public/assets/signing-CMf4aqDO.js +1 -0
- package/.output/public/assets/styles-BCvbtKsm.css +2 -0
- package/.output/public/assets/table-2vcV89QB.js +1 -0
- package/.output/public/assets/useCompositeListItem-CHLITE_4.js +1 -0
- package/.output/public/assets/x-DCd0j8c6.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-DBP9TQ7K.mjs → __23tanstack-start-server-fn-resolver-B7ioJhtE.mjs} +44 -52
- package/.output/server/_libs/@base-ui/react+[...].mjs +1906 -4040
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +52 -4
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +2 -2
- package/.output/server/_libs/lucide-react.mjs +36 -3
- package/.output/server/_libs/next-themes.mjs +2 -2
- package/.output/server/_libs/sonner.mjs +2 -2
- package/.output/server/_libs/tanstack__react-query.mjs +2 -2
- package/.output/server/_libs/verkit.mjs +20 -15
- package/.output/server/_runtime.mjs +1 -10
- package/.output/server/_ssr/HashValueDisplay-DwpGLfrl.mjs +55 -0
- package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +484 -0
- package/.output/server/_ssr/{api-keys-BnM_o2nS.mjs → api-keys-CZeTPQys.mjs} +11 -13
- package/.output/server/_ssr/{api-keys-api-CIywsSF5.mjs → api-keys-api-BUPQVSpk.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-BSp1wkIV.mjs → api-keys-rpc-Cs7tS5_j.mjs} +5 -5
- package/.output/server/_ssr/{api-rpc-cG5wd_tO.mjs → api-rpc-tAupfGQm.mjs} +73 -142
- package/.output/server/_ssr/{auth-rpc-BrJ6obHJ.mjs → auth-rpc-DUaeOWKK.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-DwKoZoQM.mjs → auth.server-DW71WzsD.mjs} +2 -5
- package/.output/server/_ssr/{bundle-signing-rpc-COoQhW8E.mjs → bundle-signing-rpc-BhnBw0-d.mjs} +2 -2
- package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +12 -0
- package/.output/server/_ssr/{alert-Dim3MGY5.mjs → card-BRiPmi0C.mjs} +61 -39
- package/.output/server/_ssr/{config.server-DEiLhKmy.mjs → config.server-afDuAwaG.mjs} +15 -8
- package/.output/server/_ssr/{createSsrRpc-9P0S0lJ3.mjs → createSsrRpc-DjWNJ0uc.mjs} +6 -6
- package/.output/server/_ssr/databaseJsonValue-d6I3nAS4.mjs +45 -0
- package/.output/server/_ssr/{databaseRows-CwbNwYSl.mjs → databaseRows-5bCRTxm-.mjs} +4 -44
- package/.output/server/_ssr/{deleteBundle-Cu_XOMt0.mjs → deleteBundle-BTGwBgzx.mjs} +2 -2
- package/.output/server/_ssr/{dialog-CQuRMNZ4.mjs → dialog-DS-nw-pA.mjs} +2 -2
- package/.output/server/_ssr/{dist-BVSLTpoP.mjs → dist-CyzPaI5v.mjs} +2 -2
- package/.output/server/_ssr/{getBundleChildren-BcRMFoDF.mjs → getBundleChildren-C0vh4ZvE.mjs} +2 -2
- package/.output/server/_ssr/input-group-BpsnmvZw.mjs +70 -0
- package/.output/server/_ssr/insights-BdS364Xu.mjs +460 -0
- package/.output/server/_ssr/insights-rpc-38DujK0G.mjs +57 -0
- package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +303 -0
- package/.output/server/_ssr/installations-CtA59MQG.mjs +29 -0
- package/.output/server/_ssr/installations-DiVKEF5T.mjs +627 -0
- package/.output/server/_ssr/{router-C-KUBfOi.mjs → router-B9wG_9f8.mjs} +37 -46
- package/.output/server/_ssr/{routes-Z7TwC6nC.mjs → routes-CKrrS2q2.mjs} +3 -3
- package/.output/server/_ssr/{routes-BM4ht9jb.mjs → routes-D7Yh_jfj.mjs} +402 -390
- package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +438 -0
- package/.output/server/_ssr/{server-BjzmvXnO.mjs → server-D_C2rMzf.mjs} +5 -5
- package/.output/server/_ssr/{signing-k8GxyBDF.mjs → signing-Dz1WkZOf.mjs} +16 -85
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{field-DRIXKjZG.mjs → table-CnZmon_Z.mjs} +51 -5
- package/.output/server/_ssr/{uuidv7-BbJ-9D_I.mjs → uuidv7-D0QFkPL_.mjs} +3 -3
- package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +97 -0
- package/.output/server/index.mjs +168 -203
- package/lib/index.d.mts +4 -4
- package/lib/vite-internal.mjs +1 -1
- package/lib/vite.d.mts +0 -1
- package/package.json +8 -8
- package/src/components/AppSidebar.tsx +12 -16
- package/src/components/ConsoleAccessPage.tsx +1 -1
- package/src/components/HashValueDisplay.tsx +11 -2
- package/src/components/features/api-keys/ApiKeysPage.tsx +1 -1
- package/src/components/features/bundles/BundleChildrenPanel.tsx +7 -6
- package/src/components/features/bundles/BundleMetadata.tsx +1 -20
- package/src/components/features/channels/ChannelManagementDialog.tsx +1 -1
- package/src/components/features/insights/EventDetails.tsx +151 -0
- package/src/components/features/insights/EventHistoryCard.tsx +245 -0
- package/src/components/features/insights/EventHistoryList.tsx +63 -0
- package/src/components/features/insights/InsightsBundleReports.tsx +51 -0
- package/src/components/features/insights/InsightsControls.tsx +121 -0
- package/src/components/features/{analytics/AnalyticsErrorAlert.tsx → insights/InsightsErrorAlert.tsx} +6 -6
- package/src/components/features/insights/InsightsOverview.tsx +203 -0
- package/src/components/features/insights/InsightsPageHeader.tsx +48 -0
- package/src/components/features/insights/InsightsPagination.tsx +52 -0
- package/src/components/features/insights/InstallationHistoryCard.tsx +250 -0
- package/src/components/features/insights/InstallationMatchesCard.tsx +178 -0
- package/src/components/features/insights/InstallationPageHeader.tsx +90 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +24 -24
- package/src/components/features/signing/BundleSigningPage.tsx +18 -126
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/combobox.tsx +1 -0
- package/src/components/ui/skeleton.tsx +4 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/index.ts +7 -3
- package/src/lib/api-rpc.ts +19 -90
- package/src/lib/api.ts +0 -99
- package/src/lib/insights-api.ts +100 -0
- package/src/lib/insights-rpc.ts +88 -0
- package/src/lib/insights-view.ts +15 -0
- package/src/lib/public-bundle-error.ts +19 -0
- package/src/lib/server/bundle-signing.server.ts +5 -82
- package/src/lib/server/console-runtime.server.ts +0 -9
- package/src/lib/server/releaseReachability.ts +1 -4
- package/src/lib/server/runtime.server.ts +6 -142
- package/src/routeTree.gen.ts +21 -21
- package/src/router.tsx +3 -0
- package/src/routes/-installations-search.ts +25 -12
- package/src/routes/__root.tsx +6 -16
- package/src/routes/api-keys.tsx +1 -1
- package/src/routes/index.tsx +21 -81
- package/src/routes/insights.tsx +84 -0
- package/src/routes/installations.tsx +294 -142
- package/src/styles.css +6 -0
- package/.output/public/assets/AnalyticsCapabilityContext-BCke57-7.js +0 -1
- package/.output/public/assets/BundleActivityChart-CnsBe_1J.js +0 -42
- package/.output/public/assets/BundleIdDisplay-Dky75zLU.js +0 -1
- package/.output/public/assets/alert-C-1KvDW8.js +0 -1
- package/.output/public/assets/analytics-Bqz0c-BT.js +0 -1
- package/.output/public/assets/analytics-api-CJdrTLLO.js +0 -1
- package/.output/public/assets/api-B_Rh-uzC.js +0 -1
- package/.output/public/assets/api-keys-BurCFhzH.js +0 -1
- package/.output/public/assets/api-keys-api-BEDJdQg3.js +0 -1
- package/.output/public/assets/badge-Bf0fZ-Gx.js +0 -1
- package/.output/public/assets/createServerFn-gM2-LFBy.js +0 -3
- package/.output/public/assets/dialog-BS60BRr2.js +0 -1
- package/.output/public/assets/download-O-yNBc9H.js +0 -1
- package/.output/public/assets/field-Buq148-A.js +0 -1
- package/.output/public/assets/index-kFhd2S78.js +0 -10
- package/.output/public/assets/installations-BrQ-od41.js +0 -2
- package/.output/public/assets/installations-CGlZ3ROz.js +0 -1
- package/.output/public/assets/lazyRouteComponent-rPzgA7S-.js +0 -1
- package/.output/public/assets/loader-circle-DCYF-wJl.js +0 -1
- package/.output/public/assets/refresh-cw-n8XYbPPj.js +0 -1
- package/.output/public/assets/routes-CrdokJ80.js +0 -1
- package/.output/public/assets/search-DLhbWw3W.js +0 -1
- package/.output/public/assets/signing-HRexfjsH.js +0 -1
- package/.output/public/assets/styles-eB4EtvFS.css +0 -2
- package/.output/public/assets/table-D8CLieHX.js +0 -1
- package/.output/public/assets/textarea-YJLTVAoq.js +0 -1
- package/.output/public/assets/useMutation-JsGVjQMY.js +0 -1
- package/.output/public/assets/useOpenInteractionType-4cRD5xO0.js +0 -1
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +0 -1554
- package/.output/server/_libs/d3-array.mjs +0 -231
- package/.output/server/_libs/d3-color.mjs +0 -330
- package/.output/server/_libs/d3-format.mjs +0 -252
- package/.output/server/_libs/d3-interpolate.mjs +0 -207
- package/.output/server/_libs/d3-path.mjs +0 -77
- package/.output/server/_libs/d3-scale+[...].mjs +0 -1907
- package/.output/server/_libs/d3-shape.mjs +0 -818
- package/.output/server/_libs/decimal.js-light.mjs +0 -884
- package/.output/server/_libs/es-toolkit.mjs +0 -1134
- package/.output/server/_libs/eventemitter3.mjs +0 -236
- package/.output/server/_libs/immer.mjs +0 -532
- package/.output/server/_libs/react-redux+[...].mjs +0 -205
- package/.output/server/_libs/recharts+[...].mjs +0 -14117
- package/.output/server/_ssr/AnalyticsCapabilityContext-ui4DX8GO.mjs +0 -15
- package/.output/server/_ssr/BundleActivityChart-BiB9ZORH.mjs +0 -288
- package/.output/server/_ssr/BundleIdDisplay-Czk6iR6p.mjs +0 -13
- package/.output/server/_ssr/analytics-DtMTn8fn.mjs +0 -858
- package/.output/server/_ssr/analytics-api-Cg1M5v_H.mjs +0 -71
- package/.output/server/_ssr/analytics-input-fRRRn0uA.mjs +0 -96
- package/.output/server/_ssr/analytics-rpc-DY5uXvHT.mjs +0 -155
- package/.output/server/_ssr/api-BTSv1tZb.mjs +0 -282
- package/.output/server/_ssr/badge-DCxbEeof.mjs +0 -26
- package/.output/server/_ssr/bundle-signing.server-D5u8KkMp.mjs +0 -51
- package/.output/server/_ssr/installations-B-azgAvX.mjs +0 -19
- package/.output/server/_ssr/installations-Ctvzp2JH.mjs +0 -535
- package/.output/server/_ssr/runtime.server-awTLiiXW.mjs +0 -527
- package/.output/server/_ssr/table-v1yCvYo7.mjs +0 -53
- package/.output/server/_ssr/textarea-DYHnskhb.mjs +0 -14
- package/.output/server/_tanstack-start-manifest_v-CH4StzJu.mjs +0 -108
- package/src/components/features/analytics/ActivityChart.tsx +0 -150
- package/src/components/features/analytics/AnalyticsCapabilityContext.tsx +0 -24
- package/src/components/features/analytics/AnalyticsControls.tsx +0 -115
- package/src/components/features/analytics/AnalyticsOverview.tsx +0 -208
- package/src/components/features/analytics/BundleDistribution.tsx +0 -133
- package/src/components/features/analytics/BundleSelector.tsx +0 -114
- package/src/components/features/analytics/InstallationHistoryCard.tsx +0 -248
- package/src/components/features/analytics/InstallationMatchesCard.tsx +0 -132
- package/src/components/features/analytics/InstallationPageHeader.tsx +0 -138
- package/src/components/features/analytics/InstallationPagination.tsx +0 -48
- package/src/components/features/analytics/InstallationSearch.tsx +0 -230
- package/src/components/features/analytics/UpdateOutcomes.tsx +0 -147
- package/src/components/features/bundles/BundleActivityChart.tsx +0 -193
- package/src/components/features/bundles/BundleAnalyticsSummary.tsx +0 -123
- package/src/lib/analytics-api.ts +0 -145
- package/src/lib/analytics-error.ts +0 -19
- package/src/lib/analytics-input.ts +0 -187
- package/src/lib/analytics-overview.ts +0 -170
- package/src/lib/analytics-rpc.ts +0 -218
- package/src/lib/server/releaseActivity.ts +0 -27
- package/src/routes/analytics.tsx +0 -139
- /package/.output/public/assets/{preload-helper-TKOBYGYD.js → preload-helper-CQ36nxok.js} +0 -0
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
import { r as __toESM } from "../_runtime.mjs";
|
|
2
|
+
import { C as Toggle, J as require_react, S as ToggleGroup, q as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
+
import { I as ArrowUpRight } from "../_libs/lucide-react.mjs";
|
|
4
|
+
import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
|
|
5
|
+
import { C as cn, S as buttonVariants, _ as Skeleton, n as Input, t as Button$1 } from "./createSsrRpc-DjWNJ0uc.mjs";
|
|
6
|
+
import { m as Link } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
7
|
+
import { c as CardDescription, d as CardTitle, l as CardFooter, o as Card, s as CardContent, u as CardHeader } from "./card-BRiPmi0C.mjs";
|
|
8
|
+
import { a as FieldLabel, i as FieldGroup, t as Field } from "./table-CnZmon_Z.mjs";
|
|
9
|
+
import { i as EventTimestamp, l as useInsightsEventsQuery, m as useReportingInstallationsQuery, n as EventHistoryCard, o as InsightsErrorAlert, p as useInsightsTimeFormat, s as InsightsPageHeader } from "./InsightsPageHeader-Df4Brj8u.mjs";
|
|
10
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/insights-BdS364Xu.js
|
|
11
|
+
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
12
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
13
|
+
var outcomeLabels = {
|
|
14
|
+
applied: "Applied reports",
|
|
15
|
+
recovered: "Recovered-from reports",
|
|
16
|
+
adopted: "Adopted reports"
|
|
17
|
+
};
|
|
18
|
+
function InsightsBundleReports({ selection }) {
|
|
19
|
+
const [cursors, setCursors] = (0, import_react.useState)([void 0]);
|
|
20
|
+
const events = useInsightsEventsQuery({
|
|
21
|
+
...selection,
|
|
22
|
+
cursor: cursors.at(-1),
|
|
23
|
+
limit: 50
|
|
24
|
+
}, true);
|
|
25
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventHistoryCard, {
|
|
26
|
+
title: outcomeLabels[selection.bundle.outcome],
|
|
27
|
+
error: events.error,
|
|
28
|
+
eventsLocation: { eventsBefore: selection.beforeReceivedAtMs },
|
|
29
|
+
history: events.data,
|
|
30
|
+
isFetching: events.isFetching,
|
|
31
|
+
isLoading: events.isLoading,
|
|
32
|
+
onNext: () => {
|
|
33
|
+
const cursor = events.data?.nextCursor;
|
|
34
|
+
if (cursor) setCursors((previous) => [...previous, cursor]);
|
|
35
|
+
},
|
|
36
|
+
onPrevious: () => setCursors((previous) => previous.slice(0, -1)),
|
|
37
|
+
onRefresh: () => {
|
|
38
|
+
events.refetch();
|
|
39
|
+
},
|
|
40
|
+
pageNumber: cursors.length,
|
|
41
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
42
|
+
className: "text-sm text-muted-foreground",
|
|
43
|
+
children: "Reports for the selected bundle and the measured period. New reports appear after refreshing the overview."
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
var toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
48
|
+
variants: {
|
|
49
|
+
variant: {
|
|
50
|
+
default: "bg-transparent",
|
|
51
|
+
outline: "border border-input bg-transparent hover:bg-muted"
|
|
52
|
+
},
|
|
53
|
+
size: {
|
|
54
|
+
default: "h-7 min-w-7 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
55
|
+
sm: "h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
56
|
+
lg: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
variant: "default",
|
|
61
|
+
size: "default"
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
var ToggleGroupContext = import_react.createContext({
|
|
65
|
+
size: "default",
|
|
66
|
+
variant: "default",
|
|
67
|
+
spacing: 2,
|
|
68
|
+
orientation: "horizontal"
|
|
69
|
+
});
|
|
70
|
+
function ToggleGroup$1({ className, variant, size, spacing = 2, orientation = "horizontal", children, ...props }) {
|
|
71
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroup, {
|
|
72
|
+
"data-slot": "toggle-group",
|
|
73
|
+
"data-variant": variant,
|
|
74
|
+
"data-size": size,
|
|
75
|
+
"data-spacing": spacing,
|
|
76
|
+
"data-orientation": orientation,
|
|
77
|
+
style: { "--gap": spacing },
|
|
78
|
+
className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch", className),
|
|
79
|
+
...props,
|
|
80
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupContext.Provider, {
|
|
81
|
+
value: {
|
|
82
|
+
variant,
|
|
83
|
+
size,
|
|
84
|
+
spacing,
|
|
85
|
+
orientation
|
|
86
|
+
},
|
|
87
|
+
children
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function ToggleGroupItem({ className, children, variant = "default", size = "default", ...props }) {
|
|
92
|
+
const context = import_react.useContext(ToggleGroupContext);
|
|
93
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toggle, {
|
|
94
|
+
"data-slot": "toggle-group-item",
|
|
95
|
+
"data-variant": context.variant || variant,
|
|
96
|
+
"data-size": context.size || size,
|
|
97
|
+
"data-spacing": context.spacing,
|
|
98
|
+
className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
|
|
99
|
+
variant: context.variant || variant,
|
|
100
|
+
size: context.size || size
|
|
101
|
+
}), className),
|
|
102
|
+
...props,
|
|
103
|
+
children
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
var windows = [
|
|
107
|
+
{
|
|
108
|
+
value: "24h",
|
|
109
|
+
label: "24 hours",
|
|
110
|
+
shortLabel: "24h"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
value: "7d",
|
|
114
|
+
label: "7 days",
|
|
115
|
+
shortLabel: "7d"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
value: "30d",
|
|
119
|
+
label: "30 days",
|
|
120
|
+
shortLabel: "30d"
|
|
121
|
+
}
|
|
122
|
+
];
|
|
123
|
+
function InsightsControls({ onWindowChange, onScopeChange, scope, window }) {
|
|
124
|
+
const [platform, setPlatform] = (0, import_react.useState)(scope.platform);
|
|
125
|
+
const [channel, setChannel] = (0, import_react.useState)(scope.channel);
|
|
126
|
+
const [bundleId, setBundleId] = (0, import_react.useState)(scope.bundleId ?? "");
|
|
127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
128
|
+
"aria-label": "Insights controls",
|
|
129
|
+
className: "flex flex-col gap-4",
|
|
130
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("form", {
|
|
131
|
+
onSubmit: (event) => {
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
onScopeChange({
|
|
134
|
+
platform,
|
|
135
|
+
channel,
|
|
136
|
+
bundleId: bundleId || void 0
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FieldGroup, {
|
|
140
|
+
className: "items-end sm:flex-row",
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Field, {
|
|
143
|
+
className: "w-full sm:w-auto",
|
|
144
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldLabel, { children: "Platform" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ToggleGroup$1, {
|
|
145
|
+
"aria-label": "Platform",
|
|
146
|
+
value: [platform],
|
|
147
|
+
onValueChange: (value) => {
|
|
148
|
+
if (value[0] === "ios" || value[0] === "android") setPlatform(value[0]);
|
|
149
|
+
},
|
|
150
|
+
spacing: 0,
|
|
151
|
+
variant: "outline",
|
|
152
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupItem, {
|
|
153
|
+
className: "h-11 lg:h-8",
|
|
154
|
+
value: "ios",
|
|
155
|
+
children: "iOS"
|
|
156
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupItem, {
|
|
157
|
+
className: "h-11 lg:h-8",
|
|
158
|
+
value: "android",
|
|
159
|
+
children: "Android"
|
|
160
|
+
})]
|
|
161
|
+
})]
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Field, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldLabel, {
|
|
164
|
+
htmlFor: "insights-channel",
|
|
165
|
+
children: "Channel"
|
|
166
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
|
|
167
|
+
className: "h-11 lg:h-8",
|
|
168
|
+
id: "insights-channel",
|
|
169
|
+
value: channel,
|
|
170
|
+
onChange: (event) => setChannel(event.target.value),
|
|
171
|
+
required: true,
|
|
172
|
+
maxLength: 1024
|
|
173
|
+
})] }),
|
|
174
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Field, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldLabel, {
|
|
175
|
+
htmlFor: "insights-bundle",
|
|
176
|
+
children: "Bundle ID (optional)"
|
|
177
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
|
|
178
|
+
className: "h-11 lg:h-8",
|
|
179
|
+
id: "insights-bundle",
|
|
180
|
+
placeholder: "Select a bundle by ID",
|
|
181
|
+
value: bundleId,
|
|
182
|
+
onChange: (event) => setBundleId(event.target.value),
|
|
183
|
+
maxLength: 1024
|
|
184
|
+
})] }),
|
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
186
|
+
className: "h-11 w-full sm:w-auto lg:h-8",
|
|
187
|
+
type: "submit",
|
|
188
|
+
variant: "outline",
|
|
189
|
+
children: "Apply filters"
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
})
|
|
193
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Field, {
|
|
194
|
+
orientation: "horizontal",
|
|
195
|
+
className: "w-full",
|
|
196
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldLabel, {
|
|
197
|
+
className: "sr-only",
|
|
198
|
+
children: "Reporting period"
|
|
199
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroup$1, {
|
|
200
|
+
"aria-label": "Reporting period",
|
|
201
|
+
className: "w-full sm:w-fit",
|
|
202
|
+
onValueChange: (value) => {
|
|
203
|
+
if (value[0]) onWindowChange(value[0]);
|
|
204
|
+
},
|
|
205
|
+
spacing: 0,
|
|
206
|
+
size: "lg",
|
|
207
|
+
value: [window],
|
|
208
|
+
variant: "outline",
|
|
209
|
+
children: windows.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupItem, {
|
|
210
|
+
"aria-label": item.label,
|
|
211
|
+
className: "h-11 flex-1 px-4 sm:flex-none lg:h-8 lg:px-2.5",
|
|
212
|
+
value: item.value,
|
|
213
|
+
children: item.shortLabel
|
|
214
|
+
}, item.value))
|
|
215
|
+
})]
|
|
216
|
+
})]
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
var windowCopy = {
|
|
220
|
+
"24h": "the last 24 hours",
|
|
221
|
+
"7d": "the last 7 days",
|
|
222
|
+
"30d": "the last 30 days"
|
|
223
|
+
};
|
|
224
|
+
function InsightsOverview(props) {
|
|
225
|
+
const dateTimeFormat = useInsightsTimeFormat();
|
|
226
|
+
if (props.status === "loading") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
|
|
227
|
+
"aria-label": "Loading reporting installations",
|
|
228
|
+
className: "shadow-sm",
|
|
229
|
+
children: [
|
|
230
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, {
|
|
231
|
+
className: "px-4 pt-4 pb-2 sm:px-6 sm:pt-6",
|
|
232
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-4 w-40" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-3 w-full max-w-md" })]
|
|
233
|
+
}),
|
|
234
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, {
|
|
235
|
+
className: "px-4 pb-6 sm:px-6",
|
|
236
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-12 w-28" })
|
|
237
|
+
}),
|
|
238
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardFooter, {
|
|
239
|
+
className: "border-t px-4 py-3 sm:px-6",
|
|
240
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-8 w-full max-w-sm" })
|
|
241
|
+
})
|
|
242
|
+
]
|
|
243
|
+
});
|
|
244
|
+
if (props.status === "error") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsErrorAlert, {
|
|
245
|
+
error: props.error,
|
|
246
|
+
fallbackTitle: "Reporting installations unavailable"
|
|
247
|
+
});
|
|
248
|
+
const { active } = props;
|
|
249
|
+
const bundle = active.bundle;
|
|
250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
251
|
+
"aria-labelledby": "reporting-installations-heading",
|
|
252
|
+
className: "flex flex-col gap-4",
|
|
253
|
+
children: [
|
|
254
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
|
|
255
|
+
className: "min-w-0 overflow-hidden shadow-sm",
|
|
256
|
+
children: [
|
|
257
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, {
|
|
258
|
+
className: "gap-2 px-4 pt-4 pb-2 sm:px-6 sm:pt-6",
|
|
259
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
|
|
260
|
+
className: "text-sm font-medium",
|
|
261
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
|
|
262
|
+
id: "reporting-installations-heading",
|
|
263
|
+
children: "Reporting installations"
|
|
264
|
+
})
|
|
265
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardDescription, { children: [
|
|
266
|
+
active.platform === "ios" ? "iOS" : "Android",
|
|
267
|
+
" · ",
|
|
268
|
+
active.channel,
|
|
269
|
+
" ·",
|
|
270
|
+
" ",
|
|
271
|
+
windowCopy[active.window],
|
|
272
|
+
". Installations are counted by their last report received."
|
|
273
|
+
] })]
|
|
274
|
+
}),
|
|
275
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, {
|
|
276
|
+
className: "px-4 pt-2 pb-5 sm:px-6 sm:pb-6",
|
|
277
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
278
|
+
className: "text-4xl font-semibold tracking-tight tabular-nums sm:text-5xl",
|
|
279
|
+
children: active.reportingInstallations.count.toLocaleString()
|
|
280
|
+
})
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardFooter, {
|
|
283
|
+
className: "flex flex-wrap items-center justify-between gap-3 border-t bg-muted/15 px-4 py-3 sm:px-6",
|
|
284
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
|
|
285
|
+
className: "min-w-0 text-xs",
|
|
286
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
|
|
287
|
+
className: "text-muted-foreground",
|
|
288
|
+
children: "Measured at"
|
|
289
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
|
|
290
|
+
className: "font-medium tabular-nums",
|
|
291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventTimestamp, {
|
|
292
|
+
formatter: dateTimeFormat,
|
|
293
|
+
touch: true,
|
|
294
|
+
value: active.reportingInstallations.measuredAtMs
|
|
295
|
+
})
|
|
296
|
+
})]
|
|
297
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
|
|
298
|
+
className: buttonVariants({
|
|
299
|
+
className: "h-11 px-3 lg:h-8",
|
|
300
|
+
variant: "outline"
|
|
301
|
+
}),
|
|
302
|
+
to: "/installations",
|
|
303
|
+
children: ["View events", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowUpRight, {
|
|
304
|
+
"aria-hidden": "true",
|
|
305
|
+
"data-icon": "inline-end"
|
|
306
|
+
})]
|
|
307
|
+
})]
|
|
308
|
+
})
|
|
309
|
+
]
|
|
310
|
+
}),
|
|
311
|
+
bundle ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
|
|
312
|
+
className: "min-w-0 overflow-hidden shadow-sm",
|
|
313
|
+
children: [
|
|
314
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, { children: "Selected bundle" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardDescription, {
|
|
315
|
+
className: "break-all",
|
|
316
|
+
children: bundle.bundleId
|
|
317
|
+
})] }),
|
|
318
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
|
|
319
|
+
className: "flex flex-col gap-5",
|
|
320
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
321
|
+
className: "flex flex-wrap items-center justify-between gap-3",
|
|
322
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
|
|
323
|
+
className: "text-sm",
|
|
324
|
+
children: "Selected bundle installations"
|
|
325
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
|
|
326
|
+
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
327
|
+
children: bundle.reportingInstallations.count.toLocaleString()
|
|
328
|
+
})] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
329
|
+
className: "text-xs text-muted-foreground",
|
|
330
|
+
children: [
|
|
331
|
+
"Measured at",
|
|
332
|
+
" ",
|
|
333
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventTimestamp, {
|
|
334
|
+
formatter: dateTimeFormat,
|
|
335
|
+
touch: true,
|
|
336
|
+
value: bundle.reportingInstallations.measuredAtMs
|
|
337
|
+
})
|
|
338
|
+
]
|
|
339
|
+
})]
|
|
340
|
+
}), [
|
|
341
|
+
["applied", bundle.appliedReports],
|
|
342
|
+
["recovered", bundle.recoveredReports],
|
|
343
|
+
["adopted", bundle.adoptedReports]
|
|
344
|
+
].map(([outcome, measurement]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
345
|
+
className: "flex flex-wrap items-center justify-between gap-3",
|
|
346
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
347
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
|
|
348
|
+
className: "text-sm",
|
|
349
|
+
children: outcomeLabels[outcome]
|
|
350
|
+
}),
|
|
351
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
|
|
352
|
+
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
353
|
+
children: measurement.count.toLocaleString()
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
356
|
+
className: "mt-1 text-xs text-muted-foreground",
|
|
357
|
+
children: [
|
|
358
|
+
"Measured at",
|
|
359
|
+
" ",
|
|
360
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventTimestamp, {
|
|
361
|
+
formatter: dateTimeFormat,
|
|
362
|
+
touch: true,
|
|
363
|
+
value: measurement.measuredAtMs
|
|
364
|
+
})
|
|
365
|
+
]
|
|
366
|
+
})
|
|
367
|
+
] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
|
|
368
|
+
className: "h-11 lg:h-8",
|
|
369
|
+
variant: "outline",
|
|
370
|
+
onClick: () => props.onOutcomeSelect({
|
|
371
|
+
bundle: {
|
|
372
|
+
platform: active.platform,
|
|
373
|
+
channel: active.channel,
|
|
374
|
+
bundleId: bundle.bundleId,
|
|
375
|
+
outcome
|
|
376
|
+
},
|
|
377
|
+
sinceMs: active.sinceMs,
|
|
378
|
+
beforeReceivedAtMs: active.beforeReceivedAtMs
|
|
379
|
+
}),
|
|
380
|
+
children: [
|
|
381
|
+
"View ",
|
|
382
|
+
outcome,
|
|
383
|
+
" reports",
|
|
384
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowUpRight, {
|
|
385
|
+
"aria-hidden": "true",
|
|
386
|
+
"data-icon": "inline-end"
|
|
387
|
+
})
|
|
388
|
+
]
|
|
389
|
+
})]
|
|
390
|
+
}, outcome))]
|
|
391
|
+
}) }),
|
|
392
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
393
|
+
className: "text-xs text-muted-foreground",
|
|
394
|
+
children: "Installation counts are independent live measurements. Outcome counts are accepted reports, not unique devices or update attempts. Recovery reports identify the bundle recovered from."
|
|
395
|
+
}) })
|
|
396
|
+
]
|
|
397
|
+
}) : null,
|
|
398
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
399
|
+
className: "text-xs text-muted-foreground",
|
|
400
|
+
children: "Offline installations, opt-outs, and reports that did not reach the server are absent."
|
|
401
|
+
})
|
|
402
|
+
]
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
function InsightsPage() {
|
|
406
|
+
const [window, setWindow] = (0, import_react.useState)("30d");
|
|
407
|
+
const [scope, setScope] = (0, import_react.useState)({
|
|
408
|
+
platform: "ios",
|
|
409
|
+
channel: "production"
|
|
410
|
+
});
|
|
411
|
+
const [selection, setSelection] = (0, import_react.useState)(null);
|
|
412
|
+
const active = useReportingInstallationsQuery({
|
|
413
|
+
...scope,
|
|
414
|
+
window
|
|
415
|
+
});
|
|
416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
417
|
+
className: "flex h-svh min-h-0 flex-col",
|
|
418
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsPageHeader, { view: "overview" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
419
|
+
className: "min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6",
|
|
420
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
421
|
+
className: "mx-auto flex w-full max-w-4xl flex-col gap-4 sm:gap-6",
|
|
422
|
+
children: [
|
|
423
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsControls, {
|
|
424
|
+
scope,
|
|
425
|
+
onScopeChange: (next) => {
|
|
426
|
+
setScope(next);
|
|
427
|
+
setSelection(null);
|
|
428
|
+
},
|
|
429
|
+
onWindowChange: (next) => {
|
|
430
|
+
setWindow(next);
|
|
431
|
+
setSelection(null);
|
|
432
|
+
},
|
|
433
|
+
window
|
|
434
|
+
}),
|
|
435
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
436
|
+
className: "h-11 self-end lg:h-8",
|
|
437
|
+
variant: "outline",
|
|
438
|
+
disabled: active.isFetching,
|
|
439
|
+
onClick: () => {
|
|
440
|
+
setSelection(null);
|
|
441
|
+
active.refetch();
|
|
442
|
+
},
|
|
443
|
+
children: "Refresh overview"
|
|
444
|
+
}),
|
|
445
|
+
active.isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsOverview, { status: "loading" }) : active.error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsOverview, {
|
|
446
|
+
status: "error",
|
|
447
|
+
error: active.error
|
|
448
|
+
}) : active.data ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsOverview, {
|
|
449
|
+
status: "success",
|
|
450
|
+
active: active.data,
|
|
451
|
+
onOutcomeSelect: setSelection
|
|
452
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsOverview, { status: "loading" }),
|
|
453
|
+
selection ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsBundleReports, { selection }, JSON.stringify(selection)) : null
|
|
454
|
+
]
|
|
455
|
+
})
|
|
456
|
+
})]
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
//#endregion
|
|
460
|
+
export { InsightsPage as component };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
|
|
2
|
+
import { t as createServerRpc } from "./createServerRpc-DB29C_5p.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/insights-rpc-38DujK0G.js
|
|
4
|
+
var runtime = async () => {
|
|
5
|
+
const { prepareConfig } = await import("./config.server-afDuAwaG.mjs");
|
|
6
|
+
const { hotUpdater } = await prepareConfig();
|
|
7
|
+
return hotUpdater;
|
|
8
|
+
};
|
|
9
|
+
var readOverview = (input) => input;
|
|
10
|
+
var readEventsPage = (input) => input;
|
|
11
|
+
var readInstallationEventsPage = (input) => input;
|
|
12
|
+
var readInstallationPage = (input) => input;
|
|
13
|
+
var readInstallId = (input) => input;
|
|
14
|
+
var getReportingInstallationsRpc_createServerFn_handler = createServerRpc({
|
|
15
|
+
id: "ff00311d412c8cdfa8ad5b0ba1eb6aa7471d0cc12170e6cc645deb91603d42dd",
|
|
16
|
+
name: "getReportingInstallationsRpc",
|
|
17
|
+
filename: "src/lib/insights-rpc.ts"
|
|
18
|
+
}, (opts) => getReportingInstallationsRpc.__executeServer(opts));
|
|
19
|
+
var getReportingInstallationsRpc = createServerFn({ method: "GET" }).validator(readOverview).handler(getReportingInstallationsRpc_createServerFn_handler, async ({ data }) => (await runtime()).getReportingOverview(data));
|
|
20
|
+
var listInsightsEventsRpc_createServerFn_handler = createServerRpc({
|
|
21
|
+
id: "d4c50f40701055145f24873dc90f3c55a5494457a6a03a743339b2ac4545eb19",
|
|
22
|
+
name: "listInsightsEventsRpc",
|
|
23
|
+
filename: "src/lib/insights-rpc.ts"
|
|
24
|
+
}, (opts) => listInsightsEventsRpc.__executeServer(opts));
|
|
25
|
+
var listInsightsEventsRpc = createServerFn({ method: "GET" }).validator(readEventsPage).handler(listInsightsEventsRpc_createServerFn_handler, async ({ data }) => (await runtime()).listEvents(data));
|
|
26
|
+
var listInsightsInstallationEventsRpc_createServerFn_handler = createServerRpc({
|
|
27
|
+
id: "3c04bc6624be6dfdd80cf96819f9c6d0455e59a7bb4c0374b6afb0162ffd15b0",
|
|
28
|
+
name: "listInsightsInstallationEventsRpc",
|
|
29
|
+
filename: "src/lib/insights-rpc.ts"
|
|
30
|
+
}, (opts) => listInsightsInstallationEventsRpc.__executeServer(opts));
|
|
31
|
+
var listInsightsInstallationEventsRpc = createServerFn({ method: "GET" }).validator(readInstallationEventsPage).handler(listInsightsInstallationEventsRpc_createServerFn_handler, async ({ data }) => (await runtime()).listInstallationEvents(data));
|
|
32
|
+
var getInsightsInstallationRpc_createServerFn_handler = createServerRpc({
|
|
33
|
+
id: "6726f1ed9eda1f0cb4c1f1ad1023faee435ddcfd0b7c55ef08ca7f2f7f577370",
|
|
34
|
+
name: "getInsightsInstallationRpc",
|
|
35
|
+
filename: "src/lib/insights-rpc.ts"
|
|
36
|
+
}, (opts) => getInsightsInstallationRpc.__executeServer(opts));
|
|
37
|
+
var getInsightsInstallationRpc = createServerFn({ method: "GET" }).validator(readInstallId).handler(getInsightsInstallationRpc_createServerFn_handler, async ({ data }) => (await runtime()).getInstallation(data));
|
|
38
|
+
var findInsightsInstallationsRpc_createServerFn_handler = createServerRpc({
|
|
39
|
+
id: "735c501f6d5ea81a445ff2b6b2ea6a1b589e3c6f63a465a881822c80ae71e7d1",
|
|
40
|
+
name: "findInsightsInstallationsRpc",
|
|
41
|
+
filename: "src/lib/insights-rpc.ts"
|
|
42
|
+
}, (opts) => findInsightsInstallationsRpc.__executeServer(opts));
|
|
43
|
+
var findInsightsInstallationsRpc = createServerFn({ method: "GET" }).validator(readInstallationPage).handler(findInsightsInstallationsRpc_createServerFn_handler, async ({ data }) => {
|
|
44
|
+
const insights = await runtime();
|
|
45
|
+
const install = data.cursor ? null : await insights.getInstallation({ installId: data.identity });
|
|
46
|
+
const matches = await insights.pageInstallationsByCurrentUserId({
|
|
47
|
+
cursor: data.cursor,
|
|
48
|
+
limit: Math.max(1, data.limit - (install === null ? 0 : 1)),
|
|
49
|
+
userId: data.identity
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
data: install === null ? matches.data : [install, ...matches.data.filter(({ installId }) => installId !== install.installId)],
|
|
53
|
+
nextCursor: matches.nextCursor
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
//#endregion
|
|
57
|
+
export { findInsightsInstallationsRpc_createServerFn_handler, getInsightsInstallationRpc_createServerFn_handler, getReportingInstallationsRpc_createServerFn_handler, listInsightsEventsRpc_createServerFn_handler, listInsightsInstallationEventsRpc_createServerFn_handler };
|