@pithos/core 2.0.1 → 2.1.1

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.
Files changed (192) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/arkhe/array/to-array.d.ts +1 -1
  3. package/dist/arkhe/async/parallel.js +1 -1
  4. package/dist/arkhe/async/retry.js +1 -1
  5. package/dist/arkhe/number/parsers/parse-float-def.d.ts +1 -1
  6. package/dist/arkhe/number/parsers/parse-float-def.js +1 -1
  7. package/dist/arkhe/number/parsers/parse-int-def.d.ts +1 -1
  8. package/dist/arkhe/object/defaults-deep.js +1 -1
  9. package/dist/arkhe/object/get.js +1 -1
  10. package/dist/arkhe/object/merge-with.js +1 -1
  11. package/dist/arkhe/object/set.js +2 -2
  12. package/dist/arkhe/string/pascal-case.js +1 -1
  13. package/dist/arkhe/test/console.js +1 -1
  14. package/dist/autocompletion.d.ts +719 -699
  15. package/dist/bridges/ensure.d.ts +28 -0
  16. package/dist/bridges/ensure.d.ts.map +1 -0
  17. package/dist/bridges/ensure.js +31 -0
  18. package/dist/bridges/ensure.js.map +1 -0
  19. package/dist/bridges/ensureAsync.d.ts +27 -0
  20. package/dist/bridges/ensureAsync.d.ts.map +1 -0
  21. package/dist/bridges/ensureAsync.js +30 -0
  22. package/dist/bridges/ensureAsync.js.map +1 -0
  23. package/dist/bridges/ensurePromise.d.ts +28 -0
  24. package/dist/bridges/ensurePromise.d.ts.map +1 -0
  25. package/dist/bridges/ensurePromise.js +33 -0
  26. package/dist/bridges/ensurePromise.js.map +1 -0
  27. package/dist/kanon/core/parser.d.ts +1 -1
  28. package/dist/kanon/core/parser.js +1 -1
  29. package/dist/kanon/helpers/as-zod.d.ts +1 -1
  30. package/dist/kanon/helpers/as-zod.js +2 -2
  31. package/dist/kanon/helpers/as-zod.shim.d.ts +1 -1
  32. package/dist/kanon/helpers/as-zod.shim.js +3 -3
  33. package/dist/kanon/helpers/k.d.ts +42 -42
  34. package/dist/kanon/helpers/k.js +41 -41
  35. package/dist/kanon/index.d.ts +56 -56
  36. package/dist/kanon/index.js +46 -46
  37. package/dist/kanon/jit/builders/coerce.d.ts +2 -2
  38. package/dist/kanon/jit/builders/coerce.js +2 -2
  39. package/dist/kanon/jit/builders/composites/array.d.ts +2 -2
  40. package/dist/kanon/jit/builders/composites/array.js +2 -2
  41. package/dist/kanon/jit/builders/composites/object.d.ts +3 -3
  42. package/dist/kanon/jit/builders/composites/object.js +2 -2
  43. package/dist/kanon/jit/builders/operators/union.d.ts +1 -1
  44. package/dist/kanon/jit/builders/operators/union.js +3 -3
  45. package/dist/kanon/jit/builders/primitives/boolean.d.ts +2 -2
  46. package/dist/kanon/jit/builders/primitives/boolean.js +3 -3
  47. package/dist/kanon/jit/builders/primitives/number.d.ts +2 -2
  48. package/dist/kanon/jit/builders/primitives/number.js +3 -3
  49. package/dist/kanon/jit/builders/primitives/others.d.ts +2 -2
  50. package/dist/kanon/jit/builders/primitives/others.js +3 -3
  51. package/dist/kanon/jit/builders/primitives/string.d.ts +2 -2
  52. package/dist/kanon/jit/builders/primitives/string.js +4 -4
  53. package/dist/kanon/jit/builders/refinements.d.ts +2 -2
  54. package/dist/kanon/jit/builders/refinements.js +2 -2
  55. package/dist/kanon/jit/cache.d.ts +1 -1
  56. package/dist/kanon/jit/compiler.d.ts +4 -4
  57. package/dist/kanon/jit/compiler.js +14 -14
  58. package/dist/kanon/jit/context.d.ts +1 -1
  59. package/dist/kanon/jit/utils/arbitraries.d.ts +1 -1
  60. package/dist/kanon/jit/utils/arbitraries.js +6 -6
  61. package/dist/kanon/jit/utils/code.d.ts +1 -1
  62. package/dist/kanon/jit/utils/code.js +1 -1
  63. package/dist/kanon/schemas/coerce/bigint.d.ts +1 -1
  64. package/dist/kanon/schemas/coerce/bigint.js +2 -2
  65. package/dist/kanon/schemas/coerce/boolean.d.ts +1 -1
  66. package/dist/kanon/schemas/coerce/date.d.ts +1 -1
  67. package/dist/kanon/schemas/coerce/date.js +2 -2
  68. package/dist/kanon/schemas/coerce/number.d.ts +1 -1
  69. package/dist/kanon/schemas/coerce/number.js +2 -2
  70. package/dist/kanon/schemas/coerce/string.d.ts +1 -1
  71. package/dist/kanon/schemas/coerce/string.js +2 -2
  72. package/dist/kanon/schemas/composites/array.d.ts +2 -2
  73. package/dist/kanon/schemas/composites/array.js +3 -3
  74. package/dist/kanon/schemas/composites/map.d.ts +2 -2
  75. package/dist/kanon/schemas/composites/map.js +3 -3
  76. package/dist/kanon/schemas/composites/object.d.ts +2 -2
  77. package/dist/kanon/schemas/composites/object.js +3 -3
  78. package/dist/kanon/schemas/composites/record.d.ts +2 -2
  79. package/dist/kanon/schemas/composites/record.js +2 -2
  80. package/dist/kanon/schemas/composites/set.d.ts +2 -2
  81. package/dist/kanon/schemas/composites/set.js +3 -3
  82. package/dist/kanon/schemas/composites/tuple.d.ts +2 -2
  83. package/dist/kanon/schemas/composites/tuple.js +2 -2
  84. package/dist/kanon/schemas/constraints/array.d.ts +3 -3
  85. package/dist/kanon/schemas/constraints/array.js +2 -2
  86. package/dist/kanon/schemas/constraints/bigint.d.ts +2 -2
  87. package/dist/kanon/schemas/constraints/bigint.js +2 -2
  88. package/dist/kanon/schemas/constraints/date.d.ts +2 -2
  89. package/dist/kanon/schemas/constraints/date.js +2 -2
  90. package/dist/kanon/schemas/constraints/map.d.ts +3 -3
  91. package/dist/kanon/schemas/constraints/map.js +2 -2
  92. package/dist/kanon/schemas/constraints/number.d.ts +2 -2
  93. package/dist/kanon/schemas/constraints/number.js +2 -2
  94. package/dist/kanon/schemas/constraints/object.d.ts +3 -3
  95. package/dist/kanon/schemas/constraints/object.js +2 -2
  96. package/dist/kanon/schemas/constraints/refine/array.d.ts +3 -3
  97. package/dist/kanon/schemas/constraints/refine/array.js +2 -2
  98. package/dist/kanon/schemas/constraints/refine/bigint.d.ts +2 -2
  99. package/dist/kanon/schemas/constraints/refine/date.d.ts +2 -2
  100. package/dist/kanon/schemas/constraints/refine/map.d.ts +3 -3
  101. package/dist/kanon/schemas/constraints/refine/map.js +2 -2
  102. package/dist/kanon/schemas/constraints/refine/number.d.ts +2 -2
  103. package/dist/kanon/schemas/constraints/refine/object.d.ts +3 -3
  104. package/dist/kanon/schemas/constraints/refine/object.js +2 -2
  105. package/dist/kanon/schemas/constraints/refine/set.d.ts +3 -3
  106. package/dist/kanon/schemas/constraints/refine/set.js +2 -2
  107. package/dist/kanon/schemas/constraints/refine/string.d.ts +2 -2
  108. package/dist/kanon/schemas/constraints/set.d.ts +3 -3
  109. package/dist/kanon/schemas/constraints/set.js +2 -2
  110. package/dist/kanon/schemas/constraints/string.d.ts +2 -2
  111. package/dist/kanon/schemas/constraints/string.js +3 -3
  112. package/dist/kanon/schemas/operators/intersection.d.ts +2 -2
  113. package/dist/kanon/schemas/operators/union.d.ts +2 -2
  114. package/dist/kanon/schemas/operators/union.js +1 -1
  115. package/dist/kanon/schemas/primitives/any.d.ts +1 -1
  116. package/dist/kanon/schemas/primitives/bigint.d.ts +1 -1
  117. package/dist/kanon/schemas/primitives/bigint.js +2 -2
  118. package/dist/kanon/schemas/primitives/boolean.d.ts +1 -1
  119. package/dist/kanon/schemas/primitives/boolean.js +1 -1
  120. package/dist/kanon/schemas/primitives/date.d.ts +1 -1
  121. package/dist/kanon/schemas/primitives/date.js +2 -2
  122. package/dist/kanon/schemas/primitives/enum.d.ts +1 -1
  123. package/dist/kanon/schemas/primitives/enum.js +1 -1
  124. package/dist/kanon/schemas/primitives/int.d.ts +1 -1
  125. package/dist/kanon/schemas/primitives/int.js +1 -1
  126. package/dist/kanon/schemas/primitives/literal.d.ts +1 -1
  127. package/dist/kanon/schemas/primitives/literal.js +1 -1
  128. package/dist/kanon/schemas/primitives/nativeEnum.d.ts +1 -1
  129. package/dist/kanon/schemas/primitives/nativeEnum.js +1 -1
  130. package/dist/kanon/schemas/primitives/never.d.ts +1 -1
  131. package/dist/kanon/schemas/primitives/never.js +1 -1
  132. package/dist/kanon/schemas/primitives/null.d.ts +1 -1
  133. package/dist/kanon/schemas/primitives/null.js +1 -1
  134. package/dist/kanon/schemas/primitives/number.d.ts +1 -1
  135. package/dist/kanon/schemas/primitives/number.js +2 -2
  136. package/dist/kanon/schemas/primitives/string.d.ts +1 -1
  137. package/dist/kanon/schemas/primitives/string.js +2 -2
  138. package/dist/kanon/schemas/primitives/symbol.d.ts +1 -1
  139. package/dist/kanon/schemas/primitives/symbol.js +1 -1
  140. package/dist/kanon/schemas/primitives/undefined.d.ts +1 -1
  141. package/dist/kanon/schemas/primitives/undefined.js +1 -1
  142. package/dist/kanon/schemas/primitives/unknown.d.ts +1 -1
  143. package/dist/kanon/schemas/primitives/void.d.ts +1 -1
  144. package/dist/kanon/schemas/primitives/void.js +1 -1
  145. package/dist/kanon/schemas/transforms/keyof.d.ts +4 -4
  146. package/dist/kanon/schemas/transforms/keyof.js +1 -1
  147. package/dist/kanon/schemas/transforms/omit.d.ts +4 -4
  148. package/dist/kanon/schemas/transforms/omit.js +1 -1
  149. package/dist/kanon/schemas/transforms/partial.d.ts +4 -4
  150. package/dist/kanon/schemas/transforms/partial.js +1 -1
  151. package/dist/kanon/schemas/transforms/pick.d.ts +4 -4
  152. package/dist/kanon/schemas/transforms/pick.js +1 -1
  153. package/dist/kanon/schemas/transforms/required.d.ts +4 -4
  154. package/dist/kanon/schemas/transforms/required.js +1 -1
  155. package/dist/kanon/schemas/wrappers/default.d.ts +2 -2
  156. package/dist/kanon/schemas/wrappers/lazy.d.ts +2 -2
  157. package/dist/kanon/schemas/wrappers/nullable.d.ts +2 -2
  158. package/dist/kanon/schemas/wrappers/nullish.d.ts +2 -2
  159. package/dist/kanon/schemas/wrappers/optional.d.ts +2 -2
  160. package/dist/kanon/schemas/wrappers/readonly.d.ts +2 -2
  161. package/dist/kanon/types/composites.d.ts +1 -1
  162. package/dist/kanon/types/constraints.d.ts +1 -1
  163. package/dist/kanon/types/guards.d.ts +7 -7
  164. package/dist/kanon/types/operators.d.ts +2 -2
  165. package/dist/kanon/types/primitives.d.ts +1 -1
  166. package/dist/kanon/types/transforms.d.ts +1 -1
  167. package/dist/kanon/types/wrappers.d.ts +1 -1
  168. package/dist/kanon/validation.d.ts +1 -1
  169. package/dist/kanon/validation.js +1 -1
  170. package/dist/taphos/array/nth.js +1 -1
  171. package/dist/taphos/array/pull-all.js +1 -1
  172. package/dist/taphos/array/pullAllBy.js +1 -1
  173. package/dist/taphos/array/pullAllWith.js +1 -1
  174. package/dist/taphos/array/without.js +1 -1
  175. package/dist/taphos/object/at.js +1 -1
  176. package/dist/taphos/object/extend.js +1 -1
  177. package/dist/taphos/object/invoke.js +1 -1
  178. package/dist/taphos/object/unset.js +2 -2
  179. package/dist/taphos/object/update.js +2 -2
  180. package/dist/taphos/util/rangeRight.js +1 -1
  181. package/dist/zygos/either.d.ts +1 -1
  182. package/dist/zygos/either.js +1 -1
  183. package/dist/zygos/option.d.ts +1 -1
  184. package/dist/zygos/result/result-async.d.ts +5 -5
  185. package/dist/zygos/result/result-async.js +5 -5
  186. package/dist/zygos/result/result.d.ts +3 -3
  187. package/dist/zygos/result/result.js +4 -4
  188. package/dist/zygos/safe.d.ts +1 -1
  189. package/dist/zygos/safe.js +1 -1
  190. package/dist/zygos/task-either.d.ts +3 -3
  191. package/dist/zygos/task-either.js +3 -3
  192. package/package.json +7 -2
