@hot-updater/console 1.0.0-rc.42 → 1.0.0-rc.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/server/{__23tanstack-start-server-fn-resolver-CY9S6_rE.mjs → __23tanstack-start-server-fn-resolver-CAIUZxS3.mjs} +42 -42
  3. package/.output/server/_ssr/{BundleIdDisplay-DY9dMdTi.mjs → BundleIdDisplay-DmwFwFig.mjs} +2 -2
  4. package/.output/server/_ssr/{ConsoleFeatureUnavailable-BhEUVD0N.mjs → ConsoleFeatureUnavailable-CXdtdnY7.mjs} +5 -5
  5. package/.output/server/_ssr/{EventDetails-BkjZNwdv.mjs → EventDetails-BRHWr0y4.mjs} +6 -6
  6. package/.output/server/_ssr/{HashValueDisplay-BalBKDvt.mjs → HashValueDisplay-DPf-8SmO.mjs} +2 -2
  7. package/.output/server/_ssr/{InsightsInfo-Dg6i_faE.mjs → InsightsInfo-i8nqiI4p.mjs} +2 -2
  8. package/.output/server/_ssr/{InsightsPageHeader-TG_4uP-s.mjs → InsightsPageHeader-ASTSUdCJ.mjs} +5 -5
  9. package/.output/server/_ssr/{NotFoundPage-avGmjhca.mjs → NotFoundPage-3jFxLwYw.mjs} +2 -2
  10. package/.output/server/_ssr/{alert-dialog-C0iIUTGF.mjs → alert-dialog-DiNl2zyc.mjs} +1 -1
  11. package/.output/server/_ssr/{api-keys-CkRVvUQc.mjs → api-keys-DJ695sz4.mjs} +7 -7
  12. package/.output/server/_ssr/{api-keys-EQkmFjDH.mjs → api-keys-DsWCDbyZ.mjs} +2 -2
  13. package/.output/server/_ssr/{api-keys-rpc-jaxxUeV3.mjs → api-keys-rpc-CMreTvPQ.mjs} +3 -3
  14. package/.output/server/_ssr/{api-rpc-C9JMN2hT.mjs → api-rpc-DFxQatm1.mjs} +4 -4
  15. package/.output/server/_ssr/{api-B2kX4vkQ.mjs → api-yMNlDDQz.mjs} +3 -3
  16. package/.output/server/_ssr/{auth-rpc-tVS5Wn5o.mjs → auth-rpc-ABmGfiYv.mjs} +4 -4
  17. package/.output/server/_ssr/{auth.server-Dz4Rpft1.mjs → auth.server-CftUlVI0.mjs} +71 -108
  18. package/.output/server/_ssr/{config.server-DKB0zVoy.mjs → config.server-DKKxOk0p.mjs} +4 -4
  19. package/.output/server/_ssr/{console-access-7nM186dS.mjs → console-access-BGqx9nA9.mjs} +2 -2
  20. package/.output/server/_ssr/{console-features-api-ByV75tIr.mjs → console-features-api-D3dSwBFb.mjs} +3 -3
  21. package/.output/server/_ssr/{console-features-rpc-DvdWiTpJ.mjs → console-features-rpc-DlmjEgPo.mjs} +3 -3
  22. package/.output/server/_ssr/{dialog-C5xG8zAz.mjs → dialog-EwBwQ3Al.mjs} +1 -1
  23. package/.output/server/_ssr/{downloadBundle-DViuIa9U.mjs → downloadBundle-CZysjmNW.mjs} +2 -2
  24. package/.output/server/_ssr/{empty-BS98wFpp.mjs → empty-IxfzBAbK.mjs} +2 -2
  25. package/.output/server/_ssr/{field-ClP2NfeY.mjs → field-CAk8Po6G.mjs} +2 -2
  26. package/.output/server/_ssr/{input-group-CQF02dST.mjs → input-group-C8xGutM-.mjs} +1 -1
  27. package/.output/server/_ssr/{insights-zid4wKIi.mjs → insights-BOlIwjER.mjs} +2 -2
  28. package/.output/server/_ssr/{insights-DYoZiNZd.mjs → insights-CiMMDBOR.mjs} +18 -18
  29. package/.output/server/_ssr/{insights-enlqIb7I.mjs → insights-TfCZijVT.mjs} +5 -5
  30. package/.output/server/_ssr/{insights-api-KhSyJHeB.mjs → insights-api-BujwgqiF.mjs} +3 -3
  31. package/.output/server/_ssr/{insights-failures-rpc-Cku0ihtu.mjs → insights-failures-rpc-qo3-10sJ.mjs} +6 -6
  32. package/.output/server/_ssr/{insights-recovery-rpc-DlDSYtAF.mjs → insights-recovery-rpc-CJc-e3aX.mjs} +4 -4
  33. package/.output/server/_ssr/{insights-rpc-DF4pw5aY.mjs → insights-rpc-Bq9yK1cQ.mjs} +3 -3
  34. package/.output/server/_ssr/{insights-usage-rpc-QRcme1lk.mjs → insights-usage-rpc-DSqa8rm7.mjs} +4 -4
  35. package/.output/server/_ssr/{insights-usage-rpc-CLlatFXW.mjs → insights-usage-rpc-Dd6LuAuP.mjs} +3 -3
  36. package/.output/server/_ssr/{insights_.distribution-DrnoIn6u.mjs → insights_.distribution-B5Lw0-Dy.mjs} +2 -2
  37. package/.output/server/_ssr/{insights_.distribution-BATPEnM0.mjs → insights_.distribution-B8JZmhAz.mjs} +5 -5
  38. package/.output/server/_ssr/{insights_.distribution-BYGGlize.mjs → insights_.distribution-CIV8qEbl.mjs} +11 -11
  39. package/.output/server/_ssr/{installations-DfEGuTB7.mjs → installations-Bf7bPK9c.mjs} +2 -2
  40. package/.output/server/_ssr/{installations-CeIC8JH3.mjs → installations-DKwMDKvg.mjs} +10 -10
  41. package/.output/server/_ssr/{installations-Bipzl2VP.mjs → installations-Dx_EV-mI.mjs} +4 -4
  42. package/.output/server/_ssr/{runtime.server-BoE9GFjQ.mjs → plugins-3wxZQEn5.mjs} +539 -88
  43. package/.output/server/_ssr/{release-adoption-rpc-9s6nv4tG.mjs → release-adoption-rpc-D6o106Na.mjs} +6 -6
  44. package/.output/server/_ssr/{remote-config-Copd0Xw5.mjs → remote-config-Cik_fTGD.mjs} +2 -2
  45. package/.output/server/_ssr/{remote-config-CKefYhGK.mjs → remote-config-CxLhYG7c.mjs} +2 -2
  46. package/.output/server/_ssr/{remote-config-aQD2auCO.mjs → remote-config-Dho6TuQe.mjs} +15 -15
  47. package/.output/server/_ssr/{remote-config-rpc-C6ZsHn-3.mjs → remote-config-rpc-Nec8oaNz.mjs} +4 -4
  48. package/.output/server/_ssr/{router-jWIEqiAe.mjs → router-Cp3mzjj7.mjs} +14 -14
  49. package/.output/server/_ssr/{routes-B6s4YTNs.mjs → routes-CJMAShOS.mjs} +8 -8
  50. package/.output/server/_ssr/{routes-D1nGb8GK.mjs → routes-CazO1POC.mjs} +13 -13
  51. package/.output/server/_ssr/runtime.server-DLrq5UBB.mjs +104 -0
  52. package/.output/server/_ssr/{select-DsHYxL5J.mjs → select-DPTLkWdD.mjs} +1 -1
  53. package/.output/server/_ssr/{server-BSh-RXFr.mjs → server-DBgxQIeE.mjs} +2 -2
  54. package/.output/server/_ssr/{sidebar-CccTzdeH.mjs → sidebar-CQn_ksV8.mjs} +2 -2
  55. package/.output/server/_ssr/ssr.mjs +1 -1
  56. package/.output/server/_ssr/{switch-qzn2UCY4.mjs → switch-Da_EY-bS.mjs} +2 -2
  57. package/.output/server/_ssr/{table-DqLKGXY2.mjs → table-CAbD28jq.mjs} +1 -1
  58. package/.output/server/_ssr/{tabs-OurD9NcW.mjs → tabs-CcoEXc6t.mjs} +2 -2
  59. package/.output/server/index.mjs +83 -83
  60. package/README.md +3 -2
  61. package/package.json +7 -7
  62. package/src/lib/api-keys-rpc.ts +1 -1
  63. package/src/lib/insights-api.ts +1 -1
  64. package/src/lib/insights-failures.ts +1 -1
  65. package/src/lib/insights-rpc.ts +1 -1
  66. package/src/lib/insights-view.ts +1 -1
  67. package/src/lib/remote-config-draft.ts +1 -1
  68. package/src/lib/remote-config-rpc.ts +2 -2
  69. package/src/lib/server/bundleActivity.ts +1 -1
  70. package/src/lib/server/console-feature-apis.ts +3 -3
  71. package/src/lib/server/console-runtime.server.ts +5 -5
  72. package/src/lib/server/downloadBundle.ts +3 -5
  73. package/src/lib/server/failureReports.ts +1 -1
  74. package/src/lib/server/insightsUsage.ts +1 -1
  75. package/src/lib/server/releaseAdoption.ts +1 -1
  76. package/src/lib/server/remoteConfig.ts +1 -1
  77. package/src/lib/server/updateFailures.ts +1 -1
  78. package/.output/server/_ssr/remote-config-BzCPVSO1.mjs +0 -522
