@hot-updater/console 0.36.6 → 1.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/AnalyticsCapabilityContext-BCke57-7.js +1 -0
- package/.output/public/assets/BundleActivityChart-CnsBe_1J.js +42 -0
- package/.output/public/assets/BundleIdDisplay-Dky75zLU.js +1 -0
- package/.output/public/assets/alert-C-1KvDW8.js +1 -0
- package/.output/public/assets/analytics-Bqz0c-BT.js +1 -0
- package/.output/public/assets/analytics-api-CJdrTLLO.js +1 -0
- package/.output/public/assets/api-B_Rh-uzC.js +1 -0
- package/.output/public/assets/api-keys-BurCFhzH.js +1 -0
- package/.output/public/assets/api-keys-api-BEDJdQg3.js +1 -0
- package/.output/public/assets/badge-Bf0fZ-Gx.js +1 -0
- package/.output/public/assets/chart-no-axes-combined-FaYMGmQS.js +1 -0
- package/.output/public/assets/createServerFn-gM2-LFBy.js +3 -0
- package/.output/public/assets/dialog-BS60BRr2.js +1 -0
- package/.output/public/assets/dist-DspNKfMj.js +1 -0
- package/.output/public/assets/download-O-yNBc9H.js +1 -0
- package/.output/public/assets/field-Buq148-A.js +1 -0
- package/.output/public/assets/index-kFhd2S78.js +10 -0
- package/.output/public/assets/installations-BrQ-od41.js +2 -0
- package/.output/public/assets/installations-CGlZ3ROz.js +1 -0
- package/.output/public/assets/lazyRouteComponent-rPzgA7S-.js +1 -0
- package/.output/public/assets/loader-circle-DCYF-wJl.js +1 -0
- package/.output/public/assets/preload-helper-TKOBYGYD.js +1 -0
- package/.output/public/assets/refresh-cw-n8XYbPPj.js +1 -0
- package/.output/public/assets/routes-CrdokJ80.js +1 -0
- package/.output/public/assets/routes-DcQnVajO.js +2 -0
- package/.output/public/assets/search-DLhbWw3W.js +1 -0
- package/.output/public/assets/shield-check-DE_hVuHu.js +1 -0
- package/.output/public/assets/signing-HRexfjsH.js +1 -0
- package/.output/public/assets/styles-eB4EtvFS.css +2 -0
- package/.output/public/assets/table-D8CLieHX.js +1 -0
- package/.output/public/assets/textarea-YJLTVAoq.js +1 -0
- package/.output/public/assets/useMutation-JsGVjQMY.js +1 -0
- package/.output/public/assets/useOpenInteractionType-4cRD5xO0.js +1 -0
- package/.output/server/__23tanstack-start-server-fn-resolver-DBP9TQ7K.mjs +146 -0
- package/.output/server/_libs/@base-ui/react+[...].mjs +16124 -0
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +41 -10
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +132 -0
- 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 +1134 -0
- package/.output/server/_libs/eventemitter3.mjs +236 -0
- package/.output/server/_libs/immer.mjs +532 -0
- package/.output/server/_libs/lucide-react.mjs +141 -13
- package/.output/server/_libs/next-themes.mjs +2 -2
- package/.output/server/_libs/react-redux+[...].mjs +205 -0
- package/.output/server/_libs/recharts+[...].mjs +14117 -0
- package/.output/server/_libs/sonner.mjs +2 -2
- package/.output/server/_libs/tanstack__query-core.mjs +114 -1
- package/.output/server/_libs/tanstack__react-query.mjs +3 -4
- package/.output/server/_runtime.mjs +10 -1
- package/.output/server/_ssr/AnalyticsCapabilityContext-ui4DX8GO.mjs +15 -0
- package/.output/server/_ssr/BundleActivityChart-BiB9ZORH.mjs +288 -0
- package/.output/server/_ssr/BundleIdDisplay-Czk6iR6p.mjs +13 -0
- package/.output/server/_ssr/alert-Dim3MGY5.mjs +86 -0
- package/.output/server/_ssr/analytics-DtMTn8fn.mjs +858 -0
- package/.output/server/_ssr/analytics-api-Cg1M5v_H.mjs +71 -0
- package/.output/server/_ssr/analytics-input-fRRRn0uA.mjs +96 -0
- package/.output/server/_ssr/analytics-rpc-DY5uXvHT.mjs +155 -0
- package/.output/server/_ssr/api-BTSv1tZb.mjs +282 -0
- package/.output/server/_ssr/api-keys-BnM_o2nS.mjs +300 -0
- package/.output/server/_ssr/api-keys-api-CIywsSF5.mjs +60 -0
- package/.output/server/_ssr/api-keys-rpc-BSp1wkIV.mjs +136 -0
- package/.output/server/_ssr/api-rpc-cG5wd_tO.mjs +1468 -0
- package/.output/server/_ssr/auth-BF8mbAgF.mjs +21 -0
- package/.output/server/_ssr/auth-rpc-BrJ6obHJ.mjs +24 -0
- package/.output/server/_ssr/auth.server-DwKoZoQM.mjs +50 -0
- package/.output/server/_ssr/badge-DCxbEeof.mjs +26 -0
- package/.output/server/_ssr/bundle-signing-rpc-COoQhW8E.mjs +16 -0
- package/.output/server/_ssr/bundle-signing.server-D5u8KkMp.mjs +51 -0
- package/.output/server/_ssr/config-Dv8qLDZ0.mjs +13 -0
- package/.output/server/_ssr/config.server-DEiLhKmy.mjs +361 -0
- package/.output/server/_ssr/{createServerFn-DzU0k62V.mjs → createServerFn-B2hcXoPM.mjs} +1 -1
- package/.output/server/_ssr/createServerRpc-DB29C_5p.mjs +12 -0
- package/.output/server/_ssr/{sidebar-Cv_H0_Jv.mjs → createSsrRpc-9P0S0lJ3.mjs} +68 -50
- package/.output/server/_ssr/databaseRows-CwbNwYSl.mjs +166 -0
- package/.output/server/_ssr/deleteBundle-Cu_XOMt0.mjs +66 -0
- package/.output/server/_ssr/dialog-CQuRMNZ4.mjs +170 -0
- package/.output/server/_ssr/dist-BVSLTpoP.mjs +250 -0
- package/.output/server/_ssr/downloadBundle-CNnYxYO2.mjs +24 -0
- package/.output/server/_ssr/{empty-plugin-adapters-B4HCzgmM.mjs → empty-plugin-adapters-B5QvGpEl.mjs} +1 -1
- package/.output/server/_ssr/field-DRIXKjZG.mjs +74 -0
- package/.output/server/_ssr/{getBundleChildren-CVtSiH5t.mjs → getBundleChildren-BcRMFoDF.mjs} +10 -18
- package/.output/server/_ssr/installations-B-azgAvX.mjs +19 -0
- package/.output/server/_ssr/installations-Ctvzp2JH.mjs +535 -0
- package/.output/server/_ssr/router-C-KUBfOi.mjs +513 -0
- package/.output/server/_ssr/routes-BM4ht9jb.mjs +2286 -0
- package/.output/server/_ssr/routes-Z7TwC6nC.mjs +37 -0
- package/.output/server/_ssr/runtime.server-awTLiiXW.mjs +527 -0
- package/.output/server/_ssr/server-BjzmvXnO.mjs +7468 -0
- package/.output/server/_ssr/signing-k8GxyBDF.mjs +202 -0
- package/.output/server/_ssr/ssr.mjs +4 -5740
- package/.output/server/_ssr/start-DpViQGnt.mjs +4 -0
- package/.output/server/_ssr/table-v1yCvYo7.mjs +53 -0
- package/.output/server/_ssr/textarea-DYHnskhb.mjs +14 -0
- package/.output/server/_ssr/uuidv7-BbJ-9D_I.mjs +31 -0
- package/.output/server/_tanstack-start-manifest_v-CH4StzJu.mjs +108 -0
- package/.output/server/index.mjs +249 -46
- package/README.md +29 -8
- package/lib/index.d.mts +36 -0
- package/lib/index.mjs +4 -0
- package/lib/vite-internal.mjs +127 -0
- package/lib/vite.d.mts +10 -0
- package/lib/vite.mjs +5 -0
- package/package.json +51 -29
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/logo.svg +1 -0
- package/public/manifest.json +30 -0
- package/public/robots.txt +3 -0
- package/src/components/AppSidebar.tsx +159 -0
- package/src/components/BundleIdDisplay.tsx +18 -0
- package/src/components/ChannelBadge.tsx +31 -0
- package/src/components/ConsoleAccessPage.tsx +122 -0
- package/src/components/EnabledStatusIcon.tsx +54 -0
- package/src/components/HashValueDisplay.tsx +85 -0
- package/src/components/HotUpdaterLogo.tsx +30 -0
- package/src/components/NotFoundPage.tsx +33 -0
- package/src/components/PlatformIcon.tsx +39 -0
- package/src/components/RolloutPercentageBadge.tsx +28 -0
- package/src/components/ThemeProvider.tsx +116 -0
- package/src/components/TimestampDisplay.tsx +41 -0
- package/src/components/features/analytics/ActivityChart.tsx +150 -0
- package/src/components/features/analytics/AnalyticsCapabilityContext.tsx +24 -0
- package/src/components/features/analytics/AnalyticsControls.tsx +115 -0
- package/src/components/features/analytics/AnalyticsErrorAlert.tsx +21 -0
- package/src/components/features/analytics/AnalyticsOverview.tsx +208 -0
- package/src/components/features/analytics/BundleDistribution.tsx +133 -0
- package/src/components/features/analytics/BundleSelector.tsx +114 -0
- package/src/components/features/analytics/InstallationHistoryCard.tsx +248 -0
- package/src/components/features/analytics/InstallationMatchesCard.tsx +132 -0
- package/src/components/features/analytics/InstallationPageHeader.tsx +138 -0
- package/src/components/features/analytics/InstallationPagination.tsx +48 -0
- package/src/components/features/analytics/InstallationSearch.tsx +230 -0
- package/src/components/features/analytics/UpdateOutcomes.tsx +147 -0
- package/src/components/features/api-keys/ApiKeysPage.tsx +377 -0
- package/src/components/features/bundles/BundleActivityChart.tsx +193 -0
- package/src/components/features/bundles/BundleAnalyticsSummary.tsx +123 -0
- package/src/components/features/bundles/BundleChildrenPanel.tsx +201 -0
- package/src/components/features/bundles/BundleMetadata.tsx +136 -0
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +201 -0
- package/src/components/features/channels/ChannelManagementDialog.tsx +228 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +879 -0
- package/src/components/features/releases/ReleaseStateBadge.tsx +20 -0
- package/src/components/features/signing/BundleSigningPage.tsx +247 -0
- package/src/components/ui/alert-dialog.tsx +185 -0
- package/src/components/ui/alert.tsx +76 -0
- package/src/components/ui/badge.tsx +49 -0
- package/src/components/ui/button.tsx +58 -0
- package/src/components/ui/card.tsx +89 -0
- package/src/components/ui/chart.tsx +371 -0
- package/src/components/ui/combobox.tsx +303 -0
- package/src/components/ui/dialog.tsx +156 -0
- package/src/components/ui/dropdown-menu.tsx +270 -0
- package/src/components/ui/field.tsx +235 -0
- package/src/components/ui/input-group.tsx +147 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/label.tsx +25 -0
- package/src/components/ui/progress.tsx +84 -0
- package/src/components/ui/select.tsx +205 -0
- package/src/components/ui/separator.tsx +23 -0
- package/src/components/ui/sheet.tsx +132 -0
- package/src/components/ui/sidebar.tsx +779 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +56 -0
- package/src/components/ui/sonner.tsx +45 -0
- package/src/components/ui/switch.tsx +25 -0
- package/src/components/ui/table.tsx +114 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/ui/toggle-group.tsx +89 -0
- package/src/components/ui/toggle.tsx +43 -0
- package/src/components/ui/tooltip.tsx +66 -0
- package/src/hooks/use-mobile.ts +30 -0
- package/src/index.ts +48 -0
- package/src/lib/analytics-api.ts +145 -0
- package/src/lib/analytics-error.ts +19 -0
- package/src/lib/analytics-input.ts +187 -0
- package/src/lib/analytics-overview.ts +170 -0
- package/src/lib/analytics-rpc.ts +218 -0
- package/src/lib/api-keys-api.ts +69 -0
- package/src/lib/api-keys-rpc.ts +87 -0
- package/src/lib/api-rpc.ts +478 -0
- package/src/lib/api.ts +444 -0
- package/src/lib/auth-rpc.ts +16 -0
- package/src/lib/bundle-signing-api.ts +14 -0
- package/src/lib/bundle-signing-rpc.ts +16 -0
- package/src/lib/constants.ts +1 -0
- package/src/lib/git.ts +51 -0
- package/src/lib/server/auth.server.ts +43 -0
- package/src/lib/server/bundle-signing.server.ts +100 -0
- package/src/lib/server/config.server.ts +109 -0
- package/src/lib/server/console-runtime.server.ts +70 -0
- package/src/lib/server/deleteBundle.ts +145 -0
- package/src/lib/server/downloadBundle.ts +46 -0
- package/src/lib/server/getBundleChildren.ts +130 -0
- package/src/lib/server/listReleases.ts +61 -0
- package/src/lib/server/releaseActivity.ts +27 -0
- package/src/lib/server/releaseReachability.ts +95 -0
- package/src/lib/server/runtime.server.ts +172 -0
- package/src/lib/utils.ts +9 -0
- package/src/logo.svg +1 -0
- package/src/routeTree.gen.ts +199 -0
- package/src/router.tsx +21 -0
- package/src/routes/-installations-search.ts +19 -0
- package/src/routes/-releases-search.ts +74 -0
- package/src/routes/__root.tsx +174 -0
- package/src/routes/analytics.tsx +139 -0
- package/src/routes/api/auth/$.ts +19 -0
- package/src/routes/api/bundles/$bundleId/download.ts +17 -0
- package/src/routes/api-keys.tsx +37 -0
- package/src/routes/index.tsx +982 -0
- package/src/routes/installations.tsx +194 -0
- package/src/routes/signing.tsx +37 -0
- package/src/styles.css +152 -0
- package/src/virtual-modules.d.ts +21 -0
- package/src/vite-env.d.ts +1 -0
- package/src/vite-internal.ts +195 -0
- package/src/vite.ts +12 -0
- package/.output/public/assets/dist-DJX53faP.js +0 -3
- package/.output/public/assets/index-Iylis5kY.js +0 -10
- package/.output/public/assets/routes-HT21hs0C.js +0 -54
- package/.output/public/assets/styles-C0Re4quB.css +0 -2
- package/.output/server/__23tanstack-start-server-fn-resolver-CgwgZ0-i.mjs +0 -66
- package/.output/server/_libs/@floating-ui/core+[...].mjs +0 -698
- package/.output/server/_libs/@floating-ui/dom+[...].mjs +0 -644
- package/.output/server/_libs/@floating-ui/react-dom+[...].mjs +0 -839
- package/.output/server/_libs/@radix-ui/react-alert-dialog+[...].mjs +0 -2138
- package/.output/server/_libs/@radix-ui/react-popper+[...].mjs +0 -308
- package/.output/server/_libs/@radix-ui/react-select+[...].mjs +0 -1038
- package/.output/server/_libs/@tanstack/devtools-event-client+[...].mjs +0 -196
- package/.output/server/_libs/@tanstack/form-core+[...].mjs +0 -3228
- package/.output/server/_libs/@tanstack/react-form+[...].mjs +0 -430
- package/.output/server/_libs/@tanstack/react-table+[...].mjs +0 -2382
- package/.output/server/_libs/radix-ui__number.mjs +0 -6
- package/.output/server/_libs/radix-ui__primitive.mjs +0 -9
- package/.output/server/_libs/radix-ui__react-arrow.mjs +0 -23
- package/.output/server/_libs/radix-ui__react-collection.mjs +0 -78
- package/.output/server/_libs/radix-ui__react-direction.mjs +0 -13
- package/.output/server/_libs/radix-ui__react-label.mjs +0 -22
- package/.output/server/_libs/radix-ui__react-separator.mjs +0 -30
- package/.output/server/_libs/radix-ui__react-slider.mjs +0 -510
- package/.output/server/_libs/radix-ui__react-switch.mjs +0 -157
- package/.output/server/_libs/radix-ui__react-tooltip.mjs +0 -493
- package/.output/server/_ssr/api-rpc-BIbDUKSz.mjs +0 -292
- package/.output/server/_ssr/config.server-BSS366KT.mjs +0 -41
- package/.output/server/_ssr/deleteBundle-BgbZTtpW.mjs +0 -141
- package/.output/server/_ssr/dist-KboydRVk.mjs +0 -120
- package/.output/server/_ssr/router-C3hqEy3k.mjs +0 -307
- package/.output/server/_ssr/routes-B0lQvvlC.mjs +0 -3048
- package/.output/server/_ssr/start-02sLteYG.mjs +0 -4
- package/.output/server/_ssr/storageProfile-FVkjPoGb.mjs +0 -9
- package/.output/server/_tanstack-start-manifest_v-Bpx52WOU.mjs +0 -20
- package/.output/server/node_modules/tslib/modules/index.js +0 -70
- package/.output/server/node_modules/tslib/modules/package.json +0 -3
- package/.output/server/node_modules/tslib/package.json +0 -47
- package/.output/server/node_modules/tslib/tslib.js +0 -484
- package/.output/server/package.json +0 -9
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/dist-BVSLTpoP.js
|
|
2
|
+
var stripBundleArtifactMetadata = (metadata) => metadata;
|
|
3
|
+
var getManifestStorageUri = (bundle) => bundle.manifestStorageUri ?? null;
|
|
4
|
+
var getManifestFileHash = (bundle) => bundle.manifestFileHash ?? null;
|
|
5
|
+
var getAssetBaseStorageUri = (bundle) => bundle.assetBaseStorageUri ?? null;
|
|
6
|
+
var isBundlePatchArtifact = (value) => {
|
|
7
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
8
|
+
const candidate = value;
|
|
9
|
+
return typeof candidate.baseBundleId === "string" && typeof candidate.baseFileHash === "string" && typeof candidate.patchFileHash === "string" && typeof candidate.patchStorageUri === "string";
|
|
10
|
+
};
|
|
11
|
+
var readBundlePatchArray = (patches) => {
|
|
12
|
+
if (!Array.isArray(patches)) return [];
|
|
13
|
+
return patches.filter(isBundlePatchArtifact);
|
|
14
|
+
};
|
|
15
|
+
var getBundlePatches = (bundle) => {
|
|
16
|
+
const patches = readBundlePatchArray(bundle.patches);
|
|
17
|
+
const seenBaseBundleIds = /* @__PURE__ */ new Set();
|
|
18
|
+
return patches.filter((patch) => {
|
|
19
|
+
if (seenBaseBundleIds.has(patch.baseBundleId)) return false;
|
|
20
|
+
seenBaseBundleIds.add(patch.baseBundleId);
|
|
21
|
+
return true;
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
var getPrimaryPatch = (bundle) => {
|
|
25
|
+
return getBundlePatches(bundle)[0] ?? null;
|
|
26
|
+
};
|
|
27
|
+
var getPatchBaseBundleId = (bundle) => getPrimaryPatch(bundle)?.baseBundleId ?? null;
|
|
28
|
+
var getPatchBaseFileHash = (bundle) => getPrimaryPatch(bundle)?.baseFileHash ?? null;
|
|
29
|
+
var getPatchFileHash = (bundle) => getPrimaryPatch(bundle)?.patchFileHash ?? null;
|
|
30
|
+
var getPatchStorageUri = (bundle) => getPrimaryPatch(bundle)?.patchStorageUri ?? null;
|
|
31
|
+
var NUMERIC_COHORT_SIZE = 1e3;
|
|
32
|
+
var DEFAULT_ROLLOUT_COHORT_COUNT = NUMERIC_COHORT_SIZE;
|
|
33
|
+
var INVALID_COHORT_ERROR_MESSAGE = `Invalid cohort. Use 1-1000 or a lowercase slug without spaces, up to 64 characters.`;
|
|
34
|
+
var CUSTOM_COHORT_PATTERN = /^[a-z0-9-]+$/;
|
|
35
|
+
function parseNumericCohortValue(cohort) {
|
|
36
|
+
if (!/^\d+$/.test(cohort)) return null;
|
|
37
|
+
const parsed = Number.parseInt(cohort, 10);
|
|
38
|
+
if (Number.isNaN(parsed) || parsed < 1 || parsed > 1e3) return null;
|
|
39
|
+
return parsed;
|
|
40
|
+
}
|
|
41
|
+
function positiveMod(value, modulus) {
|
|
42
|
+
return (value % modulus + modulus) % modulus;
|
|
43
|
+
}
|
|
44
|
+
function hashString(value) {
|
|
45
|
+
let hash = 0;
|
|
46
|
+
for (let i = 0; i < value.length; i++) {
|
|
47
|
+
const char = value.charCodeAt(i);
|
|
48
|
+
hash = (hash << 5) - hash + char;
|
|
49
|
+
hash |= 0;
|
|
50
|
+
}
|
|
51
|
+
return hash;
|
|
52
|
+
}
|
|
53
|
+
function gcd(a, b) {
|
|
54
|
+
let x = Math.abs(a);
|
|
55
|
+
let y = Math.abs(b);
|
|
56
|
+
while (y !== 0) {
|
|
57
|
+
const next = x % y;
|
|
58
|
+
x = y;
|
|
59
|
+
y = next;
|
|
60
|
+
}
|
|
61
|
+
return x;
|
|
62
|
+
}
|
|
63
|
+
function modularInverse(value, modulus) {
|
|
64
|
+
let t = 0;
|
|
65
|
+
let newT = 1;
|
|
66
|
+
let r = modulus;
|
|
67
|
+
let newR = positiveMod(value, modulus);
|
|
68
|
+
while (newR !== 0) {
|
|
69
|
+
const quotient = Math.floor(r / newR);
|
|
70
|
+
[t, newT] = [newT, t - quotient * newT];
|
|
71
|
+
[r, newR] = [newR, r - quotient * newR];
|
|
72
|
+
}
|
|
73
|
+
if (r > 1) throw new Error(`No modular inverse for ${value} mod ${modulus}`);
|
|
74
|
+
return positiveMod(t, modulus);
|
|
75
|
+
}
|
|
76
|
+
function getRolloutShuffleParameters(bundleId) {
|
|
77
|
+
let multiplier = positiveMod(hashString(`${bundleId}:multiplier`), 997);
|
|
78
|
+
if (multiplier === 0) multiplier = 1;
|
|
79
|
+
while (gcd(multiplier, NUMERIC_COHORT_SIZE) !== 1) {
|
|
80
|
+
multiplier = positiveMod(multiplier + 1, NUMERIC_COHORT_SIZE);
|
|
81
|
+
if (multiplier === 0) multiplier = 1;
|
|
82
|
+
}
|
|
83
|
+
const offset = positiveMod(hashString(`${bundleId}:offset`), NUMERIC_COHORT_SIZE);
|
|
84
|
+
return {
|
|
85
|
+
multiplier,
|
|
86
|
+
offset,
|
|
87
|
+
inverseMultiplier: modularInverse(multiplier, NUMERIC_COHORT_SIZE)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function normalizeRolloutCohortCount(rolloutCohortCount) {
|
|
91
|
+
if (rolloutCohortCount === null || rolloutCohortCount === void 0) return DEFAULT_ROLLOUT_COHORT_COUNT;
|
|
92
|
+
if (rolloutCohortCount <= 0) return 0;
|
|
93
|
+
if (rolloutCohortCount >= 1e3) return NUMERIC_COHORT_SIZE;
|
|
94
|
+
return Math.floor(rolloutCohortCount);
|
|
95
|
+
}
|
|
96
|
+
function normalizeCohortValue(cohort) {
|
|
97
|
+
const normalized = cohort.trim().toLowerCase();
|
|
98
|
+
const numericCohort = parseNumericCohortValue(normalized);
|
|
99
|
+
if (numericCohort !== null) return String(numericCohort);
|
|
100
|
+
return normalized;
|
|
101
|
+
}
|
|
102
|
+
function getNumericCohortValue(cohort) {
|
|
103
|
+
return parseNumericCohortValue(normalizeCohortValue(cohort));
|
|
104
|
+
}
|
|
105
|
+
function isNumericCohort(cohort) {
|
|
106
|
+
return getNumericCohortValue(cohort) !== null;
|
|
107
|
+
}
|
|
108
|
+
function isCustomCohort(cohort) {
|
|
109
|
+
const normalized = normalizeCohortValue(cohort);
|
|
110
|
+
return normalized.length > 0 && normalized.length <= 64 && !/^\d+$/.test(normalized) && CUSTOM_COHORT_PATTERN.test(normalized);
|
|
111
|
+
}
|
|
112
|
+
function isValidCohort(cohort) {
|
|
113
|
+
const normalized = normalizeCohortValue(cohort);
|
|
114
|
+
return isNumericCohort(normalized) || isCustomCohort(normalized);
|
|
115
|
+
}
|
|
116
|
+
function getNumericCohortRolloutPosition(bundleId, cohortValue) {
|
|
117
|
+
if (cohortValue < 1 || cohortValue > 1e3) throw new Error(`Invalid numeric cohort: ${cohortValue}`);
|
|
118
|
+
const { offset, inverseMultiplier } = getRolloutShuffleParameters(bundleId);
|
|
119
|
+
return positiveMod(inverseMultiplier * (cohortValue - 1 - offset), NUMERIC_COHORT_SIZE);
|
|
120
|
+
}
|
|
121
|
+
function getRolledOutNumericCohorts(bundleId, rolloutCohortCount) {
|
|
122
|
+
const normalizedRolloutCount = normalizeRolloutCohortCount(rolloutCohortCount);
|
|
123
|
+
if (normalizedRolloutCount <= 0) return [];
|
|
124
|
+
if (normalizedRolloutCount >= 1e3) return Array.from({ length: NUMERIC_COHORT_SIZE }, (_, index) => index + 1);
|
|
125
|
+
const { multiplier, offset } = getRolloutShuffleParameters(bundleId);
|
|
126
|
+
return Array.from({ length: normalizedRolloutCount }, (_, position) => positiveMod(multiplier * position + offset, NUMERIC_COHORT_SIZE)).map((zeroBasedCohort) => zeroBasedCohort + 1).sort((left, right) => left - right);
|
|
127
|
+
}
|
|
128
|
+
function isCohortEligibleForUpdate(bundleId, cohort, rolloutCohortCount, targetCohorts) {
|
|
129
|
+
const normalizedCohort = cohort === null || cohort === void 0 ? void 0 : normalizeCohortValue(cohort);
|
|
130
|
+
const normalizedTargetCohorts = targetCohorts?.map((targetCohort) => normalizeCohortValue(targetCohort)) ?? [];
|
|
131
|
+
if (normalizedCohort !== void 0 && normalizedTargetCohorts.includes(normalizedCohort)) return true;
|
|
132
|
+
const normalizedRolloutCount = normalizeRolloutCohortCount(rolloutCohortCount);
|
|
133
|
+
if (normalizedRolloutCount <= 0) return false;
|
|
134
|
+
if (normalizedCohort === void 0) return normalizedRolloutCount >= NUMERIC_COHORT_SIZE;
|
|
135
|
+
const numericCohort = getNumericCohortValue(normalizedCohort);
|
|
136
|
+
if (numericCohort === null) return false;
|
|
137
|
+
if (normalizedRolloutCount >= 1e3) return true;
|
|
138
|
+
return getNumericCohortRolloutPosition(bundleId, numericCohort) < normalizedRolloutCount;
|
|
139
|
+
}
|
|
140
|
+
var RELEASE_CATALOG_FALLBACK_POLICY = "BUILTIN_IF_ACTIVE_INELIGIBLE";
|
|
141
|
+
var MAX_COMPILED_CATALOG_BYTES = 256 * 1024;
|
|
142
|
+
function isReleaseEligibleForCohort(release, cohort) {
|
|
143
|
+
if (isCohortEligibleForUpdate(release.releaseId, cohort, release.rolloutCohortCount, release.targetCohorts)) return true;
|
|
144
|
+
return cohort !== null && cohort !== void 0 && isCustomCohort(normalizeCohortValue(cohort)) && normalizeRolloutCohortCount(release.rolloutCohortCount) === 1e3;
|
|
145
|
+
}
|
|
146
|
+
var BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
147
|
+
var MAX_CATALOG_SEGMENT_LENGTH = 255;
|
|
148
|
+
function assertCatalogSegment(value, name) {
|
|
149
|
+
if (value.length === 0 || value.length > MAX_CATALOG_SEGMENT_LENGTH || !/^[A-Za-z0-9._~-]+$/.test(value)) throw new Error(`${name} must be 1-${MAX_CATALOG_SEGMENT_LENGTH} URL-safe ASCII characters`);
|
|
150
|
+
}
|
|
151
|
+
function encodeUtf8(value) {
|
|
152
|
+
const bytes = [];
|
|
153
|
+
for (const codePointText of value) {
|
|
154
|
+
const codePoint = codePointText.codePointAt(0);
|
|
155
|
+
if (codePoint <= 127) bytes.push(codePoint);
|
|
156
|
+
else if (codePoint <= 2047) bytes.push(192 | codePoint >> 6, 128 | codePoint & 63);
|
|
157
|
+
else if (codePoint <= 65535) bytes.push(224 | codePoint >> 12, 128 | codePoint >> 6 & 63, 128 | codePoint & 63);
|
|
158
|
+
else bytes.push(240 | codePoint >> 18, 128 | codePoint >> 12 & 63, 128 | codePoint >> 6 & 63, 128 | codePoint & 63);
|
|
159
|
+
}
|
|
160
|
+
return bytes;
|
|
161
|
+
}
|
|
162
|
+
function decodeUtf8(bytes) {
|
|
163
|
+
let result = "";
|
|
164
|
+
for (let index = 0; index < bytes.length;) {
|
|
165
|
+
const first = bytes[index++];
|
|
166
|
+
let codePoint;
|
|
167
|
+
let continuationCount;
|
|
168
|
+
if (first <= 127) {
|
|
169
|
+
codePoint = first;
|
|
170
|
+
continuationCount = 0;
|
|
171
|
+
} else if ((first & 224) === 192) {
|
|
172
|
+
codePoint = first & 31;
|
|
173
|
+
continuationCount = 1;
|
|
174
|
+
} else if ((first & 240) === 224) {
|
|
175
|
+
codePoint = first & 15;
|
|
176
|
+
continuationCount = 2;
|
|
177
|
+
} else if ((first & 248) === 240) {
|
|
178
|
+
codePoint = first & 7;
|
|
179
|
+
continuationCount = 3;
|
|
180
|
+
} else throw new Error("Invalid UTF-8 channel key");
|
|
181
|
+
for (let offset = 0; offset < continuationCount; offset += 1) {
|
|
182
|
+
const continuation = bytes[index++];
|
|
183
|
+
if (continuation === void 0 || (continuation & 192) !== 128) throw new Error("Invalid UTF-8 channel key");
|
|
184
|
+
codePoint = codePoint << 6 | continuation & 63;
|
|
185
|
+
}
|
|
186
|
+
if (codePoint > 1114111 || codePoint >= 55296 && codePoint <= 57343 || continuationCount === 1 && codePoint < 128 || continuationCount === 2 && codePoint < 2048 || continuationCount === 3 && codePoint < 65536) throw new Error("Invalid UTF-8 channel key");
|
|
187
|
+
result += String.fromCodePoint(codePoint);
|
|
188
|
+
}
|
|
189
|
+
return result;
|
|
190
|
+
}
|
|
191
|
+
function base64UrlEncode(bytes) {
|
|
192
|
+
let result = "";
|
|
193
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
194
|
+
const first = bytes[index];
|
|
195
|
+
const second = bytes[index + 1];
|
|
196
|
+
const third = bytes[index + 2];
|
|
197
|
+
const value = first << 16 | (second ?? 0) << 8 | (third ?? 0);
|
|
198
|
+
result += BASE64URL_ALPHABET[value >> 18 & 63];
|
|
199
|
+
result += BASE64URL_ALPHABET[value >> 12 & 63];
|
|
200
|
+
if (second !== void 0) result += BASE64URL_ALPHABET[value >> 6 & 63];
|
|
201
|
+
if (third !== void 0) result += BASE64URL_ALPHABET[value & 63];
|
|
202
|
+
}
|
|
203
|
+
return result;
|
|
204
|
+
}
|
|
205
|
+
function base64UrlDecode(value) {
|
|
206
|
+
if (!/^[A-Za-z0-9_-]*$/.test(value) || value.length % 4 === 1) throw new Error("Invalid channel key");
|
|
207
|
+
const bytes = [];
|
|
208
|
+
for (let index = 0; index < value.length; index += 4) {
|
|
209
|
+
const chunk = value.slice(index, index + 4);
|
|
210
|
+
const encoded = [...chunk].map((character) => BASE64URL_ALPHABET.indexOf(character));
|
|
211
|
+
if (encoded.some((part) => part < 0)) throw new Error("Invalid channel key");
|
|
212
|
+
const bits = encoded[0] << 18 | encoded[1] << 12 | (encoded[2] ?? 0) << 6 | (encoded[3] ?? 0);
|
|
213
|
+
bytes.push(bits >> 16 & 255);
|
|
214
|
+
if (chunk.length >= 3) bytes.push(bits >> 8 & 255);
|
|
215
|
+
if (chunk.length === 4) bytes.push(bits & 255);
|
|
216
|
+
}
|
|
217
|
+
return bytes;
|
|
218
|
+
}
|
|
219
|
+
function normalizeChannelName(channel) {
|
|
220
|
+
return channel.trim().normalize("NFC");
|
|
221
|
+
}
|
|
222
|
+
function assertCanonicalChannelName(channel) {
|
|
223
|
+
const normalized = normalizeChannelName(channel);
|
|
224
|
+
if (normalized.length === 0 || normalized !== channel) throw new Error("Channel name must be non-empty, trimmed, and NFC-normalized");
|
|
225
|
+
let codePointCount = 0;
|
|
226
|
+
for (const _codePoint of normalized) {
|
|
227
|
+
codePointCount += 1;
|
|
228
|
+
if (codePointCount > 255) throw new Error("Channel name must not exceed 255 characters");
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
function encodeChannelKey(channel) {
|
|
232
|
+
assertCanonicalChannelName(channel);
|
|
233
|
+
return base64UrlEncode(encodeUtf8(channel));
|
|
234
|
+
}
|
|
235
|
+
function decodeChannelKey(channelKey) {
|
|
236
|
+
const channel = decodeUtf8(base64UrlDecode(channelKey));
|
|
237
|
+
assertCanonicalChannelName(channel);
|
|
238
|
+
if (encodeChannelKey(channel) !== channelKey) throw new Error("Channel key is not canonically encoded");
|
|
239
|
+
return channel;
|
|
240
|
+
}
|
|
241
|
+
function createReleaseCatalogScopeKey(input) {
|
|
242
|
+
decodeChannelKey(input.channelKey);
|
|
243
|
+
if (input.strategy === "APP_VERSION") return `v1:app-version:${input.platform}:${input.channelKey}`;
|
|
244
|
+
assertCatalogSegment(input.fingerprintHash, "Fingerprint hash");
|
|
245
|
+
return `v1:fingerprint:${input.platform}:${input.channelKey}:${input.fingerprintHash}`;
|
|
246
|
+
}
|
|
247
|
+
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
|
+
var isUUIDv7 = (value) => typeof value === "string" && UUID_V7_PATTERN.test(value);
|
|
249
|
+
//#endregion
|
|
250
|
+
export { normalizeCohortValue as C, isValidCohort as S, stripBundleArtifactMetadata as T, getPatchStorageUri as _, createReleaseCatalogScopeKey as a, isReleaseEligibleForCohort as b, getAssetBaseStorageUri as c, getManifestStorageUri as d, getNumericCohortRolloutPosition as f, getPatchFileHash as g, getPatchBaseFileHash as h, RELEASE_CATALOG_FALLBACK_POLICY as i, getBundlePatches as l, getPatchBaseBundleId as m, MAX_COMPILED_CATALOG_BYTES as n, decodeChannelKey as o, getNumericCohortValue as p, NUMERIC_COHORT_SIZE as r, encodeChannelKey as s, INVALID_COHORT_ERROR_MESSAGE as t, getManifestFileHash as u, getRolledOutNumericCohorts as v, normalizeRolloutCohortCount as w, isUUIDv7 as x, isCustomCohort as y };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/downloadBundle-CNnYxYO2.js
|
|
2
|
+
var downloadBundle = async (bundleId, { databaseClient, storagePlugin }) => {
|
|
3
|
+
const bundle = await databaseClient.getBundleById(bundleId);
|
|
4
|
+
if (!bundle) return new Response("Bundle not found", { status: 404 });
|
|
5
|
+
const storageUri = bundle.storageUri;
|
|
6
|
+
if (!storageUri) return new Response("Bundle has no storage URI", { status: 404 });
|
|
7
|
+
const protocol = new URL(storageUri).protocol.replace(":", "");
|
|
8
|
+
if (storagePlugin?.protocol === protocol) {
|
|
9
|
+
const { response } = await storagePlugin.get({ storageUri });
|
|
10
|
+
if (!response) return new Response("Storage object not found", { status: 404 });
|
|
11
|
+
const headers = new Headers(response.headers);
|
|
12
|
+
headers.set("cache-control", "private, no-store");
|
|
13
|
+
headers.set("content-disposition", "attachment");
|
|
14
|
+
return new Response(response.body, {
|
|
15
|
+
headers,
|
|
16
|
+
status: response.status,
|
|
17
|
+
statusText: response.statusText
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
if (protocol !== "http" && protocol !== "https") return new Response(`No storage plugin for protocol: ${protocol}`, { status: 503 });
|
|
21
|
+
return Response.redirect(storageUri, 302);
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { downloadBundle };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { i as __toESM } from "../_runtime.mjs";
|
|
2
|
+
import { at as require_react, it as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
+
import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
|
|
4
|
+
import { C as cn } from "./createSsrRpc-9P0S0lJ3.mjs";
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/field-DRIXKjZG.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 };
|
package/.output/server/_ssr/{getBundleChildren-CVtSiH5t.mjs → getBundleChildren-BcRMFoDF.mjs}
RENAMED
|
@@ -1,39 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/getBundleChildren-
|
|
1
|
+
import { l as getBundlePatches } from "./dist-BVSLTpoP.mjs";
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/getBundleChildren-BcRMFoDF.js
|
|
3
3
|
var CHILDREN_QUERY_LIMIT = 100;
|
|
4
4
|
async function collectBundleChildrenByBaseIds(baseBundleIds, deps) {
|
|
5
5
|
const uniqueBaseBundleIds = [...new Set(baseBundleIds.filter(Boolean))];
|
|
6
6
|
const bundlesByBaseId = Object.fromEntries(uniqueBaseBundleIds.map((bundleId) => [bundleId, []]));
|
|
7
|
-
const baseBundles = (await Promise.all(uniqueBaseBundleIds.map((bundleId) => deps.
|
|
7
|
+
const baseBundles = (await Promise.all(uniqueBaseBundleIds.map((bundleId) => deps.databaseClient.getBundleById(bundleId)))).filter((bundle) => Boolean(bundle));
|
|
8
8
|
const groupMap = /* @__PURE__ */ new Map();
|
|
9
9
|
for (const baseBundle of baseBundles) {
|
|
10
|
-
const
|
|
11
|
-
const existingGroup = groupMap.get(groupKey);
|
|
10
|
+
const existingGroup = groupMap.get(baseBundle.platform);
|
|
12
11
|
if (existingGroup) {
|
|
13
|
-
existingGroup.
|
|
12
|
+
existingGroup.add(baseBundle.id);
|
|
14
13
|
continue;
|
|
15
14
|
}
|
|
16
|
-
groupMap.set(
|
|
17
|
-
channel: baseBundle.channel,
|
|
18
|
-
platform: baseBundle.platform,
|
|
19
|
-
bundleIds: new Set([baseBundle.id])
|
|
20
|
-
});
|
|
15
|
+
groupMap.set(baseBundle.platform, new Set([baseBundle.id]));
|
|
21
16
|
}
|
|
22
|
-
for (const
|
|
17
|
+
for (const [platform, bundleIds] of groupMap) {
|
|
23
18
|
const seenBundleIds = /* @__PURE__ */ new Set();
|
|
24
19
|
const seenCursors = /* @__PURE__ */ new Set();
|
|
25
20
|
let after;
|
|
26
21
|
while (true) {
|
|
27
|
-
const page = await deps.
|
|
28
|
-
where: {
|
|
29
|
-
channel: group.channel,
|
|
30
|
-
platform: group.platform
|
|
31
|
-
},
|
|
22
|
+
const page = await deps.databaseClient.getBundles({
|
|
23
|
+
where: { platform },
|
|
32
24
|
limit: CHILDREN_QUERY_LIMIT,
|
|
33
25
|
cursor: after ? { after } : void 0
|
|
34
26
|
});
|
|
35
27
|
for (const bundle of page.data) {
|
|
36
|
-
const matchedParentBundleIds = getBundlePatches(bundle).map((patch) => patch.baseBundleId).filter((bundleId) =>
|
|
28
|
+
const matchedParentBundleIds = getBundlePatches(bundle).map((patch) => patch.baseBundleId).filter((bundleId) => bundleIds.has(bundleId));
|
|
37
29
|
if (matchedParentBundleIds.length === 0 || seenBundleIds.has(bundle.id)) continue;
|
|
38
30
|
seenBundleIds.add(bundle.id);
|
|
39
31
|
for (const parentBundleId of matchedParentBundleIds) bundlesByBaseId[parentBundleId]?.push(bundle);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { d as createFileRoute, u as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
|
+
import { t as ensureAnalyticsRouteAccess } from "./analytics-api-Cg1M5v_H.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/installations-B-azgAvX.js
|
|
4
|
+
function validateInstallationsSearch(search) {
|
|
5
|
+
return {
|
|
6
|
+
query: typeof search.query === "string" ? search.query : void 0,
|
|
7
|
+
installId: typeof search.installId === "string" ? search.installId : void 0,
|
|
8
|
+
searchOffset: typeof search.searchOffset === "number" && Number.isSafeInteger(search.searchOffset) && search.searchOffset >= 0 ? search.searchOffset : 0,
|
|
9
|
+
historyOffset: typeof search.historyOffset === "number" && Number.isSafeInteger(search.historyOffset) && search.historyOffset >= 0 ? search.historyOffset : 0
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
var $$splitComponentImporter = () => import("./installations-Ctvzp2JH.mjs");
|
|
13
|
+
var Route = createFileRoute("/installations")({
|
|
14
|
+
beforeLoad: ({ context }) => ensureAnalyticsRouteAccess(context.queryClient),
|
|
15
|
+
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
16
|
+
validateSearch: validateInstallationsSearch
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Route as t };
|