@fncts/io 0.0.31 → 0.0.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (342) 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/Fiber/FiberRuntime.d.ts +3 -3
  6. package/IO/api/provideSomeLayer.d.ts +1 -2
  7. package/IO/api/zipConcurrent.d.ts +2 -1
  8. package/IO/api.d.ts +2 -1
  9. package/IO/definition.d.ts +34 -24
  10. package/IO/runtime.d.ts +10 -18
  11. package/STM/definition.d.ts +1 -1
  12. package/Stream/api.d.ts +113 -5
  13. package/_cjs/Channel/api/mapOutConcurrentIO.cjs +1 -1
  14. package/_cjs/Channel/api/mapOutConcurrentIO.cjs.map +1 -1
  15. package/_cjs/Channel/api/mergeAllWith.cjs +3 -3
  16. package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
  17. package/_cjs/Channel/api/mergeWith.cjs +4 -4
  18. package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
  19. package/_cjs/Channel/api/runScoped.cjs +19 -3
  20. package/_cjs/Channel/api/runScoped.cjs.map +1 -1
  21. package/_cjs/Channel/api/toPull.cjs +3 -3
  22. package/_cjs/Channel/api/toPull.cjs.map +1 -1
  23. package/_cjs/Channel/api.cjs +8 -7
  24. package/_cjs/Channel/api.cjs.map +1 -1
  25. package/_cjs/Channel/internal/ChannelExecutor.cjs +71 -62
  26. package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
  27. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +3 -3
  28. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
  29. package/_cjs/Clock/live.cjs +1 -1
  30. package/_cjs/Clock/live.cjs.map +1 -1
  31. package/_cjs/Fiber/FiberMessage.cjs +12 -11
  32. package/_cjs/Fiber/FiberMessage.cjs.map +1 -1
  33. package/_cjs/Fiber/FiberRuntime.cjs +102 -70
  34. package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
  35. package/_cjs/Fiber/api/collectAll.cjs +1 -1
  36. package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
  37. package/_cjs/Fiber/api/mapIO.cjs +1 -1
  38. package/_cjs/Fiber/api/mapIO.cjs.map +1 -1
  39. package/_cjs/Fiber/api/zipWith.cjs +1 -1
  40. package/_cjs/Fiber/api/zipWith.cjs.map +1 -1
  41. package/_cjs/Fiber/constructors.cjs +5 -5
  42. package/_cjs/Fiber/constructors.cjs.map +1 -1
  43. package/_cjs/FiberRef/unsafe.cjs +3 -2
  44. package/_cjs/FiberRef/unsafe.cjs.map +1 -1
  45. package/_cjs/FiberScope/definition.cjs +2 -2
  46. package/_cjs/FiberScope/definition.cjs.map +1 -1
  47. package/_cjs/Future/api.cjs +4 -4
  48. package/_cjs/Future/api.cjs.map +1 -1
  49. package/_cjs/Hub/api.cjs.map +1 -1
  50. package/_cjs/Hub/internal.cjs +1 -1
  51. package/_cjs/Hub/internal.cjs.map +1 -1
  52. package/_cjs/IO/api/asyncIO.cjs +1 -1
  53. package/_cjs/IO/api/asyncIO.cjs.map +1 -1
  54. package/_cjs/IO/api/asyncInterrupt.cjs +2 -2
  55. package/_cjs/IO/api/asyncInterrupt.cjs.map +1 -1
  56. package/_cjs/IO/api/concurrency.cjs +3 -3
  57. package/_cjs/IO/api/concurrency.cjs.map +1 -1
  58. package/_cjs/IO/api/daemonChildren.cjs +1 -1
  59. package/_cjs/IO/api/daemonChildren.cjs.map +1 -1
  60. package/_cjs/IO/api/fork.cjs +2 -1
  61. package/_cjs/IO/api/fork.cjs.map +1 -1
  62. package/_cjs/IO/api/interrupt.cjs +2 -2
  63. package/_cjs/IO/api/interrupt.cjs.map +1 -1
  64. package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
  65. package/_cjs/IO/api/raceWith.cjs +9 -12
  66. package/_cjs/IO/api/raceWith.cjs.map +1 -1
  67. package/_cjs/IO/api/repeat.cjs +2 -2
  68. package/_cjs/IO/api/repeat.cjs.map +1 -1
  69. package/_cjs/IO/api/stateful.cjs +3 -3
  70. package/_cjs/IO/api/stateful.cjs.map +1 -1
  71. package/_cjs/IO/api/timeout.cjs +1 -1
  72. package/_cjs/IO/api/timeout.cjs.map +1 -1
  73. package/_cjs/IO/api/transplant.cjs +1 -1
  74. package/_cjs/IO/api/transplant.cjs.map +1 -1
  75. package/_cjs/IO/api/withChildren.cjs +5 -4
  76. package/_cjs/IO/api/withChildren.cjs.map +1 -1
  77. package/_cjs/IO/api/withEarlyRelease.cjs +1 -1
  78. package/_cjs/IO/api/withEarlyRelease.cjs.map +1 -1
  79. package/_cjs/IO/api/zipConcurrent.cjs +23 -23
  80. package/_cjs/IO/api/zipConcurrent.cjs.map +1 -1
  81. package/_cjs/IO/api.cjs +33 -32
  82. package/_cjs/IO/api.cjs.map +1 -1
  83. package/_cjs/IO/definition.cjs +17 -31
  84. package/_cjs/IO/definition.cjs.map +1 -1
  85. package/_cjs/IO/runtime.cjs +47 -40
  86. package/_cjs/IO/runtime.cjs.map +1 -1
  87. package/_cjs/Logger/api.cjs +3 -2
  88. package/_cjs/Logger/api.cjs.map +1 -1
  89. package/_cjs/MVar/api.cjs +11 -11
  90. package/_cjs/MVar/api.cjs.map +1 -1
  91. package/_cjs/Push/api.cjs +3 -3
  92. package/_cjs/Push/api.cjs.map +1 -1
  93. package/_cjs/Push/internal.cjs +1 -1
  94. package/_cjs/Push/internal.cjs.map +1 -1
  95. package/_cjs/Queue/api/filterInputIO.cjs +2 -2
  96. package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
  97. package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
  98. package/_cjs/Ref/Derived.cjs +4 -4
  99. package/_cjs/Ref/Derived.cjs.map +1 -1
  100. package/_cjs/Ref/DerivedAll.cjs +5 -5
  101. package/_cjs/Ref/DerivedAll.cjs.map +1 -1
  102. package/_cjs/Ref/Synchronized/api.cjs +3 -3
  103. package/_cjs/Ref/Synchronized/api.cjs.map +1 -1
  104. package/_cjs/Ref/api/collect.cjs +1 -1
  105. package/_cjs/Ref/api/collect.cjs.map +1 -1
  106. package/_cjs/Ref/api/dimap.cjs +3 -3
  107. package/_cjs/Ref/api/dimap.cjs.map +1 -1
  108. package/_cjs/Ref/api/filter.cjs +2 -2
  109. package/_cjs/Ref/api/filter.cjs.map +1 -1
  110. package/_cjs/Ref/api.cjs +2 -3
  111. package/_cjs/Ref/api.cjs.map +1 -1
  112. package/_cjs/RefSubject/Atomic.cjs +6 -6
  113. package/_cjs/RefSubject/Atomic.cjs.map +1 -1
  114. package/_cjs/STM/api.cjs +5 -5
  115. package/_cjs/STM/api.cjs.map +1 -1
  116. package/_cjs/STM/definition.cjs +1 -1
  117. package/_cjs/STM/definition.cjs.map +1 -1
  118. package/_cjs/STM/internal/CommitState.cjs +5 -4
  119. package/_cjs/STM/internal/CommitState.cjs.map +1 -1
  120. package/_cjs/STM/internal/Journal.cjs +8 -8
  121. package/_cjs/STM/internal/Journal.cjs.map +1 -1
  122. package/_cjs/Schedule/api/driver.cjs +3 -3
  123. package/_cjs/Schedule/api/driver.cjs.map +1 -1
  124. package/_cjs/Schedule/api.cjs +8 -8
  125. package/_cjs/Schedule/api.cjs.map +1 -1
  126. package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs +1 -1
  127. package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs.map +1 -1
  128. package/_cjs/Scope/ReleaseMap/api.cjs +3 -3
  129. package/_cjs/Scope/ReleaseMap/api.cjs.map +1 -1
  130. package/_cjs/ScopedRef/api.cjs +1 -1
  131. package/_cjs/ScopedRef/api.cjs.map +1 -1
  132. package/_cjs/Semaphore.cjs +2 -2
  133. package/_cjs/Semaphore.cjs.map +1 -1
  134. package/_cjs/Sink/api.cjs +6 -6
  135. package/_cjs/Sink/api.cjs.map +1 -1
  136. package/_cjs/Stream/api/zipAllWith.cjs +8 -8
  137. package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
  138. package/_cjs/Stream/api/zipWithChunks.cjs +6 -6
  139. package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
  140. package/_cjs/Stream/api.cjs +415 -133
  141. package/_cjs/Stream/api.cjs.map +1 -1
  142. package/_cjs/Stream/internal/Handoff.cjs +2 -2
  143. package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
  144. package/_cjs/Stream/internal/Pull.cjs +2 -2
  145. package/_cjs/Stream/internal/Pull.cjs.map +1 -1
  146. package/_cjs/Stream/internal/Take.cjs +6 -6
  147. package/_cjs/Stream/internal/Take.cjs.map +1 -1
  148. package/_cjs/Stream/internal/util.cjs +3 -2
  149. package/_cjs/Stream/internal/util.cjs.map +1 -1
  150. package/_cjs/TFuture/api.cjs +3 -3
  151. package/_cjs/TFuture/api.cjs.map +1 -1
  152. package/_cjs/TFuture/constructors.cjs +1 -1
  153. package/_cjs/TFuture/constructors.cjs.map +1 -1
  154. package/_cjs/TRef/definition.cjs +9 -9
  155. package/_cjs/TRef/definition.cjs.map +1 -1
  156. package/_cjs/collection/immutable/Conc/findIO.cjs +3 -3
  157. package/_cjs/collection/immutable/Conc/findIO.cjs.map +1 -1
  158. package/_cjs/data/Exit/foreachIO.cjs +1 -1
  159. package/_cjs/data/Exit/foreachIO.cjs.map +1 -1
  160. package/_mjs/Cached/definition.mjs.map +1 -1
  161. package/_mjs/Channel/api/mapOutConcurrentIO.mjs +1 -1
  162. package/_mjs/Channel/api/mapOutConcurrentIO.mjs.map +1 -1
  163. package/_mjs/Channel/api/mergeAllWith.mjs +3 -3
  164. package/_mjs/Channel/api/mergeAllWith.mjs.map +1 -1
  165. package/_mjs/Channel/api/mergeWith.mjs +4 -4
  166. package/_mjs/Channel/api/mergeWith.mjs.map +1 -1
  167. package/_mjs/Channel/api/runScoped.mjs +19 -3
  168. package/_mjs/Channel/api/runScoped.mjs.map +1 -1
  169. package/_mjs/Channel/api/toPull.mjs +3 -3
  170. package/_mjs/Channel/api/toPull.mjs.map +1 -1
  171. package/_mjs/Channel/api.mjs +8 -7
  172. package/_mjs/Channel/api.mjs.map +1 -1
  173. package/_mjs/Channel/internal/ChannelExecutor.mjs +71 -62
  174. package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
  175. package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs +3 -3
  176. package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs.map +1 -1
  177. package/_mjs/Clock/live.mjs +1 -1
  178. package/_mjs/Clock/live.mjs.map +1 -1
  179. package/_mjs/Fiber/FiberMessage.mjs +5 -5
  180. package/_mjs/Fiber/FiberMessage.mjs.map +1 -1
  181. package/_mjs/Fiber/FiberRuntime.mjs +102 -70
  182. package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
  183. package/_mjs/Fiber/api/collectAll.mjs +1 -1
  184. package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
  185. package/_mjs/Fiber/api/mapIO.mjs +1 -1
  186. package/_mjs/Fiber/api/mapIO.mjs.map +1 -1
  187. package/_mjs/Fiber/api/zipWith.mjs +1 -1
  188. package/_mjs/Fiber/api/zipWith.mjs.map +1 -1
  189. package/_mjs/Fiber/constructors.mjs +5 -5
  190. package/_mjs/Fiber/constructors.mjs.map +1 -1
  191. package/_mjs/FiberRef/unsafe.mjs +3 -2
  192. package/_mjs/FiberRef/unsafe.mjs.map +1 -1
  193. package/_mjs/FiberScope/definition.mjs +2 -2
  194. package/_mjs/FiberScope/definition.mjs.map +1 -1
  195. package/_mjs/Future/api.mjs +4 -4
  196. package/_mjs/Future/api.mjs.map +1 -1
  197. package/_mjs/Hub/api.mjs.map +1 -1
  198. package/_mjs/Hub/internal.mjs +1 -1
  199. package/_mjs/Hub/internal.mjs.map +1 -1
  200. package/_mjs/IO/api/asyncIO.mjs +1 -1
  201. package/_mjs/IO/api/asyncIO.mjs.map +1 -1
  202. package/_mjs/IO/api/asyncInterrupt.mjs +2 -2
  203. package/_mjs/IO/api/asyncInterrupt.mjs.map +1 -1
  204. package/_mjs/IO/api/concurrency.mjs +3 -3
  205. package/_mjs/IO/api/concurrency.mjs.map +1 -1
  206. package/_mjs/IO/api/daemonChildren.mjs +1 -1
  207. package/_mjs/IO/api/daemonChildren.mjs.map +1 -1
  208. package/_mjs/IO/api/fork.mjs +2 -1
  209. package/_mjs/IO/api/fork.mjs.map +1 -1
  210. package/_mjs/IO/api/interrupt.mjs +2 -2
  211. package/_mjs/IO/api/interrupt.mjs.map +1 -1
  212. package/_mjs/IO/api/provideSomeLayer.mjs.map +1 -1
  213. package/_mjs/IO/api/raceWith.mjs +9 -12
  214. package/_mjs/IO/api/raceWith.mjs.map +1 -1
  215. package/_mjs/IO/api/repeat.mjs +2 -2
  216. package/_mjs/IO/api/repeat.mjs.map +1 -1
  217. package/_mjs/IO/api/stateful.mjs +3 -3
  218. package/_mjs/IO/api/stateful.mjs.map +1 -1
  219. package/_mjs/IO/api/timeout.mjs +1 -1
  220. package/_mjs/IO/api/timeout.mjs.map +1 -1
  221. package/_mjs/IO/api/transplant.mjs +1 -1
  222. package/_mjs/IO/api/transplant.mjs.map +1 -1
  223. package/_mjs/IO/api/withChildren.mjs +5 -4
  224. package/_mjs/IO/api/withChildren.mjs.map +1 -1
  225. package/_mjs/IO/api/withEarlyRelease.mjs +1 -1
  226. package/_mjs/IO/api/withEarlyRelease.mjs.map +1 -1
  227. package/_mjs/IO/api/zipConcurrent.mjs +23 -23
  228. package/_mjs/IO/api/zipConcurrent.mjs.map +1 -1
  229. package/_mjs/IO/api.mjs +32 -30
  230. package/_mjs/IO/api.mjs.map +1 -1
  231. package/_mjs/IO/definition.mjs +16 -27
  232. package/_mjs/IO/definition.mjs.map +1 -1
  233. package/_mjs/IO/runtime.mjs +43 -34
  234. package/_mjs/IO/runtime.mjs.map +1 -1
  235. package/_mjs/Logger/api.mjs +3 -2
  236. package/_mjs/Logger/api.mjs.map +1 -1
  237. package/_mjs/MVar/api.mjs +11 -11
  238. package/_mjs/MVar/api.mjs.map +1 -1
  239. package/_mjs/Push/api.mjs +3 -3
  240. package/_mjs/Push/api.mjs.map +1 -1
  241. package/_mjs/Push/internal.mjs +1 -1
  242. package/_mjs/Push/internal.mjs.map +1 -1
  243. package/_mjs/Queue/api/filterInputIO.mjs +2 -2
  244. package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
  245. package/_mjs/Queue/api/filterOutputIO.mjs.map +1 -1
  246. package/_mjs/Ref/Derived.mjs +4 -4
  247. package/_mjs/Ref/Derived.mjs.map +1 -1
  248. package/_mjs/Ref/DerivedAll.mjs +5 -5
  249. package/_mjs/Ref/DerivedAll.mjs.map +1 -1
  250. package/_mjs/Ref/Synchronized/api.mjs +3 -3
  251. package/_mjs/Ref/Synchronized/api.mjs.map +1 -1
  252. package/_mjs/Ref/api/collect.mjs +1 -1
  253. package/_mjs/Ref/api/collect.mjs.map +1 -1
  254. package/_mjs/Ref/api/dimap.mjs +3 -3
  255. package/_mjs/Ref/api/dimap.mjs.map +1 -1
  256. package/_mjs/Ref/api/filter.mjs +2 -2
  257. package/_mjs/Ref/api/filter.mjs.map +1 -1
  258. package/_mjs/Ref/api.mjs +2 -1
  259. package/_mjs/Ref/api.mjs.map +1 -1
  260. package/_mjs/RefSubject/Atomic.mjs +6 -6
  261. package/_mjs/RefSubject/Atomic.mjs.map +1 -1
  262. package/_mjs/STM/api.mjs +5 -5
  263. package/_mjs/STM/api.mjs.map +1 -1
  264. package/_mjs/STM/definition.mjs +1 -1
  265. package/_mjs/STM/definition.mjs.map +1 -1
  266. package/_mjs/STM/internal/CommitState.mjs +5 -4
  267. package/_mjs/STM/internal/CommitState.mjs.map +1 -1
  268. package/_mjs/STM/internal/Journal.mjs +8 -8
  269. package/_mjs/STM/internal/Journal.mjs.map +1 -1
  270. package/_mjs/Schedule/api/driver.mjs +3 -3
  271. package/_mjs/Schedule/api/driver.mjs.map +1 -1
  272. package/_mjs/Schedule/api.mjs +8 -8
  273. package/_mjs/Schedule/api.mjs.map +1 -1
  274. package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs +1 -1
  275. package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs.map +1 -1
  276. package/_mjs/Scope/ReleaseMap/api.mjs +3 -3
  277. package/_mjs/Scope/ReleaseMap/api.mjs.map +1 -1
  278. package/_mjs/ScopedRef/api.mjs +1 -1
  279. package/_mjs/ScopedRef/api.mjs.map +1 -1
  280. package/_mjs/Semaphore.mjs +2 -2
  281. package/_mjs/Semaphore.mjs.map +1 -1
  282. package/_mjs/Sink/api.mjs +6 -6
  283. package/_mjs/Sink/api.mjs.map +1 -1
  284. package/_mjs/Stream/api/zipAllWith.mjs +8 -8
  285. package/_mjs/Stream/api/zipAllWith.mjs.map +1 -1
  286. package/_mjs/Stream/api/zipWithChunks.mjs +6 -6
  287. package/_mjs/Stream/api/zipWithChunks.mjs.map +1 -1
  288. package/_mjs/Stream/api.mjs +321 -60
  289. package/_mjs/Stream/api.mjs.map +1 -1
  290. package/_mjs/Stream/internal/Handoff.mjs +2 -2
  291. package/_mjs/Stream/internal/Handoff.mjs.map +1 -1
  292. package/_mjs/Stream/internal/Pull.mjs +2 -2
  293. package/_mjs/Stream/internal/Pull.mjs.map +1 -1
  294. package/_mjs/Stream/internal/Take.mjs +6 -6
  295. package/_mjs/Stream/internal/Take.mjs.map +1 -1
  296. package/_mjs/Stream/internal/util.mjs +3 -2
  297. package/_mjs/Stream/internal/util.mjs.map +1 -1
  298. package/_mjs/TFuture/api.mjs +3 -3
  299. package/_mjs/TFuture/api.mjs.map +1 -1
  300. package/_mjs/TFuture/constructors.mjs +1 -1
  301. package/_mjs/TFuture/constructors.mjs.map +1 -1
  302. package/_mjs/TRef/definition.mjs +9 -9
  303. package/_mjs/TRef/definition.mjs.map +1 -1
  304. package/_mjs/collection/immutable/Conc/findIO.mjs +3 -3
  305. package/_mjs/collection/immutable/Conc/findIO.mjs.map +1 -1
  306. package/_mjs/data/Exit/foreachIO.mjs +1 -1
  307. package/_mjs/data/Exit/foreachIO.mjs.map +1 -1
  308. package/_src/Cached/definition.ts +1 -1
  309. package/_src/Channel/api/runScoped.ts +30 -5
  310. package/_src/Channel/api/toPull.ts +1 -1
  311. package/_src/Channel/api.ts +1 -0
  312. package/_src/Channel/internal/ChannelExecutor.ts +24 -20
  313. package/_src/Fiber/FiberMessage.ts +5 -5
  314. package/_src/Fiber/FiberRuntime.ts +40 -17
  315. package/_src/FiberRefs/api.ts +1 -1
  316. package/_src/Hub/api.ts +1 -1
  317. package/_src/IO/api/asyncIO.ts +1 -1
  318. package/_src/IO/api/provideSomeLayer.ts +1 -3
  319. package/_src/IO/api/raceWith.ts +1 -3
  320. package/_src/IO/api/stateful.ts +1 -1
  321. package/_src/IO/api/zipConcurrent.ts +26 -30
  322. package/_src/IO/api.ts +4 -3
  323. package/_src/IO/definition.ts +35 -28
  324. package/_src/IO/runtime.ts +39 -38
  325. package/_src/Queue/api/filterInputIO.ts +1 -1
  326. package/_src/Queue/api/filterOutputIO.ts +1 -1
  327. package/_src/RefSubject/Atomic.ts +4 -4
  328. package/_src/STM/definition.ts +1 -1
  329. package/_src/State/definition.ts +1 -1
  330. package/_src/Stream/api.ts +315 -14
  331. package/_src/Subject/Atomic.ts +1 -1
  332. package/_src/global.ts +0 -4
  333. package/_src/index.ts +2 -2
  334. package/global.d.ts +0 -4
  335. package/index.d.ts +2 -2
  336. package/package.json +3 -3
  337. package/RuntimeConfig.d.ts +0 -11
  338. package/_cjs/RuntimeConfig.cjs +0 -12
  339. package/_cjs/RuntimeConfig.cjs.map +0 -1
  340. package/_mjs/RuntimeConfig.mjs +0 -3
  341. package/_mjs/RuntimeConfig.mjs.map +0 -1
  342. package/_src/RuntimeConfig.ts +0 -6
