@mearie/core 0.6.5 → 0.6.6
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/dist/{make-C7I1YIXm.mjs → from-abort-signal-ClRa7iWd.mjs} +26 -2
- package/dist/{make-BhxZYW3l.d.cts → from-abort-signal-CsSc5Ee6.d.cts} +10 -1
- package/dist/{make-DxW2Pxe-.cjs → from-abort-signal-CtLzHe8K.cjs} +31 -1
- package/dist/{make-Ve8TkMHJ.d.mts → from-abort-signal-ZiBY-b44.d.mts} +10 -1
- package/dist/index.cjs +80 -62
- package/dist/index.d.cts +6 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +25 -7
- package/dist/stream/index.cjs +26 -25
- package/dist/stream/index.d.cts +2 -2
- package/dist/stream/index.d.mts +2 -2
- package/dist/stream/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -400,9 +400,9 @@ const takeUntil = (notifier) => {
|
|
|
400
400
|
const complete = () => {
|
|
401
401
|
if (completed) return;
|
|
402
402
|
completed = true;
|
|
403
|
-
if (sourceSubscription) sourceSubscription.unsubscribe();
|
|
404
403
|
if (notifierSubscription) notifierSubscription.unsubscribe();
|
|
405
404
|
sink.complete();
|
|
405
|
+
if (sourceSubscription) sourceSubscription.unsubscribe();
|
|
406
406
|
};
|
|
407
407
|
notifierSubscription = notifier({
|
|
408
408
|
next() {
|
|
@@ -709,4 +709,28 @@ const make = (subscriber) => {
|
|
|
709
709
|
};
|
|
710
710
|
|
|
711
711
|
//#endregion
|
|
712
|
-
|
|
712
|
+
//#region src/stream/sources/from-abort-signal.ts
|
|
713
|
+
/**
|
|
714
|
+
* Creates a source that emits when the given AbortSignal is aborted.
|
|
715
|
+
* If the signal is already aborted, emits immediately.
|
|
716
|
+
* @param signal - The AbortSignal to observe.
|
|
717
|
+
* @returns A Source that emits once when the signal aborts.
|
|
718
|
+
*/
|
|
719
|
+
const fromAbortSignal = (signal) => {
|
|
720
|
+
return make(({ next, complete }) => {
|
|
721
|
+
if (signal.aborted) {
|
|
722
|
+
next(void 0);
|
|
723
|
+
complete();
|
|
724
|
+
return () => {};
|
|
725
|
+
}
|
|
726
|
+
const handler = () => {
|
|
727
|
+
next(void 0);
|
|
728
|
+
complete();
|
|
729
|
+
};
|
|
730
|
+
signal.addEventListener("abort", handler);
|
|
731
|
+
return () => signal.removeEventListener("abort", handler);
|
|
732
|
+
});
|
|
733
|
+
};
|
|
734
|
+
|
|
735
|
+
//#endregion
|
|
736
|
+
export { filter as C, fromPromise as S, pipe as T, subscribe as _, fromValue as a, tap as b, switchMap as c, take as d, map as f, publish as g, collect as h, makeSubject as i, share as l, collectAll as m, make as n, finalize as o, peek as p, fromSubscription as r, initialize as s, fromAbortSignal as t, takeUntil as u, compose as v, mergeMap as w, merge as x, fromArray as y };
|
|
@@ -402,4 +402,13 @@ declare const make: <T>(subscriber: (observer: {
|
|
|
402
402
|
complete: () => void;
|
|
403
403
|
}) => () => void) => Source<T>;
|
|
404
404
|
//#endregion
|
|
405
|
-
|
|
405
|
+
//#region src/stream/sources/from-abort-signal.d.ts
|
|
406
|
+
/**
|
|
407
|
+
* Creates a source that emits when the given AbortSignal is aborted.
|
|
408
|
+
* If the signal is already aborted, emits immediately.
|
|
409
|
+
* @param signal - The AbortSignal to observe.
|
|
410
|
+
* @returns A Source that emits once when the signal aborts.
|
|
411
|
+
*/
|
|
412
|
+
declare const fromAbortSignal: (signal: AbortSignal) => Source<void>;
|
|
413
|
+
//#endregion
|
|
414
|
+
export { Source as A, publish as C, pipe as D, compose as E, Operator as O, collect as S, subscribe as T, take as _, Subject as a, peek as b, fromValue as c, tap as d, switchMap as f, takeUntil as g, share as h, fromSubscription as i, Subscription as j, Sink as k, finalize as l, merge as m, make as n, makeSubject as o, mergeMap as p, fromPromise as r, fromArray as s, fromAbortSignal as t, initialize as u, filter as v, Observer as w, collectAll as x, map as y };
|
|
@@ -401,9 +401,9 @@ const takeUntil = (notifier) => {
|
|
|
401
401
|
const complete = () => {
|
|
402
402
|
if (completed) return;
|
|
403
403
|
completed = true;
|
|
404
|
-
if (sourceSubscription) sourceSubscription.unsubscribe();
|
|
405
404
|
if (notifierSubscription) notifierSubscription.unsubscribe();
|
|
406
405
|
sink.complete();
|
|
406
|
+
if (sourceSubscription) sourceSubscription.unsubscribe();
|
|
407
407
|
};
|
|
408
408
|
notifierSubscription = notifier({
|
|
409
409
|
next() {
|
|
@@ -709,6 +709,30 @@ const make = (subscriber) => {
|
|
|
709
709
|
};
|
|
710
710
|
};
|
|
711
711
|
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region src/stream/sources/from-abort-signal.ts
|
|
714
|
+
/**
|
|
715
|
+
* Creates a source that emits when the given AbortSignal is aborted.
|
|
716
|
+
* If the signal is already aborted, emits immediately.
|
|
717
|
+
* @param signal - The AbortSignal to observe.
|
|
718
|
+
* @returns A Source that emits once when the signal aborts.
|
|
719
|
+
*/
|
|
720
|
+
const fromAbortSignal = (signal) => {
|
|
721
|
+
return make(({ next, complete }) => {
|
|
722
|
+
if (signal.aborted) {
|
|
723
|
+
next(void 0);
|
|
724
|
+
complete();
|
|
725
|
+
return () => {};
|
|
726
|
+
}
|
|
727
|
+
const handler = () => {
|
|
728
|
+
next(void 0);
|
|
729
|
+
complete();
|
|
730
|
+
};
|
|
731
|
+
signal.addEventListener("abort", handler);
|
|
732
|
+
return () => signal.removeEventListener("abort", handler);
|
|
733
|
+
});
|
|
734
|
+
};
|
|
735
|
+
|
|
712
736
|
//#endregion
|
|
713
737
|
Object.defineProperty(exports, 'collect', {
|
|
714
738
|
enumerable: true,
|
|
@@ -740,6 +764,12 @@ Object.defineProperty(exports, 'finalize', {
|
|
|
740
764
|
return finalize;
|
|
741
765
|
}
|
|
742
766
|
});
|
|
767
|
+
Object.defineProperty(exports, 'fromAbortSignal', {
|
|
768
|
+
enumerable: true,
|
|
769
|
+
get: function () {
|
|
770
|
+
return fromAbortSignal;
|
|
771
|
+
}
|
|
772
|
+
});
|
|
743
773
|
Object.defineProperty(exports, 'fromArray', {
|
|
744
774
|
enumerable: true,
|
|
745
775
|
get: function () {
|
|
@@ -402,4 +402,13 @@ declare const make: <T>(subscriber: (observer: {
|
|
|
402
402
|
complete: () => void;
|
|
403
403
|
}) => () => void) => Source<T>;
|
|
404
404
|
//#endregion
|
|
405
|
-
|
|
405
|
+
//#region src/stream/sources/from-abort-signal.d.ts
|
|
406
|
+
/**
|
|
407
|
+
* Creates a source that emits when the given AbortSignal is aborted.
|
|
408
|
+
* If the signal is already aborted, emits immediately.
|
|
409
|
+
* @param signal - The AbortSignal to observe.
|
|
410
|
+
* @returns A Source that emits once when the signal aborts.
|
|
411
|
+
*/
|
|
412
|
+
declare const fromAbortSignal: (signal: AbortSignal) => Source<void>;
|
|
413
|
+
//#endregion
|
|
414
|
+
export { Source as A, publish as C, pipe as D, compose as E, Operator as O, collect as S, subscribe as T, take as _, Subject as a, peek as b, fromValue as c, tap as d, switchMap as f, takeUntil as g, share as h, fromSubscription as i, Subscription as j, Sink as k, finalize as l, merge as m, make as n, makeSubject as o, mergeMap as p, fromPromise as r, fromArray as s, fromAbortSignal as t, initialize as u, filter as v, Observer as w, collectAll as x, map as y };
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
2
|
+
const require_from_abort_signal = require('./from-abort-signal-CtLzHe8K.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/errors.ts
|
|
5
5
|
/**
|
|
@@ -143,11 +143,11 @@ const httpExchange = (options) => {
|
|
|
143
143
|
name: "http",
|
|
144
144
|
io: (ops$) => {
|
|
145
145
|
const inflight = /* @__PURE__ */ new Map();
|
|
146
|
-
return
|
|
146
|
+
return require_from_abort_signal.merge(require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "request" && (op.artifact.kind === "query" || op.artifact.kind === "mutation")), require_from_abort_signal.mergeMap((op) => {
|
|
147
147
|
inflight.get(op.key)?.abort();
|
|
148
148
|
const controller = new AbortController();
|
|
149
149
|
inflight.set(op.key, controller);
|
|
150
|
-
return
|
|
150
|
+
return require_from_abort_signal.fromPromise(executeFetch({
|
|
151
151
|
url,
|
|
152
152
|
fetchFn,
|
|
153
153
|
fetchOptions: {
|
|
@@ -161,7 +161,7 @@ const httpExchange = (options) => {
|
|
|
161
161
|
inflight.delete(op.key);
|
|
162
162
|
return result;
|
|
163
163
|
}));
|
|
164
|
-
}),
|
|
164
|
+
}), require_from_abort_signal.filter((result) => result !== null)), require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "teardown" || op.variant === "request" && (op.artifact.kind === "subscription" || op.artifact.kind === "fragment")), require_from_abort_signal.tap((op) => {
|
|
165
165
|
if (op.variant === "teardown") {
|
|
166
166
|
inflight.get(op.key)?.abort();
|
|
167
167
|
inflight.delete(op.key);
|
|
@@ -265,17 +265,17 @@ const dedupExchange = () => {
|
|
|
265
265
|
io: (ops$) => {
|
|
266
266
|
const operations = /* @__PURE__ */ new Map();
|
|
267
267
|
const resolved = /* @__PURE__ */ new Set();
|
|
268
|
-
return
|
|
268
|
+
return require_from_abort_signal.pipe(require_from_abort_signal.merge(require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "request" && (op.artifact.kind === "mutation" || op.artifact.kind === "fragment"))), require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "request" && op.artifact.kind !== "mutation" && op.artifact.kind !== "fragment"), require_from_abort_signal.filter((op) => {
|
|
269
269
|
const dedupKey = makeDedupKey(op);
|
|
270
270
|
const isInflight = operations.has(dedupKey) && !resolved.has(dedupKey);
|
|
271
271
|
if (isInflight) operations.get(dedupKey).add(op.key);
|
|
272
272
|
else operations.set(dedupKey, new Set([op.key]));
|
|
273
273
|
if (!isInflight) resolved.delete(dedupKey);
|
|
274
274
|
return (op.metadata.dedup?.skip ?? false) || !isInflight;
|
|
275
|
-
}), delay(0),
|
|
275
|
+
}), delay(0), require_from_abort_signal.filter((op) => {
|
|
276
276
|
const dedupKey = makeDedupKey(op);
|
|
277
277
|
return operations.get(dedupKey)?.has(op.key) ?? false;
|
|
278
|
-
})),
|
|
278
|
+
})), require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "teardown"), require_from_abort_signal.filter((teardown) => {
|
|
279
279
|
for (const [dedupKey, subs] of operations.entries()) if (subs.delete(teardown.key)) {
|
|
280
280
|
if (subs.size === 0) {
|
|
281
281
|
operations.delete(dedupKey);
|
|
@@ -285,11 +285,11 @@ const dedupExchange = () => {
|
|
|
285
285
|
return false;
|
|
286
286
|
}
|
|
287
287
|
return true;
|
|
288
|
-
}))), forward,
|
|
289
|
-
if (result.operation.variant !== "request" || result.operation.artifact.kind === "mutation" || result.operation.artifact.kind === "fragment") return
|
|
288
|
+
}))), forward, require_from_abort_signal.mergeMap((result) => {
|
|
289
|
+
if (result.operation.variant !== "request" || result.operation.artifact.kind === "mutation" || result.operation.artifact.kind === "fragment") return require_from_abort_signal.fromValue(result);
|
|
290
290
|
const dedupKey = makeDedupKey(result.operation);
|
|
291
291
|
resolved.add(dedupKey);
|
|
292
|
-
return
|
|
292
|
+
return require_from_abort_signal.fromArray([...operations.get(dedupKey) ?? /* @__PURE__ */ new Set()].map((key) => ({
|
|
293
293
|
...result,
|
|
294
294
|
operation: {
|
|
295
295
|
...result.operation,
|
|
@@ -1729,15 +1729,15 @@ const cacheExchange = (options = {}) => {
|
|
|
1729
1729
|
},
|
|
1730
1730
|
io: (ops$) => {
|
|
1731
1731
|
const subscriptionHasData = /* @__PURE__ */ new Map();
|
|
1732
|
-
const refetch$ =
|
|
1733
|
-
const fragment$ =
|
|
1732
|
+
const refetch$ = require_from_abort_signal.makeSubject();
|
|
1733
|
+
const fragment$ = require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "request" && op.artifact.kind === "fragment"), require_from_abort_signal.mergeMap((op) => {
|
|
1734
1734
|
const fragmentRef = op.metadata?.fragment?.ref;
|
|
1735
|
-
if (!fragmentRef) return
|
|
1735
|
+
if (!fragmentRef) return require_from_abort_signal.fromValue({
|
|
1736
1736
|
operation: op,
|
|
1737
1737
|
errors: [new ExchangeError("Fragment operation missing fragment.ref in metadata. This usually happens when the wrong fragment reference was passed.", { exchangeName: "cache" })]
|
|
1738
1738
|
});
|
|
1739
1739
|
if (isFragmentRefArray(fragmentRef)) {
|
|
1740
|
-
const results =
|
|
1740
|
+
const results = require_from_abort_signal.makeSubject();
|
|
1741
1741
|
const unsubscribes = [];
|
|
1742
1742
|
for (const [index, ref] of fragmentRef.entries()) {
|
|
1743
1743
|
const listener = (notification) => {
|
|
@@ -1765,23 +1765,23 @@ const cacheExchange = (options = {}) => {
|
|
|
1765
1765
|
unsubscribes.push(unsubscribe);
|
|
1766
1766
|
}
|
|
1767
1767
|
const { data: initialData, stale: initialStale } = cache.readFragments(op.artifact, fragmentRef);
|
|
1768
|
-
const teardown$ =
|
|
1768
|
+
const teardown$ = require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((operation) => operation.variant === "teardown" && operation.key === op.key), require_from_abort_signal.tap(() => {
|
|
1769
1769
|
for (const unsub of unsubscribes) unsub();
|
|
1770
1770
|
results.complete();
|
|
1771
1771
|
}));
|
|
1772
|
-
return
|
|
1772
|
+
return require_from_abort_signal.pipe(require_from_abort_signal.merge(require_from_abort_signal.fromValue({
|
|
1773
1773
|
operation: op,
|
|
1774
1774
|
data: initialData,
|
|
1775
1775
|
...initialStale && { metadata: { cache: { stale: true } } },
|
|
1776
1776
|
errors: []
|
|
1777
|
-
}), results.source),
|
|
1777
|
+
}), results.source), require_from_abort_signal.takeUntil(teardown$));
|
|
1778
1778
|
}
|
|
1779
|
-
if (!isFragmentRef(fragmentRef)) return
|
|
1779
|
+
if (!isFragmentRef(fragmentRef)) return require_from_abort_signal.fromValue({
|
|
1780
1780
|
operation: op,
|
|
1781
1781
|
data: fragmentRef,
|
|
1782
1782
|
errors: []
|
|
1783
1783
|
});
|
|
1784
|
-
const results =
|
|
1784
|
+
const results = require_from_abort_signal.makeSubject();
|
|
1785
1785
|
const listener = (notification) => {
|
|
1786
1786
|
if (notification.type === "patch") results.next({
|
|
1787
1787
|
operation: op,
|
|
@@ -1799,23 +1799,23 @@ const cacheExchange = (options = {}) => {
|
|
|
1799
1799
|
}
|
|
1800
1800
|
};
|
|
1801
1801
|
const { data, stale, unsubscribe } = cache.subscribeFragment(op.artifact, fragmentRef, listener);
|
|
1802
|
-
const teardown$ =
|
|
1802
|
+
const teardown$ = require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((operation) => operation.variant === "teardown" && operation.key === op.key), require_from_abort_signal.tap(() => {
|
|
1803
1803
|
unsubscribe();
|
|
1804
1804
|
results.complete();
|
|
1805
1805
|
}));
|
|
1806
|
-
return
|
|
1806
|
+
return require_from_abort_signal.pipe(require_from_abort_signal.merge(data === null ? empty() : require_from_abort_signal.fromValue({
|
|
1807
1807
|
operation: op,
|
|
1808
1808
|
data,
|
|
1809
1809
|
...stale && { metadata: { cache: { stale: true } } },
|
|
1810
1810
|
errors: []
|
|
1811
|
-
}), results.source),
|
|
1811
|
+
}), results.source), require_from_abort_signal.takeUntil(teardown$));
|
|
1812
1812
|
}));
|
|
1813
|
-
const nonCache$ =
|
|
1813
|
+
const nonCache$ = require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "request" && (op.artifact.kind === "mutation" || op.artifact.kind === "subscription" || op.artifact.kind === "query" && fetchPolicy === "network-only")), require_from_abort_signal.tap((op) => {
|
|
1814
1814
|
if (op.artifact.kind === "mutation" && op.metadata?.cache?.optimisticResponse) cache.writeOptimistic(op.key, op.artifact, op.variables, op.metadata.cache.optimisticResponse);
|
|
1815
1815
|
}));
|
|
1816
|
-
const query$ =
|
|
1817
|
-
return
|
|
1818
|
-
const results =
|
|
1816
|
+
const query$ = require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "request" && op.artifact.kind === "query" && fetchPolicy !== "network-only"), require_from_abort_signal.share());
|
|
1817
|
+
return require_from_abort_signal.merge(fragment$, require_from_abort_signal.pipe(query$, require_from_abort_signal.mergeMap((op) => {
|
|
1818
|
+
const results = require_from_abort_signal.makeSubject();
|
|
1819
1819
|
const listener = (notification) => {
|
|
1820
1820
|
if (notification.type === "patch") {
|
|
1821
1821
|
if (!subscriptionHasData.get(op.key)) return;
|
|
@@ -1839,34 +1839,34 @@ const cacheExchange = (options = {}) => {
|
|
|
1839
1839
|
};
|
|
1840
1840
|
const { data, stale, unsubscribe } = cache.subscribeQuery(op.artifact, op.variables, listener);
|
|
1841
1841
|
subscriptionHasData.set(op.key, data !== null);
|
|
1842
|
-
const teardown$ =
|
|
1842
|
+
const teardown$ = require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((o) => o.variant === "teardown" && o.key === op.key), require_from_abort_signal.tap(() => {
|
|
1843
1843
|
unsubscribe();
|
|
1844
1844
|
subscriptionHasData.delete(op.key);
|
|
1845
1845
|
results.complete();
|
|
1846
1846
|
}));
|
|
1847
|
-
const stream$ =
|
|
1847
|
+
const stream$ = require_from_abort_signal.pipe(require_from_abort_signal.merge(data === null ? fetchPolicy === "cache-only" ? require_from_abort_signal.fromValue({
|
|
1848
1848
|
operation: op,
|
|
1849
1849
|
data: null,
|
|
1850
1850
|
errors: []
|
|
1851
|
-
}) : empty() :
|
|
1851
|
+
}) : empty() : require_from_abort_signal.fromValue({
|
|
1852
1852
|
operation: op,
|
|
1853
1853
|
data,
|
|
1854
1854
|
...stale && { metadata: { cache: { stale: true } } },
|
|
1855
1855
|
errors: []
|
|
1856
|
-
}), results.source),
|
|
1856
|
+
}), results.source), require_from_abort_signal.takeUntil(teardown$));
|
|
1857
1857
|
if (stale) refetch$.next(op);
|
|
1858
1858
|
return stream$;
|
|
1859
|
-
}),
|
|
1859
|
+
}), require_from_abort_signal.filter(() => fetchPolicy === "cache-only" || fetchPolicy === "cache-and-network" || fetchPolicy === "cache-first")), require_from_abort_signal.pipe(require_from_abort_signal.merge(nonCache$, require_from_abort_signal.pipe(query$, require_from_abort_signal.filter((op) => {
|
|
1860
1860
|
const { data } = cache.readQuery(op.artifact, op.variables);
|
|
1861
1861
|
return fetchPolicy === "cache-and-network" || data === null;
|
|
1862
|
-
})),
|
|
1862
|
+
})), require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "teardown")), refetch$.source), forward, require_from_abort_signal.mergeMap((result) => {
|
|
1863
1863
|
if (result.operation.variant === "request" && result.operation.artifact.kind === "mutation" && result.operation.metadata?.cache?.optimisticResponse) cache.removeOptimistic(result.operation.key);
|
|
1864
1864
|
if (result.operation.variant === "request" && result.data) cache.writeQuery(result.operation.artifact, result.operation.variables, result.data);
|
|
1865
|
-
if (result.operation.variant !== "request" || result.operation.artifact.kind !== "query" || fetchPolicy === "network-only" || !!(result.errors && result.errors.length > 0)) return
|
|
1865
|
+
if (result.operation.variant !== "request" || result.operation.artifact.kind !== "query" || fetchPolicy === "network-only" || !!(result.errors && result.errors.length > 0)) return require_from_abort_signal.fromValue(result);
|
|
1866
1866
|
if (subscriptionHasData.get(result.operation.key)) {
|
|
1867
1867
|
const { data } = cache.readQuery(result.operation.artifact, result.operation.variables);
|
|
1868
1868
|
if (data !== null) return empty();
|
|
1869
|
-
return
|
|
1869
|
+
return require_from_abort_signal.fromValue({
|
|
1870
1870
|
operation: result.operation,
|
|
1871
1871
|
data: void 0,
|
|
1872
1872
|
errors: [new ExchangeError("Cache failed to denormalize the network response. This is likely a bug in the cache normalizer.", { exchangeName: "cache" })]
|
|
@@ -1874,11 +1874,11 @@ const cacheExchange = (options = {}) => {
|
|
|
1874
1874
|
}
|
|
1875
1875
|
subscriptionHasData.set(result.operation.key, true);
|
|
1876
1876
|
const { data } = cache.readQuery(result.operation.artifact, result.operation.variables);
|
|
1877
|
-
if (data !== null) return
|
|
1877
|
+
if (data !== null) return require_from_abort_signal.fromValue({
|
|
1878
1878
|
...result,
|
|
1879
1879
|
data
|
|
1880
1880
|
});
|
|
1881
|
-
return
|
|
1881
|
+
return require_from_abort_signal.fromValue({
|
|
1882
1882
|
operation: result.operation,
|
|
1883
1883
|
data: void 0,
|
|
1884
1884
|
errors: [new ExchangeError("Cache failed to denormalize the network response. This is likely a bug in the cache normalizer.", { exchangeName: "cache" })]
|
|
@@ -1897,15 +1897,15 @@ const retryExchange = (options = {}) => {
|
|
|
1897
1897
|
return ({ forward }) => ({
|
|
1898
1898
|
name: "retry",
|
|
1899
1899
|
io: (ops$) => {
|
|
1900
|
-
const { source: retries$, next } =
|
|
1900
|
+
const { source: retries$, next } = require_from_abort_signal.makeSubject();
|
|
1901
1901
|
const tornDown = /* @__PURE__ */ new Set();
|
|
1902
|
-
const teardown$ =
|
|
1902
|
+
const teardown$ = require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "teardown"), require_from_abort_signal.tap((op) => {
|
|
1903
1903
|
tornDown.add(op.key);
|
|
1904
1904
|
}));
|
|
1905
|
-
return
|
|
1906
|
-
const teardown$ =
|
|
1907
|
-
return
|
|
1908
|
-
})), teardown$), forward,
|
|
1905
|
+
return require_from_abort_signal.pipe(require_from_abort_signal.merge(require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "request")), require_from_abort_signal.pipe(retries$, require_from_abort_signal.filter((op) => !tornDown.has(op.key)), require_from_abort_signal.mergeMap((op) => {
|
|
1906
|
+
const teardown$ = require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((operation) => operation.variant === "teardown" && operation.key === op.key));
|
|
1907
|
+
return require_from_abort_signal.pipe(require_from_abort_signal.fromValue(op), delay(op.metadata.retry.delay), require_from_abort_signal.takeUntil(teardown$));
|
|
1908
|
+
})), teardown$), forward, require_from_abort_signal.filter((result) => {
|
|
1909
1909
|
if (!result.errors || result.errors.length === 0) return true;
|
|
1910
1910
|
if (result.operation.variant === "request" && result.operation.artifact.kind === "mutation") return true;
|
|
1911
1911
|
const attempt = result.operation.metadata.retry?.attempt ?? 0;
|
|
@@ -1934,7 +1934,7 @@ const fragmentExchange = () => {
|
|
|
1934
1934
|
return ({ forward }) => ({
|
|
1935
1935
|
name: "fragment",
|
|
1936
1936
|
io: (ops$) => {
|
|
1937
|
-
return
|
|
1937
|
+
return require_from_abort_signal.merge(require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "request" && op.artifact.kind === "fragment"), require_from_abort_signal.map((op) => {
|
|
1938
1938
|
const fragmentRef = op.metadata.fragment?.ref;
|
|
1939
1939
|
if (!fragmentRef) return {
|
|
1940
1940
|
operation: op,
|
|
@@ -1944,7 +1944,7 @@ const fragmentExchange = () => {
|
|
|
1944
1944
|
operation: op,
|
|
1945
1945
|
data: fragmentRef
|
|
1946
1946
|
};
|
|
1947
|
-
})),
|
|
1947
|
+
})), require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant === "teardown" || op.artifact.kind !== "fragment"), forward));
|
|
1948
1948
|
}
|
|
1949
1949
|
});
|
|
1950
1950
|
};
|
|
@@ -2021,7 +2021,7 @@ const requiredExchange = () => {
|
|
|
2021
2021
|
return ({ forward }) => ({
|
|
2022
2022
|
name: "required",
|
|
2023
2023
|
io: (ops$) => {
|
|
2024
|
-
return
|
|
2024
|
+
return require_from_abort_signal.pipe(ops$, forward, require_from_abort_signal.map((result) => {
|
|
2025
2025
|
if (result.operation.variant !== "request" || !result.data) return result;
|
|
2026
2026
|
try {
|
|
2027
2027
|
return {
|
|
@@ -2074,9 +2074,9 @@ const subscriptionExchange = (options) => {
|
|
|
2074
2074
|
return ({ forward }) => ({
|
|
2075
2075
|
name: "subscription",
|
|
2076
2076
|
io: (ops$) => {
|
|
2077
|
-
return
|
|
2078
|
-
const teardown$ =
|
|
2079
|
-
return
|
|
2077
|
+
return require_from_abort_signal.merge(require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter(shouldHandle), require_from_abort_signal.mergeMap((op) => {
|
|
2078
|
+
const teardown$ = require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((operation) => operation.variant === "teardown" && operation.key === op.key));
|
|
2079
|
+
return require_from_abort_signal.pipe(require_from_abort_signal.make((observer) => {
|
|
2080
2080
|
let unsubscribe;
|
|
2081
2081
|
let completed = false;
|
|
2082
2082
|
const doSubscribe = () => {
|
|
@@ -2130,8 +2130,8 @@ const subscriptionExchange = (options) => {
|
|
|
2130
2130
|
completed = true;
|
|
2131
2131
|
unsubscribe?.();
|
|
2132
2132
|
};
|
|
2133
|
-
}),
|
|
2134
|
-
})),
|
|
2133
|
+
}), require_from_abort_signal.takeUntil(teardown$));
|
|
2134
|
+
})), require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => !shouldHandle(op)), forward));
|
|
2135
2135
|
}
|
|
2136
2136
|
});
|
|
2137
2137
|
};
|
|
@@ -2151,7 +2151,7 @@ const composeExchanges = (options, input) => {
|
|
|
2151
2151
|
});
|
|
2152
2152
|
if ("extension" in result) extensions.set(result.name, result.extension);
|
|
2153
2153
|
return (ops$) => {
|
|
2154
|
-
return
|
|
2154
|
+
return require_from_abort_signal.pipe(ops$, require_from_abort_signal.share(), result.io, require_from_abort_signal.share());
|
|
2155
2155
|
};
|
|
2156
2156
|
}, input.forward),
|
|
2157
2157
|
extensions
|
|
@@ -2227,13 +2227,13 @@ const scalarExchange = () => {
|
|
|
2227
2227
|
return ({ forward, client }) => ({
|
|
2228
2228
|
name: "scalar",
|
|
2229
2229
|
io: (ops$) => {
|
|
2230
|
-
return
|
|
2230
|
+
return require_from_abort_signal.pipe(ops$, require_from_abort_signal.map((op) => {
|
|
2231
2231
|
if (op.variant !== "request" || !op.artifact.variableDefs || !client.scalars) return op;
|
|
2232
2232
|
return {
|
|
2233
2233
|
...op,
|
|
2234
2234
|
variables: serialize(client.schema, op.artifact.variableDefs, client.scalars, op.variables)
|
|
2235
2235
|
};
|
|
2236
|
-
}), forward,
|
|
2236
|
+
}), forward, require_from_abort_signal.map((result) => {
|
|
2237
2237
|
if (result.operation.variant !== "request" || !result.data || !client.scalars) return result;
|
|
2238
2238
|
return {
|
|
2239
2239
|
...result,
|
|
@@ -2250,7 +2250,7 @@ const terminalExchange = () => {
|
|
|
2250
2250
|
return () => ({
|
|
2251
2251
|
name: "terminal",
|
|
2252
2252
|
io: (ops$) => {
|
|
2253
|
-
return
|
|
2253
|
+
return require_from_abort_signal.pipe(ops$, require_from_abort_signal.filter((op) => op.variant !== "teardown"), require_from_abort_signal.mergeMap((op) => require_from_abort_signal.fromValue({
|
|
2254
2254
|
operation: op,
|
|
2255
2255
|
errors: [new ExchangeError("No terminal exchange found in exchange chain. Did you forget to add httpExchange to your exchanges array?", { exchangeName: "terminal" })]
|
|
2256
2256
|
})));
|
|
@@ -2292,7 +2292,7 @@ var Client = class {
|
|
|
2292
2292
|
client: this
|
|
2293
2293
|
});
|
|
2294
2294
|
this.#extensions = extensions;
|
|
2295
|
-
this.operations$ =
|
|
2295
|
+
this.operations$ = require_from_abort_signal.makeSubject();
|
|
2296
2296
|
this.results$ = io(this.operations$.source);
|
|
2297
2297
|
}
|
|
2298
2298
|
get schema() {
|
|
@@ -2313,20 +2313,22 @@ var Client = class {
|
|
|
2313
2313
|
variables: variables ?? {}
|
|
2314
2314
|
};
|
|
2315
2315
|
}
|
|
2316
|
-
executeOperation(operation) {
|
|
2317
|
-
|
|
2316
|
+
executeOperation(operation, options) {
|
|
2317
|
+
let source = require_from_abort_signal.pipe(this.results$, require_from_abort_signal.initialize(() => this.operations$.next(operation)), require_from_abort_signal.filter((result) => result.operation.key === operation.key));
|
|
2318
|
+
if (options?.signal) source = require_from_abort_signal.pipe(source, require_from_abort_signal.takeUntil(require_from_abort_signal.fromAbortSignal(options.signal)));
|
|
2319
|
+
return require_from_abort_signal.pipe(source, require_from_abort_signal.finalize(() => this.operations$.next({
|
|
2318
2320
|
variant: "teardown",
|
|
2319
2321
|
key: operation.key,
|
|
2320
2322
|
metadata: {}
|
|
2321
|
-
})),
|
|
2323
|
+
})), require_from_abort_signal.share());
|
|
2322
2324
|
}
|
|
2323
2325
|
executeQuery(artifact, ...[variables, options]) {
|
|
2324
2326
|
const operation = this.createOperation(artifact, variables, options?.metadata);
|
|
2325
|
-
return this.executeOperation(operation);
|
|
2327
|
+
return this.executeOperation(operation, { signal: options?.signal });
|
|
2326
2328
|
}
|
|
2327
2329
|
executeMutation(artifact, ...[variables, options]) {
|
|
2328
2330
|
const operation = this.createOperation(artifact, variables, options?.metadata);
|
|
2329
|
-
return this.executeOperation(operation);
|
|
2331
|
+
return this.executeOperation(operation, { signal: options?.signal });
|
|
2330
2332
|
}
|
|
2331
2333
|
executeSubscription(artifact, ...[variables, options]) {
|
|
2332
2334
|
const operation = this.createOperation(artifact, variables, options?.metadata);
|
|
@@ -2346,14 +2348,30 @@ var Client = class {
|
|
|
2346
2348
|
return this.executeOperation(operation);
|
|
2347
2349
|
}
|
|
2348
2350
|
async query(artifact, ...[variables, options]) {
|
|
2351
|
+
const signal = options?.signal;
|
|
2352
|
+
signal?.throwIfAborted();
|
|
2349
2353
|
const operation = this.createOperation(artifact, variables, options?.metadata);
|
|
2350
|
-
|
|
2354
|
+
let result;
|
|
2355
|
+
try {
|
|
2356
|
+
result = await require_from_abort_signal.pipe(this.executeOperation(operation, { signal }), require_from_abort_signal.take(1), require_from_abort_signal.collect);
|
|
2357
|
+
} catch (err) {
|
|
2358
|
+
if (signal?.aborted) throw signal.reason;
|
|
2359
|
+
throw err;
|
|
2360
|
+
}
|
|
2351
2361
|
if (result.errors && result.errors.length > 0) throw new AggregatedError(result.errors);
|
|
2352
2362
|
return result.data;
|
|
2353
2363
|
}
|
|
2354
2364
|
async mutation(artifact, ...[variables, options]) {
|
|
2365
|
+
const signal = options?.signal;
|
|
2366
|
+
signal?.throwIfAborted();
|
|
2355
2367
|
const operation = this.createOperation(artifact, variables, options?.metadata);
|
|
2356
|
-
|
|
2368
|
+
let result;
|
|
2369
|
+
try {
|
|
2370
|
+
result = await require_from_abort_signal.pipe(this.executeOperation(operation, { signal }), require_from_abort_signal.take(1), require_from_abort_signal.collect);
|
|
2371
|
+
} catch (err) {
|
|
2372
|
+
if (signal?.aborted) throw signal.reason;
|
|
2373
|
+
throw err;
|
|
2374
|
+
}
|
|
2357
2375
|
if (result.errors && result.errors.length > 0) throw new AggregatedError(result.errors);
|
|
2358
2376
|
return result.data;
|
|
2359
2377
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as Source } from "./from-abort-signal-CsSc5Ee6.cjs";
|
|
2
2
|
import { Artifact, Artifact as Artifact$1, ArtifactKind, ArtifactKind as ArtifactKind$1, DataOf, DataOf as DataOf$1, FragmentRefs, FragmentRefs as FragmentRefs$1, SchemaMeta, SchemaMeta as SchemaMeta$1, VariablesOf, VariablesOf as VariablesOf$1 } from "@mearie/shared";
|
|
3
3
|
|
|
4
4
|
//#region src/errors.d.ts
|
|
@@ -67,9 +67,11 @@ type ScalarsConfig<TMeta extends SchemaMeta$1 = SchemaMeta$1> = { [K in keyof TM
|
|
|
67
67
|
type QueryOptions<T extends Artifact$1<'query'> = Artifact$1<'query'>> = {
|
|
68
68
|
initialData?: DataOf$1<T>;
|
|
69
69
|
metadata?: OperationMetadata;
|
|
70
|
+
signal?: AbortSignal;
|
|
70
71
|
};
|
|
71
72
|
type MutationOptions<T extends Artifact$1<'mutation'> = Artifact$1<'mutation'>> = {
|
|
72
73
|
metadata?: OperationMetadata<T>;
|
|
74
|
+
signal?: AbortSignal;
|
|
73
75
|
};
|
|
74
76
|
type SubscriptionOptions = {
|
|
75
77
|
metadata?: OperationMetadata;
|
|
@@ -94,7 +96,9 @@ declare class Client<TMeta extends SchemaMeta$1 = SchemaMeta$1> {
|
|
|
94
96
|
get scalars(): ScalarsConfig<TMeta> | undefined;
|
|
95
97
|
private createOperationKey;
|
|
96
98
|
createOperation(artifact: Artifact$1, variables?: unknown, metadata?: Record<string, unknown>): Operation;
|
|
97
|
-
executeOperation(operation: Operation
|
|
99
|
+
executeOperation(operation: Operation, options?: {
|
|
100
|
+
signal?: AbortSignal;
|
|
101
|
+
}): Source<OperationResult>;
|
|
98
102
|
executeQuery<T extends Artifact$1<'query'>>(artifact: T, ...[variables, options]: VariablesOf$1<T> extends undefined ? [undefined?, QueryOptions<T>?] : [VariablesOf$1<T>, QueryOptions<T>?]): Source<OperationResult>;
|
|
99
103
|
executeMutation<T extends Artifact$1<'mutation'>>(artifact: T, ...[variables, options]: VariablesOf$1<T> extends undefined ? [undefined?, MutationOptions<T>?] : [VariablesOf$1<T>, MutationOptions<T>?]): Source<OperationResult>;
|
|
100
104
|
executeSubscription<T extends Artifact$1<'subscription'>>(artifact: T, ...[variables, options]: VariablesOf$1<T> extends undefined ? [undefined?, SubscriptionOptions?] : [VariablesOf$1<T>, SubscriptionOptions?]): Source<OperationResult>;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as Source } from "./from-abort-signal-ZiBY-b44.mjs";
|
|
2
2
|
import { Artifact, Artifact as Artifact$1, ArtifactKind, ArtifactKind as ArtifactKind$1, DataOf, DataOf as DataOf$1, FragmentRefs, FragmentRefs as FragmentRefs$1, SchemaMeta, SchemaMeta as SchemaMeta$1, VariablesOf, VariablesOf as VariablesOf$1 } from "@mearie/shared";
|
|
3
3
|
|
|
4
4
|
//#region src/errors.d.ts
|
|
@@ -67,9 +67,11 @@ type ScalarsConfig<TMeta extends SchemaMeta$1 = SchemaMeta$1> = { [K in keyof TM
|
|
|
67
67
|
type QueryOptions<T extends Artifact$1<'query'> = Artifact$1<'query'>> = {
|
|
68
68
|
initialData?: DataOf$1<T>;
|
|
69
69
|
metadata?: OperationMetadata;
|
|
70
|
+
signal?: AbortSignal;
|
|
70
71
|
};
|
|
71
72
|
type MutationOptions<T extends Artifact$1<'mutation'> = Artifact$1<'mutation'>> = {
|
|
72
73
|
metadata?: OperationMetadata<T>;
|
|
74
|
+
signal?: AbortSignal;
|
|
73
75
|
};
|
|
74
76
|
type SubscriptionOptions = {
|
|
75
77
|
metadata?: OperationMetadata;
|
|
@@ -94,7 +96,9 @@ declare class Client<TMeta extends SchemaMeta$1 = SchemaMeta$1> {
|
|
|
94
96
|
get scalars(): ScalarsConfig<TMeta> | undefined;
|
|
95
97
|
private createOperationKey;
|
|
96
98
|
createOperation(artifact: Artifact$1, variables?: unknown, metadata?: Record<string, unknown>): Operation;
|
|
97
|
-
executeOperation(operation: Operation
|
|
99
|
+
executeOperation(operation: Operation, options?: {
|
|
100
|
+
signal?: AbortSignal;
|
|
101
|
+
}): Source<OperationResult>;
|
|
98
102
|
executeQuery<T extends Artifact$1<'query'>>(artifact: T, ...[variables, options]: VariablesOf$1<T> extends undefined ? [undefined?, QueryOptions<T>?] : [VariablesOf$1<T>, QueryOptions<T>?]): Source<OperationResult>;
|
|
99
103
|
executeMutation<T extends Artifact$1<'mutation'>>(artifact: T, ...[variables, options]: VariablesOf$1<T> extends undefined ? [undefined?, MutationOptions<T>?] : [VariablesOf$1<T>, MutationOptions<T>?]): Source<OperationResult>;
|
|
100
104
|
executeSubscription<T extends Artifact$1<'subscription'>>(artifact: T, ...[variables, options]: VariablesOf$1<T> extends undefined ? [undefined?, SubscriptionOptions?] : [VariablesOf$1<T>, SubscriptionOptions?]): Source<OperationResult>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as filter, S as fromPromise, T as pipe, a as fromValue, b as tap, d as take, f as map, h as collect, i as makeSubject, l as share, n as make, o as finalize, s as initialize, t as fromAbortSignal, u as takeUntil, w as mergeMap, x as merge, y as fromArray } from "./from-abort-signal-ClRa7iWd.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/errors.ts
|
|
4
4
|
/**
|
|
@@ -2312,8 +2312,10 @@ var Client = class {
|
|
|
2312
2312
|
variables: variables ?? {}
|
|
2313
2313
|
};
|
|
2314
2314
|
}
|
|
2315
|
-
executeOperation(operation) {
|
|
2316
|
-
|
|
2315
|
+
executeOperation(operation, options) {
|
|
2316
|
+
let source = pipe(this.results$, initialize(() => this.operations$.next(operation)), filter((result) => result.operation.key === operation.key));
|
|
2317
|
+
if (options?.signal) source = pipe(source, takeUntil(fromAbortSignal(options.signal)));
|
|
2318
|
+
return pipe(source, finalize(() => this.operations$.next({
|
|
2317
2319
|
variant: "teardown",
|
|
2318
2320
|
key: operation.key,
|
|
2319
2321
|
metadata: {}
|
|
@@ -2321,11 +2323,11 @@ var Client = class {
|
|
|
2321
2323
|
}
|
|
2322
2324
|
executeQuery(artifact, ...[variables, options]) {
|
|
2323
2325
|
const operation = this.createOperation(artifact, variables, options?.metadata);
|
|
2324
|
-
return this.executeOperation(operation);
|
|
2326
|
+
return this.executeOperation(operation, { signal: options?.signal });
|
|
2325
2327
|
}
|
|
2326
2328
|
executeMutation(artifact, ...[variables, options]) {
|
|
2327
2329
|
const operation = this.createOperation(artifact, variables, options?.metadata);
|
|
2328
|
-
return this.executeOperation(operation);
|
|
2330
|
+
return this.executeOperation(operation, { signal: options?.signal });
|
|
2329
2331
|
}
|
|
2330
2332
|
executeSubscription(artifact, ...[variables, options]) {
|
|
2331
2333
|
const operation = this.createOperation(artifact, variables, options?.metadata);
|
|
@@ -2345,14 +2347,30 @@ var Client = class {
|
|
|
2345
2347
|
return this.executeOperation(operation);
|
|
2346
2348
|
}
|
|
2347
2349
|
async query(artifact, ...[variables, options]) {
|
|
2350
|
+
const signal = options?.signal;
|
|
2351
|
+
signal?.throwIfAborted();
|
|
2348
2352
|
const operation = this.createOperation(artifact, variables, options?.metadata);
|
|
2349
|
-
|
|
2353
|
+
let result;
|
|
2354
|
+
try {
|
|
2355
|
+
result = await pipe(this.executeOperation(operation, { signal }), take(1), collect);
|
|
2356
|
+
} catch (err) {
|
|
2357
|
+
if (signal?.aborted) throw signal.reason;
|
|
2358
|
+
throw err;
|
|
2359
|
+
}
|
|
2350
2360
|
if (result.errors && result.errors.length > 0) throw new AggregatedError(result.errors);
|
|
2351
2361
|
return result.data;
|
|
2352
2362
|
}
|
|
2353
2363
|
async mutation(artifact, ...[variables, options]) {
|
|
2364
|
+
const signal = options?.signal;
|
|
2365
|
+
signal?.throwIfAborted();
|
|
2354
2366
|
const operation = this.createOperation(artifact, variables, options?.metadata);
|
|
2355
|
-
|
|
2367
|
+
let result;
|
|
2368
|
+
try {
|
|
2369
|
+
result = await pipe(this.executeOperation(operation, { signal }), take(1), collect);
|
|
2370
|
+
} catch (err) {
|
|
2371
|
+
if (signal?.aborted) throw signal.reason;
|
|
2372
|
+
throw err;
|
|
2373
|
+
}
|
|
2356
2374
|
if (result.errors && result.errors.length > 0) throw new AggregatedError(result.errors);
|
|
2357
2375
|
return result.data;
|
|
2358
2376
|
}
|
package/dist/stream/index.cjs
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
2
|
+
const require_from_abort_signal = require('../from-abort-signal-CtLzHe8K.cjs');
|
|
3
3
|
|
|
4
|
-
exports.collect =
|
|
5
|
-
exports.collectAll =
|
|
6
|
-
exports.compose =
|
|
7
|
-
exports.filter =
|
|
8
|
-
exports.finalize =
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
4
|
+
exports.collect = require_from_abort_signal.collect;
|
|
5
|
+
exports.collectAll = require_from_abort_signal.collectAll;
|
|
6
|
+
exports.compose = require_from_abort_signal.compose;
|
|
7
|
+
exports.filter = require_from_abort_signal.filter;
|
|
8
|
+
exports.finalize = require_from_abort_signal.finalize;
|
|
9
|
+
exports.fromAbortSignal = require_from_abort_signal.fromAbortSignal;
|
|
10
|
+
exports.fromArray = require_from_abort_signal.fromArray;
|
|
11
|
+
exports.fromPromise = require_from_abort_signal.fromPromise;
|
|
12
|
+
exports.fromSubscription = require_from_abort_signal.fromSubscription;
|
|
13
|
+
exports.fromValue = require_from_abort_signal.fromValue;
|
|
14
|
+
exports.initialize = require_from_abort_signal.initialize;
|
|
15
|
+
exports.make = require_from_abort_signal.make;
|
|
16
|
+
exports.makeSubject = require_from_abort_signal.makeSubject;
|
|
17
|
+
exports.map = require_from_abort_signal.map;
|
|
18
|
+
exports.merge = require_from_abort_signal.merge;
|
|
19
|
+
exports.mergeMap = require_from_abort_signal.mergeMap;
|
|
20
|
+
exports.peek = require_from_abort_signal.peek;
|
|
21
|
+
exports.pipe = require_from_abort_signal.pipe;
|
|
22
|
+
exports.publish = require_from_abort_signal.publish;
|
|
23
|
+
exports.share = require_from_abort_signal.share;
|
|
24
|
+
exports.subscribe = require_from_abort_signal.subscribe;
|
|
25
|
+
exports.switchMap = require_from_abort_signal.switchMap;
|
|
26
|
+
exports.take = require_from_abort_signal.take;
|
|
27
|
+
exports.takeUntil = require_from_abort_signal.takeUntil;
|
|
28
|
+
exports.tap = require_from_abort_signal.tap;
|
package/dist/stream/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { type Observer, type Operator, type Sink, type Source, type Subject, type Subscription, collect, collectAll, compose, filter, finalize, fromArray, fromPromise, fromSubscription, fromValue, initialize, make, makeSubject, map, merge, mergeMap, peek, pipe, publish, share, subscribe, switchMap, take, takeUntil, tap };
|
|
1
|
+
import { A as Source, C as publish, D as pipe, E as compose, O as Operator, S as collect, T as subscribe, _ as take, a as Subject, b as peek, c as fromValue, d as tap, f as switchMap, g as takeUntil, h as share, i as fromSubscription, j as Subscription, k as Sink, l as finalize, m as merge, n as make, o as makeSubject, p as mergeMap, r as fromPromise, s as fromArray, t as fromAbortSignal, u as initialize, v as filter, w as Observer, x as collectAll, y as map } from "../from-abort-signal-CsSc5Ee6.cjs";
|
|
2
|
+
export { type Observer, type Operator, type Sink, type Source, type Subject, type Subscription, collect, collectAll, compose, filter, finalize, fromAbortSignal, fromArray, fromPromise, fromSubscription, fromValue, initialize, make, makeSubject, map, merge, mergeMap, peek, pipe, publish, share, subscribe, switchMap, take, takeUntil, tap };
|
package/dist/stream/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { type Observer, type Operator, type Sink, type Source, type Subject, type Subscription, collect, collectAll, compose, filter, finalize, fromArray, fromPromise, fromSubscription, fromValue, initialize, make, makeSubject, map, merge, mergeMap, peek, pipe, publish, share, subscribe, switchMap, take, takeUntil, tap };
|
|
1
|
+
import { A as Source, C as publish, D as pipe, E as compose, O as Operator, S as collect, T as subscribe, _ as take, a as Subject, b as peek, c as fromValue, d as tap, f as switchMap, g as takeUntil, h as share, i as fromSubscription, j as Subscription, k as Sink, l as finalize, m as merge, n as make, o as makeSubject, p as mergeMap, r as fromPromise, s as fromArray, t as fromAbortSignal, u as initialize, v as filter, w as Observer, x as collectAll, y as map } from "../from-abort-signal-ZiBY-b44.mjs";
|
|
2
|
+
export { type Observer, type Operator, type Sink, type Source, type Subject, type Subscription, collect, collectAll, compose, filter, finalize, fromAbortSignal, fromArray, fromPromise, fromSubscription, fromValue, initialize, make, makeSubject, map, merge, mergeMap, peek, pipe, publish, share, subscribe, switchMap, take, takeUntil, tap };
|
package/dist/stream/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as filter, S as fromPromise, T as pipe, _ as subscribe, a as fromValue, b as tap, c as switchMap, d as take, f as map, g as publish, h as collect, i as makeSubject, l as share, m as collectAll, n as make, o as finalize, p as peek, r as fromSubscription, s as initialize, t as fromAbortSignal, u as takeUntil, v as compose, w as mergeMap, x as merge, y as fromArray } from "../from-abort-signal-ClRa7iWd.mjs";
|
|
2
2
|
|
|
3
|
-
export { collect, collectAll, compose, filter, finalize, fromArray, fromPromise, fromSubscription, fromValue, initialize, make, makeSubject, map, merge, mergeMap, peek, pipe, publish, share, subscribe, switchMap, take, takeUntil, tap };
|
|
3
|
+
export { collect, collectAll, compose, filter, finalize, fromAbortSignal, fromArray, fromPromise, fromSubscription, fromValue, initialize, make, makeSubject, map, merge, mergeMap, peek, pipe, publish, share, subscribe, switchMap, take, takeUntil, tap };
|