@@ -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
  /**
3
3
  * Creates the base validator.
4
4
  */
@@ -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,4 +1,4 @@
1
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
1
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
2
2
  /**
3
3
  * Keyof schema - validates that the value is a key of an object.
4
4
  *
@@ -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,4 +1,4 @@
1
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
1
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
2
2
  /**
3
3
  * Omit transform - excludes specific properties.
4
4
  *
@@ -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,4 +1,4 @@
1
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
1
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
2
2
  /**
3
3
  * Partial transform - makes all properties optional.
4
4
  *
@@ -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,4 +1,4 @@
1
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
1
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
2
2
  /**
3
3
  * Pick transform - selects specific properties.
4
4
  *
@@ -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,4 +1,4 @@
1
- import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages";
1
+ import { ERROR_MESSAGES_COMPOSITION } from "../../core/consts/messages.js";
2
2
  /**
3
3
  * Required transform - makes all properties required.
4
4
  *
@@ -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 { NullableSchema } from "../../types/wrappers";
1
+ import { Schema } from "../../types/base.js";
2
+ import { NullableSchema } from "../../types/wrappers.js";
3
3
  /**
4
4
  * Makes a schema nullable (accepts null).
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
  *
@@ -1,5 +1,5 @@
1
- import { Schema } from "../../types/base";
2
- import { OptionalSchema } from "../../types/wrappers";
1
+ import { Schema } from "../../types/base.js";
2
+ import { OptionalSchema } from "../../types/wrappers.js";
3
3
  /**
4
4
  * Makes a schema optional (accepts undefined).
5
5
  *
@@ -1,5 +1,5 @@
1
- import { GenericSchema } from "../../types/base";
2
- import { ReadonlySchema } from "../../types/wrappers";
1
+ import { GenericSchema } from "../../types/base.js";
2
+ import { ReadonlySchema } from "../../types/wrappers.js";
3
3
  /**
4
4
  * Readonly schema - makes properties read-only (TypeScript semantics).
5
5
  *
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @since 2.0.0
5
5
  */