@@ -6,7 +6,7 @@ import { a as normalize, i as defineTable, n as compare, o as normalizeRange, r
6
6
  import { n as createUUIDv7After, t as createUUIDv7 } from "./uuidv7-ctA_XVZA.mjs";
7
7
  import { t as isRemoteDatabase } from "./databaseConfig-C5SkAyUy.mjs";
8
8
  import { r as rangesIntersect } from "../_libs/verkit.mjs";
9
- //#region node_modules/.nitro/vite/services/ssr/assets/auth.server-Dz4Rpft1.js
9
+ //#region node_modules/.nitro/vite/services/ssr/assets/auth.server-CftUlVI0.js
10
10
  var SHA256_FILE_HASH_RE = /^[0-9a-f]{64}$/;
11
11
  var isContentAddressedAssetFileHash = (value) => {
12
12
  return typeof value === "string" && SHA256_FILE_HASH_RE.test(value);
@@ -516,29 +516,6 @@ var ReleaseCatalogMutationError = class extends Error {
516
516
  this.code = code;
517
517
  }
518
518
  };
519
- var decodeBase64Url = (value) => {
520
- try {
521
- const base64 = value.replaceAll("-", "+").replaceAll("_", "/");
522
- const binary = atob(base64.padEnd(Math.ceil(base64.length / 4) * 4, "="));
523
- return new TextDecoder(void 0, { fatal: true }).decode(Uint8Array.from(binary, (character) => character.charCodeAt(0)));
524
- } catch {
525
- return null;
526
- }
527
- };
528
- var parseStorageDownloadPath = (path) => {
529
- const match = /^\/storage\/([^/]+)\/([^/]+)$/.exec(path);
530
- if (!match) return null;
531
- const storageUri = decodeBase64Url(match[1]);
532
- if (storageUri === null) return null;
533
- try {
534
- return {
535
- signature: decodeURIComponent(match[2]),
536
- storageUri
537
- };
538
- } catch {
539
- return null;
540
- }
541
- };
542
519
  var DatabaseConstraintError = class extends Error {
543
520
  reason;
544
521
  model;
@@ -3134,7 +3111,7 @@ var createEngine = (database, { plugins = [], now = Date.now } = {}) => {
3134
3111
  dispose: () => engine.dispose()
3135
3112
  };
3136
3113
  };
3137
- var HOT_UPDATER_SERVER_VERSION = "1.0.0-rc.42";
3114
+ var HOT_UPDATER_SERVER_VERSION = "1.0.0-rc.44";
3138
3115
  /**
3139
3116
  * `/version` on both mounts. The admin mount also lists the ids of the
3140
3117
  * plugins the server runs, sorted; apps never learn which plugins a server
@@ -4904,10 +4881,42 @@ var ORIGIN_CACHE_MAX_ENTRIES = 128;
4904
4881
  var NO_CATALOG_HEADER = "x-hot-updater-catalog";
4905
4882
  /** A shared cache keeps a catalog, or a scope's lack of one, five seconds. */
4906
4883
  var CATALOG_CACHE_CONTROL = "public, max-age=0, s-maxage=5";
4884
+ /**
4885
+ * The same five seconds for a CDN that reads `CDN-Cache-Control` (RFC 9213),
4886
+ * such as Cloudflare's Workers Cache, which then ignores `Cache-Control`.
4887
+ * `s-maxage` forbids serving stale, so there an expired catalog held requests
4888
+ * at that location until the origin answered. Here, for five more seconds,
4889
+ * the CDN answers with the expired copy while it revalidates in the
4890
+ * background. `stale-if-error=0` keeps origin errors visible: without it,
4891
+ * Cloudflare serves a stale copy on error indefinitely.
4892
+ *
4893
+ * A device can see a catalog up to 15 seconds after a deploy or a Roll back
4894
+ * replaced it: the origin's 5-second catalog memo, then 5 seconds fresh and
4895
+ * 5 stale at the CDN. A revoked API key can read a cached catalog up to
4896
+ * 10 seconds. Devices and caches that don't read the header keep
4897
+ * `Cache-Control`.
4898
+ */
4899
+ var CATALOG_CDN_CACHE_CONTROL = "public, max-age=5, stale-while-revalidate=5, stale-if-error=0";
4907
4900
  var privateNotFound = () => Response.json({ error: "Not found" }, {
4908
4901
  status: 404,
4909
4902
  headers: { "cache-control": "private, no-store" }
4910
4903
  });
4904
+ var badRequest = (error) => Response.json({ error }, {
4905
+ status: 400,
4906
+ headers: { "cache-control": "private, no-store" }
4907
+ });
4908
+ /**
4909
+ * A 400 for a catalog path whose scope is malformed, such as a channel name
4910
+ * where its base64url key belongs; null for a well-formed scope.
4911
+ */
4912
+ var invalidScope = (input) => {
4913
+ try {
4914
+ createReleaseCatalogScopeKey(input);
4915
+ return null;
4916
+ } catch (error) {
4917
+ return badRequest(error instanceof Error ? error.message : "Invalid Release Catalog scope");
4918
+ }
4919
+ };
4911
4920
  /**
4912
4921
  * A scope with no catalog yet, such as a store version before its first
4913
4922
  * OTA release: cached like a catalog, so its update checks don't all reach
@@ -4919,6 +4928,7 @@ var missingCatalog = () => Response.json({ error: "Not found" }, {
4919
4928
  status: 404,
4920
4929
  headers: {
4921
4930
  "cache-control": CATALOG_CACHE_CONTROL,
4931
+ "cdn-cache-control": CATALOG_CDN_CACHE_CONTROL,
4922
4932
  vary: "Accept-Encoding",
4923
4933
  [NO_CATALOG_HEADER]: "none"
4924
4934
  }
@@ -4933,6 +4943,7 @@ var catalogResponse = async (catalog, request) => {
4933
4943
  const etag = `"sha256:${await responseHash(body)}"`;
4934
4944
  const headers = {
4935
4945
  "cache-control": CATALOG_CACHE_CONTROL,
4946
+ "cdn-cache-control": CATALOG_CDN_CACHE_CONTROL,
4936
4947
  "content-type": CATALOG_CONTENT_TYPE,
4937
4948
  etag,
4938
4949
  vary: "Accept-Encoding"
@@ -4984,16 +4995,15 @@ var createReleaseCatalogRouteHandlers = () => {
4984
4995
  appVersionReleaseCatalog: async (params, request, { core }) => {
4985
4996
  const rawAppVersion = requireRouteParam(params, "appVersion");
4986
4997
  const appVersion = canonicalizeAppVersion(rawAppVersion);
4987
- if (appVersion === null || appVersion !== rawAppVersion) return Response.json({ error: "Invalid app version" }, {
4988
- status: 400,
4989
- headers: { "cache-control": "private, no-store" }
4990
- });
4998
+ if (appVersion === null || appVersion !== rawAppVersion) return badRequest("Invalid app version");
4991
4999
  const input = {
4992
5000
  appVersion,
4993
5001
  channelKey: requireRouteParam(params, "channelKey"),
4994
5002
  platform: requirePlatformParam(params),
4995
5003
  strategy: "APP_VERSION"
4996
5004
  };
5005
+ const invalid = invalidScope(input);
5006
+ if (invalid) return invalid;
4997
5007
  return catalogResponse(await loadCatalog(`app-version:${JSON.stringify(input)}`, () => core.getReleaseCatalog(input)), request);
4998
5008
  },
4999
5009
  fingerprintReleaseCatalog: async (params, request, { core }) => {
@@ -5003,6 +5013,8 @@ var createReleaseCatalogRouteHandlers = () => {
5003
5013
  platform: requirePlatformParam(params),
5004
5014
  strategy: "FINGERPRINT"
5005
5015
  };
5016
+ const invalid = invalidScope(input);
5017
+ if (invalid) return invalid;
5006
5018
  return catalogResponse(await loadCatalog(`fingerprint:${JSON.stringify(input)}`, () => core.getReleaseCatalog(input)), request);
5007
5019
  },
5008
5020
  artifactV1: async (params, _request, { core }) => {
@@ -5080,8 +5092,8 @@ var errorResponse = (error, status) => Response.json({ error }, {
5080
5092
  headers: { "cache-control": "private, no-store" },
5081
5093
  status
5082
5094
  });
5083
- /** `/version` and storage downloads never pass through the client policy. */
5084
- var PUBLIC_CLIENT_ROUTES = /* @__PURE__ */ new Set(["version", "downloadStorageObject"]);
5095
+ /** `/version` never passes through the client policy. */
5096
+ var PUBLIC_CLIENT_ROUTES = /* @__PURE__ */ new Set(["version"]);
5085
5097
  var routesOf = Symbol.for("@hot-updater/server/routes");
5086
5098
  var withVary = (response, varyHeaders) => {
5087
5099
  const cacheControl = response.headers.get("cache-control") ?? "";
@@ -5126,26 +5138,11 @@ var createRequestHandler = ({ api, clientPolicy, privateResponses = false, route
5126
5138
  });
5127
5139
  }
5128
5140
  };
