feat: polish release v2 experience (#6800)

This commit is contained in:
Thomas authored and GitHub committed 2026-09-07 19:17:37 +02:00
1 parent 925b0fb801
commit a4a903d7c3
295 files changed
+10627 -7115

No files matched your search

+4 -3
View File
@@ -13,6 +13,7 @@ import type {
import { createIntegrationRequestHandler } from "./lib/integration-request-handler";
const logger = createLogger({ module: "beszelRequestHandler" });
const MEBIBYTE = 1024 ** 2;
export type { BeszelSystemRow } from "@homarr/integrations/types";
@@ -22,7 +23,7 @@ export type { BeszelSystemRow } from "@homarr/integrations/types";
*
* BeszelSystemInfo uses short field names (see beszel-types.ts for full docs):
* cpu=CPU%, mp=memory%, dp=disk%, g=GPU%, la=loadAvg, u=uptime(s), v=version,
* bb=bandwidth(bytes/s), b=bandwidth(Mbps legacy), dt=disk temp, bat=battery,
* bb=bandwidth(bytes/s), b=bandwidth(MiB/s legacy), dt=disk temp, bat=battery,
* sv=[running,total] services, h=hostname, m=CPU model, c=cores, ct=threads
*/
function mapToSystemRow(system: BeszelSystem, details: BeszelSystemDetails | null): BeszelSystemRow {
@@ -37,8 +38,8 @@ function mapToSystemRow(system: BeszelSystem, details: BeszelSystemDetails | nul
extraFilesystems: info.efs ?? {},
gpu: info.g ?? 0,
loadAvg: info.la ?? null,
// bb = bytes/s (newer), b = Mbps (legacy, multiply to get bytes/s)
netBytes: info.bb ?? (info.b ?? 0) * 1_000_000,
// bb = bytes/s (newer), b = MiB/s (legacy, normalize to bytes/s)
netBytes: info.bb ?? (info.b ?? 0) * MEBIBYTE,
temp: info.dt ?? null,
battery: info.bat ?? null,
services: info.sv?.[0] ?? 0,
@@ -2,6 +2,7 @@ import { createHash } from "node:crypto";
import { serialize } from "superjson";
import { isRecord } from "@homarr/common";
import { createLogger } from "@homarr/core/infrastructure/logs";
import { ErrorWithMetadata } from "@homarr/core/infrastructure/logs/error";
import {
@@ -23,9 +24,6 @@ const SHARED_CACHE_ENVELOPE_VERSION = 2;
const DEFAULT_HANDLER_CACHE_VERSION = "v1";
const namespacePattern = /^[a-z0-9][a-z0-9:-]*$/;
const cacheVersionPattern = /^[a-z0-9][a-z0-9._-]*$/;
const isRecord = (value: unknown): value is Record<string, unknown> =>
value !== null && typeof value === "object" && !Array.isArray(value);
const canonicalize = (value: unknown): unknown => {
if (Array.isArray(value)) return value.map(canonicalize);
if (!isRecord(value)) return value;