@hot-updater/console 1.0.0-rc.4 → 1.0.0-rc.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/ConsoleFeatureUnavailable-DRzeMGRM.js +1 -0
- package/.output/public/assets/EventDetails-SB5ygJzS.js +1 -0
- package/.output/public/assets/HashValueDisplay-BFX_kY3-.js +1 -0
- package/.output/public/assets/InsightsInfo-btYppp0B.js +1 -0
- package/.output/public/assets/InsightsPageHeader-Ba8psD8t.js +1 -0
- package/.output/public/assets/NotFoundPage-CyRG2eca.js +1 -0
- package/.output/public/assets/alert-dialog-Bbk_4-WJ.js +1 -0
- package/.output/public/assets/api-DUgI6yOI.js +1 -0
- package/.output/public/assets/api-keys-CIO9L_wu.js +1 -0
- package/.output/public/assets/api-keys-CmkNKOhS.js +1 -0
- package/.output/public/assets/arrow-left-CnMYpqB7.js +1 -0
- package/.output/public/assets/arrow-up-right-BtffZA6e.js +1 -0
- package/.output/public/assets/chevron-right-BqD5wtFb.js +1 -0
- package/.output/public/assets/clipboard-DS9ucUQL.js +1 -0
- package/.output/public/assets/console-features-api-BMsI3Bj8.js +1 -0
- package/.output/public/assets/dialog-Bqbb7B0N.js +1 -0
- package/.output/public/assets/dist-LxKJB-Vu.js +1 -0
- package/.output/public/assets/empty-CuT2UhFp.js +1 -0
- package/.output/public/assets/field-BBDpjIqu.js +1 -0
- package/.output/public/assets/index-BEfQ2_7f.js +11 -0
- package/.output/public/assets/input-group-ja_30qaF.js +1 -0
- package/.output/public/assets/insights-B0ib9qOE.js +2 -0
- package/.output/public/assets/insights-BIMJx-0p.js +1 -0
- package/.output/public/assets/insights-CndqcWEj.js +42 -0
- package/.output/public/assets/insights-api-B6Ewc-OG.js +1 -0
- package/.output/public/assets/insights-usage-rpc-DYEhsCKT.js +1 -0
- package/.output/public/assets/insights_.distribution-B26PMy4k.js +2 -0
- package/.output/public/assets/insights_.distribution-BBDtqqYS.js +1 -0
- package/.output/public/assets/insights_.distribution-DhHmYS8k.js +1 -0
- package/.output/public/assets/installations-C3cMuwRx.js +1 -0
- package/.output/public/assets/installations-C3yrjwDh.js +2 -0
- package/.output/public/assets/installations-D3edlN75.js +1 -0
- package/.output/public/assets/key-round-wS_SIZ6b.js +1 -0
- package/.output/public/assets/list-CgrYiadM.js +1 -0
- package/.output/public/assets/refresh-cw-BYgoNCco.js +1 -0
- package/.output/public/assets/remote-config-0i-gDkeU.js +1 -0
- package/.output/public/assets/remote-config-An1ROIOQ.js +6 -0
- package/.output/public/assets/remote-config-CoeWgA9i.js +1 -0
- package/.output/public/assets/routes-DNoaJIQV.js +2 -0
- package/.output/public/assets/routes-cWBDtghZ.js +1 -0
- package/.output/public/assets/search-DaTDPW25.js +1 -0
- package/.output/public/assets/select-CZMQKT7F.js +1 -0
- package/.output/public/assets/sidebar-DNVyJPfX.js +3 -0
- package/.output/public/assets/smartphone-DpTFgtKf.js +1 -0
- package/.output/public/assets/styles-D8mxMvCB.css +2 -0
- package/.output/public/assets/switch-CU4-fupc.js +1 -0
- package/.output/public/assets/table-Gm4qRWwE.js +1 -0
- package/.output/public/assets/tabs-R1I8CRjR.js +1 -0
- package/.output/public/assets/undo-2-CmrHjwFc.js +1 -0
- package/.output/public/assets/useCompositeListItem-BaPeC9ZO.js +1 -0
- package/.output/public/assets/valueToPercent-CH8GCHaL.js +1 -0
- package/.output/server/__23tanstack-start-server-fn-resolver-DTAqlLRd.mjs +178 -0
- package/.output/server/_libs/@base-ui/react+[...].mjs +6450 -2741
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +3802 -4022
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +140 -97
- package/.output/server/_libs/lucide-react.mjs +235 -31
- package/.output/server/_libs/next-themes.mjs +1 -1
- package/.output/server/_libs/react-redux+[...].mjs +1 -1
- package/.output/server/_libs/recharts+[...].mjs +483 -901
- package/.output/server/_libs/sonner.mjs +1 -1
- package/.output/server/_libs/tanstack__history.mjs +68 -41
- package/.output/server/_libs/tanstack__query-core.mjs +2010 -309
- package/.output/server/_libs/tanstack__react-query.mjs +448 -21
- package/.output/server/_libs/verkit.mjs +102 -1
- package/.output/server/_ssr/BundleIdDisplay-BNoVW3Dv.mjs +13 -0
- package/.output/server/_ssr/ConsoleFeatureUnavailable-BPFa-cmJ.mjs +58 -0
- package/.output/server/_ssr/EventDetails-9CeshfdR.mjs +344 -0
- package/.output/server/_ssr/HashValueDisplay-DXZlkcps.mjs +55 -0
- package/.output/server/_ssr/InsightsInfo-DLNdJQ0m.mjs +75 -0
- package/.output/server/_ssr/InsightsPageHeader-DZGVDgvv.mjs +145 -0
- package/.output/server/_ssr/NotFoundPage-mYHHg-2s.mjs +37 -0
- package/.output/server/_ssr/{dialog-DUaIgpgd.mjs → alert-dialog-Chkim7vZ.mjs} +6 -83
- package/.output/server/_ssr/api-C-Il5-sa.mjs +203 -0
- package/.output/server/_ssr/api-keys-01FGqj4d.mjs +5 -0
- package/.output/server/_ssr/{api-keys-DJml_XoK.mjs → api-keys-B_f9h7ln.mjs} +48 -10
- package/.output/server/_ssr/api-keys-rpc-Cf4YCyFc.mjs +52 -0
- package/.output/server/_ssr/api-rpc-DRqwxxT_.mjs +296 -0
- package/.output/server/_ssr/{auth-BF8mbAgF.mjs → auth-UP0wXs4i.mjs} +1 -1
- package/.output/server/_ssr/{auth-rpc-D_hv52-J.mjs → auth-rpc-D8nFpU9C.mjs} +6 -6
- package/.output/server/_ssr/auth.server-COZoXu4i.mjs +5425 -0
- package/.output/server/_ssr/bundleActivity-M5gzBFNg.mjs +18 -0
- package/.output/server/_ssr/config-WVX4IxSR.mjs +15 -0
- package/.output/server/_ssr/config.server-Dm2l7w0O.mjs +36 -0
- package/.output/server/_ssr/console-access--o9FXikU.mjs +17 -0
- package/.output/server/_ssr/console-features-BftSkf3f.mjs +60 -0
- package/.output/server/_ssr/console-features-api-CYclUQ4h.mjs +43 -0
- package/.output/server/_ssr/console-features-rpc-1WaAkPM_.mjs +19 -0
- package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-Cm6Tn0_Y.mjs} +67 -56
- package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-RLR4H-Fn.mjs} +2 -2
- package/.output/server/_ssr/databaseConfig-C5SkAyUy.mjs +5 -0
- package/.output/server/_ssr/{databaseJsonValue-d6I3nAS4.mjs → databaseJsonValue-Csbuzc9Q.mjs} +28 -5
- package/.output/server/_ssr/databaseRows-BUuNU-qt.mjs +74 -0
- package/.output/server/_ssr/dialog-mfSANqjC.mjs +84 -0
- package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-wmnTk7w6.mjs} +140 -6
- package/.output/server/_ssr/{downloadBundle-B3ert-pY.mjs → downloadBundle-DViuIa9U.mjs} +10 -10
- package/.output/server/_ssr/empty-BPayFad3.mjs +60 -0
- package/.output/server/_ssr/{empty-plugin-adapters-B5QvGpEl.mjs → empty-plugin-adapters-CPtwX8a7.mjs} +1 -1
- package/.output/server/_ssr/failureReports-DKDhVsXA.mjs +33 -0
- package/.output/server/_ssr/field-DjZ5t7rH.mjs +189 -0
- package/.output/server/_ssr/getBundleChildren-CmjDg6Re.mjs +22 -0
- package/.output/server/_ssr/{input-group-Bb8ueylQ.mjs → input-group-Dx-MEkNM.mjs} +3 -52
- package/.output/server/_ssr/insights-BopxyJjk.mjs +14 -0
- package/.output/server/_ssr/insights-Bvm03d61.mjs +5 -0
- package/.output/server/_ssr/insights-CrLAHSDy.mjs +2315 -0
- package/.output/server/_ssr/insights-api-Bg8ZV_h_.mjs +122 -0
- package/.output/server/_ssr/insights-errors-BjnFUyZj.mjs +34 -0
- package/.output/server/_ssr/insights-failures-rpc-tyy5m9Cc.mjs +36 -0
- package/.output/server/_ssr/insights-failures-xaa41Buf.mjs +46 -0
- package/.output/server/_ssr/{insights-recovery-DSFM-YTL.mjs → insights-recovery-BWQhiZaF.mjs} +9 -2
- package/.output/server/_ssr/insights-recovery-rpc-CPJOiJAV.mjs +32 -0
- package/.output/server/_ssr/{insights-rpc-DrIQCjpD.mjs → insights-rpc-DoC3hla9.mjs} +22 -14
- package/.output/server/_ssr/insights-usage-BpBM0U0c.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-CFuTYp3T.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-O2ruP4iE.mjs +41 -0
- package/.output/server/_ssr/insightsUsage-CzhVjsc8.mjs +56 -0
- package/.output/server/_ssr/insights_.distribution-B3BVPD00.mjs +16 -0
- package/.output/server/_ssr/insights_.distribution-BMoisxRG.mjs +347 -0
- package/.output/server/_ssr/insights_.distribution-BiCcFyrG.mjs +7 -0
- package/.output/server/_ssr/{installations-YumqpNpa.mjs → installations-Cx3jIrwl.mjs} +280 -364
- package/.output/server/_ssr/installations-DTGPaKXx.mjs +69 -0
- package/.output/server/_ssr/installations-osiAuNKr.mjs +5 -0
- package/.output/server/_ssr/listReleases-BfUBlCHo.mjs +79 -0
- package/.output/server/_ssr/release-adoption-005tQRpo.mjs +55 -0
- package/.output/server/_ssr/release-adoption-rpc-BVySDR0L.mjs +41 -0
- package/.output/server/_ssr/releaseAdoption-2PJPA09N.mjs +114 -0
- package/.output/server/_ssr/releaseManagement-BTCWEY8-.mjs +11 -0
- package/.output/server/_ssr/remote-config-CUoAxUMy.mjs +430 -0
- package/.output/server/_ssr/remote-config-Cc5P4J-r.mjs +17 -0
- package/.output/server/_ssr/remote-config-CjdxcZ9B.mjs +5 -0
- package/.output/server/_ssr/remote-config-D2GmbGwI.mjs +2594 -0
- package/.output/server/_ssr/remote-config-rpc-kjoZ9PRS.mjs +115 -0
- package/.output/server/_ssr/rolldown-runtime-rSIU-vHC.mjs +13 -0
- package/.output/server/_ssr/{router-iP95Vqi2.mjs → router-DwGVewL-.mjs} +141 -139
- package/.output/server/_ssr/{routes-ivsV2TDu.mjs → routes-C4yxv3JU.mjs} +192 -685
- package/.output/server/_ssr/routes-D3_aegLY.mjs +409 -0
- package/.output/server/_ssr/runtime.server-BoWf4QhU.mjs +1716 -0
- package/.output/server/_ssr/schema-DrOtkRVD.mjs +361 -0
- package/.output/server/_ssr/select-DkzM2miy.mjs +107 -0
- package/.output/server/_ssr/server-BW0gzB0p.mjs +8325 -0
- package/.output/server/_ssr/{createSsrRpc-NHF2PxuK.mjs → sidebar-DPcOijvL.mjs} +107 -47
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/start-BfFbHKMK.mjs +4 -0
- package/.output/server/_ssr/switch-BqJ2mAwC.mjs +17 -0
- package/.output/server/_ssr/{table-D1mL8fJu.mjs → table-R7RY92q9.mjs} +2 -2
- package/.output/server/_ssr/tabs-trDcbRkT.mjs +45 -0
- package/.output/server/_ssr/updateFailures-H6pnnYK4.mjs +40 -0
- package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-ctA_XVZA.mjs} +2 -2
- package/.output/server/_tanstack-start-manifest_v-BwInaUTw.mjs +139 -0
- package/.output/server/index.mjs +315 -154
- package/LICENSE +13 -14
- package/README.md +82 -72
- package/lib/index.d.mts +23 -11
- package/lib/vite-internal.mjs +13 -3
- package/lib/vite.d.mts +2 -0
- package/package.json +14 -14
- package/src/components/AppSidebar.tsx +100 -71
- package/src/components/ConsoleAccessPage.tsx +5 -1
- package/src/components/ConsoleFeatureUnavailable.tsx +80 -0
- package/src/components/NotFoundPage.tsx +7 -7
- package/src/components/features/FeatureSlots.tsx +103 -0
- package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
- package/src/components/features/bundles/BundleMetadata.tsx +8 -5
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +1 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +2 -5
- package/src/components/features/insights/AppUsage.tsx +366 -0
- package/src/components/features/insights/BuiltinBundle.tsx +36 -0
- package/src/components/features/insights/ComparedBundlesChart.tsx +310 -0
- package/src/components/features/insights/EstimatedCount.tsx +18 -0
- package/src/components/features/insights/EventDetails.tsx +400 -39
- package/src/components/features/insights/EventHistoryCard.tsx +112 -26
- package/src/components/features/insights/EventHistoryList.tsx +2 -2
- package/src/components/features/insights/FailureReports.tsx +407 -0
- package/src/components/features/insights/InsightsControls.tsx +265 -88
- package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
- package/src/components/features/insights/InsightsInfo.tsx +48 -0
- package/src/components/features/insights/InsightsOverview.tsx +604 -355
- package/src/components/features/insights/InsightsPageHeader.tsx +35 -20
- package/src/components/features/insights/InsightsPeriodSelector.tsx +89 -0
- package/src/components/features/insights/InstallationHistoryCard.tsx +66 -11
- package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
- package/src/components/features/insights/ReleaseActivity.tsx +308 -0
- package/src/components/features/insights/ReportingDevicesSummary.tsx +48 -0
- package/src/components/features/insights/RollbackButton.tsx +118 -0
- package/src/components/features/insights/UpdateFailures.tsx +382 -0
- package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +26 -12
- package/src/components/features/remote-config/ConditionDialog.tsx +581 -0
- package/src/components/features/remote-config/ConditionsCard.tsx +244 -0
- package/src/components/features/remote-config/ParameterDialog.tsx +407 -0
- package/src/components/features/remote-config/ParametersCard.tsx +244 -0
- package/src/components/features/remote-config/PreviewCard.tsx +284 -0
- package/src/components/features/remote-config/PublishDialog.tsx +319 -0
- package/src/components/features/remote-config/RemoteConfigPage.tsx +353 -0
- package/src/components/features/remote-config/RuleSummary.tsx +21 -0
- package/src/components/features/remote-config/ValueInput.tsx +148 -0
- package/src/components/features/remote-config/VersionsCard.tsx +361 -0
- package/src/components/features/remote-config/remoteConfigFeatureUi.tsx +15 -0
- package/src/components/features/remote-config/useDateTimeText.ts +16 -0
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/scroll-area.tsx +52 -0
- package/src/components/ui/sidebar.tsx +22 -29
- package/src/components/ui/tabs.tsx +81 -0
- package/src/index.ts +26 -19
- package/src/lib/api-keys-api.ts +0 -28
- package/src/lib/api-keys-rpc.ts +27 -38
- package/src/lib/api-rpc.ts +189 -266
- package/src/lib/api.ts +19 -102
- package/src/lib/bundle-activity.ts +24 -4
- package/src/lib/console-access.ts +20 -0
- package/src/lib/console-features-api.ts +68 -0
- package/src/lib/console-features-rpc.ts +13 -0
- package/src/lib/console-features.ts +97 -0
- package/src/lib/insights-api.ts +56 -2
- package/src/lib/insights-errors.ts +64 -0
- package/src/lib/insights-failures-rpc.ts +36 -0
- package/src/lib/insights-failures.ts +130 -0
- package/src/lib/insights-recovery-rpc.ts +13 -17
- package/src/lib/insights-recovery.ts +10 -27
- package/src/lib/insights-retention.ts +21 -0
- package/src/lib/insights-rpc.ts +30 -12
- package/src/lib/insights-search.ts +93 -0
- package/src/lib/insights-usage-rpc.ts +29 -0
- package/src/lib/insights-usage.ts +76 -0
- package/src/lib/insights-view.ts +34 -5
- package/src/lib/release-adoption-api.ts +214 -0
- package/src/lib/release-adoption-rpc.ts +49 -0
- package/src/lib/release-adoption.ts +164 -0
- package/src/lib/remote-config-api.ts +119 -0
- package/src/lib/remote-config-draft.ts +652 -0
- package/src/lib/remote-config-rpc.ts +196 -0
- package/src/lib/scroll-restoration.ts +21 -0
- package/src/lib/server/adminInsights.ts +124 -0
- package/src/lib/server/auth.server.ts +13 -5
- package/src/lib/server/bundleActivity.ts +27 -28
- package/src/lib/server/config.server.ts +21 -74
- package/src/lib/server/console-feature-apis.ts +70 -0
- package/src/lib/server/console-runtime.server.ts +82 -38
- package/src/lib/server/downloadBundle.ts +16 -15
- package/src/lib/server/failureReports.ts +49 -0
- package/src/lib/server/getBundleChildren.ts +31 -122
- package/src/lib/server/insightsUsage.ts +63 -0
- package/src/lib/server/listReleases.ts +109 -44
- package/src/lib/server/releaseAdoption.ts +154 -0
- package/src/lib/server/releaseReachability.ts +8 -7
- package/src/lib/server/remoteConfig.ts +191 -0
- package/src/lib/server/runtime.server.ts +120 -31
- package/src/lib/server/updateFailures.ts +65 -0
- package/src/routeTree.gen.ts +65 -44
- package/src/router.tsx +3 -2
- package/src/routes/-installations-search.ts +32 -8
- package/src/routes/-releases-search.ts +76 -29
- package/src/routes/__root.tsx +10 -4
- package/src/routes/api/bundles/$bundleId/download.ts +2 -5
- package/src/routes/api-keys.tsx +5 -2
- package/src/routes/index.tsx +210 -152
- package/src/routes/insights.tsx +133 -18
- package/src/routes/insights_.distribution.tsx +422 -0
- package/src/routes/installations.tsx +98 -41
- package/src/routes/remote-config.tsx +42 -0
- package/src/styles.css +9 -0
- package/src/vite-internal.ts +15 -3
- package/src/vite.ts +2 -0
- package/.output/public/assets/InsightsPageHeader-C-Xc2MB9.js +0 -1
- package/.output/public/assets/api-keys-C1sgC6ko.js +0 -1
- package/.output/public/assets/api-keys-api-LchP65vQ.js +0 -1
- package/.output/public/assets/badge-BuMDU0Rf.js +0 -1
- package/.output/public/assets/card-BEvx_QKh.js +0 -1
- package/.output/public/assets/chart-no-axes-combined-C0G0fQ3J.js +0 -1
- package/.output/public/assets/composite-CHTH1Xhh.js +0 -1
- package/.output/public/assets/createServerFn-DHc2erub.js +0 -3
- package/.output/public/assets/dialog-dyZ1SphZ.js +0 -1
- package/.output/public/assets/dist-Bh1gaDfB.js +0 -1
- package/.output/public/assets/field-79SVH26s.js +0 -1
- package/.output/public/assets/index-BNkxg4jz.js +0 -10
- package/.output/public/assets/input-group-BbHfaBzQ.js +0 -1
- package/.output/public/assets/insights-D_7uSKfc.js +0 -1
- package/.output/public/assets/installations-BzoHWuXw.js +0 -1
- package/.output/public/assets/installations-DvjbUqd1.js +0 -2
- package/.output/public/assets/lazyRouteComponent-BN0MS05o.js +0 -1
- package/.output/public/assets/link-BG06whwB.js +0 -1
- package/.output/public/assets/loader-circle-Bbp8LGVC.js +0 -1
- package/.output/public/assets/preload-helper-uTix4PVD.js +0 -1
- package/.output/public/assets/refresh-cw-DZgiAOMk.js +0 -1
- package/.output/public/assets/routes-BFE-oRIT.js +0 -1
- package/.output/public/assets/routes-DaPMY31P.js +0 -2
- package/.output/public/assets/shield-check-DoIiaaXU.js +0 -1
- package/.output/public/assets/signing-BTRhaF5D.js +0 -1
- package/.output/public/assets/styles-C7U0oVke.css +0 -2
- package/.output/public/assets/table-BBEzJ7Xl.js +0 -1
- package/.output/public/assets/useCompositeListItem-BkPDaqyj.js +0 -42
- package/.output/server/__23tanstack-start-server-fn-resolver-Dr2ixDgQ.mjs +0 -146
- package/.output/server/_ssr/InsightsPageHeader-C5Has8Ry.mjs +0 -60
- package/.output/server/_ssr/api-keys-api-CrCZyvnl.mjs +0 -60
- package/.output/server/_ssr/api-keys-rpc-CFaNf-q0.mjs +0 -136
- package/.output/server/_ssr/api-rpc-B61KL3Eo.mjs +0 -1399
- package/.output/server/_ssr/auth.server-DF_shCeq.mjs +0 -47
- package/.output/server/_ssr/badge-BgsCP9Dp.mjs +0 -28
- package/.output/server/_ssr/bundle-signing-rpc-BBipZnFs.mjs +0 -16
- package/.output/server/_ssr/bundle-signing.server-Co_zHdJx.mjs +0 -12
- package/.output/server/_ssr/bundleActivity-D3_fIda2.mjs +0 -27
- package/.output/server/_ssr/card-DrbxCPtG.mjs +0 -86
- package/.output/server/_ssr/chart-qxa-_30a.mjs +0 -162
- package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
- package/.output/server/_ssr/config.server-CBr6PDj5.mjs +0 -368
- package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
- package/.output/server/_ssr/deleteBundle-BAq3JuGr.mjs +0 -66
- package/.output/server/_ssr/field-CqNUlqUq.mjs +0 -74
- package/.output/server/_ssr/getBundleChildren-COMt16m_.mjs +0 -50
- package/.output/server/_ssr/insights-B-DUbksX.mjs +0 -502
- package/.output/server/_ssr/insights-recovery-rpc-P71FH66n.mjs +0 -37
- package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +0 -303
- package/.output/server/_ssr/insightsRecovery-CqcosG7B.mjs +0 -149
- package/.output/server/_ssr/installations-BQrppti7.mjs +0 -29
- package/.output/server/_ssr/routes-BDabsmc7.mjs +0 -37
- package/.output/server/_ssr/runtime.server-jmZOKIQM.mjs +0 -438
- package/.output/server/_ssr/server-p7yrVBfD.mjs +0 -7468
- package/.output/server/_ssr/signing-CxCbnFCt.mjs +0 -134
- package/.output/server/_ssr/start-DpViQGnt.mjs +0 -4
- package/.output/server/_tanstack-start-manifest_v-Cwpu0C9Q.mjs +0 -100
- package/src/components/features/bundles/BundleActivityChart.tsx +0 -95
- package/src/components/features/bundles/BundleInsightsSummary.tsx +0 -121
- package/src/components/features/signing/BundleSigningPage.tsx +0 -139
- package/src/lib/bundle-signing-api.ts +0 -14
- package/src/lib/bundle-signing-rpc.ts +0 -16
- package/src/lib/server/bundle-signing.server.ts +0 -23
- package/src/lib/server/deleteBundle.ts +0 -145
- package/src/lib/server/insightsHistory.ts +0 -52
- package/src/lib/server/insightsRecovery.ts +0 -186
- package/src/routes/signing.tsx +0 -37
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
import { t as DatabasePluginInputError } from "./databaseJsonValue-d6I3nAS4.mjs";
|
|
2
|
-
import { l as getBundlePatches } from "./dist-CyzPaI5v.mjs";
|
|
3
|
-
import { a as rowsToBundles, n as bundleToPatchRows, r as bundleToRow, t as bundleMetadataToRow } from "./databaseRows-5bCRTxm-.mjs";
|
|
4
|
-
import { r as getRequest } from "./server-p7yrVBfD.mjs";
|
|
5
|
-
import { requireConsoleAccess, t as resolveConsoleConfig } from "./auth.server-DF_shCeq.mjs";
|
|
6
|
-
import { r as isRecord } from "./insightsContract-fjJDBeEE.mjs";
|
|
7
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/config.server-CBr6PDj5.js
|
|
8
|
-
/**
|
|
9
|
-
* Calculate pagination information based on total count, limit, and offset
|
|
10
|
-
*/
|
|
11
|
-
function calculatePagination(total, options) {
|
|
12
|
-
const { limit, offset } = options;
|
|
13
|
-
if (total === 0) return {
|
|
14
|
-
total: 0,
|
|
15
|
-
hasNextPage: false,
|
|
16
|
-
hasPreviousPage: false,
|
|
17
|
-
currentPage: 1,
|
|
18
|
-
totalPages: 0
|
|
19
|
-
};
|
|
20
|
-
const currentPage = Math.floor(offset / limit) + 1;
|
|
21
|
-
const totalPages = Math.ceil(total / limit);
|
|
22
|
-
return {
|
|
23
|
-
total,
|
|
24
|
-
hasNextPage: offset + limit < total,
|
|
25
|
-
hasPreviousPage: offset > 0,
|
|
26
|
-
currentPage,
|
|
27
|
-
totalPages
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
var validateBundlePagination = (options) => {
|
|
31
|
-
if (!Number.isSafeInteger(options.limit) || options.limit <= 0 || options.page !== void 0 && (!Number.isSafeInteger(options.page) || options.page <= 0) || options.page !== void 0 && options.cursor !== void 0) throw new DatabasePluginInputError("invalid-pagination");
|
|
32
|
-
const cursor = options.cursor;
|
|
33
|
-
if (cursor === void 0) return;
|
|
34
|
-
if (!isRecord(cursor)) throw new DatabasePluginInputError("invalid-pagination");
|
|
35
|
-
const hasAfter = Object.hasOwn(cursor, "after");
|
|
36
|
-
if (hasAfter === Object.hasOwn(cursor, "before")) throw new DatabasePluginInputError("invalid-pagination");
|
|
37
|
-
const value = hasAfter ? cursor.after : cursor.before;
|
|
38
|
-
if (typeof value !== "string" || value.length === 0) throw new DatabasePluginInputError("invalid-pagination");
|
|
39
|
-
};
|
|
40
|
-
var DatabaseAtomicCommitUnsupportedError = class extends Error {
|
|
41
|
-
pluginName;
|
|
42
|
-
name = "DatabaseAtomicCommitUnsupportedError";
|
|
43
|
-
constructor(pluginName) {
|
|
44
|
-
super(`Database plugin "${pluginName}" cannot atomically commit changes across models.`);
|
|
45
|
-
this.pluginName = pluginName;
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Internal provider signal for a delete rejected by a live reference.
|
|
50
|
-
*
|
|
51
|
-
* Provider implementations throw this after translating their native
|
|
52
|
-
* foreign-key or reference-condition error. The public database contract
|
|
53
|
-
* observes only the indexed `referenced` commit conflict.
|
|
54
|
-
*/
|
|
55
|
-
var DatabaseRowReferencedError = class extends Error {
|
|
56
|
-
name = "DatabaseRowReferencedError";
|
|
57
|
-
constructor() {
|
|
58
|
-
super("The database row is still referenced.");
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
function assertStorageOperations(plugin, operations) {
|
|
62
|
-
for (const operation of operations) if (typeof plugin[operation] !== "function") throw new Error(`Storage plugin "${plugin.name}" does not implement ${operation}.`);
|
|
63
|
-
}
|
|
64
|
-
var DatabasePatchUpdateUnsupportedError = class extends Error {
|
|
65
|
-
bundleId;
|
|
66
|
-
pluginName;
|
|
67
|
-
name = "DatabasePatchUpdateUnsupportedError";
|
|
68
|
-
constructor(bundleId, pluginName) {
|
|
69
|
-
super(`Database plugin "${pluginName}" cannot atomically replace patches for bundle "${bundleId}".`);
|
|
70
|
-
this.bundleId = bundleId;
|
|
71
|
-
this.pluginName = pluginName;
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
var bundleUpdateToRow = (update, _channelId) => {
|
|
75
|
-
return {
|
|
76
|
-
...update.platform !== void 0 ? { platform: update.platform } : {},
|
|
77
|
-
...update.fileHash !== void 0 ? { file_hash: update.fileHash } : {},
|
|
78
|
-
...update.gitCommitHash !== void 0 ? { git_commit_hash: update.gitCommitHash } : {},
|
|
79
|
-
...update.storageUri !== void 0 ? { storage_uri: update.storageUri } : {},
|
|
80
|
-
...update.archiveByteSize !== void 0 ? { archive_byte_size: update.archiveByteSize } : {},
|
|
81
|
-
...update.metadata !== void 0 ? { metadata: bundleMetadataToRow(update.metadata) } : {},
|
|
82
|
-
...update.manifestStorageUri !== void 0 ? { manifest_storage_uri: update.manifestStorageUri } : {},
|
|
83
|
-
...update.manifestFileHash !== void 0 ? { manifest_file_hash: update.manifestFileHash } : {},
|
|
84
|
-
...update.assetBaseStorageUri !== void 0 ? { asset_base_storage_uri: update.assetBaseStorageUri } : {}
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
var bundleUpdateToPatchRows = (bundleId, update) => getBundlePatches({ patches: update.patches }).map((patch, orderIndex) => ({
|
|
88
|
-
id: `${bundleId}:${patch.baseBundleId}`,
|
|
89
|
-
bundle_id: bundleId,
|
|
90
|
-
base_bundle_id: patch.baseBundleId,
|
|
91
|
-
base_file_hash: patch.baseFileHash,
|
|
92
|
-
patch_file_hash: patch.patchFileHash,
|
|
93
|
-
patch_storage_uri: patch.patchStorageUri,
|
|
94
|
-
byte_size: patch.byteSize,
|
|
95
|
-
order_index: orderIndex
|
|
96
|
-
}));
|
|
97
|
-
var PAGE_SIZE = 100;
|
|
98
|
-
var mergeIdFilter = (where, id) => ({
|
|
99
|
-
...where,
|
|
100
|
-
id: {
|
|
101
|
-
...where?.id,
|
|
102
|
-
...id
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
var loadBundleRows = async (database, where) => {
|
|
106
|
-
const finiteIds = where?.id?.in;
|
|
107
|
-
if (finiteIds) {
|
|
108
|
-
if (finiteIds.length === 0) return [];
|
|
109
|
-
return [...await database.models.bundles.findMany({
|
|
110
|
-
where,
|
|
111
|
-
limit: finiteIds.length,
|
|
112
|
-
offset: 0,
|
|
113
|
-
orderBy: {
|
|
114
|
-
field: "id",
|
|
115
|
-
direction: "asc"
|
|
116
|
-
}
|
|
117
|
-
})];
|
|
118
|
-
}
|
|
119
|
-
const [cutoff] = await database.models.bundles.findMany({
|
|
120
|
-
where,
|
|
121
|
-
limit: 1,
|
|
122
|
-
offset: 0,
|
|
123
|
-
orderBy: {
|
|
124
|
-
field: "id",
|
|
125
|
-
direction: "desc"
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
if (!cutoff) return [];
|
|
129
|
-
const rows = [];
|
|
130
|
-
let after;
|
|
131
|
-
for (;;) {
|
|
132
|
-
const page = await database.models.bundles.findMany({
|
|
133
|
-
where: mergeIdFilter(where, {
|
|
134
|
-
lte: cutoff.id,
|
|
135
|
-
...after ? { gt: after } : {}
|
|
136
|
-
}),
|
|
137
|
-
limit: PAGE_SIZE,
|
|
138
|
-
offset: 0,
|
|
139
|
-
orderBy: {
|
|
140
|
-
field: "id",
|
|
141
|
-
direction: "asc"
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
rows.push(...page);
|
|
145
|
-
if (page.length < PAGE_SIZE) return rows;
|
|
146
|
-
after = page.at(-1)?.id;
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
var hydrateRows = async (database, ownerRows) => {
|
|
150
|
-
const patchRows = await database.models.bundlePatches.findByBundleIds(ownerRows.map(({ id }) => id));
|
|
151
|
-
const ownerIds = new Set(ownerRows.map(({ id }) => id));
|
|
152
|
-
const referencedIds = [...new Set(patchRows.map(({ base_bundle_id }) => base_bundle_id).filter((id) => !ownerIds.has(id)))];
|
|
153
|
-
return rowsToBundles(ownerRows, patchRows, referencedIds.length === 0 ? [] : await loadBundleRows(database, { id: { in: referencedIds } }));
|
|
154
|
-
};
|
|
155
|
-
var cursorIdFilter = (cursor, direction) => {
|
|
156
|
-
if (cursor?.after) return { [direction === "desc" ? "lt" : "gt"]: cursor.after };
|
|
157
|
-
if (cursor?.before) return { [direction === "desc" ? "gt" : "lt"]: cursor.before };
|
|
158
|
-
};
|
|
159
|
-
var responsePage = async (database, options) => {
|
|
160
|
-
validateBundlePagination(options);
|
|
161
|
-
const direction = options.orderBy?.direction ?? "desc";
|
|
162
|
-
const offset = options.page ? Math.max(0, options.page - 1) * options.limit : 0;
|
|
163
|
-
const cursor = options.page ? void 0 : options.cursor;
|
|
164
|
-
const queryLimit = cursor ? options.limit + 1 : options.limit;
|
|
165
|
-
if (!Number.isSafeInteger(offset) || !Number.isSafeInteger(queryLimit) || !Number.isSafeInteger(offset + queryLimit)) throw new DatabasePluginInputError("invalid-pagination");
|
|
166
|
-
const cursorFilter = cursorIdFilter(cursor, direction);
|
|
167
|
-
const where = cursorFilter ? mergeIdFilter(options.where, cursorFilter) : options.where;
|
|
168
|
-
const queryDirection = cursor?.before ? direction === "desc" ? "asc" : "desc" : direction;
|
|
169
|
-
const [queriedRows, total] = await Promise.all([database.models.bundles.findMany({
|
|
170
|
-
where,
|
|
171
|
-
limit: queryLimit,
|
|
172
|
-
offset,
|
|
173
|
-
orderBy: {
|
|
174
|
-
field: "id",
|
|
175
|
-
direction: queryDirection
|
|
176
|
-
}
|
|
177
|
-
}), database.models.bundles.count(options.where)]);
|
|
178
|
-
const hasMore = cursor ? queriedRows.length > options.limit : false;
|
|
179
|
-
const pageRows = cursor ? queriedRows.slice(0, options.limit) : queriedRows;
|
|
180
|
-
const ownerRows = cursor?.before ? pageRows.toReversed() : pageRows;
|
|
181
|
-
const pagination = calculatePagination(total, {
|
|
182
|
-
limit: options.limit,
|
|
183
|
-
offset
|
|
184
|
-
});
|
|
185
|
-
const hasPreviousPage = cursor ? Boolean(cursor.after) || hasMore : pagination.hasPreviousPage;
|
|
186
|
-
const hasNextPage = cursor ? Boolean(cursor.before) || hasMore : pagination.hasNextPage;
|
|
187
|
-
const firstId = ownerRows[0]?.id;
|
|
188
|
-
const lastId = ownerRows.at(-1)?.id;
|
|
189
|
-
return {
|
|
190
|
-
data: await hydrateRows(database, ownerRows),
|
|
191
|
-
pagination: {
|
|
192
|
-
...pagination,
|
|
193
|
-
hasNextPage,
|
|
194
|
-
hasPreviousPage,
|
|
195
|
-
...hasNextPage && lastId ? { nextCursor: lastId } : {},
|
|
196
|
-
...hasPreviousPage && firstId ? { previousCursor: firstId } : {},
|
|
197
|
-
...!firstId && cursor?.after ? { previousCursor: cursor.after } : {},
|
|
198
|
-
...!lastId && cursor?.before ? { nextCursor: cursor.before } : {}
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
};
|
|
202
|
-
var DatabaseBundleNotFoundError = class extends Error {
|
|
203
|
-
bundleId;
|
|
204
|
-
name = "DatabaseBundleNotFoundError";
|
|
205
|
-
constructor(bundleId) {
|
|
206
|
-
super(`Bundle "${bundleId}" was not found.`);
|
|
207
|
-
this.bundleId = bundleId;
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
var DatabasePatchInsertUnsupportedError = class extends Error {
|
|
211
|
-
bundleId;
|
|
212
|
-
pluginName;
|
|
213
|
-
name = "DatabasePatchInsertUnsupportedError";
|
|
214
|
-
constructor(bundleId, pluginName) {
|
|
215
|
-
super(`Database plugin "${pluginName}" cannot atomically insert patches for bundle "${bundleId}".`);
|
|
216
|
-
this.bundleId = bundleId;
|
|
217
|
-
this.pluginName = pluginName;
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
var insertChanges = (bundle) => [{
|
|
221
|
-
model: "bundles",
|
|
222
|
-
operation: "insert",
|
|
223
|
-
row: bundleToRow(bundle)
|
|
224
|
-
}, ...bundleToPatchRows(bundle).map((row) => ({
|
|
225
|
-
model: "bundlePatches",
|
|
226
|
-
operation: "insert",
|
|
227
|
-
row
|
|
228
|
-
}))];
|
|
229
|
-
var updateChanges = (bundleId, update) => {
|
|
230
|
-
const rowUpdate = bundleUpdateToRow(update);
|
|
231
|
-
return [{
|
|
232
|
-
model: "bundles",
|
|
233
|
-
operation: "update",
|
|
234
|
-
where: { id: bundleId },
|
|
235
|
-
update: rowUpdate
|
|
236
|
-
}, ...Object.hasOwn(update, "patches") ? [{
|
|
237
|
-
model: "bundlePatches",
|
|
238
|
-
operation: "delete",
|
|
239
|
-
where: { bundleId }
|
|
240
|
-
}, ...bundleUpdateToPatchRows(bundleId, update).map((row) => ({
|
|
241
|
-
model: "bundlePatches",
|
|
242
|
-
operation: "insert",
|
|
243
|
-
row
|
|
244
|
-
}))] : []];
|
|
245
|
-
};
|
|
246
|
-
var deleteChanges = (bundleId) => [{
|
|
247
|
-
model: "bundles",
|
|
248
|
-
operation: "delete",
|
|
249
|
-
where: { id: bundleId }
|
|
250
|
-
}];
|
|
251
|
-
var createDatabaseClient = (plugin) => {
|
|
252
|
-
const getBundleById = async (id) => {
|
|
253
|
-
const row = await plugin.models.bundles.findById(id);
|
|
254
|
-
if (!row) return null;
|
|
255
|
-
return (await hydrateRows(plugin, [row]))[0] ?? null;
|
|
256
|
-
};
|
|
257
|
-
const insertChannel = (input) => plugin.models.channels.insert(input);
|
|
258
|
-
const createMutationClient = (commit) => ({
|
|
259
|
-
getBundleById,
|
|
260
|
-
getBundles: (options) => responsePage(plugin, options),
|
|
261
|
-
async getChannels() {
|
|
262
|
-
return (await plugin.models.channels.list({})).channels;
|
|
263
|
-
},
|
|
264
|
-
insertChannel,
|
|
265
|
-
async insertBundle(bundle) {
|
|
266
|
-
try {
|
|
267
|
-
await commit(insertChanges(bundle));
|
|
268
|
-
} catch (error) {
|
|
269
|
-
if (error instanceof DatabaseAtomicCommitUnsupportedError && bundleToPatchRows(bundle).length > 0) throw new DatabasePatchInsertUnsupportedError(bundle.id, plugin.name);
|
|
270
|
-
throw error;
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
async updateBundleById(bundleId, update) {
|
|
274
|
-
try {
|
|
275
|
-
if (!(await commit(updateChanges(bundleId, update))).committed) throw new DatabaseBundleNotFoundError(bundleId);
|
|
276
|
-
} catch (error) {
|
|
277
|
-
if (error instanceof DatabaseAtomicCommitUnsupportedError && Object.hasOwn(update, "patches")) throw new DatabasePatchUpdateUnsupportedError(bundleId, plugin.name);
|
|
278
|
-
throw error;
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
async deleteBundleById(bundleId) {
|
|
282
|
-
const result = await commit(deleteChanges(bundleId));
|
|
283
|
-
if (!result.committed && result.conflict.reason === "referenced") throw new DatabaseRowReferencedError();
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
const runMutation = async (operation) => {
|
|
287
|
-
const changes = [];
|
|
288
|
-
const result = await operation(createMutationClient(async (input) => {
|
|
289
|
-
changes.push(...input);
|
|
290
|
-
return { committed: true };
|
|
291
|
-
}));
|
|
292
|
-
if (changes.length === 0) return result;
|
|
293
|
-
const commitResult = await plugin.commit({ changes });
|
|
294
|
-
if (!commitResult.committed) {
|
|
295
|
-
const change = changes[commitResult.conflict.changeIndex];
|
|
296
|
-
if (commitResult.conflict.reason === "referenced" && change?.model === "bundles" && change.operation === "delete") throw new DatabaseRowReferencedError();
|
|
297
|
-
if (change?.model === "bundles" && change.operation === "update") throw new DatabaseBundleNotFoundError(change.where.id);
|
|
298
|
-
throw new Error(`Database plugin "${plugin.name}" rejected a commit.`);
|
|
299
|
-
}
|
|
300
|
-
return result;
|
|
301
|
-
};
|
|
302
|
-
return {
|
|
303
|
-
...createMutationClient((changes) => plugin.commit({ changes })),
|
|
304
|
-
deleteChannel: (input) => plugin.models.channels.delete(input),
|
|
305
|
-
mutate: runMutation
|
|
306
|
-
};
|
|
307
|
-
};
|
|
308
|
-
var configPromise = null;
|
|
309
|
-
var databaseClient = null;
|
|
310
|
-
var hotUpdater = null;
|
|
311
|
-
var apiKeyStore = null;
|
|
312
|
-
var apiKeyStoreResolved = false;
|
|
313
|
-
var storagePluginPromise = null;
|
|
314
|
-
var loadCachedConfig = async (request) => {
|
|
315
|
-
if (!configPromise) configPromise = resolveConsoleConfig(request).then((config) => ({
|
|
316
|
-
...config,
|
|
317
|
-
console: config.console ?? {}
|
|
318
|
-
})).catch((error) => {
|
|
319
|
-
configPromise = null;
|
|
320
|
-
throw error;
|
|
321
|
-
});
|
|
322
|
-
return configPromise;
|
|
323
|
-
};
|
|
324
|
-
var loadCachedStoragePlugin = async (config) => {
|
|
325
|
-
if (!storagePluginPromise) storagePluginPromise = Promise.resolve(config.storage).then((storagePlugin) => {
|
|
326
|
-
assertStorageOperations(storagePlugin, [
|
|
327
|
-
"get",
|
|
328
|
-
"put",
|
|
329
|
-
"exists",
|
|
330
|
-
"delete"
|
|
331
|
-
]);
|
|
332
|
-
return storagePlugin;
|
|
333
|
-
}).catch((error) => {
|
|
334
|
-
storagePluginPromise = null;
|
|
335
|
-
throw error;
|
|
336
|
-
});
|
|
337
|
-
return storagePluginPromise;
|
|
338
|
-
};
|
|
339
|
-
var prepareConfig = async (request = getRequest()) => {
|
|
340
|
-
try {
|
|
341
|
-
await requireConsoleAccess(request);
|
|
342
|
-
const config = await loadCachedConfig(request);
|
|
343
|
-
if (!databaseClient) databaseClient = createDatabaseClient(config.database);
|
|
344
|
-
if (!hotUpdater) {
|
|
345
|
-
const { createRuntimeHotUpdater } = await import("./runtime.server-jmZOKIQM.mjs");
|
|
346
|
-
hotUpdater = createRuntimeHotUpdater(config);
|
|
347
|
-
}
|
|
348
|
-
if (!apiKeyStoreResolved) {
|
|
349
|
-
const { createApiKeyStore } = await import("./runtime.server-jmZOKIQM.mjs");
|
|
350
|
-
apiKeyStore = createApiKeyStore(config);
|
|
351
|
-
apiKeyStoreResolved = true;
|
|
352
|
-
}
|
|
353
|
-
const storagePlugin = await loadCachedStoragePlugin(config);
|
|
354
|
-
return {
|
|
355
|
-
config,
|
|
356
|
-
databaseClient,
|
|
357
|
-
hotUpdater,
|
|
358
|
-
apiKeyStore,
|
|
359
|
-
storagePlugin
|
|
360
|
-
};
|
|
361
|
-
} catch (error) {
|
|
362
|
-
if (!(error instanceof Response && (error.status === 401 || error.status === 403))) console.error("Error during configuration initialization:", error);
|
|
363
|
-
throw error;
|
|
364
|
-
}
|
|
365
|
-
};
|
|
366
|
-
var isConfigLoaded = () => Boolean(configPromise);
|
|
367
|
-
//#endregion
|
|
368
|
-
export { isConfigLoaded, prepareConfig };
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { n as isDatabaseMetadataObject, t as DatabasePluginInputError } from "./databaseJsonValue-d6I3nAS4.mjs";
|
|
2
|
-
import { T as stripBundleArtifactMetadata, c as getAssetBaseStorageUri, d as getManifestStorageUri, l as getBundlePatches, u as getManifestFileHash } from "./dist-CyzPaI5v.mjs";
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/databaseRows-5bCRTxm-.js
|
|
4
|
-
var bundleMetadataToRow = (metadata) => {
|
|
5
|
-
const value = stripBundleArtifactMetadata(metadata);
|
|
6
|
-
if (value === void 0) return {};
|
|
7
|
-
if (!isDatabaseMetadataObject(value)) throw new DatabasePluginInputError("invalid-data");
|
|
8
|
-
return value;
|
|
9
|
-
};
|
|
10
|
-
var releaseRowToRelease = (row) => ({
|
|
11
|
-
id: row.id,
|
|
12
|
-
revision: row.revision,
|
|
13
|
-
channelId: row.channel_id,
|
|
14
|
-
platform: row.platform,
|
|
15
|
-
kind: row.kind,
|
|
16
|
-
bundleId: row.bundle_id,
|
|
17
|
-
strategy: row.strategy,
|
|
18
|
-
targetAppVersion: row.target_app_version,
|
|
19
|
-
fingerprintHash: row.fingerprint_hash,
|
|
20
|
-
enabled: row.enabled,
|
|
21
|
-
shouldForceUpdate: row.should_force_update,
|
|
22
|
-
message: row.message,
|
|
23
|
-
rolloutCohortCount: row.rollout_cohort_count,
|
|
24
|
-
targetCohorts: row.target_cohorts,
|
|
25
|
-
operation: row.operation,
|
|
26
|
-
sourceReleaseId: row.source_release_id,
|
|
27
|
-
createdAtMs: row.created_at_ms,
|
|
28
|
-
updatedAtMs: row.updated_at_ms
|
|
29
|
-
});
|
|
30
|
-
var BundleRowHydrationErrorReason = {
|
|
31
|
-
duplicatePatchId: "duplicate_patch_id",
|
|
32
|
-
orphanPatchOwner: "orphan_patch_owner",
|
|
33
|
-
orphanPatchBase: "orphan_patch_base"
|
|
34
|
-
};
|
|
35
|
-
var BundleRowHydrationError = class extends Error {
|
|
36
|
-
name = "BundleRowHydrationError";
|
|
37
|
-
reason;
|
|
38
|
-
patchId;
|
|
39
|
-
bundleId;
|
|
40
|
-
constructor({ reason, patchId, bundleId }) {
|
|
41
|
-
super(`Cannot hydrate bundle rows: ${reason} for patch "${patchId}" and bundle "${bundleId}".`);
|
|
42
|
-
this.reason = reason;
|
|
43
|
-
this.patchId = patchId;
|
|
44
|
-
this.bundleId = bundleId;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
var bundleToRow = (bundle) => {
|
|
48
|
-
const metadata = bundleMetadataToRow(bundle.metadata);
|
|
49
|
-
return {
|
|
50
|
-
id: bundle.id,
|
|
51
|
-
platform: bundle.platform,
|
|
52
|
-
file_hash: bundle.fileHash,
|
|
53
|
-
git_commit_hash: bundle.gitCommitHash,
|
|
54
|
-
storage_uri: bundle.storageUri,
|
|
55
|
-
archive_byte_size: bundle.archiveByteSize,
|
|
56
|
-
metadata,
|
|
57
|
-
manifest_storage_uri: getManifestStorageUri(bundle),
|
|
58
|
-
manifest_file_hash: getManifestFileHash(bundle),
|
|
59
|
-
asset_base_storage_uri: getAssetBaseStorageUri(bundle)
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
var bundleToPatchRows = (bundle) => getBundlePatches(bundle).map((patch, orderIndex) => ({
|
|
63
|
-
id: `${bundle.id}:${patch.baseBundleId}`,
|
|
64
|
-
bundle_id: bundle.id,
|
|
65
|
-
base_bundle_id: patch.baseBundleId,
|
|
66
|
-
base_file_hash: patch.baseFileHash,
|
|
67
|
-
patch_file_hash: patch.patchFileHash,
|
|
68
|
-
patch_storage_uri: patch.patchStorageUri,
|
|
69
|
-
byte_size: patch.byteSize,
|
|
70
|
-
order_index: orderIndex
|
|
71
|
-
}));
|
|
72
|
-
var comparePatchRows = (left, right) => left.order_index - right.order_index || left.id.localeCompare(right.id);
|
|
73
|
-
var patchRowToArtifact = (row) => ({
|
|
74
|
-
baseBundleId: row.base_bundle_id,
|
|
75
|
-
baseFileHash: row.base_file_hash,
|
|
76
|
-
byteSize: row.byte_size,
|
|
77
|
-
patchFileHash: row.patch_file_hash,
|
|
78
|
-
patchStorageUri: row.patch_storage_uri
|
|
79
|
-
});
|
|
80
|
-
var rowToBundle = (row, patchRows = []) => {
|
|
81
|
-
const patches = patchRows.slice().sort(comparePatchRows).map(patchRowToArtifact);
|
|
82
|
-
return {
|
|
83
|
-
id: row.id,
|
|
84
|
-
platform: row.platform,
|
|
85
|
-
fileHash: row.file_hash,
|
|
86
|
-
gitCommitHash: row.git_commit_hash,
|
|
87
|
-
storageUri: row.storage_uri,
|
|
88
|
-
archiveByteSize: row.archive_byte_size,
|
|
89
|
-
metadata: stripBundleArtifactMetadata(row.metadata),
|
|
90
|
-
manifestStorageUri: row.manifest_storage_uri,
|
|
91
|
-
manifestFileHash: row.manifest_file_hash,
|
|
92
|
-
assetBaseStorageUri: row.asset_base_storage_uri,
|
|
93
|
-
patches
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
var rowsToBundles = (bundleRows, patchRows, referencedBundleRows) => {
|
|
97
|
-
const ownerIds = new Set(bundleRows.map(({ id }) => id));
|
|
98
|
-
const baseIds = new Set(ownerIds);
|
|
99
|
-
for (const row of referencedBundleRows) baseIds.add(row.id);
|
|
100
|
-
const patchIds = /* @__PURE__ */ new Set();
|
|
101
|
-
const patchesByOwner = /* @__PURE__ */ new Map();
|
|
102
|
-
for (const patch of patchRows) {
|
|
103
|
-
if (patchIds.has(patch.id)) throw new BundleRowHydrationError({
|
|
104
|
-
reason: BundleRowHydrationErrorReason.duplicatePatchId,
|
|
105
|
-
patchId: patch.id,
|
|
106
|
-
bundleId: patch.bundle_id
|
|
107
|
-
});
|
|
108
|
-
patchIds.add(patch.id);
|
|
109
|
-
if (!ownerIds.has(patch.bundle_id)) throw new BundleRowHydrationError({
|
|
110
|
-
reason: BundleRowHydrationErrorReason.orphanPatchOwner,
|
|
111
|
-
patchId: patch.id,
|
|
112
|
-
bundleId: patch.bundle_id
|
|
113
|
-
});
|
|
114
|
-
if (!baseIds.has(patch.base_bundle_id)) throw new BundleRowHydrationError({
|
|
115
|
-
reason: BundleRowHydrationErrorReason.orphanPatchBase,
|
|
116
|
-
patchId: patch.id,
|
|
117
|
-
bundleId: patch.base_bundle_id
|
|
118
|
-
});
|
|
119
|
-
const ownerPatches = patchesByOwner.get(patch.bundle_id) ?? [];
|
|
120
|
-
ownerPatches.push(patch);
|
|
121
|
-
patchesByOwner.set(patch.bundle_id, ownerPatches);
|
|
122
|
-
}
|
|
123
|
-
return bundleRows.map((row) => rowToBundle(row, patchesByOwner.get(row.id) ?? []));
|
|
124
|
-
};
|
|
125
|
-
//#endregion
|
|
126
|
-
export { rowsToBundles as a, releaseRowToRelease as i, bundleToPatchRows as n, bundleToRow as r, bundleMetadataToRow as t };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { _ as getPatchStorageUri, d as getManifestStorageUri, l as getBundlePatches } from "./dist-CyzPaI5v.mjs";
|
|
2
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/deleteBundle-BAq3JuGr.js
|
|
3
|
-
function resolveStorageUriForDeletion(storageUri, storagePlugin) {
|
|
4
|
-
const protocol = new URL(storageUri).protocol.replace(":", "");
|
|
5
|
-
if (storagePlugin.protocol === protocol) return storageUri;
|
|
6
|
-
if (protocol === "http" || protocol === "https") return null;
|
|
7
|
-
throw new Error(`No storage plugin for protocol: ${protocol}`);
|
|
8
|
-
}
|
|
9
|
-
async function cleanupBundleStorage(bundle, storagePlugin) {
|
|
10
|
-
const cleanupUris = /* @__PURE__ */ new Set();
|
|
11
|
-
const addCleanupUri = (storageUri) => {
|
|
12
|
-
if (!storageUri) return;
|
|
13
|
-
const resolvedStorageUri = resolveStorageUriForDeletion(storageUri, storagePlugin);
|
|
14
|
-
if (resolvedStorageUri) cleanupUris.add(resolvedStorageUri);
|
|
15
|
-
};
|
|
16
|
-
addCleanupUri(bundle.storageUri);
|
|
17
|
-
addCleanupUri(getManifestStorageUri(bundle) ?? void 0);
|
|
18
|
-
addCleanupUri(getPatchStorageUri(bundle) ?? void 0);
|
|
19
|
-
for (const patch of getBundlePatches(bundle)) addCleanupUri(patch.patchStorageUri);
|
|
20
|
-
for (const storageUri of cleanupUris) try {
|
|
21
|
-
await storagePlugin.delete({ storageUri });
|
|
22
|
-
} catch (error) {
|
|
23
|
-
console.error("Failed to delete bundle from storage:", error);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
async function deleteBundles({ bundleIds }, { databaseClient, storagePlugin, waitForStorageCleanup = true }) {
|
|
27
|
-
const uniqueBundleIds = [...new Set(bundleIds)];
|
|
28
|
-
const { data: matchedBundles } = await databaseClient.getBundles({
|
|
29
|
-
where: { id: { in: uniqueBundleIds } },
|
|
30
|
-
limit: uniqueBundleIds.length
|
|
31
|
-
});
|
|
32
|
-
const matchedById = new Map(matchedBundles.map((bundle) => [bundle.id, bundle]));
|
|
33
|
-
const bundles = uniqueBundleIds.flatMap((bundleId) => {
|
|
34
|
-
const bundle = matchedById.get(bundleId);
|
|
35
|
-
return bundle ? [bundle] : [];
|
|
36
|
-
});
|
|
37
|
-
const missingBundleIds = uniqueBundleIds.filter((bundleId) => !matchedById.has(bundleId));
|
|
38
|
-
for (const bundle of bundles) {
|
|
39
|
-
const cleanupCandidates = [
|
|
40
|
-
bundle.storageUri,
|
|
41
|
-
getManifestStorageUri(bundle),
|
|
42
|
-
getPatchStorageUri(bundle),
|
|
43
|
-
...getBundlePatches(bundle).map((patch) => patch.patchStorageUri)
|
|
44
|
-
].filter((value) => Boolean(value));
|
|
45
|
-
for (const candidate of cleanupCandidates) resolveStorageUriForDeletion(candidate, storagePlugin);
|
|
46
|
-
}
|
|
47
|
-
if (bundles.length > 0) await databaseClient.mutate(async (mutation) => {
|
|
48
|
-
for (const bundle of bundles) await mutation.deleteBundleById(bundle.id);
|
|
49
|
-
});
|
|
50
|
-
const cleanupStorage = async () => {
|
|
51
|
-
for (const bundle of bundles) await cleanupBundleStorage(bundle, storagePlugin);
|
|
52
|
-
};
|
|
53
|
-
if (waitForStorageCleanup) await cleanupStorage();
|
|
54
|
-
else cleanupStorage().catch((error) => {
|
|
55
|
-
console.error("Failed to clean up bundle storage:", error);
|
|
56
|
-
});
|
|
57
|
-
return {
|
|
58
|
-
deletedBundleIds: bundles.map((bundle) => bundle.id),
|
|
59
|
-
missingBundleIds
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
async function deleteBundle({ bundleId }, dependencies) {
|
|
63
|
-
if ((await deleteBundles({ bundleIds: [bundleId] }, dependencies)).missingBundleIds.length > 0) throw new Error(`Bundle not found: ${bundleId}`);
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
export { deleteBundle, deleteBundles };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { i as __toESM } from "../_runtime.mjs";
|
|
2
|
-
import { J as require_react, q as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
|
|
4
|
-
import { C as cn } from "./createSsrRpc-NHF2PxuK.mjs";
|
|
5
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/field-CqNUlqUq.js
|
|
6
|
-
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
7
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
8
|
-
function Label({ className, htmlFor, ...props }) {
|
|
9
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
|
10
|
-
"data-slot": "label",
|
|
11
|
-
htmlFor,
|
|
12
|
-
className: cn("flex items-center gap-2 text-xs/relaxed leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
function FieldGroup({ className, ...props }) {
|
|
17
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
18
|
-
"data-slot": "field-group",
|
|
19
|
-
className: cn("gap-4 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4 group/field-group @container/field-group flex w-full flex-col", className),
|
|
20
|
-
...props
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
var fieldVariants = cva("data-[invalid=true]:text-destructive gap-2 group/field flex w-full", {
|
|
24
|
-
variants: { orientation: {
|
|
25
|
-
vertical: "flex-col [&>*]:w-full [&>.sr-only]:w-auto",
|
|
26
|
-
horizontal: "flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
27
|
-
responsive: "flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
28
|
-
} },
|
|
29
|
-
defaultVariants: { orientation: "vertical" }
|
|
30
|
-
});
|
|
31
|
-
function Field({ className, orientation = "vertical", ...props }) {
|
|
32
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
33
|
-
"data-slot": "field",
|
|
34
|
-
"data-orientation": orientation,
|
|
35
|
-
className: cn(fieldVariants({ orientation }), className),
|
|
36
|
-
...props
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function FieldLabel({ className, ...props }) {
|
|
40
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label, {
|
|
41
|
-
"data-slot": "field-label",
|
|
42
|
-
className: cn("has-data-checked:bg-primary/5 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className),
|
|
43
|
-
...props
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function FieldDescription({ className, ...props }) {
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
48
|
-
"data-slot": "field-description",
|
|
49
|
-
className: cn("text-muted-foreground text-left text-xs/relaxed [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance", "last:mt-0 nth-last-2:-mt-1", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", className),
|
|
50
|
-
...props
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
function FieldError({ className, children, errors, ...props }) {
|
|
54
|
-
const content = (0, import_react.useMemo)(() => {
|
|
55
|
-
if (children) return children;
|
|
56
|
-
if (!errors?.length) return null;
|
|
57
|
-
const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
|
|
58
|
-
if (uniqueErrors?.length === 1) return uniqueErrors[0]?.message;
|
|
59
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", {
|
|
60
|
-
className: "ml-4 flex list-disc flex-col gap-1",
|
|
61
|
-
children: uniqueErrors.map((error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: error.message }, index))
|
|
62
|
-
});
|
|
63
|
-
}, [children, errors]);
|
|
64
|
-
if (!content) return null;
|
|
65
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
66
|
-
role: "alert",
|
|
67
|
-
"data-slot": "field-error",
|
|
68
|
-
className: cn("text-destructive text-xs/relaxed font-normal", className),
|
|
69
|
-
...props,
|
|
70
|
-
children: content
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
//#endregion
|
|
74
|
-
export { FieldLabel as a, FieldGroup as i, FieldDescription as n, Label as o, FieldError as r, Field as t };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { l as getBundlePatches } from "./dist-CyzPaI5v.mjs";
|
|
2
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/getBundleChildren-COMt16m_.js
|
|
3
|
-
var CHILDREN_QUERY_LIMIT = 100;
|
|
4
|
-
async function collectBundleChildrenByBaseIds(baseBundleIds, deps) {
|
|
5
|
-
const uniqueBaseBundleIds = [...new Set(baseBundleIds.filter(Boolean))];
|
|
6
|
-
const bundlesByBaseId = Object.fromEntries(uniqueBaseBundleIds.map((bundleId) => [bundleId, []]));
|
|
7
|
-
const baseBundles = (await Promise.all(uniqueBaseBundleIds.map((bundleId) => deps.databaseClient.getBundleById(bundleId)))).filter((bundle) => Boolean(bundle));
|
|
8
|
-
const groupMap = /* @__PURE__ */ new Map();
|
|
9
|
-
for (const baseBundle of baseBundles) {
|
|
10
|
-
const existingGroup = groupMap.get(baseBundle.platform);
|
|
11
|
-
if (existingGroup) {
|
|
12
|
-
existingGroup.add(baseBundle.id);
|
|
13
|
-
continue;
|
|
14
|
-
}
|
|
15
|
-
groupMap.set(baseBundle.platform, new Set([baseBundle.id]));
|
|
16
|
-
}
|
|
17
|
-
for (const [platform, bundleIds] of groupMap) {
|
|
18
|
-
const seenBundleIds = /* @__PURE__ */ new Set();
|
|
19
|
-
const seenCursors = /* @__PURE__ */ new Set();
|
|
20
|
-
let after;
|
|
21
|
-
while (true) {
|
|
22
|
-
const page = await deps.databaseClient.getBundles({
|
|
23
|
-
where: { platform },
|
|
24
|
-
limit: CHILDREN_QUERY_LIMIT,
|
|
25
|
-
cursor: after ? { after } : void 0
|
|
26
|
-
});
|
|
27
|
-
for (const bundle of page.data) {
|
|
28
|
-
const matchedParentBundleIds = getBundlePatches(bundle).map((patch) => patch.baseBundleId).filter((bundleId) => bundleIds.has(bundleId));
|
|
29
|
-
if (matchedParentBundleIds.length === 0 || seenBundleIds.has(bundle.id)) continue;
|
|
30
|
-
seenBundleIds.add(bundle.id);
|
|
31
|
-
for (const parentBundleId of matchedParentBundleIds) bundlesByBaseId[parentBundleId]?.push(bundle);
|
|
32
|
-
}
|
|
33
|
-
const pagination = page.pagination;
|
|
34
|
-
const nextCursor = pagination.nextCursor ?? void 0;
|
|
35
|
-
if (!pagination.hasNextPage || !nextCursor || seenCursors.has(nextCursor)) break;
|
|
36
|
-
seenCursors.add(nextCursor);
|
|
37
|
-
after = nextCursor;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return bundlesByBaseId;
|
|
41
|
-
}
|
|
42
|
-
async function getBundleChildren({ baseBundleId }, deps) {
|
|
43
|
-
return (await collectBundleChildrenByBaseIds([baseBundleId], deps))[baseBundleId] ?? [];
|
|
44
|
-
}
|
|
45
|
-
async function getBundleChildCounts(baseBundleIds, deps) {
|
|
46
|
-
const childrenByBaseId = await collectBundleChildrenByBaseIds(baseBundleIds, deps);
|
|
47
|
-
return Object.fromEntries(Object.entries(childrenByBaseId).map(([bundleId, bundles]) => [bundleId, bundles.length]));
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
50
|
-
export { getBundleChildCounts, getBundleChildren };
|