Execute oxfmt (#1166)

Ran
pnpm oxfmt .

This should get the web repo aligned so that we can better enforce oxfmt going forward.
This commit is contained in:
Austin
2026-06-16 20:30:08 -04:00
committed by GitHub
parent c5690d1edb
commit d2cb51d489
378 changed files with 5548 additions and 1974 deletions
+21 -10
View File
@@ -35,9 +35,13 @@ export function makePskHelpers(allowedByteLengths: readonly number[]) {
const stringSchema = (optional = false) =>
z
.string()
.refine((s) => optional || s !== "" || (s === "" && allowedByteLengths.includes(0)), {
message: msgs.required,
})
.refine(
(s) =>
optional || s !== "" || (s === "" && allowedByteLengths.includes(0)),
{
message: msgs.required,
},
)
.refine((s) => s === "" || tryParse(s) !== null, { message: msgs.format })
.refine((s) => s === "" || isValidString(s), {
message: msgs.length,
@@ -47,13 +51,20 @@ export function makePskHelpers(allowedByteLengths: readonly number[]) {
const bytesSchema = (optional = false): ZodType<Uint8Array> =>
z
.instanceof(Uint8Array)
.refine((arr) => optional || arr.byteLength !== 0 || allowedByteLengths.includes(0), {
message: msgs.required,
})
.refine((arr) => optional || allowedByteLengths.includes(arr.byteLength), {
message: msgs.length,
params: { bits: bitsLabel },
});
.refine(
(arr) =>
optional || arr.byteLength !== 0 || allowedByteLengths.includes(0),
{
message: msgs.required,
},
)
.refine(
(arr) => optional || allowedByteLengths.includes(arr.byteLength),
{
message: msgs.length,
params: { bits: bitsLabel },
},
);
return {
allowedByteLengths,