6
- import { GenericSchema, Schema, Infer } from "./base";
6
+ import { GenericSchema, Schema, Infer } from "./base.js";
7
7
  /**
8
8
  * Schema for object values with typed entries.
9
9
  *
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @since 2.0.0
5
5
  */
6
- import { Schema, GenericSchema, Infer } from "./base";
6
+ import { Schema, GenericSchema, Infer } from "./base.js";
7
7
  /**
8
8
  * Extension methods for string constraints.
9
9
  *
@@ -3,13 +3,13 @@
3
3
  *
4
4
  * @since 2.0.0
5
5
  */
6
- import type { SchemaType, GenericSchema } from "./base";
7
- import type { StringConstraint, NumberConstraint, ArrayConstraint, ObjectConstraint, DateConstraint, BigIntConstraint, SetConstraint, MapConstraint } from "./constraints";
8
- import type { StringSchema, NumberSchema, BooleanSchema, DateSchema, BigIntSchema, UnknownSchema, NullSchema, UndefinedSchema, VoidSchema, NeverSchema, SymbolSchema, IntSchema, EnumSchema, LiteralSchema, NativeEnumSchema, AnySchema } from "./primitives";
9
- import type { ObjectSchema, ArraySchema, TupleSchema, RecordSchema, MapSchema, SetSchema } from "./composites";
10
- import type { UnionSchema, IntersectionSchema } from "./operators";
11
- import type { KeyofSchema, PartialSchema, RequiredSchema, PickSchema, OmitSchema } from "./transforms";
12
- import type { NullableSchema, NullishSchema, OptionalSchema, DefaultSchema, ReadonlySchema, LazySchema } from "./wrappers";
6
+ import type { SchemaType, GenericSchema } from "./base.js";
7
+ import type { StringConstraint, NumberConstraint, ArrayConstraint, ObjectConstraint, DateConstraint, BigIntConstraint, SetConstraint, MapConstraint } from "./constraints.js";
8
+ import type { StringSchema, NumberSchema, BooleanSchema, DateSchema, BigIntSchema, UnknownSchema, NullSchema, UndefinedSchema, VoidSchema, NeverSchema, SymbolSchema, IntSchema, EnumSchema, LiteralSchema, NativeEnumSchema, AnySchema } from "./primitives.js";
9
+ import type { ObjectSchema, ArraySchema, TupleSchema, RecordSchema, MapSchema, SetSchema } from "./composites.js";
10
+ import type { UnionSchema, IntersectionSchema } from "./operators.js";
11
+ import type { KeyofSchema, PartialSchema, RequiredSchema, PickSchema, OmitSchema } from "./transforms.js";
12
+ import type { NullableSchema, NullishSchema, OptionalSchema, DefaultSchema, ReadonlySchema, LazySchema } from "./wrappers.js";
13
13
  /**
14
14
  * Lookup table mapping SchemaType literals to their corresponding schema types.
15
15
  * @internal
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * @since 2.0.0
5
5
  */
