brass-runtime 1.15.0 → 1.16.1
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/CHANGELOG.md +17 -0
- package/README.md +673 -136
- package/dist/agent/cli/main.cjs +40 -35
- package/dist/agent/cli/main.js +9 -4
- package/dist/agent/cli/main.mjs +9 -4
- package/dist/agent/index.cjs +8 -4
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +7 -3
- package/dist/agent/index.mjs +7 -3
- package/dist/chunk-2HQTDLHF.mjs +683 -0
- package/dist/chunk-36I3M4UC.mjs +370 -0
- package/dist/chunk-3AYM6WPJ.js +1629 -0
- package/dist/chunk-3LOYJFRR.cjs +300 -0
- package/dist/chunk-3RG5ZIWI.js +10 -0
- package/dist/chunk-3Y2RIUMM.js +300 -0
- package/dist/{chunk-VEZNF5GZ.cjs → chunk-4ROBZFL6.cjs} +130 -126
- package/dist/{chunk-3QMOKAS5.js → chunk-52OB2ROS.js} +9 -5
- package/dist/chunk-52PPNNI4.cjs +416 -0
- package/dist/chunk-5EC274J5.cjs +2874 -0
- package/dist/chunk-5QC7LRZ3.js +229 -0
- package/dist/chunk-5VRJNBLZ.mjs +2874 -0
- package/dist/chunk-62AZW6UT.cjs +313 -0
- package/dist/chunk-6IXXWIUM.js +683 -0
- package/dist/chunk-74ZTY6CP.js +2871 -0
- package/dist/chunk-76YMRMH2.cjs +777 -0
- package/dist/chunk-7CMJS3QE.mjs +2871 -0
- package/dist/{chunk-4NHES7VK.mjs → chunk-7JIJOVCT.js} +27 -13
- package/dist/chunk-A2OM6NEH.mjs +194 -0
- package/dist/chunk-AGR5B2BC.cjs +683 -0
- package/dist/chunk-AVNQLJ5V.js +777 -0
- package/dist/chunk-B33ICAKP.js +313 -0
- package/dist/{chunk-ELOOF35R.mjs → chunk-B5JD23U7.mjs} +1 -1
- package/dist/chunk-BABBZK4Y.js +2024 -0
- package/dist/chunk-C3MDXTRZ.js +354 -0
- package/dist/chunk-CIZFIMK5.js +2193 -0
- package/dist/chunk-CZIVE6NT.cjs +354 -0
- package/dist/chunk-DNFJLJMW.mjs +354 -0
- package/dist/chunk-DNFO2EIZ.mjs +777 -0
- package/dist/chunk-EJ6BPYVR.mjs +416 -0
- package/dist/chunk-ENKODRU3.cjs +2193 -0
- package/dist/chunk-EOC4UHBS.mjs +229 -0
- package/dist/{chunk-BMH5AV44.js → chunk-FH2X7BVP.js} +756 -440
- package/dist/{chunk-PPUXIH5R.js → chunk-FHQGHPMO.mjs} +27 -13
- package/dist/{chunk-TGIFUAK4.cjs → chunk-GLE2WY7Z.cjs} +951 -635
- package/dist/{chunk-BDF4AMWX.mjs → chunk-GYM3LLGS.mjs} +756 -440
- package/dist/chunk-HLWLMW2F.mjs +2024 -0
- package/dist/chunk-JF5WGYJJ.cjs +194 -0
- package/dist/chunk-KH4SYAOS.mjs +1629 -0
- package/dist/chunk-KN32XNTH.mjs +313 -0
- package/dist/chunk-KQLYONSE.cjs +2871 -0
- package/dist/{chunk-STVLQ3XD.cjs → chunk-KZJQ723N.cjs} +92 -78
- package/dist/chunk-L2SYFEBS.js +194 -0
- package/dist/chunk-L6VB5N7Q.cjs +104 -0
- package/dist/{chunk-K6M7MDZ4.mjs → chunk-MBEJI5HF.mjs} +9 -5
- package/dist/chunk-MIIYDLGM.js +2874 -0
- package/dist/chunk-MOO4L7F4.mjs +104 -0
- package/dist/chunk-MT3OWDPC.mjs +2193 -0
- package/dist/chunk-MVGUEJ5Z.cjs +370 -0
- package/dist/chunk-OBGZSXTJ.cjs +10 -0
- package/dist/chunk-PD4EJTQC.cjs +229 -0
- package/dist/chunk-PWC3RBQE.mjs +300 -0
- package/dist/chunk-Q2I37RP3.cjs +1629 -0
- package/dist/chunk-RKGKFN2A.js +416 -0
- package/dist/{chunk-R3R2FVLG.cjs → chunk-SA6HUJVI.cjs} +5 -5
- package/dist/chunk-TRM4JUZQ.js +104 -0
- package/dist/chunk-UB4B6OFY.js +370 -0
- package/dist/{chunk-TO7IKXYT.js → chunk-UCUBNWM2.js} +1 -1
- package/dist/chunk-VN44DYYT.cjs +2024 -0
- package/dist/chunk-Y6FXYEAI.mjs +10 -0
- package/dist/client-CZHU674n.d.ts +820 -0
- package/dist/core/index.cjs +198 -4
- package/dist/core/index.d.ts +311 -212
- package/dist/core/index.js +237 -43
- package/dist/core/index.mjs +237 -43
- package/dist/{effect-CMOQKX8y.d.ts → effect-DIUHZ9IN.d.ts} +195 -1
- package/dist/effectRunner-CFLC32IK.cjs +8 -0
- package/dist/effectRunner-L4S7IPT3.js +8 -0
- package/dist/effectRunner-NNGG75QA.mjs +8 -0
- package/dist/http/index.cjs +1227 -2971
- package/dist/http/index.d.ts +826 -280
- package/dist/http/index.js +1089 -2833
- package/dist/http/index.mjs +1089 -2833
- package/dist/http/testing.cjs +161 -0
- package/dist/http/testing.d.ts +43 -0
- package/dist/http/testing.js +161 -0
- package/dist/http/testing.mjs +161 -0
- package/dist/index.cjs +486 -250
- package/dist/index.d.ts +87 -95
- package/dist/index.js +391 -155
- package/dist/index.mjs +391 -155
- package/dist/observability/index.cjs +162 -0
- package/dist/observability/index.d.ts +152 -0
- package/dist/observability/index.js +162 -0
- package/dist/observability/index.mjs +162 -0
- package/dist/perf/cli.cjs +401 -0
- package/dist/perf/cli.d.ts +1 -0
- package/dist/perf/cli.js +401 -0
- package/dist/perf/cli.mjs +401 -0
- package/dist/perf/index.cjs +141 -0
- package/dist/perf/index.d.ts +483 -0
- package/dist/perf/index.js +141 -0
- package/dist/perf/index.mjs +141 -0
- package/dist/schedule-CK3Ml_7p.d.ts +259 -0
- package/dist/schema/index.cjs +29 -0
- package/dist/schema/index.d.ts +179 -0
- package/dist/schema/index.js +29 -0
- package/dist/schema/index.mjs +29 -0
- package/dist/server-GJPg8ZSG.d.ts +675 -0
- package/dist/{stream-FQm9h4Mg.d.ts → stream-B4oK9JFP.d.ts} +1 -1
- package/dist/tracer-Hwt1cl7h.d.ts +189 -0
- package/dist/tracing-DqbTKGcf.d.ts +148 -0
- package/docs/ARCHITECTURE.md +292 -0
- package/docs/README.md +63 -0
- package/docs/adr/0001-ai-context-pack.md +32 -0
- package/docs/agent-apply-mode.md +104 -0
- package/docs/agent-approvals.md +110 -0
- package/docs/agent-batch.md +185 -0
- package/docs/agent-boundaries.md +112 -0
- package/docs/agent-chat-sessions.md +160 -0
- package/docs/agent-ci.md +17 -0
- package/docs/agent-cli.md +405 -0
- package/docs/agent-config.md +480 -0
- package/docs/agent-context-discovery.md +159 -0
- package/docs/agent-copilot-like-dx.md +126 -0
- package/docs/agent-declarative-optimized-planning.md +138 -0
- package/docs/agent-dx.md +224 -0
- package/docs/agent-env-files.md +126 -0
- package/docs/agent-follow-up-context.md +43 -0
- package/docs/agent-global-usage.md +180 -0
- package/docs/agent-init.md +109 -0
- package/docs/agent-install-and-configure.md +516 -0
- package/docs/agent-language-workspace-ux.md +99 -0
- package/docs/agent-llm-adapters.md +123 -0
- package/docs/agent-local-install.md +190 -0
- package/docs/agent-local-tests.md +51 -0
- package/docs/agent-observability.md +155 -0
- package/docs/agent-patch-quality-loop.md +162 -0
- package/docs/agent-presets.md +22 -0
- package/docs/agent-project-commands.md +237 -0
- package/docs/agent-project-intelligence.md +156 -0
- package/docs/agent-redaction.md +18 -0
- package/docs/agent-release-readiness.md +76 -0
- package/docs/agent-rollback-safety.md +162 -0
- package/docs/agent-rollback.md +23 -0
- package/docs/agent-run-artifacts.md +16 -0
- package/docs/agent-vscode-auto-discovery.md +137 -0
- package/docs/agent-vscode-batch-runner.md +100 -0
- package/docs/agent-vscode-chat-layout.md +90 -0
- package/docs/agent-vscode-clean-install.md +147 -0
- package/docs/agent-vscode-code-actions.md +70 -0
- package/docs/agent-vscode-diff-preview.md +45 -0
- package/docs/agent-vscode-inline-assist.md +56 -0
- package/docs/agent-vscode-install.md +186 -0
- package/docs/agent-vscode-model-setup.md +97 -0
- package/docs/agent-vscode-patch-preview.md +92 -0
- package/docs/agent-vscode-problems.md +79 -0
- package/docs/agent-vscode-project-dashboard.md +106 -0
- package/docs/agent-vscode-run-history.md +92 -0
- package/docs/agent-vscode-ux.md +73 -0
- package/docs/ai/INVARIANTS.md +84 -0
- package/docs/ai/PROJECT_MAP.md +338 -0
- package/docs/ai/PUBLIC_API.md +336 -0
- package/docs/ai/VALIDATION_MATRIX.md +67 -0
- package/docs/api-polish.md +37 -0
- package/docs/cancellation.md +162 -0
- package/docs/coverage.md +46 -0
- package/docs/getting-started.md +159 -0
- package/docs/guides/README.md +40 -0
- package/docs/guides/circuit-breaker.md +89 -0
- package/docs/guides/error-handling.md +91 -0
- package/docs/guides/getting-started.md +107 -0
- package/docs/guides/layers.md +189 -0
- package/docs/guides/metrics.md +101 -0
- package/docs/guides/resource-management.md +141 -0
- package/docs/guides/retry.md +215 -0
- package/docs/guides/semaphore.md +66 -0
- package/docs/guides/streams.md +117 -0
- package/docs/guides/supervisors.md +98 -0
- package/docs/guides/testing.md +162 -0
- package/docs/guides/tracing.md +71 -0
- package/docs/http-recipes.md +399 -0
- package/docs/http.md +749 -0
- package/docs/modules.md +285 -0
- package/docs/observability-collector-smoke.md +31 -0
- package/docs/observability-framework-examples.md +98 -0
- package/docs/observability.md +542 -0
- package/docs/otel-collector-smoke.yaml +27 -0
- package/docs/performance-profiler.md +199 -0
- package/docs/production-readiness.md +73 -0
- package/docs/recipes/README.md +12 -0
- package/docs/recipes/http-server.md +45 -0
- package/docs/recipes/layers.md +44 -0
- package/docs/recipes/performance.md +47 -0
- package/docs/recipes/runtime.md +41 -0
- package/docs/recipes/testing.md +41 -0
- package/docs/release.md +53 -0
- package/docs/wasm-bounded-queues.md +44 -0
- package/docs/wasm-engine-observability-benchmarks.md +85 -0
- package/docs/wasm-fiber-engine.md +117 -0
- package/docs/wasm-scheduler-state-machine.md +122 -0
- package/docs/wasm-stream-chunks.md +54 -0
- package/package.json +48 -2
- package/dist/chunk-AR22SXML.js +0 -1043
- package/dist/chunk-BDYEENHT.js +0 -224
- package/dist/chunk-JFPU5GQI.mjs +0 -1043
- package/dist/chunk-MS34J5LY.cjs +0 -224
- package/dist/chunk-UMAZLXAB.mjs +0 -224
- package/dist/chunk-XPZNXSVN.cjs +0 -1043
- package/dist/tracing-DNT9jEbr.d.ts +0 -106
package/dist/index.cjs
CHANGED
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var _chunkXPZNXSVNcjs = require('./chunk-XPZNXSVN.cjs');
|
|
52
51
|
|
|
53
52
|
|
|
54
53
|
|
|
@@ -62,6 +61,7 @@ var _chunkXPZNXSVNcjs = require('./chunk-XPZNXSVN.cjs');
|
|
|
62
61
|
|
|
63
62
|
|
|
64
63
|
|
|
64
|
+
var _chunkQ2I37RP3cjs = require('./chunk-Q2I37RP3.cjs');
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
@@ -69,7 +69,6 @@ var _chunkXPZNXSVNcjs = require('./chunk-XPZNXSVN.cjs');
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
var _chunkSTVLQ3XDcjs = require('./chunk-STVLQ3XD.cjs');
|
|
73
72
|
|
|
74
73
|
|
|
75
74
|
|
|
@@ -77,13 +76,12 @@ var _chunkSTVLQ3XDcjs = require('./chunk-STVLQ3XD.cjs');
|
|
|
77
76
|
|
|
78
77
|
|
|
79
78
|
|
|
80
|
-
var
|
|
79
|
+
var _chunk62AZW6UTcjs = require('./chunk-62AZW6UT.cjs');
|
|
81
80
|
|
|
82
81
|
|
|
83
82
|
|
|
84
83
|
|
|
85
84
|
|
|
86
|
-
var _chunkR3R2FVLGcjs = require('./chunk-R3R2FVLG.cjs');
|
|
87
85
|
|
|
88
86
|
|
|
89
87
|
|
|
@@ -91,6 +89,7 @@ var _chunkR3R2FVLGcjs = require('./chunk-R3R2FVLG.cjs');
|
|
|
91
89
|
|
|
92
90
|
|
|
93
91
|
|
|
92
|
+
var _chunkPD4EJTQCcjs = require('./chunk-PD4EJTQC.cjs');
|
|
94
93
|
|
|
95
94
|
|
|
96
95
|
|
|
@@ -111,11 +110,13 @@ var _chunkR3R2FVLGcjs = require('./chunk-R3R2FVLG.cjs');
|
|
|
111
110
|
|
|
112
111
|
|
|
113
112
|
|
|
113
|
+
var _chunkKZJQ723Ncjs = require('./chunk-KZJQ723N.cjs');
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
|
|
119
|
+
var _chunkSA6HUJVIcjs = require('./chunk-SA6HUJVI.cjs');
|
|
119
120
|
|
|
120
121
|
|
|
121
122
|
|
|
@@ -160,21 +161,123 @@ var _chunkR3R2FVLGcjs = require('./chunk-R3R2FVLG.cjs');
|
|
|
160
161
|
|
|
161
162
|
|
|
162
163
|
|
|
164
|
+
var _chunkAGR5B2BCcjs = require('./chunk-AGR5B2BC.cjs');
|
|
163
165
|
|
|
164
166
|
|
|
165
167
|
|
|
166
|
-
|
|
168
|
+
|
|
169
|
+
var _chunkJF5WGYJJcjs = require('./chunk-JF5WGYJJ.cjs');
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
var _chunk52PPNNI4cjs = require('./chunk-52PPNNI4.cjs');
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
var _chunkGLE2WY7Zcjs = require('./chunk-GLE2WY7Z.cjs');
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
var _chunkMVGUEJ5Zcjs = require('./chunk-MVGUEJ5Z.cjs');
|
|
268
|
+
require('./chunk-CZIVE6NT.cjs');
|
|
269
|
+
require('./chunk-OBGZSXTJ.cjs');
|
|
167
270
|
|
|
168
271
|
// src/core/stream/queue.ts
|
|
169
272
|
function bounded(capacity, strategy = "backpressure", options = {}) {
|
|
170
|
-
return
|
|
273
|
+
return _chunkMVGUEJ5Zcjs.asyncSync.call(void 0, () => makeQueue(capacity, strategy, options));
|
|
171
274
|
}
|
|
172
275
|
function makeQueue(capacity, strategy, options) {
|
|
173
|
-
const items =
|
|
276
|
+
const items = _chunkGLE2WY7Zcjs.makeBoundedRingBuffer.call(void 0, capacity, capacity, options);
|
|
174
277
|
let closed = false;
|
|
175
278
|
const QueueClosedErr = { _tag: "QueueClosed" };
|
|
176
|
-
const offerWaiters = new (0,
|
|
177
|
-
const takers = new (0,
|
|
279
|
+
const offerWaiters = new (0, _chunkQ2I37RP3cjs.LinkedQueue)();
|
|
280
|
+
const takers = new (0, _chunkQ2I37RP3cjs.LinkedQueue)();
|
|
178
281
|
const shutdown = () => {
|
|
179
282
|
if (closed) return;
|
|
180
283
|
closed = true;
|
|
@@ -191,7 +294,7 @@ function makeQueue(capacity, strategy, options) {
|
|
|
191
294
|
return {
|
|
192
295
|
size: () => items.length,
|
|
193
296
|
shutdown,
|
|
194
|
-
offer: (a) =>
|
|
297
|
+
offer: (a) => _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (_env, cb) => {
|
|
195
298
|
if (closed) {
|
|
196
299
|
cb({ _tag: "Success", value: false });
|
|
197
300
|
return;
|
|
@@ -226,7 +329,7 @@ function makeQueue(capacity, strategy, options) {
|
|
|
226
329
|
};
|
|
227
330
|
return canceler;
|
|
228
331
|
}),
|
|
229
|
-
take: () =>
|
|
332
|
+
take: () => _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (_env, cb) => {
|
|
230
333
|
if (items.length > 0) {
|
|
231
334
|
const a = items.shift();
|
|
232
335
|
cb({ _tag: "Success", value: a });
|
|
@@ -253,7 +356,7 @@ function makeQueue(capacity, strategy, options) {
|
|
|
253
356
|
};
|
|
254
357
|
return canceler;
|
|
255
358
|
}),
|
|
256
|
-
offerBatch: (values) =>
|
|
359
|
+
offerBatch: (values) => _chunkMVGUEJ5Zcjs.asyncSync.call(void 0, () => {
|
|
257
360
|
const results = [];
|
|
258
361
|
for (let i = 0; i < values.length; i++) {
|
|
259
362
|
if (closed) {
|
|
@@ -284,7 +387,7 @@ function makeQueue(capacity, strategy, options) {
|
|
|
284
387
|
}
|
|
285
388
|
return results;
|
|
286
389
|
}),
|
|
287
|
-
takeBatch: (n) =>
|
|
390
|
+
takeBatch: (n) => _chunkMVGUEJ5Zcjs.asyncSync.call(void 0, () => {
|
|
288
391
|
const results = [];
|
|
289
392
|
const count = Math.min(n, items.length + offerWaiters.length);
|
|
290
393
|
for (let i = 0; i < count; i++) {
|
|
@@ -318,34 +421,34 @@ function buffer(stream, capacity, strategy = "backpressure") {
|
|
|
318
421
|
let q = null;
|
|
319
422
|
let producer = null;
|
|
320
423
|
let upstream = stream;
|
|
321
|
-
const onUpstreamFailure = (opt) =>
|
|
424
|
+
const onUpstreamFailure = (opt) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0,
|
|
322
425
|
opt._tag === "None" ? SIGNAL_END : { _tag: "Fail", error: opt.value }
|
|
323
426
|
);
|
|
324
|
-
const onUpstreamSuccess = ([a, tail]) =>
|
|
427
|
+
const onUpstreamSuccess = ([a, tail]) => _chunkMVGUEJ5Zcjs.asyncSync.call(void 0, () => {
|
|
325
428
|
upstream = tail;
|
|
326
429
|
return { _tag: "Elem", value: a };
|
|
327
430
|
});
|
|
328
|
-
const nextSignal = () =>
|
|
329
|
-
|
|
431
|
+
const nextSignal = () => _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
432
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, upstream),
|
|
330
433
|
onUpstreamFailure,
|
|
331
434
|
onUpstreamSuccess
|
|
332
435
|
);
|
|
333
|
-
const start = (env) =>
|
|
436
|
+
const start = (env) => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0, bounded(capacity, strategy), (_q) => {
|
|
334
437
|
q = _q;
|
|
335
438
|
let lastSig;
|
|
336
439
|
const afterOffer = () => {
|
|
337
440
|
if (lastSig._tag !== "Elem") {
|
|
338
|
-
return
|
|
441
|
+
return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, void 0);
|
|
339
442
|
}
|
|
340
443
|
return loop();
|
|
341
444
|
};
|
|
342
445
|
const onSignal = (sig) => {
|
|
343
446
|
lastSig = sig;
|
|
344
|
-
return
|
|
447
|
+
return _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0, q.offer(sig), afterOffer);
|
|
345
448
|
};
|
|
346
|
-
const loop = () =>
|
|
347
|
-
producer =
|
|
348
|
-
return
|
|
449
|
+
const loop = () => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0, nextSignal(), onSignal);
|
|
450
|
+
producer = _chunkGLE2WY7Zcjs.fork.call(void 0, loop(), env);
|
|
451
|
+
return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, void 0);
|
|
349
452
|
});
|
|
350
453
|
const pullDown = {
|
|
351
454
|
_tag: "Async",
|
|
@@ -353,7 +456,7 @@ function buffer(stream, capacity, strategy = "backpressure") {
|
|
|
353
456
|
const go = () => {
|
|
354
457
|
if (!started) {
|
|
355
458
|
started = true;
|
|
356
|
-
|
|
459
|
+
_chunkGLE2WY7Zcjs.unsafeGetCurrentRuntime.call(void 0, ).fork(start(env)).join(() => {
|
|
357
460
|
pullFromQueue(env, cb);
|
|
358
461
|
});
|
|
359
462
|
return;
|
|
@@ -365,126 +468,32 @@ function buffer(stream, capacity, strategy = "backpressure") {
|
|
|
365
468
|
};
|
|
366
469
|
function pullFromQueue(env, cb) {
|
|
367
470
|
const takeEff = q.take();
|
|
368
|
-
|
|
471
|
+
_chunkGLE2WY7Zcjs.unsafeGetCurrentRuntime.call(void 0, ).fork(takeEff).join((ex) => {
|
|
369
472
|
if (ex._tag !== "Success") return;
|
|
370
473
|
const sig = ex.value;
|
|
371
474
|
switch (sig._tag) {
|
|
372
475
|
case "Elem":
|
|
373
|
-
cb({ _tag: "Success", value: [sig.value,
|
|
476
|
+
cb({ _tag: "Success", value: [sig.value, _chunkKZJQ723Ncjs.fromPull.call(void 0, pullDown)] });
|
|
374
477
|
return;
|
|
375
478
|
case "End":
|
|
376
479
|
_optionalChain([producer, 'optionalAccess', _ => _.interrupt, 'optionalCall', _2 => _2()]);
|
|
377
|
-
cb({ _tag: "Failure", cause: { _tag: "Fail", error:
|
|
480
|
+
cb({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkMVGUEJ5Zcjs.none } });
|
|
378
481
|
return;
|
|
379
482
|
case "Fail":
|
|
380
483
|
_optionalChain([producer, 'optionalAccess', _3 => _3.interrupt, 'optionalCall', _4 => _4()]);
|
|
381
|
-
cb({ _tag: "Failure", cause: { _tag: "Fail", error:
|
|
484
|
+
cb({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkMVGUEJ5Zcjs.some.call(void 0, sig.error) } });
|
|
382
485
|
return;
|
|
383
486
|
}
|
|
384
487
|
});
|
|
385
488
|
}
|
|
386
|
-
return
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
// src/core/stream/hub.ts
|
|
390
|
-
var toQueueStrategy = (s) => s === "BackPressure" ? "backpressure" : s === "Dropping" ? "dropping" : "sliding";
|
|
391
|
-
function makeHub(capacity, strategy = "BackPressure") {
|
|
392
|
-
const queues = /* @__PURE__ */ new Set();
|
|
393
|
-
let closed = false;
|
|
394
|
-
const publish = (a) => {
|
|
395
|
-
if (closed) return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, false);
|
|
396
|
-
const size = queues.size;
|
|
397
|
-
if (size === 0) return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, true);
|
|
398
|
-
if (size === 1) {
|
|
399
|
-
const q = queues.values().next().value;
|
|
400
|
-
return q.offer(a);
|
|
401
|
-
}
|
|
402
|
-
let eff = _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, true);
|
|
403
|
-
for (const q of queues) {
|
|
404
|
-
eff = _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0,
|
|
405
|
-
eff,
|
|
406
|
-
(okSoFar) => _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, q.offer(a), (ok) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, okSoFar && ok))
|
|
407
|
-
);
|
|
408
|
-
}
|
|
409
|
-
return eff;
|
|
410
|
-
};
|
|
411
|
-
const publishAll = (as) => {
|
|
412
|
-
let eff = _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, true);
|
|
413
|
-
const it = as[Symbol.iterator]();
|
|
414
|
-
while (true) {
|
|
415
|
-
const n = it.next();
|
|
416
|
-
if (n.done) break;
|
|
417
|
-
const a = n.value;
|
|
418
|
-
eff = _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0,
|
|
419
|
-
eff,
|
|
420
|
-
(okSoFar) => _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, publish(a), (ok) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, okSoFar && ok))
|
|
421
|
-
);
|
|
422
|
-
}
|
|
423
|
-
return eff;
|
|
424
|
-
};
|
|
425
|
-
const subscribe = () => {
|
|
426
|
-
if (closed) {
|
|
427
|
-
return _chunkTGIFUAK4cjs.asyncTotal.call(void 0, () => {
|
|
428
|
-
throw { _tag: "HubClosed" };
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
return _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0,
|
|
432
|
-
bounded(capacity, toQueueStrategy(strategy)),
|
|
433
|
-
(q) => _chunkTGIFUAK4cjs.asyncSync.call(void 0, () => {
|
|
434
|
-
queues.add(q);
|
|
435
|
-
return {
|
|
436
|
-
...q,
|
|
437
|
-
unsubscribe: () => {
|
|
438
|
-
if (!queues.has(q)) return;
|
|
439
|
-
queues.delete(q);
|
|
440
|
-
q.shutdown();
|
|
441
|
-
}
|
|
442
|
-
};
|
|
443
|
-
})
|
|
444
|
-
);
|
|
445
|
-
};
|
|
446
|
-
const shutdown = () => _chunkTGIFUAK4cjs.asyncSync.call(void 0, () => {
|
|
447
|
-
if (closed) return;
|
|
448
|
-
closed = true;
|
|
449
|
-
for (const q of queues) q.shutdown();
|
|
450
|
-
queues.clear();
|
|
451
|
-
});
|
|
452
|
-
return {
|
|
453
|
-
publish,
|
|
454
|
-
publishAll,
|
|
455
|
-
subscribe,
|
|
456
|
-
shutdown
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
var broadcast = makeHub;
|
|
460
|
-
function broadcastToHub(stream, hub) {
|
|
461
|
-
return _chunkSTVLQ3XDcjs.foreachStream.call(void 0,
|
|
462
|
-
stream,
|
|
463
|
-
(a) => _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, hub.publish(a), () => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, void 0))
|
|
464
|
-
);
|
|
465
|
-
}
|
|
466
|
-
function fromHub(hub) {
|
|
467
|
-
return _chunkSTVLQ3XDcjs.managedStream.call(void 0,
|
|
468
|
-
_chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, hub.subscribe(), (sub) => {
|
|
469
|
-
const loop = _chunkSTVLQ3XDcjs.fromPull.call(void 0,
|
|
470
|
-
_chunkTGIFUAK4cjs.asyncFlatMap.call(void 0,
|
|
471
|
-
_chunkTGIFUAK4cjs.asyncMapError.call(void 0, sub.take(), (_queueClosed) => _chunkTGIFUAK4cjs.none),
|
|
472
|
-
(a) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [a, loop])
|
|
473
|
-
)
|
|
474
|
-
);
|
|
475
|
-
return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, {
|
|
476
|
-
stream: loop,
|
|
477
|
-
release: (_exit) => _chunkTGIFUAK4cjs.asyncSync.call(void 0, () => sub.unsubscribe())
|
|
478
|
-
});
|
|
479
|
-
})
|
|
480
|
-
);
|
|
489
|
+
return _chunkKZJQ723Ncjs.fromPull.call(void 0, pullDown);
|
|
481
490
|
}
|
|
482
491
|
|
|
483
492
|
// src/core/stream/chunks.ts
|
|
484
493
|
var cachedWasmChunkCtor;
|
|
485
494
|
function resolveWasmChunkBuffer() {
|
|
486
495
|
if (cachedWasmChunkCtor !== void 0) return cachedWasmChunkCtor;
|
|
487
|
-
const mod =
|
|
496
|
+
const mod = _chunkGLE2WY7Zcjs.resolveWasmModule.call(void 0, );
|
|
488
497
|
cachedWasmChunkCtor = _nullishCoalesce(_optionalChain([mod, 'optionalAccess', _5 => _5.BrassWasmChunkBuffer]), () => ( null));
|
|
489
498
|
return cachedWasmChunkCtor;
|
|
490
499
|
}
|
|
@@ -584,19 +593,19 @@ function makeStreamChunker(chunkSize, options = {}) {
|
|
|
584
593
|
}
|
|
585
594
|
function chunks(input, chunkSize, options = {}) {
|
|
586
595
|
const size = Math.max(1, chunkSize | 0);
|
|
587
|
-
const loop = (cur) =>
|
|
588
|
-
const fillChunk = (cur, chunker) =>
|
|
589
|
-
|
|
596
|
+
const loop = (cur) => _chunkKZJQ723Ncjs.fromPull.call(void 0, fillChunk(cur, makeStreamChunker(size, options)));
|
|
597
|
+
const fillChunk = (cur, chunker) => _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
598
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
590
599
|
(opt) => {
|
|
591
600
|
if (opt._tag === "None" && !chunker.isEmpty()) {
|
|
592
|
-
return
|
|
601
|
+
return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [chunker.takeChunk(), _chunkKZJQ723Ncjs.fromPull.call(void 0, _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, _chunkMVGUEJ5Zcjs.none))]);
|
|
593
602
|
}
|
|
594
|
-
return
|
|
603
|
+
return _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt);
|
|
595
604
|
},
|
|
596
605
|
([a, tail]) => {
|
|
597
606
|
chunker.push(a);
|
|
598
607
|
if (chunker.isFull()) {
|
|
599
|
-
return
|
|
608
|
+
return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [chunker.takeChunk(), loop(tail)]);
|
|
600
609
|
}
|
|
601
610
|
return fillChunk(tail, chunker);
|
|
602
611
|
}
|
|
@@ -607,15 +616,15 @@ function mapChunks(input, chunkSize, f, options = {}) {
|
|
|
607
616
|
const pullOne = (pending, rest) => {
|
|
608
617
|
if (pending.length > 0) {
|
|
609
618
|
const [head, ...tail] = pending;
|
|
610
|
-
return
|
|
619
|
+
return _chunkKZJQ723Ncjs.fromPull.call(void 0, _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [head, pullOne(tail, rest)]));
|
|
611
620
|
}
|
|
612
|
-
return
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
(opt) =>
|
|
621
|
+
return _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
622
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
623
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, rest),
|
|
624
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
616
625
|
([chunk, tail]) => {
|
|
617
626
|
const mapped = f(chunk);
|
|
618
|
-
return
|
|
627
|
+
return _chunkKZJQ723Ncjs.uncons.call(void 0, pullOne(mapped, tail));
|
|
619
628
|
}
|
|
620
629
|
)
|
|
621
630
|
);
|
|
@@ -628,16 +637,16 @@ function mapChunksEffect(chunkSize, f, options = {}) {
|
|
|
628
637
|
const pullOne = (pending, rest) => {
|
|
629
638
|
if (pending.length > 0) {
|
|
630
639
|
const [head, ...tail] = pending;
|
|
631
|
-
return
|
|
640
|
+
return _chunkKZJQ723Ncjs.fromPull.call(void 0, _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [head, pullOne(tail, rest)]));
|
|
632
641
|
}
|
|
633
|
-
return
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
(opt) =>
|
|
637
|
-
([chunk, tail]) =>
|
|
638
|
-
|
|
639
|
-
(opt) =>
|
|
640
|
-
(mapped) =>
|
|
642
|
+
return _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
643
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
644
|
+
_chunkMVGUEJ5Zcjs.asyncMapError.call(void 0, _chunkKZJQ723Ncjs.uncons.call(void 0, rest), (opt) => _chunkKZJQ723Ncjs.widenOpt.call(void 0, opt)),
|
|
645
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
646
|
+
([chunk, tail]) => _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
647
|
+
_chunkMVGUEJ5Zcjs.asyncMapError.call(void 0, f(chunk), (e) => ({ _tag: "Some", value: e })),
|
|
648
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
649
|
+
(mapped) => _chunkKZJQ723Ncjs.uncons.call(void 0, pullOne(mapped, tail))
|
|
641
650
|
)
|
|
642
651
|
)
|
|
643
652
|
);
|
|
@@ -871,20 +880,20 @@ function applyFused(stream, fused) {
|
|
|
871
880
|
return arrayToStream(outputArray);
|
|
872
881
|
}
|
|
873
882
|
const state = fused.initState();
|
|
874
|
-
const loop = (cur) =>
|
|
875
|
-
|
|
876
|
-
|
|
883
|
+
const loop = (cur) => _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
884
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
885
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
877
886
|
// End-of-stream or error: propagate
|
|
878
|
-
(opt) =>
|
|
887
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
879
888
|
([a, tail]) => {
|
|
880
889
|
const result = fused.step(a, state);
|
|
881
890
|
switch (result.tag) {
|
|
882
891
|
case "emit":
|
|
883
|
-
return
|
|
892
|
+
return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [result.value, loop(tail)]);
|
|
884
893
|
case "skip":
|
|
885
|
-
return
|
|
894
|
+
return _chunkKZJQ723Ncjs.uncons.call(void 0, loop(tail));
|
|
886
895
|
case "halt":
|
|
887
|
-
return
|
|
896
|
+
return _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, _chunkMVGUEJ5Zcjs.none);
|
|
888
897
|
}
|
|
889
898
|
}
|
|
890
899
|
)
|
|
@@ -1070,10 +1079,10 @@ function identity() {
|
|
|
1070
1079
|
}
|
|
1071
1080
|
function mapP(f) {
|
|
1072
1081
|
const pipeline = ((input) => {
|
|
1073
|
-
const onError = (opt) =>
|
|
1074
|
-
const onSuccess = ([a, tail]) =>
|
|
1075
|
-
const loop = (cur) =>
|
|
1076
|
-
|
|
1082
|
+
const onError = (opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt);
|
|
1083
|
+
const onSuccess = ([a, tail]) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [f(a), loop(tail)]);
|
|
1084
|
+
const loop = (cur) => _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1085
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0, _chunkKZJQ723Ncjs.uncons.call(void 0, cur), onError, onSuccess)
|
|
1077
1086
|
);
|
|
1078
1087
|
return loop(input);
|
|
1079
1088
|
});
|
|
@@ -1082,10 +1091,10 @@ function mapP(f) {
|
|
|
1082
1091
|
}
|
|
1083
1092
|
function filterP(pred) {
|
|
1084
1093
|
const pipeline = ((input) => {
|
|
1085
|
-
const onError = (opt) =>
|
|
1086
|
-
const onSuccess = ([a, tail]) => pred(a) ?
|
|
1087
|
-
const next = (cur) =>
|
|
1088
|
-
const loop = (cur) =>
|
|
1094
|
+
const onError = (opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt);
|
|
1095
|
+
const onSuccess = ([a, tail]) => pred(a) ? _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [a, loop(tail)]) : next(tail);
|
|
1096
|
+
const next = (cur) => _chunkMVGUEJ5Zcjs.asyncFold.call(void 0, _chunkKZJQ723Ncjs.uncons.call(void 0, cur), onError, onSuccess);
|
|
1097
|
+
const loop = (cur) => _chunkKZJQ723Ncjs.fromPull.call(void 0, next(cur));
|
|
1089
1098
|
return loop(input);
|
|
1090
1099
|
});
|
|
1091
1100
|
pipeline[PURE_PIPELINE_TAG] = { kind: "filter", pred };
|
|
@@ -1093,16 +1102,16 @@ function filterP(pred) {
|
|
|
1093
1102
|
}
|
|
1094
1103
|
function filterMapP(f) {
|
|
1095
1104
|
return ((input) => {
|
|
1096
|
-
const onError = (opt) =>
|
|
1097
|
-
const next = (cur) =>
|
|
1098
|
-
|
|
1105
|
+
const onError = (opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt);
|
|
1106
|
+
const next = (cur) => _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1107
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
1099
1108
|
onError,
|
|
1100
1109
|
([a, tail]) => {
|
|
1101
1110
|
const ob = f(a);
|
|
1102
|
-
return ob._tag === "Some" ?
|
|
1111
|
+
return ob._tag === "Some" ? _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [ob.value, loop(tail)]) : next(tail);
|
|
1103
1112
|
}
|
|
1104
1113
|
);
|
|
1105
|
-
const loop = (cur) =>
|
|
1114
|
+
const loop = (cur) => _chunkKZJQ723Ncjs.fromPull.call(void 0, next(cur));
|
|
1106
1115
|
return loop(input);
|
|
1107
1116
|
});
|
|
1108
1117
|
}
|
|
@@ -1110,12 +1119,12 @@ function takeP(n) {
|
|
|
1110
1119
|
const m = Math.max(0, n | 0);
|
|
1111
1120
|
const pipeline = ((input) => {
|
|
1112
1121
|
const loop = (cur, remaining) => {
|
|
1113
|
-
if (remaining <= 0) return
|
|
1114
|
-
return
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
(opt) =>
|
|
1118
|
-
([a, tail]) =>
|
|
1122
|
+
if (remaining <= 0) return _chunkKZJQ723Ncjs.emptyStream.call(void 0, );
|
|
1123
|
+
return _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1124
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1125
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
1126
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1127
|
+
([a, tail]) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [a, loop(tail, remaining - 1)])
|
|
1119
1128
|
)
|
|
1120
1129
|
);
|
|
1121
1130
|
};
|
|
@@ -1129,11 +1138,11 @@ function dropP(n) {
|
|
|
1129
1138
|
const pipeline = ((input) => {
|
|
1130
1139
|
const skip = (cur, remaining) => {
|
|
1131
1140
|
if (remaining <= 0) return cur;
|
|
1132
|
-
return
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
(opt) =>
|
|
1136
|
-
([_a, tail]) =>
|
|
1141
|
+
return _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1142
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1143
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
1144
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1145
|
+
([_a, tail]) => _chunkKZJQ723Ncjs.uncons.call(void 0, skip(tail, remaining - 1))
|
|
1137
1146
|
)
|
|
1138
1147
|
);
|
|
1139
1148
|
};
|
|
@@ -1144,19 +1153,19 @@ function dropP(n) {
|
|
|
1144
1153
|
}
|
|
1145
1154
|
function mapEffectP(f) {
|
|
1146
1155
|
return ((input) => {
|
|
1147
|
-
const raiseToOpt = (fa) =>
|
|
1148
|
-
const loop = (cur) =>
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
(opt) =>
|
|
1156
|
+
const raiseToOpt = (fa) => _chunkMVGUEJ5Zcjs.asyncMapError.call(void 0, fa, (e) => _chunkMVGUEJ5Zcjs.some.call(void 0, e));
|
|
1157
|
+
const loop = (cur) => _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1158
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1159
|
+
_chunkMVGUEJ5Zcjs.asyncMapError.call(void 0,
|
|
1160
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
1161
|
+
(opt) => _chunkKZJQ723Ncjs.widenOpt.call(void 0, opt)
|
|
1153
1162
|
),
|
|
1154
|
-
(opt) =>
|
|
1155
|
-
([a, tail]) =>
|
|
1163
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1164
|
+
([a, tail]) => _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1156
1165
|
raiseToOpt(f(a)),
|
|
1157
1166
|
// Async<Rp, ...>
|
|
1158
|
-
(opt2) =>
|
|
1159
|
-
(b) =>
|
|
1167
|
+
(opt2) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt2),
|
|
1168
|
+
(b) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [b, loop(tail)])
|
|
1160
1169
|
)
|
|
1161
1170
|
)
|
|
1162
1171
|
);
|
|
@@ -1164,7 +1173,7 @@ function mapEffectP(f) {
|
|
|
1164
1173
|
});
|
|
1165
1174
|
}
|
|
1166
1175
|
function tapEffectP(f) {
|
|
1167
|
-
return mapEffectP((a) =>
|
|
1176
|
+
return mapEffectP((a) => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0, f(a), () => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, a)));
|
|
1168
1177
|
}
|
|
1169
1178
|
function chunksP(chunkSize, options = {}) {
|
|
1170
1179
|
return ((input) => chunks(input, chunkSize, options));
|
|
@@ -1179,23 +1188,23 @@ function groupedP(n) {
|
|
|
1179
1188
|
const size = Math.max(1, n | 0);
|
|
1180
1189
|
return ((input) => {
|
|
1181
1190
|
const gather = (cur, remaining, acc) => {
|
|
1182
|
-
if (remaining <= 0) return
|
|
1183
|
-
return
|
|
1184
|
-
|
|
1191
|
+
if (remaining <= 0) return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, { chunk: acc, rest: cur });
|
|
1192
|
+
return _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1193
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
1185
1194
|
(opt) => {
|
|
1186
|
-
if (opt._tag === "None") return
|
|
1187
|
-
return
|
|
1195
|
+
if (opt._tag === "None") return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, { chunk: acc, rest: _chunkKZJQ723Ncjs.emptyStream.call(void 0, ) });
|
|
1196
|
+
return _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt);
|
|
1188
1197
|
},
|
|
1189
1198
|
([a, tail]) => gather(tail, remaining - 1, [...acc, a])
|
|
1190
1199
|
);
|
|
1191
1200
|
};
|
|
1192
|
-
const loop = (cur) =>
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
(opt) =>
|
|
1196
|
-
([a, tail]) =>
|
|
1201
|
+
const loop = (cur) => _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1202
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1203
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
1204
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1205
|
+
([a, tail]) => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
1197
1206
|
gather(tail, size - 1, [a]),
|
|
1198
|
-
({ chunk, rest }) =>
|
|
1207
|
+
({ chunk, rest }) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [chunk, loop(rest)])
|
|
1199
1208
|
)
|
|
1200
1209
|
)
|
|
1201
1210
|
);
|
|
@@ -1203,28 +1212,161 @@ function groupedP(n) {
|
|
|
1203
1212
|
});
|
|
1204
1213
|
}
|
|
1205
1214
|
|
|
1215
|
+
// src/core/stream/dx.ts
|
|
1216
|
+
var Stream = Object.freeze({
|
|
1217
|
+
from: (values) => asStream(_chunkKZJQ723Ncjs.fromArray.call(void 0, values)),
|
|
1218
|
+
empty: () => asStream(_chunkKZJQ723Ncjs.emptyStream.call(void 0, )),
|
|
1219
|
+
range: (start, end2) => asStream(_chunkKZJQ723Ncjs.rangeStream.call(void 0, start, end2)),
|
|
1220
|
+
wrap: asStream
|
|
1221
|
+
});
|
|
1222
|
+
var Pipeline = Object.freeze({
|
|
1223
|
+
map: mapP,
|
|
1224
|
+
filter: filterP
|
|
1225
|
+
});
|
|
1226
|
+
function asStream(stream) {
|
|
1227
|
+
const target = stream;
|
|
1228
|
+
if (typeof target.pipe === "function") return target;
|
|
1229
|
+
Object.defineProperties(target, {
|
|
1230
|
+
pipe: {
|
|
1231
|
+
value(pipeline) {
|
|
1232
|
+
return asStream(via(target, pipeline));
|
|
1233
|
+
}
|
|
1234
|
+
},
|
|
1235
|
+
map: {
|
|
1236
|
+
value(f) {
|
|
1237
|
+
return asStream(via(target, mapP(f)));
|
|
1238
|
+
}
|
|
1239
|
+
},
|
|
1240
|
+
filter: {
|
|
1241
|
+
value(predicate) {
|
|
1242
|
+
return asStream(via(target, filterP(predicate)));
|
|
1243
|
+
}
|
|
1244
|
+
},
|
|
1245
|
+
collect: {
|
|
1246
|
+
value(runtime) {
|
|
1247
|
+
return runtime.toPromise(_chunkKZJQ723Ncjs.collectStream.call(void 0, target));
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
});
|
|
1251
|
+
return target;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
// src/core/stream/hub.ts
|
|
1255
|
+
var toQueueStrategy = (s) => s === "BackPressure" ? "backpressure" : s === "Dropping" ? "dropping" : "sliding";
|
|
1256
|
+
function makeHub(capacity, strategy = "BackPressure") {
|
|
1257
|
+
const queues = /* @__PURE__ */ new Set();
|
|
1258
|
+
let closed = false;
|
|
1259
|
+
const publish = (a) => {
|
|
1260
|
+
if (closed) return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, false);
|
|
1261
|
+
const size = queues.size;
|
|
1262
|
+
if (size === 0) return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, true);
|
|
1263
|
+
if (size === 1) {
|
|
1264
|
+
const q = queues.values().next().value;
|
|
1265
|
+
return q.offer(a);
|
|
1266
|
+
}
|
|
1267
|
+
let eff = _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, true);
|
|
1268
|
+
for (const q of queues) {
|
|
1269
|
+
eff = _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
1270
|
+
eff,
|
|
1271
|
+
(okSoFar) => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0, q.offer(a), (ok) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, okSoFar && ok))
|
|
1272
|
+
);
|
|
1273
|
+
}
|
|
1274
|
+
return eff;
|
|
1275
|
+
};
|
|
1276
|
+
const publishAll = (as) => {
|
|
1277
|
+
let eff = _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, true);
|
|
1278
|
+
const it = as[Symbol.iterator]();
|
|
1279
|
+
while (true) {
|
|
1280
|
+
const n = it.next();
|
|
1281
|
+
if (n.done) break;
|
|
1282
|
+
const a = n.value;
|
|
1283
|
+
eff = _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
1284
|
+
eff,
|
|
1285
|
+
(okSoFar) => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0, publish(a), (ok) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, okSoFar && ok))
|
|
1286
|
+
);
|
|
1287
|
+
}
|
|
1288
|
+
return eff;
|
|
1289
|
+
};
|
|
1290
|
+
const subscribe = () => {
|
|
1291
|
+
if (closed) {
|
|
1292
|
+
return _chunkMVGUEJ5Zcjs.asyncTotal.call(void 0, () => {
|
|
1293
|
+
throw { _tag: "HubClosed" };
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
return _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
1297
|
+
bounded(capacity, toQueueStrategy(strategy)),
|
|
1298
|
+
(q) => _chunkMVGUEJ5Zcjs.asyncSync.call(void 0, () => {
|
|
1299
|
+
queues.add(q);
|
|
1300
|
+
return {
|
|
1301
|
+
...q,
|
|
1302
|
+
unsubscribe: () => {
|
|
1303
|
+
if (!queues.has(q)) return;
|
|
1304
|
+
queues.delete(q);
|
|
1305
|
+
q.shutdown();
|
|
1306
|
+
}
|
|
1307
|
+
};
|
|
1308
|
+
})
|
|
1309
|
+
);
|
|
1310
|
+
};
|
|
1311
|
+
const shutdown = () => _chunkMVGUEJ5Zcjs.asyncSync.call(void 0, () => {
|
|
1312
|
+
if (closed) return;
|
|
1313
|
+
closed = true;
|
|
1314
|
+
for (const q of queues) q.shutdown();
|
|
1315
|
+
queues.clear();
|
|
1316
|
+
});
|
|
1317
|
+
return {
|
|
1318
|
+
publish,
|
|
1319
|
+
publishAll,
|
|
1320
|
+
subscribe,
|
|
1321
|
+
shutdown
|
|
1322
|
+
};
|
|
1323
|
+
}
|
|
1324
|
+
var broadcast = makeHub;
|
|
1325
|
+
function broadcastToHub(stream, hub) {
|
|
1326
|
+
return _chunkKZJQ723Ncjs.foreachStream.call(void 0,
|
|
1327
|
+
stream,
|
|
1328
|
+
(a) => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0, hub.publish(a), () => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, void 0))
|
|
1329
|
+
);
|
|
1330
|
+
}
|
|
1331
|
+
function fromHub(hub) {
|
|
1332
|
+
return _chunkKZJQ723Ncjs.managedStream.call(void 0,
|
|
1333
|
+
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0, hub.subscribe(), (sub) => {
|
|
1334
|
+
const loop = _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1335
|
+
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
1336
|
+
_chunkMVGUEJ5Zcjs.asyncMapError.call(void 0, sub.take(), (_queueClosed) => _chunkMVGUEJ5Zcjs.none),
|
|
1337
|
+
(a) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [a, loop])
|
|
1338
|
+
)
|
|
1339
|
+
);
|
|
1340
|
+
return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, {
|
|
1341
|
+
stream: loop,
|
|
1342
|
+
release: (_exit) => _chunkMVGUEJ5Zcjs.asyncSync.call(void 0, () => sub.unsubscribe())
|
|
1343
|
+
});
|
|
1344
|
+
})
|
|
1345
|
+
);
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1206
1348
|
// src/core/stream/operators.ts
|
|
1207
1349
|
function throttle(stream, intervalMs) {
|
|
1208
1350
|
let lastEmitTime = 0;
|
|
1209
|
-
const loop = (cur) =>
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
(opt) =>
|
|
1351
|
+
const loop = (cur) => _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1352
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1353
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
1354
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1213
1355
|
([a, tail]) => {
|
|
1214
1356
|
const now = Date.now();
|
|
1215
1357
|
if (now - lastEmitTime >= intervalMs) {
|
|
1216
1358
|
lastEmitTime = now;
|
|
1217
|
-
return
|
|
1359
|
+
return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [a, loop(tail)]);
|
|
1218
1360
|
}
|
|
1219
|
-
return
|
|
1361
|
+
return _chunkKZJQ723Ncjs.uncons.call(void 0, loop(tail));
|
|
1220
1362
|
}
|
|
1221
1363
|
)
|
|
1222
1364
|
);
|
|
1223
1365
|
return loop(stream);
|
|
1224
1366
|
}
|
|
1225
1367
|
function debounce(stream, delayMs) {
|
|
1226
|
-
return
|
|
1227
|
-
|
|
1368
|
+
return _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1369
|
+
_chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (_env, cb) => {
|
|
1228
1370
|
let lastValue;
|
|
1229
1371
|
let hasValue = false;
|
|
1230
1372
|
let timerId;
|
|
@@ -1232,15 +1374,15 @@ function debounce(stream, delayMs) {
|
|
|
1232
1374
|
let tail = stream;
|
|
1233
1375
|
const pullNext = () => {
|
|
1234
1376
|
if (done) return;
|
|
1235
|
-
const pull =
|
|
1236
|
-
|
|
1377
|
+
const pull = _chunkKZJQ723Ncjs.uncons.call(void 0, tail);
|
|
1378
|
+
_chunkGLE2WY7Zcjs.unsafeRunAsync.call(void 0, pull, _env, (exit) => {
|
|
1237
1379
|
if (done) return;
|
|
1238
1380
|
if (exit._tag === "Failure") {
|
|
1239
1381
|
if (hasValue) {
|
|
1240
1382
|
const value = lastValue;
|
|
1241
1383
|
hasValue = false;
|
|
1242
1384
|
clearTimeout(timerId);
|
|
1243
|
-
cb({ _tag: "Success", value: [value,
|
|
1385
|
+
cb({ _tag: "Success", value: [value, _chunkKZJQ723Ncjs.emptyStream.call(void 0, )] });
|
|
1244
1386
|
} else {
|
|
1245
1387
|
cb(exit);
|
|
1246
1388
|
}
|
|
@@ -1270,73 +1412,73 @@ function debounce(stream, delayMs) {
|
|
|
1270
1412
|
);
|
|
1271
1413
|
}
|
|
1272
1414
|
function zip2(left, right) {
|
|
1273
|
-
const loop = (l, r) =>
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
(opt) =>
|
|
1277
|
-
([a, lTail]) =>
|
|
1278
|
-
|
|
1279
|
-
(opt) =>
|
|
1280
|
-
([b, rTail]) =>
|
|
1415
|
+
const loop = (l, r) => _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1416
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1417
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, l),
|
|
1418
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1419
|
+
([a, lTail]) => _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1420
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, r),
|
|
1421
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1422
|
+
([b, rTail]) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [[a, b], loop(lTail, rTail)])
|
|
1281
1423
|
)
|
|
1282
1424
|
)
|
|
1283
1425
|
);
|
|
1284
1426
|
return loop(left, right);
|
|
1285
1427
|
}
|
|
1286
1428
|
function zipWith(left, right, f) {
|
|
1287
|
-
const loop = (l, r) =>
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
(opt) =>
|
|
1291
|
-
([a, lTail]) =>
|
|
1292
|
-
|
|
1293
|
-
(opt) =>
|
|
1294
|
-
([b, rTail]) =>
|
|
1429
|
+
const loop = (l, r) => _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1430
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1431
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, l),
|
|
1432
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1433
|
+
([a, lTail]) => _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1434
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, r),
|
|
1435
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1436
|
+
([b, rTail]) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [f(a, b), loop(lTail, rTail)])
|
|
1295
1437
|
)
|
|
1296
1438
|
)
|
|
1297
1439
|
);
|
|
1298
1440
|
return loop(left, right);
|
|
1299
1441
|
}
|
|
1300
1442
|
function scan(stream, initial, f) {
|
|
1301
|
-
const loop = (cur, acc) =>
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
(opt) =>
|
|
1443
|
+
const loop = (cur, acc) => _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1444
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1445
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
1446
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1305
1447
|
([a, tail]) => {
|
|
1306
1448
|
const next = f(acc, a);
|
|
1307
|
-
return
|
|
1449
|
+
return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [next, loop(tail, next)]);
|
|
1308
1450
|
}
|
|
1309
1451
|
)
|
|
1310
1452
|
);
|
|
1311
|
-
return
|
|
1312
|
-
|
|
1453
|
+
return _chunkKZJQ723Ncjs.concatStream.call(void 0,
|
|
1454
|
+
_chunkKZJQ723Ncjs.emitStream.call(void 0, _chunkMVGUEJ5Zcjs.succeed.call(void 0, initial)),
|
|
1313
1455
|
loop(stream, initial)
|
|
1314
1456
|
);
|
|
1315
1457
|
}
|
|
1316
1458
|
function interleave(left, right) {
|
|
1317
|
-
const loop = (l, r, pickLeft) =>
|
|
1318
|
-
|
|
1319
|
-
|
|
1459
|
+
const loop = (l, r, pickLeft) => _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1460
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1461
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, pickLeft ? l : r),
|
|
1320
1462
|
// Current stream ended — drain the other
|
|
1321
|
-
(_opt) =>
|
|
1463
|
+
(_opt) => _chunkKZJQ723Ncjs.uncons.call(void 0, pickLeft ? r : l),
|
|
1322
1464
|
([a, tail]) => {
|
|
1323
1465
|
const nextL = pickLeft ? tail : l;
|
|
1324
1466
|
const nextR = pickLeft ? r : tail;
|
|
1325
|
-
return
|
|
1467
|
+
return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [a, loop(nextL, nextR, !pickLeft)]);
|
|
1326
1468
|
}
|
|
1327
1469
|
)
|
|
1328
1470
|
);
|
|
1329
1471
|
return loop(left, right, true);
|
|
1330
1472
|
}
|
|
1331
1473
|
function take2(stream, n) {
|
|
1332
|
-
if (n <= 0) return
|
|
1474
|
+
if (n <= 0) return _chunkKZJQ723Ncjs.emptyStream.call(void 0, );
|
|
1333
1475
|
const loop = (cur, remaining) => {
|
|
1334
|
-
if (remaining <= 0) return
|
|
1335
|
-
return
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
(opt) =>
|
|
1339
|
-
([a, tail]) =>
|
|
1476
|
+
if (remaining <= 0) return _chunkKZJQ723Ncjs.emptyStream.call(void 0, );
|
|
1477
|
+
return _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1478
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1479
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
1480
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1481
|
+
([a, tail]) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [a, loop(tail, remaining - 1)])
|
|
1340
1482
|
)
|
|
1341
1483
|
);
|
|
1342
1484
|
};
|
|
@@ -1346,11 +1488,11 @@ function drop(stream, n) {
|
|
|
1346
1488
|
if (n <= 0) return stream;
|
|
1347
1489
|
const skip = (cur, remaining) => {
|
|
1348
1490
|
if (remaining <= 0) return cur;
|
|
1349
|
-
return
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
(opt) =>
|
|
1353
|
-
([_a, tail]) =>
|
|
1491
|
+
return _chunkKZJQ723Ncjs.fromPull.call(void 0,
|
|
1492
|
+
_chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
1493
|
+
_chunkKZJQ723Ncjs.uncons.call(void 0, cur),
|
|
1494
|
+
(opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
|
|
1495
|
+
([_a, tail]) => _chunkKZJQ723Ncjs.uncons.call(void 0, skip(tail, remaining - 1))
|
|
1354
1496
|
)
|
|
1355
1497
|
);
|
|
1356
1498
|
};
|
|
@@ -1569,4 +1711,98 @@ function selectedEngineStats(requested, engine, data) {
|
|
|
1569
1711
|
|
|
1570
1712
|
|
|
1571
1713
|
|
|
1572
|
-
|
|
1714
|
+
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
|
|
1724
|
+
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
|
|
1733
|
+
|
|
1734
|
+
|
|
1735
|
+
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
|
|
1745
|
+
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
|
|
1764
|
+
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
|
|
1771
|
+
|
|
1772
|
+
|
|
1773
|
+
|
|
1774
|
+
|
|
1775
|
+
|
|
1776
|
+
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
|
|
1780
|
+
|
|
1781
|
+
|
|
1782
|
+
|
|
1783
|
+
|
|
1784
|
+
|
|
1785
|
+
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
|
|
1792
|
+
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
|
|
1796
|
+
|
|
1797
|
+
|
|
1798
|
+
|
|
1799
|
+
|
|
1800
|
+
|
|
1801
|
+
|
|
1802
|
+
|
|
1803
|
+
|
|
1804
|
+
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
exports.ABI_VERSION = _chunkGLE2WY7Zcjs.ABI_VERSION; exports.Async = _chunkMVGUEJ5Zcjs.Async; exports.Cause = _chunkMVGUEJ5Zcjs.Cause; exports.DefaultHostExecutor = _chunkGLE2WY7Zcjs.DefaultHostExecutor; exports.EVENT_WORDS = _chunkGLE2WY7Zcjs.EVENT_WORDS; exports.EngineFiberHandle = _chunkGLE2WY7Zcjs.EngineFiberHandle; exports.EventBus = _chunk52PPNNI4cjs.EventBus; exports.EventKindCode = _chunkGLE2WY7Zcjs.EventKindCode; exports.Exit = _chunkMVGUEJ5Zcjs.Exit; exports.HostRegistry = _chunkGLE2WY7Zcjs.HostRegistry; exports.InMemoryTracer = _chunk52PPNNI4cjs.InMemoryTracer; exports.JsFiberEngine = _chunkGLE2WY7Zcjs.JsFiberEngine; exports.Layer = _chunkQ2I37RP3cjs.Layer; exports.LayerContext = _chunkQ2I37RP3cjs.LayerContext; exports.MissingLayerServiceError = _chunkQ2I37RP3cjs.MissingLayerServiceError; exports.NONE_U32 = _chunkGLE2WY7Zcjs.NONE_U32; exports.NoopHooks = _chunkGLE2WY7Zcjs.NoopHooks; exports.OpcodeTagCode = _chunkGLE2WY7Zcjs.OpcodeTagCode; exports.PURE_PIPELINE_TAG = PURE_PIPELINE_TAG; exports.Pipeline = Pipeline; exports.ProgramBuilder = _chunkGLE2WY7Zcjs.ProgramBuilder; exports.PushStatus = _chunkGLE2WY7Zcjs.PushStatus; exports.Resource = _chunk62AZW6UTcjs.Resource; exports.RingBuffer = _chunkGLE2WY7Zcjs.RingBuffer; exports.Runtime = _chunkGLE2WY7Zcjs.Runtime; exports.RuntimeFiber = _chunkGLE2WY7Zcjs.RuntimeFiber; exports.RuntimeRegistry = _chunkQ2I37RP3cjs.RuntimeRegistry; exports.Schedule = _chunkAGR5B2BCcjs.Schedule; exports.Scheduler = _chunkGLE2WY7Zcjs.Scheduler; exports.Scope = _chunkJF5WGYJJcjs.Scope; exports.Stream = Stream; exports.Supervisor = _chunkQ2I37RP3cjs.Supervisor; exports.TestClock = _chunkQ2I37RP3cjs.TestClock; exports.TestScheduler = _chunkQ2I37RP3cjs.TestScheduler; exports.WasmFiberEngine = _chunkGLE2WY7Zcjs.WasmFiberEngine; exports.WasmFiberRegistryBridge = _chunkGLE2WY7Zcjs.WasmFiberRegistryBridge; exports.WasmPackFiberBridge = _chunkGLE2WY7Zcjs.WasmPackFiberBridge; exports.abortablePromiseStats = _chunkGLE2WY7Zcjs.abortablePromiseStats; exports.acquireRelease = _chunkMVGUEJ5Zcjs.acquireRelease; exports.andThen = andThen2; exports.andThenSchedule = _chunkAGR5B2BCcjs.andThen; exports.applyFused = applyFused; exports.asStream = asStream; exports.assertCompletesWithin = _chunkQ2I37RP3cjs.assertCompletesWithin; exports.assertFails = _chunkQ2I37RP3cjs.assertFails; exports.assertFailsWith = _chunkQ2I37RP3cjs.assertFailsWith; exports.assertNever = _chunkKZJQ723Ncjs.assertNever; exports.assertSucceeds = _chunkQ2I37RP3cjs.assertSucceeds; exports.async = _chunkMVGUEJ5Zcjs.asyncEffect; exports.asyncCatchAll = _chunkMVGUEJ5Zcjs.asyncCatchAll; exports.asyncFail = _chunkMVGUEJ5Zcjs.asyncFail; exports.asyncFlatMap = _chunkMVGUEJ5Zcjs.asyncFlatMap; exports.asyncFold = _chunkMVGUEJ5Zcjs.asyncFold; exports.asyncInterruptible = _chunkMVGUEJ5Zcjs.asyncInterruptible; exports.asyncMap = _chunkMVGUEJ5Zcjs.asyncMap; exports.asyncMapError = _chunkMVGUEJ5Zcjs.asyncMapError; exports.asyncSucceed = _chunkMVGUEJ5Zcjs.asyncSucceed; exports.asyncSync = _chunkMVGUEJ5Zcjs.asyncSync; exports.asyncTotal = _chunkMVGUEJ5Zcjs.asyncTotal; exports.bounded = bounded; exports.bracket = _chunk62AZW6UTcjs.bracket; exports.broadcast = broadcast; exports.broadcastToHub = broadcastToHub; exports.buffer = buffer; exports.bufferP = bufferP; exports.buildLayer = _chunkQ2I37RP3cjs.buildLayer; exports.catchAll = _chunkMVGUEJ5Zcjs.catchAll; exports.catchTag = _chunkQ2I37RP3cjs.catchTag; exports.catchTags = _chunkQ2I37RP3cjs.catchTags; exports.chunks = chunks; exports.chunksP = chunksP; exports.collectAllPar = _chunkSA6HUJVIcjs.collectAllPar; exports.collectStream = _chunkKZJQ723Ncjs.collectStream; exports.compose = compose2; exports.composeLayer = _chunkQ2I37RP3cjs.compose; exports.concatStream = _chunkKZJQ723Ncjs.concatStream; exports.consoleJsonLogger = _chunkQ2I37RP3cjs.consoleJsonLogger; exports.contramapSchedule = _chunkAGR5B2BCcjs.contramap; exports.ctxExtend = _chunkGLE2WY7Zcjs.ctxExtend; exports.ctxToObject = _chunkGLE2WY7Zcjs.ctxToObject; exports.debounce = debounce; exports.decodeEvent = _chunkGLE2WY7Zcjs.decodeEvent; exports.decodeEventBatch = _chunkGLE2WY7Zcjs.decodeEventBatch; exports.defaultTracer = _chunkQ2I37RP3cjs.defaultTracer; exports.defineLayer = _chunkQ2I37RP3cjs.defineLayer; exports.defineService = _chunkQ2I37RP3cjs.defineService; exports.delayedEffect = _chunkQ2I37RP3cjs.delayedEffect; exports.derivedRef = _chunkQ2I37RP3cjs.derivedRef; exports.deserializeFusedPipeline = deserializeFusedPipeline; exports.dropP = dropP; exports.dropStream = drop; exports.dumpAllFibers = _chunkQ2I37RP3cjs.dumpAllFibers; exports.elapsed = _chunkAGR5B2BCcjs.elapsed; exports.emitStream = _chunkKZJQ723Ncjs.emitStream; exports.emptyContext = _chunkGLE2WY7Zcjs.emptyContext; exports.emptyStream = _chunkKZJQ723Ncjs.emptyStream; exports.encodeOpcodeNodes = _chunkGLE2WY7Zcjs.encodeOpcodeNodes; exports.encodeOpcodeProgram = _chunkGLE2WY7Zcjs.encodeOpcodeProgram; exports.end = _chunkMVGUEJ5Zcjs.end; exports.engineStats = engineStats; exports.ensuring = _chunk62AZW6UTcjs.ensuring; exports.exponential = _chunkAGR5B2BCcjs.exponential; exports.fail = _chunkMVGUEJ5Zcjs.fail; exports.fiberRefSnapshot = _chunkPD4EJTQCcjs.fiberRefSnapshot; exports.fibonacci = _chunkAGR5B2BCcjs.fibonacci; exports.filterMapP = filterMapP; exports.filterP = filterP; exports.fixed = _chunkAGR5B2BCcjs.fixed; exports.flakyEffect = _chunkQ2I37RP3cjs.flakyEffect; exports.flatMap = _chunkMVGUEJ5Zcjs.flatMap; exports.flattenStream = _chunkKZJQ723Ncjs.flattenStream; exports.foreachStream = _chunkKZJQ723Ncjs.foreachStream; exports.forever = _chunkAGR5B2BCcjs.forever; exports.fork = _chunkGLE2WY7Zcjs.fork; exports.formatCause = _chunkMVGUEJ5Zcjs.formatCause; exports.formatLayerError = _chunkQ2I37RP3cjs.formatLayerError; exports.fromArray = _chunkKZJQ723Ncjs.fromArray; exports.fromHub = fromHub; exports.fromPromiseAbortable = _chunkGLE2WY7Zcjs.fromPromiseAbortable; exports.fromPull = _chunkKZJQ723Ncjs.fromPull; exports.fuse = fuse; exports.getBenchmarkBudget = _chunkGLE2WY7Zcjs.getBenchmarkBudget; exports.getCurrentFiber = _chunkGLE2WY7Zcjs.getCurrentFiber; exports.getFiberRef = _chunkPD4EJTQCcjs.getFiberRef; exports.getService = _chunkQ2I37RP3cjs.getService; exports.getStats = getStats; exports.globalScheduler = _chunkGLE2WY7Zcjs.globalScheduler; exports.gracefulShutdown = _chunkQ2I37RP3cjs.gracefulShutdown; exports.groupedP = groupedP; exports.identity = identity; exports.inferCallerLaneFromStack = _chunkGLE2WY7Zcjs.inferCallerLaneFromStack; exports.initState = initState; exports.interleave = interleave; exports.interruptible = _chunkMVGUEJ5Zcjs.interruptible; exports.intersect = _chunkAGR5B2BCcjs.intersect; exports.isCause = _chunkMVGUEJ5Zcjs.isCause; exports.isFusionEnabled = isFusionEnabled; exports.isFusionVerbose = isFusionVerbose; exports.jitter = _chunkAGR5B2BCcjs.jitter; exports.jittered = _chunkAGR5B2BCcjs.jittered; exports.jitteredSchedule = _chunkAGR5B2BCcjs.jitteredSchedule; exports.joinSupervised = _chunkQ2I37RP3cjs.joinSupervised; exports.laneTag = _chunkGLE2WY7Zcjs.laneTag; exports.layer = _chunkQ2I37RP3cjs.layer; exports.layerEffect = _chunkQ2I37RP3cjs.layerEffect; exports.layerFail = _chunkQ2I37RP3cjs.layerFail; exports.layerFrom = _chunkQ2I37RP3cjs.layerFrom; exports.layerFromContext = _chunkQ2I37RP3cjs.layerFromContext; exports.layerSucceed = _chunkQ2I37RP3cjs.layerSucceed; exports.layerValue = _chunkQ2I37RP3cjs.layerValue; exports.linear = _chunkAGR5B2BCcjs.linear; exports.linkAbortController = _chunkQ2I37RP3cjs.linkAbortController; exports.liveClock = _chunkGLE2WY7Zcjs.liveClock; exports.locallyFiberRef = _chunkPD4EJTQCcjs.locallyFiberRef; exports.locallyFiberRefWith = _chunkPD4EJTQCcjs.locallyFiberRefWith; exports.makeBoundedRingBuffer = _chunkGLE2WY7Zcjs.makeBoundedRingBuffer; exports.makeCancelToken = _chunkQ2I37RP3cjs.makeCancelToken; exports.makeCircuitBreaker = _chunk62AZW6UTcjs.makeCircuitBreaker; exports.makeFiberReadyQueue = _chunkGLE2WY7Zcjs.makeFiberReadyQueue; exports.makeFiberRef = _chunkPD4EJTQCcjs.makeFiberRef; exports.makeHub = makeHub; exports.makeLayerScope = _chunkQ2I37RP3cjs.makeLayerScope; exports.makeMetrics = _chunk52PPNNI4cjs.makeMetrics; exports.makeRef = _chunkQ2I37RP3cjs.makeRef; exports.makeResource = _chunk62AZW6UTcjs.makeResource; exports.makeRuntime = _chunkQ2I37RP3cjs.makeRuntime; exports.makeRuntimeEventRecord = _chunk52PPNNI4cjs.makeRuntimeEventRecord; exports.makeRuntimeRecorder = _chunkPD4EJTQCcjs.makeRuntimeRecorder; exports.makeScheduleDriver = _chunkAGR5B2BCcjs.makeScheduleDriver; exports.makeSemaphore = _chunkQ2I37RP3cjs.makeSemaphore; exports.makeServiceTag = _chunkQ2I37RP3cjs.makeServiceTag; exports.makeStreamChunker = makeStreamChunker; exports.makeSupervisor = _chunkQ2I37RP3cjs.makeSupervisor; exports.makeTestRuntime = _chunkQ2I37RP3cjs.makeTestRuntime; exports.makeTracer = _chunkQ2I37RP3cjs.makeTracer; exports.makeWorkerPool = _chunkQ2I37RP3cjs.makeWorkerPool; exports.managed = _chunk62AZW6UTcjs.managed; exports.managedAll = _chunk62AZW6UTcjs.managedAll; exports.managedStream = _chunkKZJQ723Ncjs.managedStream; exports.map = _chunkMVGUEJ5Zcjs.map; exports.mapAsync = _chunkMVGUEJ5Zcjs.mapAsync; exports.mapChunks = mapChunks; exports.mapChunksEffect = mapChunksEffect; exports.mapChunksEffectP = mapChunksEffectP; exports.mapEffectP = mapEffectP; exports.mapError = _chunkMVGUEJ5Zcjs.mapError; exports.mapErrorTyped = _chunkQ2I37RP3cjs.mapError; exports.mapLayer = _chunkQ2I37RP3cjs.mapLayer; exports.mapP = mapP; exports.mapSchedule = _chunkAGR5B2BCcjs.map; exports.mapStream = _chunkKZJQ723Ncjs.mapStream; exports.mapTryAsync = _chunkMVGUEJ5Zcjs.mapTryAsync; exports.maxDelay = _chunkAGR5B2BCcjs.maxDelay; exports.maxElapsed = _chunkAGR5B2BCcjs.maxElapsed; exports.merge = _chunkKZJQ723Ncjs.merge; exports.mergeLayer = _chunkQ2I37RP3cjs.merge; exports.mergeStream = _chunkKZJQ723Ncjs.mergeStream; exports.modifyFiberRef = _chunkPD4EJTQCcjs.modifyFiberRef; exports.namedSchedule = _chunkAGR5B2BCcjs.named; exports.never = _chunkAGR5B2BCcjs.never; exports.neverEffect = _chunkQ2I37RP3cjs.neverEffect; exports.none = _chunkMVGUEJ5Zcjs.none; exports.once = _chunkAGR5B2BCcjs.once; exports.orElse = _chunkQ2I37RP3cjs.orElse; exports.orElseOptional = _chunkMVGUEJ5Zcjs.orElseOptional; exports.pollWithSchedule = _chunkAGR5B2BCcjs.poll; exports.prettyCause = _chunkMVGUEJ5Zcjs.prettyCause; exports.provide = _chunkQ2I37RP3cjs.provide; exports.provideContext = _chunkQ2I37RP3cjs.provideContext; exports.provideLayer = _chunkQ2I37RP3cjs.provideLayer; exports.provideLayerContext = _chunkQ2I37RP3cjs.provideLayerContext; exports.race = _chunkSA6HUJVIcjs.race; exports.raceWith = _chunkSA6HUJVIcjs.raceWith; exports.rangeStream = _chunkKZJQ723Ncjs.rangeStream; exports.recurs = _chunkAGR5B2BCcjs.recurs; exports.registerShutdownHooks = _chunkQ2I37RP3cjs.registerShutdownHooks; exports.repeatWithSchedule = _chunkAGR5B2BCcjs.repeatWithSchedule; exports.repeatWithScheduleAlias = _chunkAGR5B2BCcjs.repeat; exports.resetAbortablePromiseStats = _chunkGLE2WY7Zcjs.resetAbortablePromiseStats; exports.resource = _chunk62AZW6UTcjs.resource; exports.resourceAll = _chunk62AZW6UTcjs.resourceAll; exports.resourceFromManaged = _chunk62AZW6UTcjs.resourceFromManaged; exports.resourceSucceed = _chunk62AZW6UTcjs.resourceSucceed; exports.retry = _chunkAGR5B2BCcjs.retry; exports.retryN = _chunkAGR5B2BCcjs.retryN; exports.retryWithBackoff = _chunkAGR5B2BCcjs.retryWithBackoff; exports.retryWithSchedule = _chunkAGR5B2BCcjs.retryWithSchedule; exports.retryWithScheduleAlias = _chunkAGR5B2BCcjs.retry2; exports.runEffect = _chunkQ2I37RP3cjs.runEffect; exports.runExit = _chunkQ2I37RP3cjs.runExit; exports.runFusedArray = runFusedArray; exports.runPromise = _chunkQ2I37RP3cjs.runPromise; exports.runSchedule = _chunkAGR5B2BCcjs.runSchedule; exports.runtimeCapabilities = _chunkGLE2WY7Zcjs.runtimeCapabilities; exports.runtimeClockFromEnv = _chunkGLE2WY7Zcjs.runtimeClockFromEnv; exports.runtimeEventRecordContext = _chunk52PPNNI4cjs.runtimeEventRecordContext; exports.runtimeForCaller = _chunkGLE2WY7Zcjs.runtimeForCaller; exports.runtimeHooksToEventHandler = _chunk52PPNNI4cjs.runtimeHooksToEventHandler; exports.sanitizeLaneKey = _chunkGLE2WY7Zcjs.sanitizeLaneKey; exports.scan = scan; exports.scheduleDriver = _chunkAGR5B2BCcjs.scheduleDriver; exports.selectedEngineStats = selectedEngineStats; exports.serializeFusedPipeline = serializeFusedPipeline; exports.serviceTag = _chunkQ2I37RP3cjs.serviceTag; exports.setBenchmarkBudget = _chunkGLE2WY7Zcjs.setBenchmarkBudget; exports.setFiberRef = _chunkPD4EJTQCcjs.setFiberRef; exports.setFusionEnabled = setFusionEnabled; exports.setFusionVerbose = setFusionVerbose; exports.sleep = _chunkAGR5B2BCcjs.sleep; exports.some = _chunkMVGUEJ5Zcjs.some; exports.spaced = _chunkAGR5B2BCcjs.spaced; exports.streamFromReadableStream = _chunkKZJQ723Ncjs.streamFromReadableStream; exports.succeed = _chunkMVGUEJ5Zcjs.succeed; exports.supervise = _chunkQ2I37RP3cjs.supervise; exports.sync = _chunkMVGUEJ5Zcjs.sync; exports.tagError = _chunkQ2I37RP3cjs.tagError; exports.takeP = takeP; exports.takeSchedule = _chunkAGR5B2BCcjs.take; exports.takeStream = take2; exports.tapDecision = _chunkAGR5B2BCcjs.tapDecision; exports.tapEffectP = tapEffectP; exports.throttle = throttle; exports.timeout = _chunkAGR5B2BCcjs.timeout; exports.toPromise = _chunkGLE2WY7Zcjs.toPromise; exports.toPromiseByCaller = _chunkGLE2WY7Zcjs.toPromiseByCaller; exports.uncons = _chunkKZJQ723Ncjs.uncons; exports.uninterruptible = _chunkMVGUEJ5Zcjs.uninterruptible; exports.uninterruptibleMask = _chunkMVGUEJ5Zcjs.uninterruptibleMask; exports.union = _chunkAGR5B2BCcjs.union; exports.unit = _chunkMVGUEJ5Zcjs.unit; exports.unsafeGetCurrentRuntime = _chunkGLE2WY7Zcjs.unsafeGetCurrentRuntime; exports.unsafeGetFiberRef = _chunkPD4EJTQCcjs.unsafeGetFiberRef; exports.unsafeRunAsync = _chunkGLE2WY7Zcjs.unsafeRunAsync; exports.unsafeRunFoldWithEnv = _chunkGLE2WY7Zcjs.unsafeRunFoldWithEnv; exports.unsafeSetFiberRef = _chunkPD4EJTQCcjs.unsafeSetFiberRef; exports.untilInput = _chunkAGR5B2BCcjs.untilInput; exports.untilOutput = _chunkAGR5B2BCcjs.untilOutput; exports.unwrapScoped = _chunkKZJQ723Ncjs.unwrapScoped; exports.upTo = _chunkAGR5B2BCcjs.upTo; exports.updateFiberRef = _chunkPD4EJTQCcjs.updateFiberRef; exports.useManaged = _chunk62AZW6UTcjs.useManaged; exports.useResource = _chunk62AZW6UTcjs.useResource; exports.via = via; exports.whileInput = _chunkAGR5B2BCcjs.whileInput; exports.whileOutput = _chunkAGR5B2BCcjs.whileOutput; exports.widenOpt = _chunkKZJQ723Ncjs.widenOpt; exports.windowed = _chunkAGR5B2BCcjs.windowed; exports.withAsyncPromise = _chunkMVGUEJ5Zcjs.withAsyncPromise; exports.withCurrentFiber = _chunkGLE2WY7Zcjs.withCurrentFiber; exports.withScope = _chunkJF5WGYJJcjs.withScope; exports.withScopeAsync = _chunkJF5WGYJJcjs.withScopeAsync; exports.zip = _chunkKZJQ723Ncjs.zip; exports.zipPar = _chunkSA6HUJVIcjs.zipPar; exports.zipStream = zip2; exports.zipWith = zipWith;
|