@dudousxd/nestjs-catalog 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/catalog.events.d.ts +26 -1
- package/dist/catalog.events.js +8 -0
- package/dist/catalog.pipeline.d.ts +713 -6
- package/dist/catalog.pipeline.js +487 -11
- package/dist/client.d.ts +2 -2
- package/dist/client.js +34 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -3
- package/package.json +1 -1
package/dist/catalog.events.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const CATALOG_LIB = "catalog";
|
|
16
16
|
/** Every event name this package emits. Exported so a watcher can claim them. */
|
|
17
|
-
export declare const CATALOG_EVENTS: readonly ["schema.changed", "snapshot.written", "snapshot.committed", "snapshot.dropped", "type.curated", "overlay.reset", "connector.run.started", "connector.run.finished", "transform.changed", "workflow.changed", "query.shared", "dashboard.shared"];
|
|
17
|
+
export declare const CATALOG_EVENTS: readonly ["schema.changed", "snapshot.written", "snapshot.committed", "snapshot.dropped", "type.curated", "overlay.reset", "connector.run.started", "connector.run.finished", "transform.changed", "reusable-node.changed", "workflow.changed", "query.shared", "dashboard.shared"];
|
|
18
18
|
export type CatalogEvent = (typeof CATALOG_EVENTS)[number];
|
|
19
19
|
/**
|
|
20
20
|
* Where each event sits in the life of one load.
|
|
@@ -286,6 +286,31 @@ export interface CatalogEventPayloads {
|
|
|
286
286
|
version: number;
|
|
287
287
|
changedBy: string;
|
|
288
288
|
};
|
|
289
|
+
/**
|
|
290
|
+
* Someone changed a node body that several graphs share.
|
|
291
|
+
*
|
|
292
|
+
* The third authoring event, and the one that answers a question the other two
|
|
293
|
+
* cannot. `transform.changed` and `workflow.changed` both name something
|
|
294
|
+
* inside the graph that changed behaviour; this names a change **outside**
|
|
295
|
+
* every graph it affects. A load that started reading a different query last
|
|
296
|
+
* Tuesday, whose own graph has not been touched in a month, has its whole
|
|
297
|
+
* explanation here and nowhere else — which is precisely the silence that
|
|
298
|
+
* makes shared nodes dangerous and precisely what this event is for.
|
|
299
|
+
*
|
|
300
|
+
* It carries no list of the graphs downstream, deliberately. That list is a
|
|
301
|
+
* query (`GET reusable-nodes/:id/workflows`) and it is answered as of *now*,
|
|
302
|
+
* whereas an event is a record of one moment; freezing a list into the trail
|
|
303
|
+
* would produce a fact that is wrong by the following week and looks
|
|
304
|
+
* authoritative.
|
|
305
|
+
*/
|
|
306
|
+
'reusable-node.changed': {
|
|
307
|
+
reusableNodeId: string;
|
|
308
|
+
name: string;
|
|
309
|
+
/** `source` or `sink` — see `REUSABLE_NODE_KINDS`. */
|
|
310
|
+
kind: string;
|
|
311
|
+
version: number;
|
|
312
|
+
changedBy: string;
|
|
313
|
+
};
|
|
289
314
|
/**
|
|
290
315
|
* Someone changed the wiring rather than the code.
|
|
291
316
|
*
|
package/dist/catalog.events.js
CHANGED
|
@@ -32,6 +32,7 @@ exports.CATALOG_EVENTS = [
|
|
|
32
32
|
'connector.run.started',
|
|
33
33
|
'connector.run.finished',
|
|
34
34
|
'transform.changed',
|
|
35
|
+
'reusable-node.changed',
|
|
35
36
|
'workflow.changed',
|
|
36
37
|
'query.shared',
|
|
37
38
|
'dashboard.shared',
|
|
@@ -63,6 +64,13 @@ exports.CATALOG_EVENT_PHASE = {
|
|
|
63
64
|
// one an earlier rank than the other would assert a causal order between two
|
|
64
65
|
// edits that have none.
|
|
65
66
|
'workflow.changed': 1,
|
|
67
|
+
// And the same rank again, for the same argument one step further out.
|
|
68
|
+
// Editing a reusable node is an authoring act that precedes the run being
|
|
69
|
+
// investigated, exactly as editing a transform or rewiring a graph is — and
|
|
70
|
+
// it is the one of the three that can change a load nobody edited, so a trace
|
|
71
|
+
// that could not place it beside the others would be missing the entry that
|
|
72
|
+
// explains the surprise.
|
|
73
|
+
'reusable-node.changed': 1,
|
|
66
74
|
// Curation carries no snapshot id, so it never lands inside a trace and this
|
|
67
75
|
// rank is never consulted. It is written out rather than left to the fallback
|
|
68
76
|
// because the type demands every event have one, and a `Record` that has to
|