6
- import { Schema, GenericSchema, Infer } from "./base";
7
- import { LiteralSchema, EnumValue } from "./primitives";
6
+ import { Schema, GenericSchema, Infer } from "./base.js";
7
+ import { LiteralSchema, EnumValue } from "./primitives.js";
8
8
  type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
9
9
  /**
10
10
  * Schema for union types.
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @since 2.0.0
5
5
  */
6
- import { Schema } from "./base";
6
+ import { Schema } from "./base.js";
7
7
  /**
8
8
  * Valid values for enum schemas.
9
9
  *
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @since 2.0.0
5
5
  */
6
- import { Schema, GenericSchema, Infer } from "./base";
6
+ import { Schema, GenericSchema, Infer } from "./base.js";
7
7
  /**
8
8
  * Schema for keyof transform.
9
9
  *
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @since 2.0.0
5
5
  */
6
- import { Schema, GenericSchema, Infer, SchemaWrapperType } from "./base";
6
+ import { Schema, GenericSchema, Infer, SchemaWrapperType } from "./base.js";
7
7
  /**
8
8
  * Schema for nullable values.
9
9
  *
@@ -1,4 +1,4 @@
1
- import { Schema } from "./types/base";
1
+ import { Schema } from "./types/base.js";
2
2
  /**
3
3
  * Result type for safe parsing operations.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { parse } from "./core/parser";
1
+ import { parse } from "./core/parser.js";
2
2
  /**
3
3
  * Kanon V3 lightweight validation helpers (Zod-like ergonomics, minimal surface).
4
4
  *
@@ -1,4 +1,4 @@
1
- import { at } from "./at";
1
+ import { at } from "./at.js";
2
2
  /**
3
3
  * Gets the element at index n of array.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { pull } from "./pull";
1
+ import { pull } from "./pull.js";
2
2
  /**
3
3
  * Creates an array excluding all specified values.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { differenceBy } from "../../arkhe/array/difference-by";
1
+ import { differenceBy } from "../../arkhe/array/difference-by.js";
2
2
  /**
3
3
  * Removes all given values from array using an iteratee for equality comparisons.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { differenceWith } from "../../arkhe/array/difference-with";
1
+ import { differenceWith } from "../../arkhe/array/difference-with.js";
2
2
  /**
3
3
  * Removes all given values from array using a comparator function for equality.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { difference } from "../../arkhe/array/difference";
1
+ import { difference } from "../../arkhe/array/difference.js";
2
2
  /**
3
3
  * Creates an array excluding all given values.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { get } from "../../arkhe/object/get";
1
+ import { get } from "../../arkhe/object/get.js";
2
2
  /**
3
3
  * Creates an array of values corresponding to paths of object.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { assign } from "./assign";
1
+ import { assign } from "./assign.js";
2
2
  /**
3
3
  * Assigns own enumerable string keyed properties of source objects to the destination object.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { get } from "../../arkhe/object/get";
1
+ import { get } from "../../arkhe/object/get.js";
2
2
  /**
3
3
  * Invokes the method at path of object with the given arguments.
4
4
  *
@@ -1,5 +1,5 @@
1
- import { parsePath } from "../../arkhe/string/parsers/path-parser";
2
- import { deepClone } from "../../arkhe/object/deep-clone";
1
+ import { parsePath } from "../../arkhe/string/parsers/path-parser.js";
2
+ import { deepClone } from "../../arkhe/object/deep-clone.js";
3
3
  /**
4
4
  * Removes the property at path of object, returning a new object (immutable).
5
5
  *
@@ -1,5 +1,5 @@
1
- import { get } from "../../arkhe/object/get";
2
- import { set } from "../../arkhe/object/set";
1
+ import { get } from "../../arkhe/object/get.js";
2
+ import { set } from "../../arkhe/object/set.js";
3
3
  /**
4
4
  * Updates the value at path of object using an updater function, returning a new object (immutable).
5
5
  *
@@ -1,4 +1,4 @@
1
- import { range } from "../../arkhe/util/range";
1
+ import { range } from "../../arkhe/util/range.js";
2
2
  export function rangeRight(startOrEnd, end, step) {
3
3
  // Stryker disable next-line ConditionalExpression,BlockStatement: range() handles undefined end the same way, so the check is for clarity
4
4
  if (end === undefined) {
@@ -3,7 +3,7 @@
3
3
  * Covers 90% of essential use cases.
4
4
  * @since 1.0.0
5
5
  */
