functype 1.9.0 → 1.11.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/README.md +34 -1
- package/dist/Invariant-DEan-SxV.d.ts +35 -0
- package/dist/Wire-3hvw0Ogg.d.ts +42 -0
- package/dist/cli/exports.d.ts +6 -6
- package/dist/cli/exports.js +1 -1
- package/dist/cli/index.js +5 -5
- package/dist/conditional/index.d.ts +1 -1
- package/dist/conditional/index.js +1 -1
- package/dist/core/task/index.d.ts +1 -1
- package/dist/core/task/index.js +1 -1
- package/dist/decoder/index.d.ts +1 -1
- package/dist/decoder/index.js +1 -1
- package/dist/do/index.d.ts +1 -1
- package/dist/do/index.js +1 -1
- package/dist/either/index.d.ts +1 -1
- package/dist/either/index.js +1 -1
- package/dist/fetch/index.d.ts +1 -1
- package/dist/fetch/index.js +1 -1
- package/dist/{full-interfaces-5E1X7vP5.js → full-interfaces-C17SWBLA.js} +16 -6
- package/dist/functype/index.d.ts +1 -1
- package/dist/{index-CIS_THnu.d.ts → index-CXXlorKz.d.ts} +117 -8
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/dist/invariant/index.d.ts +2 -0
- package/dist/invariant/index.js +1 -0
- package/dist/io/index.d.ts +1 -1
- package/dist/io/index.js +1 -1
- package/dist/lazy/index.d.ts +1 -1
- package/dist/lazy/index.js +1 -1
- package/dist/list/index.d.ts +1 -1
- package/dist/list/index.js +1 -1
- package/dist/map/index.d.ts +1 -1
- package/dist/map/index.js +1 -1
- package/dist/obj/index.d.ts +1 -1
- package/dist/obj/index.js +1 -1
- package/dist/option/index.d.ts +1 -1
- package/dist/option/index.js +1 -1
- package/dist/serialization/index.d.ts +1 -1
- package/dist/serialization/index.js +1 -1
- package/dist/serialization-CpbxaV0t.js +4 -0
- package/dist/set/index.d.ts +1 -1
- package/dist/set/index.js +1 -1
- package/dist/src-BUA74biP.js +17 -0
- package/dist/try/index.d.ts +1 -1
- package/dist/try/index.js +1 -1
- package/dist/tuple/index.js +1 -1
- package/dist/typeclass/index.d.ts +1 -1
- package/dist/util/index.d.ts +2 -3
- package/dist/wire/index.d.ts +2 -2
- package/package.json +16 -11
- package/dist/Wire-DNwezIvG.d.ts +0 -30
- package/dist/serialization-my_TLROv.js +0 -4
- package/dist/src-i6unVIl3.js +0 -17
|
@@ -495,7 +495,12 @@ interface EitherBase<out L extends Type, out R extends Type> extends FunctypeSum
|
|
|
495
495
|
isLeft(): this is LeftOf<L, R>;
|
|
496
496
|
isRight(): this is RightOf<L, R>;
|
|
497
497
|
orElse<R2 extends Type>(defaultValue: R2): R | R2;
|
|
498
|
-
|
|
498
|
+
/**
|
|
499
|
+
* Returns the Right value, or throws on a Left. Pass an `Error` to throw it, or a builder to make one
|
|
500
|
+
* from the Left value — for code that must throw for a host (a retrying step runner, an MCP tool, a
|
|
501
|
+
* React Query `queryFn`). With no argument, throws the Left value itself.
|
|
502
|
+
*/
|
|
503
|
+
orThrow: (error?: Error | ((left: L) => Error)) => R;
|
|
499
504
|
/**
|
|
500
505
|
* Returns the right value, or calls the never-returning handler with the Left's value.
|
|
501
506
|
* Use this when you have a helper like `(msg) => fail(msg, 2)` that terminates the
|
|
@@ -1170,7 +1175,11 @@ interface Try<out T> extends FunctypeSum<T, TypeNames>, Extractable<T>, Pipe<T>,
|
|
|
1170
1175
|
error: Error;
|
|
1171
1176
|
};
|
|
1172
1177
|
orElse<T2 extends Type>(defaultValue: T2): T | T2;
|
|
1173
|
-
|
|
1178
|
+
/**
|
|
1179
|
+
* Returns the value, or throws on a Failure. Pass an `Error` to throw it, or a builder to make one from
|
|
1180
|
+
* the failure's error. With no argument, rethrows the original error.
|
|
1181
|
+
*/
|
|
1182
|
+
orThrow: (error?: Error | ((error: Error) => Error)) => T;
|
|
1174
1183
|
/**
|
|
1175
1184
|
* Returns the success value, or calls the never-returning handler with the Failure's error.
|
|
1176
1185
|
* Use this when you have a helper like `(msg) => fail(msg, 2)` that terminates the program —
|
|
@@ -4394,7 +4403,7 @@ declare const TestClock: {
|
|
|
4394
4403
|
/**
|
|
4395
4404
|
* Creates an IO that accesses the TestClock from the environment.
|
|
4396
4405
|
*/
|
|
4397
|
-
get: IO<TestClock, never, TestClock>;
|
|
4406
|
+
readonly get: IO<TestClock, never, TestClock>;
|
|
4398
4407
|
/**
|
|
4399
4408
|
* Creates an IO that advances the TestClock.
|
|
4400
4409
|
*/
|
|
@@ -4406,7 +4415,7 @@ declare const TestClock: {
|
|
|
4406
4415
|
/**
|
|
4407
4416
|
* Creates an IO that runs all pending tasks.
|
|
4408
4417
|
*/
|
|
4409
|
-
runAll: IO<TestClock,
|
|
4418
|
+
readonly runAll: IO<TestClock, never, void>;
|
|
4410
4419
|
/**
|
|
4411
4420
|
* Creates a context with a TestClock for testing.
|
|
4412
4421
|
*/
|
|
@@ -5630,6 +5639,105 @@ declare const Stack: (<A extends Type>(values?: A[]) => Stack<A>) & {
|
|
|
5630
5639
|
fromBinary: <A>(binary: string) => Stack<A>;
|
|
5631
5640
|
};
|
|
5632
5641
|
//#endregion
|
|
5642
|
+
//#region src/traced/TraceEvent.d.ts
|
|
5643
|
+
/**
|
|
5644
|
+
* Identifies which combinator emitted this event.
|
|
5645
|
+
* String union is open so callers can extend with custom ops.
|
|
5646
|
+
*/
|
|
5647
|
+
type TraceOp = "map" | "flatMap" | "filter" | "fold" | "orElse" | "unwrap" | (string & {});
|
|
5648
|
+
/**
|
|
5649
|
+
* One observation emitted by a TracedOption combinator.
|
|
5650
|
+
*
|
|
5651
|
+
* @field spanId - Groups all events from one chain together. Stable across re-wraps.
|
|
5652
|
+
* @field seq - Monotonic 0-based position within the span.
|
|
5653
|
+
* @field op - Which combinator fired.
|
|
5654
|
+
* @field tag - The container type name (e.g. "Option") from Symbol.toStringTag.
|
|
5655
|
+
* @field inTag - Variant entering the op ("Some" | "None" for Option).
|
|
5656
|
+
* @field outTag - Variant leaving the op; absent for terminal ops.
|
|
5657
|
+
* @field label - Optional caller-supplied code-path name.
|
|
5658
|
+
* @field meta - Op-specific detail (e.g. { kept: boolean } for filter).
|
|
5659
|
+
*/
|
|
5660
|
+
type TraceEvent = {
|
|
5661
|
+
readonly spanId: string;
|
|
5662
|
+
readonly seq: number;
|
|
5663
|
+
readonly op: TraceOp;
|
|
5664
|
+
readonly tag: string;
|
|
5665
|
+
readonly inTag: string;
|
|
5666
|
+
readonly outTag?: string;
|
|
5667
|
+
readonly label?: string;
|
|
5668
|
+
readonly meta?: Record<string, unknown>;
|
|
5669
|
+
};
|
|
5670
|
+
//#endregion
|
|
5671
|
+
//#region src/traced/Tracer.d.ts
|
|
5672
|
+
/**
|
|
5673
|
+
* A sink for structured trace events emitted by `TracedOption` chains.
|
|
5674
|
+
*
|
|
5675
|
+
* Type-only — no runtime, no opinion on output format, no `console`-global
|
|
5676
|
+
* dependency. Same rationale as `Logger`: core names the contract, consumers
|
|
5677
|
+
* own the implementation. The whole surface is one method, so the common
|
|
5678
|
+
* implementations are literals at the call site:
|
|
5679
|
+
*
|
|
5680
|
+
* ```ts
|
|
5681
|
+
* const noop: Tracer = { emit: () => undefined }
|
|
5682
|
+
* const collecting = (target: TraceEvent[]): Tracer => ({ emit: (e) => void target.push(e) })
|
|
5683
|
+
* const viaLogger = (logger: Logger): Tracer => ({ emit: (e) => logger.debug("trace", e) })
|
|
5684
|
+
* ```
|
|
5685
|
+
*
|
|
5686
|
+
* For dependency injection, declare your own Tag — `Tag` and `Layer` are
|
|
5687
|
+
* public from `functype/io`, and core deliberately does not reserve an id:
|
|
5688
|
+
*
|
|
5689
|
+
* ```ts
|
|
5690
|
+
* const Tracer = Tag<Tracer>("app/Tracer")
|
|
5691
|
+
* program.provideLayer(Layer.succeed(Tracer, { emit }))
|
|
5692
|
+
* ```
|
|
5693
|
+
*/
|
|
5694
|
+
interface Tracer {
|
|
5695
|
+
emit(event: TraceEvent): void;
|
|
5696
|
+
}
|
|
5697
|
+
//#endregion
|
|
5698
|
+
//#region src/traced/TracedOption.d.ts
|
|
5699
|
+
/**
|
|
5700
|
+
* A wrapper around `Option<A>` that emits a `TraceEvent` to the
|
|
5701
|
+
* injected `Tracer` on every combinator call.
|
|
5702
|
+
*
|
|
5703
|
+
* Structure-preserving ops return `TracedOption<B>`, carrying the same spanId
|
|
5704
|
+
* and incrementing seq. Terminal ops (`fold`, `orElse`) emit and return the
|
|
5705
|
+
* raw value, exiting the wrapper. `unwrap()` emits a terminal event too, so a
|
|
5706
|
+
* span never ends without one.
|
|
5707
|
+
*
|
|
5708
|
+
* @example
|
|
5709
|
+
* ```ts
|
|
5710
|
+
* declare const user: Option<{ name: string }>
|
|
5711
|
+
* const events: TraceEvent[] = []
|
|
5712
|
+
* const tracer = { emit: (e: TraceEvent) => void events.push(e) }
|
|
5713
|
+
*
|
|
5714
|
+
* TracedOption(user, tracer, "span-1")
|
|
5715
|
+
* .map(u => u.name.trim(), "trim")
|
|
5716
|
+
* .filter(n => n.length > 0, "non-empty")
|
|
5717
|
+
* .orElse("anonymous", "fallback")
|
|
5718
|
+
* ```
|
|
5719
|
+
*/
|
|
5720
|
+
type TracedOption<A> = {
|
|
5721
|
+
map<B>(f: (a: A) => B, label?: string): TracedOption<B>;
|
|
5722
|
+
flatMap<B>(f: (a: A) => Option<B>, label?: string): TracedOption<B>;
|
|
5723
|
+
filter(predicate: (a: A) => boolean, label?: string): TracedOption<A>;
|
|
5724
|
+
fold<B>(onNone: () => B, onSome: (a: A) => B, label?: string): B;
|
|
5725
|
+
orElse<B>(defaultValue: B, label?: string): A | B;
|
|
5726
|
+
unwrap(): Option<A>;
|
|
5727
|
+
};
|
|
5728
|
+
/**
|
|
5729
|
+
* Wraps `inner` with tracing. Each combinator emits one `TraceEvent` to `tracer`,
|
|
5730
|
+
* then delegates to the real Option implementation.
|
|
5731
|
+
*
|
|
5732
|
+
* @param inner - The Option to wrap.
|
|
5733
|
+
* @param tracer - Receives events. Typically obtained via IO.service(Tracer).
|
|
5734
|
+
* @param spanId - Groups all events from one chain. Required: core does not
|
|
5735
|
+
* generate ids, so tracing stays deterministic and free of a
|
|
5736
|
+
* global `crypto` dependency.
|
|
5737
|
+
* @param seq - Starting sequence number. Defaults to 0. Increments on each op.
|
|
5738
|
+
*/
|
|
5739
|
+
declare function TracedOption<A>(inner: Option<A>, tracer: Tracer, spanId: string, seq?: number): TracedOption<A>;
|
|
5740
|
+
//#endregion
|
|
5633
5741
|
//#region src/option/Option.d.ts
|
|
5634
5742
|
/**
|
|
5635
5743
|
* Option type module
|
|
@@ -5671,11 +5779,12 @@ interface Option<out T extends Type> extends Functype<T, "Some" | "None">, Promi
|
|
|
5671
5779
|
orElse<T2 extends Type>(defaultValue: T2): T | T2;
|
|
5672
5780
|
/**
|
|
5673
5781
|
* Returns the contained value or throws an error if None
|
|
5674
|
-
* @param error - Optional
|
|
5782
|
+
* @param error - Optional error to throw, or a builder that makes one (called only on None). If not
|
|
5783
|
+
* provided, throws a default error
|
|
5675
5784
|
* @returns The contained value
|
|
5676
|
-
* @throws The specified error or a default error if the Option is None
|
|
5785
|
+
* @throws The specified or built error, or a default error if the Option is None
|
|
5677
5786
|
*/
|
|
5678
|
-
orThrow(error?: Error): T;
|
|
5787
|
+
orThrow(error?: Error | (() => Error)): T;
|
|
5679
5788
|
/**
|
|
5680
5789
|
* Returns the contained value, or calls the never-returning handler if None.
|
|
5681
5790
|
* Use this when you have a helper like `(msg) => fail(msg, 2)` that terminates the
|
|
@@ -6185,4 +6294,4 @@ declare const Match: (<T extends Type>(value: T) => UntypedMatch<T>) & {
|
|
|
6185
6294
|
};
|
|
6186
6295
|
};
|
|
6187
6296
|
//#endregion
|
|
6188
|
-
export {
|
|
6297
|
+
export { TimeoutError as $, SerializedError as $n, TaggedThrowable as $t, Http as A, FunctypeCollection as An, Doable as Ar, safeStringify as At, HttpError as B, Serialization_d_exports as Bn, NoneError as Bt, HKT as C, UUID as Cn, Monad as Cr, ErrorChainElement as Ct, TryKind as D, FunctypeSum as Dn, isExtractable as Dr, createErrorSerializer as Dt, OptionKind as E, ValidatedBrandCompanion as En, Extractable as Er, TaskErrorInfo as Et, HttpRequestOptions as F, Set as Fn, EmptyListError as Ft, TestClock as G, createSerializationCompanion as Gn, DecoderErrorComposite as Gt, HttpStatusError as H, FunctypeEnvelope as Hn, unwrap as Ht, HttpRequestView as I, List as In, FailureError as It, IO as J, envelope as Jn, CancellationToken as Jt, TestClockTag as K, createSerializer as Kn, DecoderErrorLeaf as Kt, HttpResponse as L, Try as Ln, FailureErrorType as Lt, HttpClientConfig as M, Matchable as Mn, Do as Mt, HttpMethodOptions as N, MatchableUtils as Nn, DoAsync as Nt, UniversalContainer as O, Functype as On, ParseError as Or, formatError as Ot, HttpQueryParams as P, Collection as Pn, DoGenerator as Pt, Task as Q, taggedEnvelope as Qn, Sync as Qt, ParseMode as R, TypeNames as Rn, LeftError as Rt, EitherKind as S, PositiveNumber as Sn, Functor as Sr, TypedErrorContext as St, ListKind as T, ValidatedBrand as Tn, ContainerOps as Tr, ErrorWithTaskInfo as Tt, NetworkError as U, SerializationResult as Un, Decoder as Ut, HttpMethod as V, FUNCTYPE_MARKER as Vn, isDoCapable as Vt, ResponseDecodeError as W, createCustomSerializer as Wn, DecoderError as Wt, RIO as X, fromJSON as Xn, Err as Xt, InterruptedError as Y, fromBinary as Yn, CancellationTokenSource as Yt, RepeatExhausted as Z, fromYAML as Zn, Ok as Zt, ESMapType as _, IntegerNumber as _n, reduceRightWiden as _r, Validator as _t, OptionConstructor as a, TaskResult as an, Left as ar, LayerOutput as at, Lazy as b, PatternString as bn, Applicative as br, ErrorStatus as bt, Tracer as c, isTaggedThrowable as cn, RightOf as cr, Context as ct, Stack as d, ThrowableType as dn, TypeCheckRight as dr, Tag as dt, Task$1 as en, deserializeError as er, UIO as et, Valuable as f, Base as fn, isLeft as fr, TagService as ft, ESMap as g, ISO8601Date as gn, Widen as gr, ValidationRule as gt, Obj as h, EmailAddress as hn, tryCatchAsync as hr, Validation as ht, Option as i, TaskParams as in, EitherBase as ir, LayerInput as it, HttpClient as j, Traversable as jn, Cond as jr, $ as jt, FoldableUtils as k, FunctypeBase as kn, DoResult as kr, formatStackTrace as kt, TraceEvent as l, NAME as ln, TestEither as lr, ContextServices as lt, Ref as m, BoundedString as mn, tryCatch as mr, FormValidation as mt, UntypedMatch as n, TaskMetadata as nn, LazyList as nr, Layer as nt, Some as o, TaskSuccess as on, LeftOf as or, Exit as ot, ValuableParams as p, BoundedNumber as pn, isRight as pr, FieldValidation as pt, TestContext as q, createTaggedSerializer as qn, Async as qt, None as r, TaskOutcome as rn, Either as rr, LayerError as rt, TracedOption as s, createCancellationTokenSource as sn, Right as sr, ExitTag as st, Match as t, TaskFailure as tn, serializeError as tr, UnsupportedSyncOperationError as tt, TraceOp as u, Throwable as un, TypeCheckLeft as ur, HasService as ut, Map$1 as v, NonEmptyString as vn, reduceWiden as vr, ErrorCode as vt, Kind as w, UrlString as wn, CollectionOps as wr, ErrorFormatterOptions as wt, Identity as x, PositiveInteger as xn, AsyncMonad as xr, TypedError as xt, KVTraversable as y, NonNegativeNumber as yn, Promisable as yr, ErrorMessage as yt, DecodeError as z, JSONValue as zn, LeftErrorType as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { a as ExtractBrand, c as hasBrand, i as BrandedString, l as unwrapBrand, n as BrandedBoolean, o as Unwrap, r as BrandedNumber, s as createBrander, t as Brand } from "./Brand-bfnGXuum.js";
|
|
2
2
|
import { i as Companion, n as InstanceType, r as isCompanion, t as CompanionMethods } from "./CompanionTypes-Cc90cQ4P.js";
|
|
3
3
|
import { a as isTypeable, c as SerializationMethods, d as Type, i as TypeableParams, l as Pipe, n as ExtractTag, o as Serializable, r as Typeable, s as SerializableEnvelope, t as Tuple, u as Foldable } from "./Tuple-B8KM-H8Y.js";
|
|
4
|
-
import { $ as
|
|
4
|
+
import { $ as TimeoutError, $n as SerializedError, $t as TaggedThrowable, A as Http, An as FunctypeCollection, Ar as Doable, At as safeStringify, B as HttpError, Bn as Serialization_d_exports, Bt as NoneError, C as HKT, Cn as UUID, Cr as Monad, Ct as ErrorChainElement, D as TryKind, Dn as FunctypeSum, Dr as isExtractable, Dt as createErrorSerializer, E as OptionKind, En as ValidatedBrandCompanion, Er as Extractable, Et as TaskErrorInfo, F as HttpRequestOptions, Fn as Set, Ft as EmptyListError, G as TestClock, Gn as createSerializationCompanion, Gt as DecoderErrorComposite, H as HttpStatusError, Hn as FunctypeEnvelope, Ht as unwrap, I as HttpRequestView, In as List, It as FailureError, J as IO, Jn as envelope, Jt as CancellationToken, K as TestClockTag, Kn as createSerializer, Kt as DecoderErrorLeaf, L as HttpResponse, Ln as Try, Lt as FailureErrorType, M as HttpClientConfig, Mn as Matchable, Mt as Do, N as HttpMethodOptions, Nn as MatchableUtils, Nt as DoAsync, O as UniversalContainer, On as Functype, Or as ParseError, Ot as formatError, P as HttpQueryParams, Pn as Collection, Pt as DoGenerator, Q as Task, Qn as taggedEnvelope, Qt as Sync, R as ParseMode, Rn as TypeNames, Rt as LeftError, S as EitherKind, Sn as PositiveNumber, Sr as Functor, St as TypedErrorContext, T as ListKind, Tn as ValidatedBrand, Tr as ContainerOps, Tt as ErrorWithTaskInfo, U as NetworkError, Un as SerializationResult, Ut as Decoder, V as HttpMethod, Vn as FUNCTYPE_MARKER, Vt as isDoCapable, W as ResponseDecodeError, Wn as createCustomSerializer, Wt as DecoderError, X as RIO, Xn as fromJSON, Xt as Err, Y as InterruptedError, Yn as fromBinary, Yt as CancellationTokenSource, Z as RepeatExhausted, Zn as fromYAML, Zt as Ok, _ as ESMapType, _n as IntegerNumber, _r as reduceRightWiden, _t as Validator, a as OptionConstructor, an as TaskResult, ar as Left, at as LayerOutput, b as Lazy, bn as PatternString, br as Applicative, bt as ErrorStatus, c as Tracer, cn as isTaggedThrowable, cr as RightOf, ct as Context, d as Stack, dn as ThrowableType, dr as TypeCheckRight, dt as Tag, en as Task$1, er as deserializeError, et as UIO, f as Valuable, fn as Base, fr as isLeft, ft as TagService, g as ESMap, gn as ISO8601Date, gr as Widen, gt as ValidationRule, h as Obj, hn as EmailAddress, hr as tryCatchAsync, ht as Validation, i as Option, in as TaskParams, ir as EitherBase, it as LayerInput, j as HttpClient, jn as Traversable, jr as Cond, jt as $, k as FoldableUtils, kn as FunctypeBase, kr as DoResult, kt as formatStackTrace, l as TraceEvent, ln as NAME, lr as TestEither, lt as ContextServices, m as Ref, mn as BoundedString, mr as tryCatch, mt as FormValidation, n as UntypedMatch, nn as TaskMetadata, nr as LazyList, nt as Layer, o as Some, on as TaskSuccess, or as LeftOf, ot as Exit, p as ValuableParams, pn as BoundedNumber, pr as isRight, pt as FieldValidation, q as TestContext, qn as createTaggedSerializer, qt as Async, r as None, rn as TaskOutcome, rr as Either, rt as LayerError, s as TracedOption, sn as createCancellationTokenSource, sr as Right, st as ExitTag, t as Match, tn as TaskFailure, tr as serializeError, tt as UnsupportedSyncOperationError, u as TraceOp, un as Throwable, ur as TypeCheckLeft, ut as HasService, v as Map, vn as NonEmptyString, vr as reduceWiden, vt as ErrorCode, w as Kind, wn as UrlString, wr as CollectionOps, wt as ErrorFormatterOptions, x as Identity, xn as PositiveInteger, xr as AsyncMonad, xt as TypedError, y as KVTraversable, yn as NonNegativeNumber, yr as Promisable, yt as ErrorMessage, z as DecodeError, zn as JSONValue, zt as LeftErrorType } from "./index-CXXlorKz.js";
|
|
5
|
+
import { n as invariant, t as InvariantViolation } from "./Invariant-DEan-SxV.js";
|
|
5
6
|
import { t as Logger } from "./Logger-BmprRS8v.js";
|
|
6
|
-
import { t as Wire } from "./Wire-
|
|
7
|
-
export { $, type Applicative, Async, type AsyncMonad, Base, BoundedNumber, BoundedString, Brand, BrandedBoolean, type BrandedBoolean as BrandedBooleanType, BrandedNumber, type BrandedNumber as BrandedNumberType, BrandedString, type BrandedString as BrandedStringType, CancellationToken, CancellationTokenSource, Collection, type CollectionOps, Companion, CompanionMethods, Cond, type ContainerOps, Context, type Context as ContextType, type ContextServices, type DecodeError, Decoder, DecoderError, type DecoderErrorComposite, type DecoderErrorLeaf, Do, DoAsync, DoGenerator, type DoResult, type Doable, ESMap, ESMapType, Either, EitherBase, EitherKind, EmailAddress, EmptyListError, Err, ErrorChainElement, ErrorCode, ErrorFormatterOptions, ErrorMessage, ErrorStatus, ErrorWithTaskInfo, Exit, type Exit as ExitType, type ExitTag, type ExtractBrand, ExtractTag, type Extractable, FUNCTYPE_MARKER, FailureError, FailureErrorType, FieldValidation, Foldable, FoldableUtils, FormValidation, type Functor, Functype, FunctypeBase, FunctypeCollection, FunctypeEnvelope, FunctypeSum, HKT, type HasService, Http, HttpClient, type HttpClientConfig, type HttpError, HttpError as HttpErrors, type HttpMethod, type HttpMethodOptions, type HttpQueryParams, type HttpRequestOptions, type HttpRequestView, type HttpResponse, type HttpStatusError, IO, type IO as IOType, type Task as IOTask, ISO8601Date, Identity, InstanceType, IntegerNumber, InterruptedError, type JSONValue, KVTraversable, Kind, Layer, type Layer as LayerType, type LayerError, type LayerInput, type LayerOutput, Lazy, type Lazy as LazyType, LazyList, Left, LeftError, LeftErrorType, LeftOf, List, ListKind, type Logger, Map, Match, type Matchable, MatchableUtils, type Monad, NAME, type NetworkError, NonEmptyString, NonNegativeNumber, None, NoneError, Obj, Ok, Option, OptionConstructor, OptionKind, ParseError, type ParseMode, PatternString, Pipe, PositiveInteger, PositiveNumber, type Promisable, type RIO, Ref, type Ref as RefType, RepeatExhausted, type ResponseDecodeError, Right, RightOf, Serializable, SerializableEnvelope, Serialization_d_exports as Serialization, SerializationMethods, SerializationResult, SerializedError, Set, Some, Stack, Sync, Tag, type Tag as TagType, type TagService, TaggedThrowable, Task$1 as Task, TaskErrorInfo, TaskFailure, TaskMetadata, TaskOutcome, TaskParams, TaskResult, TaskSuccess, TestClock, type TestClock as TestClockType, TestClockTag, TestContext, type TestContext as TestContextType, TestEither, Throwable, ThrowableType, TimeoutError, Traversable, Try, TryKind, Tuple, Type, TypeCheckLeft, TypeCheckRight, TypeNames, Typeable, TypeableParams, TypedError, TypedErrorContext, type UIO, UUID, UniversalContainer, UnsupportedSyncOperationError, UntypedMatch, type Unwrap, UrlString, ValidatedBrand, type ValidatedBrand as ValidatedBrandType, type ValidatedBrandCompanion, Validation, ValidationRule, Validator, Valuable, ValuableParams, type Widen, type Wire, createBrander, createCancellationTokenSource, createCustomSerializer, createErrorSerializer, createSerializationCompanion, createSerializer, createTaggedSerializer, deserializeError, envelope, formatError, formatStackTrace, fromBinary, fromJSON, fromYAML, hasBrand, isCompanion, isDoCapable, isExtractable, isLeft, isRight, isTaggedThrowable, isTypeable, reduceRightWiden, reduceWiden, safeStringify, serializeError, taggedEnvelope, tryCatch, tryCatchAsync, unwrap, unwrapBrand };
|
|
7
|
+
import { n as WireMark, t as Wire } from "./Wire-3hvw0Ogg.js";
|
|
8
|
+
export { $, type Applicative, Async, type AsyncMonad, Base, BoundedNumber, BoundedString, Brand, BrandedBoolean, type BrandedBoolean as BrandedBooleanType, BrandedNumber, type BrandedNumber as BrandedNumberType, BrandedString, type BrandedString as BrandedStringType, CancellationToken, CancellationTokenSource, Collection, type CollectionOps, Companion, CompanionMethods, Cond, type ContainerOps, Context, type Context as ContextType, type ContextServices, type DecodeError, Decoder, DecoderError, type DecoderErrorComposite, type DecoderErrorLeaf, Do, DoAsync, DoGenerator, type DoResult, type Doable, ESMap, ESMapType, Either, EitherBase, EitherKind, EmailAddress, EmptyListError, Err, ErrorChainElement, ErrorCode, ErrorFormatterOptions, ErrorMessage, ErrorStatus, ErrorWithTaskInfo, Exit, type Exit as ExitType, type ExitTag, type ExtractBrand, ExtractTag, type Extractable, FUNCTYPE_MARKER, FailureError, FailureErrorType, FieldValidation, Foldable, FoldableUtils, FormValidation, type Functor, Functype, FunctypeBase, FunctypeCollection, FunctypeEnvelope, FunctypeSum, HKT, type HasService, Http, HttpClient, type HttpClientConfig, type HttpError, HttpError as HttpErrors, type HttpMethod, type HttpMethodOptions, type HttpQueryParams, type HttpRequestOptions, type HttpRequestView, type HttpResponse, type HttpStatusError, IO, type IO as IOType, type Task as IOTask, ISO8601Date, Identity, InstanceType, IntegerNumber, InterruptedError, InvariantViolation, type JSONValue, KVTraversable, Kind, Layer, type Layer as LayerType, type LayerError, type LayerInput, type LayerOutput, Lazy, type Lazy as LazyType, LazyList, Left, LeftError, LeftErrorType, LeftOf, List, ListKind, type Logger, Map, Match, type Matchable, MatchableUtils, type Monad, NAME, type NetworkError, NonEmptyString, NonNegativeNumber, None, NoneError, Obj, Ok, Option, OptionConstructor, OptionKind, ParseError, type ParseMode, PatternString, Pipe, PositiveInteger, PositiveNumber, type Promisable, type RIO, Ref, type Ref as RefType, RepeatExhausted, type ResponseDecodeError, Right, RightOf, Serializable, SerializableEnvelope, Serialization_d_exports as Serialization, SerializationMethods, SerializationResult, SerializedError, Set, Some, Stack, Sync, Tag, type Tag as TagType, type TagService, TaggedThrowable, Task$1 as Task, TaskErrorInfo, TaskFailure, TaskMetadata, TaskOutcome, TaskParams, TaskResult, TaskSuccess, TestClock, type TestClock as TestClockType, TestClockTag, TestContext, type TestContext as TestContextType, TestEither, Throwable, ThrowableType, TimeoutError, type TraceEvent, type TraceOp, TracedOption, type Tracer, Traversable, Try, TryKind, Tuple, Type, TypeCheckLeft, TypeCheckRight, TypeNames, Typeable, TypeableParams, TypedError, TypedErrorContext, type UIO, UUID, UniversalContainer, UnsupportedSyncOperationError, UntypedMatch, type Unwrap, UrlString, ValidatedBrand, type ValidatedBrand as ValidatedBrandType, type ValidatedBrandCompanion, Validation, ValidationRule, Validator, Valuable, ValuableParams, type Widen, type Wire, type WireMark, createBrander, createCancellationTokenSource, createCustomSerializer, createErrorSerializer, createSerializationCompanion, createSerializer, createTaggedSerializer, deserializeError, envelope, formatError, formatStackTrace, fromBinary, fromJSON, fromYAML, hasBrand, invariant, isCompanion, isDoCapable, isExtractable, isLeft, isRight, isTaggedThrowable, isTypeable, reduceRightWiden, reduceWiden, safeStringify, serializeError, taggedEnvelope, tryCatch, tryCatchAsync, unwrap, unwrapBrand };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Brand as e,BrandedBoolean as t,BrandedNumber as n,BrandedString as r,createBrander as i,hasBrand as a,unwrap as o}from"./branded/index.js";import{$ as s,A as c,At as l,B as u,C as d,Ct as f,D as p,Dt as m,E as h,Et as g,F as _,
|
|
1
|
+
import{Brand as e,BrandedBoolean as t,BrandedNumber as n,BrandedString as r,createBrander as i,hasBrand as a,unwrap as o}from"./branded/index.js";import{$ as s,A as c,At as l,B as u,C as d,Ct as f,D as p,Dt as m,E as h,Et as g,F as _,Ft as v,G as y,H as b,I as x,J as S,K as C,L as w,M as T,Mt as E,N as D,Nt as O,O as k,Ot as A,P as j,Pt as M,Q as N,R as P,S as F,St as I,T as L,Tt as R,U as z,V as B,W as V,X as H,Y as U,Z as W,_ as G,_t as K,a as q,at as J,b as Y,bt as X,c as Z,ct as Q,d as $,dt as ee,et as te,f as ne,ft as re,g as ie,gt as ae,h as oe,ht as se,i as ce,it as le,j as ue,jt as de,k as fe,kt as pe,l as me,lt as he,m as ge,mt as _e,n as ve,nt as ye,o as be,ot as xe,p as Se,pt as Ce,q as we,r as Te,rt as Ee,s as De,st as Oe,t as ke,tt as Ae,u as je,ut as Me,v as Ne,vt as Pe,w as Fe,wt as Ie,x as Le,xt as Re,y as ze,yt as Be,z as Ve}from"./src-BUA74biP.js";import{t as He}from"./Companion-DiOMBHDG.js";import{a as Ue,c as We,d as Ge,f as Ke,i as qe,l as Je,n as Ye,o as Xe,r as Ze,s as Qe,t as $e,u as et}from"./serialization-CpbxaV0t.js";import{n as tt,t as nt}from"./typeclass-C61yDVYd.js";import{t as rt}from"./CompanionTypes-BVqO7Kc2.js";import{Tuple as it}from"./tuple/index.js";import{InvariantViolation as at,invariant as ot}from"./invariant/index.js";export{D as $,s as Base,ye as BoundedNumber,Ee as BoundedString,e as Brand,t as BrandedBoolean,n as BrandedNumber,r as BrandedString,He as Companion,Ae as Cond,L as Context,b as Decoder,z as DecoderError,j as Do,_ as DoAsync,y as ESMap,se as Either,le as EmailAddress,x as EmptyListError,C as Err,Fe as Exit,$e as FUNCTYPE_MARKER,w as FailureError,je as FoldableUtils,me as HKT,$ as Http,Se as HttpClient,ne as HttpErrors,ze as IO,J as ISO8601Date,Z as Identity,xe as IntegerNumber,Y as InterruptedError,at as InvariantViolation,Ne as Layer,De as Lazy,A as LazyList,ae as Left,P as LeftError,Ie as List,V as Map,te as Match,be as MatchableUtils,W as NAME,Oe as NonEmptyString,Q as NonNegativeNumber,de as None,Ve as NoneError,q as Obj,we as Ok,E as Option,O as OptionConstructor,v as ParseError,he as PatternString,Me as PositiveInteger,ee as PositiveNumber,pe as Ref,Le as RepeatExhausted,K as Right,Te as Serialization,l as Set,M as Some,ce as Stack,G as Tag,S as Task,ge as TestClock,oe as TestClockTag,ie as TestContext,N as Throwable,F as TimeoutError,ve as TracedOption,m as Try,it as Tuple,Pe as TypeCheckLeft,Be as TypeCheckRight,R as Typeable,k as TypedError,re as UUID,d as UnsupportedSyncOperationError,Ce as UrlString,_e as ValidatedBrand,p as Validation,ke as Valuable,i as createBrander,U as createCancellationTokenSource,Ye as createCustomSerializer,fe as createErrorSerializer,Ze as createSerializationCompanion,qe as createSerializer,Ue as createTaggedSerializer,Ge as deserializeError,Xe as envelope,c as formatError,ue as formatStackTrace,Qe as fromBinary,We as fromJSON,Je as fromYAML,a as hasBrand,ot as invariant,rt as isCompanion,u as isDoCapable,h as isExtractable,X as isLeft,Re as isRight,H as isTaggedThrowable,g as isTypeable,nt as reduceRightWiden,tt as reduceWiden,T as safeStringify,Ke as serializeError,et as taggedEnvelope,I as tryCatch,f as tryCatchAsync,B as unwrap,o as unwrapBrand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>Object.assign(Error(e),{name:`InvariantViolation`,_tag:`InvariantViolation`});function t(t,n){if(!t)throw e(typeof n==`function`?n():n)}export{e as InvariantViolation,t as invariant};
|
package/dist/io/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as TimeoutError, G as TestClock, J as IO, K as TestClockTag, Q as Task, X as RIO, Y as InterruptedError, Z as RepeatExhausted, at as LayerOutput, ct as Context, dt as Tag, et as UIO, ft as TagService, it as LayerInput, lt as ContextServices, nt as Layer, ot as Exit, q as TestContext, rt as LayerError, st as ExitTag, tt as UnsupportedSyncOperationError, ut as HasService } from "../index-CXXlorKz.js";
|
|
2
2
|
export { Context, type Context as ContextType, type ContextServices, Exit, type Exit as ExitType, type ExitTag, type HasService, IO, type IO as IOType, type Task as IOTask, InterruptedError, Layer, type Layer as LayerType, type LayerError, type LayerInput, type LayerOutput, type RIO, RepeatExhausted, Tag, type Tag as TagType, type TagService, TestClock, type TestClock as TestClockType, TestClockTag, TestContext, type TestContext as TestContextType, TimeoutError, type UIO, UnsupportedSyncOperationError };
|
package/dist/io/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,S as t,
|
|
1
|
+
import{C as e,S as t,T as n,_ as r,b as i,g as a,h as o,m as s,v as c,w as l,x as u,y as d}from"../src-BUA74biP.js";export{n as Context,l as Exit,d as IO,i as InterruptedError,c as Layer,u as RepeatExhausted,r as Tag,s as TestClock,o as TestClockTag,a as TestContext,t as TimeoutError,e as UnsupportedSyncOperationError};
|
package/dist/lazy/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as Lazy } from "../index-CXXlorKz.js";
|
|
2
2
|
export { Lazy, type Lazy as LazyType };
|
package/dist/lazy/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{s as e}from"../src-BUA74biP.js";export{e as Lazy};
|
package/dist/list/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { In as List } from "../index-CXXlorKz.js";
|
|
2
2
|
export { List };
|
package/dist/list/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{wt as e}from"../src-BUA74biP.js";export{e as List};
|
package/dist/map/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v as Map } from "../index-CXXlorKz.js";
|
|
2
2
|
export { Map };
|
package/dist/map/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{W as e}from"../src-BUA74biP.js";export{e as Map};
|
package/dist/obj/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as Obj } from "../index-CXXlorKz.js";
|
|
2
2
|
export { Obj };
|
package/dist/obj/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e}from"../src-BUA74biP.js";export{e as Obj};
|
package/dist/option/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as OptionConstructor, i as Option, o as Some, r as None } from "../index-
|
|
1
|
+
import { a as OptionConstructor, i as Option, o as Some, r as None } from "../index-CXXlorKz.js";
|
|
2
2
|
export { None, Option, OptionConstructor, Some };
|
package/dist/option/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Mt as e,Nt as t,Pt as n,jt as r}from"../src-BUA74biP.js";export{r as None,e as Option,t as OptionConstructor,n as Some};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $n as SerializedError, Gn as createSerializationCompanion, Hn as FunctypeEnvelope, Jn as envelope, Kn as createSerializer, Qn as taggedEnvelope, Un as SerializationResult, Vn as FUNCTYPE_MARKER, Wn as createCustomSerializer, Xn as fromJSON, Yn as fromBinary, Zn as fromYAML, er as deserializeError, qn as createTaggedSerializer, tr as serializeError, zn as JSONValue } from "../index-CXXlorKz.js";
|
|
2
2
|
export { FUNCTYPE_MARKER, FunctypeEnvelope, type JSONValue, SerializationResult, SerializedError, createCustomSerializer, createSerializationCompanion, createSerializer, createTaggedSerializer, deserializeError, envelope, fromBinary, fromJSON, fromYAML, serializeError, taggedEnvelope };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"../serialization-
|
|
1
|
+
import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"../serialization-CpbxaV0t.js";export{u as FUNCTYPE_MARKER,o as createCustomSerializer,c as createSerializationCompanion,i as createSerializer,e as createTaggedSerializer,n as deserializeError,s as envelope,l as fromBinary,t as fromJSON,a as fromYAML,r as serializeError,d as taggedEnvelope};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function e(e){if(e===void 0||typeof e==`symbol`||typeof e==`function`)return;let t=/* @__PURE__ */ new Set;function n(e){if(e===null)return`null`;switch(typeof e){case`string`:return JSON.stringify(e);case`number`:return isFinite(e)?String(e):`null`;case`boolean`:return String(e);case`bigint`:return`"${e}"`;case`undefined`:case`symbol`:case`function`:return}let r=e;if(t.has(r))return`"[Circular]"`;t.add(r);try{if(`toJSON`in r&&typeof r.toJSON==`function`)return n(r.toJSON());if(Array.isArray(r))return`[${r.map(e=>n(e)??`null`).join(`,`)}]`;let e=Object.keys(r).sort(),t=[];for(let i of e){let e=n(r[i]);e!==void 0&&t.push(`${JSON.stringify(i)}:${e}`)}return`{${t.join(`,`)}}`}finally{t.delete(r)}}try{return n(e)}catch{return}}const t=t=>t instanceof Error?n(t):typeof t==`string`?t:e(t)??`<unserializable cause>`,n=n=>{if(n instanceof Error){let e={name:n.name,message:n.message};n.stack!==void 0&&(e.stack=n.stack);let{cause:r}=n;return r!==void 0&&(e.cause=t(r)),e}return{name:`NonErrorThrowable`,message:typeof n==`string`?n:e(n)??`<unserializable>`}},r=e=>{if(typeof e==`string`)return Error(e);let t=Error(e.message);if(e.name&&(t.name=e.name),e.stack!==void 0&&(t.stack=e.stack),e.cause!==void 0){let n=t;n.cause=r(e.cause)}return t},i=`@functype`,a=(e,t,n)=>({[i]:e,_tag:t??e,value:n}),o=(e,t,n)=>({[i]:e,_tag:t,...n});function s(t,n,r){let o=arguments.length===3,s=o?n:t,c=o?r:n,l=a(t,s,c);return{toJSON:()=>JSON.stringify(l),toYAML:()=>`${i}: ${t}\n_tag: ${s}\nvalue: ${e(c)}`,toBinary:()=>Buffer.from(JSON.stringify(l)).toString(`base64`)}}const c=(t,n,r)=>{let i=o(t,n,r);return{toJSON:()=>JSON.stringify(i),toYAML:()=>Object.entries(i).map(([t,n])=>`${t}: ${e(n)}`).join(`
|
|
2
|
+
`),toBinary:()=>Buffer.from(JSON.stringify(i)).toString(`base64`)}},l=t=>({toJSON:()=>JSON.stringify(t),toYAML:()=>Object.entries(t).map(([t,n])=>`${t}: ${e(n)}`).join(`
|
|
3
|
+
`),toBinary:()=>Buffer.from(JSON.stringify(t)).toString(`base64`)}),u=(e,t)=>t(JSON.parse(e)),d=(e,t)=>{let n=e.split(`
|
|
4
|
+
`),r={};for(let e of n){let t=e.indexOf(`: `);if(t===-1)continue;let n=e.substring(0,t),i=e.substring(t+2);if(!i){r[n]=null;continue}try{r[n]=i===`null`?null:JSON.parse(i)}catch{r[n]=i}}return t(r)},f=(e,t)=>{let n=Buffer.from(e,`base64`).toString();return u(n,t)},p=e=>({fromJSON:t=>u(t,e),fromYAML:t=>d(t,e),fromBinary:t=>f(t,e)});export{c as a,u as c,r as d,n as f,s as i,d as l,l as n,a as o,e as p,p as r,f as s,i as t,o as u};
|
package/dist/set/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fn as Set } from "../index-CXXlorKz.js";
|
|
2
2
|
export { Set };
|
package/dist/set/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{At as e}from"../src-BUA74biP.js";export{e as Set};
|