@rkmodules/rules 0.0.148 → 0.0.150

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 CHANGED
@@ -703,9 +703,6 @@ function interpolate(inputs, scope) {
703
703
  }));
704
704
  }
705
705
 
706
- /**
707
- * TODO: need rank polymorhism on the tree item sizes
708
- */
709
706
  var getValue = {
710
707
  name: "getValue",
711
708
  label: "Get Value",
@@ -717,17 +714,14 @@ var getValue = {
717
714
  outputs: {
718
715
  tree: "any",
719
716
  },
720
- // TODO: may want to do something with other values of path
721
- impl: function (inputs, params) { return __awaiter(void 0, void 0, void 0, function () {
722
- var paths, tree;
723
- return __generator(this, function (_a) {
724
- paths = toArray(inputs.path || {});
725
- tree = mapTree(inputs.tree || {}, function (value) {
726
- // get the property from the object
727
- var val = getValue$1(value, paths[0]);
728
- return val;
729
- });
730
- return [2 /*return*/, { tree: tree }];
717
+ impl: function (_a, params_1) { return __awaiter(void 0, [_a, params_1], void 0, function (_b, params) {
718
+ var result;
719
+ var _c = _b.tree, tree = _c === void 0 ? {} : _c, _d = _b.path, path = _d === void 0 ? {} : _d;
720
+ return __generator(this, function (_e) {
721
+ result = binaryOnTree(tree, path, function (value, path) {
722
+ return getValue$1(value, path);
723
+ }, true);
724
+ return [2 /*return*/, { tree: result }];
731
725
  });
732
726
  }); },
733
727
  };
@@ -1966,7 +1960,7 @@ var mergeTree = {
1966
1960
  name: "mergeTree",
1967
1961
  label: "Merge Tree",
1968
1962
  description: "Merge groups with the same index into a single tree.",
1969
- nodeType: "NamedInput",
1963
+ nodeType: "DynamicInput",
1970
1964
  inputs: {},
1971
1965
  outputs: {
1972
1966
  result: "any",
@@ -3055,7 +3049,7 @@ var Engine = /** @class */ (function () {
3055
3049
  context: context,
3056
3050
  startTime: startTime_1,
3057
3051
  });
3058
- return [4 /*yield*/, fn.impl(inputs_1, params_1, this, name_1)];
3052
+ return [4 /*yield*/, fn.impl(inputs_1, params_1, this, context, name_1)];
3059
3053
  case 3:
3060
3054
  // call the implentation of sub functions
3061
3055
  result_1 = _e.sent();
@@ -3223,7 +3217,7 @@ var Engine = /** @class */ (function () {
3223
3217
  return [2 /*return*/, this.run(builtFn, inputs)];
3224
3218
  }
3225
3219
  mappedInputs = interpolate(inputs, {});
3226
- return [4 /*yield*/, ((_a = node.impl) === null || _a === void 0 ? void 0 : _a.call(node, mappedInputs, {}, this, "_root"))];
3220
+ return [4 /*yield*/, ((_a = node.impl) === null || _a === void 0 ? void 0 : _a.call(node, mappedInputs, {}, this, null, "_root"))];
3227
3221
  case 1:
3228
3222
  result = _b.sent();
3229
3223
  // console.log("Engine run complete", result);