6
- import { Nullish } from "../arkhe/types/common/nullish";
6
+ import { Nullish } from "../arkhe/types/common/nullish.js";
7
7
  /**
8
8
  * Represents the Left variant of Either containing an error value.
9
9
  * @template E - The error type.
@@ -3,7 +3,7 @@
3
3
  * Covers 90% of essential use cases.
4
4
  * @since 1.0.0
5
5
  */
6
- import { isSomeOption } from "../arkhe/types/utilities/is-some-option";
6
+ import { isSomeOption } from "../arkhe/types/utilities/is-some-option.js";
7
7
  // -------------------------------------------------------------------------------------
8
8
  // constructors
9
9
  // -------------------------------------------------------------------------------------
@@ -6,7 +6,7 @@
6
6
  * If the value is absent, it's an instance of None.
7
7
  * @since 1.0.0
8
8
  */
9
- import { Nullish } from "../arkhe/types/common/nullish";
9
+ import { Nullish } from "../arkhe/types/common/nullish.js";
10
10
  /**
11
11
  * Represents the absence of a value.
12
12
  * @since 2.0.0
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * @example
18
18
  * ```typescript
19
- * import { okAsync, errAsync, ResultAsync } from './result-async';
19
+ * import { okAsync, errAsync, ResultAsync } from './result-async.js';
20
20
  *
21
21
  * // Create async results
22
22
  * const success = okAsync(Promise.resolve(42));
@@ -34,7 +34,7 @@
34
34
  *
35
35
  * @since 1.1.0
36
36
  */
