@fncts/io 0.0.31 → 0.0.32
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/Channel/api/runScoped.d.ts +1 -0
- package/Channel/api.d.ts +1 -0
- package/Channel/internal/ChannelExecutor.d.ts +2 -2
- package/Fiber/FiberMessage.d.ts +5 -5
- package/IO/api/provideSomeLayer.d.ts +1 -2
- package/IO/api/zipConcurrent.d.ts +2 -1
- package/IO/runtime.d.ts +4 -2
- package/Stream/api.d.ts +24 -4
- package/_cjs/Channel/api/runScoped.cjs +19 -3
- package/_cjs/Channel/api/runScoped.cjs.map +1 -1
- package/_cjs/Channel/api/toPull.cjs +1 -1
- package/_cjs/Channel/api/toPull.cjs.map +1 -1
- package/_cjs/Channel/api.cjs +3 -2
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelExecutor.cjs +61 -52
- package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
- package/_cjs/Fiber/FiberMessage.cjs +12 -11
- package/_cjs/Fiber/FiberMessage.cjs.map +1 -1
- package/_cjs/Fiber/FiberRuntime.cjs +28 -27
- package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
- package/_cjs/FiberScope/definition.cjs +2 -2
- package/_cjs/FiberScope/definition.cjs.map +1 -1
- package/_cjs/Hub/api.cjs.map +1 -1
- package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
- package/_cjs/IO/api/raceWith.cjs +9 -12
- package/_cjs/IO/api/raceWith.cjs.map +1 -1
- package/_cjs/IO/api/stateful.cjs +3 -3
- package/_cjs/IO/api/stateful.cjs.map +1 -1
- package/_cjs/IO/api/withChildren.cjs +5 -4
- package/_cjs/IO/api/withChildren.cjs.map +1 -1
- package/_cjs/IO/api/zipConcurrent.cjs +23 -23
- package/_cjs/IO/api/zipConcurrent.cjs.map +1 -1
- package/_cjs/IO/runtime.cjs +8 -8
- package/_cjs/IO/runtime.cjs.map +1 -1
- package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
- package/_cjs/Stream/api.cjs +54 -12
- package/_cjs/Stream/api.cjs.map +1 -1
- package/_mjs/Cached/definition.mjs.map +1 -1
- package/_mjs/Channel/api/runScoped.mjs +19 -3
- package/_mjs/Channel/api/runScoped.mjs.map +1 -1
- package/_mjs/Channel/api/toPull.mjs +1 -1
- package/_mjs/Channel/api/toPull.mjs.map +1 -1
- package/_mjs/Channel/api.mjs +3 -2
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Channel/internal/ChannelExecutor.mjs +61 -52
- package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
- package/_mjs/Fiber/FiberMessage.mjs +5 -5
- package/_mjs/Fiber/FiberMessage.mjs.map +1 -1
- package/_mjs/Fiber/FiberRuntime.mjs +28 -27
- package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
- package/_mjs/FiberScope/definition.mjs +2 -2
- package/_mjs/FiberScope/definition.mjs.map +1 -1
- package/_mjs/Hub/api.mjs.map +1 -1
- package/_mjs/IO/api/provideSomeLayer.mjs.map +1 -1
- package/_mjs/IO/api/raceWith.mjs +9 -12
- package/_mjs/IO/api/raceWith.mjs.map +1 -1
- package/_mjs/IO/api/stateful.mjs +3 -3
- package/_mjs/IO/api/stateful.mjs.map +1 -1
- package/_mjs/IO/api/withChildren.mjs +5 -4
- package/_mjs/IO/api/withChildren.mjs.map +1 -1
- package/_mjs/IO/api/zipConcurrent.mjs +23 -23
- package/_mjs/IO/api/zipConcurrent.mjs.map +1 -1
- package/_mjs/IO/runtime.mjs +6 -6
- package/_mjs/IO/runtime.mjs.map +1 -1
- package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
- package/_mjs/Queue/api/filterOutputIO.mjs.map +1 -1
- package/_mjs/Stream/api.mjs +46 -8
- package/_mjs/Stream/api.mjs.map +1 -1
- package/_src/Cached/definition.ts +1 -1
- package/_src/Channel/api/runScoped.ts +30 -5
- package/_src/Channel/api/toPull.ts +1 -1
- package/_src/Channel/api.ts +1 -0
- package/_src/Channel/internal/ChannelExecutor.ts +24 -20
- package/_src/Fiber/FiberMessage.ts +5 -5
- package/_src/Fiber/FiberRuntime.ts +1 -1
- package/_src/FiberRefs/api.ts +1 -1
- package/_src/Hub/api.ts +1 -1
- package/_src/IO/api/provideSomeLayer.ts +1 -3
- package/_src/IO/api/raceWith.ts +1 -3
- package/_src/IO/api/stateful.ts +1 -1
- package/_src/IO/api/zipConcurrent.ts +26 -30
- package/_src/IO/runtime.ts +4 -4
- package/_src/Queue/api/filterInputIO.ts +1 -1
- package/_src/Queue/api/filterOutputIO.ts +1 -1
- package/_src/State/definition.ts +1 -1
- package/_src/Stream/api.ts +57 -6
- package/_src/Subject/Atomic.ts +1 -1
- package/_src/global.ts +0 -4
- package/_src/index.ts +2 -2
- package/global.d.ts +0 -4
- package/index.d.ts +2 -2
- package/package.json +3 -3
- package/RuntimeConfig.d.ts +0 -11
- package/_cjs/RuntimeConfig.cjs +0 -12
- package/_cjs/RuntimeConfig.cjs.map +0 -1
- package/_mjs/RuntimeConfig.mjs +0 -3
- package/_mjs/RuntimeConfig.mjs.map +0 -1
- package/_src/RuntimeConfig.ts +0 -6
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { Spreadable } from "@fncts/base/types";
|
|
2
|
-
import type { Erase } from "@fncts/typelevel/Intersection";
|
|
3
1
|
/**
|
|
4
2
|
* @tsplus static fncts.io.IOAspects provideSomeLayer
|
|
5
3
|
* @tsplus pipeable fncts.io.IO provideSomeLayer
|
|
6
4
|
*/
|
|
7
5
|
export function provideSomeLayer<RIn, E1, ROut>(layer: Layer<RIn, E1, ROut>, __tsplusTrace?: string) {
|
|
8
|
-
return <R, E, A>(self: IO<R, E, A>): IO<RIn
|
|
6
|
+
return <R, E, A>(self: IO<R, E, A>): IO<RIn | Exclude<R, ROut>, E | E1, A> => {
|
|
9
7
|
// @ts-expect-error
|
|
10
8
|
return self.provideLayer(Layer.environment<RIn>().and(layer));
|
|
11
9
|
};
|
package/_src/IO/api/raceWith.ts
CHANGED
|
@@ -31,15 +31,13 @@ export function raceFibersWith<R, E, A, R1, E1, B, R2, E2, C, R3, E3, D>(
|
|
|
31
31
|
const raceIndicator = new AtomicBoolean(true);
|
|
32
32
|
const leftFiber = IO.unsafeMakeChildFiber(left, parentState, parentRuntimeFlags, null, __tsplusTrace);
|
|
33
33
|
const rightFiber = IO.unsafeMakeChildFiber(right0, parentState, parentRuntimeFlags, null, __tsplusTrace);
|
|
34
|
-
leftFiber.setFiberRef(FiberRef.forkScopeOverride, Just(parentState.scope));
|
|
35
|
-
rightFiber.setFiberRef(FiberRef.forkScopeOverride, Just(parentState.scope));
|
|
36
34
|
|
|
37
35
|
return IO.async((cb) => {
|
|
38
36
|
leftFiber.addObserver(() => complete(leftFiber, rightFiber, leftWins, raceIndicator, cb));
|
|
39
37
|
rightFiber.addObserver(() => complete(rightFiber, leftFiber, rightWins, raceIndicator, cb));
|
|
40
38
|
leftFiber.startFork(left);
|
|
41
39
|
rightFiber.startFork(right0);
|
|
42
|
-
});
|
|
40
|
+
}, leftFiber.fiberId.combine(rightFiber.fiberId));
|
|
43
41
|
});
|
|
44
42
|
};
|
|
45
43
|
}
|
package/_src/IO/api/stateful.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import type { InterruptibilityRestorer } from "./interrupt.js";
|
|
2
2
|
import type { Grafter } from "./transplant.js";
|
|
3
3
|
|
|
4
|
-
import { tuple } from "@fncts/base/data/function";
|
|
5
4
|
import { AtomicBoolean } from "@fncts/base/internal/AtomicBoolean";
|
|
6
|
-
import { AtomicReference } from "@fncts/base/internal/AtomicReference";
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
7
|
* @tsplus pipeable fncts.io.IO zipConcurrent
|
|
10
8
|
*/
|
|
11
9
|
export function zipConcurrent<R1, E1, B>(that: IO<R1, E1, B>, __tsplusTrace?: string) {
|
|
12
|
-
return <R, E, A>(self: IO<R, E, A>): IO<R | R1, E | E1,
|
|
13
|
-
return self.zipWithConcurrent(that,
|
|
10
|
+
return <R, E, A>(self: IO<R, E, A>): IO<R | R1, E | E1, Zipped.Make<A, B>> => {
|
|
11
|
+
return self.zipWithConcurrent(that, (a, b) => Zipped(a, b));
|
|
14
12
|
};
|
|
15
13
|
}
|
|
16
14
|
|
|
@@ -19,32 +17,30 @@ export function zipConcurrent<R1, E1, B>(that: IO<R1, E1, B>, __tsplusTrace?: st
|
|
|
19
17
|
*/
|
|
20
18
|
export function zipWithConcurrent<A, R1, E1, B, C>(that: IO<R1, E1, B>, f: (a: A, b: B) => C, __tsplusTrace?: string) {
|
|
21
19
|
return <R, E>(self: IO<R, E, A>): IO<R | R1, E | E1, C> => {
|
|
22
|
-
return IO.
|
|
23
|
-
IO.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
left
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}),
|
|
47
|
-
);
|
|
20
|
+
return IO.uninterruptibleMask((restore) => {
|
|
21
|
+
return IO.transplant((graft) => {
|
|
22
|
+
const future = Future.unsafeMake<void, void>(FiberId.none);
|
|
23
|
+
const ref = new AtomicBoolean(false);
|
|
24
|
+
return fork(self, restore, graft, future, ref)
|
|
25
|
+
.zip(fork(that, restore, graft, future, ref))
|
|
26
|
+
.flatMap(([left, right]) =>
|
|
27
|
+
restore(future.await).matchCauseIO(
|
|
28
|
+
(cause) =>
|
|
29
|
+
left.interruptFork >
|
|
30
|
+
right.interruptFork >
|
|
31
|
+
left.await.zip(right.await).flatMap(([left, right]) =>
|
|
32
|
+
left
|
|
33
|
+
.zipWithCause(right, f, (a, b) => Cause.both(a, b))
|
|
34
|
+
.match(
|
|
35
|
+
(causes) => IO.refailCause(Cause.both(cause.stripFailures, causes)),
|
|
36
|
+
() => IO.refailCause(cause.stripFailures),
|
|
37
|
+
),
|
|
38
|
+
),
|
|
39
|
+
() => left.join.zipWith(right.join, f),
|
|
40
|
+
),
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
48
44
|
};
|
|
49
45
|
}
|
|
50
46
|
|
package/_src/IO/runtime.ts
CHANGED
|
@@ -59,7 +59,7 @@ export class Runtime<R> {
|
|
|
59
59
|
this.unsafeRunAsyncWith(io, resolve);
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
unsafeRunOrFork = <E, A>(io: IO<R, E, A>, __tsplusTrace?: string): Either<Fiber.Runtime<E, A>, Exit<E, A>> => {
|
|
63
63
|
const fiberId = FiberId.unsafeMake(__tsplusTrace);
|
|
64
64
|
const scheduler = new StagedScheduler();
|
|
65
65
|
const fiberRefs = this.fiberRefs.updateAs(fiberId, FiberRef.currentEnvironment, this.environment);
|
|
@@ -83,10 +83,10 @@ export class Runtime<R> {
|
|
|
83
83
|
|
|
84
84
|
const result = fiber.exitValue();
|
|
85
85
|
if (result !== null) {
|
|
86
|
-
return result;
|
|
86
|
+
return Either.right(result);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
return
|
|
89
|
+
return Either.left(fiber);
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -135,4 +135,4 @@ export const unsafeRunWith = defaultRuntime.unsafeRunWith;
|
|
|
135
135
|
/**
|
|
136
136
|
* @tsplus getter fncts.io.IO unsafeRunSyncExit
|
|
137
137
|
*/
|
|
138
|
-
export const
|
|
138
|
+
export const unsafeRunOrFork = defaultRuntime.unsafeRunOrFork;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PEnqueue, PEnqueueInternal } from "@fncts/io/Queue/definition";
|
|
2
2
|
|
|
3
|
-
import { concrete, EnqueueTypeId, QueueInternal, QueueTypeId
|
|
3
|
+
import { concrete, EnqueueTypeId, QueueInternal, QueueTypeId, QueueVariance } from "@fncts/io/Queue/definition";
|
|
4
4
|
|
|
5
5
|
class FilterInputIO<RA, RB, EA, EB, B, A, A1 extends A, R2, E2> extends QueueInternal<RA | R2, RB, EA | E2, EB, A1, B> {
|
|
6
6
|
constructor(readonly queue: QueueInternal<RA, RB, EA, EB, A, B>, readonly f: (_: A1) => IO<R2, E2, boolean>) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PDequeue, PDequeueInternal } from "@fncts/io/Queue/definition";
|
|
2
2
|
|
|
3
|
-
import { concrete, DequeueTypeId, QueueInternal, QueueTypeId
|
|
3
|
+
import { concrete, DequeueTypeId, QueueInternal, QueueTypeId, QueueVariance } from "@fncts/io/Queue/definition";
|
|
4
4
|
|
|
5
5
|
class FilterOutputIO<RA, RB, EA, EB, A, B, RB1, EB1> extends QueueInternal<RA, RB | RB1, EA, EB | EB1, A, B> {
|
|
6
6
|
constructor(readonly queue: QueueInternal<RA, RB, EA, EB, A, B>, readonly f: (b: B) => IO<RB1, EB1, boolean>) {
|
package/_src/State/definition.ts
CHANGED
package/_src/Stream/api.ts
CHANGED
|
@@ -812,9 +812,10 @@ function combineChunksProducer<Err, Elem>(
|
|
|
812
812
|
): Channel<never, Err, Conc<Elem>, unknown, never, never, any> {
|
|
813
813
|
return Channel.fromIO(latch.take).zipRight(
|
|
814
814
|
Channel.readWithCause(
|
|
815
|
-
(chunk) =>
|
|
815
|
+
(chunk: Conc<Elem>) =>
|
|
816
|
+
Channel.fromIO(handoff.offer(Take.chunk(chunk))).zipRight(combineChunksProducer(handoff, latch)),
|
|
816
817
|
(cause) => Channel.fromIO(handoff.offer(Take.failCause(cause))),
|
|
817
|
-
() => Channel.fromIO(handoff.offer(Take.end))
|
|
818
|
+
() => Channel.fromIO(handoff.offer(Take.end)),
|
|
818
819
|
),
|
|
819
820
|
);
|
|
820
821
|
}
|
|
@@ -991,6 +992,13 @@ export function debounce(duration: Lazy<Duration>, __tsplusTrace?: string) {
|
|
|
991
992
|
};
|
|
992
993
|
}
|
|
993
994
|
|
|
995
|
+
/**
|
|
996
|
+
* @tsplus static fncts.io.StreamOps defer
|
|
997
|
+
*/
|
|
998
|
+
export function defer<R, E, A>(self: Lazy<Stream<R, E, A>>): Stream<R, E, A> {
|
|
999
|
+
return new Stream(Channel.defer(self().channel));
|
|
1000
|
+
}
|
|
1001
|
+
|
|
994
1002
|
function defaultIfEmptyWriter<R, E, A, R1, E1, B>(
|
|
995
1003
|
fb: Stream<R1, E1, B>,
|
|
996
1004
|
__tsplusTrace?: string,
|
|
@@ -2189,14 +2197,27 @@ function mapIOLoop<R, E, A, R1, E1, B>(
|
|
|
2189
2197
|
*
|
|
2190
2198
|
* @note This combinator destroys the chunking structure. It's recommended to use chunkN afterwards.
|
|
2191
2199
|
*
|
|
2192
|
-
* @tsplus pipeable fncts.io.Stream
|
|
2200
|
+
* @tsplus pipeable fncts.io.Stream mapIOConcurrently
|
|
2193
2201
|
*/
|
|
2194
|
-
export function
|
|
2202
|
+
export function mapIOConcurrently<A, R1, E1, B>(n: number, f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string) {
|
|
2195
2203
|
return <R, E>(stream: Stream<R, E, A>): Stream<R | R1, E | E1, B> => {
|
|
2196
2204
|
return new Stream(stream.channel.concatMap(Channel.writeChunk).mapOutConcurrentIO(n, f).mapOut(Conc.single));
|
|
2197
2205
|
};
|
|
2198
2206
|
}
|
|
2199
2207
|
|
|
2208
|
+
/**
|
|
2209
|
+
* @tsplus pipeable fncts.io.Stream mapIOConcurrentlyUnordered
|
|
2210
|
+
*/
|
|
2211
|
+
export function mapIOConcurrentlyUnordered<A, R1, E1, B>(n: number, f: (a: A) => IO<R1, E1, B>) {
|
|
2212
|
+
return <R, E>(self: Stream<R, E, A>): Stream<R | R1, E | E1, B> => {
|
|
2213
|
+
return self.pipeThroughChannelOrFail(
|
|
2214
|
+
Channel.id<never, Conc<A>, any>()
|
|
2215
|
+
.concatMap((chunk) => Channel.writeChunk(chunk))
|
|
2216
|
+
.mergeMap((inp) => Stream.fromIO(f(inp)).channel, n, 16),
|
|
2217
|
+
);
|
|
2218
|
+
};
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2200
2221
|
/**
|
|
2201
2222
|
* Maps each element of this stream to another stream and returns the
|
|
2202
2223
|
* non-deterministic merge of those streams, executing up to `n` inner streams
|
|
@@ -2243,7 +2264,7 @@ export function mergeEither<R1, E1, B>(fb: Stream<R1, E1, B>, __tsplusTrace?: st
|
|
|
2243
2264
|
};
|
|
2244
2265
|
}
|
|
2245
2266
|
|
|
2246
|
-
|
|
2267
|
+
function mergeWithHandler<R, E>(
|
|
2247
2268
|
terminate: boolean,
|
|
2248
2269
|
__tsplusTrace?: string,
|
|
2249
2270
|
): (exit: Exit<E, unknown>) => MergeDecision<R, E, unknown, E, unknown> {
|
|
@@ -2366,6 +2387,15 @@ export function pipeThrough<A, R1, E1, L, Z>(sa: Sink<R1, E1, A, L, Z>, __tsplus
|
|
|
2366
2387
|
};
|
|
2367
2388
|
}
|
|
2368
2389
|
|
|
2390
|
+
/**
|
|
2391
|
+
* @tsplus pipeable fncts.io.Stream pipeThroughChannelOrFail
|
|
2392
|
+
*/
|
|
2393
|
+
export function pipeThroughChannelOrFail<A, R1, E1, B>(channel: Channel<R1, never, Conc<A>, any, E1, Conc<B>, any>) {
|
|
2394
|
+
return <R, E>(self: Stream<R, E, A>): Stream<R | R1, E | E1, B> => {
|
|
2395
|
+
return new Stream(self.channel >>> channel);
|
|
2396
|
+
};
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2369
2399
|
/**
|
|
2370
2400
|
* Provides the stream with its required environment, which eliminates
|
|
2371
2401
|
* its dependency on `R`.
|
|
@@ -2603,6 +2633,27 @@ export function runIntoQueueScoped<RA, RB, EA, EB, E1, A, B>(
|
|
|
2603
2633
|
};
|
|
2604
2634
|
}
|
|
2605
2635
|
|
|
2636
|
+
/**
|
|
2637
|
+
* Like runIntoQueue, but provides the result as a scoped IO
|
|
2638
|
+
* to allow for scope composition.
|
|
2639
|
+
*
|
|
2640
|
+
* @tsplus pipeable fncts.io.Stream runIntoQueueElementsScoped
|
|
2641
|
+
*/
|
|
2642
|
+
export function runIntoQueueElementsScoped<E, A>(queue: Lazy<Queue.Enqueue<Exit<Maybe<E>, A>>>) {
|
|
2643
|
+
return <R>(self: Stream<R, E, A>): IO<R | Scope, never, void> => {
|
|
2644
|
+
return IO.defer(() => {
|
|
2645
|
+
const queue0 = queue();
|
|
2646
|
+
const writer: Channel<R, E, Conc<A>, any, never, Exit<Maybe<E>, A>, any> = Channel.readWithCause(
|
|
2647
|
+
(inp: Conc<A>) => Channel.fromIO(queue0.offerAll(inp.map((a) => Exit.succeed(a)))) > writer,
|
|
2648
|
+
(cause) => Channel.fromIO(queue0.offer(Exit.failCause(cause.map((e) => Just(e))))),
|
|
2649
|
+
() => Channel.fromIO(queue0.offer(Exit.fail(Nothing()))),
|
|
2650
|
+
);
|
|
2651
|
+
|
|
2652
|
+
return (self.channel >>> writer).drain.runScoped.asUnit;
|
|
2653
|
+
});
|
|
2654
|
+
};
|
|
2655
|
+
}
|
|
2656
|
+
|
|
2606
2657
|
/**
|
|
2607
2658
|
* Like `Stream#runIntoHub`, but provides the result as a `Managed` to allow for scope
|
|
2608
2659
|
* composition.
|
|
@@ -2947,7 +2998,7 @@ export function toQueueOfElements(capacity = 2, __tsplusTrace?: string) {
|
|
|
2947
2998
|
return <R, E, A>(stream: Stream<R, E, A>): IO<R | Scope, never, Queue.Dequeue<Exit<Maybe<E>, A>>> => {
|
|
2948
2999
|
return Do((Δ) => {
|
|
2949
3000
|
const queue = Δ(IO.acquireRelease(Queue.makeBounded<Exit<Maybe<E>, A>>(capacity), (_) => _.shutdown));
|
|
2950
|
-
Δ(stream.
|
|
3001
|
+
Δ(stream.runIntoQueueElementsScoped(queue).forkScoped);
|
|
2951
3002
|
return queue;
|
|
2952
3003
|
});
|
|
2953
3004
|
};
|
package/_src/Subject/Atomic.ts
CHANGED
package/_src/global.ts
CHANGED
|
@@ -99,10 +99,6 @@ import { Random } from "@fncts/io/Random/definition";
|
|
|
99
99
|
* @tsplus global
|
|
100
100
|
*/
|
|
101
101
|
import { PRef, Ref } from "@fncts/io/Ref/definition";
|
|
102
|
-
/**
|
|
103
|
-
* @tsplus global
|
|
104
|
-
*/
|
|
105
|
-
import { RuntimeConfig } from "@fncts/io/RuntimeConfig";
|
|
106
102
|
/**
|
|
107
103
|
* @tsplus global
|
|
108
104
|
*/
|
package/_src/index.ts
CHANGED
|
@@ -5,7 +5,6 @@ export type {} from "./Channel.js";
|
|
|
5
5
|
export type {} from "./Clock.js";
|
|
6
6
|
export type {} from "./Console.js";
|
|
7
7
|
export type {} from "./CountdownLatch.js";
|
|
8
|
-
export type {} from "./demo.js";
|
|
9
8
|
export type {} from "./Fiber.js";
|
|
10
9
|
export type {} from "./FiberDescriptor.js";
|
|
11
10
|
export type {} from "./FiberRef.js";
|
|
@@ -22,18 +21,19 @@ export type {} from "./Layer.js";
|
|
|
22
21
|
export type {} from "./Logger.js";
|
|
23
22
|
export type {} from "./LogLevel.js";
|
|
24
23
|
export type {} from "./LogSpan.js";
|
|
24
|
+
export type {} from "./MVar.js";
|
|
25
25
|
export type {} from "./Push.js";
|
|
26
26
|
export type {} from "./Queue.js";
|
|
27
27
|
export type {} from "./Random.js";
|
|
28
28
|
export type {} from "./Ref.js";
|
|
29
29
|
export type {} from "./RefSubject.js";
|
|
30
30
|
export type {} from "./Reloadable.js";
|
|
31
|
-
export type {} from "./RuntimeConfig.js";
|
|
32
31
|
export type {} from "./RuntimeFlag.js";
|
|
33
32
|
export type {} from "./RuntimeFlags.js";
|
|
34
33
|
export type {} from "./Schedule.js";
|
|
35
34
|
export type {} from "./Scope.js";
|
|
36
35
|
export type {} from "./ScopedRef.js";
|
|
36
|
+
export type {} from "./Semaphore.js";
|
|
37
37
|
export type {} from "./Sink.js";
|
|
38
38
|
export type {} from "./State.js";
|
|
39
39
|
export type {} from "./STM.js";
|
package/global.d.ts
CHANGED
|
@@ -98,10 +98,6 @@ import { Random } from "@fncts/io/Random/definition";
|
|
|
98
98
|
* @tsplus global
|
|
99
99
|
*/
|
|
100
100
|
import { PRef, Ref } from "@fncts/io/Ref/definition";
|
|
101
|
-
/**
|
|
102
|
-
* @tsplus global
|
|
103
|
-
*/
|
|
104
|
-
import { RuntimeConfig } from "@fncts/io/RuntimeConfig";
|
|
105
101
|
/**
|
|
106
102
|
* @tsplus global
|
|
107
103
|
*/
|
package/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export type {} from "./Channel.js";
|
|
|
4
4
|
export type {} from "./Clock.js";
|
|
5
5
|
export type {} from "./Console.js";
|
|
6
6
|
export type {} from "./CountdownLatch.js";
|
|
7
|
-
export type {} from "./demo.js";
|
|
8
7
|
export type {} from "./Fiber.js";
|
|
9
8
|
export type {} from "./FiberDescriptor.js";
|
|
10
9
|
export type {} from "./FiberRef.js";
|
|
@@ -21,18 +20,19 @@ export type {} from "./Layer.js";
|
|
|
21
20
|
export type {} from "./Logger.js";
|
|
22
21
|
export type {} from "./LogLevel.js";
|
|
23
22
|
export type {} from "./LogSpan.js";
|
|
23
|
+
export type {} from "./MVar.js";
|
|
24
24
|
export type {} from "./Push.js";
|
|
25
25
|
export type {} from "./Queue.js";
|
|
26
26
|
export type {} from "./Random.js";
|
|
27
27
|
export type {} from "./Ref.js";
|
|
28
28
|
export type {} from "./RefSubject.js";
|
|
29
29
|
export type {} from "./Reloadable.js";
|
|
30
|
-
export type {} from "./RuntimeConfig.js";
|
|
31
30
|
export type {} from "./RuntimeFlag.js";
|
|
32
31
|
export type {} from "./RuntimeFlags.js";
|
|
33
32
|
export type {} from "./Schedule.js";
|
|
34
33
|
export type {} from "./Scope.js";
|
|
35
34
|
export type {} from "./ScopedRef.js";
|
|
35
|
+
export type {} from "./Semaphore.js";
|
|
36
36
|
export type {} from "./Sink.js";
|
|
37
37
|
export type {} from "./State.js";
|
|
38
38
|
export type {} from "./STM.js";
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fncts/io",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@fncts/base": "0.0.
|
|
6
|
-
"@fncts/transformers": "0.0.
|
|
5
|
+
"@fncts/base": "0.0.27",
|
|
6
|
+
"@fncts/transformers": "0.0.5",
|
|
7
7
|
"@fncts/typelevel": "0.0.15"
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
package/RuntimeConfig.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CaseClass } from "@fncts/base/data/CaseClass";
|
|
2
|
-
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
3
|
-
import { Supervisor } from "@fncts/io/Supervisor/definition";
|
|
4
|
-
import { Logger } from "@fncts/io/Logger/definition";
|
|
5
|
-
export declare class RuntimeConfig extends CaseClass<{
|
|
6
|
-
readonly reportFailure: (e: Cause<unknown>) => void;
|
|
7
|
-
readonly supervisor: Supervisor<any>;
|
|
8
|
-
readonly yieldOpCount: number;
|
|
9
|
-
readonly logger: Logger<string, any>;
|
|
10
|
-
}> {
|
|
11
|
-
}
|
package/_cjs/RuntimeConfig.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.RuntimeConfig = void 0;
|
|
7
|
-
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/CaseClass"));
|
|
8
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
-
class RuntimeConfig extends tsplus_module_1.CaseClass {}
|
|
11
|
-
exports.RuntimeConfig = RuntimeConfig;
|
|
12
|
-
//# sourceMappingURL=RuntimeConfig.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeConfig.cjs","mappings":";;;;;;;;;AAAM,MAAOA,aAAc,SAAQC,yBAKjC;AAAG","names":["RuntimeConfig","tsplus_module_1"],"sourceRoot":"","sources":["../_src/RuntimeConfig.ts"],"sourcesContent":[null]}
|
package/_mjs/RuntimeConfig.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeConfig.mjs","mappings":";AAAA,OAAM,MAAOA,aAAc,SAAQC,yBAKjC","names":["RuntimeConfig","tsplus_module_1"],"sourceRoot":"","sources":["../_src/RuntimeConfig.ts"],"sourcesContent":[null]}
|