@systemfsoftware/hex-schema 0.1.0 → 1.1.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/package.json +7 -5
- package/dist/hex-schema.d.ts +0 -32
- package/dist/index.d.mts +0 -33
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/hex-schema",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"author": "Ryan Lee <drdgvhbh@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -43,10 +43,11 @@
|
|
|
43
43
|
"rimraf": "^6.1.3",
|
|
44
44
|
"tsdown": "^0.22.9",
|
|
45
45
|
"vitest": "^4",
|
|
46
|
-
"@systemfsoftware/effect-schema-law": "^0.
|
|
47
|
-
"@systemfsoftware/effect-schema-vite": "^
|
|
48
|
-
"@systemfsoftware/tsconfig": "^1.0.0",
|
|
46
|
+
"@systemfsoftware/effect-schema-law": "^0.3.0",
|
|
47
|
+
"@systemfsoftware/effect-schema-vite": "^1.1.0",
|
|
49
48
|
"@systemfsoftware/oxlint-config": "^0.1.0",
|
|
49
|
+
"@systemfsoftware/tsconfig": "^1.1.0",
|
|
50
|
+
"@systemfsoftware/arethetypeswrong-cli": "^1.0.0",
|
|
50
51
|
"@systemfsoftware/vitest-config": "^0.1.0"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
"test": "vitest run",
|
|
60
61
|
"api:check": "api-extractor run",
|
|
61
62
|
"api:update": "api-extractor run --local",
|
|
62
|
-
"lint": "oxlint . ${AGENT:+--format=unix --quiet}"
|
|
63
|
+
"lint": "oxlint . ${AGENT:+--format=unix --quiet}",
|
|
64
|
+
"attw": "attw --pack ."
|
|
63
65
|
}
|
|
64
66
|
}
|
package/dist/hex-schema.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
|
|
3
|
-
export declare const ColonHex: Schema.brand<Schema.transform<Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.SchemaClass<string, string, never>>, Schema.brand<Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.refine<string, typeof Schema.String>>, "HexString">>, "ColonHex">;
|
|
4
|
-
|
|
5
|
-
export declare type ColonHex = Schema.Schema.Type<typeof ColonHex>;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Composable hex-to-bytes schema. Compose any branded hex schema with
|
|
9
|
-
* this to produce a `Uint8Array` from that format:
|
|
10
|
-
*
|
|
11
|
-
* ```ts
|
|
12
|
-
* S.compose(PrefixedHex, HexBytes) // Schema<Uint8Array, string>
|
|
13
|
-
* S.compose(ColonHex, HexBytes) // Schema<Uint8Array, string>
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
export declare const HexBytes: Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>;
|
|
17
|
-
|
|
18
|
-
export declare const HexString: Schema.brand<Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.refine<string, typeof Schema.String>>, "HexString">;
|
|
19
|
-
|
|
20
|
-
export declare type HexString = Schema.Schema.Type<typeof HexString>;
|
|
21
|
-
|
|
22
|
-
export declare const PrefixedHex: Schema.brand<Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.refine<string, typeof Schema.String>>, "PrefixedHex">;
|
|
23
|
-
|
|
24
|
-
export declare type PrefixedHex = Schema.Schema.Type<typeof PrefixedHex>;
|
|
25
|
-
|
|
26
|
-
export declare const StrictHex: Schema.refine<string, typeof Schema.String>;
|
|
27
|
-
|
|
28
|
-
export declare const Uint8ArrayFromPrefixedHex: Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>>;
|
|
29
|
-
|
|
30
|
-
export declare type Uint8ArrayFromPrefixedHex = Schema.Schema.Type<typeof Uint8ArrayFromPrefixedHex>;
|
|
31
|
-
|
|
32
|
-
export { }
|
package/dist/index.d.mts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Schema } from "effect";
|
|
2
|
-
//#region src/colon-hex.schema.d.ts
|
|
3
|
-
declare const ColonHex: Schema.brand<Schema.transform<Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.SchemaClass<string, string, never>>, Schema.brand<Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.refine<string, typeof Schema.String>>, "HexString">>, "ColonHex">;
|
|
4
|
-
type ColonHex = Schema.Schema.Type<typeof ColonHex>;
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/hex-bytes.schema.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* Composable hex-to-bytes schema. Compose any branded hex schema with
|
|
9
|
-
* this to produce a `Uint8Array` from that format:
|
|
10
|
-
*
|
|
11
|
-
* ```ts
|
|
12
|
-
* S.compose(PrefixedHex, HexBytes) // Schema<Uint8Array, string>
|
|
13
|
-
* S.compose(ColonHex, HexBytes) // Schema<Uint8Array, string>
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
declare const HexBytes: Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>;
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/hex-string.schema.d.ts
|
|
19
|
-
declare const HexString: Schema.brand<Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.refine<string, typeof Schema.String>>, "HexString">;
|
|
20
|
-
type HexString = Schema.Schema.Type<typeof HexString>;
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/prefixed-hex.schema.d.ts
|
|
23
|
-
declare const PrefixedHex: Schema.brand<Schema.transform<Schema.brand<Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.refine<string, typeof Schema.String>>, "HexString">, Schema.refine<string, typeof Schema.String>>, "PrefixedHex">;
|
|
24
|
-
type PrefixedHex = Schema.Schema.Type<typeof PrefixedHex>;
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region src/strict-hex.schema.d.ts
|
|
27
|
-
declare const StrictHex: Schema.refine<string, typeof Schema.String>;
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region src/uint8array-from-prefixed-hex.schema.d.ts
|
|
30
|
-
declare const Uint8ArrayFromPrefixedHex: Schema.transform<Schema.brand<Schema.transform<Schema.brand<Schema.transform<Schema.refine<string, typeof Schema.String>, Schema.refine<string, typeof Schema.String>>, "HexString">, Schema.refine<string, typeof Schema.String>>, "PrefixedHex">, Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>>;
|
|
31
|
-
type Uint8ArrayFromPrefixedHex = Schema.Schema.Type<typeof Uint8ArrayFromPrefixedHex>;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { ColonHex, HexBytes, HexString, PrefixedHex, StrictHex, Uint8ArrayFromPrefixedHex };
|