@chainfuse/types 2.6.0 → 2.7.0

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 +1,3 @@
1
+ import { z } from 'zod';
1
2
  export type D0Blob = [number, ...number[]];
3
+ export declare const ZodUuid: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>, z.ZodString, z.ZodString]>;
package/dist/d0/index.js CHANGED
@@ -1 +1,24 @@
1
- export {};
1
+ import { z } from 'zod';
2
+ export const ZodUuid = z.union([
3
+ // PrefixedUuid
4
+ z
5
+ .string()
6
+ .trim()
7
+ .min(38)
8
+ .max(40)
9
+ .regex(new RegExp(/^((d|t|u)_)?[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}(_p)?$/i)),
10
+ // utf=8
11
+ z
12
+ .string()
13
+ .trim()
14
+ .uuid()
15
+ .refine((value) => import('validator/es/lib/isUUID').then(({ default: isUUID }) => isUUID(value, 7)).catch(() => import('validator').then(({ default: validator }) => validator.isUUID(value, 7)))),
16
+ // hex
17
+ z
18
+ .string()
19
+ .trim()
20
+ .length(32)
21
+ .refine((value) => import('validator/es/lib/isHexadecimal').then(({ default: isHexadecimal }) => isHexadecimal(value)).catch(() => import('validator').then(({ default: validator }) => validator.isHexadecimal(value)))),
22
+ z.string().trim().nonempty().base64(),
23
+ z.string().trim().nonempty().base64url(),
24
+ ]);
package/dist/wf/index.js CHANGED
@@ -14,7 +14,7 @@ export const ZodUuidExportInput = z.union([
14
14
  .string()
15
15
  .trim()
16
16
  .length(32)
17
- .refine((values) => import('validator/es/lib/isHexadecimal').then(({ default: isHexadecimal }) => isHexadecimal(values)).catch(() => import('validator').then(({ default: validator }) => validator.isHexadecimal(values)))),
17
+ .refine((value) => import('validator/es/lib/isHexadecimal').then(({ default: isHexadecimal }) => isHexadecimal(value)).catch(() => import('validator').then(({ default: validator }) => validator.isHexadecimal(value)))),
18
18
  z.string().trim().nonempty().base64(),
19
19
  z.string().trim().nonempty().base64url(),
20
20
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainfuse/types",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "",
5
5
  "author": "ChainFuse",
6
6
  "homepage": "https://github.com/ChainFuse/packages/tree/main/packages/types#readme",
@@ -97,5 +97,5 @@
97
97
  "@cloudflare/workers-types": "^4.20250409.0",
98
98
  "@types/validator": "^13.12.3"
99
99
  },
100
- "gitHead": "8b75599be143be76f38c5ea7eae9b68625e6fca3"
100
+ "gitHead": "022e39859a4208cba45e4eb416a3bce399e5d2af"
101
101
  }