@player-ui/beacon-plugin 0.13.0-next.7 → 0.14.0-next.0

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.
@@ -1454,22 +1454,6 @@ var BeaconPlugin = function() {
1454
1454
  }
1455
1455
  });
1456
1456
  };
1457
- var unpackNode = function unpackNode(item) {
1458
- var _item_children_, _item_children, _item_children_1, _item_children1;
1459
- var unpacked = [];
1460
- if ("children" in item && ((_item_children = item.children) === null || _item_children === void 0 ? void 0 : (_item_children_ = _item_children[0]) === null || _item_children_ === void 0 ? void 0 : _item_children_.value.type) === "asset" && ((_item_children1 = item.children) === null || _item_children1 === void 0 ? void 0 : (_item_children_1 = _item_children1[0]) === null || _item_children_1 === void 0 ? void 0 : _item_children_1.value).children) {
1461
- var _item_children__value_children_, _item_children__value_children, _item_children_2, _item_children2;
1462
- if (((_item_children__value_children = ((_item_children2 = item.children) === null || _item_children2 === void 0 ? void 0 : (_item_children_2 = _item_children2[0]) === null || _item_children_2 === void 0 ? void 0 : _item_children_2.value).children) === null || _item_children__value_children === void 0 ? void 0 : (_item_children__value_children_ = _item_children__value_children[0]) === null || _item_children__value_children_ === void 0 ? void 0 : _item_children__value_children_.value.type) === "multi-node") {
1463
- var _item_children__value_children_1, _item_children__value_children1, _item_children_3, _item_children3;
1464
- ((_item_children__value_children1 = ((_item_children3 = item.children) === null || _item_children3 === void 0 ? void 0 : (_item_children_3 = _item_children3[0]) === null || _item_children_3 === void 0 ? void 0 : _item_children_3.value).children) === null || _item_children__value_children1 === void 0 ? void 0 : (_item_children__value_children_1 = _item_children__value_children1[0]) === null || _item_children__value_children_1 === void 0 ? void 0 : _item_children__value_children_1.value).values.forEach(function(value) {
1465
- unpacked.push(value);
1466
- });
1467
- }
1468
- } else {
1469
- unpacked.push(item);
1470
- }
1471
- return unpacked;
1472
- };
1473
1457
  var hasSomethingToResolve = function hasSomethingToResolve(str) {
1474
1458
  return bindingResolveLookup(str) || expressionResolveLookup(str);
1475
1459
  };
@@ -2813,6 +2797,7 @@ var BeaconPlugin = function() {
2813
2797
  }
2814
2798
  };
2815
2799
  var identifier = function() {
2800
+ var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
2816
2801
  if (!isIdentifierChar(ch)) {
2817
2802
  return;
2818
2803
  }
@@ -2823,6 +2808,14 @@ var BeaconPlugin = function() {
2823
2808
  }
2824
2809
  value += ch;
2825
2810
  }
2811
+ if (allowBoolValue) {
2812
+ if (value === "true") {
2813
+ return toValue(true);
2814
+ }
2815
+ if (value === "false") {
2816
+ return toValue(false);
2817
+ }
2818
+ }
2826
2819
  if (value) {
2827
2820
  var maybeNumber = Number(value);
2828
2821
  value = isNaN(maybeNumber) ? value : maybeNumber;
@@ -2871,8 +2864,9 @@ var BeaconPlugin = function() {
2871
2864
  }
2872
2865
  };
2873
2866
  var simpleSegment = function() {
2867
+ var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
2874
2868
  var _nestedPath, _ref;
2875
- return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier();
2869
+ return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier(allowBoolValue);
2876
2870
  };
