@pithos/core 2.1.0 → 2.2.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/.tsbuildinfo +1 -1
- package/dist/arkhe/array/to-array.d.ts +1 -1
- package/dist/arkhe/async/parallel.js +1 -1
- package/dist/arkhe/async/retry.js +1 -1
- package/dist/arkhe/number/parsers/parse-float-def.d.ts +1 -1
- package/dist/arkhe/number/parsers/parse-float-def.js +1 -1
- package/dist/arkhe/number/parsers/parse-int-def.d.ts +1 -1
- package/dist/arkhe/object/defaults-deep.js +1 -1
- package/dist/arkhe/object/get.js +1 -1
- package/dist/arkhe/object/merge-with.js +1 -1
- package/dist/arkhe/object/set.js +2 -2
- package/dist/arkhe/string/pascal-case.js +1 -1
- package/dist/arkhe/test/console.js +1 -1
- package/dist/arkhe/types/common/simple-result.d.ts +31 -0
- package/dist/arkhe/types/common/simple-result.d.ts.map +1 -0
- package/dist/arkhe/types/common/simple-result.js +2 -0
- package/dist/arkhe/types/common/simple-result.js.map +1 -0
- package/dist/autocompletion.d.ts +704 -702
- package/dist/bridges/ensure.d.ts +2 -2
- package/dist/bridges/ensure.js +2 -2
- package/dist/bridges/ensureAsync.d.ts +2 -2
- package/dist/bridges/ensureAsync.js +2 -2
- package/dist/bridges/ensurePromise.d.ts +3 -3
- package/dist/bridges/ensurePromise.js +3 -3
- package/dist/kanon/core/parser.d.ts +1 -1
- package/dist/kanon/core/parser.js +1 -1
- package/dist/kanon/helpers/as-zod.d.ts +1 -1
- package/dist/kanon/helpers/as-zod.js +2 -2
- package/dist/kanon/helpers/as-zod.shim.d.ts +1 -1
- package/dist/kanon/helpers/as-zod.shim.js +3 -3
- package/dist/kanon/helpers/k.d.ts +42 -42
- package/dist/kanon/helpers/k.js +41 -41
- package/dist/kanon/index.d.ts +56 -56
- package/dist/kanon/index.js +46 -46
- package/dist/kanon/jit/builders/coerce.d.ts +2 -2
- package/dist/kanon/jit/builders/coerce.js +2 -2
- package/dist/kanon/jit/builders/composites/array.d.ts +2 -2
- package/dist/kanon/jit/builders/composites/array.js +2 -2
- package/dist/kanon/jit/builders/composites/object.d.ts +3 -3
- package/dist/kanon/jit/builders/composites/object.js +2 -2
- package/dist/kanon/jit/builders/operators/union.d.ts +1 -1
- package/dist/kanon/jit/builders/operators/union.js +3 -3
- package/dist/kanon/jit/builders/primitives/boolean.d.ts +2 -2
- package/dist/kanon/jit/builders/primitives/boolean.js +3 -3
- package/dist/kanon/jit/builders/primitives/number.d.ts +2 -2
- package/dist/kanon/jit/builders/primitives/number.js +3 -3
- package/dist/kanon/jit/builders/primitives/others.d.ts +2 -2
- package/dist/kanon/jit/builders/primitives/others.js +3 -3
- package/dist/kanon/jit/builders/primitives/string.d.ts +2 -2
- package/dist/kanon/jit/builders/primitives/string.js +4 -4
- package/dist/kanon/jit/builders/refinements.d.ts +2 -2
- package/dist/kanon/jit/builders/refinements.js +2 -2
- package/dist/kanon/jit/cache.d.ts +1 -1
- package/dist/kanon/jit/compiler.d.ts +4 -4
- package/dist/kanon/jit/compiler.js +14 -14
- package/dist/kanon/jit/context.d.ts +1 -1
- package/dist/kanon/jit/utils/arbitraries.d.ts +1 -1
- package/dist/kanon/jit/utils/arbitraries.js +6 -6
- package/dist/kanon/jit/utils/code.d.ts +1 -1
- package/dist/kanon/jit/utils/code.js +1 -1
- package/dist/kanon/schemas/coerce/bigint.d.ts +1 -1
- package/dist/kanon/schemas/coerce/bigint.js +2 -2
- package/dist/kanon/schemas/coerce/boolean.d.ts +1 -1
- package/dist/kanon/schemas/coerce/date.d.ts +1 -1
- package/dist/kanon/schemas/coerce/date.js +2 -2
- package/dist/kanon/schemas/coerce/number.d.ts +1 -1
- package/dist/kanon/schemas/coerce/number.js +2 -2
- package/dist/kanon/schemas/coerce/string.d.ts +1 -1
- package/dist/kanon/schemas/coerce/string.js +2 -2
- package/dist/kanon/schemas/composites/array.d.ts +2 -2
- package/dist/kanon/schemas/composites/array.js +3 -3
- package/dist/kanon/schemas/composites/map.d.ts +2 -2
- package/dist/kanon/schemas/composites/map.js +3 -3
- package/dist/kanon/schemas/composites/object.d.ts +2 -2
- package/dist/kanon/schemas/composites/object.js +3 -3
- package/dist/kanon/schemas/composites/record.d.ts +2 -2
- package/dist/kanon/schemas/composites/record.js +2 -2
- package/dist/kanon/schemas/composites/set.d.ts +2 -2
- package/dist/kanon/schemas/composites/set.js +3 -3
- package/dist/kanon/schemas/composites/tuple.d.ts +2 -2
- package/dist/kanon/schemas/composites/tuple.js +2 -2
- package/dist/kanon/schemas/constraints/array.d.ts +3 -3
- package/dist/kanon/schemas/constraints/array.js +2 -2
- package/dist/kanon/schemas/constraints/bigint.d.ts +2 -2
- package/dist/kanon/schemas/constraints/bigint.js +2 -2
- package/dist/kanon/schemas/constraints/date.d.ts +2 -2
- package/dist/kanon/schemas/constraints/date.js +2 -2
- package/dist/kanon/schemas/constraints/map.d.ts +3 -3
- package/dist/kanon/schemas/constraints/map.js +2 -2
- package/dist/kanon/schemas/constraints/number.d.ts +2 -2
- package/dist/kanon/schemas/constraints/number.js +2 -2
- package/dist/kanon/schemas/constraints/object.d.ts +3 -3
- package/dist/kanon/schemas/constraints/object.js +2 -2
- package/dist/kanon/schemas/constraints/refine/array.d.ts +3 -3
- package/dist/kanon/schemas/constraints/refine/array.js +2 -2
- package/dist/kanon/schemas/constraints/refine/bigint.d.ts +2 -2
- package/dist/kanon/schemas/constraints/refine/date.d.ts +2 -2
- package/dist/kanon/schemas/constraints/refine/map.d.ts +3 -3
- package/dist/kanon/schemas/constraints/refine/map.js +2 -2
- package/dist/kanon/schemas/constraints/refine/number.d.ts +2 -2
- package/dist/kanon/schemas/constraints/refine/object.d.ts +3 -3
- package/dist/kanon/schemas/constraints/refine/object.js +2 -2
- package/dist/kanon/schemas/constraints/refine/set.d.ts +3 -3
- package/dist/kanon/schemas/constraints/refine/set.js +2 -2
- package/dist/kanon/schemas/constraints/refine/string.d.ts +2 -2
- package/dist/kanon/schemas/constraints/set.d.ts +3 -3
- package/dist/kanon/schemas/constraints/set.js +2 -2
- package/dist/kanon/schemas/constraints/string.d.ts +2 -2
- package/dist/kanon/schemas/constraints/string.js +3 -3
- package/dist/kanon/schemas/operators/intersection.d.ts +2 -2
- package/dist/kanon/schemas/operators/union.d.ts +2 -2
- package/dist/kanon/schemas/operators/union.js +1 -1
- package/dist/kanon/schemas/primitives/any.d.ts +1 -1
- package/dist/kanon/schemas/primitives/bigint.d.ts +1 -1
- package/dist/kanon/schemas/primitives/bigint.js +2 -2
- package/dist/kanon/schemas/primitives/boolean.d.ts +1 -1
- package/dist/kanon/schemas/primitives/boolean.js +1 -1
- package/dist/kanon/schemas/primitives/date.d.ts +1 -1
- package/dist/kanon/schemas/primitives/date.js +2 -2
- package/dist/kanon/schemas/primitives/enum.d.ts +1 -1
- package/dist/kanon/schemas/primitives/enum.js +1 -1
- package/dist/kanon/schemas/primitives/int.d.ts +1 -1
- package/dist/kanon/schemas/primitives/int.js +1 -1
- package/dist/kanon/schemas/primitives/literal.d.ts +1 -1
- package/dist/kanon/schemas/primitives/literal.js +1 -1
- package/dist/kanon/schemas/primitives/nativeEnum.d.ts +1 -1
- package/dist/kanon/schemas/primitives/nativeEnum.js +1 -1
- package/dist/kanon/schemas/primitives/never.d.ts +1 -1
- package/dist/kanon/schemas/primitives/never.js +1 -1
- package/dist/kanon/schemas/primitives/null.d.ts +1 -1
- package/dist/kanon/schemas/primitives/null.js +1 -1
- package/dist/kanon/schemas/primitives/number.d.ts +1 -1
- package/dist/kanon/schemas/primitives/number.js +2 -2
- package/dist/kanon/schemas/primitives/string.d.ts +1 -1
- package/dist/kanon/schemas/primitives/string.js +2 -2
- package/dist/kanon/schemas/primitives/symbol.d.ts +1 -1
- package/dist/kanon/schemas/primitives/symbol.js +1 -1
- package/dist/kanon/schemas/primitives/undefined.d.ts +1 -1
- package/dist/kanon/schemas/primitives/undefined.js +1 -1
- package/dist/kanon/schemas/primitives/unknown.d.ts +1 -1
- package/dist/kanon/schemas/primitives/void.d.ts +1 -1
- package/dist/kanon/schemas/primitives/void.js +1 -1
- package/dist/kanon/schemas/transforms/keyof.d.ts +4 -4
- package/dist/kanon/schemas/transforms/keyof.js +1 -1
- package/dist/kanon/schemas/transforms/omit.d.ts +4 -4
- package/dist/kanon/schemas/transforms/omit.js +1 -1
- package/dist/kanon/schemas/transforms/partial.d.ts +4 -4
- package/dist/kanon/schemas/transforms/partial.js +1 -1
- package/dist/kanon/schemas/transforms/pick.d.ts +4 -4
- package/dist/kanon/schemas/transforms/pick.js +1 -1
- package/dist/kanon/schemas/transforms/required.d.ts +4 -4
- package/dist/kanon/schemas/transforms/required.js +1 -1
- package/dist/kanon/schemas/wrappers/default.d.ts +2 -2
- package/dist/kanon/schemas/wrappers/lazy.d.ts +2 -2
- package/dist/kanon/schemas/wrappers/nullable.d.ts +2 -2
- package/dist/kanon/schemas/wrappers/nullish.d.ts +2 -2
- package/dist/kanon/schemas/wrappers/optional.d.ts +2 -2
- package/dist/kanon/schemas/wrappers/readonly.d.ts +2 -2
- package/dist/kanon/types/composites.d.ts +1 -1
- package/dist/kanon/types/constraints.d.ts +1 -1
- package/dist/kanon/types/guards.d.ts +7 -7
- package/dist/kanon/types/operators.d.ts +2 -2
- package/dist/kanon/types/primitives.d.ts +1 -1
- package/dist/kanon/types/transforms.d.ts +1 -1
- package/dist/kanon/types/wrappers.d.ts +1 -1
- package/dist/kanon/validation.d.ts +1 -1
- package/dist/kanon/validation.js +1 -1
- package/dist/taphos/array/nth.js +1 -1
- package/dist/taphos/array/pull-all.js +1 -1
- package/dist/taphos/array/pullAllBy.js +1 -1
- package/dist/taphos/array/pullAllWith.js +1 -1
- package/dist/taphos/array/without.js +1 -1
- package/dist/taphos/object/at.js +1 -1
- package/dist/taphos/object/extend.js +1 -1
- package/dist/taphos/object/invoke.js +1 -1
- package/dist/taphos/object/unset.js +2 -2
- package/dist/taphos/object/update.js +2 -2
- package/dist/taphos/util/rangeRight.js +1 -1
- package/dist/zygos/either.d.ts +1 -1
- package/dist/zygos/either.js +1 -1
- package/dist/zygos/option.d.ts +1 -1
- package/dist/zygos/result/result-async.d.ts +5 -5
- package/dist/zygos/result/result-async.js +5 -5
- package/dist/zygos/result/result.d.ts +3 -3
- package/dist/zygos/result/result.js +4 -4
- package/dist/zygos/safe.d.ts +1 -1
- package/dist/zygos/safe.js +1 -1
- package/dist/zygos/task-either.d.ts +3 -3
- package/dist/zygos/task-either.js +3 -3
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { refineMap } from "../../schemas/constraints/refine/map";
|
|
2
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
|
|
1
|
+
import { refineMap } from "../../schemas/constraints/refine/map.js";
|
|
2
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds map constraints to a base schema.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NumberConstraint } from "../../types/constraints";
|
|
2
|
-
import { NumberSchema } from "../../types/primitives";
|
|
1
|
+
import { NumberConstraint } from "../../types/constraints.js";
|
|
2
|
+
import { NumberSchema } from "../../types/primitives.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds number constraints to a base schema.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { refineNumber } from "../../schemas/constraints/refine/number";
|
|
2
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
|
|
1
|
+
import { refineNumber } from "../../schemas/constraints/refine/number.js";
|
|
2
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds number constraints to a base schema.
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ObjectConstraint } from "../../types/constraints";
|
|
2
|
-
import { ObjectSchema } from "../../types/composites";
|
|
3
|
-
import { GenericSchema } from "../../types/base";
|
|
1
|
+
import { ObjectConstraint } from "../../types/constraints.js";
|
|
2
|
+
import { ObjectSchema } from "../../types/composites.js";
|
|
3
|
+
import { GenericSchema } from "../../types/base.js";
|
|
4
4
|
/**
|
|
5
5
|
* Adds object constraints to a base schema.
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { refineObject } from "../../schemas/constraints/refine/object";
|
|
2
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
|
|
1
|
+
import { refineObject } from "../../schemas/constraints/refine/object.js";
|
|
2
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds object constraints to a base schema.
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ArrayConstraint } from "../../../types/constraints";
|
|
2
|
-
import { ArraySchema } from "../../../types/composites";
|
|
3
|
-
import { GenericSchema, Infer } from "../../../types/base";
|
|
1
|
+
import { ArrayConstraint } from "../../../types/constraints.js";
|
|
2
|
+
import { ArraySchema } from "../../../types/composites.js";
|
|
3
|
+
import { GenericSchema, Infer } from "../../../types/base.js";
|
|
4
4
|
/**
|
|
5
5
|
* Adds a refinement to an array schema.
|
|
6
6
|
* Returns a base ArraySchema - the caller is responsible for adding constraints.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isCoerced } from "../../../types/base";
|
|
2
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages";
|
|
1
|
+
import { isCoerced } from "../../../types/base.js";
|
|
2
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds a refinement to an array schema.
|
|
5
5
|
* Returns a base ArraySchema - the caller is responsible for adding constraints.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BigIntConstraint } from "../../../types/constraints";
|
|
2
|
-
import { BigIntSchema } from "../../../types/primitives";
|
|
1
|
+
import { BigIntConstraint } from "../../../types/constraints.js";
|
|
2
|
+
import { BigIntSchema } from "../../../types/primitives.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds a refinement to a bigint schema.
|
|
5
5
|
* Preserves coercion from the base schema.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DateConstraint } from "../../../types/constraints";
|
|
2
|
-
import { DateSchema } from "../../../types/primitives";
|
|
1
|
+
import { DateConstraint } from "../../../types/constraints.js";
|
|
2
|
+
import { DateSchema } from "../../../types/primitives.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds a refinement to a date schema.
|
|
5
5
|
* Preserves coercion from the base schema.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MapConstraint } from "../../../types/constraints";
|
|
2
|
-
import { MapSchema } from "../../../types/composites";
|
|
3
|
-
import { GenericSchema, Infer } from "../../../types/base";
|
|
1
|
+
import { MapConstraint } from "../../../types/constraints.js";
|
|
2
|
+
import { MapSchema } from "../../../types/composites.js";
|
|
3
|
+
import { GenericSchema, Infer } from "../../../types/base.js";
|
|
4
4
|
/**
|
|
5
5
|
* Adds a refinement to a map schema.
|
|
6
6
|
* Returns a base MapSchema - the caller is responsible for adding constraints.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isCoerced } from "../../../types/base";
|
|
2
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages";
|
|
1
|
+
import { isCoerced } from "../../../types/base.js";
|
|
2
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds a refinement to a map schema.
|
|
5
5
|
* Returns a base MapSchema - the caller is responsible for adding constraints.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NumberConstraint } from "../../../types/constraints";
|
|
2
|
-
import { NumberSchema } from "../../../types/primitives";
|
|
1
|
+
import { NumberConstraint } from "../../../types/constraints.js";
|
|
2
|
+
import { NumberSchema } from "../../../types/primitives.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds a refinement to a number schema.
|
|
5
5
|
* Preserves coercion from the base schema.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ObjectConstraint } from "../../../types/constraints";
|
|
2
|
-
import { ObjectSchema } from "../../../types/composites";
|
|
3
|
-
import { GenericSchema, Infer } from "../../../types/base";
|
|
1
|
+
import { ObjectConstraint } from "../../../types/constraints.js";
|
|
2
|
+
import { ObjectSchema } from "../../../types/composites.js";
|
|
3
|
+
import { GenericSchema, Infer } from "../../../types/base.js";
|
|
4
4
|
type InferObjectEntries<T extends Record<string, GenericSchema>> = {
|
|
5
5
|
[K in keyof T]: Infer<T[K]>;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isCoerced } from "../../../types/base";
|
|
2
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages";
|
|
1
|
+
import { isCoerced } from "../../../types/base.js";
|
|
2
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds a refinement to an object schema.
|
|
5
5
|
* Returns a base ObjectSchema - the caller is responsible for adding constraints.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SetConstraint } from "../../../types/constraints";
|
|
2
|
-
import { SetSchema } from "../../../types/composites";
|
|
3
|
-
import { GenericSchema, Infer } from "../../../types/base";
|
|
1
|
+
import { SetConstraint } from "../../../types/constraints.js";
|
|
2
|
+
import { SetSchema } from "../../../types/composites.js";
|
|
3
|
+
import { GenericSchema, Infer } from "../../../types/base.js";
|
|
4
4
|
/**
|
|
5
5
|
* Adds a refinement to a set schema.
|
|
6
6
|
* Returns a base SetSchema - the caller is responsible for adding constraints.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isCoerced } from "../../../types/base";
|
|
2
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages";
|
|
1
|
+
import { isCoerced } from "../../../types/base.js";
|
|
2
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../../core/consts/messages.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds a refinement to a set schema.
|
|
5
5
|
* Returns a base SetSchema - the caller is responsible for adding constraints.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StringConstraint } from "../../../types/constraints";
|
|
2
|
-
import { StringSchema } from "../../../types/primitives";
|
|
1
|
+
import { StringConstraint } from "../../../types/constraints.js";
|
|
2
|
+
import { StringSchema } from "../../../types/primitives.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds a refinement to a string schema.
|
|
5
5
|
* Preserves coercion from the base schema.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SetConstraint } from "../../types/constraints";
|
|
2
|
-
import { SetSchema } from "../../types/composites";
|
|
3
|
-
import { GenericSchema } from "../../types/base";
|
|
1
|
+
import { SetConstraint } from "../../types/constraints.js";
|
|
2
|
+
import { SetSchema } from "../../types/composites.js";
|
|
3
|
+
import { GenericSchema } from "../../types/base.js";
|
|
4
4
|
/**
|
|
5
5
|
* Adds set constraints to a base schema.
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { refineSet } from "../../schemas/constraints/refine/set";
|
|
2
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
|
|
1
|
+
import { refineSet } from "../../schemas/constraints/refine/set.js";
|
|
2
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds set constraints to a base schema.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StringConstraint } from "../../types/constraints";
|
|
2
|
-
import { StringSchema } from "../../types/primitives";
|
|
1
|
+
import { StringConstraint } from "../../types/constraints.js";
|
|
2
|
+
import { StringSchema } from "../../types/primitives.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds string constraints to a base schema.
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { refineString } from "../../schemas/constraints/refine/string";
|
|
2
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
|
|
3
|
-
import { EMAIL_REGEX, URL_REGEX, UUID_REGEX, } from "../../core/consts/patterns";
|
|
1
|
+
import { refineString } from "../../schemas/constraints/refine/string.js";
|
|
2
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
|
|
3
|
+
import { EMAIL_REGEX, URL_REGEX, UUID_REGEX, } from "../../core/consts/patterns.js";
|
|
4
4
|
/**
|
|
5
5
|
* Adds string constraints to a base schema.
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IntersectionSchema } from "../../types/operators";
|
|
2
|
-
import { GenericSchema } from "../../types/base";
|
|
1
|
+
import { IntersectionSchema } from "../../types/operators.js";
|
|
2
|
+
import { GenericSchema } from "../../types/base.js";
|
|
3
3
|
/**
|
|
4
4
|
* Intersection schema - validates that the value satisfies multiple schemas.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GenericSchema } from "../../types/base";
|
|
2
|
-
import { UnionSchema, DiscriminatedUnionSchema } from "../../types/operators";
|
|
1
|
+
import { GenericSchema } from "../../types/base.js";
|
|
2
|
+
import { UnionSchema, DiscriminatedUnionSchema } from "../../types/operators.js";
|
|
3
3
|
/**
|
|
4
4
|
* Union schema with specific types for better ergonomics.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
|
|
2
|
-
import { addBigIntConstraints } from "../../schemas/constraints/bigint";
|
|
1
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
|
|
2
|
+
import { addBigIntConstraints } from "../../schemas/constraints/bigint.js";
|
|
3
3
|
/**
|
|
4
4
|
* Creates the base validator.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
|
|
2
|
-
import { addDateConstraints } from "../../schemas/constraints/date";
|
|
1
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
|
|
2
|
+
import { addDateConstraints } from "../../schemas/constraints/date.js";
|
|
3
3
|
/**
|
|
4
4
|
* Creates the base validator.
|
|
5
5
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
|
|
1
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
|
|
2
2
|
const createValidator = (message) => {
|
|
3
3
|
const errorMsg = message || ERROR_MESSAGES_COMPOSITION.int;
|
|
4
4
|
return (value) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
|
|
2
|
-
import { addNumberConstraints } from "../../schemas/constraints/number";
|
|
1
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
|
|
2
|
+
import { addNumberConstraints } from "../../schemas/constraints/number.js";
|
|
3
3
|
/**
|
|
4
4
|
* Creates the base validator.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
|
|
2
|
-
import { addStringConstraints } from "../../schemas/constraints/string";
|
|
1
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
|
|
2
|
+
import { addStringConstraints } from "../../schemas/constraints/string.js";
|
|
3
3
|
/**
|
|
4
4
|
* Creates the base validator.
|
|
5
5
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
|
|
1
|
+
import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
|
|
2
2
|
const createValidator = (message) => {
|
|
3
3
|
const errorMsg = message || ERROR_MESSAGES_COMPOSITION.symbol;
|
|
4
4
|
return (value) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { KeyofSchema } from "../../types/transforms";
|
|
2
|
-
import { GenericSchema } from "../../types/base";
|
|
3
|
-
import { ObjectConstraint } from "../../types/constraints";
|
|
4
|
-
import { ObjectSchema } from "../../types/composites";
|
|
1
|
+
import { KeyofSchema } from "../../types/transforms.js";
|
|
2
|
+
import { GenericSchema } from "../../types/base.js";
|
|
3
|
+
import { ObjectConstraint } from "../../types/constraints.js";
|
|
4
|
+
import { ObjectSchema } from "../../types/composites.js";
|
|
5
5
|
/**
|
|
6
6
|
* Keyof schema - validates that the value is a key of an object.
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GenericSchema } from "../../types/base";
|
|
2
|
-
import { ObjectSchema } from "../../types/composites";
|
|
3
|
-
import { ObjectConstraint } from "../../types/constraints";
|
|
4
|
-
import { OmitSchema } from "../../types/transforms";
|
|
1
|
+
import { GenericSchema } from "../../types/base.js";
|
|
2
|
+
import { ObjectSchema } from "../../types/composites.js";
|
|
3
|
+
import { ObjectConstraint } from "../../types/constraints.js";
|
|
4
|
+
import { OmitSchema } from "../../types/transforms.js";
|
|
5
5
|
/**
|
|
6
6
|
* Omit transform - excludes specific properties.
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GenericSchema } from "../../types/base";
|
|
2
|
-
import { ObjectSchema } from "../../types/composites";
|
|
3
|
-
import { ObjectConstraint } from "../../types/constraints";
|
|
4
|
-
import { PartialSchema } from "../../types/transforms";
|
|
1
|
+
import { GenericSchema } from "../../types/base.js";
|
|
2
|
+
import { ObjectSchema } from "../../types/composites.js";
|
|
3
|
+
import { ObjectConstraint } from "../../types/constraints.js";
|
|
4
|
+
import { PartialSchema } from "../../types/transforms.js";
|
|
5
5
|
/**
|
|
6
6
|
* Partial transform - makes all properties optional.
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GenericSchema } from "../../types/base";
|
|
2
|
-
import { ObjectSchema } from "../../types/composites";
|
|
3
|
-
import { ObjectConstraint } from "../../types/constraints";
|
|
4
|
-
import { PickSchema } from "../../types/transforms";
|
|
1
|
+
import { GenericSchema } from "../../types/base.js";
|
|
2
|
+
import { ObjectSchema } from "../../types/composites.js";
|
|
3
|
+
import { ObjectConstraint } from "../../types/constraints.js";
|
|
4
|
+
import { PickSchema } from "../../types/transforms.js";
|
|
5
5
|
/**
|
|
6
6
|
* Pick transform - selects specific properties.
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GenericSchema } from "../../types/base";
|
|
2
|
-
import { ObjectSchema } from "../../types/composites";
|
|
3
|
-
import { ObjectConstraint } from "../../types/constraints";
|
|
4
|
-
import { RequiredSchema } from "../../types/transforms";
|
|
1
|
+
import { GenericSchema } from "../../types/base.js";
|
|
2
|
+
import { ObjectSchema } from "../../types/composites.js";
|
|
3
|
+
import { ObjectConstraint } from "../../types/constraints.js";
|
|
4
|
+
import { RequiredSchema } from "../../types/transforms.js";
|
|
5
5
|
/**
|
|
6
6
|
* Required transform - makes all properties required.
|
|
7
7
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GenericSchema, Infer } from "../../types/base";
|
|
2
|
-
import { DefaultSchema } from "../../types/wrappers";
|
|
1
|
+
import { GenericSchema, Infer } from "../../types/base.js";
|
|
2
|
+
import { DefaultSchema } from "../../types/wrappers.js";
|
|
3
3
|
/**
|
|
4
4
|
* Default schema - provides a default value if undefined.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LazySchema } from "../../types/wrappers";
|
|
2
|
-
import { Schema } from "../../types/base";
|
|
1
|
+
import { LazySchema } from "../../types/wrappers.js";
|
|
2
|
+
import { Schema } from "../../types/base.js";
|
|
3
3
|
/**
|
|
4
4
|
* Lazy schema - allows creating recursive types by deferring evaluation.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Schema } from "../../types/base";
|
|
2
|
-
import { NullishSchema } from "../../types/wrappers";
|
|
1
|
+
import { Schema } from "../../types/base.js";
|
|
2
|
+
import { NullishSchema } from "../../types/wrappers.js";
|
|
3
3
|
/**
|
|
4
4
|
* Makes a schema nullish (accepts null or undefined).
|
|
5
5
|
*
|