@aws-amplify/pubsub 4.5.4 → 4.5.5

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/aws-amplify-pubsub.js +69 -36
  3. package/dist/aws-amplify-pubsub.js.map +1 -1
  4. package/dist/aws-amplify-pubsub.min.js +1 -1
  5. package/dist/aws-amplify-pubsub.min.js.map +1 -1
  6. package/lib/Providers/AWSAppSyncRealTimeProvider/index.d.ts +1 -1
  7. package/lib/Providers/AWSAppSyncRealTimeProvider/index.js +9 -9
  8. package/lib/Providers/AWSAppSyncRealTimeProvider/index.js.map +1 -1
  9. package/lib/Providers/MqttOverWSProvider.d.ts +2 -1
  10. package/lib/Providers/MqttOverWSProvider.js.map +1 -1
  11. package/lib/Providers/PubSubProvider.d.ts +1 -1
  12. package/lib/index.d.ts +2 -9
  13. package/lib/index.js +1 -9
  14. package/lib/index.js.map +1 -1
  15. package/lib/types/Provider.d.ts +10 -1
  16. package/lib/types/PubSub.d.ts +22 -8
  17. package/lib/types/PubSub.js +56 -0
  18. package/lib/types/PubSub.js.map +1 -1
  19. package/lib/types/index.d.ts +0 -17
  20. package/lib/types/index.js +4 -36
  21. package/lib/types/index.js.map +1 -1
  22. package/lib/utils/ConnectionStateMonitor.d.ts +1 -1
  23. package/lib/utils/ConnectionStateMonitor.js +9 -9
  24. package/lib/utils/ConnectionStateMonitor.js.map +1 -1
  25. package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.d.ts +1 -1
  26. package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.js +2 -2
  27. package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.js.map +1 -1
  28. package/lib-esm/Providers/MqttOverWSProvider.d.ts +2 -1
  29. package/lib-esm/Providers/MqttOverWSProvider.js.map +1 -1
  30. package/lib-esm/Providers/PubSubProvider.d.ts +1 -1
  31. package/lib-esm/index.d.ts +2 -9
  32. package/lib-esm/index.js +2 -10
  33. package/lib-esm/index.js.map +1 -1
  34. package/lib-esm/types/Provider.d.ts +10 -1
  35. package/lib-esm/types/PubSub.d.ts +22 -8
  36. package/lib-esm/types/PubSub.js +56 -0
  37. package/lib-esm/types/PubSub.js.map +1 -1
  38. package/lib-esm/types/index.d.ts +0 -17
  39. package/lib-esm/types/index.js +1 -36
  40. package/lib-esm/types/index.js.map +1 -1
  41. package/lib-esm/utils/ConnectionStateMonitor.d.ts +1 -1
  42. package/lib-esm/utils/ConnectionStateMonitor.js +1 -1
  43. package/lib-esm/utils/ConnectionStateMonitor.js.map +1 -1
  44. package/package.json +5 -5
  45. package/src/Providers/AWSAppSyncRealTimeProvider/index.ts +3 -2
  46. package/src/Providers/MqttOverWSProvider.ts +2 -1
  47. package/src/Providers/PubSubProvider.ts +1 -1
  48. package/src/index.ts +2 -10
  49. package/src/types/Provider.ts +13 -1
  50. package/src/types/PubSub.ts +47 -8
  51. package/src/types/index.ts +0 -43
  52. package/src/utils/ConnectionStateMonitor.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.5.5](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/pubsub@4.5.3...@aws-amplify/pubsub@4.5.5) (2022-09-30)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **pubsub:** Vite build issues ([#10353](https://github.com/aws-amplify/amplify-js/issues/10353)) ([4988d51](https://github.com/aws-amplify/amplify-js/commit/4988d51a6ffa1215a413c19c80f39a035eb42512))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [4.5.4](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/pubsub@4.5.3...@aws-amplify/pubsub@4.5.4) (2022-09-20)
7
18
 
8
19
  **Note:** Version bump only for package @aws-amplify/pubsub
@@ -7640,7 +7640,7 @@ __webpack_require__.r(__webpack_exports__);
7640
7640
  /* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @aws-amplify/auth */ "@aws-amplify/auth");
7641
7641
  /* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_7__);
7642
7642
  /* harmony import */ var _PubSubProvider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../PubSubProvider */ "./lib-esm/Providers/PubSubProvider.js");
7643
- /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../index */ "./lib-esm/index.js");
7643
+ /* harmony import */ var _types_PubSub__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../types/PubSub */ "./lib-esm/types/PubSub.js");
7644
7644
  /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../constants */ "./lib-esm/Providers/constants.js");
