@hot-updater/console 1.0.0-rc.9 → 1.0.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.
Files changed (341) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/ConsoleFeatureUnavailable-jB4Loglh.js +1 -0
  3. package/.output/public/assets/EventDetails-B6yUsyNA.js +1 -0
  4. package/.output/public/assets/HashValueDisplay-BFX_kY3-.js +1 -0
  5. package/.output/public/assets/InsightsInfo-BNO0WznZ.js +1 -0
  6. package/.output/public/assets/InsightsPageHeader-B892oVml.js +1 -0
  7. package/.output/public/assets/NotFoundPage-DIqCpWa3.js +1 -0
  8. package/.output/public/assets/alert-dialog-Bbk_4-WJ.js +1 -0
  9. package/.output/public/assets/api-DCM0wr6O.js +1 -0
  10. package/.output/public/assets/api-keys-CIO9L_wu.js +1 -0
  11. package/.output/public/assets/api-keys-DVTL_--f.js +1 -0
  12. package/.output/public/assets/arrow-left-CnMYpqB7.js +1 -0
  13. package/.output/public/assets/arrow-up-right-BtffZA6e.js +1 -0
  14. package/.output/public/assets/chevron-right-BqD5wtFb.js +1 -0
  15. package/.output/public/assets/clipboard-DS9ucUQL.js +1 -0
  16. package/.output/public/assets/console-features-api-BH5m_PtQ.js +1 -0
  17. package/.output/public/assets/dialog-Bqbb7B0N.js +1 -0
  18. package/.output/public/assets/dist-LxKJB-Vu.js +1 -0
  19. package/.output/public/assets/empty-CuT2UhFp.js +1 -0
  20. package/.output/public/assets/field-BBDpjIqu.js +1 -0
  21. package/.output/public/assets/index-6o51GkFe.js +11 -0
  22. package/.output/public/assets/input-group-ja_30qaF.js +1 -0
  23. package/.output/public/assets/insights-CmraDzQh.js +1 -0
  24. package/.output/public/assets/insights-CxZ2GCYV.js +2 -0
  25. package/.output/public/assets/insights-api-BigAU9sZ.js +1 -0
  26. package/.output/public/assets/insights-usage-rpc-DYEhsCKT.js +1 -0
  27. package/.output/public/assets/insights-vNRCrfnS.js +42 -0
  28. package/.output/public/assets/insights_.distribution-ChOerfJt.js +1 -0
  29. package/.output/public/assets/insights_.distribution-D-e4iga8.js +1 -0
  30. package/.output/public/assets/insights_.distribution-DZtkibX1.js +2 -0
  31. package/.output/public/assets/installations-BazSJXE0.js +2 -0
  32. package/.output/public/assets/installations-ClHTqdAO.js +1 -0
  33. package/.output/public/assets/installations-DpKsBuHi.js +1 -0
  34. package/.output/public/assets/key-round-wS_SIZ6b.js +1 -0
  35. package/.output/public/assets/list-CgrYiadM.js +1 -0
  36. package/.output/public/assets/refresh-cw-BYgoNCco.js +1 -0
  37. package/.output/public/assets/remote-config-BWwHOkCK.js +1 -0
  38. package/.output/public/assets/remote-config-Br56BODb.js +6 -0
  39. package/.output/public/assets/remote-config-CXOi0LRu.js +1 -0
  40. package/.output/public/assets/routes-B88Erkpk.js +2 -0
  41. package/.output/public/assets/routes-CfzsAleC.js +1 -0
  42. package/.output/public/assets/search-DaTDPW25.js +1 -0
  43. package/.output/public/assets/select-BZZBXMkr.js +1 -0
  44. package/.output/public/assets/sidebar-DNVyJPfX.js +3 -0
  45. package/.output/public/assets/smartphone-DpTFgtKf.js +1 -0
  46. package/.output/public/assets/styles-DTGEAJFv.css +2 -0
  47. package/.output/public/assets/switch-DZ1TPwx-.js +1 -0
  48. package/.output/public/assets/table-Gm4qRWwE.js +1 -0
  49. package/.output/public/assets/tabs-C7FOEjFC.js +1 -0
  50. package/.output/public/assets/undo-2-CmrHjwFc.js +1 -0
  51. package/.output/public/assets/useCompositeListItem-9E4pj_CH.js +1 -0
  52. package/.output/public/assets/valueToPercent-CH8GCHaL.js +1 -0
  53. package/.output/server/__23tanstack-start-server-fn-resolver-BpRlos5Q.mjs +170 -0
  54. package/.output/server/_libs/@base-ui/react+[...].mjs +4389 -4207
  55. package/.output/server/_libs/@tanstack/react-router+[...].mjs +3802 -4022
  56. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +140 -97
  57. package/.output/server/_libs/lucide-react.mjs +221 -9
  58. package/.output/server/_libs/next-themes.mjs +1 -1
  59. package/.output/server/_libs/react-redux+[...].mjs +1 -1
  60. package/.output/server/_libs/recharts+[...].mjs +483 -901
  61. package/.output/server/_libs/sonner.mjs +1 -1
  62. package/.output/server/_libs/tanstack__history.mjs +68 -41
  63. package/.output/server/_libs/tanstack__query-core.mjs +2010 -309
  64. package/.output/server/_libs/tanstack__react-query.mjs +448 -21
  65. package/.output/server/_libs/verkit.mjs +102 -1
  66. package/.output/server/_ssr/BundleIdDisplay-x94o9rlU.mjs +13 -0
  67. package/.output/server/_ssr/ConsoleFeatureUnavailable-ldW8v8-q.mjs +58 -0
  68. package/.output/server/_ssr/EventDetails-Q8kfj9Nr.mjs +344 -0
  69. package/.output/server/_ssr/{HashValueDisplay-CyMmr0O9.mjs → HashValueDisplay-n1GholGS.mjs} +3 -3
  70. package/.output/server/_ssr/InsightsInfo-DuJFatQO.mjs +75 -0
  71. package/.output/server/_ssr/InsightsPageHeader-BSUX3Ye9.mjs +145 -0
  72. package/.output/server/_ssr/NotFoundPage-DZzOOzS3.mjs +37 -0
  73. package/.output/server/_ssr/{dialog-CKvQ4VIE.mjs → alert-dialog-C43Doa0I.mjs} +6 -83
  74. package/.output/server/_ssr/{api-keys-CzZ7Ont4.mjs → api-keys-B4sYm8dM.mjs} +48 -9
  75. package/.output/server/_ssr/api-keys-CEnM9fqG.mjs +5 -0
  76. package/.output/server/_ssr/api-keys-rpc-BIFuUgMt.mjs +52 -0
  77. package/.output/server/_ssr/api-oZjRn9tP.mjs +186 -0
  78. package/.output/server/_ssr/api-rpc-BNiFRRK8.mjs +240 -0
  79. package/.output/server/_ssr/{auth-BF8mbAgF.mjs → auth-UP0wXs4i.mjs} +1 -1
  80. package/.output/server/_ssr/{auth-rpc-DH6Bhwcz.mjs → auth-rpc-DnZqYxyq.mjs} +6 -6
  81. package/.output/server/_ssr/auth.server-DFpyxRDd.mjs +5374 -0
  82. package/.output/server/_ssr/bundleActivity-M5gzBFNg.mjs +18 -0
  83. package/.output/server/_ssr/config-WVX4IxSR.mjs +15 -0
  84. package/.output/server/_ssr/config.server-DskXCAyI.mjs +35 -0
  85. package/.output/server/_ssr/console-access-BJfAXknd.mjs +17 -0
  86. package/.output/server/_ssr/console-features-Oz0q20jJ.mjs +61 -0
  87. package/.output/server/_ssr/console-features-api-C9kiKvaV.mjs +43 -0
  88. package/.output/server/_ssr/console-features-rpc-P0GL7Z-R.mjs +19 -0
  89. package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-Cm6Tn0_Y.mjs} +67 -56
  90. package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-RLR4H-Fn.mjs} +2 -2
  91. package/.output/server/_ssr/databaseConfig-C5SkAyUy.mjs +5 -0
  92. package/.output/server/_ssr/{databaseJsonValue-d6I3nAS4.mjs → databaseJsonValue-Csbuzc9Q.mjs} +28 -5
  93. package/.output/server/_ssr/databaseRows-CPphvbag.mjs +73 -0
  94. package/.output/server/_ssr/dialog-BbYDMjdC.mjs +84 -0
  95. package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-CbQbBIw-.mjs} +140 -7
  96. package/.output/server/_ssr/{downloadBundle-CI7JUKvC.mjs → downloadBundle-CZysjmNW.mjs} +10 -10
  97. package/.output/server/_ssr/empty-CVLGfxuu.mjs +60 -0
  98. package/.output/server/_ssr/{empty-plugin-adapters-B5QvGpEl.mjs → empty-plugin-adapters-CPtwX8a7.mjs} +1 -1
  99. package/.output/server/_ssr/failureReports-DKDhVsXA.mjs +33 -0
  100. package/.output/server/_ssr/field-asw83X0v.mjs +189 -0
  101. package/.output/server/_ssr/getBundleChildren-Cv9iz1As.mjs +22 -0
  102. package/.output/server/_ssr/{input-group-BrGSjz4S.mjs → input-group-CuYJHosb.mjs} +2 -2
  103. package/.output/server/_ssr/insights-B55FG5fm.mjs +14 -0
  104. package/.output/server/_ssr/insights-CWnHIFUV.mjs +5 -0
  105. package/.output/server/_ssr/insights-CpLpedFZ.mjs +2315 -0
  106. package/.output/server/_ssr/insights-api-sjws23WF.mjs +122 -0
  107. package/.output/server/_ssr/insights-errors-BjnFUyZj.mjs +34 -0
  108. package/.output/server/_ssr/insights-failures-rpc-BvbWvqNf.mjs +36 -0
  109. package/.output/server/_ssr/insights-failures-xaa41Buf.mjs +46 -0
  110. package/.output/server/_ssr/insights-recovery-BWQhiZaF.mjs +28 -0
  111. package/.output/server/_ssr/insights-recovery-rpc-GiYXdkaY.mjs +32 -0
  112. package/.output/server/_ssr/{insights-rpc-DDKmIrpV.mjs → insights-rpc-DP_8Rmz4.mjs} +22 -14
  113. package/.output/server/_ssr/insights-usage-BpBM0U0c.mjs +29 -0
  114. package/.output/server/_ssr/insights-usage-rpc-BiolgB8e.mjs +29 -0
  115. package/.output/server/_ssr/insights-usage-rpc-KStL0zOx.mjs +41 -0
  116. package/.output/server/_ssr/insightsUsage-CzhVjsc8.mjs +56 -0
  117. package/.output/server/_ssr/insights_.distribution-CVrnbP3R.mjs +7 -0
  118. package/.output/server/_ssr/insights_.distribution-D2HaNTAA.mjs +16 -0
  119. package/.output/server/_ssr/{insights_.distribution-cIsU-kHG.mjs → insights_.distribution-DN9pR422.mjs} +50 -22
  120. package/.output/server/_ssr/installations-BHmbbnH8.mjs +5 -0
  121. package/.output/server/_ssr/{installations-C5anhyP0.mjs → installations-BSCmFq8Q.mjs} +279 -367
  122. package/.output/server/_ssr/installations-DD1g__Nc.mjs +69 -0
  123. package/.output/server/_ssr/listReleases-BfUBlCHo.mjs +79 -0
  124. package/.output/server/_ssr/plugins-BaD1slHx.mjs +2086 -0
  125. package/.output/server/_ssr/release-adoption-005tQRpo.mjs +55 -0
  126. package/.output/server/_ssr/release-adoption-rpc-BsstqxUp.mjs +41 -0
  127. package/.output/server/_ssr/releaseAdoption-CtOFkwli.mjs +114 -0
  128. package/.output/server/_ssr/releaseManagement-DFMUnDF5.mjs +11 -0
  129. package/.output/server/_ssr/remote-config-C2Ee8lXO.mjs +5 -0
  130. package/.output/server/_ssr/remote-config-Dv1ccMo-.mjs +17 -0
  131. package/.output/server/_ssr/remote-config-of0lGQH8.mjs +2648 -0
  132. package/.output/server/_ssr/remote-config-rpc-BzX31mUS.mjs +115 -0
  133. package/.output/server/_ssr/rolldown-runtime-rSIU-vHC.mjs +13 -0
  134. package/.output/server/_ssr/{router-BuanSsRI.mjs → router-D8NuoJ_I.mjs} +107 -134
  135. package/.output/server/_ssr/{routes-DY-vqU6R.mjs → routes-DgvnFqDy.mjs} +195 -429
  136. package/.output/server/_ssr/routes-V8sDybGf.mjs +409 -0
  137. package/.output/server/_ssr/runtime.server-De0QVWc9.mjs +104 -0
  138. package/.output/server/_ssr/schema-BiAVyEj2.mjs +361 -0
  139. package/.output/server/_ssr/{select-DD2szs3Y.mjs → select-t3iXRwc9.mjs} +3 -3
  140. package/.output/server/_ssr/server-h4VxnExB.mjs +8325 -0
  141. package/.output/server/_ssr/{createSsrRpc-CdlfejmI.mjs → sidebar-DJcErBMo.mjs} +107 -47
  142. package/.output/server/_ssr/ssr.mjs +1 -1
  143. package/.output/server/_ssr/start-BfFbHKMK.mjs +4 -0
  144. package/.output/server/_ssr/switch-E-btwMGt.mjs +43 -0
  145. package/.output/server/_ssr/{table-CTj6n-4F.mjs → table-37Dd23TN.mjs} +2 -2
  146. package/.output/server/_ssr/tabs-DEFnTm95.mjs +45 -0
  147. package/.output/server/_ssr/updateFailures-H6pnnYK4.mjs +40 -0
  148. package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-C88s9jWF.mjs} +2 -2
  149. package/.output/server/_tanstack-start-manifest_v-55AGsehh.mjs +139 -0
  150. package/.output/server/index.mjs +309 -211
  151. package/LICENSE +13 -14
  152. package/README.md +80 -71
  153. package/lib/index.d.mts +23 -11
  154. package/lib/vite-internal.mjs +13 -3
  155. package/lib/vite.d.mts +2 -0
  156. package/package.json +14 -14
  157. package/src/components/AppSidebar.tsx +69 -74
  158. package/src/components/ConsoleFeatureUnavailable.tsx +80 -0
  159. package/src/components/NotFoundPage.tsx +7 -7
  160. package/src/components/features/FeatureSlots.tsx +103 -0
  161. package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
  162. package/src/components/features/bundles/BundleMetadata.tsx +8 -5
  163. package/src/components/features/bundles/RolloutCohortsDialog.tsx +1 -1
  164. package/src/components/features/channels/ChannelManagementDialog.tsx +8 -6
  165. package/src/components/features/insights/AppUsage.tsx +41 -14
  166. package/src/components/features/insights/BuiltinBundle.tsx +36 -0
  167. package/src/components/features/insights/ComparedBundlesChart.tsx +310 -0
  168. package/src/components/features/insights/EstimatedCount.tsx +18 -0
  169. package/src/components/features/insights/EventDetails.tsx +390 -26
  170. package/src/components/features/insights/EventHistoryCard.tsx +111 -25
  171. package/src/components/features/insights/EventHistoryList.tsx +1 -1
  172. package/src/components/features/insights/FailureReports.tsx +407 -0
  173. package/src/components/features/insights/InsightsControls.tsx +240 -142
  174. package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
  175. package/src/components/features/insights/InsightsOverview.tsx +601 -403
  176. package/src/components/features/insights/InsightsPageHeader.tsx +19 -14
  177. package/src/components/features/insights/InsightsPeriodSelector.tsx +67 -12
  178. package/src/components/features/insights/InstallationHistoryCard.tsx +65 -10
  179. package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
  180. package/src/components/features/insights/ReleaseActivity.tsx +308 -0
  181. package/src/components/features/insights/ReportingDevicesSummary.tsx +13 -13
  182. package/src/components/features/insights/RollbackButton.tsx +118 -0
  183. package/src/components/features/insights/UpdateFailures.tsx +382 -0
  184. package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
  185. package/src/components/features/releases/ReleaseEditorSheet.tsx +27 -13
  186. package/src/components/features/remote-config/ConditionDialog.tsx +592 -0
  187. package/src/components/features/remote-config/ConditionsCard.tsx +247 -0
  188. package/src/components/features/remote-config/ParameterDialog.tsx +426 -0
  189. package/src/components/features/remote-config/ParametersCard.tsx +254 -0
  190. package/src/components/features/remote-config/PreviewCard.tsx +284 -0
  191. package/src/components/features/remote-config/PublishDialog.tsx +325 -0
  192. package/src/components/features/remote-config/RemoteConfigPage.tsx +353 -0
  193. package/src/components/features/remote-config/RuleSummary.tsx +21 -0
  194. package/src/components/features/remote-config/ValueInput.tsx +151 -0
  195. package/src/components/features/remote-config/VersionsCard.tsx +384 -0
  196. package/src/components/features/remote-config/remoteConfigFeatureUi.tsx +15 -0
  197. package/src/components/features/remote-config/useDateTimeText.ts +16 -0
  198. package/src/components/ui/sidebar.tsx +22 -29
  199. package/src/index.ts +26 -19
  200. package/src/lib/api-keys-api.ts +0 -28
  201. package/src/lib/api-keys-rpc.ts +27 -38
  202. package/src/lib/api-rpc.ts +125 -288
  203. package/src/lib/api.ts +15 -134
  204. package/src/lib/bundle-activity.ts +24 -4
  205. package/src/lib/console-access.ts +20 -0
  206. package/src/lib/console-features-api.ts +68 -0
  207. package/src/lib/console-features-rpc.ts +13 -0
  208. package/src/lib/console-features.ts +98 -0
  209. package/src/lib/insights-api.ts +56 -2
  210. package/src/lib/insights-errors.ts +64 -0
  211. package/src/lib/insights-failures-rpc.ts +36 -0
  212. package/src/lib/insights-failures.ts +130 -0
  213. package/src/lib/insights-recovery-rpc.ts +13 -17
  214. package/src/lib/insights-recovery.ts +12 -36
  215. package/src/lib/insights-retention.ts +21 -0
  216. package/src/lib/insights-rpc.ts +30 -12
  217. package/src/lib/insights-search.ts +50 -4
  218. package/src/lib/insights-usage-rpc.ts +15 -9
  219. package/src/lib/insights-usage.ts +41 -3
  220. package/src/lib/insights-view.ts +34 -5
  221. package/src/lib/release-adoption-api.ts +214 -0
  222. package/src/lib/release-adoption-rpc.ts +49 -0
  223. package/src/lib/release-adoption.ts +164 -0
  224. package/src/lib/remote-config-api.ts +119 -0
  225. package/src/lib/remote-config-draft.ts +666 -0
  226. package/src/lib/remote-config-rpc.ts +196 -0
  227. package/src/lib/scroll-restoration.ts +21 -0
  228. package/src/lib/server/auth.server.ts +13 -5
  229. package/src/lib/server/bundleActivity.ts +27 -28
  230. package/src/lib/server/config.server.ts +21 -76
  231. package/src/lib/server/console-feature-apis.ts +70 -0
  232. package/src/lib/server/console-runtime.server.ts +82 -38
  233. package/src/lib/server/downloadBundle.ts +14 -15
  234. package/src/lib/server/failureReports.ts +50 -0
  235. package/src/lib/server/getBundleChildren.ts +31 -122
  236. package/src/lib/server/insightsUsage.ts +52 -113
  237. package/src/lib/server/listReleases.ts +109 -44
  238. package/src/lib/server/releaseAdoption.ts +151 -0
  239. package/src/lib/server/releaseReachability.ts +8 -8
  240. package/src/lib/server/remoteConfig.ts +75 -0
  241. package/src/lib/server/runtime.server.ts +120 -31
  242. package/src/lib/server/updateFailures.ts +66 -0
  243. package/src/lib/use-dialog-target.ts +27 -0
  244. package/src/routeTree.gen.ts +44 -44
  245. package/src/router.tsx +3 -2
  246. package/src/routes/-installations-search.ts +32 -8
  247. package/src/routes/-releases-search.ts +76 -29
  248. package/src/routes/__root.tsx +7 -1
  249. package/src/routes/api/bundles/$bundleId/download.ts +2 -5
  250. package/src/routes/api-keys.tsx +5 -2
  251. package/src/routes/index.tsx +210 -152
  252. package/src/routes/insights.tsx +91 -23
  253. package/src/routes/insights_.distribution.tsx +50 -9
  254. package/src/routes/installations.tsx +97 -40
  255. package/src/routes/remote-config.tsx +42 -0
  256. package/src/styles.css +9 -0
  257. package/src/vite-internal.ts +15 -3
  258. package/src/vite.ts +2 -0
  259. package/.output/public/assets/HashValueDisplay-BpTc3Oyg.js +0 -1
  260. package/.output/public/assets/InsightsPageHeader-DC2eEst8.js +0 -1
  261. package/.output/public/assets/api-CdUyUqzR.js +0 -42
  262. package/.output/public/assets/api-keys-64PM9PwW.js +0 -1
  263. package/.output/public/assets/api-keys-api-BeaJnvY5.js +0 -1
  264. package/.output/public/assets/arrow-left-04Rh8Zgp.js +0 -1
  265. package/.output/public/assets/card-CYHs5FZv.js +0 -1
  266. package/.output/public/assets/chart-no-axes-combined-DwyMsVFW.js +0 -1
  267. package/.output/public/assets/createServerFn-DU71xucx.js +0 -3
  268. package/.output/public/assets/dialog-IVMkBRCq.js +0 -1
  269. package/.output/public/assets/dist-BR4GzeEu.js +0 -1
  270. package/.output/public/assets/field-B3CYDpjg.js +0 -1
  271. package/.output/public/assets/index-Cb_D1D6N.js +0 -10
  272. package/.output/public/assets/info-C3y9HNoU.js +0 -1
  273. package/.output/public/assets/input-group-nLZylhWF.js +0 -1
  274. package/.output/public/assets/insights-Bm9v8uO3.js +0 -2
  275. package/.output/public/assets/insights-DS3iO7Up.js +0 -1
  276. package/.output/public/assets/insights-search-Byj3g3Mp.js +0 -1
  277. package/.output/public/assets/insights-usage-rpc-BaGR3lgq.js +0 -1
  278. package/.output/public/assets/insights_.distribution-B1i6cjlQ.js +0 -1
  279. package/.output/public/assets/insights_.distribution-C1Wf27eB.js +0 -2
  280. package/.output/public/assets/installations-CkFW4fV9.js +0 -2
  281. package/.output/public/assets/installations-DxTaIcHD.js +0 -1
  282. package/.output/public/assets/lazyRouteComponent-BapzjYnb.js +0 -1
  283. package/.output/public/assets/list-Dqt53fWZ.js +0 -1
  284. package/.output/public/assets/loader-circle-CUKfUqow.js +0 -1
  285. package/.output/public/assets/preload-helper-ClBMtM1g.js +0 -1
  286. package/.output/public/assets/refresh-cw-CNE_2PnD.js +0 -1
  287. package/.output/public/assets/routes-Cgtvspjg.js +0 -2
  288. package/.output/public/assets/routes-O2r2UUN8.js +0 -1
  289. package/.output/public/assets/shield-check-BFcJ46kz.js +0 -1
  290. package/.output/public/assets/signing-BgspC-xP.js +0 -1
  291. package/.output/public/assets/styles-DnrWuBwd.css +0 -2
  292. package/.output/public/assets/table-BuWQgxJJ.js +0 -1
  293. package/.output/public/assets/useMutation-CSV9NCUl.js +0 -1
  294. package/.output/public/assets/useOpenInteractionType-D5kduCTD.js +0 -1
  295. package/.output/public/assets/valueToPercent-BAtcbSLk.js +0 -1
  296. package/.output/server/__23tanstack-start-server-fn-resolver-DBRojHaG.mjs +0 -150
  297. package/.output/server/_ssr/InsightsPageHeader-mtxVuZKK.mjs +0 -64
  298. package/.output/server/_ssr/api-BfCgYlj5.mjs +0 -332
  299. package/.output/server/_ssr/api-keys-api-C3oeq01R.mjs +0 -60
  300. package/.output/server/_ssr/api-keys-rpc-CdPFdGOx.mjs +0 -136
  301. package/.output/server/_ssr/api-rpc-B2E1ZIG5.mjs +0 -1399
  302. package/.output/server/_ssr/auth.server-CmicHh0J.mjs +0 -47
  303. package/.output/server/_ssr/bundle-signing-rpc-Di7-I6fE.mjs +0 -16
  304. package/.output/server/_ssr/bundle-signing.server-Uqt1OF49.mjs +0 -12
  305. package/.output/server/_ssr/bundleActivity-pBrPSG01.mjs +0 -28
  306. package/.output/server/_ssr/card-Bemj0dpY.mjs +0 -108
  307. package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
  308. package/.output/server/_ssr/config.server-B8WsT3s0.mjs +0 -368
  309. package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
  310. package/.output/server/_ssr/deleteBundle-8X-jq7Z7.mjs +0 -66
  311. package/.output/server/_ssr/field-BrQ2u0fT.mjs +0 -74
  312. package/.output/server/_ssr/getBundleChildren-DoL8l_AS.mjs +0 -50
  313. package/.output/server/_ssr/insights-BwQ-wF2a.mjs +0 -10
  314. package/.output/server/_ssr/insights-gr1I_dJU.mjs +0 -938
  315. package/.output/server/_ssr/insights-recovery-Cv6RSyeR.mjs +0 -21
  316. package/.output/server/_ssr/insights-recovery-rpc-DOzxfYfv.mjs +0 -37
  317. package/.output/server/_ssr/insights-search-1czJMZgk.mjs +0 -21
  318. package/.output/server/_ssr/insights-usage-rpc-4ImOq_0p.mjs +0 -184
  319. package/.output/server/_ssr/insights-usage-rpc-BUruODjE.mjs +0 -24
  320. package/.output/server/_ssr/insightsContract-B09K_Px1.mjs +0 -303
  321. package/.output/server/_ssr/insightsHistory-Ci4rYAgl.mjs +0 -41
  322. package/.output/server/_ssr/insightsRecovery-CaghWL2t.mjs +0 -113
  323. package/.output/server/_ssr/insightsUsage-DNIj6jxF.mjs +0 -71
  324. package/.output/server/_ssr/insights_.distribution-VmHuikRE.mjs +0 -10
  325. package/.output/server/_ssr/installations-HXMF_kKf.mjs +0 -29
  326. package/.output/server/_ssr/routes-Dru3IRj0.mjs +0 -37
  327. package/.output/server/_ssr/runtime.server-CsiKFp_Z.mjs +0 -436
  328. package/.output/server/_ssr/server-DJm72Kj-.mjs +0 -7468
  329. package/.output/server/_ssr/signing-H8Lg4lPe.mjs +0 -133
  330. package/.output/server/_ssr/start-DpViQGnt.mjs +0 -4
  331. package/.output/server/_tanstack-start-manifest_v-DsFcTLw_.mjs +0 -125
  332. package/src/components/features/bundles/BundleActivityChart.tsx +0 -97
  333. package/src/components/features/bundles/BundleInsightsSummary.tsx +0 -126
  334. package/src/components/features/signing/BundleSigningPage.tsx +0 -139
  335. package/src/lib/bundle-signing-api.ts +0 -14
  336. package/src/lib/bundle-signing-rpc.ts +0 -16
  337. package/src/lib/server/bundle-signing.server.ts +0 -23
  338. package/src/lib/server/deleteBundle.ts +0 -145
  339. package/src/lib/server/insightsHistory.ts +0 -52
  340. package/src/lib/server/insightsRecovery.ts +0 -187
  341. package/src/routes/signing.tsx +0 -37
