@rkmodules/rules 0.0.112 → 0.0.114
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.js +17 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +17 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/DataTree/index.d.ts +1 -0
- package/dist/lib/Engine/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -236,6 +236,12 @@ function isTree(value) {
|
|
|
236
236
|
Object.keys(value).length > 0 &&
|
|
237
237
|
Object.values(value).every(function (v) { return Array.isArray(v); }));
|
|
238
238
|
}
|
|
239
|
+
function isEmptyTree(value) {
|
|
240
|
+
return (typeof value === "object" &&
|
|
241
|
+
value !== null &&
|
|
242
|
+
!Array.isArray(value) &&
|
|
243
|
+
Object.keys(value).length === 0);
|
|
244
|
+
}
|
|
239
245
|
function isSingleTon(value) {
|
|
240
246
|
return (Object.keys(value).length === 1 && Object.values(value)[0].length === 1);
|
|
241
247
|
}
|
|
@@ -252,6 +258,9 @@ function broadCast(value) {
|
|
|
252
258
|
if (isTree(value)) {
|
|
253
259
|
return value;
|
|
254
260
|
}
|
|
261
|
+
if (isEmptyTree(value)) {
|
|
262
|
+
return {};
|
|
263
|
+
}
|
|
255
264
|
return { "0": [value] };
|
|
256
265
|
}
|
|
257
266
|
function getBranch(tree, path) {
|
|
@@ -2331,6 +2340,7 @@ var Engine = /** @class */ (function () {
|
|
|
2331
2340
|
startTime_1 = performance.now();
|
|
2332
2341
|
this.fireEvent("functionCall", {
|
|
2333
2342
|
name: name_1,
|
|
2343
|
+
fn: fnCall.name,
|
|
2334
2344
|
inputs: inputs_1,
|
|
2335
2345
|
params: params_1,
|
|
2336
2346
|
executionId: executionId,
|
|
@@ -2348,6 +2358,7 @@ var Engine = /** @class */ (function () {
|
|
|
2348
2358
|
context.scope[name_1] = result_1;
|
|
2349
2359
|
this.fireEvent("functionResult", {
|
|
2350
2360
|
name: name_1,
|
|
2361
|
+
fn: fnCall.name,
|
|
2351
2362
|
inputs: inputs_1,
|
|
2352
2363
|
params: params_1,
|
|
2353
2364
|
executionId: executionId,
|
|
@@ -2366,6 +2377,7 @@ var Engine = /** @class */ (function () {
|
|
|
2366
2377
|
endTime = performance.now();
|
|
2367
2378
|
response = {
|
|
2368
2379
|
name: node.name,
|
|
2380
|
+
fn: "root",
|
|
2369
2381
|
inputs: inputs,
|
|
2370
2382
|
params: params,
|
|
2371
2383
|
executionId: executionId,
|
|
@@ -2524,7 +2536,10 @@ var Engine = /** @class */ (function () {
|
|
|
2524
2536
|
unsub();
|
|
2525
2537
|
}
|
|
2526
2538
|
});
|
|
2527
|
-
_this.run(node, inputs).catch(
|
|
2539
|
+
_this.run(node, inputs).catch(function (e) {
|
|
2540
|
+
unsub();
|
|
2541
|
+
reject(e);
|
|
2542
|
+
});
|
|
2528
2543
|
})];
|
|
2529
2544
|
});
|
|
2530
2545
|
});
|
|
@@ -7591,6 +7606,7 @@ exports.getVariable = getVariable;
|
|
|
7591
7606
|
exports.graftTree = graftTree;
|
|
7592
7607
|
exports.hasReference = hasReference;
|
|
7593
7608
|
exports.interpolate = interpolate;
|
|
7609
|
+
exports.isEmptyTree = isEmptyTree;
|
|
7594
7610
|
exports.isReference = isReference;
|
|
7595
7611
|
exports.isSingleTon = isSingleTon;
|
|
7596
7612
|
exports.isTree = isTree;
|