7645
7645
  /* harmony import */ var _utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/ConnectionStateMonitor */ "./lib-esm/utils/ConnectionStateMonitor.js");
7646
7646
  var __extends = undefined && undefined.__extends || function () {
@@ -7912,7 +7912,7 @@ function (_super) {
7912
7912
  _this.connectionStateMonitor = new _utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["ConnectionStateMonitor"](); // Monitor the connection state and pass changes along to Hub
7913
7913
 
7914
7914
  _this.connectionStateMonitor.connectionStateObservable.subscribe(function (ConnectionState) {
7915
- dispatchApiEvent(_index__WEBPACK_IMPORTED_MODULE_9__["CONNECTION_STATE_CHANGE"], {
7915
+ dispatchApiEvent(_constants__WEBPACK_IMPORTED_MODULE_10__["CONNECTION_STATE_CHANGE"], {
7916
7916
  provider: _this,
7917
7917
  connectionState: ConnectionState
7918
7918
  }, "Connection state is " + ConnectionState);
@@ -7965,7 +7965,7 @@ function (_super) {
7965
7965
  subscriptionId: subscriptionId_1
7966
7966
  })["catch"](function (err) {
7967
7967
  observer.error({
7968
- errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_index__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].REALTIME_SUBSCRIPTION_INIT_ERROR + ": " + err))]
7968
+ errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].REALTIME_SUBSCRIPTION_INIT_ERROR + ": " + err))]
7969
7969
  });
7970
7970
 
7971
7971
  _this.connectionStateMonitor.record(_utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["CONNECTION_CHANGE"].CLOSED);
@@ -8140,7 +8140,7 @@ function (_super) {
8140
8140
  message = (_b = err_2['message']) !== null && _b !== void 0 ? _b : '';
8141
8141
  this.connectionStateMonitor.record(_utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["CONNECTION_CHANGE"].CLOSED);
8142
8142
  observer.error({
8143
- errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_index__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_FAILED + ": " + message))]
8143
+ errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_FAILED + ": " + message))]
8144
8144
  });
8145
8145
  observer.complete();
8146
8146
  subscriptionFailedCallback_1 = (this.subscriptionObserverMap.get(subscriptionId) || {}).subscriptionFailedCallback; // Notify concurrent unsubscription
@@ -8334,7 +8334,7 @@ function (_super) {
8334
8334
  }
8335
8335
 
8336
8336
  if (startAckTimeoutId) clearTimeout(startAckTimeoutId);
8337
- dispatchApiEvent(_index__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].SUBSCRIPTION_ACK, {
8337
+ dispatchApiEvent(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].SUBSCRIPTION_ACK, {
8338
8338
  query: query,
8339
8339
  variables: variables
8340
8340
  }, 'Connection established for subscription');
@@ -8360,7 +8360,7 @@ function (_super) {
8360
8360
  if (this.keepAliveTimeoutId) clearTimeout(this.keepAliveTimeoutId);
8361
8361
  if (this.keepAliveAlertTimeoutId) clearTimeout(this.keepAliveAlertTimeoutId);
8362
8362
  this.keepAliveTimeoutId = setTimeout(function () {
8363
- return _this._errorDisconnect(_index__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].TIMEOUT_DISCONNECT);
8363
+ return _this._errorDisconnect(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].TIMEOUT_DISCONNECT);
8364
8364
  }, this.keepAliveTimeout);
8365
8365
  this.keepAliveAlertTimeoutId = setTimeout(function () {
8366
8366
  _this.connectionStateMonitor.record(_utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["CONNECTION_CHANGE"].KEEP_ALIVE_MISSED);
@@ -8383,7 +8383,7 @@ function (_super) {
8383
8383
  subscriptionState: subscriptionState
8384
8384
  });
8385
8385
  observer.error({
8386
- errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_index__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_FAILED + ": " + JSON.stringify(payload)))]
8386
+ errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_FAILED + ": " + JSON.stringify(payload)))]
8387
8387
  });
8388
8388
  if (startAckTimeoutId) clearTimeout(startAckTimeoutId);
8389
8389
  observer.complete();