@@ -1,332 +0,0 @@
1
- import { i as __toESM } from "../_runtime.mjs";
2
- import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
3
- import { ht as require_react, mt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
4
- import { C as cn, w as createSsrRpc } from "./createSsrRpc-CdlfejmI.mjs";
5
- import { i as useQueryClient, n as useQuery, t as useMutation } from "../_libs/tanstack__react-query.mjs";
6
- import { t as readRecoveryInput } from "./insights-recovery-Cv6RSyeR.mjs";
7
- import { c as Tooltip, l as Legend, u as ResponsiveContainer } from "../_libs/recharts+[...].mjs";
8
- //#region node_modules/.nitro/vite/services/ssr/assets/api-BfCgYlj5.js
9
- var import_react = /* @__PURE__ */ __toESM(require_react());
10
- var import_jsx_runtime = require_jsx_runtime();
11
- function readBundleActivityInput(inputs) {
12
- if (!Array.isArray(inputs) || inputs.length > 20) throw new Error("Choose up to 20 bundles.");
13
- return inputs.map((input) => {
14
- readRecoveryInput({
15
- ...input,
16
- window: "30d"
17
- });
18
- if (!input.releaseId) throw new Error("Choose a bundle ID.");
19
- return input;
20
- });
21
- }
22
- var getBundleActivityRpc = createServerFn({ method: "GET" }).validator(readBundleActivityInput).handler(createSsrRpc("b4bf4c461903edcdc44eea52468c737b5b600a586f542138ff022dcbbe86c45c"));
23
- var getRecoveryReportRpc = createServerFn({ method: "GET" }).validator(readRecoveryInput).handler(createSsrRpc("69cd8e2488b082eb2a22e7058be56ad6566f338c471c62557fa6beed5dc1352a"));
24
- var THEMES = {
25
- light: "",
26
- dark: ".dark"
27
- };
28
- var INITIAL_DIMENSION = {
29
- width: 320,
30
- height: 200
31
- };
32
- var ChartContext = import_react.createContext(null);
33
- function useChart() {
34
- const context = import_react.useContext(ChartContext);
35
- if (!context) throw new Error("useChart must be used within a <ChartContainer />");
36
- return context;
37
- }
38
- function ChartContainer({ id, className, children, config, initialDimension = INITIAL_DIMENSION, ...props }) {
39
- const uniqueId = import_react.useId();
40
- const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
41
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartContext.Provider, {
42
- value: { config },
43
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
44
- "data-slot": "chart",
45
- "data-chart": chartId,
46
- className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
47
- ...props,
48
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartStyle, {
49
- id: chartId,
50
- config
51
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResponsiveContainer, {
52
- initialDimension,
53
- children
54
- })]
55
- })
56
- });
57
- }
58
- var ChartStyle = ({ id, config }) => {
59
- const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);
60
- if (!colorConfig.length) return null;
61
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { dangerouslySetInnerHTML: { __html: Object.entries(THEMES).map(([theme, prefix]) => `
62
- ${prefix} [data-chart=${id}] {
63
- ${colorConfig.map(([key, itemConfig]) => {
64
- const color = itemConfig.theme?.[theme] ?? itemConfig.color;
65
- return color ? ` --color-${key}: ${color};` : null;
66
- }).join("\n")}
67
- }
68
- `).join("\n") } });
69
- };
70
- var ChartTooltip = Tooltip;
71
- function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) {
72
- const { config } = useChart();
73
- const tooltipLabel = import_react.useMemo(() => {
74
- if (hideLabel || !payload?.length) return null;
75
- const [item] = payload;
76
- const itemConfig = getPayloadConfigFromPayload(config, item, `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`);
77
- const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
78
- if (labelFormatter) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
79
- className: cn("font-medium", labelClassName),
80
- children: labelFormatter(value, payload)
81
- });
82
- if (!value) return null;
83
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84
- className: cn("font-medium", labelClassName),
85
- children: value
86
- });
87
- }, [
88
- label,
89
- labelFormatter,
90
- payload,
91
- hideLabel,
92
- labelClassName,
93
- config,
94
- labelKey
95
- ]);
96
- if (!active || !payload?.length) return null;
97
- const nestLabel = payload.length === 1 && indicator !== "dot";
98
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
99
- className: cn("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs/relaxed shadow-xl", className),
100
- children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
101
- className: "grid gap-1.5",
102
- children: payload.filter((item) => item.type !== "none").map((item, index) => {
103
- const itemConfig = getPayloadConfigFromPayload(config, item, `${nameKey ?? item.name ?? item.dataKey ?? "value"}`);
104
- const indicatorColor = color ?? item.payload?.fill ?? item.color;
105
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
106
- className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"),
107
- children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [itemConfig?.icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
108
- className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
109
- "h-2.5 w-2.5": indicator === "dot",
110
- "w-1": indicator === "line",
111
- "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
112
- "my-0.5": nestLabel && indicator === "dashed"
113
- }),
114
- style: {
115
- "--color-bg": indicatorColor,
116
- "--color-border": indicatorColor
117
- }
118
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
119
- className: cn("flex flex-1 justify-between gap-2 leading-none", nestLabel ? "items-end" : "items-center"),
120
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
121
- className: "grid gap-1.5",
122
- children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
123
- className: "text-muted-foreground",
124
- children: itemConfig?.label ?? item.name
125
- })]
126
- }), item.value != null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
127
- className: "font-mono font-medium text-foreground tabular-nums",
128
- children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value)
129
- })]
130
- })] })
131
- }, index);
132
- })
133
- })]
134
- });
135
- }
136
- var ChartLegend = Legend;
137
- function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }) {
138
- const { config } = useChart();
139
- if (!payload?.length) return null;
140
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
141
- className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className),
142
- children: payload.filter((item) => item.type !== "none").map((item, index) => {
143
- const itemConfig = getPayloadConfigFromPayload(config, item, `${nameKey ?? item.dataKey ?? "value"}`);
144
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
145
- className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
146
- children: [itemConfig?.icon && !hideIcon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(itemConfig.icon, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
147
- className: "h-2 w-2 shrink-0 rounded-[2px]",
148
- style: { backgroundColor: item.color }
149
- }), itemConfig?.label]
150
- }, index);
151
- })
152
- });
153
- }
154
- function getPayloadConfigFromPayload(config, payload, key) {
155
- if (typeof payload !== "object" || payload === null) return;
156
- const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
157
- let configLabelKey = key;
158
- if (key in payload && typeof payload[key] === "string") configLabelKey = payload[key];
159
- else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
160
- return configLabelKey in config ? config[configLabelKey] : config[key];
161
- }
162
- var getReleases = createServerFn({ method: "GET" }).inputValidator((input) => input).handler(createSsrRpc("206547cb1526f961070a989818ca7b9e34f6b2b0e4ab851698c3807fe9fb5e0c"));
163
- var getRelease = createServerFn({ method: "GET" }).inputValidator((input) => input).handler(createSsrRpc("a6f23116eeaf76166d405e28a95213123025613c6603030894e519015bf48032"));
164
- var updateRelease = createServerFn({ method: "POST" }).inputValidator((input) => input).handler(createSsrRpc("7ea0186f19f9f2bc2ca4b26e3c59636891cf046957f84287b6783f8d88bd8cb7"));
165
- var preflightRelease = createServerFn({ method: "POST" }).inputValidator((input) => input).handler(createSsrRpc("b46c95dba95a6a3e8fa5c9d100e3622fa5ae7af4f38e10fb1ed2fa48289a3a8f"));
166
- var deleteRelease = createServerFn({ method: "POST" }).inputValidator((input) => input).handler(createSsrRpc("d5b58722ce514e3b63a377f736b4823c2011782495442ae4870ed547e392c70b"));
167
- var promoteRelease = createServerFn({ method: "POST" }).inputValidator((input) => input).handler(createSsrRpc("956539a300d79a7efa191c1cc2d529d62fc4bfd940442548fdbc1404e0d53078"));
168
- var getReleaseCatalogDiagnostics = createServerFn({ method: "GET" }).inputValidator((input) => input).handler(createSsrRpc("e8c24b7247936f045a145ffd5c177fd0e3df3b52769d67dfbd8d1de491d66396"));
169
- var getConfig = createServerFn().handler(createSsrRpc("51a34c05479a893c7d320bd4cd1604427289d667698c48b9f30a01aabf8a5e68"));
170
- var getChannels = createServerFn().handler(createSsrRpc("79ada05964de8f2123bfcd62b10097d59bf8fd689ef5c7161031e5871d8396c5"));
171
- var createChannel = createServerFn({ method: "POST" }).inputValidator((input) => input).handler(createSsrRpc("2b9b8d1f49f79a511589617d8d4bfc6094a3acf5264f33651b9569ba66d3f321"));
172
- var deleteChannel = createServerFn({ method: "POST" }).inputValidator((input) => input).handler(createSsrRpc("52756dde414919a906bfe83d1ab6d29910c63bcafdb47653d6f1df562d958920"));
173
- createServerFn().handler(createSsrRpc("f8bdca3d0579adb812d6404f55d9261a89cdb025e920b1fcad82883646a5fe9e"));
174
- createServerFn({ method: "GET" }).inputValidator((input) => input).handler(createSsrRpc("00ccacb4a0212c83ec29f4d11719046ad91ea8291cfc557d514dbf00d3bd7f5f"));
175
- var getBundle = createServerFn({ method: "GET" }).inputValidator((input) => input).handler(createSsrRpc("1bd85c2a50e24785cb6abb023a247a9f048f37ddfa85cbb1c57e579563bad013"));
176
- var getBundleChildren = createServerFn({ method: "GET" }).inputValidator((input) => input).handler(createSsrRpc("4370f1bf70b91f1168d85379d3008449a1bedb915e9878ca4ef89d5f3a80fa7f"));
177
- var getBundleChildCounts = createServerFn({ method: "GET" }).inputValidator((input) => input).handler(createSsrRpc("4ca367070b00f58179a572f0bb8196a4ccdd3881e9b1dbfe33deee0cb6e1f549"));
178
- createServerFn({ method: "POST" }).inputValidator((input) => input).handler(createSsrRpc("16cc7c2f080ea5b73e0c6bba815b110dbd7727796036d248ba0d8ae819ddef08"));
179
- createServerFn({ method: "POST" }).inputValidator((input) => input).handler(createSsrRpc("3a27ff5679228b86a346b3fe42142e7a5bf0264f73173c0dbe5f07fb37c43cf7"));
180
- createServerFn({ method: "POST" }).inputValidator((input) => input).handler(createSsrRpc("61de3b69779c5ce2a5f5d3c27e2cfaca8fba8f14c8803559b9cd733c456494fa"));
181
- var bundleListQueryKey = ["bundles"];
182
- var releaseListQueryKey = ["releases"];
183
- var queryKeys = {
184
- config: ["config"],
185
- channels: ["channels"],
186
- configLoaded: ["config-loaded"],
187
- bundles: {
188
- all: bundleListQueryKey,
189
- list: (filters) => [...bundleListQueryKey, filters ?? {}]
190
- },
191
- releases: {
192
- all: releaseListQueryKey,
193
- list: (filters) => [...releaseListQueryKey, filters ?? {}]
194
- },
195
- release: (releaseId) => ["release", releaseId],
196
- releaseCatalog: (scopeKey) => ["release-catalog", scopeKey],
197
- bundleChildren: {
198
- all: ["bundle-children"],
199
- list: (baseBundleId) => ["bundle-children", baseBundleId],
200
- counts: (bundleIds) => [
201
- "bundle-children",
202
- "counts",
203
- ...bundleIds
204
- ]
205
- },
206
- bundle: (bundleId) => ["bundle", bundleId]
207
- };
208
- function useConfigQuery() {
209
- return useQuery({
210
- queryKey: queryKeys.config,
211
- queryFn: () => getConfig(),
212
- staleTime: Infinity
213
- });
214
- }
215
- function useChannelsQuery() {
216
- return useQuery({
217
- queryKey: queryKeys.channels,
218
- queryFn: () => getChannels(),
219
- staleTime: Infinity
220
- });
221
- }
222
- function useReleasesQuery(filters) {
223
- return useQuery({
224
- queryKey: queryKeys.releases.list(filters),
225
- queryFn: () => getReleases({ data: filters }),
226
- placeholderData: (previousData) => previousData
227
- });
228
- }
229
- function useReleaseQuery(releaseId) {
230
- return useQuery({
231
- enabled: releaseId.length > 0,
232
- queryFn: () => getRelease({ data: { releaseId } }),
233
- queryKey: queryKeys.release(releaseId)
234
- });
235
- }
236
- function useReleaseCatalogDiagnosticsQuery(scopeKey) {
237
- return useQuery({
238
- enabled: scopeKey.length > 0,
239
- queryFn: () => getReleaseCatalogDiagnostics({ data: { scopeKey } }),
240
- queryKey: queryKeys.releaseCatalog(scopeKey)
241
- });
242
- }
243
- function useBundleQuery(bundleId) {
244
- return useQuery({
245
- queryKey: queryKeys.bundle(bundleId),
246
- queryFn: () => getBundle({ data: { bundleId } }),
247
- staleTime: Infinity,
248
- enabled: !!bundleId
249
- });
250
- }
251
- function useBundleChildrenQuery(baseBundleId) {
252
- return useQuery({
253
- queryKey: queryKeys.bundleChildren.list(baseBundleId),
254
- queryFn: () => getBundleChildren({ data: { baseBundleId } }),
255
- staleTime: Infinity,
256
- enabled: !!baseBundleId
257
- });
258
- }
259
- function useBundleChildCountsQuery(bundleIds) {
260
- const normalizedBundleIds = [...bundleIds].sort((left, right) => left.localeCompare(right));
261
- return useQuery({
262
- queryKey: queryKeys.bundleChildren.counts(normalizedBundleIds),
263
- queryFn: () => getBundleChildCounts({ data: { bundleIds: normalizedBundleIds } }),
264
- staleTime: Infinity,
265
- enabled: normalizedBundleIds.length > 0
266
- });
267
- }
268
- function useCreateChannelMutation() {
269
- const queryClient = useQueryClient();
270
- return useMutation({
271
- mutationFn: (input) => createChannel({ data: input }).then((response) => response.data),
272
- onSuccess: async () => {
273
- await queryClient.invalidateQueries({ queryKey: queryKeys.channels });
274
- }
275
- });
276
- }
277
- function useDeleteChannelMutation() {
278
- const queryClient = useQueryClient();
279
- return useMutation({
280
- mutationFn: (input) => deleteChannel({ data: input }).then((response) => response.data),
281
- onSettled: async () => {
282
- await queryClient.invalidateQueries({ queryKey: queryKeys.channels });
283
- }
284
- });
285
- }
286
- function useUpdateReleaseMutation() {
287
- const queryClient = useQueryClient();
288
- return useMutation({
289
- mutationFn: (input) => updateRelease({ data: input }),
290
- onSuccess: async (_, input) => {
291
- await Promise.all([
292
- queryClient.invalidateQueries({ queryKey: queryKeys.releases.all }),
293
- queryClient.invalidateQueries({ queryKey: queryKeys.release(input.releaseId) }),
294
- queryClient.invalidateQueries({ queryKey: ["release-catalog"] }),
295
- queryClient.invalidateQueries({ queryKey: queryKeys.channels })
296
- ]);
297
- }
298
- });
299
- }
300
- function usePreflightReleaseMutation() {
301
- return useMutation({ mutationFn: (input) => preflightRelease({ data: input }) });
302
- }
303
- function useDeleteReleaseMutation() {
304
- const queryClient = useQueryClient();
305
- return useMutation({
306
- mutationFn: (input) => deleteRelease({ data: input }),
307
- onSuccess: async (_, input) => {
308
- queryClient.removeQueries({ queryKey: queryKeys.release(input.releaseId) });
309
- await Promise.all([
310
- queryClient.invalidateQueries({ queryKey: queryKeys.releases.all }),
311
- queryClient.invalidateQueries({ queryKey: ["release-catalog"] }),
312
- queryClient.invalidateQueries({ queryKey: queryKeys.channels })
313
- ]);
314
- }
315
- });
316
- }
317
- function usePromoteReleaseMutation() {
318
- const queryClient = useQueryClient();
319
- return useMutation({
320
- mutationFn: (input) => promoteRelease({ data: input }),
321
- onSuccess: async () => {
322
- await Promise.all([
323
- queryClient.invalidateQueries({ queryKey: queryKeys.releases.all }),
324
- queryClient.invalidateQueries({ queryKey: ["release"] }),
325
- queryClient.invalidateQueries({ queryKey: ["release-catalog"] }),
326
- queryClient.invalidateQueries({ queryKey: queryKeys.channels })
327
- ]);
328
- }
329
- });
330
- }
331
- //#endregion
332
- export { usePromoteReleaseMutation as _, ChartTooltipContent as a, useReleasesQuery as b, useBundleChildCountsQuery as c, useChannelsQuery as d, useConfigQuery as f, usePreflightReleaseMutation as g, useDeleteReleaseMutation as h, ChartTooltip as i, useBundleChildrenQuery as l, useDeleteChannelMutation as m, ChartLegend as n, getBundleActivityRpc as o, useCreateChannelMutation as p, ChartLegendContent as r, getRecoveryReportRpc as s, ChartContainer as t, useBundleQuery as u, useReleaseCatalogDiagnosticsQuery as v, useUpdateReleaseMutation as x, useReleaseQuery as y };
@@ -1,60 +0,0 @@
1
- import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
2
- import { w as createSsrRpc } from "./createSsrRpc-CdlfejmI.mjs";
3
- import { g as redirect } from "../_libs/@tanstack/react-router+[...].mjs";
4
- import { i as useQueryClient, n as useQuery, t as useMutation } from "../_libs/tanstack__react-query.mjs";
5
- //#region node_modules/.nitro/vite/services/ssr/assets/api-keys-api-C3oeq01R.js
6
- var parseName = (input) => {
7
- const name = typeof input === "object" && input !== null ? Reflect.get(input, "name") : void 0;
8
- if (typeof name !== "string") throw new TypeError("API key name must be a string.");
9
- return { name };
10
- };
11
- var parseId = (input) => {
12
- const id = typeof input === "object" && input !== null ? Reflect.get(input, "id") : void 0;
13
- if (typeof id !== "string" || !/^api-[A-Za-z0-9_-]{43}$/u.test(id)) throw new TypeError("Invalid API key id.");
14
- return { id };
15
- };
16
- var getApiKeyCapabilityRpc = createServerFn({ method: "GET" }).handler(createSsrRpc("29665ce3a33cde2eb2ee082694288db269438f62f3a4d0a005dec3256e0f15c1"));
17
- var listApiKeysRpc = createServerFn({ method: "GET" }).handler(createSsrRpc("2c7f3cdb9bd3cab2c026a48abdc84c362db0362924a08679052a325640aec56b"));
18
- var createApiKeyRpc = createServerFn({ method: "POST" }).validator(parseName).handler(createSsrRpc("68a2d94ee016be64936401f5eba60ab08a47ff373e1cf9de48e4413336e6034b"));
19
- var revokeApiKeyRpc = createServerFn({ method: "POST" }).validator(parseId).handler(createSsrRpc("a1cb80b19ca72a64fb631ca28ebb9b6941db245983de082d5dd3203ec2eef795"));
20
- var apiKeyQueryKeys = {
21
- capability: ["api-keys", "capability"],
22
- list: ["api-keys", "list"]
23
- };
24
- var getApiKeyCapabilityQueryOptions = () => ({
25
- queryKey: apiKeyQueryKeys.capability,
26
- queryFn: () => getApiKeyCapabilityRpc(),
27
- staleTime: Infinity
28
- });
29
- var useApiKeyCapabilityQuery = () => useQuery(getApiKeyCapabilityQueryOptions());
30
- var ensureApiKeyRouteAccess = async (queryClient) => {
31
- if (!(await queryClient.ensureQueryData(getApiKeyCapabilityQueryOptions())).apiKeys) throw redirect({
32
- to: "/",
33
- search: {},
34
- replace: true
35
- });
36
- };
37
- var useApiKeysQuery = () => useQuery({
38
- queryKey: apiKeyQueryKeys.list,
39
- queryFn: () => listApiKeysRpc()
40
- });
41
- var useCreateApiKeyMutation = () => {
42
- const queryClient = useQueryClient();
43
- return useMutation({
44
- mutationFn: (name) => createApiKeyRpc({ data: { name } }),
45
- onSuccess: async () => {
46
- await queryClient.invalidateQueries({ queryKey: apiKeyQueryKeys.list });
47
- }
48
- });
49
- };
50
- var useRevokeApiKeyMutation = () => {
51
- const queryClient = useQueryClient();
52
- return useMutation({
53
- mutationFn: (id) => revokeApiKeyRpc({ data: { id } }),
54
- onSuccess: async () => {
55
- await queryClient.invalidateQueries({ queryKey: apiKeyQueryKeys.list });
56
- }
57
- });
58
- };
59
- //#endregion
60
- export { useRevokeApiKeyMutation as a, useCreateApiKeyMutation as i, useApiKeyCapabilityQuery as n, useApiKeysQuery as r, ensureApiKeyRouteAccess as t };
@@ -1,136 +0,0 @@
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/api-keys-rpc-CdPFdGOx.js
4
- var BASE64URL_32_PATTERN = /^[A-Za-z0-9_-]{43}$/u;
5
- var bytesToBase64Url = (bytes) => {
6
- let binary = "";
7
- for (const byte of bytes) binary += String.fromCharCode(byte);
8
- return btoa(binary).replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/u, "");
9
- };
10
- var isApiKey = (value) => {
11
- if (!BASE64URL_32_PATTERN.test(value)) return false;
12
- try {
13
- const base64 = value.replaceAll("-", "+").replaceAll("_", "/");
14
- const binary = atob(`${base64}=`);
15
- const bytes = Uint8Array.from(binary, (character) => character.charCodeAt(0));
16
- return bytes.byteLength === 32 && bytesToBase64Url(bytes) === value;
17
- } catch {
18
- return false;
19
- }
20
- };
21
- var hashApiKey = async (apiKey) => {
22
- if (!isApiKey(apiKey)) throw new TypeError("API key must be a canonical 32-byte base64url value.");
23
- const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(apiKey));
24
- return bytesToBase64Url(new Uint8Array(digest));
25
- };
26
- var apiKeyId = () => {
27
- const bytes = /* @__PURE__ */ new Uint8Array(16);
28
- crypto.getRandomValues(bytes);
29
- return `api-${bytesToBase64Url(bytes)}`;
30
- };
31
- var normalizeApiKeyName = (name) => {
32
- const normalized = name.trim();
33
- if (normalized.length === 0 || normalized.length > 64 || /[\p{Cc}\p{Cf}]/u.test(normalized)) throw new TypeError("API key names must contain 1-64 visible characters.");
34
- return normalized;
35
- };
36
- var toApiKeyMetadata = ({ hash: _hash, ...metadata }) => Object.freeze(metadata);
37
- var registerApiKey = async (input) => {
38
- const hash = await hashApiKey(input.apiKey);
39
- const createdAtMs = input.createdAtMs ?? Date.now();
40
- if (!Number.isSafeInteger(createdAtMs) || createdAtMs < 0) throw new TypeError("API key creation time must be non-negative.");
41
- const record = Object.freeze({
42
- created_at_ms: createdAtMs,
43
- hash,
44
- id: apiKeyId(),
45
- name: normalizeApiKeyName(input.name),
46
- prefix: input.apiKey.slice(0, 6),
47
- revoked_at_ms: null,
48
- role: "client"
49
- });
50
- if (await input.apiKeys.create(record) === "existing") {
51
- const existing = await input.apiKeys.findByHash(hash);
52
- if (existing === null || existing.revoked_at_ms !== null) throw new Error("The API key has been revoked.");
53
- return Object.freeze({
54
- apiKey: input.apiKey,
55
- record: toApiKeyMetadata(existing)
56
- });
57
- }
58
- return Object.freeze({
59
- apiKey: input.apiKey,
60
- record: toApiKeyMetadata(record)
61
- });
62
- };
63
- var createApiKey = (input) => {
64
- const bytes = /* @__PURE__ */ new Uint8Array(32);
65
- crypto.getRandomValues(bytes);
66
- return registerApiKey({
67
- apiKey: bytesToBase64Url(bytes),
68
- apiKeys: input.apiKeys,
69
- name: input.name
70
- });
71
- };
72
- var toApiKeyView = ({ hash: _hash, ...record }) => record;
73
- var parseName = (input) => {
74
- const name = typeof input === "object" && input !== null ? Reflect.get(input, "name") : void 0;
75
- if (typeof name !== "string") throw new TypeError("API key name must be a string.");
76
- return { name };
77
- };
78
- var parseId = (input) => {
79
- const id = typeof input === "object" && input !== null ? Reflect.get(input, "id") : void 0;
80
- if (typeof id !== "string" || !/^api-[A-Za-z0-9_-]{43}$/u.test(id)) throw new TypeError("Invalid API key id.");
81
- return { id };
82
- };
83
- var requireStore = async () => {
84
- const { prepareConfig } = await import("./config.server-B8WsT3s0.mjs");
85
- const { apiKeyStore } = await prepareConfig();
86
- if (apiKeyStore === null) throw new Error("API keys are not supported by the configured database plugin.");
87
- return apiKeyStore;
88
- };
89
- var getApiKeyCapabilityRpc_createServerFn_handler = createServerRpc({
90
- id: "29665ce3a33cde2eb2ee082694288db269438f62f3a4d0a005dec3256e0f15c1",
91
- name: "getApiKeyCapabilityRpc",
92
- filename: "src/lib/api-keys-rpc.ts"
93
- }, (opts) => getApiKeyCapabilityRpc.__executeServer(opts));
94
- var getApiKeyCapabilityRpc = createServerFn({ method: "GET" }).handler(getApiKeyCapabilityRpc_createServerFn_handler, async () => {
95
- const { prepareConfig } = await import("./config.server-B8WsT3s0.mjs");
96
- const { apiKeyStore } = await prepareConfig();
97
- return { apiKeys: apiKeyStore !== null };
98
- });
99
- var listApiKeysRpc_createServerFn_handler = createServerRpc({
100
- id: "2c7f3cdb9bd3cab2c026a48abdc84c362db0362924a08679052a325640aec56b",
101
- name: "listApiKeysRpc",
102
- filename: "src/lib/api-keys-rpc.ts"
103
- }, (opts) => listApiKeysRpc.__executeServer(opts));
104
- var listApiKeysRpc = createServerFn({ method: "GET" }).handler(listApiKeysRpc_createServerFn_handler, async () => {
105
- return [...await (await requireStore()).list()].sort((left, right) => right.created_at_ms - left.created_at_ms).map(toApiKeyView);
106
- });
107
- var createApiKeyRpc_createServerFn_handler = createServerRpc({
108
- id: "68a2d94ee016be64936401f5eba60ab08a47ff373e1cf9de48e4413336e6034b",
109
- name: "createApiKeyRpc",
110
- filename: "src/lib/api-keys-rpc.ts"
111
- }, (opts) => createApiKeyRpc.__executeServer(opts));
112
- var createApiKeyRpc = createServerFn({ method: "POST" }).validator(parseName).handler(createApiKeyRpc_createServerFn_handler, async ({ data }) => {
113
- const created = await createApiKey({
114
- apiKeys: await requireStore(),
115
- name: data.name
116
- });
117
- return {
118
- apiKey: created.apiKey,
119
- record: created.record
120
- };
121
- });
122
- var revokeApiKeyRpc_createServerFn_handler = createServerRpc({
123
- id: "a1cb80b19ca72a64fb631ca28ebb9b6941db245983de082d5dd3203ec2eef795",
124
- name: "revokeApiKeyRpc",
125
- filename: "src/lib/api-keys-rpc.ts"
126
- }, (opts) => revokeApiKeyRpc.__executeServer(opts));
127
- var revokeApiKeyRpc = createServerFn({ method: "POST" }).validator(parseId).handler(revokeApiKeyRpc_createServerFn_handler, async ({ data }) => {
128
- const revoked = await (await requireStore()).revoke({
129
- id: data.id,
130
- revokedAtMs: Date.now()
131
- });
132
- if (revoked === null) throw new Error("API key not found.");
133
- return toApiKeyView(revoked);
134
- });
135
- //#endregion
136
- export { createApiKeyRpc_createServerFn_handler, getApiKeyCapabilityRpc_createServerFn_handler, listApiKeysRpc_createServerFn_handler, revokeApiKeyRpc_createServerFn_handler };