@@ -247,7 +247,11 @@ export function asyncInterrupt<R, E, A>(
247
247
  IO.succeed(() =>
248
248
  register((k, cb) => {
249
249
  const effect = Take.fromPull(k).flatMap((a) => output.offer(a));
250
- return runtime.unsafeRunAsyncWith(effect, cb || constVoid);
250
+ const fiber = runtime.makeFiber(effect);
251
+ if (cb) {
252
+ fiber.addObserver(cb);
253
+ }
254
+ fiber.start(effect);
251
255
  }),
252
256
  ),
253
257
  );
@@ -317,12 +321,14 @@ export function asyncIO<R, E, A, R1 = R, E1 = E>(
317
321
  const output = Δ(IO.acquireRelease(Queue.makeBounded<Take<E, A>>(outputBuffer), (_) => _.shutdown));
318
322
  const runtime = Δ(IO.runtime<R>());
319
323
  Δ(
320
- register((k, cb) =>
321
- runtime.unsafeRunAsyncWith(
322
- Take.fromPull(k).flatMap((a) => output.offer(a)),
323
- cb || constVoid,
324
- ),
325
- ),
324
+ register((k, cb) => {
325
+ const io = Take.fromPull(k).flatMap((a) => output.offer(a));
326
+ const fiber = runtime.makeFiber(io);
327
+ if (cb) {
328
+ fiber.addObserver(cb);
329
+ }
330
+ fiber.start(io);
331
+ }),
326
332
  );
327
333
  const loop: Channel<never, unknown, unknown, unknown, E, Conc<A>, void> = Channel.unwrap(
328
334
  output.take
@@ -812,9 +818,10 @@ function combineChunksProducer<Err, Elem>(
812
818
  ): Channel<never, Err, Conc<Elem>, unknown, never, never, any> {
813
819
  return Channel.fromIO(latch.take).zipRight(
814
820
  Channel.readWithCause(
815
- (chunk) => Channel.fromIO(handoff.offer(Take.chunk(chunk))).zipRight(combineChunksProducer(handoff, latch)),
821
+ (chunk: Conc<Elem>) =>
822
+ Channel.fromIO(handoff.offer(Take.chunk(chunk))).zipRight(combineChunksProducer(handoff, latch)),
816
823
  (cause) => Channel.fromIO(handoff.offer(Take.failCause(cause))),
817
- () => Channel.fromIO(handoff.offer(Take.end)).zipRight(combineChunksProducer(handoff, latch)),
824
+ () => Channel.fromIO(handoff.offer(Take.end)),
818
825
  ),
819
826
  );
820
827
  }
@@ -991,6 +998,13 @@ export function debounce(duration: Lazy<Duration>, __tsplusTrace?: string) {
991
998
  };
992
999
  }
993
1000
 
1001
+ /**
1002
+ * @tsplus static fncts.io.StreamOps defer
1003
+ */
1004
+ export function defer<R, E, A>(self: Lazy<Stream<R, E, A>>): Stream<R, E, A> {
1005
+ return new Stream(Channel.defer(self().channel));
1006
+ }
1007
+
994
1008
  function defaultIfEmptyWriter<R, E, A, R1, E1, B>(
995
1009
  fb: Stream<R1, E1, B>,
996
1010
  __tsplusTrace?: string,
@@ -1149,7 +1163,7 @@ export function distributedWithDynamic<E, A>(
1149
1163
  *
1150
1164
  * @tsplus getter fncts.io.Stream drain
1151
1165
  */
1152
- export function drain<R, E, A>(fa: Stream<R, E, A>, __tsplusTrace?: string): Stream<R, E, void> {
1166
+ export function drain<R, E, A>(fa: Stream<R, E, A>, __tsplusTrace?: string): Stream<R, E, never> {
1153
1167
  return new Stream(fa.channel.drain);
1154
1168
  }
1155
1169
 
@@ -1304,6 +1318,15 @@ export function environmentWithStream<R0, R, E, A>(
1304
1318
  return Stream.environment<R0>().flatMap(f);
1305
1319
  }
1306
1320
 
1321
+ /**
1322
+ * Creates a stream that executes the specified effect but emits no elements.
1323
+ *
1324
+ * @tsplus static fncts.io.StreamOps execute
1325
+ */
1326
+ export function execute<R, E>(io: IO<R, E, any>, __tsplusTrace?: string): Stream<R, E, never> {
1327
+ return Stream.fromIO(io).drain;
1328
+ }
1329
+
1307
1330
  /**
1308
1331
  * Halt a stream with the specified error
1309
1332
  *
@@ -1576,6 +1599,65 @@ export function scoped<R, E, A>(stream: Lazy<IO<R, E, A>>, __tsplusTrace?: strin
1576
1599
  return new Stream(Channel.scoped(stream().map(Conc.single)));
1577
1600
  }
1578
1601
 
1602
+ /**
1603
+ * Emits a sliding window of n elements.
1604
+ *
1605
+ * @tsplus pipeable fncts.io.Stream sliding
1606
+ */
1607
+ export function sliding(chunkSize: number, stepSize: number, __tsplusTrace?: string) {
1608
+ return <R, E, A>(self: Stream<R, E, A>): Stream<R, E, Conc<A>> => {
1609
+ return Stream.defer(() => {
1610
+ function slidingChunk(chunk: Conc<A>, input: Conc<A>): [Conc<A>, Conc<Conc<A>>] {
1611
+ const updatedChunk = chunk.concat(input);
1612
+ const length = updatedChunk.length;
1613
+ if (length >= chunkSize) {
1614
+ const array = new Array<Conc<A>>((length - chunkSize) / stepSize + 1);
1615
+ let arrayIndex = 0;
1616
+ let chunkIndex = 0;
1617
+ while (chunkIndex + chunkSize <= length) {
1618
+ array[arrayIndex] = updatedChunk.slice(chunkIndex, chunkIndex + chunkSize);
1619
+ arrayIndex += 1;
1620
+ chunkIndex += stepSize;
1621
+ }
1622
+ return [updatedChunk.drop(chunkIndex), Conc.fromArray(array)];
1623
+ } else {
1624
+ return [updatedChunk, Conc.empty()];
1625
+ }
1626
+ }
1627
+ function sliding(chunk: Conc<A>, written: boolean): Channel<never, E, Conc<A>, any, E, Conc<Conc<A>>, any> {
1628
+ return Channel.readWithCause(
1629
+ (input) => {
1630
+ const [updatedChunk, out] = slidingChunk(chunk, input);
1631
+ if (out.isEmpty) {
1632
+ return sliding(updatedChunk, written);
1633
+ } else {
1634
+ return Channel.writeNow(out) > sliding(updatedChunk, true);
1635
+ }
1636
+ },
1637
+ (err) => {
1638
+ const index = written && chunkSize > stepSize ? chunkSize - stepSize : 0;
1639
+ if (index >= chunk.length) {
1640
+ return Channel.failCauseNow(err);
1641
+ } else {
1642
+ return Channel.writeNow(Conc.single(chunk)) > Channel.failCauseNow(err);
1643
+ }
1644
+ },
1645
+ (done) => {
1646
+ const index = written && chunkSize > stepSize ? chunkSize - stepSize : 0;
1647
+ if (index >= chunk.length) {
1648
+ return Channel.succeedNow(done);
1649
+ } else {
1650
+ return Channel.writeNow(Conc.single(chunk)) > Channel.succeedNow(done);
1651
+ }
1652
+ },
1653
+ );
1654
+ }
1655
+
1656
+ return new Stream(self.channel >>> sliding(Conc.empty(), false));
1657
+ });
1658
+ };
1659
+ }
1660
+
1579
1661
  /**
1580
1662
  * Creates a stream from an effect producing a value of type `A`
1581
1663
  *
@@ -2189,14 +2271,105 @@ function mapIOLoop<R, E, A, R1, E1, B>(
2189
2271
  *
2190
2272
  * @note This combinator destroys the chunking structure. It's recommended to use chunkN afterwards.
2191
2273
  *
2192
- * @tsplus pipeable fncts.io.Stream mapIOC
2274
+ * @tsplus pipeable fncts.io.Stream mapIOConcurrently
2193
2275
  */
2194
- export function mapIOC<A, R1, E1, B>(n: number, f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string) {
2276
+ export function mapIOConcurrently<A, R1, E1, B>(n: number, f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string) {
2195
2277
  return <R, E>(stream: Stream<R, E, A>): Stream<R | R1, E | E1, B> => {
2196
2278
  return new Stream(stream.channel.concatMap(Channel.writeChunk).mapOutConcurrentIO(n, f).mapOut(Conc.single));
2197
2279
  };
2198
2280
  }
2199
2281
 
2282
+ /**
2283
+ * @tsplus pipeable fncts.io.Stream mapIOConcurrentlyUnordered
2284
+ */
2285
+ export function mapIOConcurrentlyUnordered<A, R1, E1, B>(n: number, f: (a: A) => IO<R1, E1, B>) {
2286
+ return <R, E>(self: Stream<R, E, A>): Stream<R | R1, E | E1, B> => {
2287
+ return self.pipeThroughChannelOrFail(
2288
+ Channel.id<never, Conc<A>, any>()
2289
+ .concatMap((chunk) => Channel.writeChunk(chunk))
2290
+ .mergeMap((inp) => Stream.fromIO(f(inp)).channel, n, 16),
2291
+ );
2292
+ };
2293
+ }
2294
+
2295
+ /**
2296
+ * Merges this stream and the specified stream together.
2297
+ *
2298
+ * New produced stream will terminate when both specified stream terminate if
2299
+ * no termination strategy is specified.
2300
+ *
2301
+ * @tsplus pipeable fncts.io.Stream merge
2302
+ */
2303
+ export function merge<R1, E1, B>(
2304
+ that: Stream<R1, E1, B>,
2305
+ strategy: TerminationStrategy = "Both",
2306
+ __tsplusTrace?: string,
2307
+ ) {
2308
+ return <R, E, A>(self: Stream<R, E, A>): Stream<R | R1, E | E1, A | B> => {
2309
+ return self.mergeWith(that, identity, identity, strategy);
2310
+ };
2311
+ }
2312
+
2313
+ /**
2314
+ * Merges this stream and the specified stream together. New produced stream
2315
+ * will terminate when either stream terminates.
2316
+ *
2317
+ * @tsplus pipeable fncts.io.Stream mergeHaltEither
2318
+ */
2319
+ export function mergeHaltEither<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string) {
2320
+ return <R, E, A>(self: Stream<R, E, A>): Stream<R | R1, E | E1, A | B> => {
2321
+ return self.merge(that, "Either");
2322
+ };
2323
+ }
2324
+
2325
+ /**
2326
+ * Merges this stream and the specified stream together. New produced stream
2327
+ * will terminate when this stream terminates.
2328
+ *
2329
+ * @tsplus pipeable fncts.io.Stream mergeHaltLeft
2330
+ */
2331
+ export function mergeHaltLeft<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string) {
2332
+ return <R, E, A>(self: Stream<R, E, A>): Stream<R | R1, E | E1, A | B> => {
2333
+ return self.merge(that, "Left");
2334
+ };
2335
+ }
2336
+
2337
+ /**
2338
+ * Merges this stream and the specified stream together. New produced stream
2339
+ * will terminate when the specified stream terminates.
2340
+ *
2341
+ * @tsplus pipeable fncts.io.Stream mergeHaltRight
2342
+ */
2343
+ export function mergeHaltRight<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string) {
2344
+ return <R, E, A>(self: Stream<R, E, A>): Stream<R | R1, E | E1, A | B> => {
2345
+ return self.merge(that, "Right");
2346
+ };
2347
+ }
2348
+
2349
+ /**
2350
+ * Merges this stream and the specified stream together, discarding the values
2351
+ * from the right stream.
2352
+ *
2353
+ * @tsplus pipeable fncts.io.Stream mergeLeft
2354
+ */
2355
+ export function mergeLeft<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string) {
2356
+ return <R, E, A>(self: Stream<R, E, A>): Stream<R | R1, E | E1, A> => {
2357
+ return self.merge(that.drain);
2358
+ };
2359
+ }
2360
+
2361
+ /**
2362
+ * Merges this stream and the specified stream together, discarding the values
2363
+ * from the left stream.
2364
+ *
2365
+ * @tsplus pipeable fncts.io.Stream mergeRight
2366
+ */
2367
+ export function mergeRight<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string) {
2368
+ return <R, E, A>(self: Stream<R, E, A>): Stream<R | R1, E | E1, B> => {
2369
+ return self.drain.merge(that);
2370
+ };
2371
+ }
2372
+
2200
2373
  /**
2201
2374
  * Maps each element of this stream to another stream and returns the
2202
2375
  * non-deterministic merge of those streams, executing up to `n` inner streams
@@ -2243,7 +2416,7 @@ export function mergeEither<R1, E1, B>(fb: Stream<R1, E1, B>, __tsplusTrace?: st
2243
2416
  };
2244
2417
  }
2245
2418
 
2246
- export function mergeWithHandler<R, E>(
2419
+ function mergeWithHandler<R, E>(
2247
2420
  terminate: boolean,
2248
2421
  __tsplusTrace?: string,
2249
2422
  ): (exit: Exit<E, unknown>) => MergeDecision<R, E, unknown, E, unknown> {
@@ -2366,6 +2539,15 @@ export function pipeThrough<A, R1, E1, L, Z>(sa: Sink<R1, E1, A, L, Z>, __tsplus
2366
2539
  };
2367
2540
  }
2368
2541
 
2542
+ /**
2543
+ * @tsplus pipeable fncts.io.Stream pipeThroughChannelOrFail
2544
+ */
2545
+ export function pipeThroughChannelOrFail<A, R1, E1, B>(channel: Channel<R1, never, Conc<A>, any, E1, Conc<B>, any>) {
2546
+ return <R, E>(self: Stream<R, E, A>): Stream<R | R1, E | E1, B> => {
2547
+ return new Stream(self.channel >>> channel);
2548
+ };
2549
+ }
2550
+
2369
2551
  /**
2370
2552
  * Provides the stream with its required environment, which eliminates
2371
2553
  * its dependency on `R`.
@@ -2603,6 +2785,27 @@ export function runIntoQueueScoped<RA, RB, EA, EB, E1, A, B>(
2603
2785
  };
2604
2786
  }
2605
2787
 
2788
+ /**
2789
+ * Like runIntoQueue, but provides the result as a scoped IO
2790
+ * to allow for scope composition.
2791
+ *
2792
+ * @tsplus pipeable fncts.io.Stream runIntoQueueElementsScoped
2793
+ */
2794
+ export function runIntoQueueElementsScoped<E, A>(queue: Lazy<Queue.Enqueue<Exit<Maybe<E>, A>>>) {
2795
+ return <R>(self: Stream<R, E, A>): IO<R | Scope, never, void> => {
2796
+ return IO.defer(() => {
2797
+ const queue0 = queue();
2798
+ const writer: Channel<R, E, Conc<A>, any, never, Exit<Maybe<E>, A>, any> = Channel.readWithCause(
2799
+ (inp: Conc<A>) => Channel.fromIO(queue0.offerAll(inp.map((a) => Exit.succeed(a)))) > writer,
2800
+ (cause) => Channel.fromIO(queue0.offer(Exit.failCause(cause.map((e) => Just(e))))),
2801
+ () => Channel.fromIO(queue0.offer(Exit.fail(Nothing()))),
2802
+ );
2803
+
2804
+ return (self.channel >>> writer).drain.runScoped.asUnit;
2805
+ });
2806
+ };
2807
+ }
2808
+
2606
2809
  /**
2607
2810
  * Like `Stream#runIntoHub`, but provides the result as a `Managed` to allow for scope
2608
2811
  * composition.
@@ -2682,6 +2885,40 @@ export function scanReduceIO<A extends B, R1, E1, B>(f: (b: B, a: A) => IO<R1, E
2682
2885
  };
2683
2886
  }
2684
2887
 
2888
+ /**
2889
+ * @tsplus pipeable fncts.io.Stream split
2890
+ */
2891
+ export function split<A>(predicate: Predicate<A>, __tsplusTrace?: string) {
2892
+ return <R, E>(self: Stream<R, E, A>): Stream<R, E, Conc<A>> => {
2893
+ function split(leftovers: Conc<A>, input: Conc<A>): Channel<R, E, Conc<A>, any, E, Conc<Conc<A>>, any> {
2894
+ const [chunk, remaining] = leftovers.concat(input).splitWhere(predicate);
2895
+ if (chunk.isEmpty || remaining.isEmpty) {
2896
+ return loop(chunk.concat(remaining.drop(1)));
2897
+ } else {
2898
+ return Channel.writeNow(Conc.single(chunk)) > split(Conc.empty(), remaining.drop(1));
2899
+ }
2900
+ }
2901
+
2902
+ function loop(leftovers: Conc<A>): Channel<R, E, Conc<A>, any, E, Conc<Conc<A>>, any> {
2903
+ return Channel.readWith(
2904
+ (input) => split(leftovers, input),
2905
+ Channel.failNow,
2906
+ (_) => {
2907
+ if (leftovers.isEmpty) {
2908
+ return Channel.unit;
2909
+ } else if (leftovers.find(predicate).isNothing()) {
2910
+ return Channel.writeNow(Conc.single(leftovers)) > Channel.unit;
2911
+ } else {
2912
+ return split(Conc.empty(), leftovers) > Channel.unit;
2913
+ }
2914
+ },
2915
+ );
2916
+ }
2917
+
2918
+ return new Stream(self.channel >>> loop(Conc.empty()));
2919
+ };
2920
+ }
2921
+
2685
2922
  /**
2686
2923
  * Creates a single-valued pure stream
2687
2924
  *
@@ -2805,6 +3042,70 @@ export function tap<A, R1, E1>(f: (a: A) => IO<R1, E1, any>, __tsplusTrace?: str
2805
3042
  };
2806
3043
  }
2807
3044
 
3045
+ /**
3046
+ * Returns a stream that effectfully "peeks" at the failure and adds an effect
3047
+ * to consumption of every element of the stream
3048
+ *
3049
+ * @tsplus pipeable fncts.io.Stream tapBoth
3050
+ */
3051
+ export function tapBoth<E, A, R1, E1, R2, E2>(
3052
+ f: (e: E) => IO<R1, E1, any>,
3053
+ g: (a: A) => IO<R2, E2, any>,
3054
+ __tsplusTrace?: string,
3055
+ ) {
3056
+ return <R>(self: Stream<R, E, A>): Stream<R | R1 | R2, E | E1 | E2, A> => {
3057
+ return self.tapError(f).tap(g);
3058
+ };
3059
+ }
3060
+
3061
+ /**
3062
+ * Returns a stream that effectfully "peeks" at the failure of the stream.
3063
+ *
3064
+ * @tsplus pipeable fncts.io.Stream tapError
3065
+ */
3066
+ export function tapError<E, R1, E1>(f: (e: E) => IO<R1, E1, any>, __tsplusTrace?: string) {
3067
+ return <R, A>(self: Stream<R, E, A>): Stream<R | R1, E | E1, A> => {
3068
+ return self.catchAll((e) => Stream.fromIO(f(e)));
3069
+ };
3070
+ }
3071
+
3072
+ /**
3073
+ * Returns a stream that effectfully "peeks" at the cause of failure of the
3074
+ * stream.
3075
+ *
3076
+ * @tsplus pipeable fncts.io.Stream tapErrorCause
3077
+ */
3078
+ export function tapErrorCause<E, R1, E1>(f: (cause: Cause<E>) => IO<R1, E1, any>, __tsplusTrace?: string) {
3079
+ return <R, A>(self: Stream<R, E, A>): Stream<R | R1, E | E1, A> => {
3080
+ return self.catchAllCause((e) => Stream.fromIO(f(e) > IO.refailCause(e)));
3081
+ };
3082
+ }
3083
+
3084
+ /**
3085
+ * Sends all elements emitted by this stream to the specified sink in addition
3086
+ * to emitting them.
3087
+ *
3088
+ * @tsplus pipeable fncts.io.Stream tapSink
3089
+ */
3090
+ export function tapSink<A, R1, E1>(sink: Sink<R1, E1, A, any, any>, __tsplusTrace?: string) {
3091
+ return <R, E>(self: Stream<R, E, A>): Stream<R | R1, E | E1, A> => {
3092
+ return Stream.fromIO(Queue.makeBounded<Take<E | E1, A>>(1).zip(Future.make<never, void>())).flatMap(
3093
+ ([queue, future]) => {
3094
+ const right = Stream.fromQueue(queue, 1).flattenTake;
3095
+ const loop: Channel<R | R1, E, Conc<A>, any, E1, Conc<A>, any> = Channel.readWithCause(
3096
+ (chunk: Conc<A>) => Channel.fromIO(queue.offer(Take.chunk(chunk))) > Channel.writeNow(chunk) > loop,
3097
+ (cause: Cause<E>) => Channel.fromIO(queue.offer(Take.failCause(cause))),
3098
+ () => Channel.fromIO(queue.offer(Take.end)),
3099
+ );
3100
+ return new Stream((self.channel >>> loop).ensuring(queue.offer(Take.end).forkDaemon > future.await)).merge(
3101
+ Stream.execute(right.run(sink).ensuring(future.succeed(undefined))),
3102
+ "Both",
3103
+ );
3104
+ },
3105
+ );
3106
+ };
3107
+ }
3108
+
2808
3109
  /**
2809
3110
  * Throttles the chunks of this stream according to the given bandwidth parameters using the token bucket
2810
3111
  * algorithm. Allows for burst in the processing of elements by allowing the token bucket to accumulate
@@ -2947,7 +3248,7 @@ export function toQueueOfElements(capacity = 2, __tsplusTrace?: string) {
2947
3248
  return <R, E, A>(stream: Stream<R, E, A>): IO<R | Scope, never, Queue.Dequeue<Exit<Maybe<E>, A>>> => {
2948
3249
  return Do((Δ) => {
2949
3250
  const queue = Δ(IO.acquireRelease(Queue.makeBounded<Exit<Maybe<E>, A>>(capacity), (_) => _.shutdown));
2950
- Δ(stream.runIntoElementsScoped(queue).fork);
3251
+ Δ(stream.runIntoQueueElementsScoped(queue).forkScoped);
2951
3252
  return queue;
2952
3253
  });
2953
3254
  };
@@ -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.33",
4
4
  "dependencies": {
5
- "@fncts/base": "0.0.26",
6
- "@fncts/transformers": "0.0.4",
5
+ "@fncts/base": "0.0.28",
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
- }> {}