@systemfsoftware/effect-schema-extensions 0.4.0 → 0.4.2

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.
@@ -0,0 +1,32 @@
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 { }
@@ -1 +1,32 @@
1
- export * from "@systemfsoftware/hex-schema";
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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/effect-schema-extensions",
3
3
  "license": "MIT",
4
- "version": "0.4.0",
4
+ "version": "0.4.2",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -39,7 +39,7 @@
39
39
  ],
40
40
  "dependencies": {
41
41
  "effect": "^3.22.0",
42
- "@systemfsoftware/hex-schema": "^1.1.0"
42
+ "@systemfsoftware/hex-schema": "^1.1.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@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/effect-schema-law": "^0.3.0",
53
+ "@systemfsoftware/effect-schema-law": "^0.3.2",
54
54
  "@systemfsoftware/effect-schema-vite": "^1.1.0",
55
- "@systemfsoftware/arethetypeswrong-cli": "^1.0.0",
56
55
  "@systemfsoftware/oxlint-config": "^0.1.0",
56
+ "@systemfsoftware/arethetypeswrong-cli": "^1.0.1",
57
57
  "@systemfsoftware/tsconfig": "^1.1.0",
58
58
  "@systemfsoftware/vitest-config": "^0.1.0"
59
59
  },
@@ -62,7 +62,7 @@
62
62
  },
63
63
  "scripts": {
64
64
  "clean": "rimraf dist",
65
- "build": "tsdown",
65
+ "build": "tsdown && api-extractor run --local && api-extractor run --local --config api-extractor.hex-schema.json",
66
66
  "typecheck": "tsc --noEmit --incremental",
67
67
  "test": "vitest run",
68
68
  "test:run": "vitest run",