@blue-labs/document-processor 1.27.0 → 1.28.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/BlueDocumentProcessor.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +369 -315
- package/dist/merge/index.d.ts +3 -0
- package/dist/merge/index.d.ts.map +1 -0
- package/dist/merge/processors/ExpressionPreserver.d.ts +15 -0
- package/dist/merge/processors/ExpressionPreserver.d.ts.map +1 -0
- package/dist/merge/processors/index.d.ts +2 -0
- package/dist/merge/processors/index.d.ts.map +1 -0
- package/dist/merge/utils/default.d.ts +7 -0
- package/dist/merge/utils/default.d.ts.map +1 -0
- package/dist/processors/SequentialWorkflowProcessor/steps/UpdateDocumentExecutor.d.ts.map +1 -1
- package/dist/processors/SequentialWorkflowProcessor/utils/ExpressionEvaluator.d.ts.map +1 -1
- package/dist/testUtils.d.ts.map +1 -1
- package/dist/utils/checkpoint.d.ts.map +1 -1
- package/dist/utils/document.d.ts +8 -5
- package/dist/utils/document.d.ts.map +1 -1
- package/dist/utils/expressionUtils.d.ts +14 -0
- package/dist/utils/expressionUtils.d.ts.map +1 -0
- package/dist/utils/initialized.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var l = (
|
|
4
|
-
import { ProcessEmbeddedSchema as
|
|
5
|
-
import { applyBlueNodePatch as
|
|
6
|
-
import { deepFreeze as
|
|
7
|
-
import { blueIds as
|
|
8
|
-
const
|
|
1
|
+
var me = Object.defineProperty;
|
|
2
|
+
var ye = (s, e, t) => e in s ? me(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var l = (s, e, t) => ye(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ProcessEmbeddedSchema as D, ChannelEventCheckpointSchema as ge, blueIds as m, InitializedMarkerSchema as Ee, CompositeTimelineChannelSchema as we, DocumentUpdateChannelSchema as ve, EmbeddedNodeChannelSchema as _, LifecycleEventSchema as be, TimelineEntrySchema as N, OperationSchema as Te, OperationRequestSchema as Pe, UpdateDocumentSchema as $, TriggerEventSchema as q, JavaScriptCodeSchema as A, SequentialWorkflowSchema as Se, SequentialWorkflowOperationSchema as Ce, TimelineChannelSchema as ke } from "@blue-repository/core-dev";
|
|
5
|
+
import { applyBlueNodePatch as G, BlueNodeTypeSchema as w, BlueNode as Ie, isBigNumber as x, MergingProcessors as k } from "@blue-labs/language";
|
|
6
|
+
import { deepFreeze as Ne, isNonNullable as M, deepContains as ee } from "@blue-labs/shared-utils";
|
|
7
|
+
import { blueIds as te, MyOSTimelineEntrySchema as ne, MyOSTimelineChannelSchema as Oe, MyOSAgentEventSchema as Be, MyOSAgentChannelSchema as Me } from "@blue-repository/myos-dev";
|
|
8
|
+
const $e = (s, e) => ({
|
|
9
9
|
on: (t, n) => ({ end: () => n(null) })
|
|
10
10
|
});
|
|
11
|
-
async function
|
|
11
|
+
async function qe(s) {
|
|
12
12
|
return new Promise((e, t) => {
|
|
13
|
-
|
|
13
|
+
$e().on("error", t).end();
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const b = (...s) => s.map((e, t) => {
|
|
17
17
|
if (typeof e != "string") return "";
|
|
18
18
|
if (t === 0 && e === "/") return "/";
|
|
19
19
|
const n = t > 0 ? e.replace(/^\/+/, "") : e;
|
|
20
|
-
return t <
|
|
20
|
+
return t < s.length - 1 ? n.replace(/\/+$/, "") : n;
|
|
21
21
|
}).filter(Boolean).join("/").replace(/\/{2,}/g, "/");
|
|
22
|
-
class
|
|
22
|
+
class oe {
|
|
23
23
|
constructor(e, t, n, o) {
|
|
24
24
|
l(this, "actions", []);
|
|
25
25
|
this.getDocument = e, this.taskInfo = t, this.blue = n, this.onFlush = o;
|
|
26
26
|
}
|
|
27
27
|
get(e) {
|
|
28
|
-
const t = this.getDocument(), n =
|
|
28
|
+
const t = this.getDocument(), n = b(this.taskInfo.nodePath, e);
|
|
29
29
|
return t.get(n);
|
|
30
30
|
}
|
|
31
31
|
addPatch(e) {
|
|
@@ -33,7 +33,7 @@ class G {
|
|
|
33
33
|
kind: "patch",
|
|
34
34
|
patch: {
|
|
35
35
|
...e,
|
|
36
|
-
path:
|
|
36
|
+
path: b(this.taskInfo.nodePath, e.path)
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -56,7 +56,7 @@ class G {
|
|
|
56
56
|
return this.taskInfo.nodePath;
|
|
57
57
|
}
|
|
58
58
|
resolvePath(e) {
|
|
59
|
-
return
|
|
59
|
+
return b(this.taskInfo.nodePath, e);
|
|
60
60
|
}
|
|
61
61
|
getTaskInfo() {
|
|
62
62
|
return this.taskInfo;
|
|
@@ -68,76 +68,82 @@ class G {
|
|
|
68
68
|
loadExternalModule(e) {
|
|
69
69
|
if (!/^https?:\/\//.test(e))
|
|
70
70
|
throw new Error("Only http/https URLs are allowed");
|
|
71
|
-
return
|
|
71
|
+
return qe();
|
|
72
72
|
}
|
|
73
73
|
loadBlueContent(e) {
|
|
74
74
|
throw new Error("Not implemented");
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
class
|
|
77
|
+
class re extends Error {
|
|
78
78
|
constructor(e, t) {
|
|
79
79
|
super(`Cannot apply patch ${JSON.stringify(e)}`), this.patch = e, this.cause = t, this.name = "PatchApplicationError";
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
class
|
|
82
|
+
class ae extends Error {
|
|
83
83
|
constructor(e, t, n) {
|
|
84
84
|
super(
|
|
85
85
|
`Patch ${JSON.stringify(e)} touches "${e.op === "move" || e.op === "copy" ? `${e.from} → ${e.path}` : e.path}" which is inside embedded document "${t}" (Process Embedded @ "${n}")`
|
|
86
86
|
), this.patch = e, this.offendingPath = t, this.contractNodePath = n, this.name = "EmbeddedDocumentModificationError";
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
class
|
|
89
|
+
class F extends Error {
|
|
90
90
|
constructor(e, t) {
|
|
91
91
|
super(`Failed to evaluate expression "${e}"`), this.code = e, this.cause = t, this.name = "ExpressionEvaluationError";
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
class
|
|
94
|
+
class L extends Error {
|
|
95
95
|
constructor(e, t) {
|
|
96
96
|
super(`Failed to evaluate code block "${e}"`), this.code = e, this.cause = t, this.name = "CodeBlockEvaluationError";
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
|
|
99
|
+
function I(s) {
|
|
100
|
+
return Ne(s);
|
|
101
|
+
}
|
|
102
|
+
function O(s) {
|
|
103
|
+
return s.clone();
|
|
104
|
+
}
|
|
105
|
+
function W(s, e, t = "/", n = []) {
|
|
106
|
+
const o = s.getContracts() ?? {};
|
|
101
107
|
for (const [r, a] of Object.entries(o))
|
|
102
|
-
if (
|
|
108
|
+
if (w.isTypeOf(
|
|
103
109
|
a,
|
|
104
|
-
|
|
110
|
+
D
|
|
105
111
|
)) {
|
|
106
112
|
const h = e.nodeToSchemaOutput(
|
|
107
113
|
a,
|
|
108
|
-
|
|
114
|
+
D
|
|
109
115
|
).paths ?? [];
|
|
110
116
|
for (const u of h)
|
|
111
117
|
n.push({
|
|
112
|
-
absPath:
|
|
113
|
-
contractPath:
|
|
118
|
+
absPath: b(t, u),
|
|
119
|
+
contractPath: b(t, `contracts/${r}`)
|
|
114
120
|
});
|
|
115
121
|
}
|
|
116
|
-
for (const [r, a] of Object.entries(
|
|
117
|
-
W(a, e,
|
|
122
|
+
for (const [r, a] of Object.entries(s.getProperties() ?? {}))
|
|
123
|
+
W(a, e, b(t, r), n);
|
|
118
124
|
return n;
|
|
119
125
|
}
|
|
120
|
-
function
|
|
121
|
-
return
|
|
126
|
+
function z(s, e) {
|
|
127
|
+
return s === e || s.startsWith(e.endsWith("/") ? e : e + "/");
|
|
122
128
|
}
|
|
123
|
-
function
|
|
124
|
-
if (!e.length) return
|
|
125
|
-
let t =
|
|
129
|
+
function U(s, e) {
|
|
130
|
+
if (!e.length) return s;
|
|
131
|
+
let t = O(s);
|
|
126
132
|
for (const n of e)
|
|
127
133
|
try {
|
|
128
|
-
t =
|
|
134
|
+
t = G(t, n, !0);
|
|
129
135
|
} catch (o) {
|
|
130
|
-
throw new
|
|
136
|
+
throw new re(n, o);
|
|
131
137
|
}
|
|
132
138
|
return I(t);
|
|
133
139
|
}
|
|
134
|
-
function
|
|
135
|
-
return
|
|
140
|
+
function f(s) {
|
|
141
|
+
return s != null;
|
|
136
142
|
}
|
|
137
|
-
function
|
|
138
|
-
return
|
|
143
|
+
function P(s) {
|
|
144
|
+
return s instanceof Ie;
|
|
139
145
|
}
|
|
140
|
-
class
|
|
146
|
+
class Ae {
|
|
141
147
|
constructor(e = [], t = (n, o) => n < o ? -1 : n > o ? 1 : 0) {
|
|
142
148
|
l(this, "data");
|
|
143
149
|
l(this, "length");
|
|
@@ -169,35 +175,35 @@ class Ne {
|
|
|
169
175
|
const { data: t, compare: n } = this, o = this.length >> 1, r = t[e];
|
|
170
176
|
for (; e < o; ) {
|
|
171
177
|
let a = (e << 1) + 1;
|
|
172
|
-
const
|
|
173
|
-
if (
|
|
178
|
+
const c = a + 1;
|
|
179
|
+
if (c < this.length && n(t[c], t[a]) < 0 && (a = c), n(t[a], r) >= 0) break;
|
|
174
180
|
t[e] = t[a], e = a;
|
|
175
181
|
}
|
|
176
182
|
t[e] = r;
|
|
177
183
|
}
|
|
178
184
|
}
|
|
179
|
-
const
|
|
180
|
-
-
|
|
185
|
+
const De = (s, e, t, n, o, r) => [
|
|
186
|
+
-s,
|
|
181
187
|
e,
|
|
182
188
|
t,
|
|
183
189
|
n,
|
|
184
190
|
o,
|
|
185
191
|
r
|
|
186
|
-
],
|
|
187
|
-
for (let t = 0; t <
|
|
188
|
-
const n =
|
|
192
|
+
], xe = (s, e) => {
|
|
193
|
+
for (let t = 0; t < s.key.length; t++) {
|
|
194
|
+
const n = s.key[t], o = e.key[t];
|
|
189
195
|
if (n !== o)
|
|
190
196
|
return typeof n == "number" && typeof o == "number" ? n - o : typeof n == "string" && typeof o == "string" ? n.localeCompare(o) : 0;
|
|
191
197
|
}
|
|
192
198
|
return 0;
|
|
193
199
|
};
|
|
194
|
-
class
|
|
200
|
+
class je {
|
|
195
201
|
/**
|
|
196
202
|
* Creates a new task queue with the task key comparator
|
|
197
203
|
*/
|
|
198
204
|
constructor() {
|
|
199
205
|
l(this, "queue");
|
|
200
|
-
this.queue = new
|
|
206
|
+
this.queue = new Ae([], xe);
|
|
201
207
|
}
|
|
202
208
|
/**
|
|
203
209
|
* Adds a task to the queue
|
|
@@ -222,7 +228,7 @@ class Me {
|
|
|
222
228
|
return this.queue.length;
|
|
223
229
|
}
|
|
224
230
|
}
|
|
225
|
-
class
|
|
231
|
+
class Ve {
|
|
226
232
|
/**
|
|
227
233
|
* Creates a new contract registry
|
|
228
234
|
*
|
|
@@ -277,7 +283,7 @@ class $e {
|
|
|
277
283
|
return this.processors.values();
|
|
278
284
|
}
|
|
279
285
|
}
|
|
280
|
-
class
|
|
286
|
+
class We {
|
|
281
287
|
constructor() {
|
|
282
288
|
l(this, "isEnabled");
|
|
283
289
|
this.isEnabled = process.env.TRACE_BLUE_ENABLED === "true";
|
|
@@ -344,8 +350,8 @@ class qe {
|
|
|
344
350
|
return this.isEnabled;
|
|
345
351
|
}
|
|
346
352
|
}
|
|
347
|
-
const
|
|
348
|
-
class
|
|
353
|
+
const Je = 64;
|
|
354
|
+
class _e {
|
|
349
355
|
/**
|
|
350
356
|
* Creates a new event router
|
|
351
357
|
*
|
|
@@ -356,7 +362,7 @@ class De {
|
|
|
356
362
|
*/
|
|
357
363
|
constructor(e, t, n, o, r) {
|
|
358
364
|
l(this, "traceManager");
|
|
359
|
-
this.blue = e, this.registry = t, this.queue = n, this.getNextTaskId = o, this.getNextEventSeq = r, this.traceManager = new
|
|
365
|
+
this.blue = e, this.registry = t, this.queue = n, this.getNextTaskId = o, this.getNextEventSeq = r, this.traceManager = new We();
|
|
360
366
|
}
|
|
361
367
|
/**
|
|
362
368
|
* Routes an event to matching contracts in the document
|
|
@@ -379,10 +385,10 @@ class De {
|
|
|
379
385
|
return this.route(e, h, n, o, r);
|
|
380
386
|
}
|
|
381
387
|
}
|
|
382
|
-
const a =
|
|
383
|
-
|
|
388
|
+
const a = b("/", t.join("/")), c = e.get(a);
|
|
389
|
+
P(c) && await this.traverseContracts({
|
|
384
390
|
doc: e,
|
|
385
|
-
node:
|
|
391
|
+
node: c,
|
|
386
392
|
nodePath: a,
|
|
387
393
|
event: n,
|
|
388
394
|
afterTaskId: o,
|
|
@@ -400,7 +406,7 @@ class De {
|
|
|
400
406
|
nodePath: o,
|
|
401
407
|
event: r,
|
|
402
408
|
afterTaskId: a,
|
|
403
|
-
pathSegments:
|
|
409
|
+
pathSegments: c,
|
|
404
410
|
inlineDepth: i
|
|
405
411
|
} = e;
|
|
406
412
|
if (!this.shouldSkipForChannel(r, o))
|
|
@@ -418,7 +424,7 @@ class De {
|
|
|
418
424
|
contractName: h,
|
|
419
425
|
contractNode: u,
|
|
420
426
|
event: r
|
|
421
|
-
}, y = new
|
|
427
|
+
}, y = new oe(() => t, p, this.blue);
|
|
422
428
|
if (d.supports(r, u, y, h))
|
|
423
429
|
switch (d.role) {
|
|
424
430
|
case "adapter":
|
|
@@ -439,7 +445,7 @@ class De {
|
|
|
439
445
|
contractName: h,
|
|
440
446
|
nodePath: o,
|
|
441
447
|
event: r,
|
|
442
|
-
depth:
|
|
448
|
+
depth: c.length,
|
|
443
449
|
afterTaskId: a
|
|
444
450
|
});
|
|
445
451
|
break;
|
|
@@ -450,57 +456,57 @@ class De {
|
|
|
450
456
|
* Processes an adapter contract and routes any emitted events
|
|
451
457
|
*/
|
|
452
458
|
async processAdapter(e) {
|
|
453
|
-
var
|
|
459
|
+
var v;
|
|
454
460
|
const {
|
|
455
461
|
cp: t,
|
|
456
462
|
event: n,
|
|
457
463
|
contractNode: o,
|
|
458
464
|
ctx: r,
|
|
459
465
|
contractName: a,
|
|
460
|
-
doc:
|
|
466
|
+
doc: c,
|
|
461
467
|
afterTaskId: i,
|
|
462
468
|
inlineDepth: h
|
|
463
469
|
} = e;
|
|
464
|
-
if (h >=
|
|
470
|
+
if (h >= Je)
|
|
465
471
|
throw new Error("Adapter recursion limit reached");
|
|
466
472
|
const u = this.traceManager.addHop(
|
|
467
473
|
n,
|
|
468
|
-
((
|
|
474
|
+
((v = r.getTaskInfo()) == null ? void 0 : v.nodePath) ?? "",
|
|
469
475
|
a
|
|
470
476
|
);
|
|
471
477
|
await t.handle(u, o, r, a);
|
|
472
478
|
const d = await r.flush();
|
|
473
|
-
if (d.find((
|
|
479
|
+
if (d.find((T) => T.kind === "patch"))
|
|
474
480
|
throw new Error(
|
|
475
481
|
`Contract "${a}" (adapter) attempted to patch the document`
|
|
476
482
|
);
|
|
477
|
-
const y = d.filter((
|
|
478
|
-
for (const
|
|
479
|
-
await this.route(
|
|
483
|
+
const y = d.filter((T) => T.kind === "event");
|
|
484
|
+
for (const T of y)
|
|
485
|
+
await this.route(c, [], T.event, i, h + 1);
|
|
480
486
|
}
|
|
481
487
|
/**
|
|
482
488
|
* Schedules a handler contract for future execution
|
|
483
489
|
*/
|
|
484
490
|
scheduleHandler(e) {
|
|
485
|
-
const { contractNode: t, contractName: n, nodePath: o, event: r, depth: a, afterTaskId:
|
|
491
|
+
const { contractNode: t, contractName: n, nodePath: o, event: r, depth: a, afterTaskId: c } = e, i = t.getType();
|
|
486
492
|
if (!i) {
|
|
487
493
|
console.warn(`Contract node type is not defined for: ${n}`);
|
|
488
494
|
return;
|
|
489
495
|
}
|
|
490
|
-
const h = this.registry.orderOf(i), u = t.get("/order"), d =
|
|
496
|
+
const h = this.registry.orderOf(i), u = t.get("/order"), d = x(u) ? u.toNumber() : 0, p = this.getNextTaskId() + c, y = De(
|
|
491
497
|
a,
|
|
492
498
|
r.seq,
|
|
493
499
|
h,
|
|
494
500
|
d,
|
|
495
501
|
n,
|
|
496
502
|
p
|
|
497
|
-
),
|
|
503
|
+
), v = this.traceManager.addHop(r, o, n);
|
|
498
504
|
this.queue.push({
|
|
499
505
|
key: y,
|
|
500
506
|
nodePath: o,
|
|
501
507
|
contractName: n,
|
|
502
508
|
contractNode: t,
|
|
503
|
-
event:
|
|
509
|
+
event: v
|
|
504
510
|
});
|
|
505
511
|
}
|
|
506
512
|
/**
|
|
@@ -510,25 +516,25 @@ class De {
|
|
|
510
516
|
return e.source === "channel" && !!e.originNodePath && e.originNodePath !== t;
|
|
511
517
|
}
|
|
512
518
|
}
|
|
513
|
-
const
|
|
514
|
-
(t instanceof
|
|
515
|
-
`[Blue] Failed to apply patches for contract "${
|
|
519
|
+
const Fe = (s, e, t) => {
|
|
520
|
+
(t instanceof re || t instanceof ae) && console.error(
|
|
521
|
+
`[Blue] Failed to apply patches for contract "${s}" on event ${JSON.stringify(e)}`,
|
|
516
522
|
t
|
|
517
523
|
);
|
|
518
524
|
};
|
|
519
|
-
function
|
|
520
|
-
const t =
|
|
521
|
-
if (!
|
|
525
|
+
function R(s, e) {
|
|
526
|
+
const t = O(s), n = (o) => {
|
|
527
|
+
if (!P(o)) return;
|
|
522
528
|
const r = o.getContracts();
|
|
523
|
-
(!(r != null && r.checkpoint) || !
|
|
529
|
+
(!(r != null && r.checkpoint) || !w.isTypeOf(
|
|
524
530
|
r.checkpoint,
|
|
525
|
-
|
|
531
|
+
ge
|
|
526
532
|
)) && o.addContract(
|
|
527
533
|
"checkpoint",
|
|
528
534
|
e.jsonValueToNode({
|
|
529
535
|
type: {
|
|
530
536
|
name: "Channel Event Checkpoint",
|
|
531
|
-
blueId:
|
|
537
|
+
blueId: m["Channel Event Checkpoint"]
|
|
532
538
|
},
|
|
533
539
|
lastEvents: {}
|
|
534
540
|
})
|
|
@@ -537,34 +543,34 @@ function U(c, e) {
|
|
|
537
543
|
n(t);
|
|
538
544
|
for (const { absPath: o } of W(t, e)) {
|
|
539
545
|
const r = t.get(o);
|
|
540
|
-
|
|
546
|
+
P(r) && n(r);
|
|
541
547
|
}
|
|
542
548
|
return I(t);
|
|
543
549
|
}
|
|
544
|
-
function
|
|
545
|
-
const t =
|
|
546
|
-
return
|
|
550
|
+
function Le(s, e) {
|
|
551
|
+
const t = O(s);
|
|
552
|
+
return P(t) && (se(t, e) || t.addContract(
|
|
547
553
|
"initialized",
|
|
548
554
|
e.jsonValueToNode({
|
|
549
555
|
type: {
|
|
550
556
|
name: "Initialized Marker",
|
|
551
|
-
blueId:
|
|
557
|
+
blueId: m["Initialized Marker"]
|
|
552
558
|
}
|
|
553
559
|
})
|
|
554
|
-
), I(t)
|
|
560
|
+
)), I(t);
|
|
555
561
|
}
|
|
556
|
-
function
|
|
557
|
-
const t =
|
|
562
|
+
function se(s, e) {
|
|
563
|
+
const t = s.getContracts();
|
|
558
564
|
return Object.values(t ?? {}).some(
|
|
559
|
-
(n) => e.isTypeOf(n,
|
|
565
|
+
(n) => e.isTypeOf(n, Ee, {
|
|
560
566
|
checkSchemaExtensions: !0
|
|
561
567
|
})
|
|
562
568
|
);
|
|
563
569
|
}
|
|
564
|
-
class
|
|
570
|
+
class ze {
|
|
565
571
|
constructor(e) {
|
|
566
572
|
l(this, "contractType", "Channel Event Checkpoint");
|
|
567
|
-
l(this, "contractBlueId",
|
|
573
|
+
l(this, "contractBlueId", m["Channel Event Checkpoint"]);
|
|
568
574
|
l(this, "role", "handler");
|
|
569
575
|
this.cache = e;
|
|
570
576
|
}
|
|
@@ -579,8 +585,8 @@ class xe {
|
|
|
579
585
|
this.cache.record(r, e, o);
|
|
580
586
|
}
|
|
581
587
|
}
|
|
582
|
-
const
|
|
583
|
-
class
|
|
588
|
+
const H = (s, e) => s.get(e) !== void 0;
|
|
589
|
+
class Ue {
|
|
584
590
|
constructor() {
|
|
585
591
|
l(this, "firstSeen", /* @__PURE__ */ new Map());
|
|
586
592
|
}
|
|
@@ -593,14 +599,14 @@ class Je {
|
|
|
593
599
|
const t = [];
|
|
594
600
|
for (const { docBase: n, event: o, eventBlueId: r } of this.firstSeen.values()) {
|
|
595
601
|
if (!o.channelName) continue;
|
|
596
|
-
const a =
|
|
602
|
+
const a = b(
|
|
597
603
|
n,
|
|
598
604
|
"contracts/checkpoint/lastEvents",
|
|
599
605
|
o.channelName
|
|
600
|
-
),
|
|
601
|
-
|
|
602
|
-
op:
|
|
603
|
-
path:
|
|
606
|
+
), c = `${a}/blueId`;
|
|
607
|
+
H(e, a) ? t.push({
|
|
608
|
+
op: H(e, c) ? "replace" : "add",
|
|
609
|
+
path: c,
|
|
604
610
|
val: r
|
|
605
611
|
}) : t.push({
|
|
606
612
|
op: "add",
|
|
@@ -614,7 +620,7 @@ class Je {
|
|
|
614
620
|
this.firstSeen.clear();
|
|
615
621
|
}
|
|
616
622
|
}
|
|
617
|
-
class
|
|
623
|
+
class S {
|
|
618
624
|
constructor() {
|
|
619
625
|
l(this, "role", "adapter");
|
|
620
626
|
}
|
|
@@ -626,14 +632,14 @@ class P {
|
|
|
626
632
|
return e.source !== "channel";
|
|
627
633
|
}
|
|
628
634
|
}
|
|
629
|
-
class
|
|
635
|
+
class Re extends S {
|
|
630
636
|
constructor() {
|
|
631
637
|
super(...arguments);
|
|
632
638
|
l(this, "contractType", "Composite Timeline Channel");
|
|
633
|
-
l(this, "contractBlueId",
|
|
639
|
+
l(this, "contractBlueId", m["Composite Timeline Channel"]);
|
|
634
640
|
}
|
|
635
641
|
supports(t, n, o) {
|
|
636
|
-
const r = o.getBlue().nodeToSchemaOutput(n,
|
|
642
|
+
const r = o.getBlue().nodeToSchemaOutput(n, we);
|
|
637
643
|
return !r.channels || !t.channelName ? !1 : r.channels.includes(t.channelName);
|
|
638
644
|
}
|
|
639
645
|
handle(t, n, o, r) {
|
|
@@ -644,18 +650,18 @@ class Ve extends P {
|
|
|
644
650
|
});
|
|
645
651
|
}
|
|
646
652
|
}
|
|
647
|
-
class
|
|
653
|
+
class He extends S {
|
|
648
654
|
constructor() {
|
|
649
655
|
super(...arguments);
|
|
650
656
|
l(this, "contractType", "Document Update Channel");
|
|
651
|
-
l(this, "contractBlueId",
|
|
657
|
+
l(this, "contractBlueId", m["Document Update Channel"]);
|
|
652
658
|
}
|
|
653
659
|
supports(t, n, o, r) {
|
|
654
660
|
if (!this.baseSupports(t)) return !1;
|
|
655
|
-
const a = o.getBlue().nodeToSchemaOutput(n,
|
|
656
|
-
if (!
|
|
661
|
+
const a = o.getBlue().nodeToSchemaOutput(n, ve), c = t.payload.get("/path");
|
|
662
|
+
if (!c || t.channelName === r) return !1;
|
|
657
663
|
const i = a.path;
|
|
658
|
-
return
|
|
664
|
+
return M(i) && c === o.resolvePath(i);
|
|
659
665
|
}
|
|
660
666
|
handle(t, n, o, r) {
|
|
661
667
|
const a = t.payload;
|
|
@@ -666,30 +672,30 @@ class Fe extends P {
|
|
|
666
672
|
});
|
|
667
673
|
}
|
|
668
674
|
}
|
|
669
|
-
class
|
|
675
|
+
class Qe extends S {
|
|
670
676
|
constructor() {
|
|
671
677
|
super(...arguments);
|
|
672
678
|
l(this, "contractType", "Embedded Node Channel");
|
|
673
|
-
l(this, "contractBlueId",
|
|
679
|
+
l(this, "contractBlueId", m["Embedded Node Channel"]);
|
|
674
680
|
}
|
|
675
681
|
supports(t, n, o) {
|
|
676
682
|
if (!this.baseSupports(t)) return !1;
|
|
677
|
-
const r = o.getBlue().nodeToSchemaOutput(n,
|
|
678
|
-
return
|
|
683
|
+
const r = o.getBlue().nodeToSchemaOutput(n, _);
|
|
684
|
+
return f(t.originNodePath) && f(r.path) && t.originNodePath === o.resolvePath(r.path);
|
|
679
685
|
}
|
|
680
686
|
handle(t, n, o, r) {
|
|
681
|
-
const a = o.getBlue().nodeToSchemaOutput(n,
|
|
682
|
-
|
|
687
|
+
const a = o.getBlue().nodeToSchemaOutput(n, _), { originNodePath: c, payload: i } = t;
|
|
688
|
+
f(a.path) && c === o.resolvePath(a.path) && o.emitEvent({
|
|
683
689
|
payload: i,
|
|
684
690
|
channelName: r,
|
|
685
691
|
source: "channel"
|
|
686
692
|
});
|
|
687
693
|
}
|
|
688
694
|
}
|
|
689
|
-
class
|
|
695
|
+
class Ke {
|
|
690
696
|
constructor() {
|
|
691
697
|
l(this, "contractType", "Initialized Marker");
|
|
692
|
-
l(this, "contractBlueId",
|
|
698
|
+
l(this, "contractBlueId", m["Initialized Marker"]);
|
|
693
699
|
l(this, "role", "marker");
|
|
694
700
|
}
|
|
695
701
|
supports() {
|
|
@@ -698,11 +704,11 @@ class Ue {
|
|
|
698
704
|
handle() {
|
|
699
705
|
}
|
|
700
706
|
}
|
|
701
|
-
class
|
|
707
|
+
class Xe extends S {
|
|
702
708
|
constructor() {
|
|
703
709
|
super(...arguments);
|
|
704
710
|
l(this, "contractType", "Lifecycle Event Channel");
|
|
705
|
-
l(this, "contractBlueId",
|
|
711
|
+
l(this, "contractBlueId", m["Lifecycle Event Channel"]);
|
|
706
712
|
}
|
|
707
713
|
supports(t, n, o) {
|
|
708
714
|
return !this.baseSupports(t) || !this.isLifecycleEvent(t, o) ? !1 : this.isEventPatternMatch(t, n, o);
|
|
@@ -719,7 +725,7 @@ class _e extends P {
|
|
|
719
725
|
*/
|
|
720
726
|
isLifecycleEvent(t, n) {
|
|
721
727
|
const o = n.getBlue(), r = t.payload;
|
|
722
|
-
return o.isTypeOf(r,
|
|
728
|
+
return o.isTypeOf(r, be, {
|
|
723
729
|
checkSchemaExtensions: !0
|
|
724
730
|
});
|
|
725
731
|
}
|
|
@@ -732,45 +738,45 @@ class _e extends P {
|
|
|
732
738
|
if (!r)
|
|
733
739
|
return !0;
|
|
734
740
|
try {
|
|
735
|
-
const
|
|
736
|
-
return
|
|
737
|
-
} catch (
|
|
738
|
-
return console.warn("Error during lifecycle event pattern matching:",
|
|
741
|
+
const c = o.getBlue(), i = c.nodeToJson(t.payload), h = c.nodeToJson(r);
|
|
742
|
+
return ee(i, h);
|
|
743
|
+
} catch (c) {
|
|
744
|
+
return console.warn("Error during lifecycle event pattern matching:", c), !1;
|
|
739
745
|
}
|
|
740
746
|
}
|
|
741
747
|
}
|
|
742
|
-
const
|
|
748
|
+
const Q = (s, e) => {
|
|
743
749
|
const t = e.getBlue();
|
|
744
|
-
return t.isTypeOf(
|
|
750
|
+
return t.isTypeOf(s.payload, N) || t.isTypeOf(s.payload, ne);
|
|
745
751
|
};
|
|
746
|
-
class
|
|
752
|
+
class Ye extends S {
|
|
747
753
|
constructor() {
|
|
748
754
|
super(...arguments);
|
|
749
755
|
l(this, "contractType", "MyOS Timeline Channel");
|
|
750
|
-
l(this, "contractBlueId",
|
|
756
|
+
l(this, "contractBlueId", te["MyOS Timeline Channel"]);
|
|
751
757
|
}
|
|
752
758
|
supports(t, n, o) {
|
|
753
759
|
var p;
|
|
754
|
-
if (!this.baseSupports(t) || !
|
|
760
|
+
if (!this.baseSupports(t) || !Q(t, o)) return !1;
|
|
755
761
|
const a = o.getBlue().nodeToSchemaOutput(
|
|
756
762
|
t.payload,
|
|
757
|
-
|
|
758
|
-
),
|
|
759
|
-
return h && i ===
|
|
763
|
+
ne
|
|
764
|
+
), c = o.getBlue().nodeToSchemaOutput(n, Oe), i = (p = a.timeline) == null ? void 0 : p.timelineId, h = f(c.timelineId) && f(i), u = f(c.account) && f(a.account), d = f(c.email) && f(a.email);
|
|
765
|
+
return h && i === c.timelineId || u && a.account === c.account || d && a.email === c.email;
|
|
760
766
|
}
|
|
761
767
|
handle(t, n, o, r) {
|
|
762
|
-
|
|
768
|
+
Q(t, o) && o.emitEvent({
|
|
763
769
|
payload: t.payload,
|
|
764
770
|
channelName: r,
|
|
765
771
|
source: "channel"
|
|
766
772
|
});
|
|
767
773
|
}
|
|
768
774
|
}
|
|
769
|
-
class
|
|
775
|
+
class Ze extends S {
|
|
770
776
|
constructor() {
|
|
771
777
|
super(...arguments);
|
|
772
778
|
l(this, "contractType", "MyOS Agent Channel");
|
|
773
|
-
l(this, "contractBlueId",
|
|
779
|
+
l(this, "contractBlueId", te["MyOS Agent Channel"]);
|
|
774
780
|
}
|
|
775
781
|
supports(t, n, o) {
|
|
776
782
|
if (!this.baseSupports(t)) return !1;
|
|
@@ -799,12 +805,12 @@ class He extends P {
|
|
|
799
805
|
parseEventAndChannel(t, n, o) {
|
|
800
806
|
const r = o.getBlue(), a = r.nodeToSchemaOutput(
|
|
801
807
|
t.payload,
|
|
802
|
-
|
|
803
|
-
),
|
|
808
|
+
Be
|
|
809
|
+
), c = r.nodeToSchemaOutput(
|
|
804
810
|
n,
|
|
805
|
-
|
|
811
|
+
Me
|
|
806
812
|
);
|
|
807
|
-
return { myosAgentEvent: a, myosAgentChannel:
|
|
813
|
+
return { myosAgentEvent: a, myosAgentChannel: c };
|
|
808
814
|
}
|
|
809
815
|
/**
|
|
810
816
|
* Checks if the agent IDs match between event and channel
|
|
@@ -815,7 +821,7 @@ class He extends P {
|
|
|
815
821
|
isAgentMatch(t, n) {
|
|
816
822
|
var a;
|
|
817
823
|
const o = t.agentId, r = (a = n.agent) == null ? void 0 : a.agentId;
|
|
818
|
-
return
|
|
824
|
+
return f(o) && f(r) && o === r;
|
|
819
825
|
}
|
|
820
826
|
/**
|
|
821
827
|
* Checks if the event pattern matches the channel's event filter
|
|
@@ -838,22 +844,22 @@ class He extends P {
|
|
|
838
844
|
if (!a)
|
|
839
845
|
return !1;
|
|
840
846
|
try {
|
|
841
|
-
const
|
|
842
|
-
return
|
|
843
|
-
} catch (
|
|
844
|
-
return console.warn("Error during event pattern matching:",
|
|
847
|
+
const c = o.getBlue(), i = c.nodeToJson(a), h = c.nodeToJson(r);
|
|
848
|
+
return ee(i, h);
|
|
849
|
+
} catch (c) {
|
|
850
|
+
return console.warn("Error during event pattern matching:", c), !1;
|
|
845
851
|
}
|
|
846
852
|
}
|
|
847
853
|
}
|
|
848
|
-
class
|
|
854
|
+
class Ge {
|
|
849
855
|
constructor() {
|
|
850
856
|
l(this, "contractType", "Operation");
|
|
851
|
-
l(this, "contractBlueId",
|
|
857
|
+
l(this, "contractBlueId", m.Operation);
|
|
852
858
|
l(this, "role", "adapter");
|
|
853
859
|
}
|
|
854
860
|
supports(e, t, n, o) {
|
|
855
|
-
const a = n.getBlue().nodeToSchemaOutput(t,
|
|
856
|
-
return
|
|
861
|
+
const a = n.getBlue().nodeToSchemaOutput(t, Te), c = this.parseEventPayload(e, n);
|
|
862
|
+
return f(c == null ? void 0 : c.operation) && c.operation === o && e.source === "channel" && e.channelName === a.channel;
|
|
857
863
|
}
|
|
858
864
|
async handle(e, t, n, o) {
|
|
859
865
|
n.emitEvent({
|
|
@@ -864,33 +870,33 @@ class Re {
|
|
|
864
870
|
}
|
|
865
871
|
parseEventPayload(e, t) {
|
|
866
872
|
const n = t.getBlue();
|
|
867
|
-
if (n.isTypeOf(e.payload,
|
|
873
|
+
if (n.isTypeOf(e.payload, N, {
|
|
868
874
|
checkSchemaExtensions: !0
|
|
869
875
|
})) {
|
|
870
876
|
const o = n.nodeToSchemaOutput(
|
|
871
877
|
e.payload,
|
|
872
|
-
|
|
878
|
+
N
|
|
873
879
|
);
|
|
874
880
|
if (o.message)
|
|
875
881
|
return n.nodeToSchemaOutput(
|
|
876
882
|
o.message,
|
|
877
|
-
|
|
883
|
+
Pe
|
|
878
884
|
);
|
|
879
885
|
}
|
|
880
886
|
return null;
|
|
881
887
|
}
|
|
882
888
|
}
|
|
883
|
-
class
|
|
889
|
+
class et {
|
|
884
890
|
constructor() {
|
|
885
891
|
l(this, "contractType", "Process Embedded");
|
|
886
892
|
l(this, "role", "adapter");
|
|
887
|
-
l(this, "contractBlueId",
|
|
893
|
+
l(this, "contractBlueId", m["Process Embedded"]);
|
|
888
894
|
}
|
|
889
895
|
supports(e) {
|
|
890
896
|
return e.source !== "channel";
|
|
891
897
|
}
|
|
892
898
|
handle(e, t, n) {
|
|
893
|
-
const o = n.getBlue().nodeToSchemaOutput(t,
|
|
899
|
+
const o = n.getBlue().nodeToSchemaOutput(t, D);
|
|
894
900
|
for (const r of o.paths ?? [])
|
|
895
901
|
n.emitEvent({
|
|
896
902
|
...e,
|
|
@@ -898,18 +904,18 @@ class Qe {
|
|
|
898
904
|
});
|
|
899
905
|
}
|
|
900
906
|
}
|
|
901
|
-
const
|
|
902
|
-
let
|
|
903
|
-
if (
|
|
907
|
+
const ce = !process.env.SKIP_ISOLATED_VM;
|
|
908
|
+
let E = null;
|
|
909
|
+
if (ce)
|
|
904
910
|
try {
|
|
905
|
-
|
|
911
|
+
E = require("isolated-vm");
|
|
906
912
|
} catch {
|
|
907
913
|
console.warn("isolated-vm not available, using fallback evaluation method");
|
|
908
914
|
}
|
|
909
|
-
function
|
|
910
|
-
return /\bimport\s.+\sfrom\s+['"][^'"]+['"]/.test(
|
|
915
|
+
function K(s) {
|
|
916
|
+
return /\bimport\s.+\sfrom\s+['"][^'"]+['"]/.test(s) || /\bexport\s+/.test(s);
|
|
911
917
|
}
|
|
912
|
-
class
|
|
918
|
+
class j {
|
|
913
919
|
/**
|
|
914
920
|
* Main evaluation method - chooses between secure and simple evaluation strategies
|
|
915
921
|
*/
|
|
@@ -919,14 +925,14 @@ class A {
|
|
|
919
925
|
bindings: n = {},
|
|
920
926
|
options: o = {}
|
|
921
927
|
}) {
|
|
922
|
-
return !
|
|
928
|
+
return !E || !ce ? this.evaluateSimple(e, n, o) : this.evaluateSecure(e, n, t, o);
|
|
923
929
|
}
|
|
924
930
|
/**
|
|
925
931
|
* Fallback evaluation using Node's Function constructor
|
|
926
932
|
* Used when isolated-vm is not available
|
|
927
933
|
*/
|
|
928
934
|
static async evaluateSimple(e, t, n = {}) {
|
|
929
|
-
if (
|
|
935
|
+
if (K(e))
|
|
930
936
|
throw new Error(
|
|
931
937
|
"Static import/export syntax requires isolated-vm – start Node without SKIP_ISOLATED_VM."
|
|
932
938
|
);
|
|
@@ -939,25 +945,25 @@ class A {
|
|
|
939
945
|
", "
|
|
940
946
|
)}) { ${e} }`
|
|
941
947
|
)(
|
|
942
|
-
...o.map((
|
|
943
|
-
))(...o.map((
|
|
948
|
+
...o.map((c) => t[c])
|
|
949
|
+
))(...o.map((c) => t[c]));
|
|
944
950
|
} else
|
|
945
951
|
return new Function(
|
|
946
952
|
...Object.keys(t),
|
|
947
953
|
`return ${e};`
|
|
948
954
|
)(...Object.values(t));
|
|
949
955
|
} catch (o) {
|
|
950
|
-
throw n.isCodeBlock ? new
|
|
956
|
+
throw n.isCodeBlock ? new L(e, o) : new F(e, o);
|
|
951
957
|
}
|
|
952
958
|
}
|
|
953
959
|
/**
|
|
954
960
|
* Secure evaluation using isolated-vm with support for ES modules
|
|
955
961
|
*/
|
|
956
962
|
static async evaluateSecure(e, t, n, o = {}) {
|
|
957
|
-
if (!
|
|
958
|
-
const r = new
|
|
963
|
+
if (!E) throw new Error("isolated-vm not available");
|
|
964
|
+
const r = new E.Isolate({ memoryLimit: 32 }), a = await r.createContext(), c = a.global;
|
|
959
965
|
try {
|
|
960
|
-
await this.setupIsolateEnvironment(
|
|
966
|
+
await this.setupIsolateEnvironment(c, t);
|
|
961
967
|
const i = /* @__PURE__ */ new Map(), h = this.createModuleResolver(
|
|
962
968
|
r,
|
|
963
969
|
a,
|
|
@@ -965,7 +971,7 @@ class A {
|
|
|
965
971
|
n
|
|
966
972
|
);
|
|
967
973
|
let u;
|
|
968
|
-
return
|
|
974
|
+
return K(e) ? u = await this.evaluateESModule(
|
|
969
975
|
r,
|
|
970
976
|
a,
|
|
971
977
|
e,
|
|
@@ -979,7 +985,7 @@ class A {
|
|
|
979
985
|
o
|
|
980
986
|
), this.deepClone(u);
|
|
981
987
|
} catch (i) {
|
|
982
|
-
throw o.isCodeBlock ? new
|
|
988
|
+
throw o.isCodeBlock ? new L(e, i) : new F(e, i);
|
|
983
989
|
} finally {
|
|
984
990
|
a.release(), r.dispose();
|
|
985
991
|
}
|
|
@@ -988,16 +994,18 @@ class A {
|
|
|
988
994
|
* Setup the isolated VM environment with necessary host functions and data
|
|
989
995
|
*/
|
|
990
996
|
static async setupIsolateEnvironment(e, t) {
|
|
991
|
-
if (!
|
|
992
|
-
const n = new
|
|
993
|
-
(...
|
|
994
|
-
)
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
997
|
+
if (!E) throw new Error("isolated-vm not available");
|
|
998
|
+
const n = new E.Callback(
|
|
999
|
+
(...r) => console.log(...r)
|
|
1000
|
+
), o = new E.ExternalCopy({
|
|
1001
|
+
log: n
|
|
1002
|
+
}).copyInto();
|
|
1003
|
+
await e.set("console", o);
|
|
1004
|
+
for (const [r, a] of Object.entries(t))
|
|
1005
|
+
typeof a == "function" ? await e.set(
|
|
1006
|
+
r,
|
|
1007
|
+
new E.Callback(a)
|
|
1008
|
+
) : await e.set(r, new E.ExternalCopy(a).copyInto());
|
|
1001
1009
|
}
|
|
1002
1010
|
/**
|
|
1003
1011
|
* Create module resolver function for handling imports
|
|
@@ -1006,12 +1014,12 @@ class A {
|
|
|
1006
1014
|
return async (r) => {
|
|
1007
1015
|
if (n.has(r)) return n.get(r);
|
|
1008
1016
|
if (r.startsWith("blue:")) {
|
|
1009
|
-
const a = r.slice(5),
|
|
1010
|
-
if (typeof
|
|
1017
|
+
const a = r.slice(5), c = o.loadBlueContent;
|
|
1018
|
+
if (typeof c != "function")
|
|
1011
1019
|
throw new Error(
|
|
1012
1020
|
`ProcessingContext is missing a loadBlueContent(blueId) implementation (needed for ${r})`
|
|
1013
1021
|
);
|
|
1014
|
-
const i = await
|
|
1022
|
+
const i = await c(a), h = await e.compileModule(i);
|
|
1015
1023
|
return n.set(r, h), await h.instantiate(
|
|
1016
1024
|
t,
|
|
1017
1025
|
this.createModuleResolver(e, t, n, o)
|
|
@@ -1025,11 +1033,11 @@ class A {
|
|
|
1025
1033
|
throw new Error(
|
|
1026
1034
|
`ProcessingContext is missing a loadExternalModule(url) implementation (needed for ${r})`
|
|
1027
1035
|
);
|
|
1028
|
-
const
|
|
1029
|
-
return n.set(r,
|
|
1036
|
+
const c = await e.compileModule(a);
|
|
1037
|
+
return n.set(r, c), await c.instantiate(
|
|
1030
1038
|
t,
|
|
1031
1039
|
this.createModuleResolver(e, t, n, o)
|
|
1032
|
-
),
|
|
1040
|
+
), c;
|
|
1033
1041
|
}
|
|
1034
1042
|
throw new Error(`Unsupported module specifier "${r}"`);
|
|
1035
1043
|
};
|
|
@@ -1038,7 +1046,7 @@ class A {
|
|
|
1038
1046
|
* Evaluate code as a simple script (no imports/exports)
|
|
1039
1047
|
*/
|
|
1040
1048
|
static async evaluateSimpleScript(e, t, n, o, r) {
|
|
1041
|
-
const a = Object.keys(o).join(", "),
|
|
1049
|
+
const a = Object.keys(o).join(", "), c = Object.keys(o).map((u) => u), i = `(async (${a}) => { ${r.isCodeBlock ? n : `return (${n});`} })(${c.join(", ")})`;
|
|
1042
1050
|
return await (await e.compileScript(i)).run(t, {
|
|
1043
1051
|
timeout: r.timeout ?? 500,
|
|
1044
1052
|
promise: !0,
|
|
@@ -1064,13 +1072,13 @@ class A {
|
|
|
1064
1072
|
export default run();
|
|
1065
1073
|
`;
|
|
1066
1074
|
}
|
|
1067
|
-
const
|
|
1068
|
-
return await
|
|
1075
|
+
const c = await e.compileModule(a);
|
|
1076
|
+
return await c.instantiate(t, r), await c.evaluate({
|
|
1069
1077
|
timeout: o.timeout ?? 500,
|
|
1070
1078
|
promise: !0,
|
|
1071
1079
|
reference: !0,
|
|
1072
1080
|
release: !0
|
|
1073
|
-
}), await
|
|
1081
|
+
}), await c.namespace.get("default", {
|
|
1074
1082
|
timeout: o.timeout ?? 500,
|
|
1075
1083
|
promise: !0,
|
|
1076
1084
|
copy: !0,
|
|
@@ -1085,24 +1093,24 @@ class A {
|
|
|
1085
1093
|
return typeof e > "u" ? e : JSON.parse(JSON.stringify(e));
|
|
1086
1094
|
}
|
|
1087
1095
|
}
|
|
1088
|
-
class
|
|
1096
|
+
class V {
|
|
1089
1097
|
/**
|
|
1090
1098
|
* Creates standard bindings for workflow step execution
|
|
1091
1099
|
*/
|
|
1092
1100
|
static createStandardBindings(e, t, n) {
|
|
1093
|
-
const o = e.getBlue(), r = o.nodeToJson(t.payload, "simple"), a =
|
|
1101
|
+
const o = e.getBlue(), r = o.nodeToJson(t.payload, "simple"), a = x(r) ? r.toNumber() : r;
|
|
1094
1102
|
return {
|
|
1095
|
-
document: (
|
|
1096
|
-
const i = e.get(
|
|
1097
|
-
return
|
|
1103
|
+
document: (c) => {
|
|
1104
|
+
const i = e.get(c);
|
|
1105
|
+
return x(i) ? i.toNumber() : P(i) ? o.nodeToJson(i, "original") : i;
|
|
1098
1106
|
},
|
|
1099
1107
|
event: a,
|
|
1100
1108
|
steps: n
|
|
1101
1109
|
};
|
|
1102
1110
|
}
|
|
1103
1111
|
}
|
|
1104
|
-
function
|
|
1105
|
-
const { op: t, path: n, val: o, from: r } =
|
|
1112
|
+
function X(s, e) {
|
|
1113
|
+
const { op: t, path: n, val: o, from: r } = s;
|
|
1106
1114
|
if ((t === "move" || t === "copy") && !r)
|
|
1107
1115
|
throw new Error(`${t} operation requires 'from' path`);
|
|
1108
1116
|
if ((t === "add" || t === "replace") && o === void 0)
|
|
@@ -1114,35 +1122,40 @@ function R(c, e) {
|
|
|
1114
1122
|
};
|
|
1115
1123
|
return o !== void 0 && (a.val = o), r !== void 0 && (a.from = r), e.jsonValueToNode(a);
|
|
1116
1124
|
}
|
|
1117
|
-
function
|
|
1118
|
-
return
|
|
1125
|
+
function tt(s) {
|
|
1126
|
+
return s.jsonValueToNode({
|
|
1119
1127
|
type: "Document Processing Initiated"
|
|
1120
1128
|
});
|
|
1121
1129
|
}
|
|
1122
|
-
|
|
1130
|
+
const nt = /^\$\{(.*)\}$/, B = (s) => typeof s != "string" ? !1 : nt.test(s), Y = (s) => {
|
|
1131
|
+
if (!B(s))
|
|
1132
|
+
throw new Error(`Invalid expression: ${s}`);
|
|
1133
|
+
return s.slice(2, -1);
|
|
1134
|
+
};
|
|
1135
|
+
class ot {
|
|
1123
1136
|
constructor() {
|
|
1124
1137
|
l(this, "stepType", "Update Document");
|
|
1125
1138
|
}
|
|
1126
1139
|
supports(e) {
|
|
1127
|
-
return
|
|
1140
|
+
return w.isTypeOf(e, $);
|
|
1128
1141
|
}
|
|
1129
1142
|
async execute(e, t, n, o, r) {
|
|
1130
1143
|
const a = n.getBlue();
|
|
1131
|
-
if (!
|
|
1132
|
-
const
|
|
1144
|
+
if (!w.isTypeOf(e, $)) return;
|
|
1145
|
+
const c = await this.evaluateChangeset(
|
|
1133
1146
|
e.get("/changeset"),
|
|
1134
1147
|
n,
|
|
1135
1148
|
t,
|
|
1136
1149
|
r
|
|
1137
|
-
), i =
|
|
1150
|
+
), i = G(e, {
|
|
1138
1151
|
op: "replace",
|
|
1139
1152
|
path: "/changeset",
|
|
1140
|
-
val:
|
|
1141
|
-
}), h = n.getBlue().nodeToSchemaOutput(i,
|
|
1153
|
+
val: c
|
|
1154
|
+
}), h = n.getBlue().nodeToSchemaOutput(i, $);
|
|
1142
1155
|
for (const u of h.changeset ?? []) {
|
|
1143
1156
|
if (!u.path) continue;
|
|
1144
1157
|
const d = u.val;
|
|
1145
|
-
if ((u.op === "replace" || u.op === "add") &&
|
|
1158
|
+
if ((u.op === "replace" || u.op === "add") && M(d)) {
|
|
1146
1159
|
const p = await this.evaluateChangeValue(
|
|
1147
1160
|
d,
|
|
1148
1161
|
n,
|
|
@@ -1154,7 +1167,7 @@ class Xe {
|
|
|
1154
1167
|
path: u.path,
|
|
1155
1168
|
val: p
|
|
1156
1169
|
}), n.emitEvent({
|
|
1157
|
-
payload:
|
|
1170
|
+
payload: X(
|
|
1158
1171
|
{
|
|
1159
1172
|
op: u.op,
|
|
1160
1173
|
path: n.resolvePath(u.path),
|
|
@@ -1165,7 +1178,7 @@ class Xe {
|
|
|
1165
1178
|
});
|
|
1166
1179
|
}
|
|
1167
1180
|
u.op === "remove" && (n.addPatch({ op: u.op, path: u.path }), n.emitEvent({
|
|
1168
|
-
payload:
|
|
1181
|
+
payload: X(
|
|
1169
1182
|
{
|
|
1170
1183
|
op: u.op,
|
|
1171
1184
|
path: n.resolvePath(u.path),
|
|
@@ -1178,29 +1191,29 @@ class Xe {
|
|
|
1178
1191
|
}
|
|
1179
1192
|
async evaluateChangeset(e, t, n, o) {
|
|
1180
1193
|
const r = t.getBlue();
|
|
1181
|
-
if (
|
|
1182
|
-
const a = e
|
|
1194
|
+
if (B(e)) {
|
|
1195
|
+
const a = Y(e), c = await j.evaluate({
|
|
1183
1196
|
code: a,
|
|
1184
1197
|
ctx: t,
|
|
1185
|
-
bindings:
|
|
1198
|
+
bindings: V.createStandardBindings(
|
|
1186
1199
|
t,
|
|
1187
1200
|
n,
|
|
1188
1201
|
o
|
|
1189
1202
|
)
|
|
1190
1203
|
});
|
|
1191
|
-
return r.jsonValueToNode(
|
|
1204
|
+
return r.jsonValueToNode(c ?? null);
|
|
1192
1205
|
}
|
|
1193
|
-
if (
|
|
1206
|
+
if (P(e))
|
|
1194
1207
|
return e;
|
|
1195
1208
|
throw new Error("Invalid changeset: expected a string or document node");
|
|
1196
1209
|
}
|
|
1197
1210
|
async evaluateChangeValue(e, t, n, o) {
|
|
1198
1211
|
const r = e.getValue(), a = t.getBlue();
|
|
1199
|
-
if (
|
|
1200
|
-
const
|
|
1201
|
-
code:
|
|
1212
|
+
if (B(r)) {
|
|
1213
|
+
const c = Y(r), i = await j.evaluate({
|
|
1214
|
+
code: c,
|
|
1202
1215
|
ctx: t,
|
|
1203
|
-
bindings:
|
|
1216
|
+
bindings: V.createStandardBindings(
|
|
1204
1217
|
t,
|
|
1205
1218
|
n,
|
|
1206
1219
|
o
|
|
@@ -1211,41 +1224,41 @@ class Xe {
|
|
|
1211
1224
|
return e;
|
|
1212
1225
|
}
|
|
1213
1226
|
}
|
|
1214
|
-
class
|
|
1227
|
+
class rt {
|
|
1215
1228
|
constructor() {
|
|
1216
1229
|
l(this, "stepType", "Trigger Event");
|
|
1217
1230
|
}
|
|
1218
1231
|
supports(e) {
|
|
1219
|
-
return
|
|
1232
|
+
return w.isTypeOf(e, q);
|
|
1220
1233
|
}
|
|
1221
1234
|
async execute(e, t, n) {
|
|
1222
1235
|
const o = n.getBlue();
|
|
1223
|
-
if (!
|
|
1224
|
-
const r = o.nodeToSchemaOutput(e,
|
|
1236
|
+
if (!w.isTypeOf(e, q)) return;
|
|
1237
|
+
const r = o.nodeToSchemaOutput(e, q);
|
|
1225
1238
|
r.event && n.emitEvent({
|
|
1226
1239
|
payload: r.event
|
|
1227
1240
|
});
|
|
1228
1241
|
}
|
|
1229
1242
|
}
|
|
1230
|
-
class
|
|
1243
|
+
class at {
|
|
1231
1244
|
constructor() {
|
|
1232
1245
|
l(this, "stepType", "JavaScript Code");
|
|
1233
1246
|
}
|
|
1234
1247
|
supports(e) {
|
|
1235
|
-
return
|
|
1248
|
+
return w.isTypeOf(e, A);
|
|
1236
1249
|
}
|
|
1237
1250
|
async execute(e, t, n, o, r) {
|
|
1238
|
-
if (!
|
|
1239
|
-
const a = n.getBlue(),
|
|
1251
|
+
if (!w.isTypeOf(e, A)) return;
|
|
1252
|
+
const a = n.getBlue(), c = a.nodeToSchemaOutput(
|
|
1240
1253
|
e,
|
|
1241
|
-
|
|
1254
|
+
A
|
|
1242
1255
|
);
|
|
1243
|
-
if (!
|
|
1256
|
+
if (!c.code)
|
|
1244
1257
|
throw new Error("JavaScript code is required");
|
|
1245
|
-
const i = await
|
|
1246
|
-
code:
|
|
1258
|
+
const i = await j.evaluate({
|
|
1259
|
+
code: c.code,
|
|
1247
1260
|
ctx: n,
|
|
1248
|
-
bindings:
|
|
1261
|
+
bindings: V.createStandardBindings(n, t, r),
|
|
1249
1262
|
options: {
|
|
1250
1263
|
isCodeBlock: !0,
|
|
1251
1264
|
timeout: 500
|
|
@@ -1262,15 +1275,15 @@ class Ze {
|
|
|
1262
1275
|
return i;
|
|
1263
1276
|
}
|
|
1264
1277
|
}
|
|
1265
|
-
const
|
|
1266
|
-
new
|
|
1267
|
-
new
|
|
1268
|
-
new
|
|
1278
|
+
const st = [
|
|
1279
|
+
new ot(),
|
|
1280
|
+
new rt(),
|
|
1281
|
+
new at()
|
|
1269
1282
|
];
|
|
1270
|
-
class
|
|
1271
|
-
constructor(e =
|
|
1283
|
+
class ie {
|
|
1284
|
+
constructor(e = st) {
|
|
1272
1285
|
l(this, "contractType", "Sequential Workflow");
|
|
1273
|
-
l(this, "contractBlueId",
|
|
1286
|
+
l(this, "contractBlueId", m["Sequential Workflow"]);
|
|
1274
1287
|
l(this, "role", "handler");
|
|
1275
1288
|
l(this, "executors", []);
|
|
1276
1289
|
this.executors = e;
|
|
@@ -1282,13 +1295,13 @@ class re {
|
|
|
1282
1295
|
supports(e, t, n) {
|
|
1283
1296
|
const a = n.getBlue().nodeToSchemaOutput(
|
|
1284
1297
|
t,
|
|
1285
|
-
|
|
1298
|
+
Se
|
|
1286
1299
|
).channel;
|
|
1287
1300
|
return e.source === "channel" && e.channelName === a;
|
|
1288
1301
|
}
|
|
1289
1302
|
async handle(e, t, n, o) {
|
|
1290
|
-
var
|
|
1291
|
-
const r = {}, a = (
|
|
1303
|
+
var c;
|
|
1304
|
+
const r = {}, a = (c = t.getProperties()) == null ? void 0 : c.steps.getItems();
|
|
1292
1305
|
for (const [i, h] of (a ?? []).entries()) {
|
|
1293
1306
|
const u = this.executors.find((p) => p.supports(h));
|
|
1294
1307
|
if (!u)
|
|
@@ -1308,20 +1321,20 @@ class re {
|
|
|
1308
1321
|
}
|
|
1309
1322
|
}
|
|
1310
1323
|
}
|
|
1311
|
-
class
|
|
1324
|
+
class ct {
|
|
1312
1325
|
constructor(e) {
|
|
1313
1326
|
l(this, "contractType", "Sequential Workflow Operation");
|
|
1314
|
-
l(this, "contractBlueId",
|
|
1327
|
+
l(this, "contractBlueId", m["Sequential Workflow Operation"]);
|
|
1315
1328
|
l(this, "role", "handler");
|
|
1316
1329
|
l(this, "sequentialWorkflowProcessor");
|
|
1317
|
-
this.sequentialWorkflowProcessor = e || new
|
|
1330
|
+
this.sequentialWorkflowProcessor = e || new ie();
|
|
1318
1331
|
}
|
|
1319
1332
|
supports(e, t, n) {
|
|
1320
1333
|
const a = n.getBlue().nodeToSchemaOutput(
|
|
1321
1334
|
t,
|
|
1322
|
-
|
|
1323
|
-
).operation,
|
|
1324
|
-
return e.source === "channel" &&
|
|
1335
|
+
Ce
|
|
1336
|
+
).operation, c = e.channelName;
|
|
1337
|
+
return e.source === "channel" && M(c) && M(a) && c === a;
|
|
1325
1338
|
}
|
|
1326
1339
|
async handle(e, t, n, o) {
|
|
1327
1340
|
try {
|
|
@@ -1334,68 +1347,68 @@ class et {
|
|
|
1334
1347
|
}
|
|
1335
1348
|
}
|
|
1336
1349
|
}
|
|
1337
|
-
const
|
|
1338
|
-
class
|
|
1350
|
+
const Z = (s) => w.isTypeOf(s.payload, N);
|
|
1351
|
+
class it extends S {
|
|
1339
1352
|
constructor() {
|
|
1340
1353
|
super(...arguments);
|
|
1341
1354
|
l(this, "contractType", "Timeline Channel");
|
|
1342
|
-
l(this, "contractBlueId",
|
|
1355
|
+
l(this, "contractBlueId", m["Timeline Channel"]);
|
|
1343
1356
|
}
|
|
1344
1357
|
supports(t, n, o) {
|
|
1345
1358
|
var u;
|
|
1346
|
-
if (!this.baseSupports(t) || !
|
|
1359
|
+
if (!this.baseSupports(t) || !Z(t)) return !1;
|
|
1347
1360
|
const a = o.getBlue().nodeToSchemaOutput(
|
|
1348
1361
|
t.payload,
|
|
1349
|
-
|
|
1350
|
-
),
|
|
1351
|
-
return
|
|
1362
|
+
N
|
|
1363
|
+
), c = o.getBlue().nodeToSchemaOutput(n, ke), i = (u = a.timeline) == null ? void 0 : u.timelineId;
|
|
1364
|
+
return f(c.timelineId) && f(i) && i === c.timelineId;
|
|
1352
1365
|
}
|
|
1353
1366
|
handle(t, n, o, r) {
|
|
1354
|
-
|
|
1367
|
+
Z(t) && o.emitEvent({
|
|
1355
1368
|
payload: t.payload,
|
|
1356
1369
|
channelName: r,
|
|
1357
1370
|
source: "channel"
|
|
1358
1371
|
});
|
|
1359
1372
|
}
|
|
1360
1373
|
}
|
|
1361
|
-
const
|
|
1362
|
-
new
|
|
1374
|
+
const lt = [
|
|
1375
|
+
new et(),
|
|
1363
1376
|
// channels
|
|
1364
|
-
new
|
|
1365
|
-
new Fe(),
|
|
1366
|
-
new tt(),
|
|
1367
|
-
new ze(),
|
|
1377
|
+
new Qe(),
|
|
1368
1378
|
new He(),
|
|
1369
|
-
new
|
|
1370
|
-
new
|
|
1379
|
+
new it(),
|
|
1380
|
+
new Ye(),
|
|
1381
|
+
new Ze(),
|
|
1371
1382
|
new Re(),
|
|
1383
|
+
new Xe(),
|
|
1384
|
+
new Ge(),
|
|
1372
1385
|
// sequential workflows
|
|
1373
|
-
new
|
|
1374
|
-
new
|
|
1386
|
+
new ie(),
|
|
1387
|
+
new ct(),
|
|
1375
1388
|
// markers
|
|
1376
|
-
new
|
|
1389
|
+
new Ke()
|
|
1377
1390
|
];
|
|
1378
|
-
class
|
|
1391
|
+
class yt {
|
|
1379
1392
|
/**
|
|
1380
1393
|
* Creates a new document processor
|
|
1381
1394
|
*
|
|
1382
1395
|
* @param processors - Initial list of processors to register
|
|
1383
1396
|
*/
|
|
1384
|
-
constructor(e, t =
|
|
1397
|
+
constructor(e, t = lt) {
|
|
1385
1398
|
l(this, "taskCounter", 0);
|
|
1386
1399
|
l(this, "eventCounter", 0);
|
|
1387
1400
|
l(this, "registry");
|
|
1388
1401
|
l(this, "queue");
|
|
1389
1402
|
l(this, "router");
|
|
1390
|
-
l(this, "checkpointCache", new
|
|
1391
|
-
this.blue = e, this.registry = new
|
|
1403
|
+
l(this, "checkpointCache", new Ue());
|
|
1404
|
+
this.blue = e, this.registry = new Ve(t), this.queue = new je(), this.router = new _e(
|
|
1392
1405
|
this.blue,
|
|
1393
1406
|
this.registry,
|
|
1394
1407
|
this.queue,
|
|
1395
1408
|
() => ++this.taskCounter,
|
|
1396
1409
|
() => ++this.eventCounter
|
|
1397
1410
|
), this.register(
|
|
1398
|
-
new
|
|
1411
|
+
new ze(this.checkpointCache),
|
|
1399
1412
|
9999
|
|
1400
1413
|
);
|
|
1401
1414
|
}
|
|
@@ -1415,13 +1428,13 @@ class lt {
|
|
|
1415
1428
|
* @returns Processing result with final state and emitted events
|
|
1416
1429
|
*/
|
|
1417
1430
|
async initialize(e) {
|
|
1418
|
-
let t =
|
|
1431
|
+
let t = R(I(e), this.blue);
|
|
1419
1432
|
const n = {
|
|
1420
|
-
payload:
|
|
1433
|
+
payload: tt(this.blue)
|
|
1421
1434
|
}, o = [n.payload];
|
|
1422
1435
|
await this.router.route(t, [], n, 0);
|
|
1423
1436
|
const r = await this.drainQueue(t);
|
|
1424
|
-
return t = r.state, o.push(...r.emitted), t =
|
|
1437
|
+
return t = r.state, o.push(...r.emitted), t = Le(t, this.blue), { state: O(t), emitted: o };
|
|
1425
1438
|
}
|
|
1426
1439
|
/**
|
|
1427
1440
|
* Processes a batch of events against the document
|
|
@@ -1431,22 +1444,22 @@ class lt {
|
|
|
1431
1444
|
* @returns Processing result with final state and emitted events
|
|
1432
1445
|
*/
|
|
1433
1446
|
async processEvents(e, t) {
|
|
1434
|
-
let n =
|
|
1447
|
+
let n = R(I(e), this.blue);
|
|
1435
1448
|
const o = [];
|
|
1436
|
-
if (!
|
|
1449
|
+
if (!se(n, this.blue))
|
|
1437
1450
|
throw new Error("Document is not initialized");
|
|
1438
1451
|
for (const r of t)
|
|
1439
1452
|
try {
|
|
1440
1453
|
const a = { payload: r, source: "external" };
|
|
1441
1454
|
await this.router.route(n, [], a, 0);
|
|
1442
|
-
const
|
|
1443
|
-
n =
|
|
1455
|
+
const c = await this.drainQueue(n);
|
|
1456
|
+
n = c.state, o.push(...c.emitted);
|
|
1444
1457
|
const i = this.checkpointCache.flush(n);
|
|
1445
|
-
i.length && (n =
|
|
1458
|
+
i.length && (n = U(n, i));
|
|
1446
1459
|
} finally {
|
|
1447
1460
|
this.checkpointCache.clear();
|
|
1448
1461
|
}
|
|
1449
|
-
return { state: n, emitted: o };
|
|
1462
|
+
return { state: O(n), emitted: o };
|
|
1450
1463
|
}
|
|
1451
1464
|
/**
|
|
1452
1465
|
* Drains the task queue and applies all actions
|
|
@@ -1459,61 +1472,102 @@ class lt {
|
|
|
1459
1472
|
for (; this.queue.length; ) {
|
|
1460
1473
|
if (++r > o)
|
|
1461
1474
|
throw new Error("Possible cycle – too many iterations");
|
|
1462
|
-
const
|
|
1463
|
-
if (!
|
|
1475
|
+
const c = this.queue.pop(), { nodePath: i, contractName: h, contractNode: u, event: d } = c, p = t.get(i);
|
|
1476
|
+
if (!P(p) || !((a = p.getContracts()) != null && a[h]) || !u.getType()) continue;
|
|
1464
1477
|
const y = this.registry.get(u.getType());
|
|
1465
1478
|
if (!y) {
|
|
1466
1479
|
console.warn(`No processor registered for contract: ${h}`);
|
|
1467
1480
|
continue;
|
|
1468
1481
|
}
|
|
1469
|
-
const
|
|
1482
|
+
const v = new oe(
|
|
1470
1483
|
() => t,
|
|
1471
|
-
|
|
1484
|
+
c,
|
|
1472
1485
|
this.blue,
|
|
1473
|
-
async (
|
|
1474
|
-
for (const g of
|
|
1486
|
+
async (T) => {
|
|
1487
|
+
for (const g of T)
|
|
1475
1488
|
if (g.kind === "patch") {
|
|
1476
|
-
const
|
|
1477
|
-
for (const C of
|
|
1478
|
-
const
|
|
1479
|
-
(
|
|
1480
|
-
),
|
|
1481
|
-
|
|
1489
|
+
const ue = W(t, this.blue);
|
|
1490
|
+
for (const C of ue) {
|
|
1491
|
+
const he = g.patch.op === "move" || g.patch.op === "copy" ? [g.patch.from, g.patch.path] : [g.patch.path], J = v.getNodePath(), de = he.some(
|
|
1492
|
+
(fe) => z(fe, C.absPath)
|
|
1493
|
+
), pe = z(
|
|
1494
|
+
J,
|
|
1482
1495
|
C.absPath
|
|
1483
1496
|
);
|
|
1484
|
-
if (
|
|
1485
|
-
throw new
|
|
1497
|
+
if (de && !pe)
|
|
1498
|
+
throw new ae(
|
|
1486
1499
|
g.patch,
|
|
1487
1500
|
C.absPath,
|
|
1488
|
-
|
|
1501
|
+
J
|
|
1489
1502
|
);
|
|
1490
1503
|
}
|
|
1491
1504
|
try {
|
|
1492
|
-
t =
|
|
1505
|
+
t = U(t, [g.patch]);
|
|
1493
1506
|
} catch (C) {
|
|
1494
|
-
throw
|
|
1507
|
+
throw Fe(h, d, C), C;
|
|
1495
1508
|
}
|
|
1496
|
-
} else g.kind === "event" && (n.push(g.event.payload), await this.router.route(t, [], g.event,
|
|
1509
|
+
} else g.kind === "event" && (n.push(g.event.payload), await this.router.route(t, [], g.event, c.key[5]));
|
|
1497
1510
|
}
|
|
1498
1511
|
);
|
|
1499
|
-
await y.handle(d, u,
|
|
1512
|
+
await y.handle(d, u, v, h), await v.flush();
|
|
1500
1513
|
}
|
|
1501
1514
|
return { state: t, emitted: n };
|
|
1502
1515
|
}
|
|
1503
1516
|
}
|
|
1517
|
+
class le {
|
|
1518
|
+
process(e, t) {
|
|
1519
|
+
const n = t.getValue();
|
|
1520
|
+
if (B(n)) {
|
|
1521
|
+
const o = t.clone();
|
|
1522
|
+
return o.setValue(n), o.setProperties(void 0), o.setItems(void 0), o.setType(void 0), o;
|
|
1523
|
+
}
|
|
1524
|
+
return e;
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* Post-process to ensure expressions aren't overridden by subsequent processors
|
|
1528
|
+
*/
|
|
1529
|
+
postProcess(e, t) {
|
|
1530
|
+
const n = t.getValue();
|
|
1531
|
+
if (B(n) && e.getValue() !== n && n !== void 0) {
|
|
1532
|
+
const o = e.clone();
|
|
1533
|
+
return o.setValue(n), o;
|
|
1534
|
+
}
|
|
1535
|
+
return e;
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
const gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1539
|
+
__proto__: null,
|
|
1540
|
+
ExpressionPreserver: le
|
|
1541
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1542
|
+
function Et() {
|
|
1543
|
+
return new k.SequentialMergingProcessor([
|
|
1544
|
+
new k.ValuePropagator(),
|
|
1545
|
+
new le(),
|
|
1546
|
+
new k.TypeAssigner(),
|
|
1547
|
+
new k.ListProcessor(),
|
|
1548
|
+
new k.DictionaryProcessor(),
|
|
1549
|
+
new k.BasicTypesVerifier()
|
|
1550
|
+
]);
|
|
1551
|
+
}
|
|
1504
1552
|
export {
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1553
|
+
yt as BlueDocumentProcessor,
|
|
1554
|
+
ze as ChannelEventCheckpointProcessor,
|
|
1555
|
+
L as CodeBlockEvaluationError,
|
|
1556
|
+
Re as CompositeTimelineChannelProcessor,
|
|
1557
|
+
He as DocumentUpdateChannelProcessor,
|
|
1558
|
+
ae as EmbeddedDocumentModificationError,
|
|
1559
|
+
Qe as EmbeddedNodeChannelProcessor,
|
|
1560
|
+
F as ExpressionEvaluationError,
|
|
1561
|
+
Ke as InitializedMarkerProcessor,
|
|
1562
|
+
Xe as LifecycleEventChannelProcessor,
|
|
1563
|
+
gt as MergingProcessors,
|
|
1564
|
+
Ze as MyOSAgentChannelProcessor,
|
|
1565
|
+
Ye as MyOSTimelineChannelProcessor,
|
|
1566
|
+
Ge as OperationProcessor,
|
|
1567
|
+
re as PatchApplicationError,
|
|
1568
|
+
et as ProcessEmbeddedProcessor,
|
|
1569
|
+
ct as SequentialWorkflowOperationProcessor,
|
|
1570
|
+
ie as SequentialWorkflowProcessor,
|
|
1571
|
+
it as TimelineChannelProcessor,
|
|
1572
|
+
Et as createDefaultMergingProcessor
|
|
1519
1573
|
};
|