@graphrefly/graphrefly 0.17.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-R6OHUUYB.js → chunk-AHRKWMNI.js} +7 -7
- package/dist/chunk-AHRKWMNI.js.map +1 -0
- package/dist/{chunk-2PORF4RP.js → chunk-BER7UYLM.js} +27 -32
- package/dist/chunk-BER7UYLM.js.map +1 -0
- package/dist/{chunk-646OG3PO.js → chunk-IRZAGZUB.js} +51 -52
- package/dist/chunk-IRZAGZUB.js.map +1 -0
- package/dist/{chunk-IHJHBADD.js → chunk-JC2SN46B.js} +385 -197
- package/dist/chunk-JC2SN46B.js.map +1 -0
- package/dist/{chunk-XJ6EMQ22.js → chunk-OO5QOAXI.js} +4 -10
- package/dist/chunk-OO5QOAXI.js.map +1 -0
- package/dist/{chunk-YXROQFXZ.js → chunk-UW77D7SP.js} +3 -3
- package/dist/{chunk-F2ULI3Q3.js → chunk-XUOY3YKN.js} +7 -3
- package/dist/chunk-XUOY3YKN.js.map +1 -0
- package/dist/chunk-YLR5JUJZ.js +111 -0
- package/dist/chunk-YLR5JUJZ.js.map +1 -0
- package/dist/{chunk-BV3TPSBK.js → chunk-YXR3WW3Q.js} +740 -755
- package/dist/chunk-YXR3WW3Q.js.map +1 -0
- package/dist/compat/nestjs/index.cjs +1127 -983
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.d.cts +4 -4
- package/dist/compat/nestjs/index.d.ts +4 -4
- package/dist/compat/nestjs/index.js +7 -13
- package/dist/core/index.cjs +653 -749
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +7 -7
- package/dist/extra/index.cjs +773 -795
- package/dist/extra/index.cjs.map +1 -1
- package/dist/extra/index.d.cts +4 -4
- package/dist/extra/index.d.ts +4 -4
- package/dist/extra/index.js +5 -11
- package/dist/graph/index.cjs +1036 -975
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +3 -3
- package/dist/graph/index.d.ts +3 -3
- package/dist/graph/index.js +8 -8
- package/dist/{graph-fCsaaVIa.d.cts → graph-KsTe57nI.d.cts} +127 -51
- package/dist/{graph-Dc-P9BVm.d.ts → graph-mILUUqW8.d.ts} +127 -51
- package/dist/{index-DhXznWyH.d.ts → index-8a605sg9.d.ts} +2 -2
- package/dist/{index-D7y9Q8W4.d.ts → index-B2SvPEbc.d.ts} +8 -69
- package/dist/{index-YlOH1Gw6.d.cts → index-BBUYZfJ1.d.cts} +122 -78
- package/dist/{index-ClaKZFPl.d.cts → index-Bjh5C1Tp.d.cts} +38 -35
- package/dist/{index-DWq0P9T6.d.ts → index-BjtlNirP.d.cts} +5 -7
- package/dist/{index-N704txAA.d.ts → index-BnkMgNNa.d.ts} +38 -35
- package/dist/{index-BBVBYPxr.d.cts → index-CgSiUouz.d.ts} +5 -7
- package/dist/{index-BmoUvOGN.d.ts → index-CvKzv0AW.d.ts} +122 -78
- package/dist/{index-4OIX-q0C.d.cts → index-UudxGnzc.d.cts} +8 -69
- package/dist/{index-DlGMf_Qe.d.cts → index-VHA43cGP.d.cts} +2 -2
- package/dist/index.cjs +6146 -5725
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +617 -383
- package/dist/index.d.ts +617 -383
- package/dist/index.js +4401 -4028
- package/dist/index.js.map +1 -1
- package/dist/{meta-BV4pj9ML.d.cts → meta-BnG7XAaE.d.cts} +395 -289
- package/dist/{meta-BV4pj9ML.d.ts → meta-BnG7XAaE.d.ts} +395 -289
- package/dist/observable-C8Kx_O6k.d.cts +36 -0
- package/dist/observable-DcBwQY7t.d.ts +36 -0
- package/dist/patterns/reactive-layout/index.cjs +1037 -857
- package/dist/patterns/reactive-layout/index.cjs.map +1 -1
- package/dist/patterns/reactive-layout/index.d.cts +3 -3
- package/dist/patterns/reactive-layout/index.d.ts +3 -3
- package/dist/patterns/reactive-layout/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-2PORF4RP.js.map +0 -1
- package/dist/chunk-646OG3PO.js.map +0 -1
- package/dist/chunk-BV3TPSBK.js.map +0 -1
- package/dist/chunk-EBNKJULL.js +0 -231
- package/dist/chunk-EBNKJULL.js.map +0 -1
- package/dist/chunk-F2ULI3Q3.js.map +0 -1
- package/dist/chunk-IHJHBADD.js.map +0 -1
- package/dist/chunk-R6OHUUYB.js.map +0 -1
- package/dist/chunk-XJ6EMQ22.js.map +0 -1
- package/dist/observable-Cz-AWhwR.d.cts +0 -42
- package/dist/observable-DCqlwGyl.d.ts +0 -42
- /package/dist/{chunk-YXROQFXZ.js.map → chunk-UW77D7SP.js.map} +0 -0
|
@@ -2,10 +2,8 @@ import {
|
|
|
2
2
|
ResettableTimer
|
|
3
3
|
} from "./chunk-WZ2Z2CRV.js";
|
|
4
4
|
import {
|
|
5
|
-
describeNode,
|
|
6
|
-
metaSnapshot,
|
|
7
5
|
resolveDescribeFields
|
|
8
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XUOY3YKN.js";
|
|
9
7
|
import {
|
|
10
8
|
CLEANUP_RESULT,
|
|
11
9
|
COMPLETE,
|
|
@@ -19,6 +17,7 @@ import {
|
|
|
19
17
|
PAUSE,
|
|
20
18
|
RESOLVED,
|
|
21
19
|
RESUME,
|
|
20
|
+
START,
|
|
22
21
|
TEARDOWN,
|
|
23
22
|
__export,
|
|
24
23
|
accessHintForGuard,
|
|
@@ -33,6 +32,7 @@ import {
|
|
|
33
32
|
effect,
|
|
34
33
|
isBatching,
|
|
35
34
|
isKnownMessageType,
|
|
35
|
+
isLocalOnly,
|
|
36
36
|
isPhase2Message,
|
|
37
37
|
isTerminalMessage,
|
|
38
38
|
isV1,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
propagatesToMeta,
|
|
50
50
|
state,
|
|
51
51
|
wallClockNs
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-YXR3WW3Q.js";
|
|
53
53
|
|
|
54
54
|
// src/core/index.ts
|
|
55
55
|
var core_exports = {};
|
|
@@ -68,6 +68,7 @@ __export(core_exports, {
|
|
|
68
68
|
RESOLVED: () => RESOLVED,
|
|
69
69
|
RESUME: () => RESUME,
|
|
70
70
|
ResettableTimer: () => ResettableTimer,
|
|
71
|
+
START: () => START,
|
|
71
72
|
TEARDOWN: () => TEARDOWN,
|
|
72
73
|
accessHintForGuard: () => accessHintForGuard,
|
|
73
74
|
advanceVersion: () => advanceVersion,
|
|
@@ -77,18 +78,17 @@ __export(core_exports, {
|
|
|
77
78
|
createVersioning: () => createVersioning,
|
|
78
79
|
defaultHash: () => defaultHash,
|
|
79
80
|
derived: () => derived,
|
|
80
|
-
describeNode: () => describeNode,
|
|
81
81
|
downWithBatch: () => downWithBatch,
|
|
82
82
|
dynamicNode: () => dynamicNode,
|
|
83
83
|
effect: () => effect,
|
|
84
84
|
isBatching: () => isBatching,
|
|
85
85
|
isKnownMessageType: () => isKnownMessageType,
|
|
86
|
+
isLocalOnly: () => isLocalOnly,
|
|
86
87
|
isPhase2Message: () => isPhase2Message,
|
|
87
88
|
isTerminalMessage: () => isTerminalMessage,
|
|
88
89
|
isV1: () => isV1,
|
|
89
90
|
knownMessageTypes: () => knownMessageTypes,
|
|
90
91
|
messageTier: () => messageTier,
|
|
91
|
-
metaSnapshot: () => metaSnapshot,
|
|
92
92
|
monotonicNs: () => monotonicNs,
|
|
93
93
|
node: () => node,
|
|
94
94
|
normalizeActor: () => normalizeActor,
|
|
@@ -159,4 +159,4 @@ export {
|
|
|
159
159
|
bridge,
|
|
160
160
|
core_exports
|
|
161
161
|
};
|
|
162
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-AHRKWMNI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/index.ts","../src/core/bridge.ts"],"sourcesContent":["/**\n * Core layer: message protocol, node primitive, lifecycle (Phase 0).\n */\nexport * from \"./actor.js\";\nexport * from \"./batch.js\";\nexport { type BridgeOptions, bridge, DEFAULT_DOWN } from \"./bridge.js\";\nexport { monotonicNs, wallClockNs } from \"./clock.js\";\nexport * from \"./dynamic-node.js\";\nexport * from \"./guard.js\";\nexport * from \"./messages.js\";\nexport {\n\ttype DescribeDetail,\n\ttype DescribeField,\n\ttype DescribeNodeOutput,\n\tresolveDescribeFields,\n} from \"./meta.js\";\nexport {\n\tCLEANUP_RESULT,\n\ttype CleanupResult,\n\tcleanupResult,\n\ttype Node,\n\ttype NodeActions,\n\ttype NodeDescribeKind,\n\ttype NodeFn,\n\ttype NodeOptions,\n\ttype NodeSink,\n\ttype NodeStatus,\n\ttype NodeTransportOptions,\n\tnode,\n\ttype OnMessageHandler,\n\ttype SubscribeHints,\n} from \"./node.js\";\nexport * from \"./sugar.js\";\nexport { ResettableTimer } from \"./timer.js\";\nexport {\n\tadvanceVersion,\n\tcreateVersioning,\n\tdefaultHash,\n\ttype HashFn,\n\tisV1,\n\ttype NodeVersionInfo,\n\ttype V0,\n\ttype V1,\n\ttype VersioningLevel,\n\ttype VersioningOptions,\n} from \"./versioning.js\";\n","/**\n * bridge — graph-visible message forwarding between two nodes.\n *\n * Replaces ad-hoc `subscribe()` bridges that bypass graph topology.\n * The returned node is an effect that intercepts messages from `from`\n * and forwards them to `to.down()`. Register it with `graph.add()` to\n * make the bridge visible in `describe()` and `snapshot()`.\n *\n * **Upstream path:** The bridge node has `from` as its dep, so anything\n * downstream of the bridge that calls `up()` naturally reaches `from`.\n * If `to` is used as a dep by other nodes and those nodes send `up()`,\n * the messages reach `to`'s deps (not `from`). For full upstream relay\n * across the bridge boundary, wire the bridge as a dep of `to`'s\n * consumers or use `graph.connect()`.\n *\n * **ABAC / guards:** `to.down()` is called without `NodeTransportOptions`,\n * so any ABAC guard on `to` receives `actor = undefined`. Upstream (`up()`)\n * messages propagate through the dep chain the same way — no actor is\n * injected on either path. Both paths are intentionally unguarded; if `to`\n * requires a specific actor, provide a guarded wrapper node and bridge to\n * that instead.\n *\n * **Default forwarding:** All standard message types are forwarded by\n * default, including TEARDOWN, PAUSE, RESUME, and INVALIDATE. Use the\n * `down` option to restrict which types are forwarded. Callers that need\n * to exclude TEARDOWN (e.g. inter-stage wiring in `funnel()`) pass an\n * explicit `down` array without TEARDOWN.\n *\n * @module\n */\n\nimport {\n\tCOMPLETE,\n\tDATA,\n\tDIRTY,\n\tERROR,\n\tINVALIDATE,\n\ttype Message,\n\tPAUSE,\n\tRESOLVED,\n\tRESUME,\n\tTEARDOWN,\n} from \"./messages.js\";\nimport { type Node, type NodeActions, node, type OnMessageHandler } from \"./node.js\";\n\n/** Options for {@link bridge}. */\nexport type BridgeOptions = {\n\t/** Node name (for graph registration / describe). */\n\tname?: string;\n\t/**\n\t * Standard message types to forward downstream. Default: all standard\n\t * types. Unknown (non-standard) types always forward per spec §1.3.6\n\t * regardless of this option.\n\t */\n\tdown?: readonly symbol[];\n};\n\n/** All standard types forwarded by default. Export for callers that\n * need to customize (e.g. exclude TEARDOWN). */\nexport const DEFAULT_DOWN: readonly symbol[] = [\n\tDATA,\n\tDIRTY,\n\tRESOLVED,\n\tCOMPLETE,\n\tERROR,\n\tTEARDOWN,\n\tPAUSE,\n\tRESUME,\n\tINVALIDATE,\n];\n\n/**\n * All standard message types the bridge understands. Types outside this set\n * are \"unknown\" and must always be forwarded (spec §1.3.6).\n */\nconst STANDARD_TYPES = new Set<symbol>([\n\tDATA,\n\tDIRTY,\n\tRESOLVED,\n\tCOMPLETE,\n\tERROR,\n\tTEARDOWN,\n\tPAUSE,\n\tRESUME,\n\tINVALIDATE,\n]);\n\n/**\n * Create a graph-visible bridge node that forwards messages from `from` to `to`.\n *\n * The bridge is a real node (effect) — it shows up in `describe()`, participates\n * in two-phase push, and cleans up on TEARDOWN. Register it via `graph.add()`\n * to make it part of the graph topology.\n *\n * **Unknown message types** (custom domain signals not in the standard protocol\n * set) are always forwarded to `to`, regardless of the `down` option. This\n * satisfies spec §1.3.6 (\"unknown types forward unchanged\").\n *\n * **COMPLETE / ERROR**: when forwarded, the bridge also transitions to terminal\n * state so graph-wide completion detection works correctly.\n *\n * @param from - Source node to observe.\n * @param to - Target node to forward messages to via `to.down()`.\n * @param opts - Optional configuration.\n * @returns A bridge effect node. Add it to a graph with `graph.add(name, bridge(...))`.\n *\n * @example\n * ```ts\n * import { bridge, state } from \"@graphrefly/graphrefly-ts\";\n *\n * const a = state(0);\n * const b = state(0);\n * const br = bridge(a, b, { name: \"__bridge_a_b\" });\n * graph.add(\"__bridge_a_b\", br);\n * // Now a's messages flow to b, visible in describe()\n * ```\n *\n * @category core\n */\nexport function bridge<T = unknown>(from: Node<T>, to: Node, opts?: BridgeOptions): Node<unknown> {\n\tconst allowedDown = new Set(opts?.down ?? DEFAULT_DOWN);\n\n\tconst onMessage: OnMessageHandler = (\n\t\tmsg: Message,\n\t\t_depIndex: number,\n\t\t_actions: NodeActions,\n\t): boolean => {\n\t\tconst type = msg[0];\n\n\t\t// Unknown types (custom domain signals) always forward — spec §1.3.6.\n\t\tif (!STANDARD_TYPES.has(type)) {\n\t\t\tto.down([msg]);\n\t\t\treturn true;\n\t\t}\n\n\t\t// Terminal types: always transition the bridge to terminal state\n\t\t// (return false → default dispatch). Only forward to `to` if allowed.\n\t\tif (type === COMPLETE || type === ERROR) {\n\t\t\tif (allowedDown.has(type)) {\n\t\t\t\tto.down([msg]);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Known type, not in allowedDown — consume without forwarding.\n\t\tif (!allowedDown.has(type)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Forward the message to the target.\n\t\tto.down([msg]);\n\t\treturn true;\n\t};\n\n\treturn node([from as Node], undefined, {\n\t\tname: opts?.name,\n\t\tdescribeKind: \"effect\",\n\t\tonMessage,\n\t\tmeta: { _internal: true },\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC2DO,IAAM,eAAkC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAMA,IAAM,iBAAiB,oBAAI,IAAY;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAkCM,SAAS,OAAoB,MAAe,IAAU,MAAqC;AACjG,QAAM,cAAc,IAAI,IAAI,MAAM,QAAQ,YAAY;AAEtD,QAAM,YAA8B,CACnC,KACA,WACA,aACa;AACb,UAAM,OAAO,IAAI,CAAC;AAGlB,QAAI,CAAC,eAAe,IAAI,IAAI,GAAG;AAC9B,SAAG,KAAK,CAAC,GAAG,CAAC;AACb,aAAO;AAAA,IACR;AAIA,QAAI,SAAS,YAAY,SAAS,OAAO;AACxC,UAAI,YAAY,IAAI,IAAI,GAAG;AAC1B,WAAG,KAAK,CAAC,GAAG,CAAC;AAAA,MACd;AACA,aAAO;AAAA,IACR;AAGA,QAAI,CAAC,YAAY,IAAI,IAAI,GAAG;AAC3B,aAAO;AAAA,IACR;AAGA,OAAG,KAAK,CAAC,GAAG,CAAC;AACb,WAAO;AAAA,EACR;AAEA,SAAO,KAAK,CAAC,IAAY,GAAG,QAAW;AAAA,IACtC,MAAM,MAAM;AAAA,IACZ,cAAc;AAAA,IACd;AAAA,IACA,MAAM,EAAE,WAAW,KAAK;AAAA,EACzB,CAAC;AACF;","names":[]}
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
empty,
|
|
5
5
|
escapeRegexChar,
|
|
6
6
|
firstValueFrom,
|
|
7
|
+
firstWhere,
|
|
7
8
|
forEach,
|
|
8
9
|
fromAny,
|
|
9
10
|
fromAsyncIter,
|
|
@@ -18,8 +19,6 @@ import {
|
|
|
18
19
|
matchesAnyPattern,
|
|
19
20
|
matchesCron,
|
|
20
21
|
never,
|
|
21
|
-
observeGraph$,
|
|
22
|
-
observeNode$,
|
|
23
22
|
of,
|
|
24
23
|
parseCron,
|
|
25
24
|
reactiveLog,
|
|
@@ -28,9 +27,8 @@ import {
|
|
|
28
27
|
shareReplay,
|
|
29
28
|
throwError,
|
|
30
29
|
toArray,
|
|
31
|
-
toMessages$,
|
|
32
30
|
toObservable
|
|
33
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-IRZAGZUB.js";
|
|
34
32
|
import {
|
|
35
33
|
ResettableTimer
|
|
36
34
|
} from "./chunk-WZ2Z2CRV.js";
|
|
@@ -44,6 +42,7 @@ import {
|
|
|
44
42
|
PAUSE,
|
|
45
43
|
RESOLVED,
|
|
46
44
|
RESUME,
|
|
45
|
+
START,
|
|
47
46
|
TEARDOWN,
|
|
48
47
|
__export,
|
|
49
48
|
__require,
|
|
@@ -51,14 +50,14 @@ import {
|
|
|
51
50
|
derived,
|
|
52
51
|
dynamicNode,
|
|
53
52
|
effect,
|
|
54
|
-
|
|
53
|
+
isLocalOnly,
|
|
55
54
|
messageTier,
|
|
56
55
|
monotonicNs,
|
|
57
56
|
node,
|
|
58
57
|
producer,
|
|
59
58
|
state,
|
|
60
59
|
wallClockNs
|
|
61
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-YXR3WW3Q.js";
|
|
62
61
|
|
|
63
62
|
// src/extra/index.ts
|
|
64
63
|
var extra_exports = {};
|
|
@@ -108,6 +107,7 @@ __export(extra_exports, {
|
|
|
108
107
|
find: () => find,
|
|
109
108
|
first: () => first,
|
|
110
109
|
firstValueFrom: () => firstValueFrom,
|
|
110
|
+
firstWhere: () => firstWhere,
|
|
111
111
|
flatMap: () => flatMap,
|
|
112
112
|
forEach: () => forEach,
|
|
113
113
|
fromAny: () => fromAny,
|
|
@@ -154,8 +154,6 @@ __export(extra_exports, {
|
|
|
154
154
|
mergeMap: () => mergeMap,
|
|
155
155
|
nameToSignal: () => nameToSignal,
|
|
156
156
|
never: () => never,
|
|
157
|
-
observeGraph$: () => observeGraph$,
|
|
158
|
-
observeNode$: () => observeNode$,
|
|
159
157
|
of: () => of,
|
|
160
158
|
pairwise: () => pairwise,
|
|
161
159
|
parseCron: () => parseCron,
|
|
@@ -187,7 +185,6 @@ __export(extra_exports, {
|
|
|
187
185
|
shareReplay: () => shareReplay,
|
|
188
186
|
signalToName: () => signalToName,
|
|
189
187
|
skip: () => skip,
|
|
190
|
-
startWith: () => startWith,
|
|
191
188
|
switchMap: () => switchMap,
|
|
192
189
|
take: () => take,
|
|
193
190
|
takeUntil: () => takeUntil,
|
|
@@ -204,7 +201,6 @@ __export(extra_exports, {
|
|
|
204
201
|
toFile: () => toFile,
|
|
205
202
|
toKafka: () => toKafka,
|
|
206
203
|
toLoki: () => toLoki,
|
|
207
|
-
toMessages$: () => toMessages$,
|
|
208
204
|
toMongo: () => toMongo,
|
|
209
205
|
toNATS: () => toNATS,
|
|
210
206
|
toObservable: () => toObservable,
|
|
@@ -1071,6 +1067,10 @@ function toSSE(source, opts) {
|
|
|
1071
1067
|
unsub = source.subscribe((msgs) => {
|
|
1072
1068
|
for (const msg of msgs) {
|
|
1073
1069
|
const t = msg[0];
|
|
1070
|
+
if (isLocalOnly(t)) {
|
|
1071
|
+
if (t === DIRTY && includeDirty) {
|
|
1072
|
+
} else continue;
|
|
1073
|
+
}
|
|
1074
1074
|
if (t === DATA) {
|
|
1075
1075
|
write(dataEvent, serializeSseData(msg[1], serialize));
|
|
1076
1076
|
continue;
|
|
@@ -1086,7 +1086,6 @@ function toSSE(source, opts) {
|
|
|
1086
1086
|
return;
|
|
1087
1087
|
}
|
|
1088
1088
|
if (!includeResolved && t === RESOLVED) continue;
|
|
1089
|
-
if (!includeDirty && t === DIRTY) continue;
|
|
1090
1089
|
write(
|
|
1091
1090
|
eventNameResolver(t),
|
|
1092
1091
|
msg.length > 1 ? serializeSseData(msg[1], serialize) : void 0
|
|
@@ -3688,9 +3687,12 @@ function reduce(source, reducer, seed, opts) {
|
|
|
3688
3687
|
}
|
|
3689
3688
|
function take(source, count, opts) {
|
|
3690
3689
|
if (count <= 0) {
|
|
3690
|
+
let completed = false;
|
|
3691
3691
|
return node(
|
|
3692
3692
|
[source],
|
|
3693
3693
|
(_d, a) => {
|
|
3694
|
+
if (completed) return void 0;
|
|
3695
|
+
completed = true;
|
|
3694
3696
|
a.down([[COMPLETE]]);
|
|
3695
3697
|
return void 0;
|
|
3696
3698
|
},
|
|
@@ -3698,8 +3700,15 @@ function take(source, count, opts) {
|
|
|
3698
3700
|
...operatorOpts2(opts),
|
|
3699
3701
|
completeWhenDepsComplete: false,
|
|
3700
3702
|
onMessage(msg, _i, a) {
|
|
3701
|
-
if (msg[0] ===
|
|
3703
|
+
if (msg[0] === START && !completed) {
|
|
3704
|
+
completed = true;
|
|
3705
|
+
a.down([[COMPLETE]]);
|
|
3706
|
+
return true;
|
|
3707
|
+
}
|
|
3708
|
+
if (msg[0] === COMPLETE && !completed) {
|
|
3709
|
+
completed = true;
|
|
3702
3710
|
a.down([[COMPLETE]]);
|
|
3711
|
+
return true;
|
|
3703
3712
|
}
|
|
3704
3713
|
return true;
|
|
3705
3714
|
}
|
|
@@ -3881,21 +3890,6 @@ function find(source, predicate, opts) {
|
|
|
3881
3890
|
function elementAt(source, index, opts) {
|
|
3882
3891
|
return take(skip(source, index, opts), 1, opts);
|
|
3883
3892
|
}
|
|
3884
|
-
function startWith(source, initial, opts) {
|
|
3885
|
-
let prepended = false;
|
|
3886
|
-
return node(
|
|
3887
|
-
[source],
|
|
3888
|
-
([v], a) => {
|
|
3889
|
-
if (!prepended) {
|
|
3890
|
-
prepended = true;
|
|
3891
|
-
a.emit(initial);
|
|
3892
|
-
}
|
|
3893
|
-
a.emit(v);
|
|
3894
|
-
return void 0;
|
|
3895
|
-
},
|
|
3896
|
-
operatorOpts2(opts)
|
|
3897
|
-
);
|
|
3898
|
-
}
|
|
3899
3893
|
function tap(source, fnOrObserver, opts) {
|
|
3900
3894
|
if (typeof fnOrObserver === "function") {
|
|
3901
3895
|
return derived(
|
|
@@ -4231,6 +4225,7 @@ function forwardInner(inner, a, onInnerComplete) {
|
|
|
4231
4225
|
let sawError = false;
|
|
4232
4226
|
const out = [];
|
|
4233
4227
|
for (const m of msgs) {
|
|
4228
|
+
if (messageTier(m[0]) < 1) continue;
|
|
4234
4229
|
if (m[0] === DATA) emitted = true;
|
|
4235
4230
|
if (m[0] === COMPLETE) sawComplete = true;
|
|
4236
4231
|
else {
|
|
@@ -4715,7 +4710,7 @@ function sample(source, notifier, opts) {
|
|
|
4715
4710
|
if (terminated) return true;
|
|
4716
4711
|
const t = msg[0];
|
|
4717
4712
|
const tier = messageTier(t);
|
|
4718
|
-
if (tier >=
|
|
4713
|
+
if (tier >= 4) {
|
|
4719
4714
|
if (t === ERROR) {
|
|
4720
4715
|
terminated = true;
|
|
4721
4716
|
a.down([msg]);
|
|
@@ -4731,6 +4726,7 @@ function sample(source, notifier, opts) {
|
|
|
4731
4726
|
a.down([msg]);
|
|
4732
4727
|
return true;
|
|
4733
4728
|
}
|
|
4729
|
+
terminated = true;
|
|
4734
4730
|
a.down([msg]);
|
|
4735
4731
|
return true;
|
|
4736
4732
|
}
|
|
@@ -5903,7 +5899,7 @@ function workerBridge(target, opts) {
|
|
|
5903
5899
|
for (const m of msgs) {
|
|
5904
5900
|
const type = m[0];
|
|
5905
5901
|
if (type === DATA) continue;
|
|
5906
|
-
if (
|
|
5902
|
+
if (isLocalOnly(type)) continue;
|
|
5907
5903
|
if (type === ERROR) {
|
|
5908
5904
|
transport.post({
|
|
5909
5905
|
t: "e",
|
|
@@ -6029,7 +6025,7 @@ function workerSelf(target, opts) {
|
|
|
6029
6025
|
for (const m of msgs) {
|
|
6030
6026
|
const type = m[0];
|
|
6031
6027
|
if (type === DATA) continue;
|
|
6032
|
-
if (
|
|
6028
|
+
if (isLocalOnly(type)) continue;
|
|
6033
6029
|
if (type === ERROR) {
|
|
6034
6030
|
transport.post({
|
|
6035
6031
|
t: "e",
|
|
@@ -6217,7 +6213,6 @@ export {
|
|
|
6217
6213
|
last,
|
|
6218
6214
|
find,
|
|
6219
6215
|
elementAt,
|
|
6220
|
-
startWith,
|
|
6221
6216
|
tap,
|
|
6222
6217
|
distinctUntilChanged,
|
|
6223
6218
|
pairwise,
|
|
@@ -6267,4 +6262,4 @@ export {
|
|
|
6267
6262
|
workerSelf,
|
|
6268
6263
|
extra_exports
|
|
6269
6264
|
};
|
|
6270
|
-
//# sourceMappingURL=chunk-
|
|
6265
|
+
//# sourceMappingURL=chunk-BER7UYLM.js.map
|