37
- import { Result } from "../result/result";
37
+ import { Result } from "../result/result.js";
38
38
  /**
39
39
  * Represents an asynchronous Result that wraps a Promise.
40
40
  *
@@ -460,7 +460,7 @@ export declare function errAsync<T = never, E = unknown>(err: E): ResultAsync<T,
460
460
  * @since 2.0.0
461
461
  * @example
462
462
  * ```typescript
463
- * import { fromPromise } from './result-async';
463
+ * import { fromPromise } from './result-async.js';
464
464
  *
465
465
  * const result = fromPromise(
466
466
  * fetch('/api/data'),
@@ -475,7 +475,7 @@ export declare const fromPromise: typeof ResultAsync.fromPromise;
475
475
  * @since 2.0.0
476
476
  * @example
477
477
  * ```typescript
478
- * import { fromSafePromise } from './result-async';
478
+ * import { fromSafePromise } from './result-async.js';
479
479
  *
480
480
  * const result = fromSafePromise(Promise.resolve(42));
481
481
  * ```
@@ -489,7 +489,7 @@ export declare const fromSafePromise: typeof ResultAsync.fromSafePromise;
489
489
  * @since 2.0.0
490
490
  * @example
491
491
  * ```typescript
492
- * import { fromAsyncThrowable } from './result-async';
492
+ * import { fromAsyncThrowable } from './result-async.js';
493
493
  *
494
494
  * const safeFetch = fromAsyncThrowable(
495
495
  * fetch,
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * @example
18
18
  * ```typescript
19
- * import { okAsync, errAsync, ResultAsync } from './result-async';
19
+ * import { okAsync, errAsync, ResultAsync } from './result-async.js';
20
20
  *
21
21
  * // Create async results
22
22
  * const success = okAsync(Promise.resolve(42));
@@ -34,7 +34,7 @@
34
34
  *
35
35
  * @since 1.1.0
36
36
  */
