@hot-updater/console 1.0.0-rc.2 → 1.0.0-rc.20
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-B9VYGA3N.js +1 -0
- package/.output/public/assets/HashValueDisplay-D880zntR.js +1 -0
- package/.output/public/assets/InsightsInfo-By_sPjTE.js +1 -0
- package/.output/public/assets/InsightsPageHeader-9_kx_LL7.js +1 -0
- package/.output/public/assets/NotFoundPage-Dys8C0cW.js +1 -0
- package/.output/public/assets/api-CtarlV0l.js +1 -0
- package/.output/public/assets/api-keys-DFF_QqtN.js +1 -0
- package/.output/public/assets/api-keys-evfsQ4sN.js +1 -0
- package/.output/public/assets/arrow-left-BP9D-ta_.js +1 -0
- package/.output/public/assets/arrow-up-right-CDP9Tevw.js +1 -0
- package/.output/public/assets/card-DzCPSRsh.js +1 -0
- package/.output/public/assets/console-features-api-yv7rm3DX.js +1 -0
- package/.output/public/assets/dialog-BDvCy_QO.js +1 -0
- package/.output/public/assets/dist-Clb6cQ9l.js +1 -0
- package/.output/public/assets/empty-C5x9mn_s.js +1 -0
- package/.output/public/assets/field-Bou7shoO.js +1 -0
- package/.output/public/assets/index-0eg3l8aC.js +10 -0
- package/.output/public/assets/input-group-DVtWFUUF.js +1 -0
- package/.output/public/assets/insights-2MbdiSNv.js +1 -0
- package/.output/public/assets/insights-C6tmCZHk.js +2 -0
- package/.output/public/assets/insights-CadS_aIA.js +42 -0
- package/.output/public/assets/insights-recovery-rpc-wvdyM4LD.js +1 -0
- package/.output/public/assets/insights-search-KIF7mRtB.js +1 -0
- package/.output/public/assets/insights-usage-rpc-qUkNtrWr.js +1 -0
- package/.output/public/assets/insights_.distribution-BhBs6PNA.js +1 -0
- package/.output/public/assets/insights_.distribution-CItZw3-8.js +1 -0
- package/.output/public/assets/insights_.distribution-CJUH_wAS.js +2 -0
- package/.output/public/assets/installations-CH2H7JQt.js +2 -0
- package/.output/public/assets/installations-DMeMuwsW.js +1 -0
- package/.output/public/assets/installations-DnvxI9Dt.js +1 -0
- package/.output/public/assets/loader-circle-Ca7C9YY1.js +1 -0
- package/.output/public/assets/mutation-x9L28_CD.js +1 -0
- package/.output/public/assets/preload-helper-BN-UkjOE.js +1 -0
- package/.output/public/assets/refresh-cw-CVGqvy8Z.js +1 -0
- package/.output/public/assets/routes-BhK8DuZA.js +1 -0
- package/.output/public/assets/routes-veKtDW39.js +2 -0
- package/.output/public/assets/sidebar-B45aMqRm.js +3 -0
- package/.output/public/assets/styles-Dn0pK1EX.css +2 -0
- package/.output/public/assets/table-CwLnN6KX.js +1 -0
- package/.output/public/assets/useCompositeListItem-CF7vsfcA.js +1 -0
- package/.output/public/assets/useMutation-CN1ygYEr.js +1 -0
- package/.output/public/assets/useOpenInteractionType-AnAMWYIY.js +1 -0
- package/.output/public/assets/valueToPercent-C-t8FT0y.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-B7ioJhtE.mjs → __23tanstack-start-server-fn-resolver-CUQLz7hs.mjs} +52 -40
- package/.output/server/_libs/@base-ui/react+[...].mjs +7044 -3622
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +49 -3
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +4 -4
- package/.output/server/_libs/d3-array.mjs +231 -0
- package/.output/server/_libs/d3-color.mjs +330 -0
- package/.output/server/_libs/d3-format.mjs +252 -0
- package/.output/server/_libs/d3-interpolate.mjs +207 -0
- package/.output/server/_libs/d3-path.mjs +77 -0
- package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
- package/.output/server/_libs/d3-shape.mjs +818 -0
- package/.output/server/_libs/decimal.js-light.mjs +884 -0
- package/.output/server/_libs/es-toolkit.mjs +1159 -0
- package/.output/server/_libs/eventemitter3.mjs +236 -0
- package/.output/server/_libs/immer.mjs +532 -0
- package/.output/server/_libs/lucide-react.mjs +46 -32
- package/.output/server/_libs/next-themes.mjs +2 -2
- package/.output/server/_libs/react-redux+[...].mjs +205 -0
- package/.output/server/_libs/recharts+[...].mjs +14350 -0
- package/.output/server/_libs/sonner.mjs +2 -2
- package/.output/server/_libs/tanstack__react-query.mjs +8 -3
- package/.output/server/_libs/verkit.mjs +99 -1
- package/.output/server/_runtime.mjs +10 -1
- package/.output/server/_ssr/ConsoleFeatureUnavailable-DoxET2AT.mjs +58 -0
- package/.output/server/_ssr/{HashValueDisplay-DwpGLfrl.mjs → HashValueDisplay-BplboHEb.mjs} +3 -3
- package/.output/server/_ssr/InsightsInfo-o2YPd5Qc.mjs +37 -0
- package/.output/server/_ssr/InsightsPageHeader-NExCJL1I.mjs +154 -0
- package/.output/server/_ssr/NotFoundPage-Cd-A8ock.mjs +37 -0
- package/.output/server/_ssr/api-B1Ro0uys.mjs +202 -0
- package/.output/server/_ssr/api-C0G9MTMI.mjs +4205 -0
- package/.output/server/_ssr/{api-keys-CZeTPQys.mjs → api-keys-CT3HG7KT.mjs} +49 -9
- package/.output/server/_ssr/api-keys-Dvvy1sem.mjs +5 -0
- package/.output/server/_ssr/api-keys-rpc-b1qTTFfG.mjs +52 -0
- package/.output/server/_ssr/api-rpc-Cbns2MGx.mjs +338 -0
- package/.output/server/_ssr/{auth-rpc-DUaeOWKK.mjs → auth-rpc-DChS7m9y.mjs} +6 -6
- package/.output/server/_ssr/auth.server-Ccqz2iVv.mjs +37 -0
- package/.output/server/_ssr/bundleActivity-D17Pb_h5.mjs +19 -0
- package/.output/server/_ssr/card-DMbcvlPz.mjs +49 -0
- package/.output/server/_ssr/config-DMEJdhoW.mjs +13 -0
- package/.output/server/_ssr/config.server-DyypN6cQ.mjs +60 -0
- package/.output/server/_ssr/console-access-KpPv5lin.mjs +17 -0
- package/.output/server/_ssr/console-features-CsbyHYfK.mjs +55 -0
- package/.output/server/_ssr/console-features-api-B-KVuo4p.mjs +43 -0
- package/.output/server/_ssr/console-features-rpc-Djyo5740.mjs +19 -0
- package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-B_I3Ll4M.mjs} +28 -2
- package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-DuNm5mmo.mjs} +2 -2
- package/.output/server/_ssr/databaseRows-CXxf_VIB.mjs +132 -0
- package/.output/server/_ssr/{deleteBundle-BTGwBgzx.mjs → deleteBundle-Dcc21Lbd.mjs} +9 -19
- package/.output/server/_ssr/{dialog-DS-nw-pA.mjs → dialog-cOmLTUV2.mjs} +2 -2
- package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-B-r4u3Lg.mjs} +28 -5
- package/.output/server/_ssr/{downloadBundle-CNnYxYO2.mjs → downloadBundle-CexOFoZ4.mjs} +6 -7
- package/.output/server/_ssr/empty-BHoY_5jt.mjs +49 -0
- package/.output/server/_ssr/{table-CnZmon_Z.mjs → field-mjhcNEXD.mjs} +63 -51
- package/.output/server/_ssr/getBundleChildren-DbDXe9wB.mjs +22 -0
- package/.output/server/_ssr/{input-group-BpsnmvZw.mjs → input-group-96H30HWC.mjs} +2 -2
- package/.output/server/_ssr/insights-D25VDVaz.mjs +5 -0
- package/.output/server/_ssr/insights-D359GJFL.mjs +14 -0
- package/.output/server/_ssr/insights-DgFv1NsO.mjs +1238 -0
- package/.output/server/_ssr/insights-api-ChAKrbhG.mjs +105 -0
- package/.output/server/_ssr/insights-failures-WQ-ttjOx.mjs +44 -0
- package/.output/server/_ssr/insights-failures-rpc-BFsqlltN.mjs +21 -0
- package/.output/server/_ssr/insights-recovery-DkL6bxMW.mjs +28 -0
- package/.output/server/_ssr/insights-recovery-rpc-2P5m8F62.mjs +46 -0
- package/.output/server/_ssr/insights-recovery-rpc-Tj8vNC19.mjs +20 -0
- package/.output/server/_ssr/{insights-rpc-38DujK0G.mjs → insights-rpc-DrkVmV9o.mjs} +22 -14
- package/.output/server/_ssr/insights-search-BsalnNw-.mjs +25 -0
- package/.output/server/_ssr/insights-usage-1nVTQrLy.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-Ct_4xHhZ.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-DaYIRtFK.mjs +41 -0
- package/.output/server/_ssr/insightsRecovery-CpGucWN1.mjs +45 -0
- package/.output/server/_ssr/insightsUsage-JYpKZAF7.mjs +56 -0
- package/.output/server/_ssr/insights_.distribution-Bcu6uYs_.mjs +5 -0
- package/.output/server/_ssr/insights_.distribution-D3Csuyjw.mjs +14 -0
- package/.output/server/_ssr/insights_.distribution-jQZEF07J.mjs +335 -0
- package/.output/server/_ssr/installations-B8Vh54lH.mjs +69 -0
- package/.output/server/_ssr/installations-BI5kelHv.mjs +5 -0
- package/.output/server/_ssr/{installations-DiVKEF5T.mjs → installations-Cxikllmx.mjs} +517 -54
- package/.output/server/_ssr/listReleases-DqU9t1l3.mjs +79 -0
- package/.output/server/_ssr/releaseManagement-B3e7I8J9.mjs +11 -0
- package/.output/server/_ssr/{router-B9wG_9f8.mjs → router-CRkm-wHD.mjs} +117 -124
- package/.output/server/_ssr/routes-B3IJo_jL.mjs +292 -0
- package/.output/server/_ssr/{routes-D7Yh_jfj.mjs → routes-CNAi0Mmv.mjs} +176 -455
- package/.output/server/_ssr/runtime.server-NucbYjc7.mjs +1372 -0
- package/.output/server/_ssr/select-BkPAJFL7.mjs +107 -0
- package/.output/server/_ssr/{server-D_C2rMzf.mjs → server-DKJYsaCP.mjs} +6 -32
- package/.output/server/_ssr/{createSsrRpc-DjWNJ0uc.mjs → sidebar-Cw1VuC7d.mjs} +117 -63
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/table-q0P9wz7x.mjs +53 -0
- package/.output/server/_ssr/updateFailures-DMU9f0pK.mjs +24 -0
- package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-BzSO-fr-.mjs} +2 -2
- package/.output/server/_tanstack-start-manifest_v-Bb0gKDbb.mjs +124 -0
- package/.output/server/index.mjs +273 -168
- package/README.md +71 -65
- package/lib/index.d.mts +13 -11
- package/lib/vite-internal.mjs +6 -3
- package/package.json +8 -8
- package/src/components/AppSidebar.tsx +91 -71
- package/src/components/ConsoleAccessPage.tsx +5 -1
- package/src/components/ConsoleFeatureUnavailable.tsx +82 -0
- package/src/components/NotFoundPage.tsx +7 -7
- package/src/components/features/FeatureSlots.tsx +99 -0
- package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
- package/src/components/features/bundles/BundleMetadata.tsx +7 -4
- package/src/components/features/channels/ChannelManagementDialog.tsx +2 -5
- package/src/components/features/insights/AppUsage.tsx +370 -0
- package/src/components/features/insights/EstimatedCount.tsx +18 -0
- package/src/components/features/insights/EventDetails.tsx +117 -37
- package/src/components/features/insights/EventHistoryCard.tsx +112 -26
- package/src/components/features/insights/EventHistoryList.tsx +2 -2
- package/src/components/features/insights/InsightsControls.tsx +265 -102
- 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 +176 -173
- 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 +52 -10
- package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
- package/src/components/features/insights/ReleaseActivity.tsx +188 -0
- package/src/components/features/insights/ReportingDevicesSummary.tsx +65 -0
- package/src/components/features/insights/UpdateFailures.tsx +319 -0
- package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +24 -1
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/empty.tsx +101 -0
- 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 +12 -17
- package/src/lib/api-keys-api.ts +0 -28
- package/src/lib/api-keys-rpc.ts +27 -38
- package/src/lib/api-rpc.ts +197 -221
- package/src/lib/api.ts +11 -13
- package/src/lib/bundle-activity.ts +31 -0
- 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 +91 -0
- package/src/lib/insights-api.ts +37 -1
- package/src/lib/insights-failures-rpc.ts +21 -0
- package/src/lib/insights-failures.ts +129 -0
- package/src/lib/insights-recovery-rpc.ts +51 -0
- package/src/lib/insights-recovery.ts +68 -0
- package/src/lib/insights-retention.ts +21 -0
- package/src/lib/insights-rpc.ts +30 -12
- package/src/lib/insights-search.ts +58 -0
- package/src/lib/insights-usage-rpc.ts +29 -0
- package/src/lib/insights-usage.ts +74 -0
- package/src/lib/insights-view.ts +38 -2
- 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 +37 -0
- package/src/lib/server/config.server.ts +16 -32
- package/src/lib/server/console-feature-apis.ts +59 -0
- package/src/lib/server/console-runtime.server.ts +6 -40
- package/src/lib/server/deleteBundle.ts +16 -25
- package/src/lib/server/downloadBundle.ts +7 -10
- package/src/lib/server/getBundleChildren.ts +31 -122
- package/src/lib/server/insightsRecovery.ts +55 -0
- package/src/lib/server/insightsUsage.ts +63 -0
- package/src/lib/server/listReleases.ts +109 -44
- package/src/lib/server/releaseReachability.ts +4 -3
- package/src/lib/server/runtime.server.ts +132 -31
- package/src/lib/server/updateFailures.ts +31 -0
- package/src/routeTree.gen.ts +21 -21
- 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 +167 -104
- package/src/routes/insights.tsx +100 -59
- package/src/routes/insights_.distribution.tsx +398 -0
- package/src/routes/installations.tsx +98 -41
- package/src/vite-internal.ts +6 -3
- package/.output/public/assets/HashValueDisplay-CB0Eskit.js +0 -1
- package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +0 -1
- package/.output/public/assets/api-keys-BzKocqRy.js +0 -1
- package/.output/public/assets/api-keys-api-BHcODB7q.js +0 -1
- package/.output/public/assets/card-Dhr_eFYj.js +0 -1
- package/.output/public/assets/chart-no-axes-combined-Dy4WJv2U.js +0 -1
- package/.output/public/assets/composite-Bp98A0Ld.js +0 -1
- package/.output/public/assets/createServerFn-CA8fs7QD.js +0 -3
- package/.output/public/assets/dialog-CUTrcPlB.js +0 -1
- package/.output/public/assets/dist-C_NydL0e.js +0 -1
- package/.output/public/assets/index-DdAz-CXv.js +0 -10
- package/.output/public/assets/input-group-cSOG4wh_.js +0 -1
- package/.output/public/assets/insights-C0PBSZ-n.js +0 -1
- package/.output/public/assets/installations-CE33wgbY.js +0 -2
- package/.output/public/assets/installations-CStZja8x.js +0 -1
- package/.output/public/assets/lazyRouteComponent-Ccp3bwBY.js +0 -1
- package/.output/public/assets/link-CI8idAUi.js +0 -1
- package/.output/public/assets/loader-circle-BoxLrsOu.js +0 -1
- package/.output/public/assets/preload-helper-CQ36nxok.js +0 -1
- package/.output/public/assets/refresh-cw-Bqc72UZG.js +0 -1
- package/.output/public/assets/routes-DGVXdzpw.js +0 -2
- package/.output/public/assets/routes-DTlwOr8I.js +0 -1
- package/.output/public/assets/shield-check-uK3MHWJZ.js +0 -1
- package/.output/public/assets/signing-CMf4aqDO.js +0 -1
- package/.output/public/assets/styles-BCvbtKsm.css +0 -2
- package/.output/public/assets/table-2vcV89QB.js +0 -1
- package/.output/public/assets/useCompositeListItem-CHLITE_4.js +0 -1
- package/.output/public/assets/x-DCd0j8c6.js +0 -1
- package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +0 -484
- package/.output/server/_ssr/api-keys-api-BUPQVSpk.mjs +0 -60
- package/.output/server/_ssr/api-keys-rpc-Cs7tS5_j.mjs +0 -136
- package/.output/server/_ssr/api-rpc-tAupfGQm.mjs +0 -1399
- package/.output/server/_ssr/auth.server-DW71WzsD.mjs +0 -47
- package/.output/server/_ssr/bundle-signing-rpc-BhnBw0-d.mjs +0 -16
- package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +0 -12
- package/.output/server/_ssr/card-BRiPmi0C.mjs +0 -108
- package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
- package/.output/server/_ssr/config.server-afDuAwaG.mjs +0 -368
- package/.output/server/_ssr/databaseJsonValue-d6I3nAS4.mjs +0 -45
- package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
- package/.output/server/_ssr/getBundleChildren-C0vh4ZvE.mjs +0 -50
- package/.output/server/_ssr/insights-BdS364Xu.mjs +0 -460
- package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +0 -303
- package/.output/server/_ssr/installations-CtA59MQG.mjs +0 -29
- package/.output/server/_ssr/routes-CKrrS2q2.mjs +0 -37
- package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +0 -438
- package/.output/server/_ssr/signing-Dz1WkZOf.mjs +0 -133
- package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +0 -97
- package/src/components/features/insights/InsightsBundleReports.tsx +0 -51
- 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/routes/signing.tsx +0 -37
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { r as getRequest } from "./server-DKJYsaCP.mjs";
|
|
2
|
+
import { requireConsoleAccess, t as resolveConsoleConfig } from "./auth.server-Ccqz2iVv.mjs";
|
|
3
|
+
import { o as createDatabaseCoreApi } from "./api-C0G9MTMI.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/config.server-DyypN6cQ.js
|
|
5
|
+
function assertStorageOperations(plugin, operations) {
|
|
6
|
+
for (const operation of operations) if (typeof plugin[operation] !== "function") throw new Error(`Storage plugin "${plugin.name}" does not implement ${operation}.`);
|
|
7
|
+
}
|
|
8
|
+
var configPromise = null;
|
|
9
|
+
var core = null;
|
|
10
|
+
var runtime = null;
|
|
11
|
+
var storagePluginPromise = null;
|
|
12
|
+
var loadCachedConfig = async (request) => {
|
|
13
|
+
if (!configPromise) configPromise = resolveConsoleConfig(request).then((config) => ({
|
|
14
|
+
...config,
|
|
15
|
+
console: config.console ?? {}
|
|
16
|
+
})).catch((error) => {
|
|
17
|
+
configPromise = null;
|
|
18
|
+
throw error;
|
|
19
|
+
});
|
|
20
|
+
return configPromise;
|
|
21
|
+
};
|
|
22
|
+
var loadCachedStoragePlugin = async (config) => {
|
|
23
|
+
if (!storagePluginPromise) storagePluginPromise = Promise.resolve(config.storage).then((storagePlugin) => {
|
|
24
|
+
assertStorageOperations(storagePlugin, [
|
|
25
|
+
"get",
|
|
26
|
+
"put",
|
|
27
|
+
"exists",
|
|
28
|
+
"delete"
|
|
29
|
+
]);
|
|
30
|
+
return storagePlugin;
|
|
31
|
+
}).catch((error) => {
|
|
32
|
+
storagePluginPromise = null;
|
|
33
|
+
throw error;
|
|
34
|
+
});
|
|
35
|
+
return storagePluginPromise;
|
|
36
|
+
};
|
|
37
|
+
var prepareConfig = async (request = getRequest()) => {
|
|
38
|
+
try {
|
|
39
|
+
await requireConsoleAccess(request);
|
|
40
|
+
const config = await loadCachedConfig(request);
|
|
41
|
+
core ??= createDatabaseCoreApi(config.database);
|
|
42
|
+
if (!runtime) {
|
|
43
|
+
const { createConsoleRuntime } = await import("./runtime.server-NucbYjc7.mjs");
|
|
44
|
+
runtime = createConsoleRuntime(config);
|
|
45
|
+
}
|
|
46
|
+
const storagePlugin = await loadCachedStoragePlugin(config);
|
|
47
|
+
return {
|
|
48
|
+
config,
|
|
49
|
+
core,
|
|
50
|
+
runtime,
|
|
51
|
+
storagePlugin
|
|
52
|
+
};
|
|
53
|
+
} catch (error) {
|
|
54
|
+
if (!(error instanceof Response && (error.status === 401 || error.status === 403))) console.error("Error during configuration initialization:", error);
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
var isConfigLoaded = () => Boolean(configPromise);
|
|
59
|
+
//#endregion
|
|
60
|
+
export { isConfigLoaded, prepareConfig };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { s as createMiddleware } from "./createMiddleware-B_I3Ll4M.mjs";
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/console-access-KpPv5lin.js
|
|
3
|
+
/**
|
|
4
|
+
* Refuses a caller the console does not authorize before a server function
|
|
5
|
+
* reads its input. TanStack Start runs a function's middleware before the
|
|
6
|
+
* function's own validator, so an anonymous or unlisted caller gets the access
|
|
7
|
+
* check's 401 or 403, never an input error, whatever it sends. Every server
|
|
8
|
+
* function except the sign-in reads in `auth-rpc.ts` uses it, and
|
|
9
|
+
* `console-access.spec.ts` checks that.
|
|
10
|
+
*/
|
|
11
|
+
var consoleAccess = createMiddleware({ type: "function" }).server(async ({ next }) => {
|
|
12
|
+
const [{ getRequest }, { requireConsoleAccess }] = await Promise.all([import("./server-DKJYsaCP.mjs").then((n) => n.t), import("./auth.server-Ccqz2iVv.mjs")]);
|
|
13
|
+
await requireConsoleAccess(getRequest());
|
|
14
|
+
return next();
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { consoleAccess as t };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/console-features-CsbyHYfK.js
|
|
2
|
+
/**
|
|
3
|
+
* The console's features and the server plugin each one needs. The server is
|
|
4
|
+
* the source of truth: the console serves a feature only when the server runs
|
|
5
|
+
* its plugin, and against a self-hosted server (`standaloneRepository`) only
|
|
6
|
+
* the features its admin API serves (`remote`); the rest read the database.
|
|
7
|
+
* Navigation, route guards, and server functions all read this registry. Its
|
|
8
|
+
* other halves, keyed by the same features, hold what serves each feature on
|
|
9
|
+
* the server (`server/console-feature-apis.ts`) and what each adds to pages
|
|
10
|
+
* (`components/features/console-feature-ui.tsx`).
|
|
11
|
+
*/
|
|
12
|
+
var consoleFeatures = {
|
|
13
|
+
insights: {
|
|
14
|
+
plugin: "insights",
|
|
15
|
+
label: "Insights",
|
|
16
|
+
remote: true
|
|
17
|
+
},
|
|
18
|
+
insightsAnalytics: {
|
|
19
|
+
plugin: "insights",
|
|
20
|
+
label: "Insights",
|
|
21
|
+
remote: false
|
|
22
|
+
},
|
|
23
|
+
apiKeys: {
|
|
24
|
+
plugin: "apiKeys",
|
|
25
|
+
label: "API keys",
|
|
26
|
+
remote: false
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var featureIds = Object.keys(consoleFeatures);
|
|
30
|
+
/** The features on for the plugins a server runs, from where the console reads them. */
|
|
31
|
+
var resolveConsoleFeatures = (plugins, { remote }) => {
|
|
32
|
+
const installed = new Set(plugins);
|
|
33
|
+
return Object.fromEntries(featureIds.map((feature) => {
|
|
34
|
+
const { plugin, remote: servedRemotely } = consoleFeatures[feature];
|
|
35
|
+
return [feature, installed.has(plugin) && (servedRemotely || !remote)];
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
/** Why a feature is off: its plugin is missing, or it reads a database the console does not open. */
|
|
39
|
+
var unavailableReason = (feature, { remote }) => remote && !consoleFeatures[feature].remote ? "remote" : "plugin";
|
|
40
|
+
/**
|
|
41
|
+
* A server function refused a feature the console does not serve: the
|
|
42
|
+
* features' 404. The client recognizes it by `name`, which survives
|
|
43
|
+
* serialization where the class does not.
|
|
44
|
+
*/
|
|
45
|
+
var ConsoleFeatureUnavailableError = class extends Error {
|
|
46
|
+
name = "ConsoleFeatureUnavailableError";
|
|
47
|
+
status = 404;
|
|
48
|
+
constructor(feature, { remote }) {
|
|
49
|
+
super(unavailableReason(feature, { remote }) === "remote" ? "The console reads this from the database, and it reaches a self-hosted server through its admin API instead." : `The server runs without the ${consoleFeatures[feature].plugin}() plugin.`);
|
|
50
|
+
this.feature = feature;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var isConsoleFeatureUnavailableError = (error) => error instanceof Error && error.name === "ConsoleFeatureUnavailableError" && featureIds.includes(Reflect.get(error, "feature"));
|
|
54
|
+
//#endregion
|
|
55
|
+
export { unavailableReason as a, resolveConsoleFeatures as i, consoleFeatures as n, isConsoleFeatureUnavailableError as r, ConsoleFeatureUnavailableError as t };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { l as createServerFn } from "./createMiddleware-B_I3Ll4M.mjs";
|
|
2
|
+
import { t as consoleAccess } from "./console-access-KpPv5lin.mjs";
|
|
3
|
+
import { k as createSsrRpc } from "./sidebar-Cw1VuC7d.mjs";
|
|
4
|
+
import { n as queryOptions, r as useQuery } from "../_libs/tanstack__react-query.mjs";
|
|
5
|
+
import { n as consoleFeatures } from "./console-features-CsbyHYfK.mjs";
|
|
6
|
+
import { _ as notFound } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
7
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/console-features-api-B-KVuo4p.js
|
|
8
|
+
/** The features this console serves, for navigation and route guards. */
|
|
9
|
+
var getConsoleFeaturesRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).handler(createSsrRpc("82ec3500e57f9e81dac6d3f3a7bd9e34915da3121429beec87b7ad153dc6eafe"));
|
|
10
|
+
var consoleFeaturesQueryKey = ["console", "features"];
|
|
11
|
+
var consoleFeaturesQueryOptions = () => queryOptions({
|
|
12
|
+
queryKey: consoleFeaturesQueryKey,
|
|
13
|
+
queryFn: () => getConsoleFeaturesRpc(),
|
|
14
|
+
staleTime: Infinity
|
|
15
|
+
});
|
|
16
|
+
/** The features the console serves; the authorized layout loads them first. */
|
|
17
|
+
var useConsoleFeatures = () => useQuery(consoleFeaturesQueryOptions());
|
|
18
|
+
/** Whether `feature` is on; false until the features load. */
|
|
19
|
+
var useConsoleFeature = (feature) => useConsoleFeatures().data?.features[feature] === true;
|
|
20
|
+
/** The feature in a route's not-found data, when a feature guard threw it. */
|
|
21
|
+
var notFoundFeature = (data) => {
|
|
22
|
+
const feature = typeof data === "object" && data !== null ? Reflect.get(data, "feature") : void 0;
|
|
23
|
+
return typeof feature === "string" && Object.hasOwn(consoleFeatures, feature) ? feature : void 0;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A feature route's `beforeLoad`: not found, naming the feature, when the
|
|
27
|
+
* console does not serve it. A failed features read lets the route load: the
|
|
28
|
+
* root layout answers a visitor it does not authorize, and the route's own
|
|
29
|
+
* reads report any other failure. The failure leaves the cache, which a
|
|
30
|
+
* server render sends to the browser: a refused visitor's failure is the 401
|
|
31
|
+
* or 403 Response, which the render cannot serialize.
|
|
32
|
+
*/
|
|
33
|
+
var requireConsoleFeature = async (queryClient, feature) => {
|
|
34
|
+
const featureSet = await queryClient.ensureQueryData(consoleFeaturesQueryOptions()).catch(() => {
|
|
35
|
+
queryClient.removeQueries({
|
|
36
|
+
queryKey: consoleFeaturesQueryKey,
|
|
37
|
+
exact: true
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
if (featureSet !== void 0 && !featureSet.features[feature]) throw notFound({ data: { feature } });
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { useConsoleFeatures as a, useConsoleFeature as i, notFoundFeature as n, requireConsoleFeature as r, consoleFeaturesQueryOptions as t };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { l as createServerFn } from "./createMiddleware-B_I3Ll4M.mjs";
|
|
2
|
+
import { t as consoleAccess } from "./console-access-KpPv5lin.mjs";
|
|
3
|
+
import { t as createServerRpc } from "./createServerRpc-DuNm5mmo.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/console-features-rpc-Djyo5740.js
|
|
5
|
+
var getConsoleFeaturesRpc_createServerFn_handler = createServerRpc({
|
|
6
|
+
id: "82ec3500e57f9e81dac6d3f3a7bd9e34915da3121429beec87b7ad153dc6eafe",
|
|
7
|
+
name: "getConsoleFeaturesRpc",
|
|
8
|
+
filename: "src/lib/console-features-rpc.ts"
|
|
9
|
+
}, (opts) => getConsoleFeaturesRpc.__executeServer(opts));
|
|
10
|
+
var getConsoleFeaturesRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).handler(getConsoleFeaturesRpc_createServerFn_handler, async () => {
|
|
11
|
+
const { prepareConfig } = await import("./config.server-DyypN6cQ.mjs");
|
|
12
|
+
const { runtime } = await prepareConfig();
|
|
13
|
+
return {
|
|
14
|
+
features: await runtime.features(),
|
|
15
|
+
remote: runtime.remote
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { getConsoleFeaturesRpc_createServerFn_handler };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/createMiddleware-B_I3Ll4M.js
|
|
3
3
|
/**
|
|
4
4
|
* Create a redirect Response understood by TanStack Router.
|
|
5
5
|
*
|
|
@@ -355,5 +355,31 @@ function serverFnBaseToMiddleware(options) {
|
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
|
+
var createMiddleware = (options, __opts) => {
|
|
359
|
+
const resolvedOptions = {
|
|
360
|
+
type: "request",
|
|
361
|
+
...__opts || options
|
|
362
|
+
};
|
|
363
|
+
const setValidator = (validator) => {
|
|
364
|
+
return createMiddleware({}, Object.assign(resolvedOptions, {
|
|
365
|
+
validator,
|
|
366
|
+
inputValidator: validator
|
|
367
|
+
}));
|
|
368
|
+
};
|
|
369
|
+
return {
|
|
370
|
+
options: resolvedOptions,
|
|
371
|
+
middleware: (middleware) => {
|
|
372
|
+
return createMiddleware({}, Object.assign(resolvedOptions, { middleware }));
|
|
373
|
+
},
|
|
374
|
+
validator: setValidator,
|
|
375
|
+
inputValidator: setValidator,
|
|
376
|
+
client: (client) => {
|
|
377
|
+
return createMiddleware({}, Object.assign(resolvedOptions, { client }));
|
|
378
|
+
},
|
|
379
|
+
server: (server) => {
|
|
380
|
+
return createMiddleware({}, Object.assign(resolvedOptions, { server }));
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
};
|
|
358
384
|
//#endregion
|
|
359
|
-
export { X_TSS_RAW_RESPONSE as a,
|
|
385
|
+
export { safeObjectMerge as _, X_TSS_RAW_RESPONSE as a, createNullProtoObject as c, getStartContext as d, getStartOptions as f, runWithStartContext as g, mergeHeaders as h, TSS_SERVER_FUNCTION as i, createServerFn as l, isResolvedRedirect as m, TSS_CONTENT_TYPE_FRAMED_VERSIONED as n, X_TSS_SERIALIZED as o, isRedirect as p, TSS_FORMDATA_CONTEXT as r, createMiddleware as s, FrameType as t, flattenMiddlewares as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as TSS_SERVER_FUNCTION } from "./
|
|
2
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/createServerRpc-
|
|
1
|
+
import { i as TSS_SERVER_FUNCTION } from "./createMiddleware-B_I3Ll4M.mjs";
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/createServerRpc-DuNm5mmo.js
|
|
3
3
|
var createServerRpc = (serverFnMeta, splitImportFn) => {
|
|
4
4
|
const url = "/_serverFn/" + serverFnMeta.id;
|
|
5
5
|
return Object.assign(splitImportFn, {
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { O as stripBundleArtifactMetadata, d as getBundlePatches, f as getManifestFileHash, l as getAssetBaseStorageUri, p as getManifestStorageUri } from "./dist-B-r4u3Lg.mjs";
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/databaseRows-CXxf_VIB.js
|
|
3
|
+
/** A bundle an operation names is not stored. */
|
|
4
|
+
var DatabaseBundleNotFoundError = class extends Error {
|
|
5
|
+
bundleId;
|
|
6
|
+
name = "DatabaseBundleNotFoundError";
|
|
7
|
+
constructor(bundleId) {
|
|
8
|
+
super(`Bundle "${bundleId}" was not found.`);
|
|
9
|
+
this.bundleId = bundleId;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
/** A row a delete names is still referenced, such as a bundle a release uses. */
|
|
13
|
+
var DatabaseRowReferencedError = class extends Error {
|
|
14
|
+
name = "DatabaseRowReferencedError";
|
|
15
|
+
constructor() {
|
|
16
|
+
super("The database row is still referenced.");
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
/** Input a database operation refuses before touching storage. */
|
|
20
|
+
var DatabasePluginInputError = class extends Error {
|
|
21
|
+
code;
|
|
22
|
+
name = "DatabasePluginInputError";
|
|
23
|
+
constructor(code) {
|
|
24
|
+
super(`Invalid database plugin input: ${code}`);
|
|
25
|
+
this.code = code;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var isDatabaseJsonValue = (value) => {
|
|
29
|
+
const ancestors = /* @__PURE__ */ new WeakSet();
|
|
30
|
+
const validate = (input) => {
|
|
31
|
+
if (input === null || typeof input === "string" || typeof input === "boolean") return true;
|
|
32
|
+
if (typeof input === "number") return Number.isFinite(input);
|
|
33
|
+
if (typeof input !== "object") return false;
|
|
34
|
+
if (ancestors.has(input)) return false;
|
|
35
|
+
ancestors.add(input);
|
|
36
|
+
try {
|
|
37
|
+
if (Array.isArray(input)) {
|
|
38
|
+
if (Object.getPrototypeOf(input) !== Array.prototype) return false;
|
|
39
|
+
if (Reflect.ownKeys(input).length !== input.length + 1) return false;
|
|
40
|
+
for (let index = 0; index < input.length; index += 1) {
|
|
41
|
+
const descriptor = Object.getOwnPropertyDescriptor(input, String(index));
|
|
42
|
+
if (descriptor === void 0 || !descriptor.enumerable || !("value" in descriptor) || !validate(descriptor.value)) return false;
|
|
43
|
+
}
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
const prototype = Object.getPrototypeOf(input);
|
|
47
|
+
if (prototype !== Object.prototype && prototype !== null) return false;
|
|
48
|
+
for (const key of Reflect.ownKeys(input)) {
|
|
49
|
+
if (typeof key !== "string" || key === "__proto__") return false;
|
|
50
|
+
const descriptor = Object.getOwnPropertyDescriptor(input, key);
|
|
51
|
+
if (descriptor === void 0 || !descriptor.enumerable || !("value" in descriptor) || !validate(descriptor.value)) return false;
|
|
52
|
+
}
|
|
53
|
+
return true;
|
|
54
|
+
} finally {
|
|
55
|
+
ancestors.delete(input);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
return validate(value);
|
|
59
|
+
};
|
|
60
|
+
var isDatabaseJsonObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) && isDatabaseJsonValue(value);
|
|
61
|
+
var isDatabaseMetadataObject = (value) => isDatabaseJsonObject(value) && (!Object.hasOwn(value, "app_version") || typeof value["app_version"] === "string");
|
|
62
|
+
var bundleMetadataToRow = (metadata) => {
|
|
63
|
+
const value = stripBundleArtifactMetadata(metadata);
|
|
64
|
+
if (value === void 0) return {};
|
|
65
|
+
if (!isDatabaseMetadataObject(value)) throw new DatabasePluginInputError("invalid-data");
|
|
66
|
+
return value;
|
|
67
|
+
};
|
|
68
|
+
var releaseRowToRelease = (row) => ({
|
|
69
|
+
id: row.id,
|
|
70
|
+
revision: row.revision,
|
|
71
|
+
channelId: row.channel_id,
|
|
72
|
+
platform: row.platform,
|
|
73
|
+
kind: row.kind,
|
|
74
|
+
bundleId: row.bundle_id,
|
|
75
|
+
strategy: row.strategy,
|
|
76
|
+
targetAppVersion: row.target_app_version,
|
|
77
|
+
fingerprintHash: row.fingerprint_hash,
|
|
78
|
+
enabled: row.enabled,
|
|
79
|
+
shouldForceUpdate: row.should_force_update,
|
|
80
|
+
message: row.message,
|
|
81
|
+
rolloutCohortCount: row.rollout_cohort_count,
|
|
82
|
+
targetCohorts: row.target_cohorts,
|
|
83
|
+
operation: row.operation,
|
|
84
|
+
sourceReleaseId: row.source_release_id,
|
|
85
|
+
createdAtMs: row.created_at_ms,
|
|
86
|
+
updatedAtMs: row.updated_at_ms
|
|
87
|
+
});
|
|
88
|
+
var bundleToRow = (bundle) => {
|
|
89
|
+
const metadata = bundleMetadataToRow(bundle.metadata);
|
|
90
|
+
return {
|
|
91
|
+
id: bundle.id,
|
|
92
|
+
platform: bundle.platform,
|
|
93
|
+
git_commit_hash: bundle.gitCommitHash,
|
|
94
|
+
metadata,
|
|
95
|
+
manifest_storage_uri: getManifestStorageUri(bundle),
|
|
96
|
+
manifest_file_hash: getManifestFileHash(bundle),
|
|
97
|
+
asset_base_storage_uri: getAssetBaseStorageUri(bundle)
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
var bundleToPatchRows = (bundle) => getBundlePatches(bundle).map((patch, orderIndex) => ({
|
|
101
|
+
id: `${bundle.id}:${patch.baseBundleId}`,
|
|
102
|
+
bundle_id: bundle.id,
|
|
103
|
+
base_bundle_id: patch.baseBundleId,
|
|
104
|
+
base_file_hash: patch.baseFileHash,
|
|
105
|
+
patch_file_hash: patch.patchFileHash,
|
|
106
|
+
patch_storage_uri: patch.patchStorageUri,
|
|
107
|
+
byte_size: patch.byteSize,
|
|
108
|
+
order_index: orderIndex
|
|
109
|
+
}));
|
|
110
|
+
var comparePatchRows = (left, right) => left.order_index - right.order_index || left.id.localeCompare(right.id);
|
|
111
|
+
var patchRowToArtifact = (row) => ({
|
|
112
|
+
baseBundleId: row.base_bundle_id,
|
|
113
|
+
baseFileHash: row.base_file_hash,
|
|
114
|
+
byteSize: row.byte_size,
|
|
115
|
+
patchFileHash: row.patch_file_hash,
|
|
116
|
+
patchStorageUri: row.patch_storage_uri
|
|
117
|
+
});
|
|
118
|
+
var rowToBundle = (row, patchRows = []) => {
|
|
119
|
+
const patches = patchRows.slice().sort(comparePatchRows).map(patchRowToArtifact);
|
|
120
|
+
return {
|
|
121
|
+
id: row.id,
|
|
122
|
+
platform: row.platform,
|
|
123
|
+
gitCommitHash: row.git_commit_hash,
|
|
124
|
+
metadata: stripBundleArtifactMetadata(row.metadata),
|
|
125
|
+
manifestStorageUri: row.manifest_storage_uri,
|
|
126
|
+
manifestFileHash: row.manifest_file_hash,
|
|
127
|
+
assetBaseStorageUri: row.asset_base_storage_uri,
|
|
128
|
+
patches
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
//#endregion
|
|
132
|
+
export { bundleToRow as a, rowToBundle as c, bundleToPatchRows as i, DatabasePluginInputError as n, isDatabaseJsonObject as o, DatabaseRowReferencedError as r, releaseRowToRelease as s, DatabaseBundleNotFoundError as t };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { d as getBundlePatches, p as getManifestStorageUri, y as getPatchStorageUri } from "./dist-B-r4u3Lg.mjs";
|
|
2
|
+
import { c as rowToBundle } from "./databaseRows-CXxf_VIB.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/deleteBundle-Dcc21Lbd.js
|
|
3
4
|
function resolveStorageUriForDeletion(storageUri, storagePlugin) {
|
|
4
5
|
const protocol = new URL(storageUri).protocol.replace(":", "");
|
|
5
6
|
if (storagePlugin.protocol === protocol) return storageUri;
|
|
@@ -13,8 +14,7 @@ async function cleanupBundleStorage(bundle, storagePlugin) {
|
|
|
13
14
|
const resolvedStorageUri = resolveStorageUriForDeletion(storageUri, storagePlugin);
|
|
14
15
|
if (resolvedStorageUri) cleanupUris.add(resolvedStorageUri);
|
|
15
16
|
};
|
|
16
|
-
addCleanupUri(bundle
|
|
17
|
-
addCleanupUri(getManifestStorageUri(bundle) ?? void 0);
|
|
17
|
+
addCleanupUri(getManifestStorageUri(bundle));
|
|
18
18
|
addCleanupUri(getPatchStorageUri(bundle) ?? void 0);
|
|
19
19
|
for (const patch of getBundlePatches(bundle)) addCleanupUri(patch.patchStorageUri);
|
|
20
20
|
for (const storageUri of cleanupUris) try {
|
|
@@ -23,30 +23,20 @@ async function cleanupBundleStorage(bundle, storagePlugin) {
|
|
|
23
23
|
console.error("Failed to delete bundle from storage:", error);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
async function deleteBundles({ bundleIds }, {
|
|
26
|
+
async function deleteBundles({ bundleIds }, { core, storagePlugin, waitForStorageCleanup = true }) {
|
|
27
27
|
const uniqueBundleIds = [...new Set(bundleIds)];
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
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));
|
|
28
|
+
const details = await Promise.all(uniqueBundleIds.map((bundleId) => core.getBundle(bundleId)));
|
|
29
|
+
const bundles = details.flatMap((detail) => detail === null ? [] : [rowToBundle(detail.bundle, detail.patches)]);
|
|
30
|
+
const missingBundleIds = uniqueBundleIds.filter((_bundleId, position) => details[position] === null);
|
|
38
31
|
for (const bundle of bundles) {
|
|
39
32
|
const cleanupCandidates = [
|
|
40
|
-
bundle.storageUri,
|
|
41
33
|
getManifestStorageUri(bundle),
|
|
42
34
|
getPatchStorageUri(bundle),
|
|
43
35
|
...getBundlePatches(bundle).map((patch) => patch.patchStorageUri)
|
|
44
36
|
].filter((value) => Boolean(value));
|
|
45
37
|
for (const candidate of cleanupCandidates) resolveStorageUriForDeletion(candidate, storagePlugin);
|
|
46
38
|
}
|
|
47
|
-
if (bundles.length > 0) await
|
|
48
|
-
for (const bundle of bundles) await mutation.deleteBundleById(bundle.id);
|
|
49
|
-
});
|
|
39
|
+
if (bundles.length > 0) await core.deleteBundles(bundles.map((bundle) => bundle.id));
|
|
50
40
|
const cleanupStorage = async () => {
|
|
51
41
|
for (const bundle of bundles) await cleanupBundleStorage(bundle, storagePlugin);
|
|
52
42
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../_runtime.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { $ as DialogBackdrop, G as AlertDialogRoot, J as DialogRoot, K as DialogTrigger$1, Q as DialogClose, W as AlertDialogTrigger$1, X as DialogPopup, Y as DialogPortal$1, Z as DialogDescription$1, mt as require_react, pt as require_jsx_runtime, q as DialogTitle$1 } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
3
|
import { t as X } from "../_libs/lucide-react.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { O as cn, t as Button$1 } from "./sidebar-Cw1VuC7d.mjs";
|
|
5
5
|
require_react();
|
|
6
6
|
var import_jsx_runtime = require_jsx_runtime();
|
|
7
7
|
function AlertDialog$1({ ...props }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/dist-
|
|
1
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/dist-B-r4u3Lg.js
|
|
2
2
|
var stripBundleArtifactMetadata = (metadata) => metadata;
|
|
3
|
-
var getManifestStorageUri = (bundle) => bundle.manifestStorageUri
|
|
4
|
-
var getManifestFileHash = (bundle) => bundle.manifestFileHash
|
|
5
|
-
var getAssetBaseStorageUri = (bundle) => bundle.assetBaseStorageUri
|
|
3
|
+
var getManifestStorageUri = (bundle) => bundle.manifestStorageUri;
|
|
4
|
+
var getManifestFileHash = (bundle) => bundle.manifestFileHash;
|
|
5
|
+
var getAssetBaseStorageUri = (bundle) => bundle.assetBaseStorageUri;
|
|
6
6
|
var isBundlePatchArtifact = (value) => {
|
|
7
7
|
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
8
8
|
const candidate = value;
|
|
@@ -21,6 +21,9 @@ var getBundlePatches = (bundle) => {
|
|
|
21
21
|
return true;
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
|
+
var getBundlePatch = (bundle, baseBundleId) => {
|
|
25
|
+
return getBundlePatches(bundle).find((patch) => patch.baseBundleId === baseBundleId) ?? null;
|
|
26
|
+
};
|
|
24
27
|
var getPrimaryPatch = (bundle) => {
|
|
25
28
|
return getBundlePatches(bundle)[0] ?? null;
|
|
26
29
|
};
|
|
@@ -244,7 +247,27 @@ function createReleaseCatalogScopeKey(input) {
|
|
|
244
247
|
assertCatalogSegment(input.fingerprintHash, "Fingerprint hash");
|
|
245
248
|
return `v1:fingerprint:${input.platform}:${input.channelKey}:${input.fingerprintHash}`;
|
|
246
249
|
}
|
|
250
|
+
function parseReleaseCatalogScopeKey(scopeKey) {
|
|
251
|
+
const segments = scopeKey.split(":");
|
|
252
|
+
const [version, strategy, platform, channelKey] = segments;
|
|
253
|
+
if (version !== "v1" || platform !== "ios" && platform !== "android" || channelKey === void 0) throw new Error("Invalid release catalog scope key");
|
|
254
|
+
const input = strategy === "app-version" && segments.length === 4 ? {
|
|
255
|
+
channelKey,
|
|
256
|
+
platform,
|
|
257
|
+
strategy: "APP_VERSION"
|
|
258
|
+
} : strategy === "fingerprint" && segments.length === 5 && segments[4] !== void 0 ? {
|
|
259
|
+
channelKey,
|
|
260
|
+
fingerprintHash: segments[4],
|
|
261
|
+
platform,
|
|
262
|
+
strategy: "FINGERPRINT"
|
|
263
|
+
} : (() => {
|
|
264
|
+
throw new Error("Invalid release catalog scope key");
|
|
265
|
+
})();
|
|
266
|
+
if (createReleaseCatalogScopeKey(input) !== scopeKey) throw new Error("Release catalog scope key is not canonical");
|
|
267
|
+
return input;
|
|
268
|
+
}
|
|
269
|
+
var NIL_UUID = "00000000-0000-0000-0000-000000000000";
|
|
247
270
|
var UUID_V7_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
|
|
248
271
|
var isUUIDv7 = (value) => typeof value === "string" && UUID_V7_PATTERN.test(value);
|
|
249
272
|
//#endregion
|
|
250
|
-
export {
|
|
273
|
+
export { isUUIDv7 as C, parseReleaseCatalogScopeKey as D, normalizeRolloutCohortCount as E, stripBundleArtifactMetadata as O, isReleaseEligibleForCohort as S, normalizeCohortValue as T, getPatchBaseFileHash as _, RELEASE_CATALOG_FALLBACK_POLICY as a, getRolledOutNumericCohorts as b, encodeChannelKey as c, getBundlePatches as d, getManifestFileHash as f, getPatchBaseBundleId as g, getNumericCohortValue as h, NUMERIC_COHORT_SIZE as i, getAssetBaseStorageUri as l, getNumericCohortRolloutPosition as m, MAX_COMPILED_CATALOG_BYTES as n, createReleaseCatalogScopeKey as o, getManifestStorageUri as p, NIL_UUID as r, decodeChannelKey as s, INVALID_COHORT_ERROR_MESSAGE as t, getBundlePatch as u, getPatchFileHash as v, isValidCohort as w, isCustomCohort as x, getPatchStorageUri as y };
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/downloadBundle-
|
|
2
|
-
var downloadBundle = async (bundleId, {
|
|
3
|
-
const
|
|
4
|
-
if (!
|
|
5
|
-
const storageUri = bundle.
|
|
6
|
-
if (!storageUri) return new Response("Bundle has no storage URI", { status: 404 });
|
|
1
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/downloadBundle-CexOFoZ4.js
|
|
2
|
+
var downloadBundle = async (bundleId, { core, storagePlugin }) => {
|
|
3
|
+
const detail = await core.getBundle(bundleId);
|
|
4
|
+
if (!detail) return new Response("Bundle not found", { status: 404 });
|
|
5
|
+
const storageUri = detail.bundle.manifest_storage_uri;
|
|
7
6
|
const protocol = new URL(storageUri).protocol.replace(":", "");
|
|
8
7
|
if (storagePlugin?.protocol === protocol) {
|
|
9
8
|
const { response } = await storagePlugin.get({ storageUri });
|
|
10
9
|
if (!response) return new Response("Storage object not found", { status: 404 });
|
|
11
10
|
const headers = new Headers(response.headers);
|
|
12
11
|
headers.set("cache-control", "private, no-store");
|
|
13
|
-
headers.set("content-disposition", "attachment");
|
|
12
|
+
headers.set("content-disposition", "attachment; filename=\"manifest.json\"");
|
|
14
13
|
return new Response(response.body, {
|
|
15
14
|
headers,
|
|
16
15
|
status: response.status,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { pt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
+
import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
|
|
3
|
+
import { O as cn } from "./sidebar-Cw1VuC7d.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/empty-BHoY_5jt.js
|
|
5
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
6
|
+
function Empty({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
8
|
+
"data-slot": "empty",
|
|
9
|
+
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),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function EmptyHeader({ className, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
15
|
+
"data-slot": "empty-header",
|
|
16
|
+
className: cn("flex max-w-sm flex-col items-center gap-1", className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
21
|
+
variants: { variant: {
|
|
22
|
+
default: "bg-transparent",
|
|
23
|
+
icon: "flex size-8 shrink-0 items-center justify-center rounded-md bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
|
|
24
|
+
} },
|
|
25
|
+
defaultVariants: { variant: "default" }
|
|
26
|
+
});
|
|
27
|
+
function EmptyTitle({ className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
29
|
+
"data-slot": "empty-title",
|
|
30
|
+
className: cn("text-sm font-medium tracking-tight", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function EmptyDescription({ className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
36
|
+
"data-slot": "empty-description",
|
|
37
|
+
className: cn("text-xs/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function EmptyContent({ className, ...props }) {
|
|
42
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
43
|
+
"data-slot": "empty-content",
|
|
44
|
+
className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-2 text-xs/relaxed text-balance", className),
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { EmptyTitle as a, EmptyHeader as i, EmptyContent as n, EmptyDescription as r, Empty as t };
|