@player-ui/reference-assets-plugin 0.14.1-next.1 → 0.14.1-next.3

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.
@@ -2781,13 +2781,13 @@ var ReferenceAssetsPlugin = function() {
2781
2781
  ]);
2782
2782
  return SyncWaterfallHook;
2783
2783
  }(Hook);
2784
- var AsyncParallelBailHook = /*#__PURE__*/ function(Hook) {
2785
- _inherits(AsyncParallelBailHook, Hook);
2786
- function AsyncParallelBailHook() {
2787
- _class_call_check(this, AsyncParallelBailHook);
2788
- return _call_super(this, AsyncParallelBailHook, arguments);
2784
+ var AsyncSeriesBailHook = /*#__PURE__*/ function(Hook) {
2785
+ _inherits(AsyncSeriesBailHook, Hook);
2786
+ function AsyncSeriesBailHook() {
2787
+ _class_call_check(this, AsyncSeriesBailHook);
2788
+ return _call_super(this, AsyncSeriesBailHook, arguments);
2789
2789
  }
2790
- _create_class(AsyncParallelBailHook, [
2790
+ _create_class(AsyncSeriesBailHook, [
2791
2791
  {
2792
2792
  key: "call",
2793
2793
  value: function call() {
@@ -2795,7 +2795,7 @@ var ReferenceAssetsPlugin = function() {
2795
2795
  args[_key] = arguments[_key];
2796
2796
  }
2797
2797
  return _async_to_generator(function() {
2798
- var _this_interceptions, ctx, rtn, e;
2798
+ var _this_interceptions, ctx, tapIndex, rtn, e;
2799
2799
  return _ts_generator(this, function(_state) {
2800
2800
  switch(_state.label){
2801
2801
  case 0:
@@ -2807,28 +2807,48 @@ var ReferenceAssetsPlugin = function() {
2807
2807
  case 1:
2808
2808
  _state.trys.push([
2809
2809
  1,
2810
- 3,
2810
+ 6,
2811
2811
  ,
2812
- 4
2812
+ 7
2813
2813
  ]);
2814
+ tapIndex = 0;
2815
+ _state.label = 2;
2816
+ case 2:
2817
+ if (!(tapIndex < this.taps.length)) return [
2818
+ 3,
2819
+ 5
2820
+ ];
2814
2821
  return [
2815
2822
  4,
2816
- Promise.race(this.taps.map(function(tap) {
2817
- return callTap(tap, args, ctx);
2818
- }))
2823
+ callTap(this.taps[tapIndex], args, ctx)
2819
2824
  ];
2820
- case 2:
2825
+ case 3:
2821
2826
  rtn = _state.sent();
2822
- this.interceptions.result(rtn);
2827
+ if (rtn !== void 0) {
2828
+ this.interceptions.result(rtn);
2829
+ return [
2830
+ 2,
2831
+ rtn
2832
+ ];
2833
+ }
2834
+ _state.label = 4;
2835
+ case 4:
2836
+ tapIndex += 1;
2823
2837
  return [
2824
- 2,
2825
- rtn
2838
+ 3,
2839
+ 2
2826
2840
  ];
2827
- case 3:
2841
+ case 5:
2842
+ return [
2843
+ 3,
2844
+ 7
2845
+ ];
2846
+ case 6:
2828
2847
  e = _state.sent();
2829
2848
  this.interceptions.error(e);
2830
2849
  throw e;
2831
- case 4:
2850
+ case 7:
2851
+ this.interceptions.done();
2832
2852
  return [
2833
2853
  2
2834
2854
  ];
@@ -2838,7 +2858,7 @@ var ReferenceAssetsPlugin = function() {
2838
2858
  }
2839
2859
  }
2840
2860
  ]);
2841
- return AsyncParallelBailHook;
2861
+ return AsyncSeriesBailHook;
2842
2862
  }(Hook);
2843
2863
  // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@player-ui+player@0.0.0/node_modules/@player-ui/player/dist/index.mjs
2844
2864
  var import_ts_nested_error = __toESM(require_nested_error(), 1);
@@ -8467,7 +8487,7 @@ var ReferenceAssetsPlugin = function() {
8467
8487
  _class_call_check(this, _AsyncNodePlugin2);
8468
8488
  this.symbol = _AsyncNodePlugin2.Symbol;
8469
8489
  this.hooks = {
8470
- onAsyncNode: new AsyncParallelBailHook(),
8490
+ onAsyncNode: new AsyncSeriesBailHook(),
8471
8491
  onAsyncNodeError: new SyncBailHook()
8472
8492
  };
8473
8493
  this.name = "AsyncNode";
@@ -8886,7 +8906,7 @@ var ReferenceAssetsPlugin = function() {
8886
8906
  try {
8887
8907
  for(var _iterator = keys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
8888
8908
  var id = _step.value;
8889
- var content = createContentFromMessage(message, "message-".concat(counter++));
8909
+ var content = createContentFromMessage(message, "chat-demo-".concat(counter++));
8890
8910
  var resolveFunction = deferredPromises[id];
8891
8911
  resolveFunction === null || resolveFunction === void 0 ? void 0 : resolveFunction(content);
8892
8912
  delete deferredPromises[id];
@@ -8913,6 +8933,10 @@ var ReferenceAssetsPlugin = function() {
8913
8933
  }
8914
8934
  };
8915
8935
  asyncNodePlugin.hooks.onAsyncNode.tap(this.name, function(node) {
8936
+ var _node_parent_parent, _node_parent, _node_parent_parent1, _node_parent1;
8937
+ if (((_node_parent = node.parent) === null || _node_parent === void 0 ? void 0 : (_node_parent_parent = _node_parent.parent) === null || _node_parent_parent === void 0 ? void 0 : _node_parent_parent.type) !== NodeType.Asset && ((_node_parent1 = node.parent) === null || _node_parent1 === void 0 ? void 0 : (_node_parent_parent1 = _node_parent1.parent) === null || _node_parent_parent1 === void 0 ? void 0 : _node_parent_parent1.type) !== NodeType.View || !node.parent.parent.value.id.startsWith("collection-async-chat-demo")) {
8938
+ return Promise.resolve(void 0);
8939
+ }
8916
8940
  return new Promise(function(res) {
8917
8941
  deferredPromises[node.id] = res;
8918
8942
  allPromiseKeys.push(node.id);