@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 { 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,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.
|
package/dist/kanon/validation.js
CHANGED
package/dist/taphos/array/nth.js
CHANGED
package/dist/taphos/object/at.js
CHANGED
|
@@ -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) {
|
package/dist/zygos/either.d.ts
CHANGED
|
@@ -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.
|
package/dist/zygos/either.js
CHANGED
|
@@ -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
|
// -------------------------------------------------------------------------------------
|
package/dist/zygos/option.d.ts
CHANGED
|
@@ -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
|
package/dist/zygos/safe.d.ts
CHANGED
package/dist/zygos/safe.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Advanced JavaScript/TypeScript superset providing utilities, validation, and functional patterns",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"./kanon/core/*": "./dist/kanon/core/*.js",
|
|
31
31
|
"./kanon/helpers/*": "./dist/kanon/helpers/*.js",
|
|
32
32
|
"./kanon/*": "./dist/kanon/*.js",
|
|
33
|
+
"./kanon": "./dist/kanon/index.js",
|
|
33
34
|
"./kanon/jit/builders/*": "./dist/kanon/jit/builders/*.js",
|
|
34
35
|
"./kanon/jit/builders/composites/*": "./dist/kanon/jit/builders/composites/*.js",
|
|
35
36
|
"./kanon/jit/builders/operators/*": "./dist/kanon/jit/builders/operators/*.js",
|