@aws-amplify/api-graphql 2.3.12 → 2.3.13-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.
|
@@ -14336,10 +14336,9 @@ var ConnectionState;
|
|
|
14336
14336
|
__webpack_require__.r(__webpack_exports__);
|
|
14337
14337
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_CHANGE", function() { return CONNECTION_CHANGE; });
|
|
14338
14338
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionStateMonitor", function() { return ConnectionStateMonitor; });
|
|
14339
|
-
/* harmony import */ var
|
|
14340
|
-
/* harmony import */ var
|
|
14341
|
-
/* harmony import */ var
|
|
14342
|
-
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../index */ "../pubsub/lib-esm/index.js");
|
|
14339
|
+
/* harmony import */ var zen_observable_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zen-observable-ts */ "../../node_modules/zen-observable-ts/lib/bundle.esm.js");
|
|
14340
|
+
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index */ "../pubsub/lib-esm/index.js");
|
|
14341
|
+
/* harmony import */ var _ReachabilityMonitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ReachabilityMonitor */ "../pubsub/lib-esm/utils/ReachabilityMonitor/index.js");
|
|
14343
14342
|
/*
|
|
14344
14343
|
* Copyright 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
14345
14344
|
*
|
|
@@ -14416,7 +14415,7 @@ function () {
|
|
|
14416
14415
|
intendedConnectionState: 'disconnected',
|
|
14417
14416
|
keepAliveState: 'healthy'
|
|
14418
14417
|
};
|
|
14419
|
-
this._linkedConnectionStateObservable = new
|
|
14418
|
+
this._linkedConnectionStateObservable = new zen_observable_ts__WEBPACK_IMPORTED_MODULE_0__["default"](function (connectionStateObserver) {
|
|
14420
14419
|
connectionStateObserver.next(_this._linkedConnectionState);
|
|
14421
14420
|
_this._linkedConnectionStateObserver = connectionStateObserver;
|
|
14422
14421
|
});
|
|
@@ -14431,7 +14430,7 @@ function () {
|
|
|
14431
14430
|
|
|
14432
14431
|
|
|
14433
14432
|
if (this._networkMonitoringSubscription === undefined) {
|
|
14434
|
-
this._networkMonitoringSubscription =
|
|
14433
|
+
this._networkMonitoringSubscription = Object(_ReachabilityMonitor__WEBPACK_IMPORTED_MODULE_2__["ReachabilityMonitor"])().subscribe(function (_a) {
|
|
14435
14434
|
var online = _a.online;
|
|
14436
14435
|
|
|
14437
14436
|
_this.record(online ? CONNECTION_CHANGE.ONLINE : CONNECTION_CHANGE.OFFLINE);
|
|
@@ -14504,15 +14503,15 @@ function () {
|
|
|
14504
14503
|
networkState = _a.networkState,
|
|
14505
14504
|
intendedConnectionState = _a.intendedConnectionState,
|
|
14506
14505
|
keepAliveState = _a.keepAliveState;
|
|
14507
|
-
if (connectionState === 'connected' && networkState === 'disconnected') return
|
|
14508
|
-
if (connectionState === 'connected' && intendedConnectionState === 'disconnected') return
|
|
14509
|
-
if (connectionState === 'disconnected' && intendedConnectionState === 'connected' && networkState === 'disconnected') return
|
|
14510
|
-
if (connectionState === 'disconnected' && intendedConnectionState === 'connected') return
|
|
14511
|
-
if (connectionState === 'connected' && keepAliveState === 'unhealthy') return
|
|
14512
|
-
|
|
14513
|
-
if (connectionState === 'connecting') return
|
|
14514
|
-
if (connectionState === 'disconnected') return
|
|
14515
|
-
return
|
|
14506
|
+
if (connectionState === 'connected' && networkState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingNetwork;
|
|
14507
|
+
if (connectionState === 'connected' && intendedConnectionState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingDisconnect;
|
|
14508
|
+
if (connectionState === 'disconnected' && intendedConnectionState === 'connected' && networkState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisruptedPendingNetwork;
|
|
14509
|
+
if (connectionState === 'disconnected' && intendedConnectionState === 'connected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisrupted;
|
|
14510
|
+
if (connectionState === 'connected' && keepAliveState === 'unhealthy') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingKeepAlive; // All remaining states directly correspond to the connection state
|
|
14511
|
+
|
|
14512
|
+
if (connectionState === 'connecting') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connecting;
|
|
14513
|
+
if (connectionState === 'disconnected') return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Disconnected;
|
|
14514
|
+
return _index__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connected;
|
|
14516
14515
|
};
|
|
14517
14516
|
|
|
14518
14517
|
return ConnectionStateMonitor;
|
|
@@ -14520,6 +14519,25 @@ function () {
|
|
|
14520
14519
|
|
|
14521
14520
|
|
|
14522
14521
|
|
|
14522
|
+
/***/ }),
|
|
14523
|
+
|
|
14524
|
+
/***/ "../pubsub/lib-esm/utils/ReachabilityMonitor/index.js":
|
|
14525
|
+
/*!************************************************************!*\
|
|
14526
|
+
!*** ../pubsub/lib-esm/utils/ReachabilityMonitor/index.js ***!
|
|
14527
|
+
\************************************************************/
|
|
14528
|
+
/*! exports provided: ReachabilityMonitor */
|
|
14529
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
14530
|
+
|
|
14531
|
+
"use strict";
|
|
14532
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14533
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReachabilityMonitor", function() { return ReachabilityMonitor; });
|
|
14534
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
|
|
14535
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
14536
|
+
|
|
14537
|
+
var ReachabilityMonitor = function ReachabilityMonitor() {
|
|
14538
|
+
return new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Reachability"]().networkMonitor();
|
|
14539
|
+
};
|
|
14540
|
+
|
|
14523
14541
|
/***/ }),
|
|
14524
14542
|
|
|
14525
14543
|
/***/ "./lib-esm/GraphQLAPI.js":
|