@awsless/validate 0.0.1 → 0.0.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.
- package/dist/index.d.ts +2 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Struct } from 'superstruct';
|
|
2
2
|
export { Coercer, Context, Describe, Failure, Infer, Refiner, Result, Struct, StructError, Validator, any, array, assert, assign, bigint, boolean, coerce, create, defaulted, define, deprecated, dynamic, empty, enums, func, instance, integer, intersection, is, lazy, literal, map, mask, max, min, never, nonempty, nullable, number, object, omit, optional, partial, pattern, pick, record, refine, regexp, set, size, string, struct, trimmed, tuple, type, union, unknown } from 'superstruct';
|
|
3
3
|
import { BigFloat } from '@awsless/big-float';
|
|
4
|
+
import { UUID } from 'crypto';
|
|
4
5
|
|
|
5
6
|
declare const bigfloat: () => Struct<BigFloat, null>;
|
|
6
7
|
declare const positive: <T extends BigFloat, S extends unknown>(struct: Struct<T, S>) => Struct<T, S>;
|
|
@@ -8,7 +9,7 @@ declare const precision: <T extends BigFloat, S extends unknown>(struct: Struct<
|
|
|
8
9
|
|
|
9
10
|
declare const date: () => Struct<Date, null>;
|
|
10
11
|
|
|
11
|
-
declare const uuid: () => Struct<
|
|
12
|
+
declare const uuid: () => Struct<UUID, null>;
|
|
12
13
|
|
|
13
14
|
declare const json: <T, S>(struct: Struct<T, S>) => Struct<T, S>;
|
|
14
15
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/validate",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
"scripts": {
|
|
36
36
|
"test": "pnpm code test",
|
|
37
37
|
"build": "pnpm tsup src/index.ts --format cjs,esm --dts --clean",
|
|
38
|
-
"prepublish": "pnpm build"
|
|
38
|
+
"prepublish": "if pnpm test; then pnpm build; else exit; fi"
|
|
39
39
|
}
|
|
40
40
|
}
|