@@ -8658,13 +8658,13 @@ function (_super) {
8658
8658
  _this.awsRealTimeSocket.onerror = function (err) {
8659
8659
  logger.debug(err);
8660
8660
 
8661
- _this._errorDisconnect(_index__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_CLOSED);
8661
+ _this._errorDisconnect(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_CLOSED);
8662
8662
  };
8663
8663
 
8664
8664
  _this.awsRealTimeSocket.onclose = function (event) {
8665
8665
  logger.debug("WebSocket closed " + event.reason);
8666
8666
 
8667
- _this._errorDisconnect(_index__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_CLOSED);
8667
+ _this._errorDisconnect(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_CLOSED);
8668
8668
  };
8669
8669
  }
8670
8670
 
@@ -10642,12 +10642,11 @@ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].register(PubSub);
10642
10642
  /*!**************************!*\
10643
10643
  !*** ./lib-esm/index.js ***!
10644
10644
  \**************************/
10645
- /*! exports provided: AbstractPubSubProvider, AWSAppSyncProvider, AWSAppSyncRealTimeProvider, AWSIoTProvider, mqttTopicMatch, MqttOverWSProvider, CONNECTION_STATE_CHANGE, ConnectionState, PubSub, CONTROL_MSG, default */
10645
+ /*! exports provided: AbstractPubSubProvider, AWSAppSyncProvider, AWSAppSyncRealTimeProvider, AWSIoTProvider, mqttTopicMatch, MqttOverWSProvider, CONNECTION_STATE_CHANGE, ConnectionState, CONTROL_MSG, PubSub, default */
10646
10646
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10647
10647
 
10648
10648
  "use strict";
10649
10649
  __webpack_require__.r(__webpack_exports__);
10650
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return CONTROL_MSG; });
10651
10650
  /* harmony import */ var _PubSub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PubSub */ "./lib-esm/PubSub.js");
10652
10651
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PubSub", function() { return _PubSub__WEBPACK_IMPORTED_MODULE_0__["PubSub"]; });
10653
10652
 
@@ -10670,6 +10669,8 @@ __webpack_require__.r(__webpack_exports__);
10670
10669
  /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./types */ "./lib-esm/types/index.js");
10671
10670
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectionState", function() { return _types__WEBPACK_IMPORTED_MODULE_3__["ConnectionState"]; });
10672
10671
 
10672
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return _types__WEBPACK_IMPORTED_MODULE_3__["CONTROL_MSG"]; });
10673
+
10673
10674
  /*
10674
10675
  * Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
10675
10676
  *
@@ -10684,16 +10685,6 @@ __webpack_require__.r(__webpack_exports__);
10684
10685
  */
10685
10686
 
10686
10687
 
10687
- var CONTROL_MSG;
10688
-
10689
- (function (CONTROL_MSG) {
10690
- CONTROL_MSG["CONNECTION_CLOSED"] = "Connection closed";
10691
- CONTROL_MSG["CONNECTION_FAILED"] = "Connection failed";
10692
- CONTROL_MSG["REALTIME_SUBSCRIPTION_INIT_ERROR"] = "AppSync Realtime subscription init error";
10693
- CONTROL_MSG["SUBSCRIPTION_ACK"] = "Subscription ack";
10694
- CONTROL_MSG["TIMEOUT_DISCONNECT"] = "Timeout disconnect";
10695
- })(CONTROL_MSG || (CONTROL_MSG = {}));
10696
-
10697
10688
 
10698
10689
 
10699
10690
 
@@ -10705,17 +10696,41 @@ var CONTROL_MSG;
10705
10696
 
10706
10697
  /***/ }),
10707
10698
 
10708
- /***/ "./lib-esm/types/index.js":
10709
- /*!********************************!*\
10710
- !*** ./lib-esm/types/index.js ***!
10711
- \********************************/
10712
- /*! exports provided: ConnectionState */
10699
+ /***/ "./lib-esm/types/PubSub.js":
10700
+ /*!*********************************!*\
10701
+ !*** ./lib-esm/types/PubSub.js ***!
10702
+ \*********************************/
10703
+ /*! exports provided: CONTROL_MSG, ConnectionState */
10713
10704
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10714
10705
 
10715
10706
  "use strict";
10716
10707
  __webpack_require__.r(__webpack_exports__);
