@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.
Files changed (99) hide show
  1. package/Channel/api/runScoped.d.ts +1 -0
  2. package/Channel/api.d.ts +1 -0
  3. package/Channel/internal/ChannelExecutor.d.ts +2 -2
  4. package/Fiber/FiberMessage.d.ts +5 -5
  5. package/IO/api/provideSomeLayer.d.ts +1 -2
  6. package/IO/api/zipConcurrent.d.ts +2 -1
  7. package/IO/runtime.d.ts +4 -2
  8. package/Stream/api.d.ts +24 -4
  9. package/_cjs/Channel/api/runScoped.cjs +19 -3
  10. package/_cjs/Channel/api/runScoped.cjs.map +1 -1
  11. package/_cjs/Channel/api/toPull.cjs +1 -1
  12. package/_cjs/Channel/api/toPull.cjs.map +1 -1
  13. package/_cjs/Channel/api.cjs +3 -2
  14. package/_cjs/Channel/api.cjs.map +1 -1
  15. package/_cjs/Channel/internal/ChannelExecutor.cjs +61 -52
  16. package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
  17. package/_cjs/Fiber/FiberMessage.cjs +12 -11
  18. package/_cjs/Fiber/FiberMessage.cjs.map +1 -1
  19. package/_cjs/Fiber/FiberRuntime.cjs +28 -27
  20. package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
  21. package/_cjs/FiberScope/definition.cjs +2 -2
  22. package/_cjs/FiberScope/definition.cjs.map +1 -1
  23. package/_cjs/Hub/api.cjs.map +1 -1
  24. package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
  25. package/_cjs/IO/api/raceWith.cjs +9 -12
  26. package/_cjs/IO/api/raceWith.cjs.map +1 -1
  27. package/_cjs/IO/api/stateful.cjs +3 -3
  28. package/_cjs/IO/api/stateful.cjs.map +1 -1
  29. package/_cjs/IO/api/withChildren.cjs +5 -4
  30. package/_cjs/IO/api/withChildren.cjs.map +1 -1
  31. package/_cjs/IO/api/zipConcurrent.cjs +23 -23
  32. package/_cjs/IO/api/zipConcurrent.cjs.map +1 -1
  33. package/_cjs/IO/runtime.cjs +8 -8
  34. package/_cjs/IO/runtime.cjs.map +1 -1
  35. package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
  36. package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
  37. package/_cjs/Stream/api.cjs +54 -12
  38. package/_cjs/Stream/api.cjs.map +1 -1
  39. package/_mjs/Cached/definition.mjs.map +1 -1
  40. package/_mjs/Channel/api/runScoped.mjs +19 -3
  41. package/_mjs/Channel/api/runScoped.mjs.map +1 -1
  42. package/_mjs/Channel/api/toPull.mjs +1 -1
  43. package/_mjs/Channel/api/toPull.mjs.map +1 -1
  44. package/_mjs/Channel/api.mjs +3 -2
  45. package/_mjs/Channel/api.mjs.map +1 -1
  46. package/_mjs/Channel/internal/ChannelExecutor.mjs +61 -52
  47. package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
  48. package/_mjs/Fiber/FiberMessage.mjs +5 -5
  49. package/_mjs/Fiber/FiberMessage.mjs.map +1 -1
  50. package/_mjs/Fiber/FiberRuntime.mjs +28 -27
  51. package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
  52. package/_mjs/FiberScope/definition.mjs +2 -2
  53. package/_mjs/FiberScope/definition.mjs.map +1 -1
  54. package/_mjs/Hub/api.mjs.map +1 -1
  55. package/_mjs/IO/api/provideSomeLayer.mjs.map +1 -1
  56. package/_mjs/IO/api/raceWith.mjs +9 -12
  57. package/_mjs/IO/api/raceWith.mjs.map +1 -1
  58. package/_mjs/IO/api/stateful.mjs +3 -3
  59. package/_mjs/IO/api/stateful.mjs.map +1 -1
  60. package/_mjs/IO/api/withChildren.mjs +5 -4
  61. package/_mjs/IO/api/withChildren.mjs.map +1 -1
  62. package/_mjs/IO/api/zipConcurrent.mjs +23 -23
  63. package/_mjs/IO/api/zipConcurrent.mjs.map +1 -1
  64. package/_mjs/IO/runtime.mjs +6 -6
  65. package/_mjs/IO/runtime.mjs.map +1 -1
  66. package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
  67. package/_mjs/Queue/api/filterOutputIO.mjs.map +1 -1
  68. package/_mjs/Stream/api.mjs +46 -8
  69. package/_mjs/Stream/api.mjs.map +1 -1
  70. package/_src/Cached/definition.ts +1 -1
  71. package/_src/Channel/api/runScoped.ts +30 -5
  72. package/_src/Channel/api/toPull.ts +1 -1
  73. package/_src/Channel/api.ts +1 -0
  74. package/_src/Channel/internal/ChannelExecutor.ts +24 -20
  75. package/_src/Fiber/FiberMessage.ts +5 -5
  76. package/_src/Fiber/FiberRuntime.ts +1 -1
  77. package/_src/FiberRefs/api.ts +1 -1
  78. package/_src/Hub/api.ts +1 -1
  79. package/_src/IO/api/provideSomeLayer.ts +1 -3
  80. package/_src/IO/api/raceWith.ts +1 -3
  81. package/_src/IO/api/stateful.ts +1 -1
  82. package/_src/IO/api/zipConcurrent.ts +26 -30
  83. package/_src/IO/runtime.ts +4 -4
  84. package/_src/Queue/api/filterInputIO.ts +1 -1
  85. package/_src/Queue/api/filterOutputIO.ts +1 -1
  86. package/_src/State/definition.ts +1 -1
  87. package/_src/Stream/api.ts +57 -6
  88. package/_src/Subject/Atomic.ts +1 -1
  89. package/_src/global.ts +0 -4
  90. package/_src/index.ts +2 -2
  91. package/global.d.ts +0 -4
  92. package/index.d.ts +2 -2
  93. package/package.json +3 -3
  94. package/RuntimeConfig.d.ts +0 -11
  95. package/_cjs/RuntimeConfig.cjs +0 -12
  96. package/_cjs/RuntimeConfig.cjs.map +0 -1
  97. package/_mjs/RuntimeConfig.mjs +0 -3
  98. package/_mjs/RuntimeConfig.mjs.map +0 -1
  99. 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 & Erase<R, ROut>, E | E1, A> => {
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
  };
