@rkmodules/rules 0.0.179 → 0.0.180

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.
@@ -1965,15 +1965,23 @@ var listLength = {
1965
1965
  inputs: {
1966
1966
  list: "any",
1967
1967
  },
1968
+ params: {
1969
+ merge: "boolean",
1970
+ },
1968
1971
  outputs: {
1969
1972
  length: "number",
1970
1973
  },
1971
- impl: function (inputs) { return __awaiter(void 0, void 0, void 0, function () {
1974
+ impl: function (inputs, params) { return __awaiter(void 0, void 0, void 0, function () {
1975
+ var length;
1972
1976
  return __generator(this, function (_a) {
1977
+ length = mapTreeBranch(inputs.list || {}, function (branch) {
1978
+ return [branch.length];
1979
+ });
1980
+ if (params.merge) {
1981
+ length = trimTree(length, 1);
1982
+ }
1973
1983
  return [2 /*return*/, {
1974
- length: mapTreeBranch(inputs.list || {}, function (branch) {
1975
- return [branch.length];
1976
- }),
1984
+ length: length,
1977
1985
  }];
1978
1986
  });
1979
1987
  }); },
@@ -3868,7 +3876,10 @@ var Engine = /** @class */ (function () {
3868
3876
  // register the primitive
3869
3877
  this.fnIndex[primitive.name] = primitive;
3870
3878
  this.graphDefinitions.set(primitive, node);
3871
- this.fireEvent("functionBuilt", { name: primitive.name, fn: primitive });
3879
+ this.fireEvent("functionBuilt", {
3880
+ name: primitive.name,
3881
+ fn: primitive,
3882
+ });
3872
3883
  return primitive;
3873
3884
  };
3874
3885
  Engine.prototype.mount = function (node, inputs, options) {