@hot-updater/console 1.0.0-rc.2 → 1.0.0-rc.21
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/ConsoleFeatureUnavailable-D0LPL1Gy.js +1 -0
- package/.output/public/assets/HashValueDisplay-BmuB4FW-.js +1 -0
- package/.output/public/assets/InsightsInfo--v4SC07c.js +1 -0
- package/.output/public/assets/InsightsPageHeader-dU83CAQY.js +1 -0
- package/.output/public/assets/NotFoundPage-B5mhGG2a.js +1 -0
- package/.output/public/assets/api-D-vOVlQ4.js +1 -0
- package/.output/public/assets/api-keys-Csh8ARKU.js +1 -0
- package/.output/public/assets/api-keys-OMPUoA_A.js +1 -0
- package/.output/public/assets/arrow-left-Bwq9X1eS.js +1 -0
- package/.output/public/assets/arrow-up-right-BkOVn4if.js +1 -0
- package/.output/public/assets/card-C_7d6O9a.js +1 -0
- package/.output/public/assets/console-features-api-C1jRZTGw.js +1 -0
- package/.output/public/assets/dialog-DE8wFN_P.js +1 -0
- package/.output/public/assets/dist-C7ENGzpS.js +1 -0
- package/.output/public/assets/empty-CVd5NlQD.js +1 -0
- package/.output/public/assets/field-C06q1iC9.js +1 -0
- package/.output/public/assets/index-BeWlQtO6.js +11 -0
- package/.output/public/assets/input-group-Bi61biIA.js +1 -0
- package/.output/public/assets/insights-BjnAtC0f.js +2 -0
- package/.output/public/assets/insights-D86m11yH.js +42 -0
- package/.output/public/assets/insights-DpYstMoY.js +1 -0
- package/.output/public/assets/insights-recovery-rpc-BIm5_ALc.js +1 -0
- package/.output/public/assets/insights-search-KIF7mRtB.js +1 -0
- package/.output/public/assets/insights-usage-rpc-VHj8vyBt.js +1 -0
- package/.output/public/assets/insights_.distribution-ADcrX48c.js +2 -0
- package/.output/public/assets/insights_.distribution-CuuJUN6Y.js +1 -0
- package/.output/public/assets/insights_.distribution-DJRjuXsO.js +1 -0
- package/.output/public/assets/installations-BSBBzqWs.js +2 -0
- package/.output/public/assets/installations-DqIE6WcO.js +1 -0
- package/.output/public/assets/installations-UsELbDvw.js +1 -0
- package/.output/public/assets/loader-circle-CnCBxzHp.js +1 -0
- package/.output/public/assets/mutation-Csp7xUNh.js +1 -0
- package/.output/public/assets/preload-helper-B-cOmpLH.js +1 -0
- package/.output/public/assets/refresh-cw-FF1NtzlQ.js +1 -0
- package/.output/public/assets/routes-CoN9XHP_.js +2 -0
- package/.output/public/assets/routes-DT1jB0Zi.js +1 -0
- package/.output/public/assets/sidebar-D8mJRF15.js +3 -0
- package/.output/public/assets/styles-Bwt7v6U5.css +2 -0
- package/.output/public/assets/table-WBgfvgXg.js +1 -0
- package/.output/public/assets/useCompositeListItem-CloBmDwn.js +1 -0
- package/.output/public/assets/useMutation-DO8cvsTx.js +1 -0
- package/.output/public/assets/useOpenInteractionType-ReGr9GzJ.js +1 -0
- package/.output/public/assets/valueToPercent-BvPAi4bP.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-B7ioJhtE.mjs → __23tanstack-start-server-fn-resolver-DMRD4e4f.mjs} +51 -47
- package/.output/server/_libs/@base-ui/react+[...].mjs +7044 -3622
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +3803 -4023
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +141 -98
- 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 +46 -32
- package/.output/server/_libs/next-themes.mjs +2 -2
- package/.output/server/_libs/react-redux+[...].mjs +205 -0
- package/.output/server/_libs/recharts+[...].mjs +14350 -0
- package/.output/server/_libs/sonner.mjs +2 -2
- package/.output/server/_libs/tanstack__history.mjs +68 -41
- package/.output/server/_libs/tanstack__query-core.mjs +1618 -309
- package/.output/server/_libs/tanstack__react-query.mjs +262 -22
- package/.output/server/_libs/verkit.mjs +99 -1
- package/.output/server/_runtime.mjs +10 -1
- package/.output/server/_ssr/ConsoleFeatureUnavailable-Du7jNPNS.mjs +58 -0
- package/.output/server/_ssr/{HashValueDisplay-DwpGLfrl.mjs → HashValueDisplay-GQvFkXoi.mjs} +3 -3
- package/.output/server/_ssr/InsightsInfo-Do7QSaFR.mjs +37 -0
- package/.output/server/_ssr/InsightsPageHeader-DSUWUWRc.mjs +154 -0
- package/.output/server/_ssr/NotFoundPage-DsF4Vrhg.mjs +37 -0
- package/.output/server/_ssr/api-BEiVs0H7.mjs +203 -0
- package/.output/server/_ssr/api-keys-BrvBWGRf.mjs +5 -0
- package/.output/server/_ssr/{api-keys-CZeTPQys.mjs → api-keys-K5v32nf7.mjs} +49 -9
- package/.output/server/_ssr/api-keys-rpc-B96bBllm.mjs +52 -0
- package/.output/server/_ssr/api-rpc-DcUe280B.mjs +296 -0
- package/.output/server/_ssr/{auth-rpc-DUaeOWKK.mjs → auth-rpc-C68W56DP.mjs} +6 -6
- package/.output/server/_ssr/auth.server-DM1J6NwR.mjs +5712 -0
- package/.output/server/_ssr/bundleActivity-CpuY9CTP.mjs +19 -0
- package/.output/server/_ssr/card-CPAEKx0w.mjs +49 -0
- package/.output/server/_ssr/config-nsIcsHh8.mjs +15 -0
- package/.output/server/_ssr/config.server-DDCZk3Sq.mjs +36 -0
- package/.output/server/_ssr/console-access-Da-2Qd7q.mjs +17 -0
- package/.output/server/_ssr/console-features-Dzu2iUGD.mjs +55 -0
- package/.output/server/_ssr/console-features-api-xAsSgFa_.mjs +43 -0
- package/.output/server/_ssr/console-features-rpc-qARGpB24.mjs +19 -0
- package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-BdBf_ezN.mjs} +67 -56
- package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-B_y2lrwA.mjs} +2 -2
- package/.output/server/_ssr/{databaseJsonValue-d6I3nAS4.mjs → databaseJsonValue-Bhxciy7Z.mjs} +28 -5
- package/.output/server/_ssr/databaseRows-DwMAjaF8.mjs +74 -0
- package/.output/server/_ssr/{dialog-DS-nw-pA.mjs → dialog-q__BJ7mQ.mjs} +2 -2
- package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-Cxo9ghYv.mjs} +140 -6
- package/.output/server/_ssr/{downloadBundle-CNnYxYO2.mjs → downloadBundle-BW9I-pMQ.mjs} +10 -10
- package/.output/server/_ssr/empty-DcBTAooP.mjs +49 -0
- package/.output/server/_ssr/{empty-plugin-adapters-B5QvGpEl.mjs → empty-plugin-adapters-CYdinE-i.mjs} +1 -1
- package/.output/server/_ssr/{table-CnZmon_Z.mjs → field-QCDBVpXA.mjs} +63 -51
- package/.output/server/_ssr/getBundleChildren-DIAGCF4a.mjs +22 -0
- package/.output/server/_ssr/{input-group-BpsnmvZw.mjs → input-group-hCk2nUoU.mjs} +2 -2
- package/.output/server/_ssr/insights-BfBO0RFr.mjs +1238 -0
- package/.output/server/_ssr/insights-DsAU3-TB.mjs +14 -0
- package/.output/server/_ssr/insights-RIfg447W.mjs +5 -0
- package/.output/server/_ssr/insights-api-CDn-QQHU.mjs +105 -0
- package/.output/server/_ssr/insights-failures-BBGMhuUr.mjs +44 -0
- package/.output/server/_ssr/insights-failures-rpc-rA2dctK2.mjs +21 -0
- package/.output/server/_ssr/insights-recovery-Dpk6Mfb9.mjs +28 -0
- package/.output/server/_ssr/insights-recovery-rpc-BCaF-xSd.mjs +46 -0
- package/.output/server/_ssr/insights-recovery-rpc-CcgYyUHk.mjs +20 -0
- package/.output/server/_ssr/{insights-rpc-38DujK0G.mjs → insights-rpc-keycmwzw.mjs} +22 -14
- package/.output/server/_ssr/insights-search-BRg5VsNe.mjs +25 -0
- package/.output/server/_ssr/insights-usage-cbw9n2Fq.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-BKgV1QDf.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-D-JYachy.mjs +41 -0
- package/.output/server/_ssr/insightsRecovery-B7oMc8d8.mjs +45 -0
- package/.output/server/_ssr/insightsUsage-Oa7kk5ek.mjs +56 -0
- package/.output/server/_ssr/insights_.distribution-BIqOqRW0.mjs +335 -0
- package/.output/server/_ssr/insights_.distribution-CuUrDa7P.mjs +5 -0
- package/.output/server/_ssr/insights_.distribution-RT_6x_ud.mjs +14 -0
- package/.output/server/_ssr/{installations-DiVKEF5T.mjs → installations-BO5CjX2z.mjs} +517 -54
- package/.output/server/_ssr/installations-BjaHiIfh.mjs +5 -0
- package/.output/server/_ssr/installations-Dt5luA-N.mjs +69 -0
- package/.output/server/_ssr/listReleases-BitHzOYB.mjs +79 -0
- package/.output/server/_ssr/releaseManagement-B3e7I8J9.mjs +11 -0
- package/.output/server/_ssr/{router-B9wG_9f8.mjs → router-DfVAixxe.mjs} +135 -139
- package/.output/server/_ssr/{routes-D7Yh_jfj.mjs → routes-C6LstNp8.mjs} +176 -455
- package/.output/server/_ssr/routes-Q3Uhmwwz.mjs +292 -0
- package/.output/server/_ssr/runtime.server-fL0o6I2b.mjs +1459 -0
- package/.output/server/_ssr/schema-BKY9SqaY.mjs +25 -0
- package/.output/server/_ssr/select-CUlInmjk.mjs +107 -0
- package/.output/server/_ssr/server-C43wq9ft.mjs +8330 -0
- package/.output/server/_ssr/{createSsrRpc-DjWNJ0uc.mjs → sidebar-DKbx2ach.mjs} +117 -63
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/start-BXUOv_n8.mjs +4 -0
- package/.output/server/_ssr/table-NGWV8B-S.mjs +53 -0
- package/.output/server/_ssr/updateFailures-Jwe2Baab.mjs +24 -0
- package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-C8bwiZr8.mjs} +2 -2
- package/.output/server/_tanstack-start-manifest_v-WQ5qGn8n.mjs +124 -0
- package/.output/server/index.mjs +267 -162
- package/LICENSE +13 -14
- package/README.md +82 -72
- package/lib/index.d.mts +23 -11
- package/lib/vite-internal.mjs +13 -3
- package/lib/vite.d.mts +2 -0
- package/package.json +14 -14
- package/src/components/AppSidebar.tsx +100 -71
- package/src/components/ConsoleAccessPage.tsx +5 -1
- package/src/components/ConsoleFeatureUnavailable.tsx +80 -0
- package/src/components/NotFoundPage.tsx +7 -7
- package/src/components/features/FeatureSlots.tsx +99 -0
- package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
- package/src/components/features/bundles/BundleMetadata.tsx +8 -5
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +1 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +2 -5
- package/src/components/features/insights/AppUsage.tsx +370 -0
- package/src/components/features/insights/EstimatedCount.tsx +18 -0
- package/src/components/features/insights/EventDetails.tsx +117 -37
- package/src/components/features/insights/EventHistoryCard.tsx +112 -26
- package/src/components/features/insights/EventHistoryList.tsx +2 -2
- package/src/components/features/insights/InsightsControls.tsx +265 -102
- package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
- package/src/components/features/insights/InsightsInfo.tsx +48 -0
- package/src/components/features/insights/InsightsOverview.tsx +176 -173
- package/src/components/features/insights/InsightsPageHeader.tsx +35 -20
- package/src/components/features/insights/InsightsPeriodSelector.tsx +89 -0
- package/src/components/features/insights/InstallationHistoryCard.tsx +52 -10
- package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
- package/src/components/features/insights/ReleaseActivity.tsx +188 -0
- package/src/components/features/insights/ReportingDevicesSummary.tsx +65 -0
- package/src/components/features/insights/UpdateFailures.tsx +319 -0
- package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +30 -7
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/empty.tsx +101 -0
- package/src/components/ui/scroll-area.tsx +52 -0
- package/src/components/ui/sidebar.tsx +22 -29
- package/src/components/ui/tabs.tsx +81 -0
- package/src/index.ts +26 -19
- package/src/lib/api-keys-api.ts +0 -28
- package/src/lib/api-keys-rpc.ts +27 -38
- package/src/lib/api-rpc.ts +189 -266
- package/src/lib/api.ts +19 -102
- package/src/lib/bundle-activity.ts +31 -0
- package/src/lib/console-access.ts +20 -0
- package/src/lib/console-features-api.ts +68 -0
- package/src/lib/console-features-rpc.ts +13 -0
- package/src/lib/console-features.ts +91 -0
- package/src/lib/insights-api.ts +37 -1
- package/src/lib/insights-failures-rpc.ts +21 -0
- package/src/lib/insights-failures.ts +129 -0
- package/src/lib/insights-recovery-rpc.ts +51 -0
- package/src/lib/insights-recovery.ts +68 -0
- package/src/lib/insights-retention.ts +21 -0
- package/src/lib/insights-rpc.ts +30 -12
- package/src/lib/insights-search.ts +58 -0
- package/src/lib/insights-usage-rpc.ts +29 -0
- package/src/lib/insights-usage.ts +74 -0
- package/src/lib/insights-view.ts +38 -2
- package/src/lib/scroll-restoration.ts +21 -0
- package/src/lib/server/adminInsights.ts +124 -0
- package/src/lib/server/auth.server.ts +13 -5
- package/src/lib/server/bundleActivity.ts +37 -0
- package/src/lib/server/config.server.ts +21 -74
- package/src/lib/server/console-feature-apis.ts +59 -0
- package/src/lib/server/console-runtime.server.ts +82 -38
- package/src/lib/server/downloadBundle.ts +16 -15
- package/src/lib/server/getBundleChildren.ts +31 -122
- package/src/lib/server/insightsRecovery.ts +55 -0
- package/src/lib/server/insightsUsage.ts +63 -0
- package/src/lib/server/listReleases.ts +109 -44
- package/src/lib/server/releaseReachability.ts +8 -7
- package/src/lib/server/runtime.server.ts +120 -31
- package/src/lib/server/updateFailures.ts +31 -0
- package/src/routeTree.gen.ts +44 -44
- package/src/router.tsx +3 -2
- package/src/routes/-installations-search.ts +32 -8
- package/src/routes/-releases-search.ts +76 -29
- package/src/routes/__root.tsx +10 -4
- package/src/routes/api/bundles/$bundleId/download.ts +2 -5
- package/src/routes/api-keys.tsx +5 -2
- package/src/routes/index.tsx +167 -104
- package/src/routes/insights.tsx +100 -59
- package/src/routes/insights_.distribution.tsx +398 -0
- package/src/routes/installations.tsx +98 -41
- package/src/vite-internal.ts +15 -3
- package/src/vite.ts +2 -0
- package/.output/public/assets/HashValueDisplay-CB0Eskit.js +0 -1
- package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +0 -1
- package/.output/public/assets/api-keys-BzKocqRy.js +0 -1
- package/.output/public/assets/api-keys-api-BHcODB7q.js +0 -1
- package/.output/public/assets/card-Dhr_eFYj.js +0 -1
- package/.output/public/assets/chart-no-axes-combined-Dy4WJv2U.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/dist-C_NydL0e.js +0 -1
- package/.output/public/assets/index-DdAz-CXv.js +0 -10
- package/.output/public/assets/input-group-cSOG4wh_.js +0 -1
- package/.output/public/assets/insights-C0PBSZ-n.js +0 -1
- package/.output/public/assets/installations-CE33wgbY.js +0 -2
- package/.output/public/assets/installations-CStZja8x.js +0 -1
- package/.output/public/assets/lazyRouteComponent-Ccp3bwBY.js +0 -1
- package/.output/public/assets/link-CI8idAUi.js +0 -1
- package/.output/public/assets/loader-circle-BoxLrsOu.js +0 -1
- package/.output/public/assets/preload-helper-CQ36nxok.js +0 -1
- package/.output/public/assets/refresh-cw-Bqc72UZG.js +0 -1
- package/.output/public/assets/routes-DGVXdzpw.js +0 -2
- package/.output/public/assets/routes-DTlwOr8I.js +0 -1
- package/.output/public/assets/shield-check-uK3MHWJZ.js +0 -1
- package/.output/public/assets/signing-CMf4aqDO.js +0 -1
- package/.output/public/assets/styles-BCvbtKsm.css +0 -2
- package/.output/public/assets/table-2vcV89QB.js +0 -1
- package/.output/public/assets/useCompositeListItem-CHLITE_4.js +0 -1
- package/.output/public/assets/x-DCd0j8c6.js +0 -1
- package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +0 -484
- package/.output/server/_ssr/api-keys-api-BUPQVSpk.mjs +0 -60
- package/.output/server/_ssr/api-keys-rpc-Cs7tS5_j.mjs +0 -136
- package/.output/server/_ssr/api-rpc-tAupfGQm.mjs +0 -1399
- package/.output/server/_ssr/auth.server-DW71WzsD.mjs +0 -47
- package/.output/server/_ssr/bundle-signing-rpc-BhnBw0-d.mjs +0 -16
- package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +0 -12
- package/.output/server/_ssr/card-BRiPmi0C.mjs +0 -108
- package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
- package/.output/server/_ssr/config.server-afDuAwaG.mjs +0 -368
- package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
- package/.output/server/_ssr/deleteBundle-BTGwBgzx.mjs +0 -66
- package/.output/server/_ssr/getBundleChildren-C0vh4ZvE.mjs +0 -50
- package/.output/server/_ssr/insights-BdS364Xu.mjs +0 -460
- package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +0 -303
- package/.output/server/_ssr/installations-CtA59MQG.mjs +0 -29
- package/.output/server/_ssr/routes-CKrrS2q2.mjs +0 -37
- package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +0 -438
- package/.output/server/_ssr/server-D_C2rMzf.mjs +0 -7468
- package/.output/server/_ssr/signing-Dz1WkZOf.mjs +0 -133
- package/.output/server/_ssr/start-DpViQGnt.mjs +0 -4
- package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +0 -97
- package/src/components/features/insights/InsightsBundleReports.tsx +0 -51
- package/src/components/features/signing/BundleSigningPage.tsx +0 -139
- package/src/lib/bundle-signing-api.ts +0 -14
- package/src/lib/bundle-signing-rpc.ts +0 -16
- package/src/lib/server/bundle-signing.server.ts +0 -23
- package/src/lib/server/deleteBundle.ts +0 -145
- package/src/routes/signing.tsx +0 -37
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { r as isConsoleFeatureUnavailableError } from "./console-features-Dzu2iUGD.mjs";
|
|
2
|
+
import { E as TabsRoot, T as TabsTab, pt as require_jsx_runtime, w as TabsList$1 } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
+
import { I as ChartNoAxesCombined, S as Info, b as List, n as TriangleAlert } from "../_libs/lucide-react.mjs";
|
|
4
|
+
import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
|
|
5
|
+
import { D as buttonVariants, O as cn, x as SidebarTrigger } from "./sidebar-DKbx2ach.mjs";
|
|
6
|
+
import { h as Link } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
7
|
+
import { i as useConsoleFeature } from "./console-features-api-xAsSgFa_.mjs";
|
|
8
|
+
import { i as AlertTitle, r as AlertDescription, t as Alert } from "./field-QCDBVpXA.mjs";
|
|
9
|
+
import { n as usageMetrics } from "./insights-usage-cbw9n2Fq.mjs";
|
|
10
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/InsightsPageHeader-DSUWUWRc.js
|
|
11
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
12
|
+
function InsightsErrorAlert({ error, fallbackTitle }) {
|
|
13
|
+
if (isConsoleFeatureUnavailableError(error)) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, { children: [
|
|
14
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, { "aria-hidden": "true" }),
|
|
15
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Insights not installed" }),
|
|
16
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: error.message })
|
|
17
|
+
] });
|
|
18
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
|
|
19
|
+
variant: "destructive",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, { "aria-hidden": "true" }),
|
|
22
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: fallbackTitle }),
|
|
23
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "Refresh to try again. If this keeps happening, check your Insights provider connection." })
|
|
24
|
+
]
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function Tabs$1({ className, orientation = "horizontal", ...props }) {
|
|
28
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRoot, {
|
|
29
|
+
orientation,
|
|
30
|
+
"data-slot": "tabs",
|
|
31
|
+
"data-orientation": orientation,
|
|
32
|
+
className: cn("group/tabs flex gap-2 data-horizontal:flex-col", className),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
var tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
|
|
37
|
+
variants: { variant: {
|
|
38
|
+
default: "bg-muted",
|
|
39
|
+
line: "gap-1 bg-transparent"
|
|
40
|
+
} },
|
|
41
|
+
defaultVariants: { variant: "default" }
|
|
42
|
+
});
|
|
43
|
+
function TabsList({ className, variant = "default", ...props }) {
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsList$1, {
|
|
45
|
+
"data-slot": "tabs-list",
|
|
46
|
+
"data-variant": variant,
|
|
47
|
+
className: cn(tabsListVariants({ variant }), className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function TabsTrigger({ className, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsTab, {
|
|
53
|
+
"data-slot": "tabs-trigger",
|
|
54
|
+
className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
|
|
55
|
+
...props
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/** A segmented control over fixed periods, each shown by its short value. */
|
|
59
|
+
function PeriodSelector({ label, onPeriodChange, period, periods }) {
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tabs$1, {
|
|
61
|
+
value: period,
|
|
62
|
+
onValueChange: (value) => {
|
|
63
|
+
const next = periods.find((item) => item.value === value);
|
|
64
|
+
if (next) onPeriodChange(next.value);
|
|
65
|
+
},
|
|
66
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsList, {
|
|
67
|
+
"aria-label": label,
|
|
68
|
+
className: "min-h-11 sm:min-h-9",
|
|
69
|
+
children: periods.map(({ value, name }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsTrigger, {
|
|
70
|
+
value,
|
|
71
|
+
"aria-label": name,
|
|
72
|
+
className: "min-w-12 px-3",
|
|
73
|
+
children: value
|
|
74
|
+
}, value))
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
var reportingPeriods = [
|
|
79
|
+
"24h",
|
|
80
|
+
"7d",
|
|
81
|
+
"30d"
|
|
82
|
+
].map((value) => ({
|
|
83
|
+
value,
|
|
84
|
+
name: usageMetrics[value].period
|
|
85
|
+
}));
|
|
86
|
+
var usagePeriods = Object.keys(usageMetrics).map((value) => ({
|
|
87
|
+
value,
|
|
88
|
+
name: usageMetrics[value].period
|
|
89
|
+
}));
|
|
90
|
+
function InsightsPeriodSelector({ window, onWindowChange }) {
|
|
91
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PeriodSelector, {
|
|
92
|
+
label: "Reporting period",
|
|
93
|
+
onPeriodChange: onWindowChange,
|
|
94
|
+
period: window,
|
|
95
|
+
periods: reportingPeriods
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/** App usage's periods: the reporting periods, and 12 months where daily totals cover it. */
|
|
99
|
+
function UsagePeriodSelector({ window, onWindowChange, twelveMonths = true }) {
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PeriodSelector, {
|
|
101
|
+
label: "Reporting period",
|
|
102
|
+
onPeriodChange: onWindowChange,
|
|
103
|
+
period: window,
|
|
104
|
+
periods: usagePeriods.filter(({ value }) => twelveMonths || value !== "12m")
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function InsightsPageHeader({ view, overviewSearch }) {
|
|
108
|
+
const overview = useConsoleFeature("insightsAnalytics");
|
|
109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
|
|
110
|
+
className: "sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-3 border-b bg-background px-3 py-3 sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm",
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarTrigger, { className: "-ml-1 size-11 lg:size-7" }),
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
114
|
+
className: "flex items-center gap-1.5",
|
|
115
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartNoAxesCombined, {
|
|
116
|
+
"aria-hidden": "true",
|
|
117
|
+
className: "size-3.5 text-muted-foreground"
|
|
118
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
|
|
119
|
+
className: "text-sm font-medium",
|
|
120
|
+
children: "Insights"
|
|
121
|
+
})]
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("nav", {
|
|
124
|
+
"aria-label": "Insights views",
|
|
125
|
+
className: "ml-auto flex gap-2",
|
|
126
|
+
children: [overview ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
127
|
+
"aria-current": view === "overview" ? "page" : void 0,
|
|
128
|
+
className: cn(buttonVariants({
|
|
129
|
+
className: "h-11 px-3 lg:h-8 lg:px-2.5",
|
|
130
|
+
size: "lg",
|
|
131
|
+
variant: view === "overview" ? "secondary" : "ghost"
|
|
132
|
+
})),
|
|
133
|
+
search: overviewSearch,
|
|
134
|
+
to: "/insights",
|
|
135
|
+
children: "Overview"
|
|
136
|
+
}) : null, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
|
|
137
|
+
"aria-current": view === "events" ? "page" : void 0,
|
|
138
|
+
className: cn(buttonVariants({
|
|
139
|
+
className: "h-11 px-3 lg:h-8 lg:px-2.5",
|
|
140
|
+
size: "lg",
|
|
141
|
+
variant: view === "events" ? "secondary" : "ghost"
|
|
142
|
+
})),
|
|
143
|
+
to: "/installations",
|
|
144
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(List, {
|
|
145
|
+
"aria-hidden": "true",
|
|
146
|
+
"data-icon": "inline-start"
|
|
147
|
+
}), "All events"]
|
|
148
|
+
})]
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
//#endregion
|
|
154
|
+
export { UsagePeriodSelector as a, PeriodSelector as i, InsightsPageHeader as n, InsightsPeriodSelector as r, InsightsErrorAlert as t };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { pt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
+
import { D as buttonVariants } from "./sidebar-DKbx2ach.mjs";
|
|
3
|
+
import { h as Link } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/NotFoundPage-DsF4Vrhg.js
|
|
5
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
6
|
+
var homeSearch = {
|
|
7
|
+
afterReleaseId: void 0,
|
|
8
|
+
beforeReleaseId: void 0,
|
|
9
|
+
bundleId: void 0,
|
|
10
|
+
channelId: void 0,
|
|
11
|
+
enabled: void 0,
|
|
12
|
+
platform: void 0,
|
|
13
|
+
releaseId: void 0,
|
|
14
|
+
scopeKey: void 0
|
|
15
|
+
};
|
|
16
|
+
function NotFoundPage() {
|
|
17
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
18
|
+
className: "flex min-h-svh flex-1 items-center justify-center px-6 py-10",
|
|
19
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
20
|
+
className: "flex max-w-md flex-col items-center text-center",
|
|
21
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
|
|
22
|
+
className: "text-2xl font-semibold tracking-tight text-foreground",
|
|
23
|
+
children: "Page not found"
|
|
24
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
25
|
+
className: buttonVariants({
|
|
26
|
+
className: "mt-6",
|
|
27
|
+
size: "lg"
|
|
28
|
+
}),
|
|
29
|
+
to: "/",
|
|
30
|
+
search: homeSearch,
|
|
31
|
+
children: "Go to home"
|
|
32
|
+
})]
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { NotFoundPage as t };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { u as createServerFn } from "./createMiddleware-BdBf_ezN.mjs";
|
|
2
|
+
import { k as createSsrRpc } from "./sidebar-DKbx2ach.mjs";
|
|
3
|
+
import { t as consoleAccess } from "./console-access-Da-2Qd7q.mjs";
|
|
4
|
+
import { a as useQueryClient, r as useQuery, t as useMutation } from "../_libs/tanstack__react-query.mjs";
|
|
5
|
+
import { n as readReleaseFilter } from "./listReleases-BitHzOYB.mjs";
|
|
6
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/api-BEiVs0H7.js
|
|
7
|
+
var MAX_PAGE_LIMIT = 100;
|
|
8
|
+
var pageLimit = (limit) => {
|
|
9
|
+
const value = limit ?? 20;
|
|
10
|
+
if (!Number.isSafeInteger(value) || value < 1 || value > MAX_PAGE_LIMIT) throw new Error(`limit must be between 1 and ${MAX_PAGE_LIMIT}.`);
|
|
11
|
+
return value;
|
|
12
|
+
};
|
|
13
|
+
var getReleases = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => ({
|
|
14
|
+
filter: readReleaseFilter(input?.filter),
|
|
15
|
+
...input?.afterReleaseId === void 0 ? {} : { afterReleaseId: input.afterReleaseId },
|
|
16
|
+
...input?.beforeReleaseId === void 0 ? {} : { beforeReleaseId: input.beforeReleaseId },
|
|
17
|
+
limit: pageLimit(input?.limit)
|
|
18
|
+
})).handler(createSsrRpc("206547cb1526f961070a989818ca7b9e34f6b2b0e4ab851698c3807fe9fb5e0c"));
|
|
19
|
+
var getRelease = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => input).handler(createSsrRpc("a6f23116eeaf76166d405e28a95213123025613c6603030894e519015bf48032"));
|
|
20
|
+
var updateRelease = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => input).handler(createSsrRpc("7ea0186f19f9f2bc2ca4b26e3c59636891cf046957f84287b6783f8d88bd8cb7"));
|
|
21
|
+
var preflightRelease = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => input).handler(createSsrRpc("b46c95dba95a6a3e8fa5c9d100e3622fa5ae7af4f38e10fb1ed2fa48289a3a8f"));
|
|
22
|
+
var deleteRelease = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => input).handler(createSsrRpc("d5b58722ce514e3b63a377f736b4823c2011782495442ae4870ed547e392c70b"));
|
|
23
|
+
var promoteRelease = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => input).handler(createSsrRpc("956539a300d79a7efa191c1cc2d529d62fc4bfd940442548fdbc1404e0d53078"));
|
|
24
|
+
var getReleaseCatalogDiagnostics = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => input).handler(createSsrRpc("e8c24b7247936f045a145ffd5c177fd0e3df3b52769d67dfbd8d1de491d66396"));
|
|
25
|
+
var getConfig = createServerFn().middleware([consoleAccess]).handler(createSsrRpc("51a34c05479a893c7d320bd4cd1604427289d667698c48b9f30a01aabf8a5e68"));
|
|
26
|
+
var getChannels = createServerFn().middleware([consoleAccess]).handler(createSsrRpc("79ada05964de8f2123bfcd62b10097d59bf8fd689ef5c7161031e5871d8396c5"));
|
|
27
|
+
var createChannel = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => {
|
|
28
|
+
const name = typeof input?.name === "string" ? input.name.trim() : "";
|
|
29
|
+
if (name.length === 0) throw new Error("Channel name is required.");
|
|
30
|
+
return { name };
|
|
31
|
+
}).handler(createSsrRpc("2b9b8d1f49f79a511589617d8d4bfc6094a3acf5264f33651b9569ba66d3f321"));
|
|
32
|
+
var deleteChannel = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => input).handler(createSsrRpc("52756dde414919a906bfe83d1ab6d29910c63bcafdb47653d6f1df562d958920"));
|
|
33
|
+
createServerFn().middleware([consoleAccess]).handler(createSsrRpc("f8bdca3d0579adb812d6404f55d9261a89cdb025e920b1fcad82883646a5fe9e"));
|
|
34
|
+
createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => {
|
|
35
|
+
if (input?.after !== void 0 && input.before !== void 0) throw new Error("Page by after or before, not both.");
|
|
36
|
+
return {
|
|
37
|
+
...input?.platform === void 0 ? {} : { platform: input.platform },
|
|
38
|
+
...input?.after === void 0 ? {} : { after: input.after },
|
|
39
|
+
...input?.before === void 0 ? {} : { before: input.before },
|
|
40
|
+
limit: pageLimit(input?.limit)
|
|
41
|
+
};
|
|
42
|
+
}).handler(createSsrRpc("00ccacb4a0212c83ec29f4d11719046ad91ea8291cfc557d514dbf00d3bd7f5f"));
|
|
43
|
+
var getBundle = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => input).handler(createSsrRpc("1bd85c2a50e24785cb6abb023a247a9f048f37ddfa85cbb1c57e579563bad013"));
|
|
44
|
+
var getBundleChildren = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => input).handler(createSsrRpc("4370f1bf70b91f1168d85379d3008449a1bedb915e9878ca4ef89d5f3a80fa7f"));
|
|
45
|
+
var getBundleChildCounts = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => {
|
|
46
|
+
if (!Array.isArray(input?.bundleIds) || input.bundleIds.length > 100) throw new Error("Choose up to 100 bundles.");
|
|
47
|
+
return input;
|
|
48
|
+
}).handler(createSsrRpc("4ca367070b00f58179a572f0bb8196a4ccdd3881e9b1dbfe33deee0cb6e1f549"));
|
|
49
|
+
var bundleListQueryKey = ["bundles"];
|
|
50
|
+
var releaseListQueryKey = ["releases"];
|
|
51
|
+
var queryKeys = {
|
|
52
|
+
config: ["config"],
|
|
53
|
+
channels: ["channels"],
|
|
54
|
+
configLoaded: ["config-loaded"],
|
|
55
|
+
bundles: {
|
|
56
|
+
all: bundleListQueryKey,
|
|
57
|
+
list: (filters) => [...bundleListQueryKey, filters ?? {}]
|
|
58
|
+
},
|
|
59
|
+
releases: {
|
|
60
|
+
all: releaseListQueryKey,
|
|
61
|
+
list: (filters) => [...releaseListQueryKey, filters ?? {}]
|
|
62
|
+
},
|
|
63
|
+
release: (releaseId) => ["release", releaseId],
|
|
64
|
+
releaseCatalog: (scopeKey) => ["release-catalog", scopeKey],
|
|
65
|
+
bundleChildren: {
|
|
66
|
+
all: ["bundle-children"],
|
|
67
|
+
list: (baseBundleId) => ["bundle-children", baseBundleId],
|
|
68
|
+
counts: (bundleIds) => [
|
|
69
|
+
"bundle-children",
|
|
70
|
+
"counts",
|
|
71
|
+
...bundleIds
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
bundle: (bundleId) => ["bundle", bundleId]
|
|
75
|
+
};
|
|
76
|
+
function useConfigQuery() {
|
|
77
|
+
return useQuery({
|
|
78
|
+
queryKey: queryKeys.config,
|
|
79
|
+
queryFn: () => getConfig(),
|
|
80
|
+
staleTime: Infinity
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function useChannelsQuery() {
|
|
84
|
+
return useQuery({
|
|
85
|
+
queryKey: queryKeys.channels,
|
|
86
|
+
queryFn: () => getChannels(),
|
|
87
|
+
staleTime: Infinity
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function useReleasesQuery(filters) {
|
|
91
|
+
return useQuery({
|
|
92
|
+
queryKey: queryKeys.releases.list(filters),
|
|
93
|
+
queryFn: () => getReleases({ data: filters }),
|
|
94
|
+
placeholderData: (previousData) => previousData
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function useReleaseQuery(releaseId) {
|
|
98
|
+
return useQuery({
|
|
99
|
+
enabled: releaseId.length > 0,
|
|
100
|
+
queryFn: () => getRelease({ data: { releaseId } }),
|
|
101
|
+
queryKey: queryKeys.release(releaseId)
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function useReleaseCatalogDiagnosticsQuery(scopeKey) {
|
|
105
|
+
return useQuery({
|
|
106
|
+
enabled: scopeKey.length > 0,
|
|
107
|
+
queryFn: () => getReleaseCatalogDiagnostics({ data: { scopeKey } }),
|
|
108
|
+
queryKey: queryKeys.releaseCatalog(scopeKey)
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function useBundleQuery(bundleId) {
|
|
112
|
+
return useQuery({
|
|
113
|
+
queryKey: queryKeys.bundle(bundleId),
|
|
114
|
+
queryFn: () => getBundle({ data: { bundleId } }),
|
|
115
|
+
staleTime: Infinity,
|
|
116
|
+
enabled: !!bundleId
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function useBundleChildrenQuery(baseBundleId) {
|
|
120
|
+
return useQuery({
|
|
121
|
+
queryKey: queryKeys.bundleChildren.list(baseBundleId),
|
|
122
|
+
queryFn: () => getBundleChildren({ data: { baseBundleId } }),
|
|
123
|
+
staleTime: Infinity,
|
|
124
|
+
enabled: !!baseBundleId
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function useBundleChildCountsQuery(bundleIds) {
|
|
128
|
+
const normalizedBundleIds = [...bundleIds].sort((left, right) => left.localeCompare(right));
|
|
129
|
+
return useQuery({
|
|
130
|
+
queryKey: queryKeys.bundleChildren.counts(normalizedBundleIds),
|
|
131
|
+
queryFn: () => getBundleChildCounts({ data: { bundleIds: normalizedBundleIds } }),
|
|
132
|
+
staleTime: Infinity,
|
|
133
|
+
enabled: normalizedBundleIds.length > 0
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function useCreateChannelMutation() {
|
|
137
|
+
const queryClient = useQueryClient();
|
|
138
|
+
return useMutation({
|
|
139
|
+
mutationFn: (input) => createChannel({ data: input }).then((response) => response.data),
|
|
140
|
+
onSuccess: async () => {
|
|
141
|
+
await queryClient.invalidateQueries({ queryKey: queryKeys.channels });
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function useDeleteChannelMutation() {
|
|
146
|
+
const queryClient = useQueryClient();
|
|
147
|
+
return useMutation({
|
|
148
|
+
mutationFn: (input) => deleteChannel({ data: input }).then((response) => response.data),
|
|
149
|
+
onSettled: async () => {
|
|
150
|
+
await queryClient.invalidateQueries({ queryKey: queryKeys.channels });
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
function useUpdateReleaseMutation() {
|
|
155
|
+
const queryClient = useQueryClient();
|
|
156
|
+
return useMutation({
|
|
157
|
+
mutationFn: (input) => updateRelease({ data: input }),
|
|
158
|
+
onSuccess: async (_, input) => {
|
|
159
|
+
await Promise.all([
|
|
160
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.releases.all }),
|
|
161
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.release(input.releaseId) }),
|
|
162
|
+
queryClient.invalidateQueries({ queryKey: ["release-catalog"] }),
|
|
163
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.channels })
|
|
164
|
+
]);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function usePreflightReleaseMutation() {
|
|
169
|
+
return useMutation({ mutationFn: (input) => preflightRelease({ data: input }) });
|
|
170
|
+
}
|
|
171
|
+
function useDeleteReleaseMutation() {
|
|
172
|
+
const queryClient = useQueryClient();
|
|
173
|
+
return useMutation({
|
|
174
|
+
mutationFn: (input) => deleteRelease({ data: input }),
|
|
175
|
+
onSuccess: async (_, input) => {
|
|
176
|
+
queryClient.removeQueries({ queryKey: queryKeys.release(input.releaseId) });
|
|
177
|
+
await Promise.all([
|
|
178
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.releases.all }),
|
|
179
|
+
queryClient.invalidateQueries({ queryKey: ["release-catalog"] }),
|
|
180
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.channels }),
|
|
181
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.bundles.all }),
|
|
182
|
+
queryClient.invalidateQueries({ queryKey: ["bundle"] }),
|
|
183
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.bundleChildren.all })
|
|
184
|
+
]);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function usePromoteReleaseMutation() {
|
|
189
|
+
const queryClient = useQueryClient();
|
|
190
|
+
return useMutation({
|
|
191
|
+
mutationFn: (input) => promoteRelease({ data: input }),
|
|
192
|
+
onSuccess: async () => {
|
|
193
|
+
await Promise.all([
|
|
194
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.releases.all }),
|
|
195
|
+
queryClient.invalidateQueries({ queryKey: ["release"] }),
|
|
196
|
+
queryClient.invalidateQueries({ queryKey: ["release-catalog"] }),
|
|
197
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.channels })
|
|
198
|
+
]);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
//#endregion
|
|
203
|
+
export { useConfigQuery as a, useDeleteReleaseMutation as c, useReleaseCatalogDiagnosticsQuery as d, useReleaseQuery as f, useChannelsQuery as i, usePreflightReleaseMutation as l, useUpdateReleaseMutation as m, useBundleChildrenQuery as n, useCreateChannelMutation as o, useReleasesQuery as p, useBundleQuery as r, useDeleteChannelMutation as s, useBundleChildCountsQuery as t, usePromoteReleaseMutation as u };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { t as ConsoleFeatureUnavailable } from "./ConsoleFeatureUnavailable-Du7jNPNS.mjs";
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/api-keys-BrvBWGRf.js
|
|
3
|
+
var SplitNotFoundComponent = ConsoleFeatureUnavailable;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { SplitNotFoundComponent as notFoundComponent };
|
|
@@ -1,15 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import { a as
|
|
1
|
+
import { i as __toESM } from "../_runtime.mjs";
|
|
2
|
+
import { u as createServerFn } from "./createMiddleware-BdBf_ezN.mjs";
|
|
3
|
+
import { mt as require_react, pt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
4
|
+
import { D as Clipboard, F as Check, d as RefreshCw, f as Plus, n as TriangleAlert, s as ShieldOff, x as KeyRound, y as LoaderCircle } from "../_libs/lucide-react.mjs";
|
|
5
|
+
import { S as Skeleton, k as createSsrRpc, n as Input, t as Button$1, x as SidebarTrigger } from "./sidebar-DKbx2ach.mjs";
|
|
6
|
+
import { t as consoleAccess } from "./console-access-Da-2Qd7q.mjs";
|
|
7
|
+
import { a as useQueryClient, r as useQuery, t as useMutation } from "../_libs/tanstack__react-query.mjs";
|
|
8
|
+
import { a as CardHeader, n as CardContent, o as CardTitle, t as Card } from "./card-CPAEKx0w.mjs";
|
|
9
|
+
import { a as Badge, c as FieldError, i as AlertTitle, l as FieldGroup, n as AlertAction, o as Field, r as AlertDescription, s as FieldDescription, t as Alert, u as FieldLabel } from "./field-QCDBVpXA.mjs";
|
|
10
|
+
import { a as AlertDialogDescription, c as AlertDialogMedia, d as Dialog$1, f as DialogContent, g as DialogTitle, h as DialogHeader, i as AlertDialogContent, l as AlertDialogTitle, m as DialogFooter, n as AlertDialogAction, o as AlertDialogFooter, p as DialogDescription, r as AlertDialogCancel, s as AlertDialogHeader, t as AlertDialog$1, u as AlertDialogTrigger } from "./dialog-q__BJ7mQ.mjs";
|
|
11
|
+
import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell, t as Table } from "./table-NGWV8B-S.mjs";
|
|
9
12
|
import { n as toast } from "../_libs/sonner.mjs";
|
|
10
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/api-keys-
|
|
13
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/api-keys-K5v32nf7.js
|
|
11
14
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
12
15
|
var import_jsx_runtime = require_jsx_runtime();
|
|
16
|
+
var parseName = (input) => {
|
|
17
|
+
const name = typeof input === "object" && input !== null ? Reflect.get(input, "name") : void 0;
|
|
18
|
+
if (typeof name !== "string") throw new TypeError("API key name must be a string.");
|
|
19
|
+
return { name };
|
|
20
|
+
};
|
|
21
|
+
var parseId = (input) => {
|
|
22
|
+
const id = typeof input === "object" && input !== null ? Reflect.get(input, "id") : void 0;
|
|
23
|
+
if (typeof id !== "string" || !/^api-[A-Za-z0-9_-]{43}$/u.test(id)) throw new TypeError("Invalid API key id.");
|
|
24
|
+
return { id };
|
|
25
|
+
};
|
|
26
|
+
/** API key management, once the console's access check and the feature guard pass. */
|
|
27
|
+
var listApiKeysRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).handler(createSsrRpc("2c7f3cdb9bd3cab2c026a48abdc84c362db0362924a08679052a325640aec56b"));
|
|
28
|
+
var createApiKeyRpc = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator(parseName).handler(createSsrRpc("68a2d94ee016be64936401f5eba60ab08a47ff373e1cf9de48e4413336e6034b"));
|
|
29
|
+
var revokeApiKeyRpc = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator(parseId).handler(createSsrRpc("a1cb80b19ca72a64fb631ca28ebb9b6941db245983de082d5dd3203ec2eef795"));
|
|
30
|
+
var apiKeyQueryKeys = { list: ["api-keys", "list"] };
|
|
31
|
+
var useApiKeysQuery = () => useQuery({
|
|
32
|
+
queryKey: apiKeyQueryKeys.list,
|
|
33
|
+
queryFn: () => listApiKeysRpc()
|
|
34
|
+
});
|
|
35
|
+
var useCreateApiKeyMutation = () => {
|
|
36
|
+
const queryClient = useQueryClient();
|
|
37
|
+
return useMutation({
|
|
38
|
+
mutationFn: (name) => createApiKeyRpc({ data: { name } }),
|
|
39
|
+
onSuccess: async () => {
|
|
40
|
+
await queryClient.invalidateQueries({ queryKey: apiKeyQueryKeys.list });
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var useRevokeApiKeyMutation = () => {
|
|
45
|
+
const queryClient = useQueryClient();
|
|
46
|
+
return useMutation({
|
|
47
|
+
mutationFn: (id) => revokeApiKeyRpc({ data: { id } }),
|
|
48
|
+
onSuccess: async () => {
|
|
49
|
+
await queryClient.invalidateQueries({ queryKey: apiKeyQueryKeys.list });
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
};
|
|
13
53
|
var formatCreatedAt = (createdAt) => new Date(createdAt).toISOString().slice(0, 10);
|
|
14
54
|
function CreateApiKeyDialog() {
|
|
15
55
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { u as createServerFn } from "./createMiddleware-BdBf_ezN.mjs";
|
|
2
|
+
import { t as consoleAccess } from "./console-access-Da-2Qd7q.mjs";
|
|
3
|
+
import { t as createServerRpc } from "./createServerRpc-B_y2lrwA.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/api-keys-rpc-B96bBllm.js
|
|
5
|
+
var parseName = (input) => {
|
|
6
|
+
const name = typeof input === "object" && input !== null ? Reflect.get(input, "name") : void 0;
|
|
7
|
+
if (typeof name !== "string") throw new TypeError("API key name must be a string.");
|
|
8
|
+
return { name };
|
|
9
|
+
};
|
|
10
|
+
var parseId = (input) => {
|
|
11
|
+
const id = typeof input === "object" && input !== null ? Reflect.get(input, "id") : void 0;
|
|
12
|
+
if (typeof id !== "string" || !/^api-[A-Za-z0-9_-]{43}$/u.test(id)) throw new TypeError("Invalid API key id.");
|
|
13
|
+
return { id };
|
|
14
|
+
};
|
|
15
|
+
/** API key management, once the console's access check and the feature guard pass. */
|
|
16
|
+
var apiKeyManagement = async () => {
|
|
17
|
+
const [{ prepareConfig }, { requireFeature }] = await Promise.all([import("./config.server-DDCZk3Sq.mjs"), import("./runtime.server-fL0o6I2b.mjs")]);
|
|
18
|
+
const { runtime } = await prepareConfig();
|
|
19
|
+
return requireFeature(runtime, "apiKeys");
|
|
20
|
+
};
|
|
21
|
+
var listApiKeysRpc_createServerFn_handler = createServerRpc({
|
|
22
|
+
id: "2c7f3cdb9bd3cab2c026a48abdc84c362db0362924a08679052a325640aec56b",
|
|
23
|
+
name: "listApiKeysRpc",
|
|
24
|
+
filename: "src/lib/api-keys-rpc.ts"
|
|
25
|
+
}, (opts) => listApiKeysRpc.__executeServer(opts));
|
|
26
|
+
var listApiKeysRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).handler(listApiKeysRpc_createServerFn_handler, async () => {
|
|
27
|
+
return [...await (await apiKeyManagement()).list()].sort((left, right) => right.created_at_ms - left.created_at_ms);
|
|
28
|
+
});
|
|
29
|
+
var createApiKeyRpc_createServerFn_handler = createServerRpc({
|
|
30
|
+
id: "68a2d94ee016be64936401f5eba60ab08a47ff373e1cf9de48e4413336e6034b",
|
|
31
|
+
name: "createApiKeyRpc",
|
|
32
|
+
filename: "src/lib/api-keys-rpc.ts"
|
|
33
|
+
}, (opts) => createApiKeyRpc.__executeServer(opts));
|
|
34
|
+
var createApiKeyRpc = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator(parseName).handler(createApiKeyRpc_createServerFn_handler, async ({ data }) => {
|
|
35
|
+
const created = await (await apiKeyManagement()).create({ name: data.name });
|
|
36
|
+
return {
|
|
37
|
+
apiKey: created.apiKey,
|
|
38
|
+
record: created.record
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
var revokeApiKeyRpc_createServerFn_handler = createServerRpc({
|
|
42
|
+
id: "a1cb80b19ca72a64fb631ca28ebb9b6941db245983de082d5dd3203ec2eef795",
|
|
43
|
+
name: "revokeApiKeyRpc",
|
|
44
|
+
filename: "src/lib/api-keys-rpc.ts"
|
|
45
|
+
}, (opts) => revokeApiKeyRpc.__executeServer(opts));
|
|
46
|
+
var revokeApiKeyRpc = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator(parseId).handler(revokeApiKeyRpc_createServerFn_handler, async ({ data }) => {
|
|
47
|
+
const revoked = await (await apiKeyManagement()).revoke({ id: data.id });
|
|
48
|
+
if (revoked === null) throw new Error("API key not found.");
|
|
49
|
+
return revoked;
|
|
50
|
+
});
|
|
51
|
+
//#endregion
|
|
52
|
+
export { createApiKeyRpc_createServerFn_handler, listApiKeysRpc_createServerFn_handler, revokeApiKeyRpc_createServerFn_handler };
|