@hot-updater/console 0.36.7 → 1.0.0-rc.1

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.
Files changed (262) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/BundleIdDisplay-D4ErdU5_.js +1 -0
  3. package/.output/public/assets/InsightsCapabilityContext-B42VqvP6.js +1 -0
  4. package/.output/public/assets/api-keys-api-DGVTTvTJ.js +1 -0
  5. package/.output/public/assets/api-keys-z16OZIP4.js +1 -0
  6. package/.output/public/assets/badge-Br_KDO0J.js +1 -0
  7. package/.output/public/assets/card-DzuEXvyJ.js +1 -0
  8. package/.output/public/assets/chart-no-axes-combined-FaYMGmQS.js +1 -0
  9. package/.output/public/assets/createServerFn-gM2-LFBy.js +3 -0
  10. package/.output/public/assets/dialog-BeAENgez.js +1 -0
  11. package/.output/public/assets/dist-Bssh_cv0.js +1 -0
  12. package/.output/public/assets/field-Buq148-A.js +1 -0
  13. package/.output/public/assets/index-uOpQAIC4.js +10 -0
  14. package/.output/public/assets/input-group-B3p5UpyW.js +1 -0
  15. package/.output/public/assets/insights-DJTr7Ozn.js +1 -0
  16. package/.output/public/assets/insights-api-DVMOoRMS.js +1 -0
  17. package/.output/public/assets/installations-BY64iIAK.js +2 -0
  18. package/.output/public/assets/installations-D5v9i3AL.js +1 -0
  19. package/.output/public/assets/lazyRouteComponent-DKYu5cZJ.js +1 -0
  20. package/.output/public/assets/preload-helper-CQ36nxok.js +1 -0
  21. package/.output/public/assets/refresh-cw-BkbfZ62O.js +1 -0
  22. package/.output/public/assets/routes-BuoI5-Cr.js +2 -0
  23. package/.output/public/assets/routes-C8fvgETO.js +1 -0
  24. package/.output/public/assets/search-qsIDvS2I.js +1 -0
  25. package/.output/public/assets/shield-check-DE_hVuHu.js +1 -0
  26. package/.output/public/assets/signing-mJD88Y4C.js +1 -0
  27. package/.output/public/assets/styles-BZIG7t42.css +2 -0
  28. package/.output/public/assets/table-RamFEclP.js +1 -0
  29. package/.output/public/assets/useCompositeListItem-ChzDqdpc.js +42 -0
  30. package/.output/public/assets/useMutation-JsGVjQMY.js +1 -0
  31. package/.output/public/assets/useOpenInteractionType-Dwfy-SpA.js +1 -0
  32. package/.output/server/__23tanstack-start-server-fn-resolver-Dftxlm2E.mjs +146 -0
  33. package/.output/server/_libs/@base-ui/react+[...].mjs +16124 -0
  34. package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
  35. package/.output/server/_libs/@tanstack/react-router+[...].mjs +41 -10
  36. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +132 -0
  37. package/.output/server/_libs/d3-array.mjs +231 -0
  38. package/.output/server/_libs/d3-color.mjs +330 -0
  39. package/.output/server/_libs/d3-format.mjs +252 -0
  40. package/.output/server/_libs/d3-interpolate.mjs +207 -0
  41. package/.output/server/_libs/d3-path.mjs +77 -0
  42. package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
  43. package/.output/server/_libs/d3-shape.mjs +818 -0
  44. package/.output/server/_libs/decimal.js-light.mjs +884 -0
  45. package/.output/server/_libs/es-toolkit.mjs +1134 -0
  46. package/.output/server/_libs/eventemitter3.mjs +236 -0
  47. package/.output/server/_libs/immer.mjs +532 -0
  48. package/.output/server/_libs/lucide-react.mjs +141 -13
  49. package/.output/server/_libs/next-themes.mjs +2 -2
  50. package/.output/server/_libs/react-redux+[...].mjs +205 -0
  51. package/.output/server/_libs/recharts+[...].mjs +14117 -0
  52. package/.output/server/_libs/sonner.mjs +2 -2
  53. package/.output/server/_libs/tanstack__query-core.mjs +114 -1
  54. package/.output/server/_libs/tanstack__react-query.mjs +3 -4
  55. package/.output/server/_runtime.mjs +10 -1
  56. package/.output/server/_ssr/BundleActivityChart-CWcdPuUn.mjs +288 -0
  57. package/.output/server/_ssr/BundleIdDisplay-BEvB3MvA.mjs +13 -0
  58. package/.output/server/_ssr/InsightsCapabilityContext-Cx8fjm2s.mjs +15 -0
  59. package/.output/server/_ssr/api-keys-CpBqHpuC.mjs +300 -0
  60. package/.output/server/_ssr/api-keys-api-Czkp57UV.mjs +60 -0
  61. package/.output/server/_ssr/api-keys-rpc-BTtMDSoR.mjs +136 -0
  62. package/.output/server/_ssr/api-rpc-BEX8ISai.mjs +1468 -0
  63. package/.output/server/_ssr/auth-BF8mbAgF.mjs +21 -0
  64. package/.output/server/_ssr/auth-rpc-BFMEC-TT.mjs +24 -0
  65. package/.output/server/_ssr/auth.server-DW71WzsD.mjs +47 -0
  66. package/.output/server/_ssr/badge-CpWXQwyF.mjs +26 -0
  67. package/.output/server/_ssr/bundle-signing-rpc-BbCFUQSu.mjs +16 -0
  68. package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +12 -0
  69. package/.output/server/_ssr/card-Bsc8mRis.mjs +86 -0
  70. package/.output/server/_ssr/config-Dv8qLDZ0.mjs +13 -0
  71. package/.output/server/_ssr/config.server-DQYEr_5X.mjs +361 -0
  72. package/.output/server/_ssr/{createServerFn-DzU0k62V.mjs → createServerFn-B2hcXoPM.mjs} +1 -1
  73. package/.output/server/_ssr/createServerRpc-DB29C_5p.mjs +12 -0
  74. package/.output/server/_ssr/{sidebar-Cv_H0_Jv.mjs → createSsrRpc-DhfrxEjg.mjs} +68 -50
  75. package/.output/server/_ssr/databaseRows-QlCYLi0H.mjs +166 -0
  76. package/.output/server/_ssr/deleteBundle-Cu_XOMt0.mjs +66 -0
  77. package/.output/server/_ssr/dialog-C0vKUp8R.mjs +170 -0
  78. package/.output/server/_ssr/dist-BVSLTpoP.mjs +250 -0
  79. package/.output/server/_ssr/downloadBundle-CNnYxYO2.mjs +24 -0
  80. package/.output/server/_ssr/{empty-plugin-adapters-B4HCzgmM.mjs → empty-plugin-adapters-B5QvGpEl.mjs} +1 -1
  81. package/.output/server/_ssr/field-DASCh-5d.mjs +74 -0
  82. package/.output/server/_ssr/{getBundleChildren-CVtSiH5t.mjs → getBundleChildren-BcRMFoDF.mjs} +10 -18
  83. package/.output/server/_ssr/input-group-etIsBUqv.mjs +288 -0
  84. package/.output/server/_ssr/insights-api-C1F7UreR.mjs +71 -0
  85. package/.output/server/_ssr/insights-input-9fEJF-ZG.mjs +96 -0
  86. package/.output/server/_ssr/insights-rpc-C-8R6kED.mjs +155 -0
  87. package/.output/server/_ssr/insights-ygT_aIfo.mjs +858 -0
  88. package/.output/server/_ssr/installations-DqRT1QTd.mjs +535 -0
  89. package/.output/server/_ssr/installations-K8TCYTYh.mjs +19 -0
  90. package/.output/server/_ssr/router-BxBEvtF1.mjs +513 -0
  91. package/.output/server/_ssr/routes-BC7rn-tf.mjs +37 -0
  92. package/.output/server/_ssr/routes-CM5KAwpB.mjs +2285 -0
  93. package/.output/server/_ssr/runtime.server-la7TRAH_.mjs +527 -0
  94. package/.output/server/_ssr/server-CpzW--lT.mjs +7468 -0
  95. package/.output/server/_ssr/signing-jk4HANnl.mjs +134 -0
  96. package/.output/server/_ssr/ssr.mjs +4 -5740
  97. package/.output/server/_ssr/start-DpViQGnt.mjs +4 -0
  98. package/.output/server/_ssr/table-CU58HeI7.mjs +53 -0
  99. package/.output/server/_ssr/uuidv7-CaKuKXrV.mjs +31 -0
  100. package/.output/server/_tanstack-start-manifest_v-Mz9MmSlD.mjs +103 -0
  101. package/.output/server/index.mjs +229 -47
  102. package/README.md +29 -8
  103. package/lib/index.d.mts +35 -0
  104. package/lib/index.mjs +4 -0
  105. package/lib/vite-internal.mjs +127 -0
  106. package/lib/vite.d.mts +10 -0
  107. package/lib/vite.mjs +5 -0
  108. package/package.json +51 -29
  109. package/public/apple-touch-icon.png +0 -0
  110. package/public/favicon-16x16.png +0 -0
  111. package/public/favicon-32x32.png +0 -0
  112. package/public/favicon.ico +0 -0
  113. package/public/logo.svg +1 -0
  114. package/public/manifest.json +30 -0
  115. package/public/robots.txt +3 -0
  116. package/src/components/AppSidebar.tsx +159 -0
  117. package/src/components/BundleIdDisplay.tsx +18 -0
  118. package/src/components/ChannelBadge.tsx +31 -0
  119. package/src/components/ConsoleAccessPage.tsx +122 -0
  120. package/src/components/EnabledStatusIcon.tsx +54 -0
  121. package/src/components/HashValueDisplay.tsx +85 -0
  122. package/src/components/HotUpdaterLogo.tsx +30 -0
  123. package/src/components/NotFoundPage.tsx +33 -0
  124. package/src/components/PlatformIcon.tsx +39 -0
  125. package/src/components/RolloutPercentageBadge.tsx +28 -0
  126. package/src/components/ThemeProvider.tsx +116 -0
  127. package/src/components/TimestampDisplay.tsx +41 -0
  128. package/src/components/features/api-keys/ApiKeysPage.tsx +377 -0
  129. package/src/components/features/bundles/BundleActivityChart.tsx +193 -0
  130. package/src/components/features/bundles/BundleChildrenPanel.tsx +201 -0
  131. package/src/components/features/bundles/BundleInsightsSummary.tsx +123 -0
  132. package/src/components/features/bundles/BundleMetadata.tsx +136 -0
  133. package/src/components/features/bundles/RolloutCohortsDialog.tsx +201 -0
  134. package/src/components/features/channels/ChannelManagementDialog.tsx +228 -0
  135. package/src/components/features/insights/ActivityChart.tsx +150 -0
  136. package/src/components/features/insights/BundleDistribution.tsx +133 -0
  137. package/src/components/features/insights/BundleSelector.tsx +114 -0
  138. package/src/components/features/insights/InsightsCapabilityContext.tsx +24 -0
  139. package/src/components/features/insights/InsightsControls.tsx +115 -0
  140. package/src/components/features/insights/InsightsErrorAlert.tsx +21 -0
  141. package/src/components/features/insights/InsightsOverview.tsx +208 -0
  142. package/src/components/features/insights/InstallationHistoryCard.tsx +248 -0
  143. package/src/components/features/insights/InstallationMatchesCard.tsx +132 -0
  144. package/src/components/features/insights/InstallationPageHeader.tsx +138 -0
  145. package/src/components/features/insights/InstallationPagination.tsx +48 -0
  146. package/src/components/features/insights/InstallationSearch.tsx +230 -0
  147. package/src/components/features/insights/UpdateOutcomes.tsx +147 -0
  148. package/src/components/features/releases/ReleaseEditorSheet.tsx +879 -0
  149. package/src/components/features/releases/ReleaseStateBadge.tsx +20 -0
  150. package/src/components/features/signing/BundleSigningPage.tsx +139 -0
  151. package/src/components/ui/alert-dialog.tsx +185 -0
  152. package/src/components/ui/alert.tsx +76 -0
  153. package/src/components/ui/badge.tsx +49 -0
  154. package/src/components/ui/button.tsx +58 -0
  155. package/src/components/ui/card.tsx +89 -0
  156. package/src/components/ui/chart.tsx +371 -0
  157. package/src/components/ui/combobox.tsx +303 -0
  158. package/src/components/ui/dialog.tsx +156 -0
  159. package/src/components/ui/dropdown-menu.tsx +270 -0
  160. package/src/components/ui/field.tsx +235 -0
  161. package/src/components/ui/input-group.tsx +147 -0
  162. package/src/components/ui/input.tsx +19 -0
  163. package/src/components/ui/label.tsx +25 -0
  164. package/src/components/ui/progress.tsx +84 -0
  165. package/src/components/ui/select.tsx +205 -0
  166. package/src/components/ui/separator.tsx +23 -0
  167. package/src/components/ui/sheet.tsx +132 -0
  168. package/src/components/ui/sidebar.tsx +779 -0
  169. package/src/components/ui/skeleton.tsx +13 -0
  170. package/src/components/ui/slider.tsx +56 -0
  171. package/src/components/ui/sonner.tsx +45 -0
  172. package/src/components/ui/switch.tsx +25 -0
  173. package/src/components/ui/table.tsx +114 -0
  174. package/src/components/ui/textarea.tsx +18 -0
  175. package/src/components/ui/toggle-group.tsx +89 -0
  176. package/src/components/ui/toggle.tsx +43 -0
  177. package/src/components/ui/tooltip.tsx +66 -0
  178. package/src/hooks/use-mobile.ts +30 -0
  179. package/src/index.ts +47 -0
  180. package/src/lib/api-keys-api.ts +69 -0
  181. package/src/lib/api-keys-rpc.ts +87 -0
  182. package/src/lib/api-rpc.ts +478 -0
  183. package/src/lib/api.ts +444 -0
  184. package/src/lib/auth-rpc.ts +16 -0
  185. package/src/lib/bundle-signing-api.ts +14 -0
  186. package/src/lib/bundle-signing-rpc.ts +16 -0
  187. package/src/lib/constants.ts +1 -0
  188. package/src/lib/git.ts +51 -0
  189. package/src/lib/insights-api.ts +144 -0
  190. package/src/lib/insights-error.ts +19 -0
  191. package/src/lib/insights-input.ts +187 -0
  192. package/src/lib/insights-overview.ts +170 -0
  193. package/src/lib/insights-rpc.ts +218 -0
  194. package/src/lib/server/auth.server.ts +43 -0
  195. package/src/lib/server/bundle-signing.server.ts +23 -0
  196. package/src/lib/server/config.server.ts +109 -0
  197. package/src/lib/server/console-runtime.server.ts +61 -0
  198. package/src/lib/server/deleteBundle.ts +145 -0
  199. package/src/lib/server/downloadBundle.ts +46 -0
  200. package/src/lib/server/getBundleChildren.ts +130 -0
  201. package/src/lib/server/listReleases.ts +61 -0
  202. package/src/lib/server/releaseActivity.ts +27 -0
  203. package/src/lib/server/releaseReachability.ts +95 -0
  204. package/src/lib/server/runtime.server.ts +172 -0
  205. package/src/lib/utils.ts +9 -0
  206. package/src/logo.svg +1 -0
  207. package/src/routeTree.gen.ts +199 -0
  208. package/src/router.tsx +21 -0
  209. package/src/routes/-installations-search.ts +19 -0
  210. package/src/routes/-releases-search.ts +74 -0
  211. package/src/routes/__root.tsx +174 -0
  212. package/src/routes/api/auth/$.ts +19 -0
  213. package/src/routes/api/bundles/$bundleId/download.ts +17 -0
  214. package/src/routes/api-keys.tsx +37 -0
  215. package/src/routes/index.tsx +982 -0
  216. package/src/routes/insights.tsx +139 -0
  217. package/src/routes/installations.tsx +194 -0
  218. package/src/routes/signing.tsx +37 -0
  219. package/src/styles.css +152 -0
  220. package/src/virtual-modules.d.ts +21 -0
  221. package/src/vite-env.d.ts +1 -0
  222. package/src/vite-internal.ts +195 -0
  223. package/src/vite.ts +12 -0
  224. package/.output/public/assets/dist-DJX53faP.js +0 -3
  225. package/.output/public/assets/index-Iylis5kY.js +0 -10
  226. package/.output/public/assets/routes-HT21hs0C.js +0 -54
  227. package/.output/public/assets/styles-C0Re4quB.css +0 -2
  228. package/.output/server/__23tanstack-start-server-fn-resolver-CgwgZ0-i.mjs +0 -66
  229. package/.output/server/_libs/@floating-ui/core+[...].mjs +0 -698
  230. package/.output/server/_libs/@floating-ui/dom+[...].mjs +0 -644
  231. package/.output/server/_libs/@floating-ui/react-dom+[...].mjs +0 -839
  232. package/.output/server/_libs/@radix-ui/react-alert-dialog+[...].mjs +0 -2138
  233. package/.output/server/_libs/@radix-ui/react-popper+[...].mjs +0 -308
  234. package/.output/server/_libs/@radix-ui/react-select+[...].mjs +0 -1038
  235. package/.output/server/_libs/@tanstack/devtools-event-client+[...].mjs +0 -196
  236. package/.output/server/_libs/@tanstack/form-core+[...].mjs +0 -3228
  237. package/.output/server/_libs/@tanstack/react-form+[...].mjs +0 -430
  238. package/.output/server/_libs/@tanstack/react-table+[...].mjs +0 -2382
  239. package/.output/server/_libs/radix-ui__number.mjs +0 -6
  240. package/.output/server/_libs/radix-ui__primitive.mjs +0 -9
  241. package/.output/server/_libs/radix-ui__react-arrow.mjs +0 -23
  242. package/.output/server/_libs/radix-ui__react-collection.mjs +0 -78
  243. package/.output/server/_libs/radix-ui__react-direction.mjs +0 -13
  244. package/.output/server/_libs/radix-ui__react-label.mjs +0 -22
  245. package/.output/server/_libs/radix-ui__react-separator.mjs +0 -30
  246. package/.output/server/_libs/radix-ui__react-slider.mjs +0 -510
  247. package/.output/server/_libs/radix-ui__react-switch.mjs +0 -157
  248. package/.output/server/_libs/radix-ui__react-tooltip.mjs +0 -493
  249. package/.output/server/_ssr/api-rpc-BIbDUKSz.mjs +0 -292
  250. package/.output/server/_ssr/config.server-BSS366KT.mjs +0 -41
  251. package/.output/server/_ssr/deleteBundle-BgbZTtpW.mjs +0 -141
  252. package/.output/server/_ssr/dist-KboydRVk.mjs +0 -120
  253. package/.output/server/_ssr/router-C3hqEy3k.mjs +0 -307
  254. package/.output/server/_ssr/routes-B0lQvvlC.mjs +0 -3048
  255. package/.output/server/_ssr/start-02sLteYG.mjs +0 -4
  256. package/.output/server/_ssr/storageProfile-FVkjPoGb.mjs +0 -9
  257. package/.output/server/_tanstack-start-manifest_v-Bpx52WOU.mjs +0 -20
  258. package/.output/server/node_modules/tslib/modules/index.js +0 -70
  259. package/.output/server/node_modules/tslib/modules/package.json +0 -3
  260. package/.output/server/node_modules/tslib/package.json +0 -47
  261. package/.output/server/node_modules/tslib/tslib.js +0 -484
  262. package/.output/server/package.json +0 -9