37
- import { Ok, Err, ok, err } from "../result/result";
37
+ import { Ok, Err, ok, err } from "../result/result.js";
38
38
  /**
39
39
  * Represents an asynchronous Result that wraps a Promise.
40
40
  *
@@ -562,7 +562,7 @@ export function errAsync(err) {
562
562
  * @since 2.0.0
563
563
  * @example
564
564
  * ```typescript
565
- * import { fromPromise } from './result-async';
565
+ * import { fromPromise } from './result-async.js';
566
566
  *
567
567
  * const result = fromPromise(
568
568
  * fetch('/api/data'),
@@ -577,7 +577,7 @@ export const fromPromise = ResultAsync.fromPromise;
577
577
  * @since 2.0.0
578
578
  * @example
579
579
  * ```typescript
580
- * import { fromSafePromise } from './result-async';
580
+ * import { fromSafePromise } from './result-async.js';
581
581
  *
582
582
  * const result = fromSafePromise(Promise.resolve(42));
583
583
  * ```
@@ -591,7 +591,7 @@ export const fromSafePromise = ResultAsync.fromSafePromise;
591
591
  * @since 2.0.0
592
592
  * @example
593
593
  * ```typescript
594
- * import { fromAsyncThrowable } from './result-async';
594
+ * import { fromAsyncThrowable } from './result-async.js';
595
595
  *
596
596
  * const safeFetch = fromAsyncThrowable(
597
597
  * fetch,
@@ -17,7 +17,7 @@
17
17
  *
18
18
  * @example
19
19
  * ```typescript
20
- * import { ok, err, Result } from './result';
20
+ * import { ok, err, Result } from './result.js';
21
21
  *
22
22
  * // Success case
23
23
  * const success: Result<number, string> = ok(42);
@@ -532,6 +532,6 @@ export declare const toEither: <A, E>(fa: Result<A, E>) => {
532
532
  left?: E;
533
533
  right?: A;
534
534
  };
535
- export * from "./result-async";
536
- export { okAsync, errAsync, ResultAsync, fromPromise, fromSafePromise, fromAsyncThrowable, } from "./result-async";
535
+ export * from "./result-async.js";
536
+ export { okAsync, errAsync, ResultAsync, fromPromise, fromSafePromise, fromAsyncThrowable, } from "./result-async.js";
537
537
  //# sourceMappingURL=result.d.ts.map
@@ -17,7 +17,7 @@
17
17
  *
18
18
  * @example
19
19
  * ```typescript
20
- * import { ok, err, Result } from './result';
20
+ * import { ok, err, Result } from './result.js';
21
21
  *
22
22
  * // Success case
23
23
  * const success: Result<number, string> = ok(42);
@@ -34,7 +34,7 @@
34
34
  *
35
35
  * @since 1.1.0
36
36
  */
