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