@chainfuse/types 2.1.0 → 2.2.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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/wf/index.d.ts +3 -0
- package/dist/wf/index.js +26 -0
- package/package.json +23 -14
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './ai-tools/index.js';
|
|
|
2
2
|
export * from './d0/index.js';
|
|
3
3
|
export * from './d1/index.js';
|
|
4
4
|
export * from './discourse/index.js';
|
|
5
|
+
export * from './wf/index.js';
|
|
5
6
|
type MethodKeys<T> = {
|
|
6
7
|
[P in keyof T]: T[P] extends (...args: any[]) => any ? P : never;
|
|
7
8
|
}[keyof T];
|
package/dist/index.js
CHANGED
package/dist/wf/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import isHexadecimal from 'validator/es/lib/isHexadecimal';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const ZodUuidExportInput = z.union([
|
|
4
|
+
// PrefixedUuid
|
|
5
|
+
z
|
|
6
|
+
.string()
|
|
7
|
+
.trim()
|
|
8
|
+
.min(38)
|
|
9
|
+
.max(40)
|
|
10
|
+
.regex(new RegExp(/^((d|t|u)_)?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(_p)?$/i)),
|
|
11
|
+
// utf=8
|
|
12
|
+
z.string().trim().nonempty().uuid(),
|
|
13
|
+
// hex
|
|
14
|
+
z
|
|
15
|
+
.string()
|
|
16
|
+
.trim()
|
|
17
|
+
.length(32)
|
|
18
|
+
.refine((value) => isHexadecimal(value)),
|
|
19
|
+
z.string().trim().nonempty().base64(),
|
|
20
|
+
z.string().trim().nonempty().base64url(),
|
|
21
|
+
]);
|
|
22
|
+
export const ZodCoordinate = z
|
|
23
|
+
.string()
|
|
24
|
+
.trim()
|
|
25
|
+
.min(3)
|
|
26
|
+
.regex(new RegExp(/^-?\d+\.\d+$/i));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainfuse/types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "ChainFuse",
|
|
6
6
|
"homepage": "https://github.com/ChainFuse/packages/tree/main/packages/types#readme",
|
|
@@ -43,6 +43,18 @@
|
|
|
43
43
|
"import": "./dist/index.js",
|
|
44
44
|
"types": "./dist/index.d.ts"
|
|
45
45
|
},
|
|
46
|
+
"./ai-tools": {
|
|
47
|
+
"import": "./dist/ai-tools/index.js",
|
|
48
|
+
"types": "./dist/ai-tools/index.d.ts"
|
|
49
|
+
},
|
|
50
|
+
"./ai-tools/catalog/azure": {
|
|
51
|
+
"import": "./dist/ai-tools/azure/catalog.js",
|
|
52
|
+
"types": "./dist/ai-tools/azure/catalog.d.ts"
|
|
53
|
+
},
|
|
54
|
+
"./ai-tools/catalog/workers-ai": {
|
|
55
|
+
"import": "./dist/ai-tools/workers-ai/catalog.js",
|
|
56
|
+
"types": "./dist/ai-tools/workers-ai/catalog.d.ts"
|
|
57
|
+
},
|
|
46
58
|
"./d0": {
|
|
47
59
|
"import": "./dist/d0/index.js",
|
|
48
60
|
"types": "./dist/d0/index.d.ts"
|
|
@@ -71,22 +83,19 @@
|
|
|
71
83
|
"import": "./dist/discourse/topic/index.js",
|
|
72
84
|
"types": "./dist/discourse/topic/index.d.ts"
|
|
73
85
|
},
|
|
74
|
-
"./
|
|
75
|
-
"import": "./dist/
|
|
76
|
-
"types": "./dist/
|
|
77
|
-
},
|
|
78
|
-
"./ai-tools/catalog/workers-ai": {
|
|
79
|
-
"import": "./dist/ai-tools/workers-ai/catalog.js",
|
|
80
|
-
"types": "./dist/ai-tools/workers-ai/catalog.d.ts"
|
|
81
|
-
},
|
|
82
|
-
"./ai-tools/catalog/azure": {
|
|
83
|
-
"import": "./dist/ai-tools/azure/catalog.js",
|
|
84
|
-
"types": "./dist/ai-tools/azure/catalog.d.ts"
|
|
86
|
+
"./wf": {
|
|
87
|
+
"import": "./dist/wf/index.js",
|
|
88
|
+
"types": "./dist/wf/index.d.ts"
|
|
85
89
|
}
|
|
86
90
|
},
|
|
87
91
|
"prettier": "@demosjarco/prettier-config",
|
|
88
92
|
"devDependencies": {
|
|
89
|
-
"@cloudflare/workers-types": "^4.
|
|
93
|
+
"@cloudflare/workers-types": "^4.20250321.0",
|
|
94
|
+
"@types/validator": "^13.12.3"
|
|
95
|
+
},
|
|
96
|
+
"dependencies": {
|
|
97
|
+
"validator": "^13.15.0",
|
|
98
|
+
"zod": "^3.24.2"
|
|
90
99
|
},
|
|
91
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "48fa350c5978fa55928e9e129d2dc55ff981528e"
|
|
92
101
|
}
|