reactor-core-ts 3.2.1 → 3.2.2
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/LICENSE.md +56 -0
- package/dist/core/demand.js +2 -2
- package/dist/core/demand.js.map +1 -1
- package/dist/publisher/flux.d.ts.map +1 -1
- package/dist/publisher/flux.js +92 -22
- package/dist/publisher/flux.js.map +1 -1
- package/dist/publisher/operators/lifecycle.d.ts.map +1 -1
- package/dist/publisher/operators/lifecycle.js +29 -3
- package/dist/publisher/operators/lifecycle.js.map +1 -1
- package/dist/publisher/operators/lift.d.ts +42 -0
- package/dist/publisher/operators/lift.d.ts.map +1 -0
- package/dist/publisher/operators/lift.js +343 -0
- package/dist/publisher/operators/lift.js.map +1 -0
- package/dist/publisher/operators/side-effect.d.ts.map +1 -1
- package/dist/publisher/operators/side-effect.js +34 -9
- package/dist/publisher/operators/side-effect.js.map +1 -1
- package/dist/publisher/operators/transform.d.ts.map +1 -1
- package/dist/publisher/operators/transform.js +3 -2
- package/dist/publisher/operators/transform.js.map +1 -1
- package/dist/subscription/iterable-subscription.js +1 -1
- package/package.json +2 -1
package/LICENSE.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
5
|
+
|
|
6
|
+
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
|
|
9
|
+
|
|
10
|
+
0. Additional Definitions.
|
|
11
|
+
As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License.
|
|
12
|
+
|
|
13
|
+
“The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
|
|
14
|
+
|
|
15
|
+
An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
|
|
16
|
+
|
|
17
|
+
A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”.
|
|
18
|
+
|
|
19
|
+
The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
|
|
20
|
+
|
|
21
|
+
The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
|
|
22
|
+
|
|
23
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
24
|
+
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
|
|
25
|
+
|
|
26
|
+
2. Conveying Modified Versions.
|
|
27
|
+
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
|
|
28
|
+
|
|
29
|
+
a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
|
|
30
|
+
b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
|
|
31
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
32
|
+
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
|
|
33
|
+
|
|
34
|
+
a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
|
|
35
|
+
b) Accompany the object code with a copy of the GNU GPL and this license document.
|
|
36
|
+
4. Combined Works.
|
|
37
|
+
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
|
|
38
|
+
|
|
39
|
+
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
|
|
40
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
|
|
41
|
+
c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
|
|
42
|
+
d) Do one of the following:
|
|
43
|
+
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
|
|
44
|
+
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
|
|
45
|
+
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
|
|
46
|
+
5. Combined Libraries.
|
|
47
|
+
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
|
|
48
|
+
|
|
49
|
+
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
|
|
50
|
+
b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
|
|
51
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
52
|
+
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
|
53
|
+
|
|
54
|
+
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
|
|
55
|
+
|
|
56
|
+
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
|
package/dist/core/demand.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/** Validates and normalizes a Reactive Streams request amount. */
|
|
7
7
|
function normalizeRequest(n) {
|
|
8
|
-
if (
|
|
9
|
-
if (!Number.isInteger(n) || n <= 0) throw new RangeError("request amount must be a strictly positive integer");
|
|
8
|
+
if (n === Number.POSITIVE_INFINITY) return Number.POSITIVE_INFINITY;
|
|
9
|
+
if (!Number.isFinite(n) || !Number.isInteger(n) || n <= 0) throw new RangeError("request amount must be a strictly positive integer");
|
|
10
10
|
return n;
|
|
11
11
|
}
|
|
12
12
|
/** Adds demand values with saturation at positive infinity. */
|
package/dist/core/demand.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demand.js","names":[],"sources":["../../src/core/demand.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * Reactive Streams core contracts and disposable helpers.\n */\n/** Validates and normalizes a Reactive Streams request amount. */\nexport function normalizeRequest(n: number): number {\n if (
|
|
1
|
+
{"version":3,"file":"demand.js","names":[],"sources":["../../src/core/demand.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * Reactive Streams core contracts and disposable helpers.\n */\n/** Validates and normalizes a Reactive Streams request amount. */\nexport function normalizeRequest(n: number): number {\n if (n === Number.POSITIVE_INFINITY) {\n return Number.POSITIVE_INFINITY;\n }\n if (!Number.isFinite(n) || !Number.isInteger(n) || n <= 0) {\n throw new RangeError(\"request amount must be a strictly positive integer\");\n }\n return n;\n}\n\n/** Adds demand values with saturation at positive infinity. */\nexport function addCap(a: number, b: number): number {\n if (a === Number.POSITIVE_INFINITY || b === Number.POSITIVE_INFINITY) {\n return Number.POSITIVE_INFINITY;\n }\n const next = a + b;\n return next >= Number.MAX_SAFE_INTEGER ? Number.POSITIVE_INFINITY : next;\n}\n"],"mappings":";;;;;;AAKA,SAAgB,iBAAiB,GAAmB;CAChD,IAAI,MAAM,OAAO,mBACb,OAAO,OAAO;CAElB,IAAI,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,KAAK,KAAK,GACpD,MAAM,IAAI,WAAW,oDAAoD;CAE7E,OAAO;AACX;;AAGA,SAAgB,OAAO,GAAW,GAAmB;CACjD,IAAI,MAAM,OAAO,qBAAqB,MAAM,OAAO,mBAC/C,OAAO,OAAO;CAElB,MAAM,OAAO,IAAI;CACjB,OAAO,QAAQ,OAAO,mBAAmB,OAAO,oBAAoB;AACxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flux.d.ts","sourceRoot":"","sources":["../../src/publisher/flux.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flux.d.ts","sourceRoot":"","sources":["../../src/publisher/flux.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAK3D,OAAO,EAGH,KAAK,WAAW,EAKnB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAc,KAAK,oBAAoB,EAAkB,MAAM,gCAAgC,CAAC;AACvG,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAC;AAGxD,OAAO,KAAK,EAAC,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAC,MAAM,sBAAs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|
import { EMPTY_ITERABLE, closeAsyncIterator, isAsyncIterable, isIterable, neverIterable, toAsyncIterator } from "../internal/iterable.js";
|
|
4
4
|
import { mapIterable } from "../internal/iterable-transform.js";
|
|
5
5
|
import { BooleanDisposable } from "../core/boolean-disposable.js";
|
|
6
|
+
import { addCap } from "../core/demand.js";
|
|
6
7
|
import { CompositeError } from "../errors/classes.js";
|
|
7
8
|
import { asError, throwIfNullish } from "../errors/helpers.js";
|
|
8
9
|
import { firstValueFrom, raceWithAbort } from "../internal/abort.js";
|
|
@@ -65,9 +66,9 @@ var Flux = class Flux {
|
|
|
65
66
|
static from(input) {
|
|
66
67
|
throwIfNullish(input, "input");
|
|
67
68
|
if (input instanceof Flux) return input;
|
|
69
|
+
if (typeof input.subscribe === "function") return fromPublisher(input);
|
|
68
70
|
if (isAsyncIterable(input)) return new Flux(() => input);
|
|
69
71
|
if (isIterable(input)) return Flux.fromIterable(input);
|
|
70
|
-
if (typeof input.subscribe === "function") return fromPublisher(input);
|
|
71
72
|
if (typeof input.then === "function") return new Flux(async function* (signal) {
|
|
72
73
|
const value = await raceWithAbort(Promise.resolve(input), signal);
|
|
73
74
|
if (value !== void 0 && value !== null) yield value;
|
|
@@ -552,31 +553,100 @@ function throwUnhandledSubscriberError(error) {
|
|
|
552
553
|
}
|
|
553
554
|
/** Adapts a Reactive Streams publisher to the Flux async-iteration model. */
|
|
554
555
|
function fromPublisher(publisher) {
|
|
555
|
-
return new
|
|
556
|
-
|
|
556
|
+
return new PublisherFlux(publisher);
|
|
557
|
+
}
|
|
558
|
+
/** Flux adapter that keeps Reactive Streams subscriptions on their native demand path. */
|
|
559
|
+
var PublisherFlux = class extends Flux {
|
|
560
|
+
/** Creates a direct Flux adapter for a Reactive Streams publisher. */
|
|
561
|
+
constructor(publisher) {
|
|
562
|
+
super((signal) => publisherAsyncIterable(publisher, signal));
|
|
563
|
+
_defineProperty(this, "publisher", void 0);
|
|
564
|
+
this.publisher = publisher;
|
|
565
|
+
}
|
|
566
|
+
/** Subscribes directly so request amounts are not converted to iterator pulls. */
|
|
567
|
+
subscribeActual(subscriber) {
|
|
568
|
+
this.publisher.subscribe(subscriber);
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
/** Adapts a publisher to pull-based async iteration without requesting it unboundedly. */
|
|
572
|
+
function publisherAsyncIterable(publisher, signal) {
|
|
573
|
+
return {
|
|
574
|
+
/** Creates one pull-based iterator and its dedicated publisher subscription. */
|
|
575
|
+
[Symbol.asyncIterator]() {
|
|
576
|
+
const queue = new AsyncQueue();
|
|
557
577
|
let subscription;
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
578
|
+
let pendingDemand = 0;
|
|
579
|
+
let terminated = signal.aborted;
|
|
580
|
+
const cleanup = () => signal.removeEventListener("abort", cancel);
|
|
581
|
+
const cancel = () => {
|
|
582
|
+
if (terminated) return;
|
|
583
|
+
terminated = true;
|
|
584
|
+
cleanup();
|
|
585
|
+
subscription?.cancel();
|
|
586
|
+
queue.return();
|
|
587
|
+
};
|
|
588
|
+
if (terminated) queue.complete();
|
|
589
|
+
else {
|
|
590
|
+
signal.addEventListener("abort", cancel, { once: true });
|
|
591
|
+
try {
|
|
592
|
+
publisher.subscribe({
|
|
593
|
+
/** Stores the upstream and drains any pulls made before onSubscribe. */
|
|
594
|
+
onSubscribe(nextSubscription) {
|
|
595
|
+
if (subscription || terminated) {
|
|
596
|
+
nextSubscription.cancel();
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
subscription = nextSubscription;
|
|
600
|
+
if (pendingDemand > 0) {
|
|
601
|
+
const request = pendingDemand;
|
|
602
|
+
pendingDemand = 0;
|
|
603
|
+
nextSubscription.request(request);
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
/** Queues one publisher value for an async iterator pull. */
|
|
607
|
+
onNext(value) {
|
|
608
|
+
queue.push(value);
|
|
609
|
+
},
|
|
610
|
+
/** Propagates the terminal publisher error to the iterator. */
|
|
611
|
+
onError(error) {
|
|
612
|
+
if (terminated) return;
|
|
613
|
+
terminated = true;
|
|
614
|
+
cleanup();
|
|
615
|
+
queue.error(error);
|
|
616
|
+
},
|
|
617
|
+
/** Completes the iterator when the publisher completes. */
|
|
618
|
+
onComplete() {
|
|
619
|
+
if (terminated) return;
|
|
620
|
+
terminated = true;
|
|
621
|
+
cleanup();
|
|
622
|
+
queue.complete();
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
} catch (error) {
|
|
626
|
+
terminated = true;
|
|
627
|
+
cleanup();
|
|
570
628
|
queue.error(error);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
return {
|
|
632
|
+
/** Requests exactly one upstream item for one iterator pull. */
|
|
633
|
+
next() {
|
|
634
|
+
if (!terminated) if (subscription) subscription.request(1);
|
|
635
|
+
else pendingDemand = addCap(pendingDemand, 1);
|
|
636
|
+
return queue.next();
|
|
571
637
|
},
|
|
572
|
-
/**
|
|
573
|
-
|
|
574
|
-
|
|
638
|
+
/** Cancels upstream when iteration stops early. */
|
|
639
|
+
return() {
|
|
640
|
+
cancel();
|
|
641
|
+
return queue.return();
|
|
642
|
+
},
|
|
643
|
+
/** Cancels upstream and rejects the iterator with the supplied error. */
|
|
644
|
+
throw(error) {
|
|
645
|
+
cancel();
|
|
646
|
+
return Promise.reject(error);
|
|
575
647
|
}
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
return queue;
|
|
579
|
-
});
|
|
648
|
+
};
|
|
649
|
+
} };
|
|
580
650
|
}
|
|
581
651
|
/** Adapts publisher inputs to Flux instances without callback allocation. */
|
|
582
652
|
function toFluxArray(sources) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flux.js","names":[],"sources":["../../src/publisher/flux.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * Flux, Mono and operator implementation modules.\n */\nimport {BooleanDisposable} from \"@/core/boolean-disposable.js\";\nimport type {Disposable} from \"@/core/types.js\";\nimport {Context} from \"@/context/context.js\";\nimport type {ContextView} from \"@/context/context-view.js\";\nimport {CompositeError} from \"@/errors/classes.js\";\nimport {asError, throwIfNullish} from \"@/errors/helpers.js\";\nimport {firstValueFrom, raceWithAbort} from \"@/internal/abort.js\";\nimport {AsyncQueue} from \"@/internal/async-queue.js\";\nimport {\n closeAsyncIterator,\n EMPTY_ITERABLE,\n type AnyIterable,\n isAsyncIterable,\n isIterable,\n neverIterable,\n toAsyncIterator\n} from \"@/internal/iterable.js\";\nimport {collectIterable, lastIterableValue} from \"@/internal/iterable-terminal.js\";\nimport {mapIterable} from \"@/internal/iterable-transform.js\";\nimport {eventSource, type WebSocketFluxOptions, webSocketSource} from \"@/publisher/browser-sources.js\";\nimport type {Publisher} from \"@/publisher/publisher.js\";\nimport {addCancelCallback, type CancelCallbacks, isSubscriber, runCancelCallbacks, scheduleDelay} from \"@/publisher/helpers.js\";\nimport {IterableSubscription} from \"@/subscription/iterable-subscription.js\";\nimport type {FluxSinkCallback, PublisherInput, SourceFactory} from \"@/publisher/types.js\";\nimport {Schedulers} from \"@/schedulers/schedulers.js\";\nimport type {DurationInput, Scheduler} from \"@/schedulers/types.js\";\nimport type {CoreSubscriber} from \"@/subscription/core-subscriber.js\";\nimport type {Subscriber} from \"@/subscription/subscriber.js\";\nimport type {Subscription} from \"@/subscription/subscription.js\";\n\n/** Multi-value Reactive Streams publisher with Reactor-style operators. */\nexport class Flux<T> implements Publisher<T>, AsyncIterable<T> {\n /** Lazy source factory invoked for each subscription or async iteration. */\n private readonly sourceFactory: SourceFactory<T>;\n\n /** Creates a Flux from a lazy source factory. */\n public constructor(sourceFactory: SourceFactory<T>) {\n this.sourceFactory = sourceFactory;\n }\n\n /** Creates a Flux that emits the provided values and then completes. */\n public static just<T>(...values: readonly T[]): Flux<T> {\n if (values.length === 0) {\n return Flux.empty<T>();\n }\n for (const value of values) {\n throwIfNullish(value, \"value\");\n }\n return Flux.fromIterable(values);\n }\n\n /** Creates a Flux from an array-like readonly value list. */\n public static fromArray<T>(values: readonly T[]): Flux<T> {\n throwIfNullish(values, \"values\");\n if (values.length === 0) {\n return Flux.empty<T>();\n }\n return Flux.fromIterable(values);\n }\n\n /** Creates a Flux from a stream-like iterable or a lazy stream supplier. */\n public static fromStream<T>(stream: Iterable<T> | (() => Iterable<T>)): Flux<T> {\n throwIfNullish(stream, \"stream\");\n return typeof stream === \"function\" ? Flux.defer(() => Flux.fromIterable((stream as () => Iterable<T>)())) : Flux.fromIterable(stream);\n }\n\n /** Creates a Flux from a JavaScript iterable. */\n public static fromIterable<T>(values: Iterable<T>): Flux<T> {\n throwIfNullish(values, \"values\");\n if (Array.isArray(values) && values.length === 0) {\n return Flux.empty<T>();\n }\n return new Flux(() => values);\n }\n\n /** Creates a Flux from browser `Window` events and removes the listener on cancellation. */\n public static fromEvent<K extends keyof WindowEventMap>(\n target: Window,\n type: K,\n options?: boolean | AddEventListenerOptions\n ): Flux<WindowEventMap[K]>;\n /** Creates a Flux from browser `Document` events and removes the listener on cancellation. */\n public static fromEvent<K extends keyof DocumentEventMap>(\n target: Document,\n type: K,\n options?: boolean | AddEventListenerOptions\n ): Flux<DocumentEventMap[K]>;\n /** Creates a Flux from browser `HTMLElement` events and removes the listener on cancellation. */\n public static fromEvent<K extends keyof HTMLElementEventMap>(\n target: HTMLElement,\n type: K,\n options?: boolean | AddEventListenerOptions\n ): Flux<HTMLElementEventMap[K]>;\n /** Creates a Flux from any browser `EventTarget` and removes the listener on cancellation. */\n public static fromEvent<TEvent extends Event = Event>(\n target: EventTarget,\n type: string,\n options?: boolean | AddEventListenerOptions\n ): Flux<TEvent>;\n /** Creates a Flux from browser events and removes the listener on cancellation. */\n public static fromEvent<TEvent extends Event = Event>(\n target: EventTarget,\n type: string,\n options?: boolean | AddEventListenerOptions\n ): Flux<TEvent> {\n return new Flux(eventSource<TEvent>(target, type, options));\n }\n\n /** Creates a Flux from browser WebSocket message events. */\n public static fromWebSocket<T = unknown>(\n url: string | URL,\n options?: string | string[] | WebSocketFluxOptions\n ): Flux<MessageEvent<T>>;\n /** Creates a Flux from browser WebSocket message events. */\n public static fromWebSocket<T = unknown>(\n socket: WebSocket,\n options?: WebSocketFluxOptions\n ): Flux<MessageEvent<T>>;\n /** Creates a Flux from browser WebSocket message events and cleans listeners on cancellation. */\n public static fromWebSocket<T = unknown>(\n input: WebSocket | string | URL,\n options?: string | string[] | WebSocketFluxOptions\n ): Flux<MessageEvent<T>> {\n return new Flux(webSocketSource<T>(input, options));\n }\n\n /** Adapts a publisher, iterable, async iterable or promise-like value to Flux. */\n public static from<T>(input: PublisherInput<T>): Flux<T> {\n throwIfNullish(input, \"input\");\n if (input instanceof Flux) {\n return input;\n }\n if (isAsyncIterable<T>(input)) {\n return new Flux(() => input);\n }\n if (isIterable<T>(input)) {\n return Flux.fromIterable(input);\n }\n if (typeof (input as Publisher<T>).subscribe === \"function\") {\n return fromPublisher(input as Publisher<T>);\n }\n if (typeof (input as PromiseLike<T>).then === \"function\") {\n return new Flux(async function* (signal) {\n const value = await raceWithAbort(Promise.resolve(input as PromiseLike<T>), signal);\n if (value !== undefined && value !== null) {\n yield value;\n }\n });\n }\n throw new TypeError(\"Unsupported publisher input\");\n }\n\n /** Creates a Flux that completes without emitting values. */\n public static empty<T = never>(): Flux<T> {\n return EMPTY_FLUX as Flux<T>;\n }\n\n /** Creates a Flux that never emits or completes until cancelled. */\n public static never<T = never>(): Flux<T> {\n return NEVER_FLUX as Flux<T>;\n }\n\n /** Creates a Flux that terminates with the provided error. */\n public static error<T = never>(error: unknown | (() => unknown)): Flux<T> {\n return new Flux(async function* () {\n throw typeof error === \"function\" ? (error as () => unknown)() : error;\n });\n }\n\n /** Defers source creation until subscription time. */\n public static defer<T>(supplier: () => PublisherInput<T>): Flux<T> {\n return new Flux((signal, context) => Flux.from(supplier()).iterate(signal, context));\n }\n\n /** Defers source creation and exposes the subscriber context. */\n public static deferContextual<T>(supplier: (context: ContextView) => PublisherInput<T>): Flux<T> {\n return new Flux((signal, context) => Flux.from(supplier(context.readOnly())).iterate(signal, context));\n }\n\n /** Creates a Flux by bridging callback-style producers through a sink. */\n public static create<T>(callback: FluxSinkCallback<T>): Flux<T> {\n throwIfNullish(callback, \"callback\");\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n let cancelled = false;\n let cancelCallbacks: CancelCallbacks | undefined;\n const sink = {\n /** Emits one value into the created Flux. */\n next(value: T) {\n throwIfNullish(value, \"value\");\n queue.push(value);\n },\n /** Terminates the created Flux with an error. */\n error(error: unknown) {\n queue.error(error);\n },\n /** Completes the created Flux. */\n complete() {\n queue.complete();\n },\n /** Registers a callback invoked when the subscription is cancelled. */\n onCancel(cancelCallback: () => void) {\n cancelCallbacks = addCancelCallback(cancelCallbacks, cancelCallback);\n return sink;\n },\n /** Returns true after cancellation has been observed. */\n isCancelled() {\n return cancelled || signal.aborted;\n }\n };\n signal.addEventListener(\n \"abort\",\n () => {\n cancelled = true;\n runCancelCallbacks(cancelCallbacks);\n cancelCallbacks = undefined;\n queue.complete();\n },\n {once: true}\n );\n try {\n callback(sink);\n } catch (error) {\n queue.error(error);\n }\n return queue;\n });\n }\n\n /** Creates a Flux by bridging a single-threaded push-style producer through a sink. */\n public static push<T>(callback: FluxSinkCallback<T>): Flux<T> {\n return Flux.create(callback);\n }\n\n /** Creates a Flux by repeatedly invoking a synchronous generator callback. */\n public static generate<T>(generator: (sink: {\n next(value: T): void;\n complete(): void;\n error(error: unknown): void\n }) => void): Flux<T> {\n throwIfNullish(generator, \"generator\");\n return new Flux(async function* (signal) {\n let done = false;\n let hasValue = false;\n let value: T | undefined;\n const sink = {\n /** Emits one generated value for this turn. */\n next(nextValue: T) {\n if (hasValue) {\n throw new Error(\"Synchronous generator can emit at most one value per turn\");\n }\n hasValue = true;\n value = nextValue;\n },\n /** Completes the generated sequence. */\n complete() {\n done = true;\n },\n /** Fails the generated sequence. */\n error(error: unknown) {\n throw error;\n }\n };\n while (!done && !signal.aborted) {\n hasValue = false;\n value = undefined;\n generator(sink);\n if (hasValue) {\n yield value as T;\n } else if (!done) {\n throw new Error(\"Synchronous generator must emit, complete or fail\");\n }\n }\n });\n }\n\n /** Creates a finite integer range. */\n public static range(start: number, count: number): Flux<number> {\n if (!Number.isInteger(start) || !Number.isInteger(count) || count < 0) {\n throw new RangeError(\"Flux.range expects an integer start and a non-negative integer count\");\n }\n if (count === 0) {\n return Flux.empty<number>();\n }\n return new Flux(function* () {\n for (let i = 0; i < count; i += 1) {\n yield start + i;\n }\n });\n }\n\n /** Creates an interval Flux that emits incrementing numbers. */\n public static interval(period: DurationInput, scheduler: Scheduler = Schedulers.timeout()): Flux<number> {\n return new Flux(async function* (signal) {\n let index = 0;\n while (!signal.aborted) {\n await scheduleDelay(scheduler, period, signal);\n if (!signal.aborted) {\n yield index;\n index += 1;\n }\n }\n });\n }\n\n /** Merges several publishers concurrently. */\n public static merge<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n if (sources.length === 1) {\n return Flux.from(sources[0]!);\n }\n return mergeSources(toFluxArray(sources));\n }\n\n /** Merges several publishers concurrently and delays failures until every source terminates. */\n public static mergeDelayError<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n if (sources.length === 1) {\n return Flux.from(sources[0]!);\n }\n return mergeSourcesDelayError(toFluxArray(sources));\n }\n\n /** Merges sources sequentially while subscribing to one source at a time. */\n public static mergeSequential<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n return Flux.concat(...sources);\n }\n\n /** Merges sources sequentially and delays failures until every source has been consumed. */\n public static mergeSequentialDelayError<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n return concatDelayErrorSources(sources);\n }\n\n /** Merges finite sources and emits their values sorted by a comparator. */\n public static mergeComparing<T>(\n comparatorOrSource?: ((left: T, right: T) => number) | PublisherInput<T>,\n ...sources: readonly PublisherInput<T>[]\n ): Flux<T> {\n const {comparator, inputs} = orderedMergeInputs(comparatorOrSource, sources);\n return sortMergedSources(inputs, comparator);\n }\n\n /** Merges finite sources, delays failures and emits their values sorted by a comparator. */\n public static mergeComparingDelayError<T>(\n comparatorOrSource?: ((left: T, right: T) => number) | PublisherInput<T>,\n ...sources: readonly PublisherInput<T>[]\n ): Flux<T> {\n const {comparator, inputs} = orderedMergeInputs(comparatorOrSource, sources);\n return sortMergedSourcesDelayError(inputs, comparator);\n }\n\n /** Merges finite sources and emits their values in comparator order. */\n public static mergeOrdered<T>(\n comparatorOrSource?: ((left: T, right: T) => number) | PublisherInput<T>,\n ...sources: readonly PublisherInput<T>[]\n ): Flux<T> {\n return Flux.mergeComparing(comparatorOrSource, ...sources);\n }\n\n /** Merges finite sources with priority ordering. */\n public static mergePriority<T>(\n comparatorOrSource?: ((left: T, right: T) => number) | PublisherInput<T>,\n ...sources: readonly PublisherInput<T>[]\n ): Flux<T> {\n return Flux.mergeComparing(comparatorOrSource, ...sources);\n }\n\n /** Merges finite sources with priority ordering and delayed failures. */\n public static mergePriorityDelayError<T>(\n comparatorOrSource?: ((left: T, right: T) => number) | PublisherInput<T>,\n ...sources: readonly PublisherInput<T>[]\n ): Flux<T> {\n return Flux.mergeComparingDelayError(comparatorOrSource, ...sources);\n }\n\n /** Concatenates several publishers sequentially. */\n public static concat<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n if (sources.length === 1) {\n return Flux.from(sources[0]!);\n }\n return new Flux(async function* (signal, context) {\n for (const source of sources) {\n for await (const value of Flux.from(source).iterate(signal, context)) {\n if (signal.aborted) {\n return;\n }\n yield value;\n }\n }\n });\n }\n\n /** Concatenates several publishers sequentially and delays failures until every source has been consumed. */\n public static concatDelayError<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n if (sources.length === 1) {\n return Flux.from(sources[0]!);\n }\n return concatDelayErrorSources(sources);\n }\n\n /** Relays the first source that emits any signal. */\n public static first<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n return Flux.firstWithSignal(...sources);\n }\n\n /** Relays the first source that emits any signal. */\n public static firstWithSignal<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n if (sources.length === 1) {\n return Flux.from(sources[0]!);\n }\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n let settled = false;\n for (const source of sources) {\n void (async () => {\n try {\n const iterator = toAsyncIterator(Flux.from(source).iterate(signal, context));\n try {\n const first = await raceWithAbort(iterator.next(), signal);\n if (settled) {\n await iterator.return?.();\n return;\n }\n settled = true;\n if (first.done) {\n queue.complete();\n return;\n }\n queue.push(first.value);\n for (; ;) {\n const next = await raceWithAbort(iterator.next(), signal);\n if (next.done) {\n queue.complete();\n return;\n }\n queue.push(next.value);\n }\n } finally {\n await iterator.return?.();\n }\n } catch (error) {\n if (!settled) {\n settled = true;\n queue.error(error);\n }\n }\n })();\n }\n return queue;\n });\n }\n\n /** Relays the first source that produces a value, ignoring empty completions. */\n public static firstWithValue<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n let remaining = sources.length;\n let settled = false;\n const errors: unknown[] = [];\n for (const source of sources) {\n void (async () => {\n try {\n const value = await firstValueFrom(Flux.from(source), signal);\n if (settled) {\n return;\n }\n if (value !== undefined) {\n settled = true;\n queue.push(value);\n queue.complete();\n return;\n }\n } catch (error) {\n errors.push(error);\n }\n remaining -= 1;\n if (remaining === 0 && !settled) {\n errors.length > 0 ? queue.error(new CompositeError(errors)) : queue.complete();\n }\n })();\n }\n return queue;\n });\n }\n\n /** Zips publishers by combining one value from each source. */\n public static zip<T extends readonly unknown[], R = T>(\n sources: { [K in keyof T]: PublisherInput<T[K]> },\n combinator?: (values: T) => R\n ): Flux<R> {\n const sourceCount = sources.length;\n if (sourceCount === 0) {\n return Flux.empty<R>();\n }\n if (sourceCount === 1) {\n return singleTupleSource(sources[0]!, combinator);\n }\n return new Flux(async function* (signal, context) {\n const iterators = new Array<AsyncIterator<unknown>>(sourceCount);\n const nexts = new Array<Promise<IteratorResult<unknown>>>(sourceCount);\n for (let index = 0; index < sourceCount; index += 1) {\n iterators[index] = toAsyncIterator(Flux.from(sources[index]!).iterate(signal, context));\n }\n try {\n while (!signal.aborted) {\n for (let index = 0; index < sourceCount; index += 1) {\n nexts[index] = raceWithAbort(iterators[index]!.next(), signal);\n }\n const results = await Promise.all(nexts);\n const values = new Array<unknown>(sourceCount);\n for (let index = 0; index < sourceCount; index += 1) {\n const result = results[index]!;\n if (result.done) {\n return;\n }\n values[index] = result.value;\n }\n const tuple = values as unknown as T;\n yield combinator ? combinator(tuple) : (tuple as unknown as R);\n }\n } finally {\n for (const iterator of iterators) {\n await closeAsyncIterator(iterator);\n }\n }\n });\n }\n\n /** Combines the latest value from each source after all sources emitted once. */\n public static combineLatest<T extends readonly unknown[], R = T>(\n sources: { [K in keyof T]: PublisherInput<T[K]> },\n combinator?: (values: T) => R\n ): Flux<R> {\n if (sources.length === 0) {\n return Flux.empty<R>();\n }\n if (sources.length === 1) {\n return singleTupleSource(sources[0]!, combinator);\n }\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<R>(signal);\n const sourceCount = sources.length;\n const latest = new Array<unknown>(sourceCount);\n const hasValue = new Array<boolean>(sourceCount);\n let readyCount = 0;\n let completed = 0;\n let failed = false;\n for (let index = 0; index < sourceCount; index += 1) {\n const source = sources[index]!;\n void (async () => {\n try {\n for await (const value of Flux.from(source).iterate(signal, context)) {\n latest[index] = value;\n if (hasValue[index] !== true) {\n hasValue[index] = true;\n readyCount += 1;\n }\n if (readyCount === sourceCount) {\n const values = latest.slice() as unknown as T;\n queue.push(combinator ? combinator(values) : (values as unknown as R));\n }\n }\n completed += 1;\n if (completed === sourceCount && !failed) {\n queue.complete();\n }\n } catch (error) {\n failed = true;\n queue.error(error);\n }\n })();\n }\n return queue;\n });\n }\n\n /** Switches to the most recent publisher emitted by an outer publisher. */\n public static switchOnNext<T>(sources: PublisherInput<PublisherInput<T>>): Flux<T> {\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n let active = 0;\n let outerDone = false;\n let failed = false;\n const completeIfDone = () => {\n if (outerDone && active === 0 && !failed) {\n queue.complete();\n }\n };\n void (async () => {\n const iterator = toAsyncIterator(Flux.from(sources).iterate(signal, context));\n try {\n let version = 0;\n while (!signal.aborted) {\n const next = await raceWithAbort(iterator.next(), signal);\n if (next.done) {\n break;\n }\n version += 1;\n const current = version;\n active += 1;\n void (async () => {\n try {\n for await (const value of Flux.from(next.value).iterate(signal, context)) {\n if (current === version) {\n queue.push(value);\n }\n }\n } catch (error) {\n failed = true;\n queue.error(error);\n } finally {\n active -= 1;\n completeIfDone();\n }\n })();\n }\n outerDone = true;\n completeIfDone();\n } catch (error) {\n failed = true;\n queue.error(error);\n } finally {\n void iterator.return?.();\n }\n })();\n return queue;\n });\n }\n\n /** Uses a resource for the duration of a derived publisher and cleans it up afterwards. */\n public static using<T, D>(\n resourceSupplier: () => D,\n sourceFactory: (resource: D) => PublisherInput<T>,\n resourceCleanup: (resource: D) => void = closeResource as (resource: D) => void\n ): Flux<T> {\n return new Flux(async function* (signal, context) {\n const resource = resourceSupplier();\n try {\n for await (const value of Flux.from(sourceFactory(resource)).iterate(signal, context)) {\n yield value;\n }\n } finally {\n resourceCleanup(resource);\n }\n });\n }\n\n /** Uses an asynchronously supplied resource and runs asynchronous cleanup publishers. */\n public static usingWhen<T, D>(\n resourceSupplier: PublisherInput<D>,\n sourceFactory: (resource: D) => PublisherInput<T>,\n asyncComplete?: (resource: D) => PublisherInput<unknown>,\n asyncError?: (resource: D, error: unknown) => PublisherInput<unknown>,\n asyncCancel?: (resource: D) => PublisherInput<unknown>\n ): Flux<T> {\n return new Flux(async function* (signal, context) {\n const resource = await firstValueFrom(Flux.from(resourceSupplier), signal);\n if (resource === undefined) {\n return;\n }\n let failed: unknown;\n try {\n for await (const value of Flux.from(sourceFactory(resource)).iterate(signal, context)) {\n yield value;\n }\n } catch (error) {\n failed = error;\n if (asyncError) {\n await drainPublisher(asyncError(resource, error), new AbortController().signal, context);\n }\n throw error;\n } finally {\n if (signal.aborted && asyncCancel) {\n await drainPublisher(asyncCancel(resource), new AbortController().signal, context);\n } else if (failed === undefined && asyncComplete) {\n await drainPublisher(asyncComplete(resource), new AbortController().signal, context);\n }\n }\n });\n }\n\n /** Subscribes a full Reactive Streams subscriber. */\n public subscribe(subscriber: Subscriber<T>): void;\n /** Subscribes callbacks and requests unbounded demand. */\n public subscribe(onNext?: (value: T) => void, onError?: (error: unknown) => void, onComplete?: () => void): Disposable;\n /** Subscribes either a full subscriber or callback handlers. */\n public subscribe(\n subscriberOrNext?: Subscriber<T> | ((value: T) => void),\n onError: (error: unknown) => void = throwUnhandledSubscriberError,\n onComplete: () => void = noopSubscriberCallback\n ): void | Disposable {\n if (isSubscriber<T>(subscriberOrNext)) {\n this.subscribeActual(subscriberOrNext);\n return;\n }\n\n let subscription: Subscription | undefined;\n const disposable = new BooleanDisposable(() => subscription?.cancel());\n const subscriber: Subscriber<T> = {\n /** Stores the subscription and requests unbounded demand. */\n onSubscribe(nextSubscription) {\n subscription = nextSubscription;\n nextSubscription.request(Number.POSITIVE_INFINITY);\n },\n onNext: subscriberOrNext ?? noopSubscriberCallback,\n onError,\n onComplete\n };\n this.subscribeActual(subscriber);\n return disposable;\n }\n\n /** Subscribes a normalized Reactive Streams subscriber to this Flux. */\n protected subscribeActual(subscriber: Subscriber<T>): void {\n const context = (subscriber as CoreSubscriber<T>).currentContext?.() ?? Context.empty();\n const subscription = new IterableSubscription(this, subscriber, context);\n subscription.start();\n subscriber.onSubscribe(subscription);\n subscription.deliverStartFailure();\n }\n\n /** Returns the lazy iterable backing this Flux for internal operator composition. */\n public iterate(signal: AbortSignal, context: Context = Context.empty()): AnyIterable<T> {\n return this.sourceFactory(signal, context);\n }\n\n /** Returns an async iterator over this Flux. */\n public [Symbol.asyncIterator](): AsyncIterator<T> {\n const controller = new AbortController();\n const iterator = toAsyncIterator(this.iterate(controller.signal, Context.empty()));\n return {\n next: () => iterator.next(),\n return: async value => {\n controller.abort();\n if (iterator.return) {\n await iterator.return(value);\n }\n return {done: true, value: value as T};\n },\n throw: async error => {\n controller.abort();\n if (iterator.throw) {\n return iterator.throw(error);\n }\n throw error;\n }\n };\n }\n\n /** Returns this Flux as an async iterable. */\n public toIterable(): AsyncIterable<T> {\n return this;\n }\n\n /** Collects all values into an array. */\n public async toArray(): Promise<T[]> {\n return collectIterable(this.iterate(new AbortController().signal, Context.empty()));\n }\n\n /** Resolves to the last emitted value, or undefined for an empty source. */\n public async toPromise(): Promise<T | undefined> {\n return lastIterableValue(this.iterate(new AbortController().signal, Context.empty()));\n }\n}\n\n/** Shared stateless empty Flux instance. */\nconst EMPTY_FLUX = new Flux<never>(() => EMPTY_ITERABLE);\n\n/** Shared stateless never Flux instance. */\nconst NEVER_FLUX = new Flux<never>(signal => neverIterable(signal));\n\n/** Default cleanup for resources that expose a close method. */\nfunction closeResource(resource: unknown): void {\n (resource as { close?: () => void }).close?.();\n}\n\n/** Shared no-op subscriber callback. */\nfunction noopSubscriberCallback(): void {\n // no-op\n}\n\n/** Throws unhandled subscriber errors like the default callback contract. */\nfunction throwUnhandledSubscriberError(error: unknown): never {\n throw asError(error);\n}\n\n/** Adapts a Reactive Streams publisher to the Flux async-iteration model. */\nfunction fromPublisher<T>(publisher: Publisher<T>): Flux<T> {\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n let subscription: Subscription | undefined;\n publisher.subscribe({\n /** Captures upstream subscription and requests unbounded demand. */\n onSubscribe(nextSubscription) {\n subscription = nextSubscription;\n nextSubscription.request(Number.POSITIVE_INFINITY);\n },\n /** Pushes upstream values into the bridge queue. */\n onNext(value) {\n queue.push(value);\n },\n /** Fails the bridge queue with the upstream error. */\n onError(error) {\n queue.error(error);\n },\n /** Completes the bridge queue when upstream completes. */\n onComplete() {\n queue.complete();\n }\n });\n signal.addEventListener(\"abort\", () => subscription?.cancel(), {once: true});\n return queue;\n });\n}\n\n/** Adapts publisher inputs to Flux instances without callback allocation. */\nfunction toFluxArray<T>(sources: readonly PublisherInput<T>[]): Flux<T>[] {\n const fluxes = new Array<Flux<T>>(sources.length);\n for (let index = 0; index < sources.length; index += 1) {\n fluxes[index] = Flux.from(sources[index]!);\n }\n return fluxes;\n}\n\n/** Emits one-element tuple values without multi-source coordination overhead. */\nfunction singleTupleSource<T extends readonly unknown[], R>(\n source: PublisherInput<T[0]>,\n combinator: ((values: T) => R) | undefined\n): Flux<R> {\n return new Flux((signal, context) =>\n mapIterable(Flux.from(source).iterate(signal, context), value => {\n const tuple = [value] as unknown as T;\n return combinator ? combinator(tuple) : (tuple as unknown as R);\n })\n );\n}\n\n/** Merges sources concurrently without bounded-concurrency bookkeeping. */\nfunction mergeSources<T>(sources: readonly Flux<T>[]): Flux<T> {\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n const tasks = new Array<Promise<void>>(sources.length);\n let failed = false;\n void (async () => {\n try {\n for (let index = 0; index < sources.length; index += 1) {\n tasks[index] = drainMergedSource(sources[index]!, signal, context, queue, () => {\n failed = true;\n });\n }\n await Promise.all(tasks);\n if (!failed) {\n queue.complete();\n }\n } catch (error) {\n queue.error(error);\n }\n })();\n return queue;\n });\n}\n\n/** Merges sources concurrently and collects failures until all active sources terminate. */\nfunction mergeSourcesDelayError<T>(sources: readonly Flux<T>[]): Flux<T> {\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n const tasks = new Array<Promise<void>>(sources.length);\n const errors: unknown[] = [];\n void (async () => {\n try {\n for (let index = 0; index < sources.length; index += 1) {\n tasks[index] = drainMergedSourceDelayError(sources[index]!, signal, context, queue, errors);\n }\n await Promise.all(tasks);\n errors.length > 0 ? queue.error(new CompositeError(errors)) : queue.complete();\n } catch (error) {\n queue.error(error);\n }\n })();\n return queue;\n });\n}\n\n/** Drains one merged source and reports its first failure through the output queue. */\nasync function drainMergedSource<T>(\n source: Flux<T>,\n signal: AbortSignal,\n context: Context,\n queue: AsyncQueue<T>,\n markFailed: () => void\n): Promise<void> {\n try {\n for await (const value of source.iterate(signal, context)) {\n queue.push(value);\n }\n } catch (error) {\n markFailed();\n queue.error(error);\n }\n}\n\n/** Drains one merged source while recording failures for delayed-error merging. */\nasync function drainMergedSourceDelayError<T>(\n source: Flux<T>,\n signal: AbortSignal,\n context: Context,\n queue: AsyncQueue<T>,\n errors: unknown[]\n): Promise<void> {\n try {\n for await (const value of source.iterate(signal, context)) {\n queue.push(value);\n }\n } catch (error) {\n errors.push(error);\n }\n}\n\n/** Concatenates sources while collecting failures until all sources have run. */\nfunction concatDelayErrorSources<T>(sources: readonly PublisherInput<T>[]): Flux<T> {\n return new Flux(async function* (signal, context) {\n const errors: unknown[] = [];\n for (const source of sources) {\n try {\n for await (const value of Flux.from(source).iterate(signal, context)) {\n yield value;\n }\n } catch (error) {\n errors.push(error);\n }\n }\n if (errors.length > 0) {\n throw new CompositeError(errors);\n }\n });\n}\n\n/** Normalizes ordered merge arguments into a comparator and source list. */\nfunction orderedMergeInputs<T>(\n comparatorOrSource: ((left: T, right: T) => number) | PublisherInput<T> | undefined,\n sources: readonly PublisherInput<T>[]\n): { comparator: ((left: T, right: T) => number) | undefined; inputs: readonly PublisherInput<T>[] } {\n if (typeof comparatorOrSource === \"function\") {\n return {comparator: comparatorOrSource as (left: T, right: T) => number, inputs: sources};\n }\n return {\n comparator: undefined,\n inputs: comparatorOrSource === undefined ? sources : [comparatorOrSource, ...sources]\n };\n}\n\n/** Collects finite merged values and emits them sorted by the optional comparator. */\nfunction sortMergedSources<T>(sources: readonly PublisherInput<T>[], comparator?: (left: T, right: T) => number): Flux<T> {\n return new Flux(async function* (signal, context) {\n const values: T[] = [];\n for await (const value of Flux.merge(...sources).iterate(signal, context)) {\n values.push(value);\n }\n values.sort(comparator);\n yield* values;\n });\n}\n\n/** Collects finite merged values with delayed errors and emits them sorted by the optional comparator. */\nfunction sortMergedSourcesDelayError<T>(\n sources: readonly PublisherInput<T>[],\n comparator?: (left: T, right: T) => number\n): Flux<T> {\n return new Flux(async function* (signal, context) {\n const values: T[] = [];\n for await (const value of Flux.mergeDelayError(...sources).iterate(signal, context)) {\n values.push(value);\n }\n values.sort(comparator);\n yield* values;\n });\n}\n\n/** Consumes a cleanup publisher and ignores all emitted values. */\nasync function drainPublisher(source: PublisherInput<unknown>, signal: AbortSignal, context: Context): Promise<void> {\n for await (const _ of Flux.from(source).iterate(signal, context)) {\n // cleanup values are ignored\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;4BA2uBY,OAAO;;AAxsBnB,IAAa,OAAb,MAAa,KAAkD;;CAK3D,YAAmB,eAAiC;;;;GAHpD;;;EAII,KAAK,gBAAgB;CACzB;;CAGA,OAAc,KAAQ,GAAG,QAA+B;EACpD,IAAI,OAAO,WAAW,GAClB,OAAO,KAAK,MAAS;EAEzB,KAAK,MAAM,SAAS,QAChB,eAAe,OAAO,OAAO;EAEjC,OAAO,KAAK,aAAa,MAAM;CACnC;;CAGA,OAAc,UAAa,QAA+B;EACtD,eAAe,QAAQ,QAAQ;EAC/B,IAAI,OAAO,WAAW,GAClB,OAAO,KAAK,MAAS;EAEzB,OAAO,KAAK,aAAa,MAAM;CACnC;;CAGA,OAAc,WAAc,QAAoD;EAC5E,eAAe,QAAQ,QAAQ;EAC/B,OAAO,OAAO,WAAW,aAAa,KAAK,YAAY,KAAK,aAAc,OAA6B,CAAC,CAAC,IAAI,KAAK,aAAa,MAAM;CACzI;;CAGA,OAAc,aAAgB,QAA8B;EACxD,eAAe,QAAQ,QAAQ;EAC/B,IAAI,MAAM,QAAQ,MAAM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QAAQ,SAAS;EAC9C,MAAM,SAAc,CAAC;EACrB,WAAW,MAAM,SAAS,KAAK,gBAAgB,GAAG,OAAO,CAAC,CAAC,QAAQ,QAAQ,OAAO,GAC9E,OAAO,KAAK,KAAK;EAErB,OAAO,KAAK,UAAU;EACtB,OAAO;CACX,CAAC;AACL;;AAGA,eAAe,eAAe,QAAiC,QAAqB,SAAiC;CACjH,WAAW,MAAM,KAAK,KAAK,KAAK,MAAM,CAAC,CAAC,QAAQ,QAAQ,OAAO;AAGnE"}
|
|
1
|
+
{"version":3,"file":"flux.js","names":[],"sources":["../../src/publisher/flux.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * Flux, Mono and operator implementation modules.\n */\nimport {BooleanDisposable} from \"@/core/boolean-disposable.js\";\nimport {addCap} from \"@/core/demand.js\";\nimport type {Disposable} from \"@/core/types.js\";\nimport {Context} from \"@/context/context.js\";\nimport type {ContextView} from \"@/context/context-view.js\";\nimport {CompositeError} from \"@/errors/classes.js\";\nimport {asError, throwIfNullish} from \"@/errors/helpers.js\";\nimport {firstValueFrom, raceWithAbort} from \"@/internal/abort.js\";\nimport {AsyncQueue} from \"@/internal/async-queue.js\";\nimport {\n closeAsyncIterator,\n EMPTY_ITERABLE,\n type AnyIterable,\n isAsyncIterable,\n isIterable,\n neverIterable,\n toAsyncIterator\n} from \"@/internal/iterable.js\";\nimport {collectIterable, lastIterableValue} from \"@/internal/iterable-terminal.js\";\nimport {mapIterable} from \"@/internal/iterable-transform.js\";\nimport {eventSource, type WebSocketFluxOptions, webSocketSource} from \"@/publisher/browser-sources.js\";\nimport type {Publisher} from \"@/publisher/publisher.js\";\nimport {addCancelCallback, type CancelCallbacks, isSubscriber, runCancelCallbacks, scheduleDelay} from \"@/publisher/helpers.js\";\nimport {IterableSubscription} from \"@/subscription/iterable-subscription.js\";\nimport type {FluxSinkCallback, PublisherInput, SourceFactory} from \"@/publisher/types.js\";\nimport {Schedulers} from \"@/schedulers/schedulers.js\";\nimport type {DurationInput, Scheduler} from \"@/schedulers/types.js\";\nimport type {CoreSubscriber} from \"@/subscription/core-subscriber.js\";\nimport type {Subscriber} from \"@/subscription/subscriber.js\";\nimport type {Subscription} from \"@/subscription/subscription.js\";\n\n/** Multi-value Reactive Streams publisher with Reactor-style operators. */\nexport class Flux<T> implements Publisher<T>, AsyncIterable<T> {\n /** Lazy source factory invoked for each subscription or async iteration. */\n private readonly sourceFactory: SourceFactory<T>;\n\n /** Creates a Flux from a lazy source factory. */\n public constructor(sourceFactory: SourceFactory<T>) {\n this.sourceFactory = sourceFactory;\n }\n\n /** Creates a Flux that emits the provided values and then completes. */\n public static just<T>(...values: readonly T[]): Flux<T> {\n if (values.length === 0) {\n return Flux.empty<T>();\n }\n for (const value of values) {\n throwIfNullish(value, \"value\");\n }\n return Flux.fromIterable(values);\n }\n\n /** Creates a Flux from an array-like readonly value list. */\n public static fromArray<T>(values: readonly T[]): Flux<T> {\n throwIfNullish(values, \"values\");\n if (values.length === 0) {\n return Flux.empty<T>();\n }\n return Flux.fromIterable(values);\n }\n\n /** Creates a Flux from a stream-like iterable or a lazy stream supplier. */\n public static fromStream<T>(stream: Iterable<T> | (() => Iterable<T>)): Flux<T> {\n throwIfNullish(stream, \"stream\");\n return typeof stream === \"function\" ? Flux.defer(() => Flux.fromIterable((stream as () => Iterable<T>)())) : Flux.fromIterable(stream);\n }\n\n /** Creates a Flux from a JavaScript iterable. */\n public static fromIterable<T>(values: Iterable<T>): Flux<T> {\n throwIfNullish(values, \"values\");\n if (Array.isArray(values) && values.length === 0) {\n return Flux.empty<T>();\n }\n return new Flux(() => values);\n }\n\n /** Creates a Flux from browser `Window` events and removes the listener on cancellation. */\n public static fromEvent<K extends keyof WindowEventMap>(\n target: Window,\n type: K,\n options?: boolean | AddEventListenerOptions\n ): Flux<WindowEventMap[K]>;\n /** Creates a Flux from browser `Document` events and removes the listener on cancellation. */\n public static fromEvent<K extends keyof DocumentEventMap>(\n target: Document,\n type: K,\n options?: boolean | AddEventListenerOptions\n ): Flux<DocumentEventMap[K]>;\n /** Creates a Flux from browser `HTMLElement` events and removes the listener on cancellation. */\n public static fromEvent<K extends keyof HTMLElementEventMap>(\n target: HTMLElement,\n type: K,\n options?: boolean | AddEventListenerOptions\n ): Flux<HTMLElementEventMap[K]>;\n /** Creates a Flux from any browser `EventTarget` and removes the listener on cancellation. */\n public static fromEvent<TEvent extends Event = Event>(\n target: EventTarget,\n type: string,\n options?: boolean | AddEventListenerOptions\n ): Flux<TEvent>;\n /** Creates a Flux from browser events and removes the listener on cancellation. */\n public static fromEvent<TEvent extends Event = Event>(\n target: EventTarget,\n type: string,\n options?: boolean | AddEventListenerOptions\n ): Flux<TEvent> {\n return new Flux(eventSource<TEvent>(target, type, options));\n }\n\n /** Creates a Flux from browser WebSocket message events. */\n public static fromWebSocket<T = unknown>(\n url: string | URL,\n options?: string | string[] | WebSocketFluxOptions\n ): Flux<MessageEvent<T>>;\n /** Creates a Flux from browser WebSocket message events. */\n public static fromWebSocket<T = unknown>(\n socket: WebSocket,\n options?: WebSocketFluxOptions\n ): Flux<MessageEvent<T>>;\n /** Creates a Flux from browser WebSocket message events and cleans listeners on cancellation. */\n public static fromWebSocket<T = unknown>(\n input: WebSocket | string | URL,\n options?: string | string[] | WebSocketFluxOptions\n ): Flux<MessageEvent<T>> {\n return new Flux(webSocketSource<T>(input, options));\n }\n\n /** Adapts a publisher, iterable, async iterable or promise-like value to Flux. */\n public static from<T>(input: PublisherInput<T>): Flux<T> {\n throwIfNullish(input, \"input\");\n if (input instanceof Flux) {\n return input;\n }\n if (typeof (input as Publisher<T>).subscribe === \"function\") {\n return fromPublisher(input as Publisher<T>);\n }\n if (isAsyncIterable<T>(input)) {\n return new Flux(() => input);\n }\n if (isIterable<T>(input)) {\n return Flux.fromIterable(input);\n }\n if (typeof (input as PromiseLike<T>).then === \"function\") {\n return new Flux(async function* (signal) {\n const value = await raceWithAbort(Promise.resolve(input as PromiseLike<T>), signal);\n if (value !== undefined && value !== null) {\n yield value;\n }\n });\n }\n throw new TypeError(\"Unsupported publisher input\");\n }\n\n /** Creates a Flux that completes without emitting values. */\n public static empty<T = never>(): Flux<T> {\n return EMPTY_FLUX as Flux<T>;\n }\n\n /** Creates a Flux that never emits or completes until cancelled. */\n public static never<T = never>(): Flux<T> {\n return NEVER_FLUX as Flux<T>;\n }\n\n /** Creates a Flux that terminates with the provided error. */\n public static error<T = never>(error: unknown | (() => unknown)): Flux<T> {\n return new Flux(async function* () {\n throw typeof error === \"function\" ? (error as () => unknown)() : error;\n });\n }\n\n /** Defers source creation until subscription time. */\n public static defer<T>(supplier: () => PublisherInput<T>): Flux<T> {\n return new Flux((signal, context) => Flux.from(supplier()).iterate(signal, context));\n }\n\n /** Defers source creation and exposes the subscriber context. */\n public static deferContextual<T>(supplier: (context: ContextView) => PublisherInput<T>): Flux<T> {\n return new Flux((signal, context) => Flux.from(supplier(context.readOnly())).iterate(signal, context));\n }\n\n /** Creates a Flux by bridging callback-style producers through a sink. */\n public static create<T>(callback: FluxSinkCallback<T>): Flux<T> {\n throwIfNullish(callback, \"callback\");\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n let cancelled = false;\n let cancelCallbacks: CancelCallbacks | undefined;\n const sink = {\n /** Emits one value into the created Flux. */\n next(value: T) {\n throwIfNullish(value, \"value\");\n queue.push(value);\n },\n /** Terminates the created Flux with an error. */\n error(error: unknown) {\n queue.error(error);\n },\n /** Completes the created Flux. */\n complete() {\n queue.complete();\n },\n /** Registers a callback invoked when the subscription is cancelled. */\n onCancel(cancelCallback: () => void) {\n cancelCallbacks = addCancelCallback(cancelCallbacks, cancelCallback);\n return sink;\n },\n /** Returns true after cancellation has been observed. */\n isCancelled() {\n return cancelled || signal.aborted;\n }\n };\n signal.addEventListener(\n \"abort\",\n () => {\n cancelled = true;\n runCancelCallbacks(cancelCallbacks);\n cancelCallbacks = undefined;\n queue.complete();\n },\n {once: true}\n );\n try {\n callback(sink);\n } catch (error) {\n queue.error(error);\n }\n return queue;\n });\n }\n\n /** Creates a Flux by bridging a single-threaded push-style producer through a sink. */\n public static push<T>(callback: FluxSinkCallback<T>): Flux<T> {\n return Flux.create(callback);\n }\n\n /** Creates a Flux by repeatedly invoking a synchronous generator callback. */\n public static generate<T>(generator: (sink: {\n next(value: T): void;\n complete(): void;\n error(error: unknown): void\n }) => void): Flux<T> {\n throwIfNullish(generator, \"generator\");\n return new Flux(async function* (signal) {\n let done = false;\n let hasValue = false;\n let value: T | undefined;\n const sink = {\n /** Emits one generated value for this turn. */\n next(nextValue: T) {\n if (hasValue) {\n throw new Error(\"Synchronous generator can emit at most one value per turn\");\n }\n hasValue = true;\n value = nextValue;\n },\n /** Completes the generated sequence. */\n complete() {\n done = true;\n },\n /** Fails the generated sequence. */\n error(error: unknown) {\n throw error;\n }\n };\n while (!done && !signal.aborted) {\n hasValue = false;\n value = undefined;\n generator(sink);\n if (hasValue) {\n yield value as T;\n } else if (!done) {\n throw new Error(\"Synchronous generator must emit, complete or fail\");\n }\n }\n });\n }\n\n /** Creates a finite integer range. */\n public static range(start: number, count: number): Flux<number> {\n if (!Number.isInteger(start) || !Number.isInteger(count) || count < 0) {\n throw new RangeError(\"Flux.range expects an integer start and a non-negative integer count\");\n }\n if (count === 0) {\n return Flux.empty<number>();\n }\n return new Flux(function* () {\n for (let i = 0; i < count; i += 1) {\n yield start + i;\n }\n });\n }\n\n /** Creates an interval Flux that emits incrementing numbers. */\n public static interval(period: DurationInput, scheduler: Scheduler = Schedulers.timeout()): Flux<number> {\n return new Flux(async function* (signal) {\n let index = 0;\n while (!signal.aborted) {\n await scheduleDelay(scheduler, period, signal);\n if (!signal.aborted) {\n yield index;\n index += 1;\n }\n }\n });\n }\n\n /** Merges several publishers concurrently. */\n public static merge<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n if (sources.length === 1) {\n return Flux.from(sources[0]!);\n }\n return mergeSources(toFluxArray(sources));\n }\n\n /** Merges several publishers concurrently and delays failures until every source terminates. */\n public static mergeDelayError<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n if (sources.length === 1) {\n return Flux.from(sources[0]!);\n }\n return mergeSourcesDelayError(toFluxArray(sources));\n }\n\n /** Merges sources sequentially while subscribing to one source at a time. */\n public static mergeSequential<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n return Flux.concat(...sources);\n }\n\n /** Merges sources sequentially and delays failures until every source has been consumed. */\n public static mergeSequentialDelayError<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n return concatDelayErrorSources(sources);\n }\n\n /** Merges finite sources and emits their values sorted by a comparator. */\n public static mergeComparing<T>(\n comparatorOrSource?: ((left: T, right: T) => number) | PublisherInput<T>,\n ...sources: readonly PublisherInput<T>[]\n ): Flux<T> {\n const {comparator, inputs} = orderedMergeInputs(comparatorOrSource, sources);\n return sortMergedSources(inputs, comparator);\n }\n\n /** Merges finite sources, delays failures and emits their values sorted by a comparator. */\n public static mergeComparingDelayError<T>(\n comparatorOrSource?: ((left: T, right: T) => number) | PublisherInput<T>,\n ...sources: readonly PublisherInput<T>[]\n ): Flux<T> {\n const {comparator, inputs} = orderedMergeInputs(comparatorOrSource, sources);\n return sortMergedSourcesDelayError(inputs, comparator);\n }\n\n /** Merges finite sources and emits their values in comparator order. */\n public static mergeOrdered<T>(\n comparatorOrSource?: ((left: T, right: T) => number) | PublisherInput<T>,\n ...sources: readonly PublisherInput<T>[]\n ): Flux<T> {\n return Flux.mergeComparing(comparatorOrSource, ...sources);\n }\n\n /** Merges finite sources with priority ordering. */\n public static mergePriority<T>(\n comparatorOrSource?: ((left: T, right: T) => number) | PublisherInput<T>,\n ...sources: readonly PublisherInput<T>[]\n ): Flux<T> {\n return Flux.mergeComparing(comparatorOrSource, ...sources);\n }\n\n /** Merges finite sources with priority ordering and delayed failures. */\n public static mergePriorityDelayError<T>(\n comparatorOrSource?: ((left: T, right: T) => number) | PublisherInput<T>,\n ...sources: readonly PublisherInput<T>[]\n ): Flux<T> {\n return Flux.mergeComparingDelayError(comparatorOrSource, ...sources);\n }\n\n /** Concatenates several publishers sequentially. */\n public static concat<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n if (sources.length === 1) {\n return Flux.from(sources[0]!);\n }\n return new Flux(async function* (signal, context) {\n for (const source of sources) {\n for await (const value of Flux.from(source).iterate(signal, context)) {\n if (signal.aborted) {\n return;\n }\n yield value;\n }\n }\n });\n }\n\n /** Concatenates several publishers sequentially and delays failures until every source has been consumed. */\n public static concatDelayError<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n if (sources.length === 1) {\n return Flux.from(sources[0]!);\n }\n return concatDelayErrorSources(sources);\n }\n\n /** Relays the first source that emits any signal. */\n public static first<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n return Flux.firstWithSignal(...sources);\n }\n\n /** Relays the first source that emits any signal. */\n public static firstWithSignal<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n if (sources.length === 1) {\n return Flux.from(sources[0]!);\n }\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n let settled = false;\n for (const source of sources) {\n void (async () => {\n try {\n const iterator = toAsyncIterator(Flux.from(source).iterate(signal, context));\n try {\n const first = await raceWithAbort(iterator.next(), signal);\n if (settled) {\n await iterator.return?.();\n return;\n }\n settled = true;\n if (first.done) {\n queue.complete();\n return;\n }\n queue.push(first.value);\n for (; ;) {\n const next = await raceWithAbort(iterator.next(), signal);\n if (next.done) {\n queue.complete();\n return;\n }\n queue.push(next.value);\n }\n } finally {\n await iterator.return?.();\n }\n } catch (error) {\n if (!settled) {\n settled = true;\n queue.error(error);\n }\n }\n })();\n }\n return queue;\n });\n }\n\n /** Relays the first source that produces a value, ignoring empty completions. */\n public static firstWithValue<T>(...sources: readonly PublisherInput<T>[]): Flux<T> {\n if (sources.length === 0) {\n return Flux.empty<T>();\n }\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n let remaining = sources.length;\n let settled = false;\n const errors: unknown[] = [];\n for (const source of sources) {\n void (async () => {\n try {\n const value = await firstValueFrom(Flux.from(source), signal);\n if (settled) {\n return;\n }\n if (value !== undefined) {\n settled = true;\n queue.push(value);\n queue.complete();\n return;\n }\n } catch (error) {\n errors.push(error);\n }\n remaining -= 1;\n if (remaining === 0 && !settled) {\n errors.length > 0 ? queue.error(new CompositeError(errors)) : queue.complete();\n }\n })();\n }\n return queue;\n });\n }\n\n /** Zips publishers by combining one value from each source. */\n public static zip<T extends readonly unknown[], R = T>(\n sources: { [K in keyof T]: PublisherInput<T[K]> },\n combinator?: (values: T) => R\n ): Flux<R> {\n const sourceCount = sources.length;\n if (sourceCount === 0) {\n return Flux.empty<R>();\n }\n if (sourceCount === 1) {\n return singleTupleSource(sources[0]!, combinator);\n }\n return new Flux(async function* (signal, context) {\n const iterators = new Array<AsyncIterator<unknown>>(sourceCount);\n const nexts = new Array<Promise<IteratorResult<unknown>>>(sourceCount);\n for (let index = 0; index < sourceCount; index += 1) {\n iterators[index] = toAsyncIterator(Flux.from(sources[index]!).iterate(signal, context));\n }\n try {\n while (!signal.aborted) {\n for (let index = 0; index < sourceCount; index += 1) {\n nexts[index] = raceWithAbort(iterators[index]!.next(), signal);\n }\n const results = await Promise.all(nexts);\n const values = new Array<unknown>(sourceCount);\n for (let index = 0; index < sourceCount; index += 1) {\n const result = results[index]!;\n if (result.done) {\n return;\n }\n values[index] = result.value;\n }\n const tuple = values as unknown as T;\n yield combinator ? combinator(tuple) : (tuple as unknown as R);\n }\n } finally {\n for (const iterator of iterators) {\n await closeAsyncIterator(iterator);\n }\n }\n });\n }\n\n /** Combines the latest value from each source after all sources emitted once. */\n public static combineLatest<T extends readonly unknown[], R = T>(\n sources: { [K in keyof T]: PublisherInput<T[K]> },\n combinator?: (values: T) => R\n ): Flux<R> {\n if (sources.length === 0) {\n return Flux.empty<R>();\n }\n if (sources.length === 1) {\n return singleTupleSource(sources[0]!, combinator);\n }\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<R>(signal);\n const sourceCount = sources.length;\n const latest = new Array<unknown>(sourceCount);\n const hasValue = new Array<boolean>(sourceCount);\n let readyCount = 0;\n let completed = 0;\n let failed = false;\n for (let index = 0; index < sourceCount; index += 1) {\n const source = sources[index]!;\n void (async () => {\n try {\n for await (const value of Flux.from(source).iterate(signal, context)) {\n latest[index] = value;\n if (hasValue[index] !== true) {\n hasValue[index] = true;\n readyCount += 1;\n }\n if (readyCount === sourceCount) {\n const values = latest.slice() as unknown as T;\n queue.push(combinator ? combinator(values) : (values as unknown as R));\n }\n }\n completed += 1;\n if (completed === sourceCount && !failed) {\n queue.complete();\n }\n } catch (error) {\n failed = true;\n queue.error(error);\n }\n })();\n }\n return queue;\n });\n }\n\n /** Switches to the most recent publisher emitted by an outer publisher. */\n public static switchOnNext<T>(sources: PublisherInput<PublisherInput<T>>): Flux<T> {\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n let active = 0;\n let outerDone = false;\n let failed = false;\n const completeIfDone = () => {\n if (outerDone && active === 0 && !failed) {\n queue.complete();\n }\n };\n void (async () => {\n const iterator = toAsyncIterator(Flux.from(sources).iterate(signal, context));\n try {\n let version = 0;\n while (!signal.aborted) {\n const next = await raceWithAbort(iterator.next(), signal);\n if (next.done) {\n break;\n }\n version += 1;\n const current = version;\n active += 1;\n void (async () => {\n try {\n for await (const value of Flux.from(next.value).iterate(signal, context)) {\n if (current === version) {\n queue.push(value);\n }\n }\n } catch (error) {\n failed = true;\n queue.error(error);\n } finally {\n active -= 1;\n completeIfDone();\n }\n })();\n }\n outerDone = true;\n completeIfDone();\n } catch (error) {\n failed = true;\n queue.error(error);\n } finally {\n void iterator.return?.();\n }\n })();\n return queue;\n });\n }\n\n /** Uses a resource for the duration of a derived publisher and cleans it up afterwards. */\n public static using<T, D>(\n resourceSupplier: () => D,\n sourceFactory: (resource: D) => PublisherInput<T>,\n resourceCleanup: (resource: D) => void = closeResource as (resource: D) => void\n ): Flux<T> {\n return new Flux(async function* (signal, context) {\n const resource = resourceSupplier();\n try {\n for await (const value of Flux.from(sourceFactory(resource)).iterate(signal, context)) {\n yield value;\n }\n } finally {\n resourceCleanup(resource);\n }\n });\n }\n\n /** Uses an asynchronously supplied resource and runs asynchronous cleanup publishers. */\n public static usingWhen<T, D>(\n resourceSupplier: PublisherInput<D>,\n sourceFactory: (resource: D) => PublisherInput<T>,\n asyncComplete?: (resource: D) => PublisherInput<unknown>,\n asyncError?: (resource: D, error: unknown) => PublisherInput<unknown>,\n asyncCancel?: (resource: D) => PublisherInput<unknown>\n ): Flux<T> {\n return new Flux(async function* (signal, context) {\n const resource = await firstValueFrom(Flux.from(resourceSupplier), signal);\n if (resource === undefined) {\n return;\n }\n let failed: unknown;\n try {\n for await (const value of Flux.from(sourceFactory(resource)).iterate(signal, context)) {\n yield value;\n }\n } catch (error) {\n failed = error;\n if (asyncError) {\n await drainPublisher(asyncError(resource, error), new AbortController().signal, context);\n }\n throw error;\n } finally {\n if (signal.aborted && asyncCancel) {\n await drainPublisher(asyncCancel(resource), new AbortController().signal, context);\n } else if (failed === undefined && asyncComplete) {\n await drainPublisher(asyncComplete(resource), new AbortController().signal, context);\n }\n }\n });\n }\n\n /** Subscribes a full Reactive Streams subscriber. */\n public subscribe(subscriber: Subscriber<T>): void;\n /** Subscribes callbacks and requests unbounded demand. */\n public subscribe(onNext?: (value: T) => void, onError?: (error: unknown) => void, onComplete?: () => void): Disposable;\n /** Subscribes either a full subscriber or callback handlers. */\n public subscribe(\n subscriberOrNext?: Subscriber<T> | ((value: T) => void),\n onError: (error: unknown) => void = throwUnhandledSubscriberError,\n onComplete: () => void = noopSubscriberCallback\n ): void | Disposable {\n if (isSubscriber<T>(subscriberOrNext)) {\n this.subscribeActual(subscriberOrNext);\n return;\n }\n\n let subscription: Subscription | undefined;\n const disposable = new BooleanDisposable(() => subscription?.cancel());\n const subscriber: Subscriber<T> = {\n /** Stores the subscription and requests unbounded demand. */\n onSubscribe(nextSubscription) {\n subscription = nextSubscription;\n nextSubscription.request(Number.POSITIVE_INFINITY);\n },\n onNext: subscriberOrNext ?? noopSubscriberCallback,\n onError,\n onComplete\n };\n this.subscribeActual(subscriber);\n return disposable;\n }\n\n /** Subscribes a normalized Reactive Streams subscriber to this Flux. */\n protected subscribeActual(subscriber: Subscriber<T>): void {\n const context = (subscriber as CoreSubscriber<T>).currentContext?.() ?? Context.empty();\n const subscription = new IterableSubscription(this, subscriber, context);\n subscription.start();\n subscriber.onSubscribe(subscription);\n subscription.deliverStartFailure();\n }\n\n /** Returns the lazy iterable backing this Flux for internal operator composition. */\n public iterate(signal: AbortSignal, context: Context = Context.empty()): AnyIterable<T> {\n return this.sourceFactory(signal, context);\n }\n\n /** Returns an async iterator over this Flux. */\n public [Symbol.asyncIterator](): AsyncIterator<T> {\n const controller = new AbortController();\n const iterator = toAsyncIterator(this.iterate(controller.signal, Context.empty()));\n return {\n next: () => iterator.next(),\n return: async value => {\n controller.abort();\n if (iterator.return) {\n await iterator.return(value);\n }\n return {done: true, value: value as T};\n },\n throw: async error => {\n controller.abort();\n if (iterator.throw) {\n return iterator.throw(error);\n }\n throw error;\n }\n };\n }\n\n /** Returns this Flux as an async iterable. */\n public toIterable(): AsyncIterable<T> {\n return this;\n }\n\n /** Collects all values into an array. */\n public async toArray(): Promise<T[]> {\n return collectIterable(this.iterate(new AbortController().signal, Context.empty()));\n }\n\n /** Resolves to the last emitted value, or undefined for an empty source. */\n public async toPromise(): Promise<T | undefined> {\n return lastIterableValue(this.iterate(new AbortController().signal, Context.empty()));\n }\n}\n\n/** Shared stateless empty Flux instance. */\nconst EMPTY_FLUX = new Flux<never>(() => EMPTY_ITERABLE);\n\n/** Shared stateless never Flux instance. */\nconst NEVER_FLUX = new Flux<never>(signal => neverIterable(signal));\n\n/** Default cleanup for resources that expose a close method. */\nfunction closeResource(resource: unknown): void {\n (resource as { close?: () => void }).close?.();\n}\n\n/** Shared no-op subscriber callback. */\nfunction noopSubscriberCallback(): void {\n // no-op\n}\n\n/** Throws unhandled subscriber errors like the default callback contract. */\nfunction throwUnhandledSubscriberError(error: unknown): never {\n throw asError(error);\n}\n\n/** Adapts a Reactive Streams publisher to the Flux async-iteration model. */\nfunction fromPublisher<T>(publisher: Publisher<T>): Flux<T> {\n return new PublisherFlux(publisher);\n}\n\n/** Flux adapter that keeps Reactive Streams subscriptions on their native demand path. */\nclass PublisherFlux<T> extends Flux<T> {\n /** Creates a direct Flux adapter for a Reactive Streams publisher. */\n public constructor(private readonly publisher: Publisher<T>) {\n super(signal => publisherAsyncIterable(publisher, signal));\n }\n\n /** Subscribes directly so request amounts are not converted to iterator pulls. */\n protected override subscribeActual(subscriber: Subscriber<T>): void {\n this.publisher.subscribe(subscriber);\n }\n}\n\n/** Adapts a publisher to pull-based async iteration without requesting it unboundedly. */\nfunction publisherAsyncIterable<T>(publisher: Publisher<T>, signal: AbortSignal): AsyncIterable<T> {\n return {\n /** Creates one pull-based iterator and its dedicated publisher subscription. */\n [Symbol.asyncIterator]() {\n const queue = new AsyncQueue<T>();\n let subscription: Subscription | undefined;\n let pendingDemand = 0;\n let terminated = signal.aborted;\n\n const cleanup = () => signal.removeEventListener(\"abort\", cancel);\n const cancel = () => {\n if (terminated) {\n return;\n }\n terminated = true;\n cleanup();\n subscription?.cancel();\n void queue.return();\n };\n\n if (terminated) {\n queue.complete();\n } else {\n signal.addEventListener(\"abort\", cancel, {once: true});\n try {\n publisher.subscribe({\n /** Stores the upstream and drains any pulls made before onSubscribe. */\n onSubscribe(nextSubscription) {\n if (subscription || terminated) {\n nextSubscription.cancel();\n return;\n }\n subscription = nextSubscription;\n if (pendingDemand > 0) {\n const request = pendingDemand;\n pendingDemand = 0;\n nextSubscription.request(request);\n }\n },\n /** Queues one publisher value for an async iterator pull. */\n onNext(value) {\n queue.push(value);\n },\n /** Propagates the terminal publisher error to the iterator. */\n onError(error) {\n if (terminated) {\n return;\n }\n terminated = true;\n cleanup();\n queue.error(error);\n },\n /** Completes the iterator when the publisher completes. */\n onComplete() {\n if (terminated) {\n return;\n }\n terminated = true;\n cleanup();\n queue.complete();\n }\n });\n } catch (error) {\n terminated = true;\n cleanup();\n queue.error(error);\n }\n }\n\n return {\n /** Requests exactly one upstream item for one iterator pull. */\n next() {\n if (!terminated) {\n if (subscription) {\n subscription.request(1);\n } else {\n pendingDemand = addCap(pendingDemand, 1);\n }\n }\n return queue.next();\n },\n /** Cancels upstream when iteration stops early. */\n return() {\n cancel();\n return queue.return();\n },\n /** Cancels upstream and rejects the iterator with the supplied error. */\n throw(error?: unknown) {\n cancel();\n return Promise.reject(error);\n }\n };\n }\n };\n}\n\n/** Adapts publisher inputs to Flux instances without callback allocation. */\nfunction toFluxArray<T>(sources: readonly PublisherInput<T>[]): Flux<T>[] {\n const fluxes = new Array<Flux<T>>(sources.length);\n for (let index = 0; index < sources.length; index += 1) {\n fluxes[index] = Flux.from(sources[index]!);\n }\n return fluxes;\n}\n\n/** Emits one-element tuple values without multi-source coordination overhead. */\nfunction singleTupleSource<T extends readonly unknown[], R>(\n source: PublisherInput<T[0]>,\n combinator: ((values: T) => R) | undefined\n): Flux<R> {\n return new Flux((signal, context) =>\n mapIterable(Flux.from(source).iterate(signal, context), value => {\n const tuple = [value] as unknown as T;\n return combinator ? combinator(tuple) : (tuple as unknown as R);\n })\n );\n}\n\n/** Merges sources concurrently without bounded-concurrency bookkeeping. */\nfunction mergeSources<T>(sources: readonly Flux<T>[]): Flux<T> {\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n const tasks = new Array<Promise<void>>(sources.length);\n let failed = false;\n void (async () => {\n try {\n for (let index = 0; index < sources.length; index += 1) {\n tasks[index] = drainMergedSource(sources[index]!, signal, context, queue, () => {\n failed = true;\n });\n }\n await Promise.all(tasks);\n if (!failed) {\n queue.complete();\n }\n } catch (error) {\n queue.error(error);\n }\n })();\n return queue;\n });\n}\n\n/** Merges sources concurrently and collects failures until all active sources terminate. */\nfunction mergeSourcesDelayError<T>(sources: readonly Flux<T>[]): Flux<T> {\n return new Flux((signal, context) => {\n const queue = new AsyncQueue<T>(signal);\n const tasks = new Array<Promise<void>>(sources.length);\n const errors: unknown[] = [];\n void (async () => {\n try {\n for (let index = 0; index < sources.length; index += 1) {\n tasks[index] = drainMergedSourceDelayError(sources[index]!, signal, context, queue, errors);\n }\n await Promise.all(tasks);\n errors.length > 0 ? queue.error(new CompositeError(errors)) : queue.complete();\n } catch (error) {\n queue.error(error);\n }\n })();\n return queue;\n });\n}\n\n/** Drains one merged source and reports its first failure through the output queue. */\nasync function drainMergedSource<T>(\n source: Flux<T>,\n signal: AbortSignal,\n context: Context,\n queue: AsyncQueue<T>,\n markFailed: () => void\n): Promise<void> {\n try {\n for await (const value of source.iterate(signal, context)) {\n queue.push(value);\n }\n } catch (error) {\n markFailed();\n queue.error(error);\n }\n}\n\n/** Drains one merged source while recording failures for delayed-error merging. */\nasync function drainMergedSourceDelayError<T>(\n source: Flux<T>,\n signal: AbortSignal,\n context: Context,\n queue: AsyncQueue<T>,\n errors: unknown[]\n): Promise<void> {\n try {\n for await (const value of source.iterate(signal, context)) {\n queue.push(value);\n }\n } catch (error) {\n errors.push(error);\n }\n}\n\n/** Concatenates sources while collecting failures until all sources have run. */\nfunction concatDelayErrorSources<T>(sources: readonly PublisherInput<T>[]): Flux<T> {\n return new Flux(async function* (signal, context) {\n const errors: unknown[] = [];\n for (const source of sources) {\n try {\n for await (const value of Flux.from(source).iterate(signal, context)) {\n yield value;\n }\n } catch (error) {\n errors.push(error);\n }\n }\n if (errors.length > 0) {\n throw new CompositeError(errors);\n }\n });\n}\n\n/** Normalizes ordered merge arguments into a comparator and source list. */\nfunction orderedMergeInputs<T>(\n comparatorOrSource: ((left: T, right: T) => number) | PublisherInput<T> | undefined,\n sources: readonly PublisherInput<T>[]\n): { comparator: ((left: T, right: T) => number) | undefined; inputs: readonly PublisherInput<T>[] } {\n if (typeof comparatorOrSource === \"function\") {\n return {comparator: comparatorOrSource as (left: T, right: T) => number, inputs: sources};\n }\n return {\n comparator: undefined,\n inputs: comparatorOrSource === undefined ? sources : [comparatorOrSource, ...sources]\n };\n}\n\n/** Collects finite merged values and emits them sorted by the optional comparator. */\nfunction sortMergedSources<T>(sources: readonly PublisherInput<T>[], comparator?: (left: T, right: T) => number): Flux<T> {\n return new Flux(async function* (signal, context) {\n const values: T[] = [];\n for await (const value of Flux.merge(...sources).iterate(signal, context)) {\n values.push(value);\n }\n values.sort(comparator);\n yield* values;\n });\n}\n\n/** Collects finite merged values with delayed errors and emits them sorted by the optional comparator. */\nfunction sortMergedSourcesDelayError<T>(\n sources: readonly PublisherInput<T>[],\n comparator?: (left: T, right: T) => number\n): Flux<T> {\n return new Flux(async function* (signal, context) {\n const values: T[] = [];\n for await (const value of Flux.mergeDelayError(...sources).iterate(signal, context)) {\n values.push(value);\n }\n values.sort(comparator);\n yield* values;\n });\n}\n\n/** Consumes a cleanup publisher and ignores all emitted values. */\nasync function drainPublisher(source: PublisherInput<unknown>, signal: AbortSignal, context: Context): Promise<void> {\n for await (const _ of Flux.from(source).iterate(signal, context)) {\n // cleanup values are ignored\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;4BA4uBY,OAAO;;AAxsBnB,IAAa,OAAb,MAAa,KAAkD;;CAK3D,YAAmB,eAAiC;;;;GAHpD;;;EAII,KAAK,gBAAgB;CACzB;;CAGA,OAAc,KAAQ,GAAG,QAA+B;EACpD,IAAI,OAAO,WAAW,GAClB,OAAO,KAAK,MAAS;EAEzB,KAAK,MAAM,SAAS,QAChB,eAAe,OAAO,OAAO;EAEjC,OAAO,KAAK,aAAa,MAAM;CACnC;;CAGA,OAAc,UAAa,QAA+B;EACtD,eAAe,QAAQ,QAAQ;EAC/B,IAAI,OAAO,WAAW,GAClB,OAAO,KAAK,MAAS;E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O,KAAK,UAAU;EACtB,OAAO;CACX,CAAC;AACL;;AAGA,SAAS,4BACL,SACA,YACO;CACP,OAAO,IAAI,KAAK,iBAAiB,QAAQ,SAAS;EAC9C,MAAM,SAAc,CAAC;EACrB,WAAW,MAAM,SAAS,KAAK,gBAAgB,GAAG,OAAO,CAAC,CAAC,QAAQ,QAAQ,OAAO,GAC9E,OAAO,KAAK,KAAK;EAErB,OAAO,KAAK,UAAU;EACtB,OAAO;CACX,CAAC;AACL;;AAGA,eAAe,eAAe,QAAiC,QAAqB,SAAiC;CACjH,WAAW,MAAM,KAAK,KAAK,KAAK,MAAM,CAAC,CAAC,QAAQ,QAAQ,OAAO;AAGnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/publisher/operators/lifecycle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/publisher/operators/lifecycle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAItD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEzD,OAAO,KAAK,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAEjE,+EAA+E;AAC/E,MAAM,WAAW,eAAe,CAAC,CAAC;IAC9B,mCAAmC;IACnC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAEx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