@@ -0,0 +1,21 @@
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/auth-BF8mbAgF.js
2
+ var principal = {
3
+ email: "local@hot-updater.dev",
4
+ name: "Local Console"
5
+ };
6
+ var auth_default = {
7
+ async handle() {
8
+ return new Response("Not Found", { status: 404 });
9
+ },
10
+ async getAccess() {
11
+ return {
12
+ status: "authorized",
13
+ principal
14
+ };
15
+ },
16
+ async getProviders() {
17
+ return [];
18
+ }
19
+ };
20
+ //#endregion
21
+ export { auth_default as default };
@@ -0,0 +1,24 @@
1
+ import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
2
+ import { t as createServerRpc } from "./createServerRpc-DB29C_5p.mjs";
3
+ import { r as getRequest } from "./server-CpzW--lT.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/auth-rpc-BFMEC-TT.js
5
+ var getConsoleAccessRpc_createServerFn_handler = createServerRpc({
6
+ id: "c504696e68ba764b48c48aa8a40275938640941e473cf9cfdd7b2322d99f9d13",
7
+ name: "getConsoleAccessRpc",
8
+ filename: "src/lib/auth-rpc.ts"
9
+ }, (opts) => getConsoleAccessRpc.__executeServer(opts));
10
+ var getConsoleAccessRpc = createServerFn({ method: "GET" }).handler(getConsoleAccessRpc_createServerFn_handler, async () => {
11
+ const { getConsoleAccess } = await import("./auth.server-DW71WzsD.mjs");
12
+ return getConsoleAccess(getRequest());
13
+ });
14
+ var getConsoleAuthProvidersRpc_createServerFn_handler = createServerRpc({
15
+ id: "fa8c48f0489d97c62b9b68fd0caf0a61b15bad25a42b3866ec36264b4b30bb74",
16
+ name: "getConsoleAuthProvidersRpc",
17
+ filename: "src/lib/auth-rpc.ts"
18
+ }, (opts) => getConsoleAuthProvidersRpc.__executeServer(opts));
19
+ var getConsoleAuthProvidersRpc = createServerFn({ method: "GET" }).handler(getConsoleAuthProvidersRpc_createServerFn_handler, async () => {
20
+ const { getConsoleAuthProviders } = await import("./auth.server-DW71WzsD.mjs");
21
+ return getConsoleAuthProviders(getRequest());
22
+ });
23
+ //#endregion
24
+ export { getConsoleAccessRpc_createServerFn_handler, getConsoleAuthProvidersRpc_createServerFn_handler };
@@ -0,0 +1,47 @@
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/auth.server-DW71WzsD.js
2
+ var readString = (value, key) => {
3
+ if (typeof value !== "object" || value === null) return void 0;
4
+ const member = Reflect.get(value, key);
5
+ return typeof member === "string" && member.trim().length > 0 ? member.trim() : void 0;
6
+ };
7
+ var getProviderName = (signing) => {
8
+ return readString(signing, "name")?.slice(0, 80) ?? (readString(signing, "privateKeyPath") ? "localSigning" : void 0) ?? "Configured provider";
9
+ };
10
+ var sanitizeConsoleSigningConfig = (signing) => {
11
+ if (typeof signing !== "object" || signing === null) return void 0;
12
+ const privateKeyPath = readString(signing, "privateKeyPath");
13
+ if (Reflect.get(signing, "enabled") === false || privateKeyPath && Reflect.get(signing, "enabled") !== true) return void 0;
14
+ return {
15
+ enabled: true,
16
+ provider: getProviderName(signing)
17
+ };
18
+ };
19
+ var getConsoleAuthAdapter = async () => {
20
+ return (await import("./auth-BF8mbAgF.mjs")).default;
21
+ };
22
+ var resolveConsoleConfig = async (request) => {
23
+ const { default: source } = await import("./config-Dv8qLDZ0.mjs");
24
+ const { signing: signingSource, ...configWithoutSigning } = typeof source === "function" ? await source(request) : source;
25
+ const signing = sanitizeConsoleSigningConfig(signingSource);
26
+ return {
27
+ ...configWithoutSigning,
28
+ ...signing === void 0 ? {} : { signing }
29
+ };
30
+ };
31
+ var accessError = (access) => new Response(access.status === "unauthenticated" ? "Unauthorized" : "Forbidden", { status: access.status === "unauthenticated" ? 401 : 403 });
32
+ var getConsoleAccess = async (request) => {
33
+ return (await getConsoleAuthAdapter()).getAccess(request);
34
+ };
35
+ var getConsoleAuthProviders = async (request) => {
36
+ return (await getConsoleAuthAdapter()).getProviders(request);
37
+ };
38
+ var handleConsoleAuth = async (request) => {
39
+ return (await getConsoleAuthAdapter()).handle(request);
40
+ };
41
+ var requireConsoleAccess = async (request) => {
42
+ const access = await getConsoleAccess(request);
43
+ if (access.status !== "authorized") throw accessError(access);
44
+ return access.principal;
45
+ };
46
+ //#endregion
47
+ export { getConsoleAccess, getConsoleAuthProviders, handleConsoleAuth, requireConsoleAccess, resolveConsoleConfig as t };
@@ -0,0 +1,26 @@
1
+ import { nt as useRender, rt as mergeProps } from "../_libs/@base-ui/react+[...].mjs";
2
+ import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
3
+ import { C as cn } from "./createSsrRpc-DhfrxEjg.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/badge-CpWXQwyF.js
5
+ var badgeVariants = cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
6
+ variants: { variant: {
7
+ default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
8
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
9
+ destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
10
+ outline: "text-foreground"
11
+ } },
12
+ defaultVariants: { variant: "default" }
13
+ });
14
+ function Badge({ className, variant = "default", render, ...props }) {
15
+ return useRender({
16
+ defaultTagName: "span",
17
+ props: mergeProps({ className: cn(badgeVariants({ variant }), className) }, props),
18
+ render,
19
+ state: {
20
+ slot: "badge",
21
+ variant
22
+ }
23
+ });
24
+ }
25
+ //#endregion
26
+ export { Badge as t };
@@ -0,0 +1,16 @@
1
+ import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
2
+ import { t as createServerRpc } from "./createServerRpc-DB29C_5p.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/bundle-signing-rpc-BbCFUQSu.js
4
+ var getBundleSigningInspection = async () => {
5
+ const [{ prepareConfig }, { inspectBundleSigning }] = await Promise.all([import("./config.server-DQYEr_5X.mjs"), import("./bundle-signing.server-C4NW5mWx.mjs")]);
6
+ const { config } = await prepareConfig();
7
+ return inspectBundleSigning(config.signing);
8
+ };
9
+ var getBundleSigningInspectionRpc_createServerFn_handler = createServerRpc({
10
+ id: "662034966679a6d29db2b55e7ba665e26e6c9a58a5529f33aa857a2049616233",
11
+ name: "getBundleSigningInspectionRpc",
12
+ filename: "src/lib/bundle-signing-rpc.ts"
13
+ }, (opts) => getBundleSigningInspectionRpc.__executeServer(opts));
14
+ var getBundleSigningInspectionRpc = createServerFn({ method: "GET" }).handler(getBundleSigningInspectionRpc_createServerFn_handler, getBundleSigningInspection);
15
+ //#endregion
16
+ export { getBundleSigningInspectionRpc_createServerFn_handler };
@@ -0,0 +1,12 @@
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/bundle-signing.server-C4NW5mWx.js
2
+ var DEFAULT_PROVIDER = "Configured provider";
3
+ var inspectBundleSigning = async (signing) => {
4
+ if (!signing?.enabled) return { status: "disabled" };
5
+ return {
6
+ algorithm: "RSA-SHA256",
7
+ provider: signing.provider ?? DEFAULT_PROVIDER,
8
+ status: "enabled"
9
+ };
10
+ };
11
+ //#endregion
12
+ export { inspectBundleSigning };
@@ -0,0 +1,86 @@
1
+ import "../_runtime.mjs";
2
+ import { at as require_react, it as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
+ import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
4
+ import { C as cn } from "./createSsrRpc-DhfrxEjg.mjs";
5
+ require_react();
6
+ var import_jsx_runtime = require_jsx_runtime();
7
+ var alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2 py-1.5 text-left text-xs/relaxed has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-1.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-3.5", {
8
+ variants: { variant: {
9
+ default: "bg-card text-card-foreground",
10
+ destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
11
+ } },
12
+ defaultVariants: { variant: "default" }
13
+ });
14
+ function Alert({ className, variant, ...props }) {
15
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
16
+ "data-slot": "alert",
17
+ role: "alert",
18
+ className: cn(alertVariants({ variant }), className),
19
+ ...props
20
+ });
21
+ }
22
+ function AlertTitle({ className, ...props }) {
23
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
24
+ "data-slot": "alert-title",
25
+ className: cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className),
26
+ ...props
27
+ });
28
+ }
29
+ function AlertDescription({ className, ...props }) {
30
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
31
+ "data-slot": "alert-description",
32
+ className: cn("text-xs/relaxed text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
33
+ ...props
34
+ });
35
+ }
36
+ function AlertAction({ className, ...props }) {
37
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
38
+ "data-slot": "alert-action",
39
+ className: cn("absolute top-1.5 right-2", className),
40
+ ...props
41
+ });
42
+ }
43
+ function Card({ className, ...props }) {
44
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
45
+ "data-slot": "card",
46
+ className: cn("rounded-xl border bg-card text-card-foreground shadow", className),
47
+ ...props
48
+ });
49
+ }
50
+ function CardHeader({ className, ...props }) {
51
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
52
+ "data-slot": "card-header",
53
+ className: cn("flex flex-col space-y-1.5 p-6", className),
54
+ ...props
55
+ });
56
+ }
57
+ function CardTitle({ className, ...props }) {
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
59
+ "data-slot": "card-title",
60
+ className: cn("font-semibold leading-none tracking-tight", className),
61
+ ...props
62
+ });
63
+ }
64
+ function CardDescription({ className, ...props }) {
65
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
66
+ "data-slot": "card-description",
67
+ className: cn("text-sm text-muted-foreground", className),
68
+ ...props
69
+ });
70
+ }
71
+ function CardContent({ className, ...props }) {
72
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
73
+ "data-slot": "card-content",
74
+ className: cn("p-6 pt-0", className),
75
+ ...props
76
+ });
77
+ }
78
+ function CardFooter({ className, ...props }) {
79
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
80
+ "data-slot": "card-footer",
81
+ className: cn("flex items-center p-6 pt-0", className),
82
+ ...props
83
+ });
84
+ }
85
+ //#endregion
86
+ export { Card as a, CardFooter as c, AlertTitle as i, CardHeader as l, AlertAction as n, CardContent as o, AlertDescription as r, CardDescription as s, Alert as t, CardTitle as u };
@@ -0,0 +1,13 @@
1
+ import { loadConfig } from "@hot-updater/cli-tools";
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/config-Dv8qLDZ0.js
3
+ var config_default = async () => {
4
+ const config = await loadConfig(null);
5
+ return {
6
+ console: { gitUrl: config.console.gitUrl },
7
+ database: config.database,
8
+ signing: config.signing,
9
+ storage: config.storage
10
+ };
11
+ };
12
+ //#endregion
13
+ export { config_default as default };
@@ -0,0 +1,361 @@
1
+ import { l as getBundlePatches } from "./dist-BVSLTpoP.mjs";
2
+ import { i as bundleToRow, n as bundleMetadataToRow, o as rowsToBundles, r as bundleToPatchRows, t as DatabasePluginInputError } from "./databaseRows-QlCYLi0H.mjs";
3
+ import { r as getRequest } from "./server-CpzW--lT.mjs";
4
+ import { requireConsoleAccess, t as resolveConsoleConfig } from "./auth.server-DW71WzsD.mjs";
5
+ //#region node_modules/.nitro/vite/services/ssr/assets/config.server-DQYEr_5X.js
6
+ /**
7
+ * Calculate pagination information based on total count, limit, and offset
8
+ */
9
+ function calculatePagination(total, options) {
10
+ const { limit, offset } = options;
11
+ if (total === 0) return {
12
+ total: 0,
13
+ hasNextPage: false,
14
+ hasPreviousPage: false,
15
+ currentPage: 1,
16
+ totalPages: 0
17
+ };
18
+ const currentPage = Math.floor(offset / limit) + 1;
19
+ const totalPages = Math.ceil(total / limit);
20
+ return {
21
+ total,
22
+ hasNextPage: offset + limit < total,
23
+ hasPreviousPage: offset > 0,
24
+ currentPage,
25
+ totalPages
26
+ };
27
+ }
28
+ var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
29
+ var validateBundlePagination = (options) => {
30
+ if (!Number.isSafeInteger(options.limit) || options.limit <= 0 || options.page !== void 0 && (!Number.isSafeInteger(options.page) || options.page <= 0) || options.page !== void 0 && options.cursor !== void 0) throw new DatabasePluginInputError("invalid-pagination");
31
+ const cursor = options.cursor;
32
+ if (cursor === void 0) return;
33
+ if (!isRecord(cursor)) throw new DatabasePluginInputError("invalid-pagination");
34
+ const hasAfter = Object.hasOwn(cursor, "after");
35
+ if (hasAfter === Object.hasOwn(cursor, "before")) throw new DatabasePluginInputError("invalid-pagination");
36
+ const value = hasAfter ? cursor.after : cursor.before;
37
+ if (typeof value !== "string" || value.length === 0) throw new DatabasePluginInputError("invalid-pagination");
38
+ };
39
+ var DatabaseAtomicCommitUnsupportedError = class extends Error {
40
+ name = "DatabaseAtomicCommitUnsupportedError";
41
+ constructor(pluginName) {
42
+ super(`Database plugin "${pluginName}" cannot atomically commit changes across models.`);
43
+ this.pluginName = pluginName;
44
+ }
45
+ };
46
+ /**
47
+ * Internal provider signal for a delete rejected by a live reference.
48
+ *
49
+ * Provider implementations throw this after translating their native
50
+ * foreign-key or reference-condition error. The public database contract
51
+ * observes only the indexed `referenced` commit conflict.
52
+ */
53
+ var DatabaseRowReferencedError = class extends Error {
54
+ name = "DatabaseRowReferencedError";
55
+ constructor() {
56
+ super("The database row is still referenced.");
57
+ }
58
+ };
59
+ function assertStorageOperations(plugin, operations) {
60
+ for (const operation of operations) if (typeof plugin[operation] !== "function") throw new Error(`Storage plugin "${plugin.name}" does not implement ${operation}.`);
61
+ }
62
+ var DatabasePatchUpdateUnsupportedError = class extends Error {
63
+ name = "DatabasePatchUpdateUnsupportedError";
64
+ constructor(bundleId, pluginName) {
65
+ super(`Database plugin "${pluginName}" cannot atomically replace patches for bundle "${bundleId}".`);
66
+ this.bundleId = bundleId;
67
+ this.pluginName = pluginName;
68
+ }
69
+ };
70
+ var bundleUpdateToRow = (update, _channelId) => {
71
+ return {
72
+ ...update.platform !== void 0 ? { platform: update.platform } : {},
73
+ ...update.fileHash !== void 0 ? { file_hash: update.fileHash } : {},
74
+ ...update.gitCommitHash !== void 0 ? { git_commit_hash: update.gitCommitHash } : {},
75
+ ...update.storageUri !== void 0 ? { storage_uri: update.storageUri } : {},
76
+ ...update.archiveByteSize !== void 0 ? { archive_byte_size: update.archiveByteSize } : {},
77
+ ...update.metadata !== void 0 ? { metadata: bundleMetadataToRow(update.metadata) } : {},
78
+ ...update.manifestStorageUri !== void 0 ? { manifest_storage_uri: update.manifestStorageUri } : {},
79
+ ...update.manifestFileHash !== void 0 ? { manifest_file_hash: update.manifestFileHash } : {},
80
+ ...update.assetBaseStorageUri !== void 0 ? { asset_base_storage_uri: update.assetBaseStorageUri } : {}
81
+ };
82
+ };
83
+ var bundleUpdateToPatchRows = (bundleId, update) => getBundlePatches({ patches: update.patches }).map((patch, orderIndex) => ({
84
+ id: `${bundleId}:${patch.baseBundleId}`,
85
+ bundle_id: bundleId,
86
+ base_bundle_id: patch.baseBundleId,
87
+ base_file_hash: patch.baseFileHash,
88
+ patch_file_hash: patch.patchFileHash,
89
+ patch_storage_uri: patch.patchStorageUri,
90
+ byte_size: patch.byteSize,
91
+ order_index: orderIndex
92
+ }));
93
+ var PAGE_SIZE = 100;
94
+ var mergeIdFilter = (where, id) => ({
95
+ ...where,
96
+ id: {
97
+ ...where?.id,
98
+ ...id
99
+ }
100
+ });
101
+ var loadBundleRows = async (database, where) => {
102
+ const finiteIds = where?.id?.in;
103
+ if (finiteIds) {
104
+ if (finiteIds.length === 0) return [];
105
+ return [...await database.models.bundles.findMany({
106
+ where,
107
+ limit: finiteIds.length,
108
+ offset: 0,
109
+ orderBy: {
110
+ field: "id",
111
+ direction: "asc"
112
+ }
113
+ })];
114
+ }
115
+ const [cutoff] = await database.models.bundles.findMany({
116
+ where,
117
+ limit: 1,
118
+ offset: 0,
119
+ orderBy: {
120
+ field: "id",
121
+ direction: "desc"
122
+ }
123
+ });
124
+ if (!cutoff) return [];
125
+ const rows = [];
126
+ let after;
127
+ for (;;) {
128
+ const page = await database.models.bundles.findMany({
129
+ where: mergeIdFilter(where, {
130
+ lte: cutoff.id,
131
+ ...after ? { gt: after } : {}
132
+ }),
133
+ limit: PAGE_SIZE,
134
+ offset: 0,
135
+ orderBy: {
136
+ field: "id",
137
+ direction: "asc"
138
+ }
139
+ });
140
+ rows.push(...page);
141
+ if (page.length < PAGE_SIZE) return rows;
142
+ after = page.at(-1)?.id;
143
+ }
144
+ };
145
+ var hydrateRows = async (database, ownerRows) => {
146
+ const patchRows = await database.models.bundlePatches.findByBundleIds(ownerRows.map(({ id }) => id));
147
+ const ownerIds = new Set(ownerRows.map(({ id }) => id));
148
+ const referencedIds = [...new Set(patchRows.map(({ base_bundle_id }) => base_bundle_id).filter((id) => !ownerIds.has(id)))];
149
+ return rowsToBundles(ownerRows, patchRows, referencedIds.length === 0 ? [] : await loadBundleRows(database, { id: { in: referencedIds } }));
150
+ };
151
+ var cursorIdFilter = (cursor, direction) => {
152
+ if (cursor?.after) return { [direction === "desc" ? "lt" : "gt"]: cursor.after };
153
+ if (cursor?.before) return { [direction === "desc" ? "gt" : "lt"]: cursor.before };
154
+ };
155
+ var responsePage = async (database, options) => {
156
+ validateBundlePagination(options);
157
+ const direction = options.orderBy?.direction ?? "desc";
158
+ const offset = options.page ? Math.max(0, options.page - 1) * options.limit : 0;
159
+ const cursor = options.page ? void 0 : options.cursor;
160
+ const queryLimit = cursor ? options.limit + 1 : options.limit;
161
+ if (!Number.isSafeInteger(offset) || !Number.isSafeInteger(queryLimit) || !Number.isSafeInteger(offset + queryLimit)) throw new DatabasePluginInputError("invalid-pagination");
162
+ const cursorFilter = cursorIdFilter(cursor, direction);
163
+ const where = cursorFilter ? mergeIdFilter(options.where, cursorFilter) : options.where;
164
+ const queryDirection = cursor?.before ? direction === "desc" ? "asc" : "desc" : direction;
165
+ const [queriedRows, total] = await Promise.all([database.models.bundles.findMany({
166
+ where,
167
+ limit: queryLimit,
168
+ offset,
169
+ orderBy: {
170
+ field: "id",
171
+ direction: queryDirection
172
+ }
173
+ }), database.models.bundles.count(options.where)]);
174
+ const hasMore = cursor ? queriedRows.length > options.limit : false;
175
+ const pageRows = cursor ? queriedRows.slice(0, options.limit) : queriedRows;
176
+ const ownerRows = cursor?.before ? pageRows.toReversed() : pageRows;
177
+ const pagination = calculatePagination(total, {
178
+ limit: options.limit,
179
+ offset
180
+ });
181
+ const hasPreviousPage = cursor ? Boolean(cursor.after) || hasMore : pagination.hasPreviousPage;
182
+ const hasNextPage = cursor ? Boolean(cursor.before) || hasMore : pagination.hasNextPage;
183
+ const firstId = ownerRows[0]?.id;
184
+ const lastId = ownerRows.at(-1)?.id;
185
+ return {
186
+ data: await hydrateRows(database, ownerRows),
187
+ pagination: {
188
+ ...pagination,
189
+ hasNextPage,
190
+ hasPreviousPage,
191
+ ...hasNextPage && lastId ? { nextCursor: lastId } : {},
192
+ ...hasPreviousPage && firstId ? { previousCursor: firstId } : {},
193
+ ...!firstId && cursor?.after ? { previousCursor: cursor.after } : {},
194
+ ...!lastId && cursor?.before ? { nextCursor: cursor.before } : {}
195
+ }
196
+ };
197
+ };
198
+ var DatabaseBundleNotFoundError = class extends Error {
199
+ name = "DatabaseBundleNotFoundError";
200
+ constructor(bundleId) {
201
+ super(`Bundle "${bundleId}" was not found.`);
202
+ this.bundleId = bundleId;
203
+ }
204
+ };
205
+ var DatabasePatchInsertUnsupportedError = class extends Error {
206
+ name = "DatabasePatchInsertUnsupportedError";
207
+ constructor(bundleId, pluginName) {
208
+ super(`Database plugin "${pluginName}" cannot atomically insert patches for bundle "${bundleId}".`);
209
+ this.bundleId = bundleId;
210
+ this.pluginName = pluginName;
211
+ }
212
+ };
213
+ var insertChanges = (bundle) => [{
214
+ model: "bundles",
215
+ operation: "insert",
216
+ row: bundleToRow(bundle)
217
+ }, ...bundleToPatchRows(bundle).map((row) => ({
218
+ model: "bundlePatches",
219
+ operation: "insert",
220
+ row
221
+ }))];
222
+ var updateChanges = (bundleId, update) => {
223
+ const rowUpdate = bundleUpdateToRow(update);
224
+ return [{
225
+ model: "bundles",
226
+ operation: "update",
227
+ where: { id: bundleId },
228
+ update: rowUpdate
229
+ }, ...Object.hasOwn(update, "patches") ? [{
230
+ model: "bundlePatches",
231
+ operation: "delete",
232
+ where: { bundleId }
233
+ }, ...bundleUpdateToPatchRows(bundleId, update).map((row) => ({
234
+ model: "bundlePatches",
235
+ operation: "insert",
236
+ row
237
+ }))] : []];
238
+ };
239
+ var deleteChanges = (bundleId) => [{
240
+ model: "bundles",
241
+ operation: "delete",
242
+ where: { id: bundleId }
243
+ }];
244
+ var createDatabaseClient = (plugin) => {
245
+ const getBundleById = async (id) => {
246
+ const row = await plugin.models.bundles.findById(id);
247
+ if (!row) return null;
248
+ return (await hydrateRows(plugin, [row]))[0] ?? null;
249
+ };
250
+ const insertChannel = (input) => plugin.models.channels.insert(input);
251
+ const createMutationClient = (commit) => ({
252
+ getBundleById,
253
+ getBundles: (options) => responsePage(plugin, options),
254
+ async getChannels() {
255
+ return (await plugin.models.channels.list({})).channels;
256
+ },
257
+ insertChannel,
258
+ async insertBundle(bundle) {
259
+ try {
260
+ await commit(insertChanges(bundle));
261
+ } catch (error) {
262
+ if (error instanceof DatabaseAtomicCommitUnsupportedError && bundleToPatchRows(bundle).length > 0) throw new DatabasePatchInsertUnsupportedError(bundle.id, plugin.name);
263
+ throw error;
264
+ }
265
+ },
266
+ async updateBundleById(bundleId, update) {
267
+ try {
268
+ if (!(await commit(updateChanges(bundleId, update))).committed) throw new DatabaseBundleNotFoundError(bundleId);
269
+ } catch (error) {
270
+ if (error instanceof DatabaseAtomicCommitUnsupportedError && Object.hasOwn(update, "patches")) throw new DatabasePatchUpdateUnsupportedError(bundleId, plugin.name);
271
+ throw error;
272
+ }
273
+ },
274
+ async deleteBundleById(bundleId) {
275
+ const result = await commit(deleteChanges(bundleId));
276
+ if (!result.committed && result.conflict.reason === "referenced") throw new DatabaseRowReferencedError();
277
+ }
278
+ });
279
+ const runMutation = async (operation) => {
280
+ const changes = [];
281
+ const result = await operation(createMutationClient(async (input) => {
282
+ changes.push(...input);
283
+ return { committed: true };
284
+ }));
285
+ if (changes.length === 0) return result;
286
+ const commitResult = await plugin.commit({ changes });
287
+ if (!commitResult.committed) {
288
+ const change = changes[commitResult.conflict.changeIndex];
289
+ if (commitResult.conflict.reason === "referenced" && change?.model === "bundles" && change.operation === "delete") throw new DatabaseRowReferencedError();
290
+ if (change?.model === "bundles" && change.operation === "update") throw new DatabaseBundleNotFoundError(change.where.id);
291
+ throw new Error(`Database plugin "${plugin.name}" rejected a commit.`);
292
+ }
293
+ return result;
294
+ };
295
+ return {
296
+ ...createMutationClient((changes) => plugin.commit({ changes })),
297
+ deleteChannel: (input) => plugin.models.channels.delete(input),
298
+ mutate: runMutation
299
+ };
300
+ };
301
+ var configPromise = null;
302
+ var databaseClient = null;
303
+ var hotUpdater = null;
304
+ var apiKeyStore = null;
305
+ var apiKeyStoreResolved = false;
306
+ var storagePluginPromise = null;
307
+ var loadCachedConfig = async (request) => {
308
+ if (!configPromise) configPromise = resolveConsoleConfig(request).then((config) => ({
309
+ ...config,
310
+ console: config.console ?? {}
311
+ })).catch((error) => {
312
+ configPromise = null;
313
+ throw error;
314
+ });
315
+ return configPromise;
316
+ };
317
+ var loadCachedStoragePlugin = async (config) => {
318
+ if (!storagePluginPromise) storagePluginPromise = Promise.resolve(config.storage).then((storagePlugin) => {
319
+ assertStorageOperations(storagePlugin, [
320
+ "get",
321
+ "put",
322
+ "exists",
323
+ "delete"
324
+ ]);
325
+ return storagePlugin;
326
+ }).catch((error) => {
327
+ storagePluginPromise = null;
328
+ throw error;
329
+ });
330
+ return storagePluginPromise;
331
+ };
332
+ var prepareConfig = async (request = getRequest()) => {
333
+ try {
334
+ await requireConsoleAccess(request);
335
+ const config = await loadCachedConfig(request);
336
+ if (!databaseClient) databaseClient = createDatabaseClient(config.database);
337
+ if (!hotUpdater) {
338
+ const { createRuntimeHotUpdater } = await import("./runtime.server-la7TRAH_.mjs");
339
+ hotUpdater = createRuntimeHotUpdater(config);
340
+ }
341
+ if (!apiKeyStoreResolved) {
342
+ const { createApiKeyStore } = await import("./runtime.server-la7TRAH_.mjs");
343
+ apiKeyStore = createApiKeyStore(config);
344
+ apiKeyStoreResolved = true;
345
+ }
346
+ const storagePlugin = await loadCachedStoragePlugin(config);
347
+ return {
348
+ config,
349
+ databaseClient,
350
+ hotUpdater,
351
+ apiKeyStore,
352
+ storagePlugin
353
+ };
354
+ } catch (error) {
355
+ if (!(error instanceof Response && (error.status === 401 || error.status === 403))) console.error("Error during configuration initialization:", error);
356
+ throw error;
357
+ }
358
+ };
359
+ var isConfigLoaded = () => Boolean(configPromise);
360
+ //#endregion
361
+ export { isConfigLoaded, prepareConfig };
@@ -1,5 +1,5 @@
1
1
  import { AsyncLocalStorage } from "node:async_hooks";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/createServerFn-DzU0k62V.js
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/createServerFn-B2hcXoPM.js
3
3
  /**
4
4
  * Create a redirect Response understood by TanStack Router.
5
5
  *
@@ -0,0 +1,12 @@
1
+ import { i as TSS_SERVER_FUNCTION } from "./createServerFn-B2hcXoPM.mjs";
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/createServerRpc-DB29C_5p.js
3
+ var createServerRpc = (serverFnMeta, splitImportFn) => {
4
+ const url = "/_serverFn/" + serverFnMeta.id;
5
+ return Object.assign(splitImportFn, {
6
+ url,
7
+ serverFnMeta,
8
+ [TSS_SERVER_FUNCTION]: true
9
+ });
10
+ };
11
+ //#endregion
12
+ export { createServerRpc as t };