@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,21 +0,0 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/insights-recovery-Cv6RSyeR.js
2
- var recoveryWindows = {
3
- "24h": {
4
- durationMs: 864e5,
5
- intervalMs: 36e5
6
- },
7
- "7d": {
8
- durationMs: 7 * 864e5,
9
- intervalMs: 6 * 36e5
10
- },
11
- "30d": {
12
- durationMs: 30 * 864e5,
13
- intervalMs: 864e5
14
- }
15
- };
16
- function readRecoveryInput(input) {
17
- if (!input || input.platform !== "all" && input.platform !== "ios" && input.platform !== "android" || typeof input.channel !== "string" || !input.channel.trim() || input.channel.length > 1024 || !Object.hasOwn(recoveryWindows, input.window) || input.appVersion !== void 0 && (typeof input.appVersion !== "string" || !input.appVersion.trim() || input.appVersion.length > 1024) || input.releaseId !== void 0 && (typeof input.releaseId !== "string" || !input.releaseId.trim() || input.releaseId.length > 1024)) throw new Error("Choose a platform, channel, and time window.");
18
- return input;
19
- }
20
- //#endregion
21
- export { recoveryWindows as n, readRecoveryInput as t };
@@ -1,37 +0,0 @@
1
- import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
2
- import { t as createServerRpc } from "./createServerRpc-DB29C_5p.mjs";
3
- import { t as readRecoveryInput } from "./insights-recovery-Cv6RSyeR.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/insights-recovery-rpc-DOzxfYfv.js
5
- function readBundleActivityInput(inputs) {
6
- if (!Array.isArray(inputs) || inputs.length > 20) throw new Error("Choose up to 20 bundles.");
7
- return inputs.map((input) => {
8
- readRecoveryInput({
9
- ...input,
10
- window: "30d"
11
- });
12
- if (!input.releaseId) throw new Error("Choose a bundle ID.");
13
- return input;
14
- });
15
- }
16
- var getBundleActivityRpc_createServerFn_handler = createServerRpc({
17
- id: "b4bf4c461903edcdc44eea52468c737b5b600a586f542138ff022dcbbe86c45c",
18
- name: "getBundleActivityRpc",
19
- filename: "src/lib/insights-recovery-rpc.ts"
20
- }, (opts) => getBundleActivityRpc.__executeServer(opts));
21
- var getBundleActivityRpc = createServerFn({ method: "GET" }).validator(readBundleActivityInput).handler(getBundleActivityRpc_createServerFn_handler, async ({ data }) => {
22
- const [{ prepareConfig }, { getBundleActivity }] = await Promise.all([import("./config.server-B8WsT3s0.mjs"), import("./bundleActivity-pBrPSG01.mjs")]);
23
- const { config } = await prepareConfig();
24
- return getBundleActivity(config.database.models.insights, data);
25
- });
26
- var getRecoveryReportRpc_createServerFn_handler = createServerRpc({
27
- id: "69cd8e2488b082eb2a22e7058be56ad6566f338c471c62557fa6beed5dc1352a",
28
- name: "getRecoveryReportRpc",
29
- filename: "src/lib/insights-recovery-rpc.ts"
30
- }, (opts) => getRecoveryReportRpc.__executeServer(opts));
31
- var getRecoveryReportRpc = createServerFn({ method: "GET" }).validator(readRecoveryInput).handler(getRecoveryReportRpc_createServerFn_handler, async ({ data }) => {
32
- const [{ prepareConfig }, { getRecoveryReport }] = await Promise.all([import("./config.server-B8WsT3s0.mjs"), import("./insightsRecovery-CaghWL2t.mjs")]);
33
- const { config } = await prepareConfig();
34
- return getRecoveryReport(config.database.models.insights, data);
35
- });
36
- //#endregion
37
- export { getBundleActivityRpc_createServerFn_handler, getRecoveryReportRpc_createServerFn_handler };
@@ -1,21 +0,0 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/insights-search-1czJMZgk.js
2
- var readText = (value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1024 ? value : void 0;
3
- var readWindow = (value) => value === "24h" || value === "7d" || value === "30d" ? value : void 0;
4
- function validateInsightsSearch(search) {
5
- return {
6
- platform: search.platform === "all" || search.platform === "ios" || search.platform === "android" ? search.platform : void 0,
7
- channel: readText(search.channel),
8
- appVersion: readText(search.appVersion),
9
- window: readWindow(search.window),
10
- bundleWindow: readWindow(search.bundleWindow)
11
- };
12
- }
13
- function validateDistributionSearch(search) {
14
- return {
15
- ...validateInsightsSearch(search),
16
- version: readText(search.version),
17
- page: typeof search.page === "number" && Number.isSafeInteger(search.page) && search.page > 0 ? search.page : void 0
18
- };
19
- }
20
- //#endregion
21
- export { validateInsightsSearch as n, validateDistributionSearch as t };
@@ -1,184 +0,0 @@
1
- import { i as __toESM } from "../_runtime.mjs";
2
- import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
3
- import { A as ProgressRoot, D as TabsRoot, E as TabsTab, O as ProgressIndicator$1, T as TabsPanel, ht as require_react, k as ProgressTrack$1, mt as require_jsx_runtime, w as TabsList$1 } from "../_libs/@base-ui/react+[...].mjs";
4
- import { C as Info } from "../_libs/lucide-react.mjs";
5
- import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
6
- import { C as cn, t as Button$1, v as Tooltip$1, w as createSsrRpc, x as TooltipTrigger, y as TooltipContent } from "./createSsrRpc-CdlfejmI.mjs";
7
- import { t as readRecoveryInput } from "./insights-recovery-Cv6RSyeR.mjs";
8
- //#region node_modules/.nitro/vite/services/ssr/assets/insights-usage-rpc-4ImOq_0p.js
9
- var import_react = /* @__PURE__ */ __toESM(require_react());
10
- var import_jsx_runtime = require_jsx_runtime();
11
- function Empty({ className, ...props }) {
12
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
13
- "data-slot": "empty",
14
- className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", className),
15
- ...props
16
- });
17
- }
18
- function EmptyHeader({ className, ...props }) {
19
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
20
- "data-slot": "empty-header",
21
- className: cn("flex max-w-sm flex-col items-center gap-1", className),
22
- ...props
23
- });
24
- }
25
- cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
26
- variants: { variant: {
27
- default: "bg-transparent",
28
- icon: "flex size-8 shrink-0 items-center justify-center rounded-md bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
29
- } },
30
- defaultVariants: { variant: "default" }
31
- });
32
- function EmptyTitle({ className, ...props }) {
33
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
34
- "data-slot": "empty-title",
35
- className: cn("text-sm font-medium tracking-tight", className),
36
- ...props
37
- });
38
- }
39
- function EmptyDescription({ className, ...props }) {
40
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
41
- "data-slot": "empty-description",
42
- className: cn("text-xs/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
43
- ...props
44
- });
45
- }
46
- function Progress$1({ className, children, value, ...props }) {
47
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ProgressRoot, {
48
- value,
49
- "data-slot": "progress",
50
- className: cn("w-full", className),
51
- ...props,
52
- children: [children, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProgressTrack, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProgressIndicator, {}) })]
53
- });
54
- }
55
- function ProgressTrack({ className, ...props }) {
56
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProgressTrack$1, {
57
- className: cn("relative flex h-1 w-full items-center overflow-x-hidden rounded-md bg-muted", className),
58
- "data-slot": "progress-track",
59
- ...props
60
- });
61
- }
62
- function ProgressIndicator({ className, ...props }) {
63
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProgressIndicator$1, {
64
- "data-slot": "progress-indicator",
65
- className: cn("h-full bg-primary transition-transform motion-reduce:transition-none", className),
66
- ...props
67
- });
68
- }
69
- function InsightsInfo({ label, children }) {
70
- const id = (0, import_react.useId)();
71
- const [open, setOpen] = (0, import_react.useState)(false);
72
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip$1, {
73
- open,
74
- onOpenChange: setOpen,
75
- triggerId: id,
76
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipTrigger, {
77
- id,
78
- "aria-describedby": open ? `${id}-description` : void 0,
79
- closeOnClick: false,
80
- onClick: () => setOpen((value) => !value),
81
- render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
82
- "aria-label": label,
83
- className: "size-11 sm:size-7",
84
- size: "icon",
85
- variant: "ghost"
86
- }),
87
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, {})
88
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipContent, {
89
- id: `${id}-description`,
90
- role: "tooltip",
91
- className: "max-w-64",
92
- side: "bottom",
93
- children
94
- })]
95
- });
96
- }
97
- function Tabs$1({ className, orientation = "horizontal", ...props }) {
98
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRoot, {
99
- orientation,
100
- "data-slot": "tabs",
101
- "data-orientation": orientation,
102
- className: cn("group/tabs flex gap-2 data-horizontal:flex-col", className),
103
- ...props
104
- });
105
- }
106
- var tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
107
- variants: { variant: {
108
- default: "bg-muted",
109
- line: "gap-1 bg-transparent"
110
- } },
111
- defaultVariants: { variant: "default" }
112
- });
113
- function TabsList({ className, variant = "default", ...props }) {
114
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsList$1, {
115
- "data-slot": "tabs-list",
116
- "data-variant": variant,
117
- className: cn(tabsListVariants({ variant }), className),
118
- ...props
119
- });
120
- }
121
- function TabsTrigger({ className, ...props }) {
122
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsTab, {
123
- "data-slot": "tabs-trigger",
124
- className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
125
- ...props
126
- });
127
- }
128
- function TabsContent({ className, ...props }) {
129
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsPanel, {
130
- "data-slot": "tabs-content",
131
- className: cn("flex-1 text-xs/relaxed outline-none", className),
132
- ...props
133
- });
134
- }
135
- var usageMetrics = {
136
- "24h": {
137
- label: "DAU",
138
- period: "24 hours",
139
- interval: "hour"
140
- },
141
- "7d": {
142
- label: "WAU",
143
- period: "7 days",
144
- interval: "6 hours"
145
- },
146
- "30d": {
147
- label: "MAU",
148
- period: "30 days",
149
- interval: "day"
150
- }
151
- };
152
- function InsightsPeriodSelector({ window, onWindowChange }) {
153
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tabs$1, {
154
- value: window,
155
- onValueChange: (value) => {
156
- if (value === "24h" || value === "7d" || value === "30d") onWindowChange(value);
157
- },
158
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsList, {
159
- "aria-label": "Reporting period",
160
- className: "min-h-11 sm:min-h-9",
161
- children: [
162
- "24h",
163
- "7d",
164
- "30d"
165
- ].map((value) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsTrigger, {
166
- value,
167
- "aria-label": usageMetrics[value].period,
168
- className: "min-w-12 px-3",
169
- children: value
170
- }, value))
171
- })
172
- });
173
- }
174
- var getAppUsageReportRpc = createServerFn({ method: "GET" }).validator((input) => {
175
- readRecoveryInput(input);
176
- return {
177
- platform: input.platform,
178
- channel: input.channel,
179
- appVersion: input.appVersion,
180
- window: input.window
181
- };
182
- }).handler(createSsrRpc("8a98cd9c178e4a54185d62c25a95f09d3d59850c43d3f5baa1563e1614ad942e"));
183
- //#endregion
184
- export { InsightsInfo as a, Tabs$1 as c, TabsTrigger as d, getAppUsageReportRpc as f, EmptyTitle as i, TabsContent as l, EmptyDescription as n, InsightsPeriodSelector as o, usageMetrics as p, EmptyHeader as r, Progress$1 as s, Empty as t, TabsList as u };
@@ -1,24 +0,0 @@
1
- import { c as createServerFn } from "./createServerFn-B2hcXoPM.mjs";
2
- import { t as createServerRpc } from "./createServerRpc-DB29C_5p.mjs";
3
- import { t as readRecoveryInput } from "./insights-recovery-Cv6RSyeR.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/insights-usage-rpc-BUruODjE.js
5
- var getAppUsageReportRpc_createServerFn_handler = createServerRpc({
6
- id: "8a98cd9c178e4a54185d62c25a95f09d3d59850c43d3f5baa1563e1614ad942e",
7
- name: "getAppUsageReportRpc",
8
- filename: "src/lib/insights-usage-rpc.ts"
9
- }, (opts) => getAppUsageReportRpc.__executeServer(opts));
10
- var getAppUsageReportRpc = createServerFn({ method: "GET" }).validator((input) => {
11
- readRecoveryInput(input);
12
- return {
13
- platform: input.platform,
14
- channel: input.channel,
15
- appVersion: input.appVersion,
16
- window: input.window
17
- };
18
- }).handler(getAppUsageReportRpc_createServerFn_handler, async ({ data }) => {
19
- const [{ prepareConfig }, { getAppUsageReport }] = await Promise.all([import("./config.server-B8WsT3s0.mjs"), import("./insightsUsage-DNIj6jxF.mjs")]);
20
- const { config } = await prepareConfig();
21
- return getAppUsageReport(config.database.models.insights, data);
22
- });
23
- //#endregion
24
- export { getAppUsageReportRpc_createServerFn_handler };
@@ -1,303 +0,0 @@
1
- import { n as isDatabaseMetadataObject, t as DatabasePluginInputError } from "./databaseJsonValue-d6I3nAS4.mjs";
2
- import { x as isUUIDv7 } from "./dist-CyzPaI5v.mjs";
3
- //#region node_modules/.nitro/vite/services/ssr/assets/insightsContract-B09K_Px1.js
4
- var databaseFields = {
5
- bundles: [
6
- "id",
7
- "platform",
8
- "file_hash",
9
- "git_commit_hash",
10
- "storage_uri",
11
- "archive_byte_size",
12
- "metadata",
13
- "manifest_storage_uri",
14
- "manifest_file_hash",
15
- "asset_base_storage_uri"
16
- ],
17
- bundle_patches: [
18
- "id",
19
- "bundle_id",
20
- "base_bundle_id",
21
- "base_file_hash",
22
- "patch_file_hash",
23
- "patch_storage_uri",
24
- "byte_size",
25
- "order_index"
26
- ],
27
- releases: [
28
- "id",
29
- "revision",
30
- "scope_key",
31
- "channel_id",
32
- "platform",
33
- "kind",
34
- "bundle_id",
35
- "strategy",
36
- "target_app_version",
37
- "fingerprint_hash",
38
- "enabled",
39
- "should_force_update",
40
- "message",
41
- "rollout_cohort_count",
42
- "target_cohorts",
43
- "operation",
44
- "source_release_id",
45
- "created_at_ms",
46
- "updated_at_ms"
47
- ],
48
- release_catalogs: [
49
- "scope_key",
50
- "catalog_id",
51
- "strategy",
52
- "channel_id",
53
- "channel_key",
54
- "platform",
55
- "fingerprint_hash",
56
- "generation",
57
- "payload",
58
- "catalog_hash",
59
- "byte_size",
60
- "is_tombstone",
61
- "updated_at_ms"
62
- ],
63
- channels: ["id", "name"],
64
- bundle_events: [
65
- "id",
66
- "type",
67
- "install_id",
68
- "user_id",
69
- "username",
70
- "from_bundle_id",
71
- "from_release_id",
72
- "to_release_id",
73
- "to_bundle_id",
74
- "platform",
75
- "app_version",
76
- "channel",
77
- "cohort",
78
- "update_strategy",
79
- "fingerprint_hash",
80
- "sdk_version",
81
- "received_at_ms"
82
- ],
83
- bundle_installations: [
84
- "id",
85
- "install_id",
86
- "user_id",
87
- "username",
88
- "to_bundle_id",
89
- "type",
90
- "platform",
91
- "app_version",
92
- "channel",
93
- "cohort",
94
- "received_at_ms"
95
- ],
96
- api_keys: [
97
- "id",
98
- "hash",
99
- "name",
100
- "prefix",
101
- "role",
102
- "created_at_ms",
103
- "revoked_at_ms"
104
- ]
105
- };
106
- var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
107
- var isChannelText = (value) => {
108
- if (typeof value !== "string" || value.length === 0) return false;
109
- let codePointCount = 0;
110
- for (const _codePoint of value) {
111
- codePointCount += 1;
112
- if (codePointCount > 255) return false;
113
- }
114
- return true;
115
- };
116
- var isInsightsIdentityText = (value) => typeof value === "string" && value.length > 0 && value.length <= 255;
117
- var isNullableInsightsIdentityText = (value) => value === null || isInsightsIdentityText(value);
118
- var modelValidators = {
119
- bundles: {
120
- id: (value) => typeof value === "string",
121
- platform: (value) => value === "ios" || value === "android",
122
- should_force_update: (value) => typeof value === "boolean",
123
- enabled: (value) => typeof value === "boolean",
124
- file_hash: (value) => typeof value === "string",
125
- git_commit_hash: (value) => value === null || typeof value === "string",
126
- message: (value) => value === null || typeof value === "string",
127
- channel: isChannelText,
128
- channel_id: isChannelText,
129
- storage_uri: (value) => typeof value === "string",
130
- archive_byte_size: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0,
131
- target_app_version: (value) => value === null || typeof value === "string",
132
- fingerprint_hash: (value) => value === null || typeof value === "string",
133
- metadata: isDatabaseMetadataObject,
134
- rollout_cohort_count: (value) => typeof value === "number" && Number.isInteger(value) && value >= 0 && value <= 1e3,
135
- target_cohorts: (value) => value === null || Array.isArray(value) && value.every((item) => typeof item === "string"),
136
- manifest_storage_uri: (value) => value === null || typeof value === "string",
137
- manifest_file_hash: (value) => value === null || typeof value === "string",
138
- asset_base_storage_uri: (value) => value === null || typeof value === "string"
139
- },
140
- bundle_patches: {
141
- id: (value) => typeof value === "string",
142
- bundle_id: (value) => typeof value === "string",
143
- base_bundle_id: (value) => typeof value === "string",
144
- base_file_hash: (value) => typeof value === "string",
145
- patch_file_hash: (value) => typeof value === "string",
146
- patch_storage_uri: (value) => typeof value === "string",
147
- byte_size: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0,
148
- order_index: (value) => typeof value === "number" && Number.isInteger(value) && value >= 0
149
- },
150
- releases: {
151
- id: isUUIDv7,
152
- revision: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 1,
153
- scope_key: (value) => typeof value === "string" && value.length > 0,
154
- channel_id: isChannelText,
155
- platform: (value) => value === "ios" || value === "android",
156
- kind: (value) => value === "BUNDLE" || value === "EMBEDDED",
157
- bundle_id: (value) => value === null || typeof value === "string",
158
- strategy: (value) => value === "APP_VERSION" || value === "FINGERPRINT",
159
- target_app_version: (value) => value === null || typeof value === "string",
160
- fingerprint_hash: (value) => value === null || typeof value === "string",
161
- enabled: (value) => typeof value === "boolean",
162
- should_force_update: (value) => typeof value === "boolean",
163
- message: (value) => value === null || typeof value === "string",
164
- rollout_cohort_count: (value) => typeof value === "number" && Number.isInteger(value) && value >= 0 && value <= 1e3,
165
- target_cohorts: (value) => Array.isArray(value) && value.every((item) => typeof item === "string"),
166
- operation: (value) => value === "DEPLOY" || value === "PROMOTE" || value === "ROLLBACK",
167
- source_release_id: (value) => value === null || isUUIDv7(value),
168
- created_at_ms: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0,
169
- updated_at_ms: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0
170
- },
171
- release_catalogs: {
172
- scope_key: (value) => typeof value === "string" && value.length > 0,
173
- catalog_id: (value) => typeof value === "string" && value.length > 0,
174
- strategy: (value) => value === "APP_VERSION" || value === "FINGERPRINT",
175
- channel_id: isChannelText,
176
- channel_key: (value) => typeof value === "string" && value.length > 0,
177
- platform: (value) => value === "ios" || value === "android",
178
- fingerprint_hash: (value) => value === null || typeof value === "string",
179
- generation: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 1,
180
- payload: (value) => typeof value === "string",
181
- catalog_hash: (value) => typeof value === "string" && value.length > 0,
182
- byte_size: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0,
183
- is_tombstone: (value) => typeof value === "boolean",
184
- updated_at_ms: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0
185
- },
186
- channels: {
187
- id: isChannelText,
188
- name: isChannelText
189
- },
190
- bundle_events: {
191
- id: (value) => typeof value === "string",
192
- type: (value) => value === "UPDATE_APPLIED" || value === "RECOVERED" || value === "UNCHANGED",
193
- install_id: isInsightsIdentityText,
194
- user_id: isNullableInsightsIdentityText,
195
- username: (value) => value === null || typeof value === "string",
196
- from_bundle_id: (value) => value === null || typeof value === "string",
197
- from_release_id: (value) => value === null || typeof value === "string",
198
- to_release_id: (value) => value === null || typeof value === "string",
199
- to_bundle_id: (value) => typeof value === "string",
200
- platform: (value) => value === "ios" || value === "android",
201
- app_version: (value) => typeof value === "string",
202
- channel: (value) => typeof value === "string",
203
- cohort: (value) => typeof value === "string",
204
- update_strategy: (value) => value === null || value === "fingerprint" || value === "appVersion",
205
- fingerprint_hash: (value) => value === null || typeof value === "string",
206
- sdk_version: (value) => value === null || typeof value === "string",
207
- received_at_ms: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0
208
- },
209
- bundle_installations: {
210
- id: (value) => typeof value === "string",
211
- install_id: isInsightsIdentityText,
212
- user_id: isNullableInsightsIdentityText,
213
- username: (value) => value === null || typeof value === "string",
214
- to_bundle_id: (value) => typeof value === "string",
215
- type: (value) => value === "UPDATE_APPLIED" || value === "RECOVERED" || value === "UNCHANGED",
216
- platform: (value) => value === "ios" || value === "android",
217
- app_version: (value) => typeof value === "string",
218
- channel: (value) => typeof value === "string",
219
- cohort: (value) => typeof value === "string",
220
- received_at_ms: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0
221
- },
222
- api_keys: {
223
- id: (value) => typeof value === "string",
224
- hash: (value) => typeof value === "string",
225
- name: (value) => typeof value === "string",
226
- prefix: (value) => typeof value === "string",
227
- role: (value) => value === "client",
228
- created_at_ms: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0,
229
- revoked_at_ms: (value) => value === null || typeof value === "number" && Number.isSafeInteger(value) && value >= 0
230
- }
231
- };
232
- var validateField = (model, field) => {
233
- if (!databaseFields[model].includes(field)) throw new DatabasePluginInputError("invalid-field");
234
- };
235
- var validateFields = (model, fields) => {
236
- for (const field of fields) validateField(model, field);
237
- };
238
- var hasValidReleaseInvariants = (data) => {
239
- const kind = data.kind;
240
- const bundleId = data.bundle_id;
241
- const strategy = data.strategy;
242
- const targetAppVersion = data.target_app_version;
243
- const fingerprintHash = data.fingerprint_hash;
244
- return (kind === "BUNDLE" && typeof bundleId === "string" || kind === "EMBEDDED" && bundleId === null) && (strategy === "APP_VERSION" && typeof targetAppVersion === "string" && fingerprintHash === null || strategy === "FINGERPRINT" && targetAppVersion === null && typeof fingerprintHash === "string");
245
- };
246
- var hasValidBundleEventInvariants = (data) => (data.type === "UPDATE_APPLIED" || data.type === "RECOVERED") && typeof data.from_bundle_id === "string" && (data.update_strategy === "fingerprint" || data.update_strategy === "appVersion") || data.type === "UNCHANGED" && data.from_bundle_id === null && data.update_strategy === null;
247
- var validateCreateData = (model, data) => {
248
- if (!isRecord(data)) throw new DatabasePluginInputError("invalid-data");
249
- validateFields(model, Object.keys(data));
250
- for (const field of databaseFields[model]) {
251
- const validator = modelValidators[model][field];
252
- if (!Object.hasOwn(data, field) || !validator || !validator(Reflect.get(data, field))) throw new DatabasePluginInputError("invalid-data");
253
- }
254
- if (model === "bundles" && data.target_app_version === null && data.fingerprint_hash === null) throw new DatabasePluginInputError("invalid-data");
255
- if (model === "releases" && !hasValidReleaseInvariants(data)) throw new DatabasePluginInputError("invalid-data");
256
- if (model === "release_catalogs" && (data.strategy === "APP_VERSION" && data.fingerprint_hash !== null || data.strategy === "FINGERPRINT" && typeof data.fingerprint_hash !== "string")) throw new DatabasePluginInputError("invalid-data");
257
- if (model === "bundle_events" && !hasValidBundleEventInvariants(data)) throw new DatabasePluginInputError("invalid-data");
258
- };
259
- var encoder = new TextEncoder();
260
- /** Exact UTF-8 byte ordering, without case folding or Unicode normalization. */
261
- var compareInsightsText = (left, right) => {
262
- const a = encoder.encode(left);
263
- const b = encoder.encode(right);
264
- for (let index = 0; index < Math.min(a.length, b.length); index += 1) if (a[index] !== b[index]) return a[index] - b[index];
265
- return a.length - b.length;
266
- };
267
- var isWellFormedText = (value) => {
268
- for (const character of value) {
269
- const point = character.codePointAt(0);
270
- if (point >= 55296 && point <= 57343) return false;
271
- }
272
- return true;
273
- };
274
- var validateRow = (model, row, result = false) => {
275
- try {
276
- validateCreateData(model, row);
277
- if (!isRecord(row) || typeof row.id !== "string" || !isUUIDv7(row.id) || Object.values(row).some((value) => typeof value === "string" && !isWellFormedText(value))) throw new DatabasePluginInputError("invalid-data");
278
- } catch (error) {
279
- if (result) throw new DatabasePluginInputError("invalid-result");
280
- throw error;
281
- }
282
- };
283
- /** Prepare the full latest-state candidate; the provider owns winning writes. */
284
- var toInsightsInstallationRow = (event) => {
285
- validateRow("bundle_events", event);
286
- return {
287
- id: event.id,
288
- install_id: event.install_id,
289
- user_id: event.user_id,
290
- username: event.username,
291
- to_bundle_id: event.to_bundle_id,
292
- type: event.type,
293
- platform: event.platform,
294
- app_version: event.app_version,
295
- channel: event.channel,
296
- cohort: event.cohort,
297
- received_at_ms: event.received_at_ms
298
- };
299
- };
300
- /** Unchanged reports are not bundle movements. */
301
- var isInsightsMovementEvent = (event) => event.type === "UPDATE_APPLIED" || event.type === "RECOVERED";
302
- //#endregion
303
- export { toInsightsInstallationRow as i, isInsightsMovementEvent as n, isRecord as r, compareInsightsText as t };
@@ -1,41 +0,0 @@
1
- import { n as recoveryWindows } from "./insights-recovery-Cv6RSyeR.mjs";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/insightsHistory-Ci4rYAgl.js
3
- async function readInsightsHistory(model, window, beforeReceivedAtMs = Date.now()) {
4
- const { durationMs, intervalMs } = recoveryWindows[window];
5
- const sinceMs = Math.max(0, beforeReceivedAtMs - durationMs);
6
- let completeSinceMs = sinceMs;
7
- let after;
8
- let truncated = false;
9
- const events = [];
10
- while (events.length < 5e4) {
11
- const limit = Math.min(100, 5e4 - events.length);
12
- const rows = await model.listEvents({
13
- filter: { kind: "all" },
14
- sinceMs,
15
- beforeReceivedAtMs,
16
- after,
17
- limit: limit + 1
18
- });
19
- const page = rows.slice(0, limit);
20
- events.push(...page);
21
- const last = page.at(-1);
22
- if (!last || rows.length <= limit) break;
23
- after = {
24
- id: last.id,
25
- receivedAtMs: last.received_at_ms
26
- };
27
- if (events.length === 5e4) {
28
- truncated = true;
29
- completeSinceMs = Math.floor(last.received_at_ms / intervalMs) * intervalMs + intervalMs;
30
- }
31
- }
32
- return {
33
- events: events.filter((row) => row.received_at_ms >= completeSinceMs).reverse(),
34
- sinceMs: completeSinceMs,
35
- beforeReceivedAtMs,
36
- intervalMs,
37
- truncated
38
- };
39
- }
40
- //#endregion
41
- export { readInsightsHistory as t };