@gearbox-protocol/cli-utils 5.36.6 → 5.36.7
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
-
export declare const boolLike: z.
|
|
2
|
+
export declare const boolLike: z.ZodPipe<z.ZodAny, z.ZodTransform<boolean, any>>;
|
|
3
3
|
export declare const stringArrayLike: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>]>;
|
|
4
4
|
export declare const optionalStringArrayLike: z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>]>>, z.ZodTransform<string[] | undefined, string[] | undefined>>;
|
|
5
5
|
/**
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
-
export const boolLike = z.
|
|
2
|
+
export const boolLike = z.any().transform(v => {
|
|
3
|
+
if (typeof v === "string") {
|
|
4
|
+
return ["true", "1"].includes(v.toLowerCase());
|
|
5
|
+
}
|
|
6
|
+
return Boolean(v);
|
|
7
|
+
});
|
|
3
8
|
export const stringArrayLike = z.union([
|
|
4
9
|
z.array(z.string()),
|
|
5
10
|
z.string().transform(val => val.split(",")),
|