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