5129
- var createDownloadStorageRouteHandler = (downloadStorageObject) => async (params) => {
5130
- const token = params.token;
5131
- const signature = params.signature;
5132
- if (!token || !signature) return errorResponse("Not found", 404);
5133
- const response = await downloadStorageObject(token, signature);
5134
- if (!response) return errorResponse("Not found", 404);
5135
- const headers = new Headers(response.headers);
5136
- if (!headers.has("cache-control")) headers.set("cache-control", "public, max-age=31536000, immutable");
5137
- return new Response(response.body, {
5138
- headers,
5139
- status: response.status,
5140
- statusText: response.statusText
5141
- });
5142
- };
5143
- function createHotUpdaterHandlers({ api, clientPolicy, downloadStorageObject, endpoints = [], plugins = [] }) {
5141
+ function createHotUpdaterHandlers({ api, clientPolicy, endpoints = [], plugins = [] }) {
5144
5142
  const routeHandlers = {
5145
5143
  ...createVersionRouteHandlers(plugins),
5146
5144
  ...createReleaseCatalogRouteHandlers(),
5147
- ...createAdminRouteHandlers(),
5148
- ...downloadStorageObject === void 0 ? {} : { downloadStorageObject: createDownloadStorageRouteHandler(downloadStorageObject) }
5145
+ ...createAdminRouteHandlers()
5149
5146
  };
5150
5147
  const routes = [];
5151
5148
  const shapes = /* @__PURE__ */ new Map();
@@ -5164,7 +5161,6 @@ function createHotUpdaterHandlers({ api, clientPolicy, downloadStorageObject, en
5164
5161
  const clientRouter = createRouter();
5165
5162
  const addClientRoute = mount(clientRouter, false);
5166
5163
  addClientRoute("GET", "/version", "version");
5167
- if (downloadStorageObject !== void 0) addClientRoute("GET", "/storage/:token/:signature", "downloadStorageObject");
5168
5164
  addClientRoute("GET", "/release-catalogs/app-version/:platform/:channelKey/:appVersion", "appVersionReleaseCatalog");
5169
5165
  addClientRoute("GET", "/release-catalogs/fingerprint/:platform/:channelKey/:fingerprintHash", "fingerprintReleaseCatalog");
5170
5166
  addClientRoute("GET", "/artifacts/v1/:targetBundleId/from/:currentBundleId", "artifactV1");
@@ -5194,33 +5190,23 @@ function createHotUpdaterHandlers({ api, clientPolicy, downloadStorageObject, en
5194
5190
  Object.defineProperty(handlers, routesOf, { value: Object.freeze(routes) });
5195
5191
  return Object.freeze(handlers);
5196
5192
  }
5193
+ /** A URL devices download from, which only an absolute HTTP(S) URL can be. */
5197
5194
  var assertRemoteUrl = (value) => {
5198
- const protocol = new URL(value).protocol;
5199
- if (protocol !== "http:" && protocol !== "https:") throw new Error("Storage getDownloadUrl must resolve to an HTTP(S) URL.");
5195
+ let protocol;
5196
+ try {
5197
+ protocol = new URL(value).protocol;
5198
+ } catch {}
5199
+ if (protocol !== "http:" && protocol !== "https:") throw new Error("Storage getDownloadUrl must resolve to an absolute HTTP(S) URL.");
5200
5200
  return value;
5201
5201
  };
5202
5202
  var getStorageProtocol = (storageUri) => new URL(storageUri).protocol.replace(":", "");
5203
5203
  var isRemoteUrlProtocol = (protocol) => protocol === "http" || protocol === "https";
5204
- var resolveDownloadPath = (value, storageUri) => {
5205
- const parsed = parseStorageDownloadPath(value);
5206
- if (!parsed || parsed.storageUri !== storageUri) throw new Error("Storage getDownloadUrl must return an HTTP(S) URL or a valid storage download path.");
5207
- return value;
5208
- };
5209
- var tokensEqual = (left, right) => {
5210
- const leftBytes = new TextEncoder().encode(left);
5211
- const rightBytes = new TextEncoder().encode(right);
5212
- let difference = leftBytes.length ^ rightBytes.length;
5213
- const length = Math.max(leftBytes.length, rightBytes.length);
5214
- for (let index = 0; index < length; index += 1) difference |= (leftBytes[index] ?? 0) ^ (rightBytes[index] ?? 0);
5215
- return difference === 0;
5216
- };
5217
- var createStorageAccess = (storageAdapters) => {
5218
- const protocols = /* @__PURE__ */ new Set();
5219
- for (const storage of storageAdapters) {
5220
- if (protocols.has(storage.protocol)) throw new Error(`Multiple storage adapters handle protocol: ${storage.protocol}`);
5221
- protocols.add(storage.protocol);
5222
- }
5223
- const findStorage = (protocol) => storageAdapters.find((item) => item.protocol === protocol);
5204
+ /**
5205
+ * Reads and download URLs over the server's storage, for the URIs of its
5206
+ * protocol; an HTTP(S) URI is used as it is.
5207
+ */
5208
+ var createStorageAccess = (storageAdapter) => {
5209
+ const findStorage = (protocol) => storageAdapter.protocol === protocol ? storageAdapter : void 0;
5224
5210
  const readStorageResponse = async (storageUri) => {
5225
5211
  const protocol = getStorageProtocol(storageUri);
5226
5212
  const storage = findStorage(protocol);
@@ -5244,38 +5230,12 @@ var createStorageAccess = (storageAdapters) => {
5244
5230
  }
5245
5231
  if (!storage.getDownloadUrl) return null;
5246
5232
  const { url: downloadUrl } = await storage.getDownloadUrl({ storageUri });
5247
- try {
5248
- return assertRemoteUrl(downloadUrl);
5249
- } catch (error) {
5250
- if (/^[a-z][a-z\d+.-]*:/i.test(downloadUrl)) throw error;
5251
- }
5252
- return resolveDownloadPath(downloadUrl, storageUri);
5233
+ return assertRemoteUrl(downloadUrl);
5253
5234
  };
5254
5235
  const readStorageText = async (storageUri) => {
5255
5236
  return (await readStorageResponse(storageUri))?.text() ?? null;
5256
5237
  };
5257
5238
  return {
5258
- downloadStorageObject: storageAdapters.some((storage) => storage.getDownloadUrl !== void 0) ? async (storageUriToken, encodedSignature) => {
5259
- const requestedPath = `/storage/${storageUriToken}/${encodedSignature}`;
5260
- const requested = parseStorageDownloadPath(requestedPath);
5261
- if (!requested) return null;
5262
- let storage;
5263
- try {
5264
- storage = findStorage(getStorageProtocol(requested.storageUri));
5265
- } catch {
5266
- return null;
5267
- }
5268
- if (!storage?.getDownloadUrl || !storage.get) return null;
5269
- const { url: downloadUrl } = await storage.getDownloadUrl({ storageUri: requested.storageUri });
5270
- try {
5271
- new URL(downloadUrl);
5272
- return null;
5273
- } catch {
5274
- if (/^[a-z][a-z\d+.-]*:/i.test(downloadUrl)) return null;
5275
- }
5276
- if (!tokensEqual(downloadUrl, requestedPath)) return null;
5277
- return (await storage.get({ storageUri: requested.storageUri })).response;
5278
- } : void 0,
5279
5239
  readStorageText,
5280
5240
  resolveFileUrl
5281
5241
  };
@@ -5295,17 +5255,21 @@ var databaseOf = (value) => {
5295
5255
  }
5296
5256
  throw new HotUpdaterConfigError("database must be a Hot Updater 1.0 database, such as kyselyAdapter(...) or postgres(...). Upgrade the provider package that created it.");
5297
5257
  };
5298
- /** `"public"`, or nothing; a `clientAccess` object says what replaced it. */
5258
+ /** The configured storage, when it is a storage adapter. */
5259
+ var storageOf = (value) => {
5260
+ if (isRecord(value) && typeof value.name === "string" && typeof value.protocol === "string") return value;
5261
+ throw new HotUpdaterConfigError("storage must be a storage adapter, such as s3Storage(...): the one hot-updater.config.ts uploads with.");
5262
+ };
5263
+ /** `"public"`, or nothing. */
5299
5264
  var isPublic = (value) => {
5300
5265
  if (value === void 0) return false;
5301
5266
  if (value === "public") return true;
5302
- throw new HotUpdaterConfigError(isRecord(value) ? "clientAccess objects were removed in 1.0. Set clientAccess: \"public\", or add a plugin that provides clientAuth to plugins." : "clientAccess must be \"public\"; to protect client routes, add a plugin that provides clientAuth to plugins.");
5267
+ throw new HotUpdaterConfigError("clientAccess must be \"public\"; to protect client routes, add a plugin that provides clientAuth to plugins.");
5303
5268
  };
5304
5269
  function createHotUpdater(options) {
5305
- for (const key of ["authorityId", "catalogId"]) if (Object.hasOwn(options, key)) throw new TypeError(`Remove ${key} from createHotUpdater options. Catalog identity is managed internally.`);
5306
5270
  const database = databaseOf(options.database);
5307
- const storage = Object.freeze([...options.storage ?? []]);
5308
- const { downloadStorageObject, readStorageText, resolveFileUrl } = createStorageAccess(storage);
5271
+ const storage = storageOf(options.storage);
5272
+ const { readStorageText, resolveFileUrl } = createStorageAccess(storage);
5309
5273
  const publicClients = isPublic(options.clientAccess);
5310
5274
  const configured = Object.freeze([...options.plugins ?? []]);
5311
5275
  const plugins = assemblePlugins(configured, database, { storage: {
@@ -5324,7 +5288,6 @@ function createHotUpdater(options) {
5324
5288
  const handlers = createHotUpdaterHandlers({
5325
5289
  api: { core: plugins.core },
5326
5290
  ...clientPolicy === void 0 ? {} : { clientPolicy },
5327
- downloadStorageObject,
5328
5291
  endpoints: plugins.endpoints,
5329
5292
  plugins: Object.keys(plugins.api)
5330
5293
  });
@@ -5333,7 +5296,7 @@ function createHotUpdater(options) {
5333
5296
  adapterName: database.name,
5334
5297
  get handlers() {
5335
5298
  if (!serving) {
5336
- for (const adapter of storage) assertStorageOperations(adapter, ["get", "getDownloadUrl"]);
5299
+ assertStorageOperations(storage, ["get", "getDownloadUrl"]);
5337
5300
  serving = true;
5338
5301
  }
5339
5302
  return handlers;
@@ -5365,7 +5328,7 @@ function createHotUpdater(options) {
5365
5328
  */
5366
5329
  var assemble = (database, storage, plugins) => createHotUpdater({
5367
5330
  database,
5368
- storage: [storage],
5331
+ storage,
5369
5332
  plugins,
5370
5333
  ...plugins.some((plugin) => plugin.provides?.clientAuth) ? {} : { clientAccess: "public" }
5371
5334
  });
@@ -5386,7 +5349,7 @@ var resolveConsoleConfig = async (request) => {
5386
5349
  ...gitUrl,
5387
5350
  database,
5388
5351
  core: database.core,
5389
- storage: [storage],
5352
+ storage,
5390
5353
  plugins: checked.plugins
5391
5354
  };
5392
5355
  }
@@ -5395,7 +5358,7 @@ var resolveConsoleConfig = async (request) => {
5395
5358
  ...gitUrl,
5396
5359
  database,
5397
5360
  core: server.core,
5398
- storage: server.storage,
5361
+ storage,
5399
5362
  plugins: server.plugins,
5400
5363
  api: server.api
5401
5364
  };
@@ -1,6 +1,6 @@
1
- import { r as getRequest } from "./server-BSh-RXFr.mjs";
2
- import { requireConsoleAccess, t as resolveConsoleConfig } from "./auth.server-Dz4Rpft1.mjs";
3
- //#region node_modules/.nitro/vite/services/ssr/assets/config.server-DKB0zVoy.js
1
+ import { r as getRequest } from "./server-DBgxQIeE.mjs";
2
+ import { requireConsoleAccess, t as resolveConsoleConfig } from "./auth.server-CftUlVI0.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/config.server-DKKxOk0p.js
4
4
  var configPromise = null;
5
5
  var core = null;
6
6
  var runtime = null;
@@ -17,7 +17,7 @@ var prepareConfig = async (request = getRequest()) => {
17
17
  const config = await loadCachedConfig(request);
18
18
  core ??= config.core;
19
19
  if (!runtime) {
20
- const { createConsoleRuntime } = await import("./runtime.server-BoE9GFjQ.mjs");
20
+ const { createConsoleRuntime } = await import("./runtime.server-DLrq5UBB.mjs");
21
21
  runtime = createConsoleRuntime(config);
22
22
  }
23
23
  return {
@@ -1,5 +1,5 @@
1
1
  import { c as createMiddleware } from "./createMiddleware-Cm6Tn0_Y.mjs";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/console-access-7nM186dS.js
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/console-access-BGqx9nA9.js
3
3
  /**
4
4
  * Refuses a caller the console does not authorize before a server function
5
5
  * reads its input. TanStack Start runs a function's middleware before the
@@ -9,7 +9,7 @@ import { c as createMiddleware } from "./createMiddleware-Cm6Tn0_Y.mjs";
9
9
  * `console-access.spec.ts` checks that.
10
10
  */
11
11
  var consoleAccess = createMiddleware({ type: "function" }).server(async ({ next }) => {
12
- const [{ getRequest }, { requireConsoleAccess }] = await Promise.all([import("./server-BSh-RXFr.mjs").then((n) => n.t), import("./auth.server-Dz4Rpft1.mjs")]);
12
+ const [{ getRequest }, { requireConsoleAccess }] = await Promise.all([import("./server-DBgxQIeE.mjs").then((n) => n.t), import("./auth.server-CftUlVI0.mjs")]);
13
13
  await requireConsoleAccess(getRequest());
14
14
  return next();
15
15
  });
@@ -1,10 +1,10 @@
1
1
  import { u as createServerFn } from "./createMiddleware-Cm6Tn0_Y.mjs";
2
- import { t as consoleAccess } from "./console-access-7nM186dS.mjs";
3
- import { A as createSsrRpc } from "./sidebar-CccTzdeH.mjs";
2
+ import { t as consoleAccess } from "./console-access-BGqx9nA9.mjs";
3
+ import { A as createSsrRpc } from "./sidebar-CQn_ksV8.mjs";
4
4
  import { i as useQuery, r as queryOptions } from "../_libs/tanstack__react-query.mjs";
5
5
  import { n as consoleFeatures } from "./console-features-Oz0q20jJ.mjs";
6
6
  import { _ as notFound } from "../_libs/@tanstack/react-router+[...].mjs";
7
- //#region node_modules/.nitro/vite/services/ssr/assets/console-features-api-ByV75tIr.js
7
+ //#region node_modules/.nitro/vite/services/ssr/assets/console-features-api-D3dSwBFb.js
8
8
  /** The features this console serves, for navigation and route guards. */
9
9
  var getConsoleFeaturesRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).handler(createSsrRpc("82ec3500e57f9e81dac6d3f3a7bd9e34915da3121429beec87b7ad153dc6eafe"));
10
10
  var consoleFeaturesQueryKey = ["console", "features"];
@@ -1,14 +1,14 @@
1
1
  import { u as createServerFn } from "./createMiddleware-Cm6Tn0_Y.mjs";
2
- import { t as consoleAccess } from "./console-access-7nM186dS.mjs";
2
+ import { t as consoleAccess } from "./console-access-BGqx9nA9.mjs";
3
3
  import { t as createServerRpc } from "./createServerRpc-RLR4H-Fn.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/console-features-rpc-DvdWiTpJ.js
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/console-features-rpc-DlmjEgPo.js
5
5
  var getConsoleFeaturesRpc_createServerFn_handler = createServerRpc({
6
6
  id: "82ec3500e57f9e81dac6d3f3a7bd9e34915da3121429beec87b7ad153dc6eafe",
7
7
  name: "getConsoleFeaturesRpc",
8
8
  filename: "src/lib/console-features-rpc.ts"
9
9
  }, (opts) => getConsoleFeaturesRpc.__executeServer(opts));
10
10
  var getConsoleFeaturesRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).handler(getConsoleFeaturesRpc_createServerFn_handler, async () => {
11
- const { prepareConfig } = await import("./config.server-DKB0zVoy.mjs");
11
+ const { prepareConfig } = await import("./config.server-DKKxOk0p.mjs");
12
12
  const { runtime } = await prepareConfig();
13
13
  return {
14
14
  features: await runtime.features(),
@@ -1,7 +1,7 @@
1
1
  import "../_runtime.mjs";
2
2
  import { $ as DialogPopup, Q as DialogPortal$1, X as DialogTitle$1, Y as DialogTrigger$1, Z as DialogRoot, _t as require_react, et as DialogDescription$1, gt as require_jsx_runtime, nt as DialogBackdrop, tt as DialogClose } from "../_libs/@base-ui/react+[...].mjs";
3
3
  import { t as X } from "../_libs/lucide-react.mjs";
4
- import { k as cn, t as Button$1 } from "./sidebar-CccTzdeH.mjs";
4
+ import { k as cn, t as Button$1 } from "./sidebar-CQn_ksV8.mjs";
5
5
  require_react();
6
6
  var import_jsx_runtime = require_jsx_runtime();
7
7
  function Dialog$1({ ...props }) {
@@ -1,10 +1,10 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/downloadBundle-DViuIa9U.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/downloadBundle-CZysjmNW.js
2
2
  var downloadBundle = async (bundleId, { core, storage }) => {
3
3
  const detail = await core.getBundle(bundleId);
4
4
  if (!detail) return new Response("Bundle not found", { status: 404 });
5
5
  const storageUri = detail.bundle.manifest_storage_uri;
6
6
  const protocol = new URL(storageUri).protocol.replace(":", "");
7
- const storageAdapter = storage.find((adapter) => adapter.protocol === protocol);
7
+ const storageAdapter = storage.protocol === protocol ? storage : void 0;
8
8
  if (storageAdapter?.get !== void 0) {
9
9
  const { response } = await storageAdapter.get({ storageUri });
10
10
  if (!response) return new Response("Storage object not found", { status: 404 });
@@ -1,7 +1,7 @@
1
1
  import { gt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
2
  import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
3
- import { k as cn } from "./sidebar-CccTzdeH.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/empty-BS98wFpp.js
3
+ import { k as cn } from "./sidebar-CQn_ksV8.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/empty-IxfzBAbK.js
5
5
  var import_jsx_runtime = require_jsx_runtime();
6
6
  function Empty({ className, ...props }) {
7
7
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
@@ -1,8 +1,8 @@
1
1
  import { i as __toESM } from "../_runtime.mjs";
2
2
  import { _t as require_react, gt as require_jsx_runtime, ht as mergeProps, rt as useRender } from "../_libs/@base-ui/react+[...].mjs";
3
3
  import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
4
- import { k as cn } from "./sidebar-CccTzdeH.mjs";
5
- //#region node_modules/.nitro/vite/services/ssr/assets/field-ClP2NfeY.js
4
+ import { k as cn } from "./sidebar-CQn_ksV8.mjs";
5
+ //#region node_modules/.nitro/vite/services/ssr/assets/field-CAk8Po6G.js
6
6
  var import_react = /* @__PURE__ */ __toESM(require_react());
7
7
  var import_jsx_runtime = require_jsx_runtime();
8
8
  function Card({ className, ...props }) {
@@ -1,7 +1,7 @@
1
1
  import "../_runtime.mjs";
2
2
  import { _t as require_react, gt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
3
  import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
4
- import { k as cn, n as Input, t as Button$1 } from "./sidebar-CccTzdeH.mjs";
4
+ import { k as cn, n as Input, t as Button$1 } from "./sidebar-CQn_ksV8.mjs";
5
5
  require_react();
6
6
  var import_jsx_runtime = require_jsx_runtime();
7
7
  function Textarea({ className, ...props }) {
@@ -1,5 +1,5 @@
1
- import { t as ConsoleFeatureUnavailable } from "./ConsoleFeatureUnavailable-BhEUVD0N.mjs";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/insights-zid4wKIi.js
1
+ import { t as ConsoleFeatureUnavailable } from "./ConsoleFeatureUnavailable-CXdtdnY7.mjs";
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/insights-BOlIwjER.js
3
3
  var SplitNotFoundComponent = ConsoleFeatureUnavailable;
4
4
  //#endregion
5
5
  export { SplitNotFoundComponent as notFoundComponent };
@@ -1,34 +1,34 @@
1
1
  import { i as __toESM } from "../_runtime.mjs";
2
2
  import { u as createServerFn } from "./createMiddleware-Cm6Tn0_Y.mjs";
3
- import { t as consoleAccess } from "./console-access-7nM186dS.mjs";
3
+ import { t as consoleAccess } from "./console-access-BGqx9nA9.mjs";
4
4
  import { C as ScrollAreaScrollbar, S as ScrollAreaThumb, T as ScrollAreaRoot, _ as ComboboxList$1, _t as require_react, b as ComboboxTrigger$1, d as ComboboxRoot, f as ComboboxEmpty$1, g as ComboboxPortal, gt as require_jsx_runtime, h as ComboboxPositioner, m as ComboboxPopup, p as ComboboxItem$1, u as ComboboxItemIndicator, v as ComboboxClear$1, w as ScrollAreaViewport, x as ScrollAreaCorner, y as ComboboxInput$1 } from "../_libs/@base-ui/react+[...].mjs";
5
5
  import { E as List, G as Check, H as ChevronRight, I as Copy, W as ChevronDown, X as ArrowUpRight, Z as ArrowRight, g as RefreshCw, h as RotateCcw, i as TriangleAlert, m as RotateCw, r as Undo2, t as X } from "../_libs/lucide-react.mjs";
6
- import { A as createSsrRpc, C as Skeleton, O as buttonVariants, a as SheetContent, c as SheetTitle, i as Sheet, k as cn, l as SheetTrigger, n as Input, o as SheetDescription, r as Separator$1, s as SheetHeader, t as Button$1 } from "./sidebar-CccTzdeH.mjs";
7
- import { a as Badge, c as CardDescription, d as CardTitle, f as Field, g as FieldLabel, h as FieldGroup, i as AlertTitle, l as CardFooter, o as Card, r as AlertDescription, s as CardContent, t as Alert, u as CardHeader } from "./field-ClP2NfeY.mjs";
8
- import { a as AlertDialogDescription, i as AlertDialogContent, l as AlertDialogTitle, n as AlertDialogAction, o as AlertDialogFooter, r as AlertDialogCancel, s as AlertDialogHeader, t as AlertDialog$1 } from "./alert-dialog-C0iIUTGF.mjs";
9
- import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell, t as Table } from "./table-DqLKGXY2.mjs";
6
+ import { A as createSsrRpc, C as Skeleton, O as buttonVariants, a as SheetContent, c as SheetTitle, i as Sheet, k as cn, l as SheetTrigger, n as Input, o as SheetDescription, r as Separator$1, s as SheetHeader, t as Button$1 } from "./sidebar-CQn_ksV8.mjs";
7
+ import { a as Badge, c as CardDescription, d as CardTitle, f as Field, g as FieldLabel, h as FieldGroup, i as AlertTitle, l as CardFooter, o as Card, r as AlertDescription, s as CardContent, t as Alert, u as CardHeader } from "./field-CAk8Po6G.mjs";
8
+ import { a as AlertDialogDescription, i as AlertDialogContent, l as AlertDialogTitle, n as AlertDialogAction, o as AlertDialogFooter, r as AlertDialogCancel, s as AlertDialogHeader, t as AlertDialog$1 } from "./alert-dialog-DiNl2zyc.mjs";
9
+ import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell, t as Table } from "./table-CAbD28jq.mjs";
10
10
  import { a as useQueries, i as useQuery, s as useQueryClient } from "../_libs/tanstack__react-query.mjs";
11
11
  import { n as toast } from "../_libs/sonner.mjs";
12
12
  import { h as Link } from "../_libs/@tanstack/react-router+[...].mjs";
13
- import { i as EmptyHeader, n as EmptyContent, o as EmptyTitle, r as EmptyDescription, t as Empty } from "./empty-BS98wFpp.mjs";
13
+ import { i as EmptyHeader, n as EmptyContent, o as EmptyTitle, r as EmptyDescription, t as Empty } from "./empty-IxfzBAbK.mjs";
14
14
  import { r as recoveryWindows, t as insightsPeriodEnd } from "./insights-recovery-BWQhiZaF.mjs";
15
15
  import { a as failureReasonLabel, i as failureRate, o as failureStageLabel, r as failureDetailParts, s as formatRate, t as checkFailureRate } from "./insights-failures-xaa41Buf.mjs";
16
16
  import { t as groupFailureReports } from "./insights-errors-BjnFUyZj.mjs";
17
17
  import { n as usageMetrics } from "./insights-usage-BpBM0U0c.mjs";
18
18
  import { a as readBundleEventsInput, i as readAdoptionReleasesInput, n as crashRateOf, o as recommendsRollback, r as readAdoptionReleaseInput, t as CRASH_RATE_THRESHOLD } from "./release-adoption-005tQRpo.mjs";
19
- import { i as useFailureReportsQuery, l as useInsightsRetention, r as keepsTwelveMonths, t as DEFAULT_INSIGHTS_RETENTION, u as useUpdateFailuresQuery } from "./insights-api-KhSyJHeB.mjs";
20
- import { r as comparedBundleIds, t as InsightsInfo } from "./InsightsInfo-Dg6i_faE.mjs";
21
- import { t as Route } from "./insights-enlqIb7I.mjs";
22
- import { i as TabsTrigger, n as TabsContent, r as TabsList, t as Tabs$1 } from "./tabs-OurD9NcW.mjs";
23
- import { a as SelectItem, i as SelectGroup, n as Select$1, o as SelectTrigger, r as SelectContent, s as SelectValue, t as PlatformIcon } from "./select-DsHYxL5J.mjs";
24
- import { i as InputGroupInput, n as InputGroupAddon, r as InputGroupButton, t as InputGroup } from "./input-group-CQF02dST.mjs";
25
- import { i as useChannelsQuery, l as usePreflightReleaseMutation, m as useUpdateReleaseMutation } from "./api-B2kX4vkQ.mjs";
26
- import { t as BundleIdDisplay } from "./BundleIdDisplay-DY9dMdTi.mjs";
27
- import { n as getAppUsageReportRpc, t as Progress$1 } from "./insights-usage-rpc-CLlatFXW.mjs";
28
- import { i as InsightsPeriodSelector, n as InsightsErrorAlert, o as UsagePeriodSelector, r as InsightsPageHeader } from "./InsightsPageHeader-TG_4uP-s.mjs";
29
- import { i as HttpResponseBody, n as EventTimestamp, o as useInsightsTimeFormat, t as EventBundleTransition } from "./EventDetails-BkjZNwdv.mjs";
19
+ import { i as useFailureReportsQuery, l as useInsightsRetention, r as keepsTwelveMonths, t as DEFAULT_INSIGHTS_RETENTION, u as useUpdateFailuresQuery } from "./insights-api-BujwgqiF.mjs";
20
+ import { r as comparedBundleIds, t as InsightsInfo } from "./InsightsInfo-i8nqiI4p.mjs";
21
+ import { t as Route } from "./insights-TfCZijVT.mjs";
22
+ import { i as TabsTrigger, n as TabsContent, r as TabsList, t as Tabs$1 } from "./tabs-CcoEXc6t.mjs";
23
+ import { a as SelectItem, i as SelectGroup, n as Select$1, o as SelectTrigger, r as SelectContent, s as SelectValue, t as PlatformIcon } from "./select-DPTLkWdD.mjs";
24
+ import { i as InputGroupInput, n as InputGroupAddon, r as InputGroupButton, t as InputGroup } from "./input-group-C8xGutM-.mjs";
25
+ import { i as useChannelsQuery, l as usePreflightReleaseMutation, m as useUpdateReleaseMutation } from "./api-yMNlDDQz.mjs";
26
+ import { t as BundleIdDisplay } from "./BundleIdDisplay-DmwFwFig.mjs";
27
+ import { n as getAppUsageReportRpc, t as Progress$1 } from "./insights-usage-rpc-Dd6LuAuP.mjs";
28
+ import { i as InsightsPeriodSelector, n as InsightsErrorAlert, o as UsagePeriodSelector, r as InsightsPageHeader } from "./InsightsPageHeader-ASTSUdCJ.mjs";
29
+ import { i as HttpResponseBody, n as EventTimestamp, o as useInsightsTimeFormat, t as EventBundleTransition } from "./EventDetails-BRHWr0y4.mjs";
30
30
  import { a as CartesianGrid, i as Line, l as ResponsiveContainer, n as YAxis, o as ReferenceLine, r as XAxis, s as Tooltip, t as LineChart } from "../_libs/recharts+[...].mjs";
31
- //#region node_modules/.nitro/vite/services/ssr/assets/insights-DYoZiNZd.js
31
+ //#region node_modules/.nitro/vite/services/ssr/assets/insights-CiMMDBOR.js
32
32
  var import_react = /* @__PURE__ */ __toESM(require_react());
33
33
  var import_jsx_runtime = require_jsx_runtime();
34
34
  var THEMES = {
@@ -1,9 +1,9 @@
1
1
  import { f as lazyRouteComponent, p as createFileRoute } from "../_libs/@tanstack/react-router+[...].mjs";
2
- import { r as requireConsoleFeature } from "./console-features-api-ByV75tIr.mjs";
3
- import { a as validateInsightsSearch } from "./InsightsInfo-Dg6i_faE.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/insights-enlqIb7I.js
5
- var $$splitComponentImporter = () => import("./insights-DYoZiNZd.mjs");
6
- var $$splitNotFoundComponentImporter = () => import("./insights-zid4wKIi.mjs");
2
+ import { r as requireConsoleFeature } from "./console-features-api-D3dSwBFb.mjs";
3
+ import { a as validateInsightsSearch } from "./InsightsInfo-i8nqiI4p.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/insights-TfCZijVT.js
5
+ var $$splitComponentImporter = () => import("./insights-CiMMDBOR.mjs");
6
+ var $$splitNotFoundComponentImporter = () => import("./insights-BOlIwjER.mjs");
7
7
  var Route = createFileRoute("/insights")({
8
8
  beforeLoad: ({ context }) => requireConsoleFeature(context.queryClient, "insightsAnalytics"),
9
9
  notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter, "notFoundComponent"),
@@ -1,10 +1,10 @@
1
1
  import { u as createServerFn } from "./createMiddleware-Cm6Tn0_Y.mjs";
2
- import { t as consoleAccess } from "./console-access-7nM186dS.mjs";
3
- import { A as createSsrRpc } from "./sidebar-CccTzdeH.mjs";
2
+ import { t as consoleAccess } from "./console-access-BGqx9nA9.mjs";
3
+ import { A as createSsrRpc } from "./sidebar-CQn_ksV8.mjs";
4
4
  import { i as useQuery, t as useInfiniteQuery } from "../_libs/tanstack__react-query.mjs";
5
5
  import { c as readUpdateFailuresInput } from "./insights-failures-xaa41Buf.mjs";
6
6
  import { n as readFailureReportsInput } from "./insights-errors-BjnFUyZj.mjs";
7
- //#region node_modules/.nitro/vite/services/ssr/assets/insights-api-KhSyJHeB.js
7
+ //#region node_modules/.nitro/vite/services/ssr/assets/insights-api-BujwgqiF.js
8
8
  var getUpdateFailuresRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator(readUpdateFailuresInput).handler(createSsrRpc("0d1dacdd1e5ee6b100e5c142fb9af03602b6f2c6fe6af79312b36c223d7f8f97"));
9
9
  var listFailureReportsRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator(readFailureReportsInput).handler(createSsrRpc("b4388826a9b515fb4d2113270aa8ded1c50ba13d7f07ac2b268c41396e87d0a3"));
10
10
  /** `insights()`'s defaults, for a server that does not report its periods. */
@@ -1,9 +1,9 @@
1
1
  import { u as createServerFn } from "./createMiddleware-Cm6Tn0_Y.mjs";
2
- import { t as consoleAccess } from "./console-access-7nM186dS.mjs";
2
+ import { t as consoleAccess } from "./console-access-BGqx9nA9.mjs";
3
3
  import { t as createServerRpc } from "./createServerRpc-RLR4H-Fn.mjs";
4
4
  import { c as readUpdateFailuresInput } from "./insights-failures-xaa41Buf.mjs";
5
5
  import { n as readFailureReportsInput } from "./insights-errors-BjnFUyZj.mjs";
6
- //#region node_modules/.nitro/vite/services/ssr/assets/insights-failures-rpc-Cku0ihtu.js
6
+ //#region node_modules/.nitro/vite/services/ssr/assets/insights-failures-rpc-qo3-10sJ.js
7
7
  var getUpdateFailuresRpc_createServerFn_handler = createServerRpc({
8
8
  id: "0d1dacdd1e5ee6b100e5c142fb9af03602b6f2c6fe6af79312b36c223d7f8f97",
9
9
  name: "getUpdateFailuresRpc",
@@ -11,9 +11,9 @@ var getUpdateFailuresRpc_createServerFn_handler = createServerRpc({
11
11
  }, (opts) => getUpdateFailuresRpc.__executeServer(opts));
12
12
  var getUpdateFailuresRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator(readUpdateFailuresInput).handler(getUpdateFailuresRpc_createServerFn_handler, async ({ data }) => {
13
13
  const [{ prepareConfig }, { getUpdateFailuresReport }, { requireFeature }] = await Promise.all([
14
- import("./config.server-DKB0zVoy.mjs"),
14
+ import("./config.server-DKKxOk0p.mjs"),
15
15
  import("./updateFailures-H6pnnYK4.mjs"),
16
- import("./runtime.server-BoE9GFjQ.mjs")
16
+ import("./runtime.server-DLrq5UBB.mjs")
17
17
  ]);
18
18
  const { runtime } = await prepareConfig();
19
19
  return getUpdateFailuresReport(await requireFeature(runtime, "insights"), data);
@@ -25,9 +25,9 @@ var listFailureReportsRpc_createServerFn_handler = createServerRpc({
25
25
  }, (opts) => listFailureReportsRpc.__executeServer(opts));
26
26
  var listFailureReportsRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator(readFailureReportsInput).handler(listFailureReportsRpc_createServerFn_handler, async ({ data }) => {
27
27
  const [{ prepareConfig }, { listFailureReports }, { requireFeature }] = await Promise.all([
28
- import("./config.server-DKB0zVoy.mjs"),
28
+ import("./config.server-DKKxOk0p.mjs"),
29
29
  import("./failureReports-DKDhVsXA.mjs"),
30
- import("./runtime.server-BoE9GFjQ.mjs")
30
+ import("./runtime.server-DLrq5UBB.mjs")
31
31
  ]);
32
32
  const { runtime } = await prepareConfig();
33
33
  return listFailureReports(await requireFeature(runtime, "insights"), data);
@@ -1,8 +1,8 @@
1
1
  import { u as createServerFn } from "./createMiddleware-Cm6Tn0_Y.mjs";
2
- import { t as consoleAccess } from "./console-access-7nM186dS.mjs";
2
+ import { t as consoleAccess } from "./console-access-BGqx9nA9.mjs";
3
3
  import { t as createServerRpc } from "./createServerRpc-RLR4H-Fn.mjs";
4
4
  import { n as readRecoveryInput } from "./insights-recovery-BWQhiZaF.mjs";
5
- //#region node_modules/.nitro/vite/services/ssr/assets/insights-recovery-rpc-DlDSYtAF.js
5
+ //#region node_modules/.nitro/vite/services/ssr/assets/insights-recovery-rpc-CJc-e3aX.js
6
6
  function readBundleActivityInput(inputs) {
7
7
  if (!Array.isArray(inputs) || inputs.length > 20) throw new Error("Choose up to 20 bundles.");
8
8
  return inputs.map((input) => {
@@ -21,9 +21,9 @@ var getBundleActivityRpc_createServerFn_handler = createServerRpc({
21
21
  }, (opts) => getBundleActivityRpc.__executeServer(opts));
22
22
  var getBundleActivityRpc = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator(readBundleActivityInput).handler(getBundleActivityRpc_createServerFn_handler, async ({ data }) => {
23
23
  const [{ prepareConfig }, { getBundleActivity }, { requireFeature }] = await Promise.all([
24
- import("./config.server-DKB0zVoy.mjs"),
24
+ import("./config.server-DKKxOk0p.mjs"),
25
25
  import("./bundleActivity-M5gzBFNg.mjs"),
26
- import("./runtime.server-BoE9GFjQ.mjs")
26
+ import("./runtime.server-DLrq5UBB.mjs")
27
27
  ]);
28
28
  const { runtime } = await prepareConfig();
29
29
  return getBundleActivity(await requireFeature(runtime, "insightsAnalytics"), data);