brass-runtime 1.14.0 → 1.15.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 +6 -3
- package/dist/agent/cli/main.cjs +44 -43
- package/dist/agent/cli/main.js +5 -4
- package/dist/agent/cli/main.mjs +5 -4
- package/dist/agent/index.cjs +4 -3
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +3 -2
- package/dist/agent/index.mjs +3 -2
- package/dist/{chunk-WJESVBWN.js → chunk-3QMOKAS5.js} +9 -7
- package/dist/{chunk-BMRF4FN6.js → chunk-4NHES7VK.mjs} +59 -237
- package/dist/chunk-AR22SXML.js +1043 -0
- package/dist/{chunk-4N2JEK4H.mjs → chunk-BDF4AMWX.mjs} +27 -151
- package/dist/chunk-BDYEENHT.js +224 -0
- package/dist/{chunk-JT7D6M5H.js → chunk-BMH5AV44.js} +27 -151
- package/dist/chunk-ELOOF35R.mjs +131 -0
- package/dist/chunk-JFPU5GQI.mjs +1043 -0
- package/dist/{chunk-MQF7HZ7Y.mjs → chunk-K6M7MDZ4.mjs} +9 -7
- package/dist/chunk-MS34J5LY.cjs +224 -0
- package/dist/{chunk-UWMMYKVK.mjs → chunk-PPUXIH5R.js} +59 -237
- package/dist/chunk-R3R2FVLG.cjs +131 -0
- package/dist/chunk-STVLQ3XD.cjs +489 -0
- package/dist/{chunk-BKBFSOGT.cjs → chunk-TGIFUAK4.cjs} +26 -150
- package/dist/chunk-TO7IKXYT.js +131 -0
- package/dist/chunk-UMAZLXAB.mjs +224 -0
- package/dist/{chunk-XTMZTVIT.cjs → chunk-VEZNF5GZ.cjs} +136 -134
- package/dist/chunk-XPZNXSVN.cjs +1043 -0
- package/dist/core/index.cjs +216 -0
- package/dist/core/index.d.ts +673 -0
- package/dist/core/index.js +216 -0
- package/dist/core/index.mjs +216 -0
- package/dist/{effect-DM56H743.d.ts → effect-CMOQKX8y.d.ts} +12 -11
- package/dist/http/index.cjs +2557 -235
- package/dist/http/index.d.ts +1514 -4
- package/dist/http/index.js +2549 -227
- package/dist/http/index.mjs +2549 -227
- package/dist/index.cjs +237 -1168
- package/dist/index.d.ts +7 -673
- package/dist/index.js +77 -1008
- package/dist/index.mjs +77 -1008
- package/dist/stream-FQm9h4Mg.d.ts +74 -0
- package/dist/tracing-DNT9jEbr.d.ts +106 -0
- package/package.json +11 -3
- package/dist/chunk-SKVY72E5.cjs +0 -667
- package/dist/stream-Oqe6WeLE.d.ts +0 -173
package/dist/index.d.ts
CHANGED
|
@@ -1,675 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
readonly _tag: "TimeoutError";
|
|
8
|
-
readonly ms: number;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Suspends the fiber for `ms` milliseconds. Cancellable via fiber interruption.
|
|
12
|
-
*/
|
|
13
|
-
declare function sleep(ms: number): Async<unknown, never, void>;
|
|
14
|
-
/**
|
|
15
|
-
* Runs `effect` with a timeout of `ms` milliseconds.
|
|
16
|
-
* - If the effect completes before the timeout, returns its result.
|
|
17
|
-
* - If the timeout fires first, the effect is cancelled and a TimeoutError is returned.
|
|
18
|
-
*
|
|
19
|
-
* Works with ANY effect type (Async, FlatMap, Fold, etc.) by forking
|
|
20
|
-
* the effect into a child fiber and interrupting it on timeout.
|
|
21
|
-
*/
|
|
22
|
-
declare function timeout<R, E, A>(effect: Async<R, E, A>, ms: number): Async<R, E | TimeoutError, A>;
|
|
23
|
-
type RetryPolicy = {
|
|
24
|
-
/** Maximum number of retry attempts (0 = no retries, just the initial attempt) */
|
|
25
|
-
readonly maxRetries: number;
|
|
26
|
-
/** Base delay in ms for exponential backoff */
|
|
27
|
-
readonly baseDelayMs: number;
|
|
28
|
-
/** Maximum delay cap in ms */
|
|
29
|
-
readonly maxDelayMs: number;
|
|
30
|
-
/** Total time budget in ms (optional). Retries stop if elapsed time exceeds this. */
|
|
31
|
-
readonly maxElapsedMs?: number;
|
|
32
|
-
/** Custom predicate: should this error trigger a retry? Default: always retry. */
|
|
33
|
-
readonly shouldRetry?: (error: unknown, attempt: number) => boolean;
|
|
34
|
-
/** Jitter strategy. Default: "full" (random 0..delay). "none" = no jitter. */
|
|
35
|
-
readonly jitter?: "full" | "none";
|
|
36
|
-
};
|
|
37
|
-
type RetryState = {
|
|
38
|
-
readonly attempt: number;
|
|
39
|
-
readonly elapsedMs: number;
|
|
40
|
-
readonly lastError: unknown;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Retries an effect according to the given policy.
|
|
44
|
-
* Uses exponential backoff with full jitter by default.
|
|
45
|
-
*
|
|
46
|
-
* ```ts
|
|
47
|
-
* const result = retry(
|
|
48
|
-
* fetchData(),
|
|
49
|
-
* { maxRetries: 3, baseDelayMs: 100, maxDelayMs: 5000 }
|
|
50
|
-
* );
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
declare function retry<R, E, A>(effect: Async<R, E, A>, policy: RetryPolicy): Async<R, E, A>;
|
|
54
|
-
/**
|
|
55
|
-
* Retry with a simple count (no backoff, immediate retry).
|
|
56
|
-
* Useful for flaky operations that just need a few attempts.
|
|
57
|
-
*/
|
|
58
|
-
declare function retryN<R, E, A>(effect: Async<R, E, A>, n: number): Async<R, E, A>;
|
|
59
|
-
/**
|
|
60
|
-
* Retry with exponential backoff and full jitter.
|
|
61
|
-
* Convenience wrapper with sensible defaults.
|
|
62
|
-
*/
|
|
63
|
-
declare function retryWithBackoff<R, E, A>(effect: Async<R, E, A>, opts?: {
|
|
64
|
-
maxRetries?: number;
|
|
65
|
-
baseDelayMs?: number;
|
|
66
|
-
maxDelayMs?: number;
|
|
67
|
-
maxElapsedMs?: number;
|
|
68
|
-
shouldRetry?: (error: unknown, attempt: number) => boolean;
|
|
69
|
-
}): Async<R, E, A>;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Acquires a resource, uses it, and guarantees release regardless of outcome.
|
|
73
|
-
*
|
|
74
|
-
* - `acquire` runs uninterruptibly (once started, it completes)
|
|
75
|
-
* - `use` runs with the acquired resource
|
|
76
|
-
* - `release` runs after `use` completes (success, failure, or interruption)
|
|
77
|
-
*
|
|
78
|
-
* ```ts
|
|
79
|
-
* const result = bracket(
|
|
80
|
-
* openConnection(), // acquire
|
|
81
|
-
* (conn) => queryDatabase(conn), // use
|
|
82
|
-
* (conn, exit) => conn.close() // release (always runs)
|
|
83
|
-
* );
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
declare function bracket<R, E, A, B>(acquire: Async<R, E, A>, use: (resource: A) => Async<R, E, B>, release: (resource: A, exit: Exit<E, B>) => Async<R, any, void>): Async<R, E, B>;
|
|
87
|
-
/**
|
|
88
|
-
* Runs `effect` and then runs `finalizer` regardless of the outcome.
|
|
89
|
-
* The finalizer receives the exit value for inspection.
|
|
90
|
-
*
|
|
91
|
-
* ```ts
|
|
92
|
-
* const result = ensuring(
|
|
93
|
-
* doWork(),
|
|
94
|
-
* (exit) => logCompletion(exit)
|
|
95
|
-
* );
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
|
-
declare function ensuring<R, E, A>(effect: Async<R, E, A>, finalizer: (exit: Exit<E, A>) => Async<R, any, void>): Async<R, E, A>;
|
|
99
|
-
/**
|
|
100
|
-
* A Managed resource describes how to acquire and release a resource.
|
|
101
|
-
* It can be used multiple times — each `use` call acquires a fresh instance.
|
|
102
|
-
*
|
|
103
|
-
* ```ts
|
|
104
|
-
* const dbPool = managed(
|
|
105
|
-
* createPool({ max: 10 }),
|
|
106
|
-
* (pool) => pool.close()
|
|
107
|
-
* );
|
|
108
|
-
*
|
|
109
|
-
* // Use it:
|
|
110
|
-
* const result = useManaged(dbPool, (pool) => pool.query("SELECT 1"));
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
type Managed<R, E, A> = {
|
|
114
|
-
readonly _tag: "Managed";
|
|
115
|
-
readonly acquire: Async<R, E, A>;
|
|
116
|
-
readonly release: (resource: A, exit: Exit<any, any>) => Async<R, any, void>;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Creates a Managed resource descriptor.
|
|
120
|
-
*/
|
|
121
|
-
declare function managed<R, E, A>(acquire: Async<R, E, A>, release: (resource: A, exit?: Exit<any, any>) => Async<R, any, void>): Managed<R, E, A>;
|
|
122
|
-
/**
|
|
123
|
-
* Uses a Managed resource: acquires, runs the body, and releases.
|
|
124
|
-
*/
|
|
125
|
-
declare function useManaged<R, E, A, B>(m: Managed<R, E, A>, body: (resource: A) => Async<R, E, B>): Async<R, E, B>;
|
|
126
|
-
/**
|
|
127
|
-
* Combines multiple Managed resources. All are acquired in order,
|
|
128
|
-
* and released in reverse order (LIFO).
|
|
129
|
-
*
|
|
130
|
-
* ```ts
|
|
131
|
-
* const resources = managedAll([dbPool, cacheConn, fileHandle]);
|
|
132
|
-
* const result = useManaged(resources, ([db, cache, file]) => ...);
|
|
133
|
-
* ```
|
|
134
|
-
*/
|
|
135
|
-
declare function managedAll<R, E, Resources extends readonly any[]>(manageds: {
|
|
136
|
-
[K in keyof Resources]: Managed<R, E, Resources[K]>;
|
|
137
|
-
}): Managed<R, E, Resources>;
|
|
138
|
-
|
|
139
|
-
type Semaphore = {
|
|
140
|
-
/** Current number of available permits. */
|
|
141
|
-
readonly available: () => number;
|
|
142
|
-
/** Total number of permits (capacity). */
|
|
143
|
-
readonly capacity: number;
|
|
144
|
-
/** Number of effects waiting for a permit. */
|
|
145
|
-
readonly waiting: () => number;
|
|
146
|
-
/** Acquire a permit, run the effect, and release the permit. */
|
|
147
|
-
readonly withPermit: <R, E, A>(effect: Async<R, E, A>) => Async<R, E, A>;
|
|
148
|
-
/** Acquire a permit (manual). Must call release() when done. */
|
|
149
|
-
readonly acquire: () => Async<unknown, never, void>;
|
|
150
|
-
/** Release a permit (manual). */
|
|
151
|
-
readonly release: () => void;
|
|
152
|
-
};
|
|
153
|
-
type SemaphoreStats = {
|
|
154
|
-
readonly capacity: number;
|
|
155
|
-
readonly available: number;
|
|
156
|
-
readonly waiting: number;
|
|
157
|
-
readonly acquired: number;
|
|
158
|
-
readonly released: number;
|
|
159
|
-
};
|
|
160
|
-
/**
|
|
161
|
-
* Creates a counting semaphore with `n` permits.
|
|
162
|
-
*
|
|
163
|
-
* ```ts
|
|
164
|
-
* const sem = makeSemaphore(5); // max 5 concurrent
|
|
165
|
-
*
|
|
166
|
-
* // Automatic acquire/release:
|
|
167
|
-
* const result = await run(sem.withPermit(fetchData()));
|
|
168
|
-
*
|
|
169
|
-
* // Manual acquire/release:
|
|
170
|
-
* await run(sem.acquire());
|
|
171
|
-
* try { ... } finally { sem.release(); }
|
|
172
|
-
* ```
|
|
173
|
-
*/
|
|
174
|
-
declare function makeSemaphore(n: number): Semaphore;
|
|
175
|
-
|
|
176
|
-
type Ref<A> = {
|
|
177
|
-
/** Get the current value. */
|
|
178
|
-
readonly get: () => Async<unknown, never, A>;
|
|
179
|
-
/** Set a new value. */
|
|
180
|
-
readonly set: (value: A) => Async<unknown, never, void>;
|
|
181
|
-
/** Modify the value with a function and return the new value. */
|
|
182
|
-
readonly update: (f: (current: A) => A) => Async<unknown, never, A>;
|
|
183
|
-
/** Modify the value and return a derived result. */
|
|
184
|
-
readonly modify: <B>(f: (current: A) => [B, A]) => Async<unknown, never, B>;
|
|
185
|
-
/** Get the current value synchronously (for non-effect contexts). */
|
|
186
|
-
readonly unsafeGet: () => A;
|
|
187
|
-
};
|
|
188
|
-
/**
|
|
189
|
-
* Creates a mutable reference with an initial value.
|
|
190
|
-
*
|
|
191
|
-
* ```ts
|
|
192
|
-
* const counter = makeRef(0);
|
|
193
|
-
*
|
|
194
|
-
* // In effects:
|
|
195
|
-
* await run(counter.update(n => n + 1));
|
|
196
|
-
* const value = await run(counter.get());
|
|
197
|
-
*
|
|
198
|
-
* // Synchronous access (outside effects):
|
|
199
|
-
* counter.unsafeGet();
|
|
200
|
-
* ```
|
|
201
|
-
*/
|
|
202
|
-
declare function makeRef<A>(initial: A): Ref<A>;
|
|
203
|
-
/**
|
|
204
|
-
* Creates a derived Ref that applies a lens to a parent Ref.
|
|
205
|
-
*
|
|
206
|
-
* ```ts
|
|
207
|
-
* const state = makeRef({ count: 0, name: "test" });
|
|
208
|
-
* const countRef = derivedRef(state, s => s.count, (s, c) => ({ ...s, count: c }));
|
|
209
|
-
* ```
|
|
210
|
-
*/
|
|
211
|
-
declare function derivedRef<A, B>(parent: Ref<A>, get: (a: A) => B, set: (a: A, b: B) => A): Ref<B>;
|
|
212
|
-
|
|
213
|
-
type ScheduleDecision = {
|
|
214
|
-
readonly continue: boolean;
|
|
215
|
-
readonly delayMs: number;
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* A Schedule<I, O> takes an input I (typically the error or output of an effect)
|
|
219
|
-
* and decides whether to continue and with what delay.
|
|
220
|
-
*/
|
|
221
|
-
type Schedule<I, O> = {
|
|
222
|
-
readonly _tag: "Schedule";
|
|
223
|
-
/** Initial state */
|
|
224
|
-
readonly initial: () => any;
|
|
225
|
-
/** Given current state and input, produce a decision and next state */
|
|
226
|
-
readonly step: (state: any, input: I) => [ScheduleDecision, any, O];
|
|
227
|
-
};
|
|
228
|
-
/** Retry/repeat up to N times with no delay. */
|
|
229
|
-
declare function recurs(n: number): Schedule<unknown, number>;
|
|
230
|
-
/** Fixed delay between each retry/repeat. */
|
|
231
|
-
declare function fixed(delayMs: number): Schedule<unknown, number>;
|
|
232
|
-
/** Exponential backoff: delay doubles each time, capped at maxDelayMs. */
|
|
233
|
-
declare function exponential(baseMs: number, maxMs?: number): Schedule<unknown, number>;
|
|
234
|
-
/** Exponential backoff with full jitter (random in [0, delay]). */
|
|
235
|
-
declare function jittered(baseMs: number, maxMs?: number): Schedule<unknown, number>;
|
|
236
|
-
/** Stop after a total elapsed time. */
|
|
237
|
-
declare function elapsed(maxMs: number): Schedule<unknown, number>;
|
|
238
|
-
/** Only continue while a predicate holds on the input. */
|
|
239
|
-
declare function whileInput<I>(pred: (input: I) => boolean): Schedule<I, I>;
|
|
240
|
-
/** Limit a schedule to N repetitions. */
|
|
241
|
-
declare function take$1<I, O>(schedule: Schedule<I, O>, n: number): Schedule<I, O>;
|
|
242
|
-
/** Compose two schedules: use the first, then switch to the second. */
|
|
243
|
-
declare function andThen$1<I, O1, O2>(first: Schedule<I, O1>, second: Schedule<I, O2>): Schedule<I, O1 | O2>;
|
|
244
|
-
/** Run both schedules and continue while BOTH say continue. Use max delay. */
|
|
245
|
-
declare function intersect<I, O1, O2>(left: Schedule<I, O1>, right: Schedule<I, O2>): Schedule<I, [O1, O2]>;
|
|
246
|
-
/** Run both schedules and continue while EITHER says continue. Use min delay. */
|
|
247
|
-
declare function union<I, O1, O2>(left: Schedule<I, O1>, right: Schedule<I, O2>): Schedule<I, [O1, O2]>;
|
|
248
|
-
/**
|
|
249
|
-
* Retry an effect according to a schedule.
|
|
250
|
-
* The schedule receives the error as input on each failure.
|
|
251
|
-
*/
|
|
252
|
-
declare function retryWithSchedule<R, E, A, O>(effect: Async<R, E, A>, schedule: Schedule<E, O>): Async<R, E, A>;
|
|
253
|
-
/**
|
|
254
|
-
* Repeat an effect according to a schedule.
|
|
255
|
-
* The schedule receives the success value as input on each iteration.
|
|
256
|
-
* Returns the last successful value.
|
|
257
|
-
*/
|
|
258
|
-
declare function repeatWithSchedule<R, E, A, O>(effect: Async<R, E, A>, schedule: Schedule<A, O>): Async<R, E, A>;
|
|
259
|
-
|
|
260
|
-
type ShutdownConfig = {
|
|
261
|
-
/** Max time to wait for in-flight work to complete. Default: 30000ms */
|
|
262
|
-
readonly timeoutMs?: number;
|
|
263
|
-
/** Called when shutdown starts. */
|
|
264
|
-
readonly onStart?: () => void;
|
|
265
|
-
/** Called when shutdown completes. */
|
|
266
|
-
readonly onComplete?: (stats: ShutdownStats) => void;
|
|
267
|
-
/** Called if shutdown times out. */
|
|
268
|
-
readonly onTimeout?: (stats: ShutdownStats) => void;
|
|
269
|
-
};
|
|
270
|
-
type ShutdownStats = {
|
|
271
|
-
readonly startedAt: number;
|
|
272
|
-
readonly completedAt: number;
|
|
273
|
-
readonly elapsedMs: number;
|
|
274
|
-
readonly timedOut: boolean;
|
|
275
|
-
};
|
|
276
|
-
/**
|
|
277
|
-
* Performs a graceful shutdown of the runtime.
|
|
278
|
-
*
|
|
279
|
-
* 1. Signals the scheduler to stop accepting new work
|
|
280
|
-
* 2. Waits for in-flight fibers to complete (up to timeoutMs)
|
|
281
|
-
* 3. Calls the runtime's shutdown hook
|
|
282
|
-
* 4. Reports stats
|
|
283
|
-
*
|
|
284
|
-
* ```ts
|
|
285
|
-
* await gracefulShutdown(runtime, {
|
|
286
|
-
* timeoutMs: 5000,
|
|
287
|
-
* onStart: () => console.log("Shutting down..."),
|
|
288
|
-
* onComplete: (stats) => console.log(`Done in ${stats.elapsedMs}ms`),
|
|
289
|
-
* });
|
|
290
|
-
* ```
|
|
291
|
-
*/
|
|
292
|
-
declare function gracefulShutdown<R>(runtime: Runtime<R>, config?: ShutdownConfig): Promise<ShutdownStats>;
|
|
293
|
-
/**
|
|
294
|
-
* Registers process signal handlers for graceful shutdown.
|
|
295
|
-
* Handles SIGTERM and SIGINT (Ctrl+C).
|
|
296
|
-
*
|
|
297
|
-
* ```ts
|
|
298
|
-
* registerShutdownHooks(runtime, {
|
|
299
|
-
* timeoutMs: 10000,
|
|
300
|
-
* onComplete: () => process.exit(0),
|
|
301
|
-
* onTimeout: () => process.exit(1),
|
|
302
|
-
* });
|
|
303
|
-
* ```
|
|
304
|
-
*/
|
|
305
|
-
declare function registerShutdownHooks<R>(runtime: Runtime<R>, config?: ShutdownConfig): () => void;
|
|
306
|
-
|
|
307
|
-
type TestRuntimeOptions = {
|
|
308
|
-
/** If true, effects run synchronously where possible. Default: true */
|
|
309
|
-
readonly synchronous?: boolean;
|
|
310
|
-
};
|
|
311
|
-
/**
|
|
312
|
-
* Creates a test runtime that provides controlled execution.
|
|
313
|
-
*
|
|
314
|
-
* ```ts
|
|
315
|
-
* const { runtime, run, runExit } = makeTestRuntime();
|
|
316
|
-
*
|
|
317
|
-
* const result = await run(myEffect);
|
|
318
|
-
* const exit = await runExit(myEffect); // get full Exit (success or failure)
|
|
319
|
-
* ```
|
|
320
|
-
*/
|
|
321
|
-
declare function makeTestRuntime<R = {}>(env?: R, options?: TestRuntimeOptions): {
|
|
322
|
-
runtime: Runtime<R>;
|
|
323
|
-
run: <E, A>(effect: Async<R, E, A>) => Promise<A>;
|
|
324
|
-
runExit: <E, A>(effect: Async<R, E, A>) => Promise<Exit<E, A>>;
|
|
325
|
-
};
|
|
326
|
-
/**
|
|
327
|
-
* Asserts that an effect succeeds with a specific value.
|
|
328
|
-
*
|
|
329
|
-
* ```ts
|
|
330
|
-
* await assertSucceeds(myEffect, 42);
|
|
331
|
-
* ```
|
|
332
|
-
*/
|
|
333
|
-
declare function assertSucceeds<R, E, A>(effect: Async<R, E, A>, expected: A, runtime?: Runtime<R>): Promise<void>;
|
|
334
|
-
/**
|
|
335
|
-
* Asserts that an effect fails with a specific error.
|
|
336
|
-
*
|
|
337
|
-
* ```ts
|
|
338
|
-
* await assertFails(myEffect, "not found");
|
|
339
|
-
* ```
|
|
340
|
-
*/
|
|
341
|
-
declare function assertFails<R, E, A>(effect: Async<R, E, A>, expectedError: E, runtime?: Runtime<R>): Promise<void>;
|
|
342
|
-
/**
|
|
343
|
-
* Asserts that an effect fails with an error matching a predicate.
|
|
344
|
-
*
|
|
345
|
-
* ```ts
|
|
346
|
-
* await assertFailsWith(myEffect, (e) => e._tag === "NotFound");
|
|
347
|
-
* ```
|
|
348
|
-
*/
|
|
349
|
-
declare function assertFailsWith<R, E, A>(effect: Async<R, E, A>, predicate: (error: E) => boolean, runtime?: Runtime<R>): Promise<void>;
|
|
350
|
-
/**
|
|
351
|
-
* Asserts that an effect completes within a time limit.
|
|
352
|
-
*
|
|
353
|
-
* ```ts
|
|
354
|
-
* await assertCompletesWithin(myEffect, 100); // must finish in 100ms
|
|
355
|
-
* ```
|
|
356
|
-
*/
|
|
357
|
-
declare function assertCompletesWithin<R, E, A>(effect: Async<R, E, A>, maxMs: number, runtime?: Runtime<R>): Promise<A>;
|
|
358
|
-
/**
|
|
359
|
-
* Creates an effect that fails on the first N calls, then succeeds.
|
|
360
|
-
* Useful for testing retry logic.
|
|
361
|
-
*
|
|
362
|
-
* ```ts
|
|
363
|
-
* const flaky = flakyEffect(3, "success!", "temporary error");
|
|
364
|
-
* // Fails 3 times, then returns "success!"
|
|
365
|
-
* ```
|
|
366
|
-
*/
|
|
367
|
-
declare function flakyEffect<E, A>(failCount: number, successValue: A, errorValue: E): Async<unknown, E, A>;
|
|
368
|
-
/**
|
|
369
|
-
* Creates an effect that takes a specific amount of time to complete.
|
|
370
|
-
* Useful for testing timeouts and concurrency.
|
|
371
|
-
*
|
|
372
|
-
* ```ts
|
|
373
|
-
* const slow = delayedEffect(100, "done"); // completes after 100ms
|
|
374
|
-
* ```
|
|
375
|
-
*/
|
|
376
|
-
declare function delayedEffect<A>(ms: number, value: A): Async<unknown, never, A>;
|
|
377
|
-
/**
|
|
378
|
-
* Creates an effect that never completes (hangs forever).
|
|
379
|
-
* Useful for testing timeouts and interruption.
|
|
380
|
-
*/
|
|
381
|
-
declare function neverEffect<A = never>(): Async<unknown, never, A>;
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* A Layer describes how to build a service.
|
|
385
|
-
*
|
|
386
|
-
* - RIn: dependencies required to build this service
|
|
387
|
-
* - E: possible failure during construction
|
|
388
|
-
* - ROut: the service produced
|
|
389
|
-
*/
|
|
390
|
-
type Layer<RIn, E, ROut> = {
|
|
391
|
-
readonly _tag: "Layer";
|
|
392
|
-
readonly build: (deps: RIn) => Async<unknown, E, {
|
|
393
|
-
service: ROut;
|
|
394
|
-
release: () => Async<unknown, never, void>;
|
|
395
|
-
}>;
|
|
396
|
-
};
|
|
397
|
-
/**
|
|
398
|
-
* Creates a Layer from an acquire/release pair.
|
|
399
|
-
*
|
|
400
|
-
* ```ts
|
|
401
|
-
* const DbLayer = layer(
|
|
402
|
-
* () => createPool({ max: 10 }),
|
|
403
|
-
* (pool) => pool.close()
|
|
404
|
-
* );
|
|
405
|
-
* ```
|
|
406
|
-
*/
|
|
407
|
-
declare function layer<ROut, E = never>(acquire: () => Async<unknown, E, ROut>, release?: (service: ROut) => Async<unknown, never, void>): Layer<unknown, E, ROut>;
|
|
408
|
-
/**
|
|
409
|
-
* Creates a Layer that depends on another service.
|
|
410
|
-
*
|
|
411
|
-
* ```ts
|
|
412
|
-
* const RepoLayer = layerFrom<DbPool>()(
|
|
413
|
-
* (pool) => createRepo(pool),
|
|
414
|
-
* (repo) => repo.close()
|
|
415
|
-
* );
|
|
416
|
-
* ```
|
|
417
|
-
*/
|
|
418
|
-
declare function layerFrom<RIn>(): <ROut, E = never>(acquire: (deps: RIn) => Async<unknown, E, ROut>, release?: (service: ROut) => Async<unknown, never, void>) => Layer<RIn, E, ROut>;
|
|
419
|
-
/**
|
|
420
|
-
* Creates a Layer from a pure value (no lifecycle).
|
|
421
|
-
*
|
|
422
|
-
* ```ts
|
|
423
|
-
* const ConfigLayer = layerSucceed({ port: 3000, host: "localhost" });
|
|
424
|
-
* ```
|
|
425
|
-
*/
|
|
426
|
-
declare function layerSucceed<ROut>(value: ROut): Layer<unknown, never, ROut>;
|
|
427
|
-
/**
|
|
428
|
-
* Creates a Layer that always fails.
|
|
429
|
-
*/
|
|
430
|
-
declare function layerFail<E>(error: E): Layer<unknown, E, never>;
|
|
431
|
-
/**
|
|
432
|
-
* Compose two layers: the output of `from` feeds into `to`.
|
|
433
|
-
*
|
|
434
|
-
* ```ts
|
|
435
|
-
* const AppLayer = compose(DbLayer, RepoLayer);
|
|
436
|
-
* // DbLayer produces DbPool → RepoLayer consumes DbPool → produces Repo
|
|
437
|
-
* ```
|
|
438
|
-
*/
|
|
439
|
-
declare function compose$1<R1, E1, Mid, E2, ROut>(from: Layer<R1, E1, Mid>, to: Layer<Mid, E2, ROut>): Layer<R1, E1 | E2, ROut>;
|
|
440
|
-
/**
|
|
441
|
-
* Merge two independent layers into one that produces both services.
|
|
442
|
-
*
|
|
443
|
-
* ```ts
|
|
444
|
-
* const AppLayer = merge(DbLayer, CacheLayer);
|
|
445
|
-
* // Produces { db: DbPool, cache: CacheClient }
|
|
446
|
-
* ```
|
|
447
|
-
*/
|
|
448
|
-
declare function merge<R1, E1, A, R2, E2, B>(left: Layer<R1, E1, A>, right: Layer<R2, E2, B>): Layer<R1 & R2, E1 | E2, A & B>;
|
|
449
|
-
/**
|
|
450
|
-
* Map the output of a layer.
|
|
451
|
-
*/
|
|
452
|
-
declare function mapLayer<RIn, E, A, B>(l: Layer<RIn, E, A>, f: (a: A) => B): Layer<RIn, E, B>;
|
|
453
|
-
/**
|
|
454
|
-
* Builds a layer, runs an effect with the produced service, and releases.
|
|
455
|
-
*
|
|
456
|
-
* ```ts
|
|
457
|
-
* const result = await run(
|
|
458
|
-
* provideLayer(AppLayer, (services) => services.db.query("SELECT 1"))
|
|
459
|
-
* );
|
|
460
|
-
* ```
|
|
461
|
-
*/
|
|
462
|
-
declare function provideLayer<RIn, E, ROut, E2, A>(l: Layer<RIn, E, ROut>, use: (service: ROut) => Async<unknown, E2, A>, deps?: RIn): Async<unknown, E | E2, A>;
|
|
463
|
-
|
|
464
|
-
type WorkerPoolConfig = {
|
|
465
|
-
/** Number of worker threads. Default: number of CPUs - 1 */
|
|
466
|
-
readonly size?: number;
|
|
467
|
-
/** Max queued tasks. Tasks beyond this are rejected. Default: 1000 */
|
|
468
|
-
readonly maxQueue?: number;
|
|
469
|
-
/** Task timeout in ms. Default: 30000 */
|
|
470
|
-
readonly taskTimeoutMs?: number;
|
|
471
|
-
};
|
|
472
|
-
type WorkerPoolError = {
|
|
473
|
-
readonly _tag: "WorkerPoolFull";
|
|
474
|
-
readonly queued: number;
|
|
475
|
-
} | {
|
|
476
|
-
readonly _tag: "WorkerTaskTimeout";
|
|
477
|
-
readonly ms: number;
|
|
478
|
-
} | {
|
|
479
|
-
readonly _tag: "WorkerTaskError";
|
|
480
|
-
readonly message: string;
|
|
481
|
-
} | {
|
|
482
|
-
readonly _tag: "WorkerPoolClosed";
|
|
483
|
-
};
|
|
484
|
-
type WorkerPool = {
|
|
485
|
-
/** Execute a function in a worker thread. */
|
|
486
|
-
readonly execute: <A>(fn: () => A) => Async<unknown, WorkerPoolError, A>;
|
|
487
|
-
/** Execute a serializable task (function source + args). */
|
|
488
|
-
readonly run: <A>(taskSource: string, args?: any[]) => Async<unknown, WorkerPoolError, A>;
|
|
489
|
-
/** Current pool stats. */
|
|
490
|
-
readonly stats: () => WorkerPoolStats;
|
|
491
|
-
/** Shutdown the pool (terminate all workers). */
|
|
492
|
-
readonly shutdown: () => Promise<void>;
|
|
493
|
-
};
|
|
494
|
-
type WorkerPoolStats = {
|
|
495
|
-
readonly size: number;
|
|
496
|
-
readonly busy: number;
|
|
497
|
-
readonly idle: number;
|
|
498
|
-
readonly queued: number;
|
|
499
|
-
readonly completed: number;
|
|
500
|
-
readonly failed: number;
|
|
501
|
-
readonly timedOut: number;
|
|
502
|
-
};
|
|
503
|
-
/**
|
|
504
|
-
* Creates a worker pool for CPU-intensive tasks.
|
|
505
|
-
*
|
|
506
|
-
* NOTE: This is a simplified implementation that uses setTimeout to simulate
|
|
507
|
-
* async execution. For real worker_threads support, the pool would need to
|
|
508
|
-
* spawn actual Worker instances. This provides the API contract and can be
|
|
509
|
-
* upgraded to real threads when needed.
|
|
510
|
-
*
|
|
511
|
-
* ```ts
|
|
512
|
-
* const pool = makeWorkerPool({ size: 4 });
|
|
513
|
-
*
|
|
514
|
-
* const result = await run(pool.execute(() => heavyComputation()));
|
|
515
|
-
*
|
|
516
|
-
* await pool.shutdown();
|
|
517
|
-
* ```
|
|
518
|
-
*/
|
|
519
|
-
declare function makeWorkerPool(config?: WorkerPoolConfig): WorkerPool;
|
|
520
|
-
|
|
521
|
-
type MetricType = "counter" | "gauge" | "histogram";
|
|
522
|
-
type MetricValue = {
|
|
523
|
-
readonly name: string;
|
|
524
|
-
readonly type: MetricType;
|
|
525
|
-
readonly value: number;
|
|
526
|
-
readonly labels: Record<string, string>;
|
|
527
|
-
readonly timestamp: number;
|
|
528
|
-
};
|
|
529
|
-
type HistogramBuckets = {
|
|
530
|
-
readonly boundaries: readonly number[];
|
|
531
|
-
counts: number[];
|
|
532
|
-
sum: number;
|
|
533
|
-
count: number;
|
|
534
|
-
min: number;
|
|
535
|
-
max: number;
|
|
536
|
-
};
|
|
537
|
-
type MetricsRegistry = {
|
|
538
|
-
/** Create or get a counter. */
|
|
539
|
-
readonly counter: (name: string, labels?: Record<string, string>) => Counter;
|
|
540
|
-
/** Create or get a gauge. */
|
|
541
|
-
readonly gauge: (name: string, labels?: Record<string, string>) => Gauge;
|
|
542
|
-
/** Create or get a histogram. */
|
|
543
|
-
readonly histogram: (name: string, boundaries?: number[], labels?: Record<string, string>) => Histogram;
|
|
544
|
-
/** Get all current metric values. */
|
|
545
|
-
readonly snapshot: () => MetricSnapshot;
|
|
546
|
-
/** Reset all metrics. */
|
|
547
|
-
readonly reset: () => void;
|
|
548
|
-
};
|
|
549
|
-
type Counter = {
|
|
550
|
-
readonly increment: (n?: number) => void;
|
|
551
|
-
readonly value: () => number;
|
|
552
|
-
};
|
|
553
|
-
type Gauge = {
|
|
554
|
-
readonly set: (value: number) => void;
|
|
555
|
-
readonly increment: (n?: number) => void;
|
|
556
|
-
readonly decrement: (n?: number) => void;
|
|
557
|
-
readonly value: () => number;
|
|
558
|
-
};
|
|
559
|
-
type Histogram = {
|
|
560
|
-
readonly observe: (value: number) => void;
|
|
561
|
-
readonly buckets: () => HistogramBuckets;
|
|
562
|
-
readonly percentile: (p: number) => number;
|
|
563
|
-
};
|
|
564
|
-
type MetricSnapshot = {
|
|
565
|
-
readonly counters: Array<{
|
|
566
|
-
name: string;
|
|
567
|
-
labels: Record<string, string>;
|
|
568
|
-
value: number;
|
|
569
|
-
}>;
|
|
570
|
-
readonly gauges: Array<{
|
|
571
|
-
name: string;
|
|
572
|
-
labels: Record<string, string>;
|
|
573
|
-
value: number;
|
|
574
|
-
}>;
|
|
575
|
-
readonly histograms: Array<{
|
|
576
|
-
name: string;
|
|
577
|
-
labels: Record<string, string>;
|
|
578
|
-
buckets: HistogramBuckets;
|
|
579
|
-
}>;
|
|
580
|
-
};
|
|
581
|
-
/**
|
|
582
|
-
* Creates a metrics registry.
|
|
583
|
-
*
|
|
584
|
-
* ```ts
|
|
585
|
-
* const metrics = makeMetrics();
|
|
586
|
-
*
|
|
587
|
-
* const requestCount = metrics.counter("http_requests_total", { method: "GET" });
|
|
588
|
-
* requestCount.increment();
|
|
589
|
-
*
|
|
590
|
-
* const latency = metrics.histogram("http_request_duration_ms");
|
|
591
|
-
* latency.observe(42.5);
|
|
592
|
-
*
|
|
593
|
-
* const activeConns = metrics.gauge("active_connections");
|
|
594
|
-
* activeConns.set(10);
|
|
595
|
-
*
|
|
596
|
-
* console.log(metrics.snapshot());
|
|
597
|
-
* ```
|
|
598
|
-
*/
|
|
599
|
-
declare function makeMetrics(): MetricsRegistry;
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* Base type for tagged errors. All errors should extend this pattern:
|
|
603
|
-
*
|
|
604
|
-
* ```ts
|
|
605
|
-
* type NetworkError = { _tag: "NetworkError"; url: string; status: number };
|
|
606
|
-
* type TimeoutError = { _tag: "TimeoutError"; ms: number };
|
|
607
|
-
* type AppError = NetworkError | TimeoutError;
|
|
608
|
-
* ```
|
|
609
|
-
*/
|
|
610
|
-
type TaggedError = {
|
|
611
|
-
readonly _tag: string;
|
|
612
|
-
};
|
|
613
|
-
/**
|
|
614
|
-
* Catches a specific error by its `_tag` field and handles it.
|
|
615
|
-
* Other errors pass through unchanged.
|
|
616
|
-
*
|
|
617
|
-
* ```ts
|
|
618
|
-
* const result = catchTag(effect, "NetworkError", (e) => fallbackValue);
|
|
619
|
-
* // e is narrowed to NetworkError
|
|
620
|
-
* ```
|
|
621
|
-
*/
|
|
622
|
-
declare function catchTag<R, E extends TaggedError, A, Tag extends E["_tag"], B>(effect: Async<R, E, A>, tag: Tag, handler: (error: Extract<E, {
|
|
623
|
-
_tag: Tag;
|
|
624
|
-
}>) => Async<R, Exclude<E, {
|
|
625
|
-
_tag: Tag;
|
|
626
|
-
}>, A | B>): Async<R, Exclude<E, {
|
|
627
|
-
_tag: Tag;
|
|
628
|
-
}>, A | B>;
|
|
629
|
-
/**
|
|
630
|
-
* Catches multiple error tags with a single handler map.
|
|
631
|
-
*
|
|
632
|
-
* ```ts
|
|
633
|
-
* const result = catchTags(effect, {
|
|
634
|
-
* NetworkError: (e) => asyncSucceed(defaultValue),
|
|
635
|
-
* TimeoutError: (e) => retry(effect),
|
|
636
|
-
* });
|
|
637
|
-
* ```
|
|
638
|
-
*/
|
|
639
|
-
declare function catchTags<R, E extends TaggedError, A, Handlers extends Partial<{
|
|
640
|
-
[K in E["_tag"]]: (error: Extract<E, {
|
|
641
|
-
_tag: K;
|
|
642
|
-
}>) => Async<R, any, any>;
|
|
643
|
-
}>>(effect: Async<R, E, A>, handlers: Handlers): Async<R, Exclude<E, {
|
|
644
|
-
_tag: keyof Handlers & string;
|
|
645
|
-
}>, A>;
|
|
646
|
-
/**
|
|
647
|
-
* Maps the error channel of an effect.
|
|
648
|
-
*
|
|
649
|
-
* ```ts
|
|
650
|
-
* const result = mapError(effect, (e) => ({ _tag: "Wrapped", cause: e }));
|
|
651
|
-
* ```
|
|
652
|
-
*/
|
|
653
|
-
declare function mapError<R, E, E2, A>(effect: Async<R, E, A>, f: (error: E) => E2): Async<R, E2, A>;
|
|
654
|
-
/**
|
|
655
|
-
* Wraps any error with a tag, making it part of a discriminated union.
|
|
656
|
-
*
|
|
657
|
-
* ```ts
|
|
658
|
-
* const typed = tagError(fetchData(), "NetworkError", (e) => ({ url, cause: e }));
|
|
659
|
-
* // Error type becomes { _tag: "NetworkError"; url: string; cause: unknown }
|
|
660
|
-
* ```
|
|
661
|
-
*/
|
|
662
|
-
declare function tagError<R, E, A, Tag extends string, Fields extends Record<string, unknown>>(effect: Async<R, E, A>, tag: Tag, enrich?: (error: E) => Fields): Async<R, {
|
|
663
|
-
_tag: Tag;
|
|
664
|
-
} & Fields, A>;
|
|
665
|
-
/**
|
|
666
|
-
* If the effect fails, run the fallback instead.
|
|
667
|
-
*
|
|
668
|
-
* ```ts
|
|
669
|
-
* const result = orElse(primary(), () => fallback());
|
|
670
|
-
* ```
|
|
671
|
-
*/
|
|
672
|
-
declare function orElse<R, E, A, R2, E2, B>(effect: Async<R, E, A>, fallback: (error: E) => Async<R2, E2, B>): Async<R & R2, E2, A | B>;
|
|
1
|
+
import { F as FiberEngine, W as WasmEngineRuntime, A as Async, R as RuntimeFiber, a as FiberEngineStats, b as Fiber, c as FiberId, d as FiberStatus, E as Exit, e as RuntimeEvent, f as WasmBridge, g as OpcodeProgram, h as FiberId$1, i as EngineEvent, j as RefId, N as NodeId, k as OpcodeNode, S as Scope, l as RingBufferOptions, m as EngineStats, O as Option } from './effect-CMOQKX8y.js';
|
|
2
|
+
export { n as AbortablePromiseFinish, o as AbortablePromiseLabelStats, p as AbortablePromiseOptions, q as AbortablePromiseOutcome, r as AbortablePromiseStats, s as AsyncRegisterRef, t as AsyncWithPromise, u as BoundedRingBuffer, C as CancelToken, v as Canceler, w as Cause, x as CustomHostAction, D as DbHostAction, y as DecodeRef, z as DefaultHostExecutor, B as EngineKind, G as EngineSelection, H as EngineSelectionMode, I as FiberEngineKind, J as FlatMapRef, K as FoldFailureRef, L as FoldSuccessRef, M as HostAction, P as HostActionKind, Q as HostActionResult, T as HostExecutionContext, U as HostExecutor, V as HostRegistry, X as HostRegistryStats, Y as HttpHostAction, _ as Interrupted, $ as Joiner, a0 as LaneStatsData, a1 as None, a2 as NoopHooks, a3 as ProgramBuilder, a4 as ProgramPatch, a5 as PushStatus, a6 as QueueHostAction, a7 as RingBuffer, a8 as RingBufferEngine, a9 as RingBufferStatsData, aa as Runtime, ab as RuntimeCapabilities, ac as RuntimeEngineMode, ad as RuntimeOptions, ae as ScheduleResult, af as Scheduler, ag as SchedulerEngine, ah as SchedulerOptions, ai as SchedulerStats, aj as SchedulerStatsData, ak as ScopeId, al as Some, am as SyncRef, an as Task, ao as WasmFiberEngine, ap as WasmFiberEngineOptions, Z as ZIO, aq as abortablePromiseStats, ar as acquireRelease, as as async, at as asyncCatchAll, au as asyncFail, av as asyncFlatMap, aw as asyncFold, ax as asyncInterruptible, ay as asyncMap, az as asyncMapError, aA as asyncSucceed, aB as asyncSync, aC as asyncTotal, aD as catchAll, aE as end, aF as engineStats, aG as fail, aH as flatMap, aI as fork, aJ as fromPromiseAbortable, aK as getBenchmarkBudget, aL as getCurrentFiber, aM as globalScheduler, aN as inferCallerLaneFromStack, aO as laneTag, aP as linkAbortController, aQ as makeBoundedRingBuffer, aR as makeCancelToken, aS as map, aT as mapAsync, aU as mapError, aV as mapTryAsync, aW as none, aX as orElseOptional, aY as resetAbortablePromiseStats, aZ as runtimeCapabilities, a_ as runtimeForCaller, a$ as sanitizeLaneKey, b0 as selectedEngineStats, b1 as setBenchmarkBudget, b2 as some, b3 as succeed, b4 as sync, b5 as toPromise, b6 as toPromiseByCaller, b7 as unit, b8 as unsafeGetCurrentRuntime, b9 as unsafeRunAsync, ba as unsafeRunFoldWithEnv, bb as withAsyncPromise, bc as withCurrentFiber, bd as withScope, be as withScopeAsync } from './effect-CMOQKX8y.js';
|
|
3
|
+
export { Counter, Gauge, Histogram, HistogramBuckets, Layer, ManagedResource, MetricSnapshot, MetricType, MetricValue, MetricsRegistry, Ref, RetryPolicy, RetryState, Schedule, ScheduleDecision, Semaphore, SemaphoreStats, ShutdownConfig, ShutdownStats, TaggedError, TestRuntimeOptions, TimeoutError, WorkerPool, WorkerPoolConfig, WorkerPoolError, WorkerPoolStats, andThenSchedule, assertCompletesWithin, assertFails, assertFailsWith, assertSucceeds, bracket, catchTag, catchTags, composeLayer, delayedEffect, derivedRef, elapsed, ensuring, exponential, fixed, flakyEffect, gracefulShutdown, intersect, jittered, layer, layerFail, layerFrom, layerSucceed, makeMetrics, makeRef, makeSemaphore, makeTestRuntime, makeWorkerPool, managed, managedAll, mapErrorTyped, mapLayer, mergeLayer, neverEffect, orElse, provideLayer, recurs, registerShutdownHooks, repeatWithSchedule, retry, retryN, retryWithBackoff, retryWithSchedule, sleep, tagError, takeSchedule, timeout, union, useManaged, whileInput } from './core/index.js';
|
|
4
|
+
export { C as CircuitBreaker, a as CircuitBreakerConfig, b as CircuitBreakerError, c as CircuitBreakerState, d as CircuitBreakerStats, S as Span, e as SpanContext, f as SpanEvent, g as SpanStatus, T as Tracer, h as TracerConfig, m as makeCircuitBreaker, i as makeTracer } from './tracing-DNT9jEbr.js';
|
|
5
|
+
import { Z as ZStream } from './stream-FQm9h4Mg.js';
|
|
6
|
+
export { C as Concat, E as Emit, a as Empty, F as Flatten, b as FromArray, c as FromPull, M as Managed, d as Merge, N as Normalize, R as ReadableStreamOptions, S as Scoped, e as assertNever, f as collectStream, g as concatStream, h as emitStream, i as emptyStream, j as flattenStream, k as foreachStream, l as fromArray, m as fromPull, n as managedStream, o as mapStream, p as merge, q as mergeStream, r as rangeStream, s as streamFromReadableStream, u as uncons, t as unwrapScoped, w as widenOpt, z as zip } from './stream-FQm9h4Mg.js';
|
|
673
7
|
|
|
674
8
|
declare class JsFiberEngine<R> implements FiberEngine<R> {
|
|
675
9
|
private readonly runtime;
|
|
@@ -1198,4 +532,4 @@ declare function take<R, E, A>(stream: ZStream<R, E, A>, n: number): ZStream<R,
|
|
|
1198
532
|
*/
|
|
1199
533
|
declare function drop<R, E, A>(stream: ZStream<R, E, A>, n: number): ZStream<R, E, A>;
|
|
1200
534
|
|
|
1201
|
-
export { ABI_VERSION, Async,
|
|
535
|
+
export { ABI_VERSION, Async, EVENT_WORDS, EngineEvent, EngineFiberHandle, EngineStats, EventKindCode, Exit, Fiber, FiberEngine, FiberEngineStats, FiberId, type FiberReadyQueue, type FiberReadyQueueOptions, type FiberReadyQueueStats, FiberStatus, type FuseResult, type FuseState, type FusedPipelineRepr, type FusedPipelineStats, type FusedStep, type FusionOptions, type Hub, type HubClosed, type HubStrategy, type InternalFiberStatus, JsFiberEngine, NONE_U32, NodeId, OpcodeNode, OpcodeProgram, OpcodeTagCode, Option, PURE_PIPELINE_TAG, type PurePipelineMetadata, type PurePipelineTag, type Queue, type QueueClosed, type QueueOptions, type ReadyQueueScheduleKind, RefId, RingBufferOptions, RuntimeFiber, Scope, type SerializedFusedPipeline, type SerializedStep, type Strategy, type StreamChunkEngine, type StreamChunkOptions, type StreamChunkStats, type Subscription, WasmBridge, WasmEngineRuntime, WasmFiberRegistryBridge, type WasmFiberRegistryStats, WasmPackFiberBridge, type ZPipeline, ZStream, andThen, applyFused, bounded, broadcast, broadcastToHub, buffer, bufferP, chunks, chunksP, collectAllPar, compose, debounce, decodeEvent, decodeEventBatch, deserializeFusedPipeline, dropP, drop as dropStream, encodeOpcodeNodes, encodeOpcodeProgram, filterMapP, filterP, fromHub, fuse, getStats, groupedP, identity, initState, interleave, isFusionEnabled, isFusionVerbose, makeFiberReadyQueue, makeHub, makeStreamChunker, mapChunks, mapChunksEffect, mapChunksEffectP, mapEffectP, mapP, race, raceWith, runFusedArray, scan, serializeFusedPipeline, setFusionEnabled, setFusionVerbose, takeP, take as takeStream, tapEffectP, throttle, via, zipPar, zip as zipStream, zipWith };
|