2877
2871
  var segment = function() {
2878
2872
  var segments = [];
@@ -2887,6 +2881,7 @@ var BeaconPlugin = function() {
2887
2881
  return toConcatenatedNode(segments);
2888
2882
  };
2889
2883
  var optionallyQuotedSegment = function() {
2884
+ var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
2890
2885
  whitespace();
2891
2886
  if (ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE) {
2892
2887
  var singleQuote = ch === SINGLE_QUOTE;
@@ -2895,7 +2890,7 @@ var BeaconPlugin = function() {
2895
2890
  next(singleQuote ? SINGLE_QUOTE : DOUBLE_QUOTE);
2896
2891
  return id;
2897
2892
  }
2898
- return simpleSegment();
2893
+ return simpleSegment(allowBoolValue);
2899
2894
  };
2900
2895
  var equals = function() {
2901
2896
  if (ch !== EQUALS) {
@@ -2915,7 +2910,7 @@ var BeaconPlugin = function() {
2915
2910
  whitespace();
2916
2911
  if (equals()) {
2917
2912
  whitespace();
2918
- var second = optionallyQuotedSegment();
2913
+ var second = optionallyQuotedSegment(true);
2919
2914
  value = toQuery(value, second);
2920
2915
  whitespace();
2921
2916
  }
@@ -3103,7 +3098,7 @@ var BeaconPlugin = function() {
3103
3098
  appendPathSegments(getValueForNode(resolvedNode));
3104
3099
  break;
3105
3100
  case "Value":
3106
- appendPathSegments(resolvedNode.value);
3101
+ appendPathSegments(typeof resolvedNode.value === "boolean" ? String(resolvedNode.value) : resolvedNode.value);
3107
3102
  break;
3108
3103
  case "Query":
3109
3104
  {
@@ -4670,23 +4665,8 @@ var BeaconPlugin = function() {
4670
4665
  function Parser() {
4671
4666
  _class_call_check(this, Parser);
4672
4667
  this.hooks = {
4673
- /**
4674
- * A hook to interact with an object _before_ parsing it into an AST
4675
- *
4676
- * @param value - The object we're are about to parse
4677
- * @returns - A new value to parse.
4678
- * If undefined, the original value is used.
4679
- * If null, we stop parsing this node.
4680
- */ onParseObject: new SyncWaterfallHook(),
4681
- /**
4682
- * A callback to interact with an AST _after_ we parse it into the AST
4683
- *
4684
- * @param value - The object we parsed
4685
- * @param node - The AST node we generated
4686
- * @returns - A new AST node to use
4687
- * If undefined, the original value is used.
4688
- * If null, we ignore this node all together
4689
- */ onCreateASTNode: new SyncWaterfallHook(),
4668
+ onParseObject: new SyncWaterfallHook(),
4669
+ onCreateASTNode: new SyncWaterfallHook(),
4690
4670
  parseNode: new SyncBailHook()
4691
4671
  };
4692
4672
  }
@@ -4828,20 +4808,14 @@ var BeaconPlugin = function() {
4828
4808
  function Resolver(root, options) {
4829
4809
  _class_call_check(this, Resolver);
4830
4810
  this.hooks = {
4831
- /** A hook to allow skipping of the resolution tree for a specific node */ skipResolve: new SyncWaterfallHook(),
4832
- /** An event emitted before calculating the next update */ beforeUpdate: new SyncHook(),
4833
- /** An event emitted after calculating the next update */ afterUpdate: new SyncHook(),
4834
- /** The options passed to a node to resolve it to an object */ resolveOptions: new SyncWaterfallHook(),
4835
- /** A hook to transform the AST node into a new AST node before resolving it */ beforeResolve: new SyncWaterfallHook(),
4836
- /**
4837
- * A hook to transform an AST node into it's resolved value.
4838
- * This runs _before_ any children are resolved
4839
- */ resolve: new SyncWaterfallHook(),
4840
- /**
4841
- * A hook to transform the resolved value of an AST node.
4842
- * This runs _after_ all children nodes are resolved
4843
- */ afterResolve: new SyncWaterfallHook(),
4844
- /** Called at the very end of a node's tree being updated */ afterNodeUpdate: new SyncHook()
4811
+ skipResolve: new SyncWaterfallHook(),
4812
+ beforeUpdate: new SyncHook(),
4813
+ afterUpdate: new SyncHook(),
4814
+ resolveOptions: new SyncWaterfallHook(),
4815
+ beforeResolve: new SyncWaterfallHook(),
4816
+ resolve: new SyncWaterfallHook(),
4817
+ afterResolve: new SyncWaterfallHook(),
4818
+ afterNodeUpdate: new SyncHook()
4845
4819
  };
4846
4820
  this.root = root;
4847
4821
  this.options = options;
@@ -4849,6 +4823,7 @@ var BeaconPlugin = function() {
4849
4823
  this.ASTMap = /* @__PURE__ */ new Map();
4850
4824
  this.logger = options.logger;
4851
4825
  this.idCache = /* @__PURE__ */ new Set();
4826
+ this.AsyncIdMap = /* @__PURE__ */ new Map();
4852
4827
  }
4853
4828
  _create_class(Resolver, [
4854
4829
  {
@@ -4859,13 +4834,27 @@ var BeaconPlugin = function() {
4859
4834
  },
4860
4835
  {
4861
4836
  key: "update",
4862
- value: function update(changes) {
4837
+ value: function update(changes, asyncChanges) {
4838
+ var _this = this;
4863
4839
  this.hooks.beforeUpdate.call(changes);
4864
4840
  var resolveCache = /* @__PURE__ */ new Map();
4865
4841
  this.idCache.clear();
4866
4842
  var prevASTMap = new Map(this.ASTMap);
4867
4843
  this.ASTMap.clear();
4868
- var updated = this.computeTree(this.root, void 0, changes, resolveCache, toNodeResolveOptions(this.options), void 0, prevASTMap);
4844
+ var prevAsyncIdMap = new Map(this.AsyncIdMap);
4845
+ var nextAsyncIdMap = /* @__PURE__ */ new Map();
4846
+ asyncChanges === null || asyncChanges === void 0 ? void 0 : asyncChanges.forEach(function(id) {
4847
+ var current = prevAsyncIdMap.get(id);
4848
+ while(current && prevASTMap.has(current)){
4849
+ var next = prevASTMap.get(current);
4850
+ if (next && _this.resolveCache.has(next)) {
4851
+ _this.resolveCache.delete(next);
4852
+ }
4853
+ current = current.parent;
4854
+ }
4855
+ });
4856
+ var updated = this.computeTree(this.root, void 0, changes, resolveCache, toNodeResolveOptions(this.options), void 0, prevASTMap, nextAsyncIdMap);
4857
+ this.AsyncIdMap = nextAsyncIdMap;
4869
4858
  this.resolveCache = resolveCache;
4870
4859
  this.hooks.afterUpdate.call(updated.value);
4871
4860
  return updated.value;
@@ -4919,9 +4908,8 @@ var BeaconPlugin = function() {
4919
4908
  },
4920
4909
  {
4921
4910
  key: "computeTree",
4922
- value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap) {
4911
+ value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap, nextAsyncIdMap) {
4923
4912
  var _this = this;
4924
- var _partiallyResolvedParent_parent_parent, _partiallyResolvedParent_parent, _resolvedAST_parent, _partiallyResolvedParent_parent1;
4925
4913
  var dependencyModel = new DependencyModel(options.data.model);
4926
4914
  dependencyModel.trackSubset("core");
4927
4915
  var depModelWithParser = withContext(withParser(dependencyModel, this.options.parseBinding));
@@ -4940,15 +4928,6 @@ var BeaconPlugin = function() {
4940
4928
  var previousDeps = previousResult === null || previousResult === void 0 ? void 0 : previousResult.dependencies;
4941
4929
  var dataChanged = caresAboutDataChanges(dataChanges, previousDeps);
4942
4930
  var shouldUseLastValue = this.hooks.skipResolve.call(!dataChanged, node, resolveOptions);
4943
- var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
4944
- parent: partiallyResolvedParent
4945
- });
4946
- var _this_hooks_beforeResolve_call;
4947
- var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
4948
- type: "empty"
4949
- };
4950
- var isNestedMultiNodeWithAsync = resolvedAST.type === "multi-node" && (partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : (_partiallyResolvedParent_parent = partiallyResolvedParent.parent) === null || _partiallyResolvedParent_parent === void 0 ? void 0 : (_partiallyResolvedParent_parent_parent = _partiallyResolvedParent_parent.parent) === null || _partiallyResolvedParent_parent_parent === void 0 ? void 0 : _partiallyResolvedParent_parent_parent.type) === "multi-node" && partiallyResolvedParent.parent.type === "value" && ((_resolvedAST_parent = resolvedAST.parent) === null || _resolvedAST_parent === void 0 ? void 0 : _resolvedAST_parent.type) === "asset" && resolvedAST.parent.value.id.includes("async");
4951
- var isNestedMultiNode = resolvedAST.type === "multi-node" && (partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : (_partiallyResolvedParent_parent1 = partiallyResolvedParent.parent) === null || _partiallyResolvedParent_parent1 === void 0 ? void 0 : _partiallyResolvedParent_parent1.type) === "multi-node" && partiallyResolvedParent.type === "value";
4952
4931
  if (previousResult && shouldUseLastValue) {
4953
4932
  var update2 = _object_spread_props(_object_spread({}, previousResult), {
4954
4933
  updated: false
@@ -4960,6 +4939,30 @@ var BeaconPlugin = function() {
4960
4939
  updated: false
4961
4940
  });
4962
4941
  cacheUpdate.set(AST, resolvedUpdate);
4942
+ if (resolvedUpdate.node.type === "async") {
4943
+ nextAsyncIdMap.set(resolvedUpdate.node.id, resolvedUpdate.node);
4944
+ }
4945
+ var _resolvedUpdate_node_asyncNodesResolved;
4946
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
4947
+ try {
4948
+ for(var _iterator = ((_resolvedUpdate_node_asyncNodesResolved = resolvedUpdate.node.asyncNodesResolved) !== null && _resolvedUpdate_node_asyncNodesResolved !== void 0 ? _resolvedUpdate_node_asyncNodesResolved : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
4949
+ var key = _step.value;
4950
+ nextAsyncIdMap.set(key, resolvedUpdate.node);
4951
+ }
4952
+ } catch (err) {
4953
+ _didIteratorError = true;
4954
+ _iteratorError = err;
4955
+ } finally{
4956
+ try {
4957
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
4958
+ _iterator.return();
4959
+ }
4960
+ } finally{
4961
+ if (_didIteratorError) {
4962
+ throw _iteratorError;
4963
+ }
4964
+ }
4965
+ }
4963
4966
  var handleChildNode = function(childNode) {
4964
4967
  var _prevASTMap_get;
4965
4968
  var originalChildNode = (_prevASTMap_get = prevASTMap.get(childNode)) !== null && _prevASTMap_get !== void 0 ? _prevASTMap_get : childNode;
@@ -4982,10 +4985,37 @@ var BeaconPlugin = function() {
4982
4985
  repopulateASTMapFromCache(previousResult, node, rawParent);
4983
4986
  return update2;
4984
4987
  }
4985
- if (isNestedMultiNodeWithAsync) {
4986
- resolvedAST.parent = partiallyResolvedParent.parent;
4987
- } else {
4988
- resolvedAST.parent = partiallyResolvedParent;
4988
+ var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
4989
+ parent: partiallyResolvedParent
4990
+ });
4991
+ var _this_hooks_beforeResolve_call;
4992
+ var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
4993
+ type: "empty"
4994
+ };
4995
+ resolvedAST.parent = partiallyResolvedParent;
4996
+ if (resolvedAST.type === "async") {
4997
+ nextAsyncIdMap.set(resolvedAST.id, resolvedAST);
4998
+ }
4999
+ var _resolvedAST_asyncNodesResolved;
5000
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
5001
+ try {
5002
+ for(var _iterator = ((_resolvedAST_asyncNodesResolved = resolvedAST.asyncNodesResolved) !== null && _resolvedAST_asyncNodesResolved !== void 0 ? _resolvedAST_asyncNodesResolved : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
5003
+ var id = _step.value;
5004
+ nextAsyncIdMap.set(id, resolvedAST);
5005
+ }
5006
+ } catch (err) {
5007
+ _didIteratorError = true;
5008
+ _iteratorError = err;
5009
+ } finally{
5010
+ try {
5011
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
5012
+ _iterator.return();
5013
+ }
5014
+ } finally{
5015
+ if (_didIteratorError) {
5016
+ throw _iteratorError;
5017
+ }
5018
+ }
4989
5019
  }
4990
5020
  resolveOptions.node = resolvedAST;
4991
5021
  this.ASTMap.set(resolvedAST, node);
@@ -4999,7 +5029,7 @@ var BeaconPlugin = function() {
4999
5029
  if ("children" in resolvedAST) {
5000
5030
  var _resolvedAST_children;
5001
5031
  var newChildren = (_resolvedAST_children = resolvedAST.children) === null || _resolvedAST_children === void 0 ? void 0 : _resolvedAST_children.map(function(child) {
5002
- var computedChildTree = _this.computeTree(child.value, node, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
5032
+ var computedChildTree = _this.computeTree(child.value, node, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap, nextAsyncIdMap);
5003
5033
  var childTreeDeps = computedChildTree.dependencies, childNode = computedChildTree.node, childUpdated = computedChildTree.updated, childValue = computedChildTree.value;
5004
5034
  childTreeDeps.forEach(function(binding) {
5005
5035
  return childDependencies.add(binding);
@@ -5020,40 +5050,18 @@ var BeaconPlugin = function() {
5020
5050
  resolvedAST.children = newChildren;
5021
5051
  } else if (resolvedAST.type === "multi-node") {
5022
5052
  var childValue = [];
5023
- var rawParentToPassIn = isNestedMultiNode ? partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : partiallyResolvedParent.parent : node;
5024
- var hasAsync = resolvedAST.values.map(function(value, index) {
5025
- return value.type === "async" ? index : -1;
5026
- }).filter(function(index) {
5027
- return index !== -1;
5028
- });
5029
- var newValues = resolvedAST.values.map(function(mValue) {
5030
- var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
5053
+ var rawParentToPassIn = node;
5054
+ resolvedAST.values = resolvedAST.values.map(function(mValue) {
5055
+ var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap, nextAsyncIdMap);
5031
5056
  if (mTree.value !== void 0 && mTree.value !== null) {
5032
- if (mValue.type === "async" && mValue.flatten && mTree.value.asset && Array.isArray(mTree.value.asset.values)) {
5033
- unpackAndPush(mTree.value, childValue);
5034
- } else {
5035
- childValue.push(mTree.value);
5036
- }
5057
+ mTree.dependencies.forEach(function(bindingDep) {
5058
+ return childDependencies.add(bindingDep);
5059
+ });
5060
+ updated = updated || mTree.updated;
5061
+ childValue.push(mTree.value);
5037
5062
  }
5038
- mTree.dependencies.forEach(function(bindingDep) {
5039
- return childDependencies.add(bindingDep);
5040
- });
5041
- updated = updated || mTree.updated;
5042
5063
  return mTree.node;
5043
5064
  });
5044
- if (hasAsync.length > 0) {
5045
- var copy = newValues;
5046
- hasAsync.forEach(function(index) {
5047
- var _copy;
5048
- if (copy[index]) (_copy = copy).splice.apply(_copy, [
5049
- index,
5050
- 1
5051
- ].concat(_to_consumable_array(unpackNode(copy[index]))));
5052
- });
5053
- resolvedAST.values = copy;
5054
- } else {
5055
- resolvedAST.values = newValues;
5056
- }
5057
5065
  resolved = childValue;
5058
5066
  }
5059
5067
  childDependencies.forEach(function(bindingDep) {
@@ -5074,7 +5082,7 @@ var BeaconPlugin = function() {
5074
5082
  value: resolved,
5075
5083
  dependencies: /* @__PURE__ */ new Set(_to_consumable_array(dependencyModel.getDependencies()).concat(_to_consumable_array(childDependencies)))
5076
5084
  };
5077
- this.hooks.afterNodeUpdate.call(node, isNestedMultiNode ? partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : partiallyResolvedParent.parent : rawParent, update);
5085
+ this.hooks.afterNodeUpdate.call(node, rawParent, update);
5078
5086
  cacheUpdate.set(node, update);
5079
5087
  return update;
5080
5088
  }
@@ -5082,15 +5090,6 @@ var BeaconPlugin = function() {
5082
5090
  ]);
5083
5091
  return Resolver;
5084
5092
  }();
5085
- function unpackAndPush(item, initial) {
5086
- if (item.asset.values && Array.isArray(item.asset.values)) {
5087
- item.asset.values.forEach(function(i) {
5088
- unpackAndPush(i, initial);
5089
- });
5090
- } else {
5091
- initial.push(item);
5092
- }
5093
- }
5094
5093
  var CrossfieldProvider = /*#__PURE__*/ function() {
5095
5094
  function CrossfieldProvider(initialView, parser, logger) {
5096
5095
  _class_call_check(this, CrossfieldProvider);
@@ -5158,9 +5157,11 @@ var BeaconPlugin = function() {
5158
5157
  _create_class(ViewInstance, [
5159
5158
  {
5160
5159
  key: "updateAsync",
5161
- value: function updateAsync() {
5160
+ value: function updateAsync(asyncNode) {
5162
5161
  var _this_resolver;
5163
- var update = (_this_resolver = this.resolver) === null || _this_resolver === void 0 ? void 0 : _this_resolver.update();
5162
+ var update = (_this_resolver = this.resolver) === null || _this_resolver === void 0 ? void 0 : _this_resolver.update(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set([
5163
+ asyncNode
5164
+ ]));
5164
5165
  this.lastUpdate = update;
5165
5166
  this.hooks.onUpdate.call(update);
5166
5167
  }
@@ -5701,7 +5702,7 @@ var BeaconPlugin = function() {
5701
5702
  key: "applyParser",
5702
5703
  value: function applyParser(parser) {
5703
5704
  parser.hooks.parseNode.tap("multi-node", function(obj, nodeType, options, childOptions) {
5704
- if (childOptions && !hasTemplateKey(childOptions.key) && Array.isArray(obj)) {
5705
+ if ((childOptions === void 0 || !hasTemplateKey(childOptions.key)) && Array.isArray(obj)) {
5705
5706
  var values = obj.map(function(childVal) {
5706
5707
  return parser.parseObject(childVal, "value", options);
5707
5708
  }).filter(function(child) {
@@ -5712,7 +5713,7 @@ var BeaconPlugin = function() {
5712
5713
  }
5713
5714
  var multiNode = parser.createASTNode({
5714
5715
  type: "multi-node",
5715
- override: !hasTemplateValues(childOptions.parentObj, childOptions.key),
5716
+ override: childOptions !== void 0 && !hasTemplateValues(childOptions.parentObj, childOptions.key),
5716
5717
  values: values
5717
5718
  }, obj);
5718
5719
  if (!multiNode) {
@@ -5723,7 +5724,7 @@ var BeaconPlugin = function() {
5723
5724
  v.parent = multiNode;
5724
5725
  });
5725
5726
  }
5726
- return [
5727
+ return childOptions === void 0 ? multiNode : [
5727
5728
  {
5728
5729
  path: _to_consumable_array(childOptions.path).concat([
5729
5730
  childOptions.key