@graphrefly/graphrefly 0.10.0 → 0.12.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-QTZSBQGJ.js → chunk-4F2ZFD5L.js} +19 -1
- package/dist/chunk-4F2ZFD5L.js.map +1 -0
- package/dist/{chunk-LR2CLSEF.js → chunk-6OLNYOGU.js} +2 -3
- package/dist/chunk-6OLNYOGU.js.map +1 -0
- package/dist/{chunk-TZLX4KIT.js → chunk-BRPCN2HJ.js} +46 -17
- package/dist/chunk-BRPCN2HJ.js.map +1 -0
- package/dist/{chunk-A2AJJOSJ.js → chunk-IXTW3BIO.js} +3 -3
- package/dist/{chunk-XCZPGOVP.js → chunk-JYRHO63K.js} +3 -3
- package/dist/{chunk-UCW3VWMN.js → chunk-NULSP7U4.js} +4 -4
- package/dist/{chunk-WYI7YW54.js → chunk-VQWLA6XQ.js} +3 -3
- package/dist/{chunk-YWTP2XRJ.js → chunk-X732W3QA.js} +2 -2
- package/dist/{chunk-E7OH6ZAZ.js → chunk-XWMTVV2D.js} +62 -3
- package/dist/chunk-XWMTVV2D.js.map +1 -0
- package/dist/compat/nestjs/index.cjs +10 -1
- 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 -7
- package/dist/core/index.cjs +74 -1
- 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 +12 -3
- package/dist/extra/index.cjs +52 -14
- 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 -5
- package/dist/graph/index.cjs +10 -1
- 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 +4 -4
- package/dist/{graph-DqTICAY2.d.cts → graph-BE10ujU9.d.cts} +1 -1
- package/dist/{graph-X9uwnD_z.d.ts → graph-DXT95WZ3.d.ts} +1 -1
- package/dist/{index-DLO8wnYU.d.ts → index-53cDGX7F.d.ts} +3 -3
- package/dist/{index-DMv1Etbi.d.ts → index-B10Q0sQB.d.ts} +2 -2
- package/dist/{index-BPCeYDS4.d.ts → index-C0_7g9sj.d.ts} +1 -1
- package/dist/{index-3U0WxdD-.d.cts → index-CCvzN5GB.d.cts} +2 -2
- package/dist/{index-BP1t_38S.d.cts → index-CiAqgfFg.d.ts} +17 -13
- package/dist/{index-a5gHmH5b.d.ts → index-CthwPnHQ.d.cts} +17 -13
- package/dist/{index-BVG5pjin.d.ts → index-Dzdm20sx.d.ts} +88 -3
- package/dist/{index-BYEgosAX.d.cts → index-QfbXNW1N.d.cts} +88 -3
- package/dist/{index-BYa2YMat.d.cts → index-aBZ2RoP0.d.cts} +3 -3
- package/dist/{index-DbwgQ4Cw.d.cts → index-nRulwTr-.d.cts} +1 -1
- package/dist/index.cjs +1084 -118
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +422 -22
- package/dist/index.d.ts +422 -22
- package/dist/index.js +988 -120
- package/dist/index.js.map +1 -1
- package/dist/{meta-BJEU8fYz.d.cts → meta-BcuDhtwu.d.cts} +33 -1
- package/dist/{meta-BJEU8fYz.d.ts → meta-BcuDhtwu.d.ts} +33 -1
- package/dist/patterns/reactive-layout/index.cjs +10 -1
- 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/dist/{reactive-log-RhgIog2Z.d.ts → reactive-log-Cu0VdqkT.d.ts} +2 -2
- package/dist/{reactive-log-BfX6bOSZ.d.cts → reactive-log-OULQssZg.d.cts} +2 -2
- package/package.json +7 -2
- package/dist/chunk-E7OH6ZAZ.js.map +0 -1
- package/dist/chunk-LR2CLSEF.js.map +0 -1
- package/dist/chunk-QTZSBQGJ.js.map +0 -1
- package/dist/chunk-TZLX4KIT.js.map +0 -1
- /package/dist/{chunk-A2AJJOSJ.js.map → chunk-IXTW3BIO.js.map} +0 -0
- /package/dist/{chunk-XCZPGOVP.js.map → chunk-JYRHO63K.js.map} +0 -0
- /package/dist/{chunk-UCW3VWMN.js.map → chunk-NULSP7U4.js.map} +0 -0
- /package/dist/{chunk-WYI7YW54.js.map → chunk-VQWLA6XQ.js.map} +0 -0
- /package/dist/{chunk-YWTP2XRJ.js.map → chunk-X732W3QA.js.map} +0 -0
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
GRAPH_META_SEGMENT,
|
|
3
3
|
Graph,
|
|
4
4
|
reachable
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VQWLA6XQ.js";
|
|
6
6
|
import {
|
|
7
7
|
__export
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4F2ZFD5L.js";
|
|
9
9
|
|
|
10
10
|
// src/graph/index.ts
|
|
11
11
|
var graph_exports = {};
|
|
@@ -104,4 +104,4 @@ export {
|
|
|
104
104
|
replayWAL,
|
|
105
105
|
graph_exports
|
|
106
106
|
};
|
|
107
|
-
//# sourceMappingURL=chunk-
|
|
107
|
+
//# sourceMappingURL=chunk-IXTW3BIO.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Graph
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VQWLA6XQ.js";
|
|
4
4
|
import {
|
|
5
5
|
DATA,
|
|
6
6
|
INVALIDATE,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
emitWithBatch,
|
|
11
11
|
monotonicNs,
|
|
12
12
|
state
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4F2ZFD5L.js";
|
|
14
14
|
|
|
15
15
|
// src/patterns/reactive-layout/index.ts
|
|
16
16
|
var reactive_layout_exports = {};
|
|
@@ -1094,4 +1094,4 @@ export {
|
|
|
1094
1094
|
reactiveBlockLayout,
|
|
1095
1095
|
reactive_layout_exports
|
|
1096
1096
|
};
|
|
1097
|
-
//# sourceMappingURL=chunk-
|
|
1097
|
+
//# sourceMappingURL=chunk-JYRHO63K.js.map
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
reactiveLog,
|
|
8
8
|
toMessages$,
|
|
9
9
|
toObservable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-X732W3QA.js";
|
|
11
11
|
import {
|
|
12
12
|
Graph
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VQWLA6XQ.js";
|
|
14
14
|
import {
|
|
15
15
|
COMPLETE,
|
|
16
16
|
DATA,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
policy,
|
|
29
29
|
state,
|
|
30
30
|
wallClockNs
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4F2ZFD5L.js";
|
|
32
32
|
|
|
33
33
|
// src/compat/nestjs/index.ts
|
|
34
34
|
var nestjs_exports = {};
|
|
@@ -1369,4 +1369,4 @@ export {
|
|
|
1369
1369
|
GraphReflyModule,
|
|
1370
1370
|
nestjs_exports
|
|
1371
1371
|
};
|
|
1372
|
-
//# sourceMappingURL=chunk-
|
|
1372
|
+
//# sourceMappingURL=chunk-NULSP7U4.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
describeNode,
|
|
3
3
|
resolveDescribeFields
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6OLNYOGU.js";
|
|
5
5
|
import {
|
|
6
6
|
COMPLETE,
|
|
7
7
|
DATA,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
messageTier,
|
|
17
17
|
monotonicNs,
|
|
18
18
|
state
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4F2ZFD5L.js";
|
|
20
20
|
|
|
21
21
|
// src/graph/graph.ts
|
|
22
22
|
var PATH_SEP = "::";
|
|
@@ -1902,4 +1902,4 @@ export {
|
|
|
1902
1902
|
Graph,
|
|
1903
1903
|
reachable
|
|
1904
1904
|
};
|
|
1905
|
-
//# sourceMappingURL=chunk-
|
|
1905
|
+
//# sourceMappingURL=chunk-VQWLA6XQ.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
producer,
|
|
12
12
|
state,
|
|
13
13
|
wallClockNs
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4F2ZFD5L.js";
|
|
15
15
|
|
|
16
16
|
// src/extra/observable.ts
|
|
17
17
|
import { Observable } from "rxjs";
|
|
@@ -778,4 +778,4 @@ export {
|
|
|
778
778
|
reactiveLog,
|
|
779
779
|
logSlice
|
|
780
780
|
};
|
|
781
|
-
//# sourceMappingURL=chunk-
|
|
781
|
+
//# sourceMappingURL=chunk-X732W3QA.js.map
|
|
@@ -5,8 +5,9 @@ import {
|
|
|
5
5
|
describeNode,
|
|
6
6
|
metaSnapshot,
|
|
7
7
|
resolveDescribeFields
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6OLNYOGU.js";
|
|
9
9
|
import {
|
|
10
|
+
CLEANUP_RESULT,
|
|
10
11
|
COMPLETE,
|
|
11
12
|
DATA,
|
|
12
13
|
DEFAULT_ACTOR,
|
|
@@ -23,6 +24,7 @@ import {
|
|
|
23
24
|
accessHintForGuard,
|
|
24
25
|
advanceVersion,
|
|
25
26
|
batch,
|
|
27
|
+
cleanupResult,
|
|
26
28
|
createVersioning,
|
|
27
29
|
defaultHash,
|
|
28
30
|
derived,
|
|
@@ -47,14 +49,16 @@ import {
|
|
|
47
49
|
propagatesToMeta,
|
|
48
50
|
state,
|
|
49
51
|
wallClockNs
|
|
50
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-4F2ZFD5L.js";
|
|
51
53
|
|
|
52
54
|
// src/core/index.ts
|
|
53
55
|
var core_exports = {};
|
|
54
56
|
__export(core_exports, {
|
|
57
|
+
CLEANUP_RESULT: () => CLEANUP_RESULT,
|
|
55
58
|
COMPLETE: () => COMPLETE,
|
|
56
59
|
DATA: () => DATA,
|
|
57
60
|
DEFAULT_ACTOR: () => DEFAULT_ACTOR,
|
|
61
|
+
DEFAULT_DOWN: () => DEFAULT_DOWN,
|
|
58
62
|
DIRTY: () => DIRTY,
|
|
59
63
|
DynamicNodeImpl: () => DynamicNodeImpl,
|
|
60
64
|
ERROR: () => ERROR,
|
|
@@ -68,6 +72,8 @@ __export(core_exports, {
|
|
|
68
72
|
accessHintForGuard: () => accessHintForGuard,
|
|
69
73
|
advanceVersion: () => advanceVersion,
|
|
70
74
|
batch: () => batch,
|
|
75
|
+
bridge: () => bridge,
|
|
76
|
+
cleanupResult: () => cleanupResult,
|
|
71
77
|
createVersioning: () => createVersioning,
|
|
72
78
|
defaultHash: () => defaultHash,
|
|
73
79
|
derived: () => derived,
|
|
@@ -97,7 +103,60 @@ __export(core_exports, {
|
|
|
97
103
|
wallClockNs: () => wallClockNs
|
|
98
104
|
});
|
|
99
105
|
|
|
106
|
+
// src/core/bridge.ts
|
|
107
|
+
var DEFAULT_DOWN = [
|
|
108
|
+
DATA,
|
|
109
|
+
DIRTY,
|
|
110
|
+
RESOLVED,
|
|
111
|
+
COMPLETE,
|
|
112
|
+
ERROR,
|
|
113
|
+
TEARDOWN,
|
|
114
|
+
PAUSE,
|
|
115
|
+
RESUME,
|
|
116
|
+
INVALIDATE
|
|
117
|
+
];
|
|
118
|
+
var STANDARD_TYPES = /* @__PURE__ */ new Set([
|
|
119
|
+
DATA,
|
|
120
|
+
DIRTY,
|
|
121
|
+
RESOLVED,
|
|
122
|
+
COMPLETE,
|
|
123
|
+
ERROR,
|
|
124
|
+
TEARDOWN,
|
|
125
|
+
PAUSE,
|
|
126
|
+
RESUME,
|
|
127
|
+
INVALIDATE
|
|
128
|
+
]);
|
|
129
|
+
function bridge(from, to, opts) {
|
|
130
|
+
const allowedDown = new Set(opts?.down ?? DEFAULT_DOWN);
|
|
131
|
+
const onMessage = (msg, _depIndex, _actions) => {
|
|
132
|
+
const type = msg[0];
|
|
133
|
+
if (!STANDARD_TYPES.has(type)) {
|
|
134
|
+
to.down([msg]);
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
if (type === COMPLETE || type === ERROR) {
|
|
138
|
+
if (allowedDown.has(type)) {
|
|
139
|
+
to.down([msg]);
|
|
140
|
+
}
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
if (!allowedDown.has(type)) {
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
to.down([msg]);
|
|
147
|
+
return true;
|
|
148
|
+
};
|
|
149
|
+
return node([from], void 0, {
|
|
150
|
+
name: opts?.name,
|
|
151
|
+
describeKind: "effect",
|
|
152
|
+
onMessage,
|
|
153
|
+
meta: { _internal: true }
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
100
157
|
export {
|
|
158
|
+
DEFAULT_DOWN,
|
|
159
|
+
bridge,
|
|
101
160
|
core_exports
|
|
102
161
|
};
|
|
103
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-XWMTVV2D.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 * 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":[]}
|
|
@@ -649,6 +649,7 @@ function advanceVersion(info, newValue, hashFn) {
|
|
|
649
649
|
|
|
650
650
|
// src/core/node.ts
|
|
651
651
|
var NO_VALUE = /* @__PURE__ */ Symbol.for("graphrefly/NO_VALUE");
|
|
652
|
+
var CLEANUP_RESULT = /* @__PURE__ */ Symbol.for("graphrefly/CLEANUP_RESULT");
|
|
652
653
|
function createIntBitSet() {
|
|
653
654
|
let bits = 0;
|
|
654
655
|
return {
|
|
@@ -711,6 +712,7 @@ function createBitSet(size) {
|
|
|
711
712
|
}
|
|
712
713
|
var isNodeArray = (value) => Array.isArray(value);
|
|
713
714
|
var isNodeOptions = (value) => typeof value === "object" && value != null && !Array.isArray(value);
|
|
715
|
+
var isCleanupResult = (value) => typeof value === "object" && value !== null && CLEANUP_RESULT in value;
|
|
714
716
|
var isCleanupFn = (value) => typeof value === "function";
|
|
715
717
|
var statusAfterMessage = (status, msg) => {
|
|
716
718
|
const t = msg[0];
|
|
@@ -1126,6 +1128,14 @@ var NodeImpl = class {
|
|
|
1126
1128
|
this._lastDepValues = depValues;
|
|
1127
1129
|
this._inspectorHook?.({ kind: "run", depValues });
|
|
1128
1130
|
const out = this._fn(depValues, this._actions);
|
|
1131
|
+
if (isCleanupResult(out)) {
|
|
1132
|
+
this._cleanup = out.cleanup;
|
|
1133
|
+
if (this._manualEmitUsed) return;
|
|
1134
|
+
if ("value" in out) {
|
|
1135
|
+
this._emitAutoValue(out.value);
|
|
1136
|
+
}
|
|
1137
|
+
return;
|
|
1138
|
+
}
|
|
1129
1139
|
if (isCleanupFn(out)) {
|
|
1130
1140
|
this._cleanup = out;
|
|
1131
1141
|
return;
|
|
@@ -2594,7 +2604,6 @@ function resolveDescribeFields(detail, fields) {
|
|
|
2594
2604
|
case "full":
|
|
2595
2605
|
return null;
|
|
2596
2606
|
// null = include everything
|
|
2597
|
-
case "minimal":
|
|
2598
2607
|
default:
|
|
2599
2608
|
return /* @__PURE__ */ new Set(["type", "deps"]);
|
|
2600
2609
|
}
|