@hot-updater/console 0.36.7 → 1.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/AnalyticsCapabilityContext-BCke57-7.js +1 -0
- package/.output/public/assets/BundleActivityChart-CnsBe_1J.js +42 -0
- package/.output/public/assets/BundleIdDisplay-Dky75zLU.js +1 -0
- package/.output/public/assets/alert-C-1KvDW8.js +1 -0
- package/.output/public/assets/analytics-Bqz0c-BT.js +1 -0
- package/.output/public/assets/analytics-api-CJdrTLLO.js +1 -0
- package/.output/public/assets/api-B_Rh-uzC.js +1 -0
- package/.output/public/assets/api-keys-BurCFhzH.js +1 -0
- package/.output/public/assets/api-keys-api-BEDJdQg3.js +1 -0
- package/.output/public/assets/badge-Bf0fZ-Gx.js +1 -0
- package/.output/public/assets/chart-no-axes-combined-FaYMGmQS.js +1 -0
- package/.output/public/assets/createServerFn-gM2-LFBy.js +3 -0
- package/.output/public/assets/dialog-BS60BRr2.js +1 -0
- package/.output/public/assets/dist-DspNKfMj.js +1 -0
- package/.output/public/assets/download-O-yNBc9H.js +1 -0
- package/.output/public/assets/field-Buq148-A.js +1 -0
- package/.output/public/assets/index-kFhd2S78.js +10 -0
- package/.output/public/assets/installations-BrQ-od41.js +2 -0
- package/.output/public/assets/installations-CGlZ3ROz.js +1 -0
- package/.output/public/assets/lazyRouteComponent-rPzgA7S-.js +1 -0
- package/.output/public/assets/loader-circle-DCYF-wJl.js +1 -0
- package/.output/public/assets/preload-helper-TKOBYGYD.js +1 -0
- package/.output/public/assets/refresh-cw-n8XYbPPj.js +1 -0
- package/.output/public/assets/routes-CrdokJ80.js +1 -0
- package/.output/public/assets/routes-DcQnVajO.js +2 -0
- package/.output/public/assets/search-DLhbWw3W.js +1 -0
- package/.output/public/assets/shield-check-DE_hVuHu.js +1 -0
- package/.output/public/assets/signing-HRexfjsH.js +1 -0
- package/.output/public/assets/styles-eB4EtvFS.css +2 -0
- package/.output/public/assets/table-D8CLieHX.js +1 -0
- package/.output/public/assets/textarea-YJLTVAoq.js +1 -0
- package/.output/public/assets/useMutation-JsGVjQMY.js +1 -0
- package/.output/public/assets/useOpenInteractionType-4cRD5xO0.js +1 -0
- package/.output/server/__23tanstack-start-server-fn-resolver-DBP9TQ7K.mjs +146 -0
- package/.output/server/_libs/@base-ui/react+[...].mjs +16124 -0
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +41 -10
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +132 -0
- 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 +1134 -0
- package/.output/server/_libs/eventemitter3.mjs +236 -0
- package/.output/server/_libs/immer.mjs +532 -0
- package/.output/server/_libs/lucide-react.mjs +141 -13
- package/.output/server/_libs/next-themes.mjs +2 -2
- package/.output/server/_libs/react-redux+[...].mjs +205 -0
- package/.output/server/_libs/recharts+[...].mjs +14117 -0
- package/.output/server/_libs/sonner.mjs +2 -2
- package/.output/server/_libs/tanstack__query-core.mjs +114 -1
- package/.output/server/_libs/tanstack__react-query.mjs +3 -4
- package/.output/server/_runtime.mjs +10 -1
- package/.output/server/_ssr/AnalyticsCapabilityContext-ui4DX8GO.mjs +15 -0
- package/.output/server/_ssr/BundleActivityChart-BiB9ZORH.mjs +288 -0
- package/.output/server/_ssr/BundleIdDisplay-Czk6iR6p.mjs +13 -0
- package/.output/server/_ssr/alert-Dim3MGY5.mjs +86 -0
- package/.output/server/_ssr/analytics-DtMTn8fn.mjs +858 -0
- package/.output/server/_ssr/analytics-api-Cg1M5v_H.mjs +71 -0
- package/.output/server/_ssr/analytics-input-fRRRn0uA.mjs +96 -0
- package/.output/server/_ssr/analytics-rpc-DY5uXvHT.mjs +155 -0
- package/.output/server/_ssr/api-BTSv1tZb.mjs +282 -0
- package/.output/server/_ssr/api-keys-BnM_o2nS.mjs +300 -0
- package/.output/server/_ssr/api-keys-api-CIywsSF5.mjs +60 -0
- package/.output/server/_ssr/api-keys-rpc-BSp1wkIV.mjs +136 -0
- package/.output/server/_ssr/api-rpc-cG5wd_tO.mjs +1468 -0
- package/.output/server/_ssr/auth-BF8mbAgF.mjs +21 -0
- package/.output/server/_ssr/auth-rpc-BrJ6obHJ.mjs +24 -0
- package/.output/server/_ssr/auth.server-DwKoZoQM.mjs +50 -0
- package/.output/server/_ssr/badge-DCxbEeof.mjs +26 -0
- package/.output/server/_ssr/bundle-signing-rpc-COoQhW8E.mjs +16 -0
- package/.output/server/_ssr/bundle-signing.server-D5u8KkMp.mjs +51 -0
- package/.output/server/_ssr/config-Dv8qLDZ0.mjs +13 -0
- package/.output/server/_ssr/config.server-DEiLhKmy.mjs +361 -0
- package/.output/server/_ssr/{createServerFn-DzU0k62V.mjs → createServerFn-B2hcXoPM.mjs} +1 -1
- package/.output/server/_ssr/createServerRpc-DB29C_5p.mjs +12 -0
- package/.output/server/_ssr/{sidebar-Cv_H0_Jv.mjs → createSsrRpc-9P0S0lJ3.mjs} +68 -50
- package/.output/server/_ssr/databaseRows-CwbNwYSl.mjs +166 -0
- package/.output/server/_ssr/deleteBundle-Cu_XOMt0.mjs +66 -0
- package/.output/server/_ssr/dialog-CQuRMNZ4.mjs +170 -0
- package/.output/server/_ssr/dist-BVSLTpoP.mjs +250 -0
- package/.output/server/_ssr/downloadBundle-CNnYxYO2.mjs +24 -0
- package/.output/server/_ssr/{empty-plugin-adapters-B4HCzgmM.mjs → empty-plugin-adapters-B5QvGpEl.mjs} +1 -1
- package/.output/server/_ssr/field-DRIXKjZG.mjs +74 -0
- package/.output/server/_ssr/{getBundleChildren-CVtSiH5t.mjs → getBundleChildren-BcRMFoDF.mjs} +10 -18
- package/.output/server/_ssr/installations-B-azgAvX.mjs +19 -0
- package/.output/server/_ssr/installations-Ctvzp2JH.mjs +535 -0
- package/.output/server/_ssr/router-C-KUBfOi.mjs +513 -0
- package/.output/server/_ssr/routes-BM4ht9jb.mjs +2286 -0
- package/.output/server/_ssr/routes-Z7TwC6nC.mjs +37 -0
- package/.output/server/_ssr/runtime.server-awTLiiXW.mjs +527 -0
- package/.output/server/_ssr/server-BjzmvXnO.mjs +7468 -0
- package/.output/server/_ssr/signing-k8GxyBDF.mjs +202 -0
- package/.output/server/_ssr/ssr.mjs +4 -5740
- package/.output/server/_ssr/start-DpViQGnt.mjs +4 -0
- package/.output/server/_ssr/table-v1yCvYo7.mjs +53 -0
- package/.output/server/_ssr/textarea-DYHnskhb.mjs +14 -0
- package/.output/server/_ssr/uuidv7-BbJ-9D_I.mjs +31 -0
- package/.output/server/_tanstack-start-manifest_v-CH4StzJu.mjs +108 -0
- package/.output/server/index.mjs +256 -53
- package/README.md +29 -8
- package/lib/index.d.mts +36 -0
- package/lib/index.mjs +4 -0
- package/lib/vite-internal.mjs +127 -0
- package/lib/vite.d.mts +10 -0
- package/lib/vite.mjs +5 -0
- package/package.json +51 -29
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/logo.svg +1 -0
- package/public/manifest.json +30 -0
- package/public/robots.txt +3 -0
- package/src/components/AppSidebar.tsx +159 -0
- package/src/components/BundleIdDisplay.tsx +18 -0
- package/src/components/ChannelBadge.tsx +31 -0
- package/src/components/ConsoleAccessPage.tsx +122 -0
- package/src/components/EnabledStatusIcon.tsx +54 -0
- package/src/components/HashValueDisplay.tsx +85 -0
- package/src/components/HotUpdaterLogo.tsx +30 -0
- package/src/components/NotFoundPage.tsx +33 -0
- package/src/components/PlatformIcon.tsx +39 -0
- package/src/components/RolloutPercentageBadge.tsx +28 -0
- package/src/components/ThemeProvider.tsx +116 -0
- package/src/components/TimestampDisplay.tsx +41 -0
- package/src/components/features/analytics/ActivityChart.tsx +150 -0
- package/src/components/features/analytics/AnalyticsCapabilityContext.tsx +24 -0
- package/src/components/features/analytics/AnalyticsControls.tsx +115 -0
- package/src/components/features/analytics/AnalyticsErrorAlert.tsx +21 -0
- package/src/components/features/analytics/AnalyticsOverview.tsx +208 -0
- package/src/components/features/analytics/BundleDistribution.tsx +133 -0
- package/src/components/features/analytics/BundleSelector.tsx +114 -0
- package/src/components/features/analytics/InstallationHistoryCard.tsx +248 -0
- package/src/components/features/analytics/InstallationMatchesCard.tsx +132 -0
- package/src/components/features/analytics/InstallationPageHeader.tsx +138 -0
- package/src/components/features/analytics/InstallationPagination.tsx +48 -0
- package/src/components/features/analytics/InstallationSearch.tsx +230 -0
- package/src/components/features/analytics/UpdateOutcomes.tsx +147 -0
- package/src/components/features/api-keys/ApiKeysPage.tsx +377 -0
- package/src/components/features/bundles/BundleActivityChart.tsx +193 -0
- package/src/components/features/bundles/BundleAnalyticsSummary.tsx +123 -0
- package/src/components/features/bundles/BundleChildrenPanel.tsx +201 -0
- package/src/components/features/bundles/BundleMetadata.tsx +136 -0
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +201 -0
- package/src/components/features/channels/ChannelManagementDialog.tsx +228 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +879 -0
- package/src/components/features/releases/ReleaseStateBadge.tsx +20 -0
- package/src/components/features/signing/BundleSigningPage.tsx +247 -0
- package/src/components/ui/alert-dialog.tsx +185 -0
- package/src/components/ui/alert.tsx +76 -0
- package/src/components/ui/badge.tsx +49 -0
- package/src/components/ui/button.tsx +58 -0
- package/src/components/ui/card.tsx +89 -0
- package/src/components/ui/chart.tsx +371 -0
- package/src/components/ui/combobox.tsx +303 -0
- package/src/components/ui/dialog.tsx +156 -0
- package/src/components/ui/dropdown-menu.tsx +270 -0
- package/src/components/ui/field.tsx +235 -0
- package/src/components/ui/input-group.tsx +147 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/label.tsx +25 -0
- package/src/components/ui/progress.tsx +84 -0
- package/src/components/ui/select.tsx +205 -0
- package/src/components/ui/separator.tsx +23 -0
- package/src/components/ui/sheet.tsx +132 -0
- package/src/components/ui/sidebar.tsx +779 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +56 -0
- package/src/components/ui/sonner.tsx +45 -0
- package/src/components/ui/switch.tsx +25 -0
- package/src/components/ui/table.tsx +114 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/ui/toggle-group.tsx +89 -0
- package/src/components/ui/toggle.tsx +43 -0
- package/src/components/ui/tooltip.tsx +66 -0
- package/src/hooks/use-mobile.ts +30 -0
- package/src/index.ts +48 -0
- package/src/lib/analytics-api.ts +145 -0
- package/src/lib/analytics-error.ts +19 -0
- package/src/lib/analytics-input.ts +187 -0
- package/src/lib/analytics-overview.ts +170 -0
- package/src/lib/analytics-rpc.ts +218 -0
- package/src/lib/api-keys-api.ts +69 -0
- package/src/lib/api-keys-rpc.ts +87 -0
- package/src/lib/api-rpc.ts +478 -0
- package/src/lib/api.ts +444 -0
- package/src/lib/auth-rpc.ts +16 -0
- package/src/lib/bundle-signing-api.ts +14 -0
- package/src/lib/bundle-signing-rpc.ts +16 -0
- package/src/lib/constants.ts +1 -0
- package/src/lib/git.ts +51 -0
- package/src/lib/server/auth.server.ts +43 -0
- package/src/lib/server/bundle-signing.server.ts +100 -0
- package/src/lib/server/config.server.ts +109 -0
- package/src/lib/server/console-runtime.server.ts +70 -0
- package/src/lib/server/deleteBundle.ts +145 -0
- package/src/lib/server/downloadBundle.ts +46 -0
- package/src/lib/server/getBundleChildren.ts +130 -0
- package/src/lib/server/listReleases.ts +61 -0
- package/src/lib/server/releaseActivity.ts +27 -0
- package/src/lib/server/releaseReachability.ts +95 -0
- package/src/lib/server/runtime.server.ts +172 -0
- package/src/lib/utils.ts +9 -0
- package/src/logo.svg +1 -0
- package/src/routeTree.gen.ts +199 -0
- package/src/router.tsx +21 -0
- package/src/routes/-installations-search.ts +19 -0
- package/src/routes/-releases-search.ts +74 -0
- package/src/routes/__root.tsx +174 -0
- package/src/routes/analytics.tsx +139 -0
- package/src/routes/api/auth/$.ts +19 -0
- package/src/routes/api/bundles/$bundleId/download.ts +17 -0
- package/src/routes/api-keys.tsx +37 -0
- package/src/routes/index.tsx +982 -0
- package/src/routes/installations.tsx +194 -0
- package/src/routes/signing.tsx +37 -0
- package/src/styles.css +152 -0
- package/src/virtual-modules.d.ts +21 -0
- package/src/vite-env.d.ts +1 -0
- package/src/vite-internal.ts +195 -0
- package/src/vite.ts +12 -0
- package/.output/public/assets/dist-DJX53faP.js +0 -3
- package/.output/public/assets/index-Iylis5kY.js +0 -10
- package/.output/public/assets/routes-HT21hs0C.js +0 -54
- package/.output/public/assets/styles-C0Re4quB.css +0 -2
- package/.output/server/__23tanstack-start-server-fn-resolver-CgwgZ0-i.mjs +0 -66
- package/.output/server/_libs/@floating-ui/core+[...].mjs +0 -698
- package/.output/server/_libs/@floating-ui/dom+[...].mjs +0 -644
- package/.output/server/_libs/@floating-ui/react-dom+[...].mjs +0 -839
- package/.output/server/_libs/@radix-ui/react-alert-dialog+[...].mjs +0 -2138
- package/.output/server/_libs/@radix-ui/react-popper+[...].mjs +0 -308
- package/.output/server/_libs/@radix-ui/react-select+[...].mjs +0 -1038
- package/.output/server/_libs/@tanstack/devtools-event-client+[...].mjs +0 -196
- package/.output/server/_libs/@tanstack/form-core+[...].mjs +0 -3228
- package/.output/server/_libs/@tanstack/react-form+[...].mjs +0 -430
- package/.output/server/_libs/@tanstack/react-table+[...].mjs +0 -2382
- package/.output/server/_libs/radix-ui__number.mjs +0 -6
- package/.output/server/_libs/radix-ui__primitive.mjs +0 -9
- package/.output/server/_libs/radix-ui__react-arrow.mjs +0 -23
- package/.output/server/_libs/radix-ui__react-collection.mjs +0 -78
- package/.output/server/_libs/radix-ui__react-direction.mjs +0 -13
- package/.output/server/_libs/radix-ui__react-label.mjs +0 -22
- package/.output/server/_libs/radix-ui__react-separator.mjs +0 -30
- package/.output/server/_libs/radix-ui__react-slider.mjs +0 -510
- package/.output/server/_libs/radix-ui__react-switch.mjs +0 -157
- package/.output/server/_libs/radix-ui__react-tooltip.mjs +0 -493
- package/.output/server/_ssr/api-rpc-BIbDUKSz.mjs +0 -292
- package/.output/server/_ssr/config.server-BSS366KT.mjs +0 -41
- package/.output/server/_ssr/deleteBundle-BgbZTtpW.mjs +0 -141
- package/.output/server/_ssr/dist-KboydRVk.mjs +0 -120
- package/.output/server/_ssr/router-C3hqEy3k.mjs +0 -307
- package/.output/server/_ssr/routes-B0lQvvlC.mjs +0 -3048
- package/.output/server/_ssr/start-02sLteYG.mjs +0 -4
- package/.output/server/_ssr/storageProfile-FVkjPoGb.mjs +0 -9
- package/.output/server/_tanstack-start-manifest_v-Bpx52WOU.mjs +0 -20
- package/.output/server/node_modules/tslib/modules/index.js +0 -70
- package/.output/server/node_modules/tslib/modules/package.json +0 -3
- package/.output/server/node_modules/tslib/package.json +0 -47
- package/.output/server/node_modules/tslib/tslib.js +0 -484
- package/.output/server/package.json +0 -9
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
import { i as __toESM } from "../_runtime.mjs";
|
|
2
|
+
import { at as require_react, it as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
+
import { n as useAnalyticsCapability, t as AnalyticsCapabilityProvider } from "./AnalyticsCapabilityContext-ui4DX8GO.mjs";
|
|
4
|
+
import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
|
|
5
|
+
import { O as CircleCheck, P as ChartNoAxesCombined, b as KeyRound, c as ShieldCheck, g as Moon, h as OctagonX, m as Package, n as TriangleAlert, o as Sun, v as LoaderCircle, x as Info } from "../_libs/lucide-react.mjs";
|
|
6
|
+
import { S as buttonVariants, a as SidebarContent, b as TooltipProvider, c as SidebarGroupContent, d as SidebarInset, f as SidebarMenu, h as SidebarProvider, i as Sidebar, l as SidebarGroupLabel, m as SidebarMenuItem, o as SidebarFooter, p as SidebarMenuButton, s as SidebarGroup, t as Button$1, u as SidebarHeader, w as createSsrRpc } from "./createSsrRpc-9P0S0lJ3.mjs";
|
|
7
|
+
import { a as HeadContent, c as createRouter, d as createFileRoute, f as createRootRouteWithContext, i as Scripts, l as Outlet, o as useRouterState, p as Link, u as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
8
|
+
import { t as QueryClient } from "../_libs/tanstack__query-core.mjs";
|
|
9
|
+
import { a as useAnalyticsCapabilitiesQuery, n as getAnalyticsCapabilityState, t as ensureAnalyticsRouteAccess } from "./analytics-api-Cg1M5v_H.mjs";
|
|
10
|
+
import { n as useApiKeyCapabilityQuery, t as ensureApiKeyRouteAccess } from "./api-keys-api-CIywsSF5.mjs";
|
|
11
|
+
import { t as Toaster } from "../_libs/sonner.mjs";
|
|
12
|
+
import { t as Route$6 } from "./installations-B-azgAvX.mjs";
|
|
13
|
+
import { t as Route$7 } from "./routes-Z7TwC6nC.mjs";
|
|
14
|
+
import { t as setupRouterSsrQueryIntegration } from "../_libs/@tanstack/react-router-ssr-query+[...].mjs";
|
|
15
|
+
import { t as z } from "../_libs/next-themes.mjs";
|
|
16
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/router-C-KUBfOi.js
|
|
17
|
+
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
18
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
19
|
+
function HotUpdaterLogo({ className }) {
|
|
20
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
|
|
21
|
+
"aria-label": "Hot Updater",
|
|
22
|
+
className,
|
|
23
|
+
viewBox: "0 0 447 652",
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", {
|
|
26
|
+
id: "hot-updater-gradient",
|
|
27
|
+
x1: "223.54",
|
|
28
|
+
y1: "0.36",
|
|
29
|
+
x2: "223.54",
|
|
30
|
+
y2: "711.23",
|
|
31
|
+
gradientUnits: "userSpaceOnUse",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
|
|
34
|
+
offset: "0",
|
|
35
|
+
stopColor: "#ff7f33"
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
|
|
38
|
+
offset: "0.4",
|
|
39
|
+
stopColor: "#f9602b"
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
|
|
42
|
+
offset: "0.76",
|
|
43
|
+
stopColor: "#f54c25"
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
|
|
46
|
+
offset: "1",
|
|
47
|
+
stopColor: "#f44523"
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
51
|
+
d: "M150.25,8.58c16.28,31.85,42.09,116-68.18,212.22C75.46,226.57,70,233,63.72,239.62c-28.48,30-84.71,114.89-55.82,207,.69,2.18,1.31,4.37,1.91,6.57,5.25,19.33,38.08,121,155.56,157.25a5.14,5.14,0,0,0,6-7.39c-14.72-26.53-46.07-96.89-8.89-162.55,0,0,11.5,44.5,50.5,83.5,6,6,14.72,15.64,19.53,21.23,14.47,16.77,32.24,53.55,1.82,98.18a5.63,5.63,0,0,0,6.85,8.34c75.64-32.1,333.29-164.6,128.68-410.85a7,7,0,0,0-12.46,4.15c-1.77,39.31-14.84,129-96.18,148.06a31.08,31.08,0,0,1-24.3-4.16c-13.34-8.9-25.41-32.06.53-92.3a250.9,250.9,0,0,1,20.12-37.29C282.78,220.56,356.18,79.83,157.33.77A5.64,5.64,0,0,0,150.25,8.58Z",
|
|
52
|
+
fill: "url(#hot-updater-gradient)"
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
var ThemeContext = (0, import_react.createContext)(void 0);
|
|
57
|
+
var LIGHT_THEME_COLOR = "#fbfbfa";
|
|
58
|
+
var DARK_THEME_COLOR = "#1f1d1c";
|
|
59
|
+
var REFRESH_THEME_CHROME_EVENT = "hot-updater:refresh-theme-chrome";
|
|
60
|
+
function ThemeProvider({ children, defaultTheme = "dark", storageKey = "hot-updater-theme" }) {
|
|
61
|
+
const [theme, setTheme] = (0, import_react.useState)(defaultTheme);
|
|
62
|
+
(0, import_react.useEffect)(() => {
|
|
63
|
+
const stored = localStorage.getItem(storageKey);
|
|
64
|
+
if (stored) setTheme(stored);
|
|
65
|
+
}, [storageKey]);
|
|
66
|
+
(0, import_react.useEffect)(() => {
|
|
67
|
+
const root = window.document.documentElement;
|
|
68
|
+
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
69
|
+
const themeColorMeta = window.document.querySelector("meta[name=\"theme-color\"]");
|
|
70
|
+
const colorSchemeMeta = window.document.querySelector("meta[name=\"color-scheme\"]");
|
|
71
|
+
const applyResolvedTheme = (resolvedTheme) => {
|
|
72
|
+
root.classList.remove("light", "dark");
|
|
73
|
+
root.classList.add(resolvedTheme);
|
|
74
|
+
root.style.colorScheme = resolvedTheme;
|
|
75
|
+
if (themeColorMeta) themeColorMeta.setAttribute("content", resolvedTheme === "dark" ? DARK_THEME_COLOR : LIGHT_THEME_COLOR);
|
|
76
|
+
if (colorSchemeMeta) colorSchemeMeta.setAttribute("content", resolvedTheme === "dark" ? "dark light" : "light dark");
|
|
77
|
+
};
|
|
78
|
+
const syncTheme = () => {
|
|
79
|
+
applyResolvedTheme(theme === "system" ? mediaQuery.matches ? "dark" : "light" : theme);
|
|
80
|
+
};
|
|
81
|
+
syncTheme();
|
|
82
|
+
const refreshThemeChrome = () => {
|
|
83
|
+
window.requestAnimationFrame(syncTheme);
|
|
84
|
+
};
|
|
85
|
+
window.addEventListener(REFRESH_THEME_CHROME_EVENT, refreshThemeChrome);
|
|
86
|
+
window.addEventListener("pageshow", refreshThemeChrome);
|
|
87
|
+
document.addEventListener("visibilitychange", refreshThemeChrome);
|
|
88
|
+
if (theme === "system") mediaQuery.addEventListener("change", syncTheme);
|
|
89
|
+
return () => {
|
|
90
|
+
if (theme === "system") mediaQuery.removeEventListener("change", syncTheme);
|
|
91
|
+
window.removeEventListener(REFRESH_THEME_CHROME_EVENT, refreshThemeChrome);
|
|
92
|
+
window.removeEventListener("pageshow", refreshThemeChrome);
|
|
93
|
+
document.removeEventListener("visibilitychange", refreshThemeChrome);
|
|
94
|
+
};
|
|
95
|
+
}, [theme]);
|
|
96
|
+
const value = {
|
|
97
|
+
theme,
|
|
98
|
+
setTheme: (newTheme) => {
|
|
99
|
+
localStorage.setItem(storageKey, newTheme);
|
|
100
|
+
setTheme(newTheme);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeContext.Provider, {
|
|
104
|
+
value,
|
|
105
|
+
children
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function useTheme$1() {
|
|
109
|
+
const context = (0, import_react.useContext)(ThemeContext);
|
|
110
|
+
if (context === void 0) throw new Error("useTheme must be used within a ThemeProvider");
|
|
111
|
+
return context;
|
|
112
|
+
}
|
|
113
|
+
function AppSidebar() {
|
|
114
|
+
const analyticsCapability = useAnalyticsCapability();
|
|
115
|
+
const apiKeyCapability = useApiKeyCapabilityQuery();
|
|
116
|
+
const { theme, setTheme } = useTheme$1();
|
|
117
|
+
const currentPath = useRouterState().location.pathname;
|
|
118
|
+
const isBundlesActive = currentPath === "/";
|
|
119
|
+
const isAnalyticsActive = currentPath === "/analytics" || currentPath === "/installations";
|
|
120
|
+
const isApiKeysActive = currentPath === "/api-keys";
|
|
121
|
+
const isSigningActive = currentPath === "/signing";
|
|
122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Sidebar, {
|
|
123
|
+
collapsible: "icon",
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarHeader, {
|
|
126
|
+
className: "h-12 justify-center",
|
|
127
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
|
|
128
|
+
to: "/",
|
|
129
|
+
search: {
|
|
130
|
+
afterReleaseId: void 0,
|
|
131
|
+
beforeReleaseId: void 0,
|
|
132
|
+
channelId: void 0,
|
|
133
|
+
enabled: void 0,
|
|
134
|
+
releaseId: void 0,
|
|
135
|
+
platform: void 0,
|
|
136
|
+
targetAppVersion: void 0,
|
|
137
|
+
bundleId: void 0,
|
|
138
|
+
page: void 0
|
|
139
|
+
},
|
|
140
|
+
className: "flex items-center gap-3 p-1 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:p-2",
|
|
141
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HotUpdaterLogo, { className: "h-7 w-7 shrink-0" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
142
|
+
className: "flex flex-col gap-0 group-data-[collapsible=icon]:hidden",
|
|
143
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
144
|
+
className: "text-sm font-semibold tracking-tight text-sidebar-foreground leading-tight",
|
|
145
|
+
children: "Hot Updater"
|
|
146
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
147
|
+
className: "text-[10px] text-sidebar-foreground/60 leading-tight",
|
|
148
|
+
children: "Console"
|
|
149
|
+
})]
|
|
150
|
+
})]
|
|
151
|
+
})
|
|
152
|
+
}),
|
|
153
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarGroup, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarGroupLabel, { children: "Navigation" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarGroupContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenu, { children: [
|
|
154
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
|
|
155
|
+
isActive: isBundlesActive,
|
|
156
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
157
|
+
to: "/",
|
|
158
|
+
search: {
|
|
159
|
+
afterReleaseId: void 0,
|
|
160
|
+
beforeReleaseId: void 0,
|
|
161
|
+
channelId: void 0,
|
|
162
|
+
enabled: void 0,
|
|
163
|
+
releaseId: void 0,
|
|
164
|
+
platform: void 0,
|
|
165
|
+
targetAppVersion: void 0,
|
|
166
|
+
bundleId: void 0,
|
|
167
|
+
page: void 0
|
|
168
|
+
}
|
|
169
|
+
}),
|
|
170
|
+
tooltip: "Bundles",
|
|
171
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Package, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Bundles" })]
|
|
172
|
+
}) }),
|
|
173
|
+
analyticsCapability.status === "supported" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
|
|
174
|
+
isActive: isAnalyticsActive,
|
|
175
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { to: "/analytics" }),
|
|
176
|
+
tooltip: "Analytics",
|
|
177
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartNoAxesCombined, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Analytics" })]
|
|
178
|
+
}) }) : null,
|
|
179
|
+
apiKeyCapability.data?.apiKeys ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
|
|
180
|
+
isActive: isApiKeysActive,
|
|
181
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { to: "/api-keys" }),
|
|
182
|
+
tooltip: "API keys",
|
|
183
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyRound, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "API keys" })]
|
|
184
|
+
}) }) : null,
|
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
|
|
186
|
+
isActive: isSigningActive,
|
|
187
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { to: "/signing" }),
|
|
188
|
+
tooltip: "Bundle signing",
|
|
189
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShieldCheck, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Bundle signing" })]
|
|
190
|
+
}) })
|
|
191
|
+
] }) })] }) }),
|
|
192
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
|
|
193
|
+
onClick: () => setTheme(theme === "dark" ? "light" : "dark"),
|
|
194
|
+
tooltip: theme === "dark" ? "Light mode" : "Dark mode",
|
|
195
|
+
children: [theme === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Sun, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Moon, { className: "h-4 w-4" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: theme === "dark" ? "Light mode" : "Dark mode" })]
|
|
196
|
+
}) }) }) })
|
|
197
|
+
]
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
var providerLabel = {
|
|
201
|
+
github: "GitHub",
|
|
202
|
+
google: "Google"
|
|
203
|
+
};
|
|
204
|
+
function ConsoleAccessPage({ access, providers }) {
|
|
205
|
+
const [pendingProvider, setPendingProvider] = (0, import_react.useState)(null);
|
|
206
|
+
const [signingOut, setSigningOut] = (0, import_react.useState)(false);
|
|
207
|
+
const [error, setError] = (0, import_react.useState)(null);
|
|
208
|
+
const signIn = async (provider) => {
|
|
209
|
+
setPendingProvider(provider);
|
|
210
|
+
setError(null);
|
|
211
|
+
try {
|
|
212
|
+
const response = await fetch("/api/auth/sign-in/social", {
|
|
213
|
+
body: JSON.stringify({
|
|
214
|
+
callbackURL: "/",
|
|
215
|
+
provider
|
|
216
|
+
}),
|
|
217
|
+
headers: { "content-type": "application/json" },
|
|
218
|
+
method: "POST"
|
|
219
|
+
});
|
|
220
|
+
const result = await response.json();
|
|
221
|
+
if (!response.ok || typeof result.url !== "string") throw new Error("The identity provider did not return a sign-in URL.");
|
|
222
|
+
window.location.assign(result.url);
|
|
223
|
+
} catch (cause) {
|
|
224
|
+
setPendingProvider(null);
|
|
225
|
+
setError(cause instanceof Error ? cause.message : "Sign-in failed.");
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
const signOut = async () => {
|
|
229
|
+
setSigningOut(true);
|
|
230
|
+
setError(null);
|
|
231
|
+
try {
|
|
232
|
+
if (!(await fetch("/api/auth/sign-out", { method: "POST" })).ok) throw new Error("Sign-out failed.");
|
|
233
|
+
window.location.reload();
|
|
234
|
+
} catch (cause) {
|
|
235
|
+
setSigningOut(false);
|
|
236
|
+
setError(cause instanceof Error ? cause.message : "Sign-out failed.");
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", {
|
|
240
|
+
className: "bg-background text-foreground flex min-h-screen items-center justify-center p-6",
|
|
241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
242
|
+
className: "border-border bg-card w-full max-w-sm rounded-xl border p-6 shadow-sm",
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
245
|
+
className: "mb-6 flex items-center gap-3",
|
|
246
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HotUpdaterLogo, { className: "h-10 w-7" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
|
|
247
|
+
className: "text-lg font-semibold",
|
|
248
|
+
children: "Hot Updater Console"
|
|
249
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
250
|
+
className: "text-muted-foreground text-sm",
|
|
251
|
+
children: "Sign in to manage OTA releases."
|
|
252
|
+
})] })]
|
|
253
|
+
}),
|
|
254
|
+
access.status === "forbidden" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
255
|
+
className: "space-y-3",
|
|
256
|
+
children: [
|
|
257
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
258
|
+
className: "text-sm font-medium",
|
|
259
|
+
children: "Access denied"
|
|
260
|
+
}),
|
|
261
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
262
|
+
className: "text-muted-foreground text-sm",
|
|
263
|
+
children: [access.principal.email, " is not in the console allowlist."]
|
|
264
|
+
}),
|
|
265
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
266
|
+
className: "w-full",
|
|
267
|
+
disabled: signingOut,
|
|
268
|
+
onClick: () => void signOut(),
|
|
269
|
+
size: "lg",
|
|
270
|
+
variant: "outline",
|
|
271
|
+
children: signingOut ? "Signing out…" : "Sign out"
|
|
272
|
+
})
|
|
273
|
+
]
|
|
274
|
+
}) : providers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
275
|
+
className: "text-muted-foreground text-sm",
|
|
276
|
+
children: "No OAuth provider is configured for this console."
|
|
277
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
278
|
+
className: "grid gap-2",
|
|
279
|
+
children: providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
280
|
+
className: "w-full",
|
|
281
|
+
disabled: pendingProvider !== null,
|
|
282
|
+
onClick: () => void signIn(provider),
|
|
283
|
+
size: "lg",
|
|
284
|
+
variant: "outline",
|
|
285
|
+
children: pendingProvider === provider ? "Redirecting…" : `Continue with ${providerLabel[provider]}`
|
|
286
|
+
}, provider))
|
|
287
|
+
}),
|
|
288
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
289
|
+
className: "text-destructive mt-3 text-sm",
|
|
290
|
+
role: "alert",
|
|
291
|
+
children: error
|
|
292
|
+
}) : null
|
|
293
|
+
]
|
|
294
|
+
})
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
var homeSearch = {
|
|
298
|
+
channel: void 0,
|
|
299
|
+
platform: void 0,
|
|
300
|
+
targetAppVersion: void 0,
|
|
301
|
+
page: void 0,
|
|
302
|
+
after: void 0,
|
|
303
|
+
before: void 0,
|
|
304
|
+
bundleId: void 0,
|
|
305
|
+
expandedBundleId: void 0
|
|
306
|
+
};
|
|
307
|
+
function NotFoundPage() {
|
|
308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
309
|
+
className: "flex min-h-svh flex-1 items-center justify-center px-6 py-10",
|
|
310
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
311
|
+
className: "flex max-w-md flex-col items-center text-center",
|
|
312
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
|
|
313
|
+
className: "text-2xl font-semibold tracking-tight text-foreground",
|
|
314
|
+
children: "Page not found"
|
|
315
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
316
|
+
className: buttonVariants({
|
|
317
|
+
className: "mt-6",
|
|
318
|
+
size: "lg"
|
|
319
|
+
}),
|
|
320
|
+
to: "/",
|
|
321
|
+
search: homeSearch,
|
|
322
|
+
children: "Go to home"
|
|
323
|
+
})]
|
|
324
|
+
})
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
var Toaster$1 = ({ ...props }) => {
|
|
328
|
+
const { theme = "system" } = z();
|
|
329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toaster, {
|
|
330
|
+
theme,
|
|
331
|
+
className: "toaster group",
|
|
332
|
+
icons: {
|
|
333
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleCheck, { className: "size-4" }),
|
|
334
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, { className: "size-4" }),
|
|
335
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, { className: "size-4" }),
|
|
336
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OctagonX, { className: "size-4" }),
|
|
337
|
+
loading: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoaderCircle, { className: "size-4 animate-spin" })
|
|
338
|
+
},
|
|
339
|
+
style: {
|
|
340
|
+
"--normal-bg": "var(--popover)",
|
|
341
|
+
"--normal-text": "var(--popover-foreground)",
|
|
342
|
+
"--normal-border": "var(--border)",
|
|
343
|
+
"--border-radius": "var(--radius)"
|
|
344
|
+
},
|
|
345
|
+
toastOptions: { classNames: { toast: "cn-toast" } },
|
|
346
|
+
...props
|
|
347
|
+
});
|
|
348
|
+
};
|
|
349
|
+
var getConsoleAccessRpc = createServerFn({ method: "GET" }).handler(createSsrRpc("c504696e68ba764b48c48aa8a40275938640941e473cf9cfdd7b2322d99f9d13"));
|
|
350
|
+
var getConsoleAuthProvidersRpc = createServerFn({ method: "GET" }).handler(createSsrRpc("fa8c48f0489d97c62b9b68fd0caf0a61b15bad25a42b3866ec36264b4b30bb74"));
|
|
351
|
+
var styles_default = "/assets/styles-eB4EtvFS.css";
|
|
352
|
+
var Route$5 = createRootRouteWithContext()({
|
|
353
|
+
head: () => ({
|
|
354
|
+
meta: [
|
|
355
|
+
{ charSet: "utf-8" },
|
|
356
|
+
{
|
|
357
|
+
name: "viewport",
|
|
358
|
+
content: "width=device-width, initial-scale=1, viewport-fit=cover"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
name: "theme-color",
|
|
362
|
+
content: "#1f1d1c"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
name: "color-scheme",
|
|
366
|
+
content: "dark light"
|
|
367
|
+
},
|
|
368
|
+
{ title: "Hot Updater Console" }
|
|
369
|
+
],
|
|
370
|
+
links: [{
|
|
371
|
+
rel: "stylesheet",
|
|
372
|
+
href: styles_default
|
|
373
|
+
}]
|
|
374
|
+
}),
|
|
375
|
+
loader: async () => {
|
|
376
|
+
const [access, providers] = await Promise.all([getConsoleAccessRpc(), getConsoleAuthProvidersRpc()]);
|
|
377
|
+
return {
|
|
378
|
+
access,
|
|
379
|
+
providers
|
|
380
|
+
};
|
|
381
|
+
},
|
|
382
|
+
component: RootLayout,
|
|
383
|
+
notFoundComponent: NotFoundPage,
|
|
384
|
+
shellComponent: RootDocument
|
|
385
|
+
});
|
|
386
|
+
function RootDocument({ children }) {
|
|
387
|
+
const [localDevtools, setLocalDevtools] = (0, import_react.useState)(null);
|
|
388
|
+
(0, import_react.useEffect)(() => {}, []);
|
|
389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("html", {
|
|
390
|
+
lang: "en",
|
|
391
|
+
suppressHydrationWarning: true,
|
|
392
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("head", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeadContent, {}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("body", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeProvider, {
|
|
393
|
+
defaultTheme: "dark",
|
|
394
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TooltipProvider, { children: [
|
|
395
|
+
children,
|
|
396
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toaster$1, {}),
|
|
397
|
+
localDevtools ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(localDevtools.Devtools, {
|
|
398
|
+
config: { position: "bottom-right" },
|
|
399
|
+
plugins: [{
|
|
400
|
+
name: "Tanstack Router",
|
|
401
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(localDevtools.RouterPanel, {})
|
|
402
|
+
}]
|
|
403
|
+
}) : null
|
|
404
|
+
] })
|
|
405
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Scripts, {})] })]
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
function RootLayout() {
|
|
409
|
+
const { access, providers } = Route$5.useLoaderData();
|
|
410
|
+
if (access.status !== "authorized") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConsoleAccessPage, {
|
|
411
|
+
access,
|
|
412
|
+
providers
|
|
413
|
+
});
|
|
414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AuthorizedConsole, {});
|
|
415
|
+
}
|
|
416
|
+
function AuthorizedConsole() {
|
|
417
|
+
const capability = getAnalyticsCapabilityState(useAnalyticsCapabilitiesQuery());
|
|
418
|
+
(0, import_react.useEffect)(() => {}, []);
|
|
419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnalyticsCapabilityProvider, {
|
|
420
|
+
value: capability,
|
|
421
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarProvider, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppSidebar, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarInset, {
|
|
422
|
+
className: "min-h-0 min-w-0 overflow-hidden",
|
|
423
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Outlet, {})
|
|
424
|
+
})] })
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
var $$splitComponentImporter$2 = () => import("./signing-k8GxyBDF.mjs");
|
|
428
|
+
var Route$4 = createFileRoute("/signing")({ component: lazyRouteComponent($$splitComponentImporter$2, "component") });
|
|
429
|
+
var $$splitComponentImporter$1 = () => import("./api-keys-BnM_o2nS.mjs");
|
|
430
|
+
var Route$3 = createFileRoute("/api-keys")({
|
|
431
|
+
beforeLoad: ({ context }) => ensureApiKeyRouteAccess(context.queryClient),
|
|
432
|
+
component: lazyRouteComponent($$splitComponentImporter$1, "component")
|
|
433
|
+
});
|
|
434
|
+
var $$splitComponentImporter = () => import("./analytics-DtMTn8fn.mjs");
|
|
435
|
+
var Route$2 = createFileRoute("/analytics")({
|
|
436
|
+
beforeLoad: ({ context }) => ensureAnalyticsRouteAccess(context.queryClient),
|
|
437
|
+
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
438
|
+
});
|
|
439
|
+
var handleAuthRequest = async ({ request }) => {
|
|
440
|
+
const { handleConsoleAuth } = await import("./auth.server-DwKoZoQM.mjs");
|
|
441
|
+
return handleConsoleAuth(request);
|
|
442
|
+
};
|
|
443
|
+
var Route$1 = createFileRoute("/api/auth/$")({ server: { handlers: {
|
|
444
|
+
GET: handleAuthRequest,
|
|
445
|
+
POST: handleAuthRequest
|
|
446
|
+
} } });
|
|
447
|
+
var Route = createFileRoute("/api/bundles/$bundleId/download")({ server: { handlers: { GET: async ({ params, request }) => {
|
|
448
|
+
const { prepareConfig } = await import("./config.server-DEiLhKmy.mjs");
|
|
449
|
+
const { downloadBundle } = await import("./downloadBundle-CNnYxYO2.mjs");
|
|
450
|
+
const { databaseClient, storagePlugin } = await prepareConfig(request);
|
|
451
|
+
return downloadBundle(params.bundleId, {
|
|
452
|
+
databaseClient,
|
|
453
|
+
storagePlugin
|
|
454
|
+
});
|
|
455
|
+
} } } });
|
|
456
|
+
var SigningRoute = Route$4.update({
|
|
457
|
+
id: "/signing",
|
|
458
|
+
path: "/signing",
|
|
459
|
+
getParentRoute: () => Route$5
|
|
460
|
+
});
|
|
461
|
+
var InstallationsRoute = Route$6.update({
|
|
462
|
+
id: "/installations",
|
|
463
|
+
path: "/installations",
|
|
464
|
+
getParentRoute: () => Route$5
|
|
465
|
+
});
|
|
466
|
+
var ApiKeysRoute = Route$3.update({
|
|
467
|
+
id: "/api-keys",
|
|
468
|
+
path: "/api-keys",
|
|
469
|
+
getParentRoute: () => Route$5
|
|
470
|
+
});
|
|
471
|
+
var AnalyticsRoute = Route$2.update({
|
|
472
|
+
id: "/analytics",
|
|
473
|
+
path: "/analytics",
|
|
474
|
+
getParentRoute: () => Route$5
|
|
475
|
+
});
|
|
476
|
+
var rootRouteChildren = {
|
|
477
|
+
IndexRoute: Route$7.update({
|
|
478
|
+
id: "/",
|
|
479
|
+
path: "/",
|
|
480
|
+
getParentRoute: () => Route$5
|
|
481
|
+
}),
|
|
482
|
+
AnalyticsRoute,
|
|
483
|
+
ApiKeysRoute,
|
|
484
|
+
InstallationsRoute,
|
|
485
|
+
SigningRoute,
|
|
486
|
+
ApiAuthSplatRoute: Route$1.update({
|
|
487
|
+
id: "/api/auth/$",
|
|
488
|
+
path: "/api/auth/$",
|
|
489
|
+
getParentRoute: () => Route$5
|
|
490
|
+
}),
|
|
491
|
+
ApiBundlesBundleIdDownloadRoute: Route.update({
|
|
492
|
+
id: "/api/bundles/$bundleId/download",
|
|
493
|
+
path: "/api/bundles/$bundleId/download",
|
|
494
|
+
getParentRoute: () => Route$5
|
|
495
|
+
})
|
|
496
|
+
};
|
|
497
|
+
var routeTree = Route$5._addFileChildren(rootRouteChildren)._addFileTypes();
|
|
498
|
+
var getRouter = () => {
|
|
499
|
+
const queryClient = new QueryClient();
|
|
500
|
+
const router = createRouter({
|
|
501
|
+
routeTree,
|
|
502
|
+
context: { queryClient },
|
|
503
|
+
scrollRestoration: true,
|
|
504
|
+
defaultPreloadStaleTime: 0
|
|
505
|
+
});
|
|
506
|
+
setupRouterSsrQueryIntegration({
|
|
507
|
+
router,
|
|
508
|
+
queryClient
|
|
509
|
+
});
|
|
510
|
+
return router;
|
|
511
|
+
};
|
|
512
|
+
//#endregion
|
|
513
|
+
export { getRouter };
|