37
- import { isSomeOption } from "../../arkhe/types/utilities/is-some-option";
37
+ import { isSomeOption } from "../../arkhe/types/utilities/is-some-option.js";
38
38
  /**
39
39
  * Represents a successful result containing a value.
40
40
  *
@@ -432,7 +432,7 @@ export const toEither = (fa) => fa.isOk()
432
432
  ? { _tag: "Right", right: fa.value }
433
433
  : { _tag: "Left", left: fa.error };
434
434
  // Export async functionality
435
- export * from "./result-async";
435
+ export * from "./result-async.js";
436
436
  // Explicit exports for better compatibility
437
- export { okAsync, errAsync, ResultAsync, fromPromise, fromSafePromise, fromAsyncThrowable, } from "./result-async";
437
+ export { okAsync, errAsync, ResultAsync, fromPromise, fromSafePromise, fromAsyncThrowable, } from "./result-async.js";
438
438
  //# sourceMappingURL=result.js.map
@@ -1,4 +1,4 @@
1
- import { Result } from "./result/result";
1
+ import { Result } from "./result/result.js";
2
2
  /**
3
3
  * Wraps a function to return a Result instead of throwing errors.
4
4
  * @template TArgs - The argument types.
@@ -1,4 +1,4 @@
1
- import { err, ok } from "./result/result";
1
+ import { err, ok } from "./result/result.js";
2
2
  /**
3
3
  * Wraps a function to return a Result instead of throwing errors.
4
4
  * @template TArgs - The argument types.
@@ -3,9 +3,9 @@
3
3
  * Covers 95% of essential use cases.
4
4
  * @since 1.0.0
5
5
  */
6
- import * as E from "./either";
7
- import type { Task } from "./task";
8
- import { ErrorType } from "../arkhe/types/utilities/error-type";
6
+ import * as E from "./either.js";
7
+ import type { Task } from "./task.js";
8
+ import { ErrorType } from "../arkhe/types/utilities/error-type.js";
9
9
  /**
10
10
  * TaskEither represents an asynchronous computation that may fail.
11
11
  * @template E - The error type.
@@ -3,9 +3,9 @@
3
3
  * Covers 95% of essential use cases.
4
4
  * @since 1.0.0
5
5
  */
6
- import * as E from "./either";
7
- import { isSomeOption } from "../arkhe/types/utilities/is-some-option";
8
- import { isNonNullable } from "../arkhe/is/guard/is-non-nullable";
6
+ import * as E from "./either.js";
7
+ import { isSomeOption } from "../arkhe/types/utilities/is-some-option.js";
8
+ import { isNonNullable } from "../arkhe/is/guard/is-non-nullable.js";
9
9
  // -------------------------------------------------------------------------------------
10
10
  // constructors
11
11
  // -------------------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pithos/core",
3
- "version": "2.0.1",
3
+ "version": "2.1.1",
4
4
  "description": "Advanced JavaScript/TypeScript superset providing utilities, validation, and functional patterns",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,6 +25,7 @@
25
25
  "./arkhe/types/performance/*": "./dist/arkhe/types/performance/*.js",
26
26
  "./arkhe/types/utilities/*": "./dist/arkhe/types/utilities/*.js",
27
27
  "./arkhe/util/*": "./dist/arkhe/util/*.js",
28
+ "./bridges/*": "./dist/bridges/*.js",
28
29
  "./kanon/core/consts/*": "./dist/kanon/core/consts/*.js",
29
30
  "./kanon/core/*": "./dist/kanon/core/*.js",
30
31
  "./kanon/helpers/*": "./dist/kanon/helpers/*.js",
@@ -70,7 +71,11 @@
70
71
  "utilities",
71
72
  "validation",
72
73
  "functional",
73
- "ecosystem"
74
+ "ecosystem",
75
+ "lodash-alternative",
76
+ "zod-alternative",
77
+ "neverthrow-alternative",
78
+ "fp-ts-alternative"
74
79
  ],
75
80
  "author": "Pierre Moati <mopi1402>",
76
81
  "license": "MIT",