10708
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return CONTROL_MSG; });
10717
10709
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionState", function() { return ConnectionState; });
10710
+ /*
10711
+ * Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
10712
+ *
10713
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
10714
+ * the License. A copy of the License is located at
10715
+ *
10716
+ * http://aws.amazon.com/apache2.0/
10717
+ *
10718
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
10719
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
10720
+ * and limitations under the License.
10721
+ */
10722
+ var CONTROL_MSG;
10723
+
10724
+ (function (CONTROL_MSG) {
10725
+ CONTROL_MSG["CONNECTION_CLOSED"] = "Connection closed";
10726
+ CONTROL_MSG["CONNECTION_FAILED"] = "Connection failed";
10727
+ CONTROL_MSG["REALTIME_SUBSCRIPTION_INIT_ERROR"] = "AppSync Realtime subscription init error";
10728
+ CONTROL_MSG["SUBSCRIPTION_ACK"] = "Subscription ack";
10729
+ CONTROL_MSG["TIMEOUT_DISCONNECT"] = "Timeout disconnect";
10730
+ })(CONTROL_MSG || (CONTROL_MSG = {}));
10718
10731
  /** @enum {string} */
10732
+
10733
+
10719
10734
  var ConnectionState;
10720
10735
 
10721
10736
  (function (ConnectionState) {
@@ -10760,6 +10775,24 @@ var ConnectionState;
10760
10775
  ConnectionState["ConnectedPendingKeepAlive"] = "ConnectedPendingKeepAlive";
10761
10776
  })(ConnectionState || (ConnectionState = {}));
10762
10777
 
10778
+ /***/ }),
10779
+
10780
+ /***/ "./lib-esm/types/index.js":
10781
+ /*!********************************!*\
10782
+ !*** ./lib-esm/types/index.js ***!
10783
+ \********************************/
10784
+ /*! exports provided: CONTROL_MSG, ConnectionState */
10785
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
10786
+
10787
+ "use strict";
10788
+ __webpack_require__.r(__webpack_exports__);
10789
+ /* harmony import */ var _PubSub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PubSub */ "./lib-esm/types/PubSub.js");
10790
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return _PubSub__WEBPACK_IMPORTED_MODULE_0__["CONTROL_MSG"]; });
10791
+
10792
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectionState", function() { return _PubSub__WEBPACK_IMPORTED_MODULE_0__["ConnectionState"]; });
10793
+
10794
+
10795
+
10763
10796
  /***/ }),
10764
10797
 
10765
10798
  /***/ "./lib-esm/utils/ConnectionStateMonitor.js":
@@ -10774,7 +10807,7 @@ __webpack_require__.r(__webpack_exports__);
10774
10807
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_CHANGE", function() { return CONNECTION_CHANGE; });
10775
10808
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionStateMonitor", function() { return ConnectionStateMonitor; });
10776
10809
  /* harmony import */ var zen_observable_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zen-observable-ts */ "../../node_modules/zen-observable-ts/lib/bundle.esm.js");
10777
- /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index */ "./lib-esm/index.js");
10810
+ /* harmony import */ var _types_PubSub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../types/PubSub */ "./lib-esm/types/PubSub.js");
10778
10811
  /* harmony import */ var _ReachabilityMonitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ReachabilityMonitor */ "./lib-esm/utils/ReachabilityMonitor/index.js");
10779
10812
  /*
10780
10813
  * Copyright 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -10940,15 +10973,15 @@ function () {
10940
10973
  networkState = _a.networkState,
10941
10974
  intendedConnectionState = _a.intendedConnectionState,
10942
10975
  keepAliveState = _a.keepAliveState;
10943
- if (connectionState === 'connected' && networkState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingNetwork;
10944
- if (connectionState === 'connected' && intendedConnectionState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingDisconnect;
10945
- if (connectionState === 'disconnected' && intendedConnectionState === 'connected' && networkState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisruptedPendingNetwork;
10946
- if (connectionState === 'disconnected' && intendedConnectionState === 'connected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisrupted;
10947
- if (connectionState === 'connected' && keepAliveState === 'unhealthy') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingKeepAlive; // All remaining states directly correspond to the connection state
10948
-
10949
- if (connectionState === 'connecting') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connecting;
10950
- if (connectionState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Disconnected;
10951
- return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connected;
10976
+ if (connectionState === 'connected' && networkState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingNetwork;
10977
+ if (connectionState === 'connected' && intendedConnectionState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingDisconnect;
10978
+ if (connectionState === 'disconnected' && intendedConnectionState === 'connected' && networkState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisruptedPendingNetwork;
10979
+ if (connectionState === 'disconnected' && intendedConnectionState === 'connected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisrupted;
10980
+ if (connectionState === 'connected' && keepAliveState === 'unhealthy') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingKeepAlive; // All remaining states directly correspond to the connection state
10981
+
10982
+ if (connectionState === 'connecting') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connecting;
10983
+ if (connectionState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Disconnected;
10984
+ return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connected;
10952
10985
  };
10953
10986
 
10954
10987
  return ConnectionStateMonitor;