@chainfuse/types 2.5.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.
- package/dist/d0/index.d.ts +2 -0
- package/dist/d0/index.js +24 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +17 -0
- package/dist/wf/index.js +1 -1
- package/package.json +3 -3
package/dist/d0/index.d.ts
CHANGED
package/dist/d0/index.js
CHANGED
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
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/index.d.ts
CHANGED
|
@@ -48,3 +48,19 @@ export type UndefinedProperties<T extends object> = {
|
|
|
48
48
|
};
|
|
49
49
|
export type CustomLogCallback = (message?: any, ...optionalParams: any[]) => void;
|
|
50
50
|
export type CustomLoging = boolean | CustomLogCallback;
|
|
51
|
+
/**
|
|
52
|
+
* @link https://developers.cloudflare.com/durable-objects/reference/data-location/#restrict-durable-objects-to-a-jurisdiction
|
|
53
|
+
*/
|
|
54
|
+
export declare enum DOLocations {
|
|
55
|
+
'The European Union' = "eu",
|
|
56
|
+
'FedRAMP-compliant data centers' = "fedramp",
|
|
57
|
+
'Western North America' = "wnam",
|
|
58
|
+
'Eastern North America' = "enam",
|
|
59
|
+
'South America' = "sam",
|
|
60
|
+
'Western Europe' = "weur",
|
|
61
|
+
'Eastern Europe' = "eeur",
|
|
62
|
+
'Asia-Pacific' = "apac",
|
|
63
|
+
'Oceania' = "oc",
|
|
64
|
+
'Africa' = "afr",
|
|
65
|
+
'Middle East' = "me"
|
|
66
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -2,3 +2,20 @@ 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
|
+
/**
|
|
6
|
+
* @link https://developers.cloudflare.com/durable-objects/reference/data-location/#restrict-durable-objects-to-a-jurisdiction
|
|
7
|
+
*/
|
|
8
|
+
export var DOLocations;
|
|
9
|
+
(function (DOLocations) {
|
|
10
|
+
DOLocations["The European Union"] = "eu";
|
|
11
|
+
DOLocations["FedRAMP-compliant data centers"] = "fedramp";
|
|
12
|
+
DOLocations["Western North America"] = "wnam";
|
|
13
|
+
DOLocations["Eastern North America"] = "enam";
|
|
14
|
+
DOLocations["South America"] = "sam";
|
|
15
|
+
DOLocations["Western Europe"] = "weur";
|
|
16
|
+
DOLocations["Eastern Europe"] = "eeur";
|
|
17
|
+
DOLocations["Asia-Pacific"] = "apac";
|
|
18
|
+
DOLocations["Oceania"] = "oc";
|
|
19
|
+
DOLocations["Africa"] = "afr";
|
|
20
|
+
DOLocations["Middle East"] = "me";
|
|
21
|
+
})(DOLocations || (DOLocations = {}));
|
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((
|
|
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.
|
|
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",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
"zod": "^3.24.2"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@cloudflare/workers-types": "^4.
|
|
97
|
+
"@cloudflare/workers-types": "^4.20250409.0",
|
|
98
98
|
"@types/validator": "^13.12.3"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "022e39859a4208cba45e4eb416a3bce399e5d2af"
|
|
101
101
|
}
|