refactor: switch to using Bun (#718)

This commit is contained in:
Dan Ditomaso
2025-07-16 22:30:10 -04:00
committed by GitHub
parent acfd7ebd2d
commit 704d06cfe7
401 changed files with 35294 additions and 39107 deletions
+7 -8
View File
@@ -1,7 +1,7 @@
import { z } from "zod/v4";
import { Protobuf } from "@meshtastic/core";
import { makePskHelpers } from "./pskSchema.ts";
import { validateMaxByteLength } from "@core/utils/string.ts";
import { Protobuf } from "@meshtastic/core";
import { z } from "zod/v4";
import { makePskHelpers } from "./pskSchema.ts";
const RoleEnum = z.enum(Protobuf.Channel.Channel_Role);
@@ -19,11 +19,10 @@ export function makeChannelSchema(allowedBytes: number) {
const ChannelSettingsSchema = z.object({
channelNum: z.coerce.number().int().min(0).max(7),
psk: stringSchema(false),
name: z.string()
.refine(
(s) => validateMaxByteLength(s, 12).isValid,
{ message: "formValidation.tooBig.bytes", params: { maximum: 12 } },
),
name: z.string().refine((s) => validateMaxByteLength(s, 12).isValid, {
message: "formValidation.tooBig.bytes",
params: { maximum: 12 },
}),
id: z.coerce.number().int(),
uplinkEnabled: z.boolean(),
downlinkEnabled: z.boolean(),