@systemfsoftware/effect-schema-extensions 0.5.0 → 0.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,6 +1,6 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
2
|
|
|
3
|
-
export declare const ColonHex: Schema.brand<Schema.transform<Schema.transform<Schema.
|
|
3
|
+
export declare const ColonHex: Schema.brand<Schema.transform<Schema.transform<Schema.filter<typeof Schema.String>, Schema.SchemaClass<string, string, never>>, Schema.brand<Schema.transform<Schema.SchemaClass<string, string, never>, Schema.refine<string, typeof Schema.String>>, "HexString">>, "ColonHex">;
|
|
4
4
|
|
|
5
5
|
export declare type ColonHex = Schema.Schema.Type<typeof ColonHex>;
|
|
6
6
|
|
|
@@ -9,23 +9,23 @@ export declare type ColonHex = Schema.Schema.Type<typeof ColonHex>;
|
|
|
9
9
|
* this to produce a `Uint8Array` from that format:
|
|
10
10
|
*
|
|
11
11
|
* ```ts
|
|
12
|
-
* S.compose(PrefixedHex, HexBytes) // Schema<Uint8Array, string
|
|
12
|
+
* S.compose(PrefixedHex, HexBytes) // Schema<Uint8Array, `0x${string}`>
|
|
13
13
|
* S.compose(ColonHex, HexBytes) // Schema<Uint8Array, string>
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
16
|
export declare const HexBytes: Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>;
|
|
17
17
|
|
|
18
|
-
export declare const HexString: Schema.brand<Schema.transform<Schema.
|
|
18
|
+
export declare const HexString: Schema.brand<Schema.transform<Schema.SchemaClass<string, string, never>, Schema.refine<string, typeof Schema.String>>, "HexString">;
|
|
19
19
|
|
|
20
20
|
export declare type HexString = Schema.Schema.Type<typeof HexString>;
|
|
21
21
|
|
|
22
|
-
export declare const PrefixedHex: Schema.brand<Schema.transform<Schema.
|
|
22
|
+
export declare const PrefixedHex: Schema.brand<Schema.transform<Schema.TemplateLiteral<`0x${string}`>, Schema.refine<string, typeof Schema.String>>, "PrefixedHex">;
|
|
23
23
|
|
|
24
24
|
export declare type PrefixedHex = Schema.Schema.Type<typeof PrefixedHex>;
|
|
25
25
|
|
|
26
26
|
export declare const StrictHex: Schema.refine<string, typeof Schema.String>;
|
|
27
27
|
|
|
28
|
-
export declare const Uint8ArrayFromPrefixedHex: Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>>;
|
|
28
|
+
export declare const Uint8ArrayFromPrefixedHex: Schema.transform<Schema.brand<Schema.transform<Schema.TemplateLiteral<`0x${string}`>, Schema.refine<string, typeof Schema.String>>, "PrefixedHex">, Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>>;
|
|
29
29
|
|
|
30
30
|
export declare type Uint8ArrayFromPrefixedHex = Schema.Schema.Type<typeof Uint8ArrayFromPrefixedHex>;
|
|
31
31
|
|
package/dist/hex-schema.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
2
|
|
|
3
|
-
export declare const ColonHex: Schema.brand<Schema.transform<Schema.transform<Schema.
|
|
3
|
+
export declare const ColonHex: Schema.brand<Schema.transform<Schema.transform<Schema.filter<typeof Schema.String>, Schema.SchemaClass<string, string, never>>, Schema.brand<Schema.transform<Schema.SchemaClass<string, string, never>, Schema.refine<string, typeof Schema.String>>, "HexString">>, "ColonHex">;
|
|
4
4
|
|
|
5
5
|
export declare type ColonHex = Schema.Schema.Type<typeof ColonHex>;
|
|
6
6
|
|
|
@@ -9,23 +9,23 @@ export declare type ColonHex = Schema.Schema.Type<typeof ColonHex>;
|
|
|
9
9
|
* this to produce a `Uint8Array` from that format:
|
|
10
10
|
*
|
|
11
11
|
* ```ts
|
|
12
|
-
* S.compose(PrefixedHex, HexBytes) // Schema<Uint8Array, string
|
|
12
|
+
* S.compose(PrefixedHex, HexBytes) // Schema<Uint8Array, `0x${string}`>
|
|
13
13
|
* S.compose(ColonHex, HexBytes) // Schema<Uint8Array, string>
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
16
|
export declare const HexBytes: Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>;
|
|
17
17
|
|
|
18
|
-
export declare const HexString: Schema.brand<Schema.transform<Schema.
|
|
18
|
+
export declare const HexString: Schema.brand<Schema.transform<Schema.SchemaClass<string, string, never>, Schema.refine<string, typeof Schema.String>>, "HexString">;
|
|
19
19
|
|
|
20
20
|
export declare type HexString = Schema.Schema.Type<typeof HexString>;
|
|
21
21
|
|
|
22
|
-
export declare const PrefixedHex: Schema.brand<Schema.transform<Schema.
|
|
22
|
+
export declare const PrefixedHex: Schema.brand<Schema.transform<Schema.TemplateLiteral<`0x${string}`>, Schema.refine<string, typeof Schema.String>>, "PrefixedHex">;
|
|
23
23
|
|
|
24
24
|
export declare type PrefixedHex = Schema.Schema.Type<typeof PrefixedHex>;
|
|
25
25
|
|
|
26
26
|
export declare const StrictHex: Schema.refine<string, typeof Schema.String>;
|
|
27
27
|
|
|
28
|
-
export declare const Uint8ArrayFromPrefixedHex: Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>>;
|
|
28
|
+
export declare const Uint8ArrayFromPrefixedHex: Schema.transform<Schema.brand<Schema.transform<Schema.TemplateLiteral<`0x${string}`>, Schema.refine<string, typeof Schema.String>>, "PrefixedHex">, Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>>;
|
|
29
29
|
|
|
30
30
|
export declare type Uint8ArrayFromPrefixedHex = Schema.Schema.Type<typeof Uint8ArrayFromPrefixedHex>;
|
|
31
31
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/effect-schema-extensions",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"author": "Ryan Lee <drdgvhbh@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dist"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@systemfsoftware/hex-schema": "^1.
|
|
41
|
+
"@systemfsoftware/hex-schema": "^1.5.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@effect/vitest": "0.30.0",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"rimraf": "^6.1.3",
|
|
51
51
|
"tsdown": "^0.22.9",
|
|
52
52
|
"vitest": "^4",
|
|
53
|
-
"@systemfsoftware/arethetypeswrong-cli": "^1.0
|
|
53
|
+
"@systemfsoftware/arethetypeswrong-cli": "^1.1.0",
|
|
54
54
|
"@systemfsoftware/tsconfig": "^1.2.6",
|
|
55
|
-
"@systemfsoftware/
|
|
56
|
-
"@systemfsoftware/
|
|
55
|
+
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
56
|
+
"@systemfsoftware/oxlint-config": "^0.1.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"effect": "^3.22.0"
|