@@ -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
  }
@@ -9,5 +9,5 @@ export function stateful<S, R, E, A>(
9
9
  tag: Tag<State<S>>,
10
10
  __tsplusTrace?: string,
11
11
  ): IO<R, E, A> {
12
- return IO.defer(io)(IO.$.provideSomeLayer(State.initial(s, tag)));
12
+ return IO.defer(io).provideSomeLayer(State.initial(s, tag));
13
13
  }
@@ -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, readonly [A, B]> => {
13
- return self.zipWithConcurrent(that, tuple);
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.fiberId.flatMap((fiberId) =>
23
- IO.uninterruptibleMask((restore) => {
24
- return IO.transplant((graft) => {
25
- const future = Future.unsafeMake<void, void>(FiberId.none);
26
- const ref = new AtomicBoolean(false);
27
- return fork(self, restore, graft, future, ref)
28
- .zip(fork(that, restore, graft, future, ref))
29
- .flatMap(([left, right]) =>
30
- restore(future.await).matchCauseIO(
31
- (cause) =>
32
- left.interruptFork >
33
- right.interruptFork >
34
- left.await.zip(right.await).flatMap(([left, right]) =>
35
- left
36
- .zipWithCause(right, f, (a, b) => Cause.both(a, b))
37
- .match(
38
- (causes) => IO.refailCause(Cause.both(cause.stripFailures, causes)),
39
- () => IO.refailCause(cause.stripFailures),
40
- ),
41
- ),
42
- () => left.join.zipWith(right.join, f),
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
 
@@ -59,7 +59,7 @@ export class Runtime<R> {
59
59
  this.unsafeRunAsyncWith(io, resolve);
60
60
  });
61
61
 
62
- unsafeRunSyncExit = <E, A>(io: IO<R, E, A>, __tsplusTrace?: string): Exit<E, A> => {
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 Exit.halt(fiber);
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 unsafeRunSyncExit = defaultRuntime.unsafeRunSyncExit;
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 , QueueVariance } from "@fncts/io/Queue/definition";
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 , QueueVariance } from "@fncts/io/Queue/definition";
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>) {
@@ -1,4 +1,4 @@
1
- import type { StateInternal} from "./internal.js";
1
+ import type { StateInternal } from "./internal.js";
2
2
 
3
3
  import { StateVariance } from "./internal.js";
4
4
  import { StateTypeId } from "./internal.js";
@@ -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) => Channel.fromIO(handoff.offer(Take.chunk(chunk))).zipRight(combineChunksProducer(handoff, latch)),
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)).zipRight(combineChunksProducer(handoff, latch)),
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 mapIOC
2200
+ * @tsplus pipeable fncts.io.Stream mapIOConcurrently
2193
2201
  */
2194
- export function mapIOC<A, R1, E1, B>(n: number, f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string) {
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
- export function mergeWithHandler<R, E>(
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.runIntoElementsScoped(queue).fork);
3001
+ Δ(stream.runIntoQueueElementsScoped(queue).forkScoped);
2951
3002
  return queue;
2952
3003
  });
2953
3004
  };
@@ -1,4 +1,4 @@
1
- import type { Emitter} from "@fncts/io/Push/definition";
1
+ import type { Emitter } from "@fncts/io/Push/definition";
2
2
  import type { Subject } from "@fncts/io/Subject/definition";
3
3
 
4
4
  import { Multicast, Push } from "@fncts/io/Push";
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.31",
3
+ "version": "0.0.32",
4
4
  "dependencies": {
5
- "@fncts/base": "0.0.26",
6
- "@fncts/transformers": "0.0.4",
5
+ "@fncts/base": "0.0.27",
6
+ "@fncts/transformers": "0.0.5",
7
7
  "@fncts/typelevel": "0.0.15"
8
8
  },
9
9
  "exports": {
@@ -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
- }
@@ -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]}
@@ -1,3 +0,0 @@
1
- import * as tsplus_module_1 from "@fncts/base/data/CaseClass";
2
- export class RuntimeConfig extends tsplus_module_1.CaseClass {}
3
- //# sourceMappingURL=RuntimeConfig.mjs.map
@@ -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]}
@@ -1,6 +0,0 @@
1
- export class RuntimeConfig extends CaseClass<{
2
- readonly reportFailure: (e: Cause<unknown>) => void;
3
- readonly supervisor: Supervisor<any>;
4
- readonly yieldOpCount: number;
5
- readonly logger: Logger<string, any>;
6
- }> {}