@aws-amplify/pubsub 4.4.9 → 4.4.10-unstable.11
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/aws-amplify-pubsub.js +33 -15
- package/dist/aws-amplify-pubsub.js.map +1 -1
- package/dist/aws-amplify-pubsub.min.js.map +1 -1
- package/lib/utils/ConnectionStateMonitor.js +2 -4
- package/lib/utils/ConnectionStateMonitor.js.map +1 -1
- package/lib/utils/ReachabilityMonitor/index.d.ts +3 -0
- package/lib/utils/ReachabilityMonitor/index.js +5 -0
- package/lib/utils/ReachabilityMonitor/index.js.map +1 -0
- package/lib/utils/ReachabilityMonitor/index.native.d.ts +3 -0
- package/lib/utils/ReachabilityMonitor/index.native.js +11 -0
- package/lib/utils/ReachabilityMonitor/index.native.js.map +1 -0
- package/lib-esm/utils/ConnectionStateMonitor.js +2 -4
- package/lib-esm/utils/ConnectionStateMonitor.js.map +1 -1
- package/lib-esm/utils/ReachabilityMonitor/index.d.ts +3 -0
- package/lib-esm/utils/ReachabilityMonitor/index.js +3 -0
- package/lib-esm/utils/ReachabilityMonitor/index.js.map +1 -0
- package/lib-esm/utils/ReachabilityMonitor/index.native.d.ts +3 -0
- package/lib-esm/utils/ReachabilityMonitor/index.native.js +6 -0
- package/lib-esm/utils/ReachabilityMonitor/index.native.js.map +1 -0
- package/package.json +5 -5
- package/src/utils/ConnectionStateMonitor.ts +5 -4
- package/src/utils/ReachabilityMonitor/index.native.ts +5 -0
- package/src/utils/ReachabilityMonitor/index.ts +3 -0
|
@@ -10734,10 +10734,9 @@ var ConnectionState;
|
|
|
10734
10734
|
__webpack_require__.r(__webpack_exports__);
|
|
10735
10735
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_CHANGE", function() { return CONNECTION_CHANGE; });
|
|
10736
10736
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionStateMonitor", function() { return ConnectionStateMonitor; });
|
|
10737
|
-
/* harmony import */ var
|
|
10738
|
-
/* harmony import */ var
|
|
10739
|
-
/* harmony import */ var
|
|
10740
|
-
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../index */ "./lib-esm/index.js");
|
|
10737
|
+
/* harmony import */ var zen_observable_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zen-observable-ts */ "../../node_modules/zen-observable-ts/lib/bundle.esm.js");
|
|
10738
|
+
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index */ "./lib-esm/index.js");
|
|
10739
|
+
/* harmony import */ var _ReachabilityMonitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ReachabilityMonitor */ "./lib-esm/utils/ReachabilityMonitor/index.js");
|
|
10741
10740
|
/*
|
|
10742
10741
|
* Copyright 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
10743
10742
|
*
|
|
@@ -10814,7 +10813,7 @@ function () {
|
|
|
10814
10813
|
intendedConnectionState: 'disconnected',
|
|
10815
10814
|
keepAliveState: 'healthy'
|
|
10816
10815
|
};
|
|
10817
|
-
this._linkedConnectionStateObservable = new
|
|
10816
|
+
this._linkedConnectionStateObservable = new zen_observable_ts__WEBPACK_IMPORTED_MODULE_0__["default"](function (connectionStateObserver) {
|
|
10818
10817
|
connectionStateObserver.next(_this._linkedConnectionState);
|
|
10819
10818
|
_this._linkedConnectionStateObserver = connectionStateObserver;
|
|
10820
10819
|
});
|
|
@@ -10829,7 +10828,7 @@ function () {
|
|
|
10829
10828
|
|
|
10830
10829
|
|
|
10831
10830
|
if (this._networkMonitoringSubscription === undefined) {
|
|
10832
|
-
this._networkMonitoringSubscription =
|
|
10831
|
+
this._networkMonitoringSubscription = Object(_ReachabilityMonitor__WEBPACK_IMPORTED_MODULE_2__["ReachabilityMonitor"])().subscribe(function (_a) {
|
|
10833
10832
|
var online = _a.online;
|
|
10834
10833
|
|
|
10835
10834
|
_this.record(online ? CONNECTION_CHANGE.ONLINE : CONNECTION_CHANGE.OFFLINE);
|
|
@@ -10902,15 +10901,15 @@ function () {
|
|
|
10902
10901
|
networkState = _a.networkState,
|
|
10903
10902
|
intendedConnectionState = _a.intendedConnectionState,
|
|
10904
10903
|
keepAliveState = _a.keepAliveState;
|
|
10905
|
-
if (connectionState === 'connected' && networkState === 'disconnected') return
|
|
10906
|
-
if (connectionState === 'connected' && intendedConnectionState === 'disconnected') return
|
|
10907
|
-
if (connectionState === 'disconnected' && intendedConnectionState === 'connected' && networkState === 'disconnected') return
|
|
10908
|
-
if (connectionState === 'disconnected' && intendedConnectionState === 'connected') return
|
|
10909
|
-
if (connectionState === 'connected' && keepAliveState === 'unhealthy') return
|
|
10910
|
-
|
|
10911
|
-
if (connectionState === 'connecting') return
|
|
10912
|
-
if (connectionState === 'disconnected') return
|
|
10913
|
-
return
|
|
10904
|
+
if (connectionState === 'connected' && networkState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingNetwork;
|
|
10905
|
+
if (connectionState === 'connected' && intendedConnectionState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingDisconnect;
|
|
10906
|
+
if (connectionState === 'disconnected' && intendedConnectionState === 'connected' && networkState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisruptedPendingNetwork;
|
|
10907
|
+
if (connectionState === 'disconnected' && intendedConnectionState === 'connected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisrupted;
|
|
10908
|
+
if (connectionState === 'connected' && keepAliveState === 'unhealthy') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingKeepAlive; // All remaining states directly correspond to the connection state
|
|
10909
|
+
|
|
10910
|
+
if (connectionState === 'connecting') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connecting;
|
|
10911
|
+
if (connectionState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Disconnected;
|
|
10912
|
+
return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connected;
|
|
10914
10913
|
};
|
|
10915
10914
|
|
|
10916
10915
|
return ConnectionStateMonitor;
|
|
@@ -10918,6 +10917,25 @@ function () {
|
|
|
10918
10917
|
|
|
10919
10918
|
|
|
10920
10919
|
|
|
10920
|
+
/***/ }),
|
|
10921
|
+
|
|
10922
|
+
/***/ "./lib-esm/utils/ReachabilityMonitor/index.js":
|
|
10923
|
+
/*!****************************************************!*\
|
|
10924
|
+
!*** ./lib-esm/utils/ReachabilityMonitor/index.js ***!
|
|
10925
|
+
\****************************************************/
|
|
10926
|
+
/*! exports provided: ReachabilityMonitor */
|
|
10927
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10928
|
+
|
|
10929
|
+
"use strict";
|
|
10930
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10931
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReachabilityMonitor", function() { return ReachabilityMonitor; });
|
|
10932
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
|
|
10933
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
10934
|
+
|
|
10935
|
+
var ReachabilityMonitor = function ReachabilityMonitor() {
|
|
10936
|
+
return new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Reachability"]().networkMonitor();
|
|
10937
|
+
};
|
|
10938
|
+
|
|
10921
10939
|
/***/ }),
|
|
10922
10940
|
|
|
10923
10941
|
/***/ "@aws-amplify/auth":
|