@arronqzy/blueprint-dsl 1.0.18 → 1.0.19
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/index.cjs +475 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +97 -1
- package/dist/index.d.ts +97 -1
- package/dist/index.js +461 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -49,6 +49,7 @@ var ZH_CN = {
|
|
|
49
49
|
lifecycleSignalMissing: "\u751F\u547D\u5468\u671F\u4FE1\u53F7\u7F3A\u5931",
|
|
50
50
|
blueprintCycle: "\u84DD\u56FE\u5F15\u7528\u5B58\u5728\u6B7B\u5FAA\u73AF\uFF1A{path}",
|
|
51
51
|
debugMustStartFromLifecycle: "\u8C03\u8BD5\u4F1A\u8BDD\u53EA\u80FD\u4ECE\u751F\u547D\u5468\u671F\u8282\u70B9\u5F00\u59CB",
|
|
52
|
+
debugLifecycleDisabled: "\u8BE5\u751F\u547D\u5468\u671F\u8282\u70B9\u5DF2\u505C\u7528\uFF1B\u540C\u9636\u6BB5\u8BF7\u6539\u7528\u5DF2\u542F\u7528\u7684\u751F\u547D\u5468\u671F\u8282\u70B9",
|
|
52
53
|
nodeRemoved: "\u8282\u70B9\u5DF2\u4ECE\u84DD\u56FE\u4E2D\u79FB\u9664",
|
|
53
54
|
clockNeedsTrue: "\u65F6\u949F\u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u542F\u52A8",
|
|
54
55
|
blueprintNeedsTrue: "\u84DD\u56FE\u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u6267\u884C",
|
|
@@ -59,7 +60,9 @@ var ZH_CN = {
|
|
|
59
60
|
fetchNeedsTrue: "\u6570\u636E\u6E90\u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u53D1\u8D77\u8BF7\u6C42",
|
|
60
61
|
jsonNeedsTrue: "JSON \u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u89E3\u6790",
|
|
61
62
|
storageNeedsTrue: "\u5B58\u50A8\u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u8BFB\u5199\u7F13\u5B58",
|
|
62
|
-
andNeedsBothTrue: "\u5E76\u8FD0\u7B97\uFF1A\u4E24\u4E2A\u8F93\u5165\u987B\u5747\u4E3A\u771F\u4FE1\u53F7"
|
|
63
|
+
andNeedsBothTrue: "\u5E76\u8FD0\u7B97\uFF1A\u4E24\u4E2A\u8F93\u5165\u987B\u5747\u4E3A\u771F\u4FE1\u53F7",
|
|
64
|
+
branchNeedsTrue: "\u5206\u652F\u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u5224\u65AD\u6761\u4EF6",
|
|
65
|
+
branchExpressionError: "\u5206\u652F\u6761\u4EF6\u8868\u8FBE\u5F0F\u6C42\u503C\u5931\u8D25\uFF1A{reason}"
|
|
63
66
|
};
|
|
64
67
|
var EN_US = {
|
|
65
68
|
invalidJson: "Invalid JSON: {reason}",
|
|
@@ -109,6 +112,7 @@ var EN_US = {
|
|
|
109
112
|
lifecycleSignalMissing: "Lifecycle signal is missing",
|
|
110
113
|
blueprintCycle: "Blueprint references form a cycle: {path}",
|
|
111
114
|
debugMustStartFromLifecycle: "A debug session can only start from a lifecycle node",
|
|
115
|
+
debugLifecycleDisabled: "This lifecycle node is disabled; use the enabled node of the same phase instead",
|
|
112
116
|
nodeRemoved: "Node was removed from the blueprint",
|
|
113
117
|
clockNeedsTrue: "Clock node starts only after receiving a true signal",
|
|
114
118
|
blueprintNeedsTrue: "Blueprint node runs only after receiving a true signal",
|
|
@@ -119,7 +123,9 @@ var EN_US = {
|
|
|
119
123
|
fetchNeedsTrue: "Data source node sends the request only after receiving a true signal",
|
|
120
124
|
jsonNeedsTrue: "JSON node parses only after receiving a true signal",
|
|
121
125
|
storageNeedsTrue: "Storage node reads/writes only after receiving a true signal",
|
|
122
|
-
andNeedsBothTrue: "AND: both inputs must be true signals"
|
|
126
|
+
andNeedsBothTrue: "AND: both inputs must be true signals",
|
|
127
|
+
branchNeedsTrue: "Branch node evaluates only after receiving a true signal",
|
|
128
|
+
branchExpressionError: "Branch condition evaluation failed: {reason}"
|
|
123
129
|
};
|
|
124
130
|
var CATALOGS = {
|
|
125
131
|
"zh-CN": ZH_CN,
|
|
@@ -173,6 +179,108 @@ function createLifecycleSignal(phase) {
|
|
|
173
179
|
isoTime: new Date(timestamp).toISOString()
|
|
174
180
|
};
|
|
175
181
|
}
|
|
182
|
+
function resolveLifecyclePhase(node) {
|
|
183
|
+
const phase = node.lifecyclePhase;
|
|
184
|
+
if (phase && PAGE_LIFECYCLE_PHASES.includes(phase)) {
|
|
185
|
+
return phase;
|
|
186
|
+
}
|
|
187
|
+
return "mounted";
|
|
188
|
+
}
|
|
189
|
+
function isLifecycleGraphNode(node, lifecycleNodeType = "Lifecycle") {
|
|
190
|
+
return node.nodeType === lifecycleNodeType || node.role === "lifecycle";
|
|
191
|
+
}
|
|
192
|
+
function listLifecyclePeers(nodes, phase, lifecycleNodeType = "Lifecycle") {
|
|
193
|
+
return nodes.filter(
|
|
194
|
+
(node) => isLifecycleGraphNode(node, lifecycleNodeType) && resolveLifecyclePhase(node) === phase
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
function hasDuplicateLifecyclePhase(nodes, phase, lifecycleNodeType = "Lifecycle") {
|
|
198
|
+
return listLifecyclePeers(nodes, phase, lifecycleNodeType).length > 1;
|
|
199
|
+
}
|
|
200
|
+
function shouldEmitLifecycleNode(node, nodes, lifecycleNodeType = "Lifecycle") {
|
|
201
|
+
if (!isLifecycleGraphNode(node, lifecycleNodeType)) return false;
|
|
202
|
+
const peers = listLifecyclePeers(
|
|
203
|
+
nodes,
|
|
204
|
+
resolveLifecyclePhase(node),
|
|
205
|
+
lifecycleNodeType
|
|
206
|
+
);
|
|
207
|
+
if (peers.length <= 1) return true;
|
|
208
|
+
return node.lifecycleEnabled !== false;
|
|
209
|
+
}
|
|
210
|
+
function defaultLifecycleEnabledForNewNode(nodes, phase, lifecycleNodeType = "Lifecycle") {
|
|
211
|
+
return listLifecyclePeers(nodes, phase, lifecycleNodeType).length === 0;
|
|
212
|
+
}
|
|
213
|
+
function findEmittableLifecycleNodeId(nodes, preferredId, lifecycleNodeType = "Lifecycle") {
|
|
214
|
+
if (preferredId) {
|
|
215
|
+
const preferred = nodes.find((node) => node.id === preferredId);
|
|
216
|
+
if (preferred && shouldEmitLifecycleNode(preferred, nodes, lifecycleNodeType)) {
|
|
217
|
+
return preferredId;
|
|
218
|
+
}
|
|
219
|
+
if (preferred && isLifecycleGraphNode(preferred, lifecycleNodeType)) {
|
|
220
|
+
const peer = listLifecyclePeers(
|
|
221
|
+
nodes,
|
|
222
|
+
resolveLifecyclePhase(preferred),
|
|
223
|
+
lifecycleNodeType
|
|
224
|
+
).find(
|
|
225
|
+
(candidate) => shouldEmitLifecycleNode(candidate, nodes, lifecycleNodeType)
|
|
226
|
+
);
|
|
227
|
+
if (peer) return peer.id;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
const first = nodes.find(
|
|
231
|
+
(node) => isLifecycleGraphNode(node, lifecycleNodeType) && shouldEmitLifecycleNode(node, nodes, lifecycleNodeType)
|
|
232
|
+
);
|
|
233
|
+
return first?.id ?? null;
|
|
234
|
+
}
|
|
235
|
+
function reconcileLifecycleEnabled(nodes, focusNodeId, enabled, lifecycleNodeType = "Lifecycle") {
|
|
236
|
+
if (focusNodeId && enabled === true) {
|
|
237
|
+
const focus = nodes.find((node) => node.id === focusNodeId);
|
|
238
|
+
if (!focus || !isLifecycleGraphNode(focus, lifecycleNodeType)) {
|
|
239
|
+
return [...nodes];
|
|
240
|
+
}
|
|
241
|
+
const phase = resolveLifecyclePhase(focus);
|
|
242
|
+
return nodes.map((node) => {
|
|
243
|
+
if (!isLifecycleGraphNode(node, lifecycleNodeType)) return node;
|
|
244
|
+
if (resolveLifecyclePhase(node) !== phase) return node;
|
|
245
|
+
if (node.id === focusNodeId) {
|
|
246
|
+
return node.lifecycleEnabled === true ? node : { ...node, lifecycleEnabled: true };
|
|
247
|
+
}
|
|
248
|
+
return node.lifecycleEnabled === false ? node : { ...node, lifecycleEnabled: false };
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
if (focusNodeId && enabled === false) {
|
|
252
|
+
return nodes.map(
|
|
253
|
+
(node) => node.id === focusNodeId ? node.lifecycleEnabled === false ? node : { ...node, lifecycleEnabled: false } : node
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
let next = [...nodes];
|
|
257
|
+
const phases = new Set(
|
|
258
|
+
nodes.filter((node) => isLifecycleGraphNode(node, lifecycleNodeType)).map((node) => resolveLifecyclePhase(node))
|
|
259
|
+
);
|
|
260
|
+
for (const phase of phases) {
|
|
261
|
+
const peers = listLifecyclePeers(next, phase, lifecycleNodeType);
|
|
262
|
+
if (peers.length <= 1) continue;
|
|
263
|
+
const enabledPeers = peers.filter((peer) => peer.lifecycleEnabled !== false);
|
|
264
|
+
if (enabledPeers.length === 0) {
|
|
265
|
+
next = next.map((node) => {
|
|
266
|
+
if (!isLifecycleGraphNode(node, lifecycleNodeType)) return node;
|
|
267
|
+
if (resolveLifecyclePhase(node) !== phase) return node;
|
|
268
|
+
return node.lifecycleEnabled === false ? node : { ...node, lifecycleEnabled: false };
|
|
269
|
+
});
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
const keepId = enabledPeers[0].id;
|
|
273
|
+
next = next.map((node) => {
|
|
274
|
+
if (!isLifecycleGraphNode(node, lifecycleNodeType)) return node;
|
|
275
|
+
if (resolveLifecyclePhase(node) !== phase) return node;
|
|
276
|
+
if (node.id === keepId) {
|
|
277
|
+
return node.lifecycleEnabled === true ? node : { ...node, lifecycleEnabled: true };
|
|
278
|
+
}
|
|
279
|
+
return node.lifecycleEnabled === false ? node : { ...node, lifecycleEnabled: false };
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
return next;
|
|
283
|
+
}
|
|
176
284
|
|
|
177
285
|
// src/node-signal.ts
|
|
178
286
|
function isTrueSignal(signal) {
|
|
@@ -893,6 +1001,16 @@ var SYSTEM_LOCATION_KEYS = [
|
|
|
893
1001
|
"replace",
|
|
894
1002
|
"toString"
|
|
895
1003
|
];
|
|
1004
|
+
var SYSTEM_TOOLS_KEYS = [
|
|
1005
|
+
"str",
|
|
1006
|
+
"int",
|
|
1007
|
+
"sum",
|
|
1008
|
+
"len",
|
|
1009
|
+
"pick",
|
|
1010
|
+
"replace",
|
|
1011
|
+
"replaceAll",
|
|
1012
|
+
"exclude"
|
|
1013
|
+
];
|
|
896
1014
|
function createLocationStub() {
|
|
897
1015
|
return {
|
|
898
1016
|
href: "",
|
|
@@ -915,12 +1033,152 @@ function createLocationStub() {
|
|
|
915
1033
|
}
|
|
916
1034
|
};
|
|
917
1035
|
}
|
|
1036
|
+
function flattenToolArgs(values) {
|
|
1037
|
+
const out = [];
|
|
1038
|
+
for (const value of values) {
|
|
1039
|
+
if (Array.isArray(value)) {
|
|
1040
|
+
out.push(...flattenToolArgs(value));
|
|
1041
|
+
} else {
|
|
1042
|
+
out.push(value);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
return out;
|
|
1046
|
+
}
|
|
1047
|
+
function toIndexList(values) {
|
|
1048
|
+
const out = [];
|
|
1049
|
+
for (const value of flattenToolArgs(values)) {
|
|
1050
|
+
const n = typeof value === "number" ? value : Number(value);
|
|
1051
|
+
if (Number.isInteger(n) && n >= 0) {
|
|
1052
|
+
out.push(n);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
return out;
|
|
1056
|
+
}
|
|
1057
|
+
function valuesEqual(a, b) {
|
|
1058
|
+
return Object.is(a, b);
|
|
1059
|
+
}
|
|
1060
|
+
function replaceInArray(list, target, source, all) {
|
|
1061
|
+
if (all) {
|
|
1062
|
+
return list.map((item) => valuesEqual(item, target) ? source : item);
|
|
1063
|
+
}
|
|
1064
|
+
const out = list.slice();
|
|
1065
|
+
const idx = out.findIndex((item) => valuesEqual(item, target));
|
|
1066
|
+
if (idx >= 0) {
|
|
1067
|
+
out[idx] = source;
|
|
1068
|
+
}
|
|
1069
|
+
return out;
|
|
1070
|
+
}
|
|
1071
|
+
function replaceInString(text, target, source, all) {
|
|
1072
|
+
const from = target === void 0 || target === null ? "" : String(target);
|
|
1073
|
+
const to = source === void 0 || source === null ? "" : String(source);
|
|
1074
|
+
if (from.length === 0) {
|
|
1075
|
+
return text;
|
|
1076
|
+
}
|
|
1077
|
+
if (!all) {
|
|
1078
|
+
const at = text.indexOf(from);
|
|
1079
|
+
if (at < 0) return text;
|
|
1080
|
+
return text.slice(0, at) + to + text.slice(at + from.length);
|
|
1081
|
+
}
|
|
1082
|
+
return text.split(from).join(to);
|
|
1083
|
+
}
|
|
1084
|
+
function createSystemTools() {
|
|
1085
|
+
return {
|
|
1086
|
+
str(value) {
|
|
1087
|
+
if (value === void 0 || value === null) return "";
|
|
1088
|
+
if (typeof value === "string") return value;
|
|
1089
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
|
|
1090
|
+
return String(value);
|
|
1091
|
+
}
|
|
1092
|
+
if (esm_default.isDayjs(value)) {
|
|
1093
|
+
return value.toISOString();
|
|
1094
|
+
}
|
|
1095
|
+
try {
|
|
1096
|
+
return JSON.stringify(value);
|
|
1097
|
+
} catch {
|
|
1098
|
+
return String(value);
|
|
1099
|
+
}
|
|
1100
|
+
},
|
|
1101
|
+
int(value) {
|
|
1102
|
+
if (typeof value === "number") return value;
|
|
1103
|
+
if (typeof value === "bigint") return Number(value);
|
|
1104
|
+
if (typeof value === "boolean") return value ? 1 : 0;
|
|
1105
|
+
if (value === void 0 || value === null || value === "") return NaN;
|
|
1106
|
+
return Number(value);
|
|
1107
|
+
},
|
|
1108
|
+
sum(...values) {
|
|
1109
|
+
const flat = flattenToolArgs(values);
|
|
1110
|
+
if (flat.length === 0) return 0;
|
|
1111
|
+
const hasString = flat.some((item) => typeof item === "string");
|
|
1112
|
+
if (hasString) {
|
|
1113
|
+
let result = flat[0];
|
|
1114
|
+
for (let i = 1; i < flat.length; i += 1) {
|
|
1115
|
+
result = result + flat[i];
|
|
1116
|
+
}
|
|
1117
|
+
return result;
|
|
1118
|
+
}
|
|
1119
|
+
return flat.reduce((acc, item) => {
|
|
1120
|
+
const n = typeof item === "number" ? item : Number(item);
|
|
1121
|
+
return acc + (Number.isFinite(n) ? n : 0);
|
|
1122
|
+
}, 0);
|
|
1123
|
+
},
|
|
1124
|
+
len(value) {
|
|
1125
|
+
if (typeof value === "string") return value.length;
|
|
1126
|
+
if (Array.isArray(value)) return value.length;
|
|
1127
|
+
if (value === void 0 || value === null) return 0;
|
|
1128
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
|
|
1129
|
+
return String(value).length;
|
|
1130
|
+
}
|
|
1131
|
+
try {
|
|
1132
|
+
return JSON.stringify(value).length;
|
|
1133
|
+
} catch {
|
|
1134
|
+
return String(value).length;
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1137
|
+
pick(value, ...indices) {
|
|
1138
|
+
const idxs = toIndexList(indices);
|
|
1139
|
+
if (Array.isArray(value)) {
|
|
1140
|
+
return idxs.filter((i) => i < value.length).map((i) => value[i]);
|
|
1141
|
+
}
|
|
1142
|
+
const text = typeof value === "string" ? value : value == null ? "" : String(value);
|
|
1143
|
+
return idxs.filter((i) => i < text.length).map((i) => text[i]).join("");
|
|
1144
|
+
},
|
|
1145
|
+
replace(value, target, source) {
|
|
1146
|
+
if (Array.isArray(value)) {
|
|
1147
|
+
return replaceInArray(value, target, source, false);
|
|
1148
|
+
}
|
|
1149
|
+
const text = typeof value === "string" ? value : value == null ? "" : String(value);
|
|
1150
|
+
return replaceInString(text, target, source, false);
|
|
1151
|
+
},
|
|
1152
|
+
replaceAll(value, target, source) {
|
|
1153
|
+
if (Array.isArray(value)) {
|
|
1154
|
+
return replaceInArray(value, target, source, true);
|
|
1155
|
+
}
|
|
1156
|
+
const text = typeof value === "string" ? value : value == null ? "" : String(value);
|
|
1157
|
+
return replaceInString(text, target, source, true);
|
|
1158
|
+
},
|
|
1159
|
+
exclude(value, ...indices) {
|
|
1160
|
+
const remove = new Set(toIndexList(indices));
|
|
1161
|
+
if (Array.isArray(value)) {
|
|
1162
|
+
return value.filter((_, i) => !remove.has(i));
|
|
1163
|
+
}
|
|
1164
|
+
const text = typeof value === "string" ? value : value == null ? "" : String(value);
|
|
1165
|
+
let out = "";
|
|
1166
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
1167
|
+
if (!remove.has(i)) {
|
|
1168
|
+
out += text[i];
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
return out;
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
918
1175
|
function createSystemRoot() {
|
|
919
1176
|
const locationValue = typeof globalThis !== "undefined" && "location" in globalThis && globalThis.location ? globalThis.location : createLocationStub();
|
|
920
1177
|
return {
|
|
921
1178
|
time: esm_default(),
|
|
922
1179
|
math: Math,
|
|
923
|
-
location: locationValue
|
|
1180
|
+
location: locationValue,
|
|
1181
|
+
tools: createSystemTools()
|
|
924
1182
|
};
|
|
925
1183
|
}
|
|
926
1184
|
function getSystemAutocompleteTree() {
|
|
@@ -936,10 +1194,15 @@ function getSystemAutocompleteTree() {
|
|
|
936
1194
|
for (const name of SYSTEM_LOCATION_KEYS) {
|
|
937
1195
|
locationKeys[name] = /* @__PURE__ */ Object.create(null);
|
|
938
1196
|
}
|
|
1197
|
+
const toolsKeys = {};
|
|
1198
|
+
for (const name of SYSTEM_TOOLS_KEYS) {
|
|
1199
|
+
toolsKeys[name] = /* @__PURE__ */ Object.create(null);
|
|
1200
|
+
}
|
|
939
1201
|
return {
|
|
940
1202
|
time: timeMethods,
|
|
941
1203
|
math: mathKeys,
|
|
942
|
-
location: locationKeys
|
|
1204
|
+
location: locationKeys,
|
|
1205
|
+
tools: toolsKeys
|
|
943
1206
|
};
|
|
944
1207
|
}
|
|
945
1208
|
function isDayjsValue(value) {
|
|
@@ -1236,7 +1499,7 @@ var zh = (zhCN, enUS) => ({
|
|
|
1236
1499
|
"en-US": enUS
|
|
1237
1500
|
});
|
|
1238
1501
|
var TEMPLATE_DOC_LINK_RE = /\{(?:scope|system)[^}]*\}|\b(?:scope|system)\?\.[\w$]+(?:\?\.[\w$]+)*/g;
|
|
1239
|
-
var SYSTEM_SECTIONS = /* @__PURE__ */ new Set(["time", "math", "location"]);
|
|
1502
|
+
var SYSTEM_SECTIONS = /* @__PURE__ */ new Set(["time", "math", "location", "tools"]);
|
|
1240
1503
|
var SCOPE_FIELDS = /* @__PURE__ */ new Set(["value", "id", "name", "type"]);
|
|
1241
1504
|
function docText(text, locale) {
|
|
1242
1505
|
return locale === "en-US" ? text["en-US"] : text["zh-CN"];
|
|
@@ -1379,6 +1642,63 @@ var LOCATION_MEMBERS = [
|
|
|
1379
1642
|
{ name: "replace", summary: zh("\u8DF3\u8F6C\u5230\u65B0\u5730\u5740\uFF0C\u5E76\u66FF\u6362\u5F53\u524D\u5386\u53F2\u3002\u4F1A\u79BB\u5F00\u5F53\u524D\u9875\uFF0C\u6A21\u677F\u91CC\u4E00\u822C\u4E0D\u8981\u8C03\u7528\u3002", "Navigate and replace the current history entry. This leaves the page."), usage: "{system?.location?.replace('https://example.com')}" },
|
|
1380
1643
|
{ name: "reload", summary: zh("\u5237\u65B0\u5F53\u524D\u9875\u3002\u6A21\u677F\u91CC\u4E00\u822C\u4E0D\u8981\u8C03\u7528\u3002", "Reload the page. Avoid calling it from a template."), usage: "{system?.location?.reload()}" }
|
|
1381
1644
|
];
|
|
1645
|
+
var TOOLS_MEMBERS = [
|
|
1646
|
+
{
|
|
1647
|
+
name: "str",
|
|
1648
|
+
summary: zh("\u8F6C\u6210\u5B57\u7B26\u4E32\u3002null/undefined \u53D8\u6210\u7A7A\u4E32\uFF1B\u5BF9\u8C61\u5C3D\u91CF JSON.stringify\u3002", "Convert to string. null/undefined become ''. Objects prefer JSON.stringify."),
|
|
1649
|
+
usage: "{system?.tools?.str(123)}"
|
|
1650
|
+
},
|
|
1651
|
+
{
|
|
1652
|
+
name: "int",
|
|
1653
|
+
summary: zh("\u8F6C\u6210\u6570\u5B57\uFF08Number\uFF09\u3002\u7A7A\u503C\u5F97\u5230 NaN\u3002", "Convert to a number (Number). Empty values become NaN."),
|
|
1654
|
+
usage: "{system?.tools?.int('42')}"
|
|
1655
|
+
},
|
|
1656
|
+
{
|
|
1657
|
+
name: "sum",
|
|
1658
|
+
summary: zh(
|
|
1659
|
+
"\u6C42\u548C\u6216\u62FC\u63A5\u3002\u53EF\u5199 sum(1,2,3) \u6216 sum([...scope?.arr])\uFF1B\u5D4C\u5957\u6570\u7EC4\u4F1A\u5C55\u5E73\u3002\u5168\u662F\u6570\u5B57\u5219\u6570\u503C\u76F8\u52A0\uFF1B\u53EA\u8981\u6709\u4E00\u9879\u662F\u5B57\u7B26\u4E32\uFF0C\u5C31\u6309 JS \u7684 + \u4ECE\u5DE6\u5230\u53F3\u62FC\u63A5\u6210\u5B57\u7B26\u4E32\u3002",
|
|
1660
|
+
"Sum or concatenate. Use sum(1,2,3) or sum([...scope?.arr]); nested arrays are flattened. All numbers \u2192 numeric sum; any string \u2192 JS + left-to-right string concat."
|
|
1661
|
+
),
|
|
1662
|
+
usage: "{system?.tools?.sum([...scope?.arr||[]])}"
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
name: "len",
|
|
1666
|
+
summary: zh("\u5B57\u7B26\u4E32\u957F\u5EA6\uFF1B\u6570\u7EC4\u8FD4\u56DE length\uFF1B\u5176\u5B83\u503C\u5148\u8F6C\u6210\u5B57\u7B26\u4E32\u518D\u53D6\u957F\u5EA6\u3002\u53EF\u5D4C\u5957\uFF0C\u5982 len(str(123)) \u2192 3\u3002", "String length; arrays return length; other values are stringified first. Nesting works, e.g. len(str(123)) \u2192 3."),
|
|
1667
|
+
usage: "{system?.tools?.len(system?.tools?.str(123))}"
|
|
1668
|
+
},
|
|
1669
|
+
{
|
|
1670
|
+
name: "pick",
|
|
1671
|
+
summary: zh(
|
|
1672
|
+
"\u6309 0 \u57FA\u4E0B\u6807\u53D6\u51FA\u82E5\u5E72\u9879\u3002\u6570\u7EC4\u8FD4\u56DE\u65B0\u6570\u7EC4\uFF0C\u5B57\u7B26\u4E32\u8FD4\u56DE\u65B0\u5B57\u7B26\u4E32\u3002\u540E\u7EED\u4E0B\u6807\u53EF\u5199\u591A\u4E2A\uFF0C\u4E5F\u53EF\u5C55\u5F00 scope \u6570\u7EC4\uFF0C\u5982 pick(scope?.arr, [...scope?.idxs])\u3002",
|
|
1673
|
+
"Pick by 0-based indices. Arrays \u2192 new array; strings \u2192 new string. Extra indices can be listed or spread from scope, e.g. pick(scope?.arr, [...scope?.idxs])."
|
|
1674
|
+
),
|
|
1675
|
+
usage: "{system?.tools?.pick(scope?.arr,1,2)}"
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
name: "replace",
|
|
1679
|
+
summary: zh(
|
|
1680
|
+
"\u53EA\u66FF\u6362\u7B2C\u4E00\u4E2A\u5339\u914D\u9879\u3002\u6570\u7EC4\u6309\u5143\u7D20\u503C\u66FF\u6362\uFF1B\u5B57\u7B26\u4E32\u6309\u5B50\u4E32\u66FF\u6362\u3002\u4F8B\u5982 replace([1,2,3,1],1,2) \u2192 [2,2,3,1]\u3002",
|
|
1681
|
+
"Replace the first match only. Arrays match by element value; strings match by substring. e.g. replace([1,2,3,1],1,2) \u2192 [2,2,3,1]."
|
|
1682
|
+
),
|
|
1683
|
+
usage: "{system?.tools?.replace(scope?.arr,scope?.target,scope?.source)}"
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
name: "replaceAll",
|
|
1687
|
+
summary: zh(
|
|
1688
|
+
"\u66FF\u6362\u5168\u90E8\u5339\u914D\u9879\uFF0C\u89C4\u5219\u540C replace\u3002",
|
|
1689
|
+
"Replace every match. Same rules as replace."
|
|
1690
|
+
),
|
|
1691
|
+
usage: "{system?.tools?.replaceAll(scope?.arr,scope?.target,scope?.source)}"
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
name: "exclude",
|
|
1695
|
+
summary: zh(
|
|
1696
|
+
"\u6309 0 \u57FA\u4E0B\u6807\u5220\u9664\u82E5\u5E72\u9879\uFF0C\u8FD4\u56DE\u65B0\u6570\u7EC4 / \u65B0\u5B57\u7B26\u4E32\u3002\u540E\u7EED\u4E0B\u6807\u652F\u6301\u5C55\u5F00\uFF0C\u5982 exclude(scope?.arr, [...scope?.idxs])\u3002",
|
|
1697
|
+
"Drop 0-based indices and return a new array/string. Extra indices can be spread, e.g. exclude(scope?.arr, [...scope?.idxs])."
|
|
1698
|
+
),
|
|
1699
|
+
usage: "{system?.tools?.exclude(scope?.arr,0,1)}"
|
|
1700
|
+
}
|
|
1701
|
+
];
|
|
1382
1702
|
var TEMPLATE_DOC_BOOKS = {
|
|
1383
1703
|
system: {
|
|
1384
1704
|
root: "system",
|
|
@@ -1392,10 +1712,15 @@ var TEMPLATE_DOC_BOOKS = {
|
|
|
1392
1712
|
id: "overview",
|
|
1393
1713
|
title: zh("\u662F\u4EC0\u4E48", "What it is"),
|
|
1394
1714
|
body: zh(
|
|
1395
|
-
"\u5199\u5728\u82B1\u62EC\u53F7\u91CC\u624D\u4F1A\u6C42\u503C\uFF0C\u4F8B\u5982 {system?.time}\u3002\
|
|
1396
|
-
"Values are computed only inside braces, for example {system?.time}. There are
|
|
1715
|
+
"\u5199\u5728\u82B1\u62EC\u53F7\u91CC\u624D\u4F1A\u6C42\u503C\uFF0C\u4F8B\u5982 {system?.time}\u3002\u56DB\u4E2A\u5165\u53E3\uFF1Atime \u662F\u5F53\u524D\u65F6\u95F4\uFF08dayjs\uFF09\uFF0Cmath \u662F JavaScript \u7684 Math\uFF0Clocation \u662F\u5F53\u524D\u9875\u7684\u5730\u5740\uFF0Ctools \u662F\u5E38\u7528\u8F6C\u6362\u5DE5\u5177\uFF08str / int / sum / len / pick / replace / replaceAll / exclude\uFF09\u3002\u975E\u6D4F\u89C8\u5668\u73AF\u5883\u91CC location \u662F\u7A7A\u7684\u5360\u4F4D\uFF0C\u4E0D\u4F1A\u629B\u9519\u3002\u51FD\u6570\u53EF\u4EE5\u4E92\u76F8\u5D4C\u5957\uFF0C\u4E5F\u53EF\u4EE5\u548C scope \u4E00\u8D77\u5199\u3002",
|
|
1716
|
+
"Values are computed only inside braces, for example {system?.time}. There are four entries: time is the current dayjs time, math is JavaScript Math, location is the current page URL, and tools covers helpers (str / int / sum / len / pick / replace / replaceAll / exclude). Outside a browser, location is an empty stub and does not throw. Functions can nest and mix with scope."
|
|
1397
1717
|
),
|
|
1398
|
-
examples: [
|
|
1718
|
+
examples: [
|
|
1719
|
+
"{system?.time}",
|
|
1720
|
+
"{system?.math?.PI}",
|
|
1721
|
+
"{system?.location?.origin}",
|
|
1722
|
+
"{system?.tools?.len(system?.tools?.str(123))}"
|
|
1723
|
+
]
|
|
1399
1724
|
},
|
|
1400
1725
|
{
|
|
1401
1726
|
id: "syntax",
|
|
@@ -1457,6 +1782,27 @@ var TEMPLATE_DOC_BOOKS = {
|
|
|
1457
1782
|
"https://api.example.com{system?.location?.pathname}"
|
|
1458
1783
|
],
|
|
1459
1784
|
members: LOCATION_MEMBERS
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
id: "tools",
|
|
1788
|
+
title: zh("tools \u5E38\u7528\u5DE5\u5177", "tools"),
|
|
1789
|
+
body: zh(
|
|
1790
|
+
"system?.tools \u63D0\u4F9B\u8F6C\u6362\u3001\u805A\u5408\u3001\u6309\u4F4D\u9009\u53D6\u4E0E\u66FF\u6362\u3002\u53EF\u5D4C\u5957\u8C03\u7528\u3002sum / pick / exclude \u7684\u540E\u7EED\u53C2\u6570\u90FD\u652F\u6301\u5C55\u5F00\u4E0A\u6E38\u6570\u7EC4\uFF0C\u5982 {system?.tools?.pick(scope?.arr,[...scope?.idxs||[]])}\u3002\u4E0B\u6807\u4E00\u5F8B\u4ECE 0 \u5F00\u59CB\u3002replace \u53EA\u6362\u7B2C\u4E00\u5904\uFF0CreplaceAll \u6362\u5168\u90E8\u3002",
|
|
1791
|
+
"system?.tools converts, aggregates, picks, and replaces. Nest freely. Trailing args of sum / pick / exclude can spread upstream arrays, e.g. {system?.tools?.pick(scope?.arr,[...scope?.idxs||[]])}. Indices are 0-based. replace changes the first match; replaceAll changes every match."
|
|
1792
|
+
),
|
|
1793
|
+
examples: [
|
|
1794
|
+
"{system?.tools?.str(123)}",
|
|
1795
|
+
"{system?.tools?.int('42')}",
|
|
1796
|
+
"{system?.tools?.sum(1,2,3)}",
|
|
1797
|
+
"{system?.tools?.sum([...scope?.arr||[]])}",
|
|
1798
|
+
"{system?.tools?.len(system?.tools?.str(123))}",
|
|
1799
|
+
"{system?.tools?.pick(scope?.arr,1,2)}",
|
|
1800
|
+
"{system?.tools?.pick(scope?.arr,[...scope?.idxs||[]])}",
|
|
1801
|
+
"{system?.tools?.replace(scope?.arr,scope?.target,scope?.source)}",
|
|
1802
|
+
"{system?.tools?.replaceAll(scope?.arr,scope?.target,scope?.source)}",
|
|
1803
|
+
"{system?.tools?.exclude(scope?.arr,0,1)}"
|
|
1804
|
+
],
|
|
1805
|
+
members: TOOLS_MEMBERS
|
|
1460
1806
|
}
|
|
1461
1807
|
]
|
|
1462
1808
|
},
|
|
@@ -2620,6 +2966,30 @@ function executeLogicConfig(config, input) {
|
|
|
2620
2966
|
return run(input);
|
|
2621
2967
|
}
|
|
2622
2968
|
|
|
2969
|
+
// src/branch-config.ts
|
|
2970
|
+
var DEFAULT_BRANCH_NODE_CONFIG = {
|
|
2971
|
+
expression: ""
|
|
2972
|
+
};
|
|
2973
|
+
function normalizeBranchConfig(config) {
|
|
2974
|
+
return {
|
|
2975
|
+
expression: typeof config?.expression === "string" ? config.expression : ""
|
|
2976
|
+
};
|
|
2977
|
+
}
|
|
2978
|
+
function evaluateBranchCondition(expression, scope) {
|
|
2979
|
+
const raw = expression ?? "";
|
|
2980
|
+
const trimmed = raw.trim();
|
|
2981
|
+
if (!trimmed) return false;
|
|
2982
|
+
let value;
|
|
2983
|
+
if (isWholeScopeExpression(trimmed)) {
|
|
2984
|
+
value = evaluateScopeExpression(trimmed.slice(1, -1), scope);
|
|
2985
|
+
} else if (hasScopeTemplate(raw)) {
|
|
2986
|
+
value = evaluateScopeTemplate(raw, scope);
|
|
2987
|
+
} else {
|
|
2988
|
+
value = evaluateScopeExpression(trimmed, scope);
|
|
2989
|
+
}
|
|
2990
|
+
return Boolean(value);
|
|
2991
|
+
}
|
|
2992
|
+
|
|
2623
2993
|
// src/clock-config.ts
|
|
2624
2994
|
var DEFAULT_CLOCK_NODE_CONFIG = {
|
|
2625
2995
|
intervalSeconds: 0,
|
|
@@ -2823,7 +3193,12 @@ function collectArmedViewEventNodeIds(nodes, edges, eventNodeType, lifecycleNode
|
|
|
2823
3193
|
const source = byId.get(edge.source);
|
|
2824
3194
|
if (!source || source.nodeType !== lifecycleNodeType) return false;
|
|
2825
3195
|
const phase = source.lifecyclePhase || "mounted";
|
|
2826
|
-
|
|
3196
|
+
if (!firedPhases.has(phase)) return false;
|
|
3197
|
+
const peers = nodes.filter(
|
|
3198
|
+
(candidate) => candidate.nodeType === lifecycleNodeType && (candidate.lifecyclePhase || "mounted") === phase
|
|
3199
|
+
);
|
|
3200
|
+
if (peers.length > 1 && source.lifecycleEnabled === false) return false;
|
|
3201
|
+
return true;
|
|
2827
3202
|
});
|
|
2828
3203
|
if (registered) armed.add(node.id);
|
|
2829
3204
|
}
|
|
@@ -3339,6 +3714,7 @@ var JSON_NODE_TYPE = "JsonNode";
|
|
|
3339
3714
|
var STORAGE_NODE_TYPE = "StorageNode";
|
|
3340
3715
|
var CLOCK_NODE_TYPE = "Clock";
|
|
3341
3716
|
var AND_NODE_TYPE = "AndLogic";
|
|
3717
|
+
var BRANCH_NODE_TYPE = "Branch";
|
|
3342
3718
|
var VIEW_NODE_TYPE = "ViewBind";
|
|
3343
3719
|
var EVENT_NODE_TYPE = "ViewEvent";
|
|
3344
3720
|
var blueprintNodeDefinition = {
|
|
@@ -3392,6 +3768,15 @@ var andLogicNodeDefinition = {
|
|
|
3392
3768
|
outputs: [{ name: "out", kind: "data" }],
|
|
3393
3769
|
behavior: { kind: "js", ref: "and-run" }
|
|
3394
3770
|
};
|
|
3771
|
+
var branchNodeDefinition = {
|
|
3772
|
+
type: BRANCH_NODE_TYPE,
|
|
3773
|
+
inputs: [{ name: "in", kind: "data" }],
|
|
3774
|
+
outputs: [
|
|
3775
|
+
{ name: "outTrue", kind: "data" },
|
|
3776
|
+
{ name: "outFalse", kind: "data" }
|
|
3777
|
+
],
|
|
3778
|
+
behavior: { kind: "js", ref: "branch-run" }
|
|
3779
|
+
};
|
|
3395
3780
|
var viewBindNodeDefinition = {
|
|
3396
3781
|
type: VIEW_NODE_TYPE,
|
|
3397
3782
|
inputs: [{ name: "in", kind: "data" }],
|
|
@@ -3413,6 +3798,7 @@ var nodeDefinitionRegistry = {
|
|
|
3413
3798
|
[STORAGE_NODE_TYPE]: storageNodeDefinition,
|
|
3414
3799
|
[CLOCK_NODE_TYPE]: clockNodeDefinition,
|
|
3415
3800
|
[AND_NODE_TYPE]: andLogicNodeDefinition,
|
|
3801
|
+
[BRANCH_NODE_TYPE]: branchNodeDefinition,
|
|
3416
3802
|
[VIEW_NODE_TYPE]: viewBindNodeDefinition,
|
|
3417
3803
|
[EVENT_NODE_TYPE]: viewEventNodeDefinition
|
|
3418
3804
|
};
|
|
@@ -3601,6 +3987,7 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
3601
3987
|
this.registerLogicBehavior();
|
|
3602
3988
|
this.registerClockBehavior();
|
|
3603
3989
|
this.registerAndBehavior();
|
|
3990
|
+
this.registerBranchBehavior();
|
|
3604
3991
|
this.registerViewBindBehavior();
|
|
3605
3992
|
}
|
|
3606
3993
|
graph;
|
|
@@ -3687,7 +4074,7 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
3687
4074
|
await this.ensureNoBlueprintCycle();
|
|
3688
4075
|
const signal = createLifecycleSignal(phase);
|
|
3689
4076
|
const targets = this.graph.nodes.filter(
|
|
3690
|
-
(node) => node.nodeType === LIFECYCLE_NODE_TYPE && node
|
|
4077
|
+
(node) => node.nodeType === LIFECYCLE_NODE_TYPE && resolveLifecyclePhase(node) === phase && shouldEmitLifecycleNode(node, this.graph.nodes, LIFECYCLE_NODE_TYPE)
|
|
3691
4078
|
);
|
|
3692
4079
|
for (const node of targets) {
|
|
3693
4080
|
await this.runFromNode(node.id, signal);
|
|
@@ -3700,7 +4087,7 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
3700
4087
|
async emitBlueprintActivated(inputValue, parentScope) {
|
|
3701
4088
|
const signal = createLifecycleSignal("blueprintActivated");
|
|
3702
4089
|
const targets = this.graph.nodes.filter(
|
|
3703
|
-
(node) => node.nodeType === LIFECYCLE_NODE_TYPE && node
|
|
4090
|
+
(node) => node.nodeType === LIFECYCLE_NODE_TYPE && resolveLifecyclePhase(node) === "blueprintActivated" && shouldEmitLifecycleNode(node, this.graph.nodes, LIFECYCLE_NODE_TYPE)
|
|
3704
4091
|
);
|
|
3705
4092
|
for (const node of targets) {
|
|
3706
4093
|
await this.runFromNode(node.id, signal, parentScope, inputValue);
|
|
@@ -3907,6 +4294,9 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
3907
4294
|
if (node.nodeType !== LIFECYCLE_NODE_TYPE) {
|
|
3908
4295
|
throw new Error(dslMessage("debugMustStartFromLifecycle"));
|
|
3909
4296
|
}
|
|
4297
|
+
if (!shouldEmitLifecycleNode(node, this.graph.nodes, LIFECYCLE_NODE_TYPE)) {
|
|
4298
|
+
throw new Error(dslMessage("debugLifecycleDisabled"));
|
|
4299
|
+
}
|
|
3910
4300
|
this.outputs.clear();
|
|
3911
4301
|
this.traceEntries = [];
|
|
3912
4302
|
this.debugQueue = [
|
|
@@ -4218,8 +4608,12 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
4218
4608
|
return this.isFalseOutputNode(targetId);
|
|
4219
4609
|
}
|
|
4220
4610
|
isFalseOutputNode(nodeId) {
|
|
4221
|
-
const
|
|
4222
|
-
|
|
4611
|
+
const ports = this.outputs.get(nodeId);
|
|
4612
|
+
if (!ports || ports.size === 0) return false;
|
|
4613
|
+
for (const value of ports.values()) {
|
|
4614
|
+
if (isFalseSignal(value)) return true;
|
|
4615
|
+
}
|
|
4616
|
+
return false;
|
|
4223
4617
|
}
|
|
4224
4618
|
haltDebugQueueOnFalseOutput(nodeId) {
|
|
4225
4619
|
if (!this.debugQueue || this.graph.allowFalseSignalPropagation) return;
|
|
@@ -4537,6 +4931,59 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
4537
4931
|
io.emitFlow("out");
|
|
4538
4932
|
});
|
|
4539
4933
|
}
|
|
4934
|
+
registerBranchBehavior() {
|
|
4935
|
+
const runner = this;
|
|
4936
|
+
this.behaviors.registerJS("branch-run", async ({ token, io }) => {
|
|
4937
|
+
const node = runner.requireNode(token.nodeId);
|
|
4938
|
+
try {
|
|
4939
|
+
const input = await io.getInput("in");
|
|
4940
|
+
if (isFalseSignal(input)) {
|
|
4941
|
+
io.setOutput("outFalse", input);
|
|
4942
|
+
io.emitFlow("outFalse");
|
|
4943
|
+
return;
|
|
4944
|
+
}
|
|
4945
|
+
if (!isTrueSignal(input)) {
|
|
4946
|
+
io.setOutput(
|
|
4947
|
+
"outFalse",
|
|
4948
|
+
createFalseSignal(dslMessage("branchNeedsTrue"))
|
|
4949
|
+
);
|
|
4950
|
+
io.emitFlow("outFalse");
|
|
4951
|
+
return;
|
|
4952
|
+
}
|
|
4953
|
+
const incomingScope = runner.buildFetchIncomingScope(
|
|
4954
|
+
token.nodeId,
|
|
4955
|
+
"in",
|
|
4956
|
+
input
|
|
4957
|
+
);
|
|
4958
|
+
const config = normalizeBranchConfig({
|
|
4959
|
+
...DEFAULT_BRANCH_NODE_CONFIG,
|
|
4960
|
+
...node.branchConfig
|
|
4961
|
+
});
|
|
4962
|
+
const matched = evaluateBranchCondition(
|
|
4963
|
+
config.expression,
|
|
4964
|
+
incomingScope
|
|
4965
|
+
);
|
|
4966
|
+
const passThrough = createTrueSignal(input.value);
|
|
4967
|
+
if (matched) {
|
|
4968
|
+
io.setOutput("outTrue", passThrough);
|
|
4969
|
+
io.emitFlow("outTrue");
|
|
4970
|
+
} else {
|
|
4971
|
+
io.setOutput("outFalse", passThrough);
|
|
4972
|
+
io.emitFlow("outFalse");
|
|
4973
|
+
}
|
|
4974
|
+
} catch (error) {
|
|
4975
|
+
io.setOutput(
|
|
4976
|
+
"outFalse",
|
|
4977
|
+
createFalseSignal(
|
|
4978
|
+
dslMessage("branchExpressionError", {
|
|
4979
|
+
reason: error instanceof Error ? error.message : String(error)
|
|
4980
|
+
})
|
|
4981
|
+
)
|
|
4982
|
+
);
|
|
4983
|
+
io.emitFlow("outFalse");
|
|
4984
|
+
}
|
|
4985
|
+
});
|
|
4986
|
+
}
|
|
4540
4987
|
registerViewBindBehavior() {
|
|
4541
4988
|
const runner = this;
|
|
4542
4989
|
this.behaviors.registerJS("view-bind-run", async ({ token, io }) => {
|
|
@@ -4735,10 +5182,12 @@ exports.API_COLLECTION_DOCUMENT_VERSION = API_COLLECTION_DOCUMENT_VERSION;
|
|
|
4735
5182
|
exports.BLUEPRINT_ACTIVATION_INPUT_KEY = BLUEPRINT_ACTIVATION_INPUT_KEY;
|
|
4736
5183
|
exports.BLUEPRINT_CALL_STACK_KEY = BLUEPRINT_CALL_STACK_KEY;
|
|
4737
5184
|
exports.BLUEPRINT_NODE_TYPE = BLUEPRINT_NODE_TYPE;
|
|
5185
|
+
exports.BRANCH_NODE_TYPE = BRANCH_NODE_TYPE;
|
|
4738
5186
|
exports.BehaviorRegistry = BehaviorRegistry;
|
|
4739
5187
|
exports.BlueprintCycleError = BlueprintCycleError;
|
|
4740
5188
|
exports.BlueprintGraphRunner = BlueprintGraphRunner;
|
|
4741
5189
|
exports.CLOCK_NODE_TYPE = CLOCK_NODE_TYPE;
|
|
5190
|
+
exports.DEFAULT_BRANCH_NODE_CONFIG = DEFAULT_BRANCH_NODE_CONFIG;
|
|
4742
5191
|
exports.DEFAULT_CLOCK_NODE_CONFIG = DEFAULT_CLOCK_NODE_CONFIG;
|
|
4743
5192
|
exports.DEFAULT_FETCH_REQUEST_CONFIG = DEFAULT_FETCH_REQUEST_CONFIG;
|
|
4744
5193
|
exports.DEFAULT_JSON_NODE_CONFIG = DEFAULT_JSON_NODE_CONFIG;
|
|
@@ -4766,6 +5215,7 @@ exports.STORAGE_NODE_TYPE = STORAGE_NODE_TYPE;
|
|
|
4766
5215
|
exports.SYSTEM_LOCATION_KEYS = SYSTEM_LOCATION_KEYS;
|
|
4767
5216
|
exports.SYSTEM_MATH_KEYS = SYSTEM_MATH_KEYS;
|
|
4768
5217
|
exports.SYSTEM_TIME_METHOD_NAMES = SYSTEM_TIME_METHOD_NAMES;
|
|
5218
|
+
exports.SYSTEM_TOOLS_KEYS = SYSTEM_TOOLS_KEYS;
|
|
4769
5219
|
exports.TEMPLATE_DOC_BOOKS = TEMPLATE_DOC_BOOKS;
|
|
4770
5220
|
exports.TEMPLATE_DOC_CHROME = TEMPLATE_DOC_CHROME;
|
|
4771
5221
|
exports.TEMPLATE_ROOT_NAMES = TEMPLATE_ROOT_NAMES;
|
|
@@ -4783,6 +5233,7 @@ exports.applyFetchConfigScope = applyFetchConfigScope;
|
|
|
4783
5233
|
exports.applyScopeAutocompleteSelection = applyScopeAutocompleteSelection;
|
|
4784
5234
|
exports.assertNoBlueprintReferenceCycle = assertNoBlueprintReferenceCycle;
|
|
4785
5235
|
exports.blueprintNodeDefinition = blueprintNodeDefinition;
|
|
5236
|
+
exports.branchNodeDefinition = branchNodeDefinition;
|
|
4786
5237
|
exports.buildApiCollectionEndpointUrl = buildApiCollectionEndpointUrl;
|
|
4787
5238
|
exports.buildApiCollectionSyncPatches = buildApiCollectionSyncPatches;
|
|
4788
5239
|
exports.buildClockSessionKey = buildClockSessionKey;
|
|
@@ -4806,9 +5257,11 @@ exports.createFalseSignal = createFalseSignal;
|
|
|
4806
5257
|
exports.createIncomingNodeScopeEntry = createIncomingNodeScopeEntry;
|
|
4807
5258
|
exports.createLifecycleSignal = createLifecycleSignal;
|
|
4808
5259
|
exports.createSystemRoot = createSystemRoot;
|
|
5260
|
+
exports.createSystemTools = createSystemTools;
|
|
4809
5261
|
exports.createTraceEntryId = createTraceEntryId;
|
|
4810
5262
|
exports.createTrueSignal = createTrueSignal;
|
|
4811
5263
|
exports.createViewEventSignal = createViewEventSignal;
|
|
5264
|
+
exports.defaultLifecycleEnabledForNewNode = defaultLifecycleEnabledForNewNode;
|
|
4812
5265
|
exports.defaultLogicNodeDefinition = defaultLogicNodeDefinition;
|
|
4813
5266
|
exports.deserializeStorageValue = deserializeStorageValue;
|
|
4814
5267
|
exports.detectBlueprintReferenceCycle = detectBlueprintReferenceCycle;
|
|
@@ -4817,6 +5270,7 @@ exports.docText = docText;
|
|
|
4817
5270
|
exports.downloadApiCollectionTemplate = downloadApiCollectionTemplate;
|
|
4818
5271
|
exports.draftFetchHeadersText = draftFetchHeadersText;
|
|
4819
5272
|
exports.dslMessage = dslMessage;
|
|
5273
|
+
exports.evaluateBranchCondition = evaluateBranchCondition;
|
|
4820
5274
|
exports.evaluateScopeExpression = evaluateScopeExpression;
|
|
4821
5275
|
exports.evaluateScopeTemplate = evaluateScopeTemplate;
|
|
4822
5276
|
exports.evaluateScopeTemplateInJson = evaluateScopeTemplateInJson;
|
|
@@ -4828,6 +5282,7 @@ exports.fetchConfigHasScopeTemplate = fetchConfigHasScopeTemplate;
|
|
|
4828
5282
|
exports.fetchNodeDefinition = fetchNodeDefinition;
|
|
4829
5283
|
exports.filterEndpointSuggestions = filterEndpointSuggestions;
|
|
4830
5284
|
exports.filterStorageKeySuggestions = filterStorageKeySuggestions;
|
|
5285
|
+
exports.findEmittableLifecycleNodeId = findEmittableLifecycleNodeId;
|
|
4831
5286
|
exports.findJsonSyntaxErrorOffset = findJsonSyntaxErrorOffset;
|
|
4832
5287
|
exports.findSuspectCharRanges = findSuspectCharRanges;
|
|
4833
5288
|
exports.formatBlueprintCycleMessage = formatBlueprintCycleMessage;
|
|
@@ -4844,6 +5299,7 @@ exports.getNodeDefinition = getNodeDefinition;
|
|
|
4844
5299
|
exports.getScopeAutocompleteSuggestions = getScopeAutocompleteSuggestions;
|
|
4845
5300
|
exports.getSystemAutocompleteTree = getSystemAutocompleteTree;
|
|
4846
5301
|
exports.getTemplateDocRequest = getTemplateDocRequest;
|
|
5302
|
+
exports.hasDuplicateLifecyclePhase = hasDuplicateLifecyclePhase;
|
|
4847
5303
|
exports.hasScopeTemplate = hasScopeTemplate;
|
|
4848
5304
|
exports.hasTemplateExpression = hasTemplateExpression;
|
|
4849
5305
|
exports.isClockNodeActive = isClockNodeActive;
|
|
@@ -4851,6 +5307,7 @@ exports.isClockScheduleActive = isClockScheduleActive;
|
|
|
4851
5307
|
exports.isClockSessionAborted = isClockSessionAborted;
|
|
4852
5308
|
exports.isDayjsValue = isDayjsValue;
|
|
4853
5309
|
exports.isFalseSignal = isFalseSignal;
|
|
5310
|
+
exports.isLifecycleGraphNode = isLifecycleGraphNode;
|
|
4854
5311
|
exports.isStorageReadConfigured = isStorageReadConfigured;
|
|
4855
5312
|
exports.isStorageSetConfigured = isStorageSetConfigured;
|
|
4856
5313
|
exports.isTrueSignal = isTrueSignal;
|
|
@@ -4861,10 +5318,12 @@ exports.latestTraceOutputsByNode = latestTraceOutputsByNode;
|
|
|
4861
5318
|
exports.lifecycleNodeDefinition = lifecycleNodeDefinition;
|
|
4862
5319
|
exports.lintJsonString = lintJsonString;
|
|
4863
5320
|
exports.listBrowserStorageKeys = listBrowserStorageKeys;
|
|
5321
|
+
exports.listLifecyclePeers = listLifecyclePeers;
|
|
4864
5322
|
exports.looksLikeJsonText = looksLikeJsonText;
|
|
4865
5323
|
exports.nodeDefinitionRegistry = nodeDefinitionRegistry;
|
|
4866
5324
|
exports.normalizeApiCollectionUrlKey = normalizeApiCollectionUrlKey;
|
|
4867
5325
|
exports.normalizeAppNameSpace = normalizeAppNameSpace;
|
|
5326
|
+
exports.normalizeBranchConfig = normalizeBranchConfig;
|
|
4868
5327
|
exports.normalizeClockConfig = normalizeClockConfig;
|
|
4869
5328
|
exports.normalizeFetchRequestConfig = normalizeFetchRequestConfig;
|
|
4870
5329
|
exports.normalizeStorageConfig = normalizeStorageConfig;
|
|
@@ -4877,6 +5336,7 @@ exports.parseJsonText = parseJsonText;
|
|
|
4877
5336
|
exports.parseScopeAutocomplete = parseScopeAutocomplete;
|
|
4878
5337
|
exports.parseSwaggerDocument = parseSwaggerDocument;
|
|
4879
5338
|
exports.preserveTemplateTokensInEncode = preserveTemplateTokensInEncode;
|
|
5339
|
+
exports.reconcileLifecycleEnabled = reconcileLifecycleEnabled;
|
|
4880
5340
|
exports.registerDefaultBehaviors = registerDefaultBehaviors;
|
|
4881
5341
|
exports.renderJsonWithErrorHighlights = renderJsonWithErrorHighlights;
|
|
4882
5342
|
exports.resolveBlueprintCallStack = resolveBlueprintCallStack;
|
|
@@ -4885,6 +5345,7 @@ exports.resolveFetchHeaders = resolveFetchHeaders;
|
|
|
4885
5345
|
exports.resolveFetchIncomingScope = resolveFetchIncomingScope;
|
|
4886
5346
|
exports.resolveFetchRequestUrl = resolveFetchRequestUrl;
|
|
4887
5347
|
exports.resolveFetchScopeAutocompleteRoot = resolveFetchScopeAutocompleteRoot;
|
|
5348
|
+
exports.resolveLifecyclePhase = resolveLifecyclePhase;
|
|
4888
5349
|
exports.resolveStorageKey = resolveStorageKey;
|
|
4889
5350
|
exports.resolveStorageWriteValue = resolveStorageWriteValue;
|
|
4890
5351
|
exports.resolveTemplateDocTarget = resolveTemplateDocTarget;
|
|
@@ -4893,6 +5354,7 @@ exports.sectionSearchText = sectionSearchText;
|
|
|
4893
5354
|
exports.serializeStorageValue = serializeStorageValue;
|
|
4894
5355
|
exports.serializeTraceValue = serializeTraceValue;
|
|
4895
5356
|
exports.setBlueprintDslLocale = setBlueprintDslLocale;
|
|
5357
|
+
exports.shouldEmitLifecycleNode = shouldEmitLifecycleNode;
|
|
4896
5358
|
exports.snapshotDomEvent = snapshotDomEvent;
|
|
4897
5359
|
exports.snapshotViewEventNode = snapshotViewEventNode;
|
|
4898
5360
|
exports.splitTemplateDocLinks = splitTemplateDocLinks;
|