@aws-amplify/api-graphql 2.3.18-unstable.5 → 2.3.18-unstable.8
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.
|
@@ -11242,7 +11242,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11242
11242
|
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @aws-amplify/auth */ "@aws-amplify/auth");
|
|
11243
11243
|
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_7__);
|
|
11244
11244
|
/* harmony import */ var _PubSubProvider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../PubSubProvider */ "../pubsub/lib-esm/Providers/PubSubProvider.js");
|
|
11245
|
-
/* harmony import */ var
|
|
11245
|
+
/* harmony import */ var _types_PubSub__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../types/PubSub */ "../pubsub/lib-esm/types/PubSub.js");
|
|
11246
11246
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../constants */ "../pubsub/lib-esm/Providers/constants.js");
|
|
11247
11247
|
/* harmony import */ var _utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/ConnectionStateMonitor */ "../pubsub/lib-esm/utils/ConnectionStateMonitor.js");
|
|
11248
11248
|
var __extends = undefined && undefined.__extends || function () {
|
|
@@ -11514,7 +11514,7 @@ function (_super) {
|
|
|
11514
11514
|
_this.connectionStateMonitor = new _utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["ConnectionStateMonitor"](); // Monitor the connection state and pass changes along to Hub
|
|
11515
11515
|
|
|
11516
11516
|
_this.connectionStateMonitor.connectionStateObservable.subscribe(function (ConnectionState) {
|
|
11517
|
-
dispatchApiEvent(
|
|
11517
|
+
dispatchApiEvent(_constants__WEBPACK_IMPORTED_MODULE_10__["CONNECTION_STATE_CHANGE"], {
|
|
11518
11518
|
provider: _this,
|
|
11519
11519
|
connectionState: ConnectionState
|
|
11520
11520
|
}, "Connection state is " + ConnectionState);
|
|
@@ -11567,7 +11567,7 @@ function (_super) {
|
|
|
11567
11567
|
subscriptionId: subscriptionId_1
|
|
11568
11568
|
})["catch"](function (err) {
|
|
11569
11569
|
observer.error({
|
|
11570
|
-
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](
|
|
11570
|
+
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].REALTIME_SUBSCRIPTION_INIT_ERROR + ": " + err))]
|
|
11571
11571
|
});
|
|
11572
11572
|
|
|
11573
11573
|
_this.connectionStateMonitor.record(_utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["CONNECTION_CHANGE"].CLOSED);
|
|
@@ -11742,7 +11742,7 @@ function (_super) {
|
|
|
11742
11742
|
message = (_b = err_2['message']) !== null && _b !== void 0 ? _b : '';
|
|
11743
11743
|
this.connectionStateMonitor.record(_utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["CONNECTION_CHANGE"].CLOSED);
|
|
11744
11744
|
observer.error({
|
|
11745
|
-
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](
|
|
11745
|
+
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_FAILED + ": " + message))]
|
|
11746
11746
|
});
|
|
11747
11747
|
observer.complete();
|
|
11748
11748
|
subscriptionFailedCallback_1 = (this.subscriptionObserverMap.get(subscriptionId) || {}).subscriptionFailedCallback; // Notify concurrent unsubscription
|
|
@@ -11936,7 +11936,7 @@ function (_super) {
|
|
|
11936
11936
|
}
|
|
11937
11937
|
|
|
11938
11938
|
if (startAckTimeoutId) clearTimeout(startAckTimeoutId);
|
|
11939
|
-
dispatchApiEvent(
|
|
11939
|
+
dispatchApiEvent(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].SUBSCRIPTION_ACK, {
|
|
11940
11940
|
query: query,
|
|
11941
11941
|
variables: variables
|
|
11942
11942
|
}, 'Connection established for subscription');
|
|
@@ -11962,7 +11962,7 @@ function (_super) {
|
|
|
11962
11962
|
if (this.keepAliveTimeoutId) clearTimeout(this.keepAliveTimeoutId);
|
|
11963
11963
|
if (this.keepAliveAlertTimeoutId) clearTimeout(this.keepAliveAlertTimeoutId);
|
|
11964
11964
|
this.keepAliveTimeoutId = setTimeout(function () {
|
|
11965
|
-
return _this._errorDisconnect(
|
|
11965
|
+
return _this._errorDisconnect(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].TIMEOUT_DISCONNECT);
|
|
11966
11966
|
}, this.keepAliveTimeout);
|
|
11967
11967
|
this.keepAliveAlertTimeoutId = setTimeout(function () {
|
|
11968
11968
|
_this.connectionStateMonitor.record(_utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["CONNECTION_CHANGE"].KEEP_ALIVE_MISSED);
|
|
@@ -11985,7 +11985,7 @@ function (_super) {
|
|
|
11985
11985
|
subscriptionState: subscriptionState
|
|
11986
11986
|
});
|
|
11987
11987
|
observer.error({
|
|
11988
|
-
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](
|
|
11988
|
+
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_FAILED + ": " + JSON.stringify(payload)))]
|
|
11989
11989
|
});
|
|
11990
11990
|
if (startAckTimeoutId) clearTimeout(startAckTimeoutId);
|
|
11991
11991
|
observer.complete();
|
|
@@ -12260,13 +12260,13 @@ function (_super) {
|
|
|
12260
12260
|
_this.awsRealTimeSocket.onerror = function (err) {
|
|
12261
12261
|
logger.debug(err);
|
|
12262
12262
|
|
|
12263
|
-
_this._errorDisconnect(
|
|
12263
|
+
_this._errorDisconnect(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_CLOSED);
|
|
12264
12264
|
};
|
|
12265
12265
|
|
|
12266
12266
|
_this.awsRealTimeSocket.onclose = function (event) {
|
|
12267
12267
|
logger.debug("WebSocket closed " + event.reason);
|
|
12268
12268
|
|
|
12269
|
-
_this._errorDisconnect(
|
|
12269
|
+
_this._errorDisconnect(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_CLOSED);
|
|
12270
12270
|
};
|
|
12271
12271
|
}
|
|
12272
12272
|
|
|
@@ -14244,12 +14244,11 @@ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].register(PubSub);
|
|
|
14244
14244
|
/*!**********************************!*\
|
|
14245
14245
|
!*** ../pubsub/lib-esm/index.js ***!
|
|
14246
14246
|
\**********************************/
|
|
14247
|
-
/*! exports provided: AbstractPubSubProvider, AWSAppSyncProvider, AWSAppSyncRealTimeProvider, AWSIoTProvider, mqttTopicMatch, MqttOverWSProvider, CONNECTION_STATE_CHANGE, ConnectionState,
|
|
14247
|
+
/*! exports provided: AbstractPubSubProvider, AWSAppSyncProvider, AWSAppSyncRealTimeProvider, AWSIoTProvider, mqttTopicMatch, MqttOverWSProvider, CONNECTION_STATE_CHANGE, ConnectionState, CONTROL_MSG, PubSub, default */
|
|
14248
14248
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
14249
14249
|
|
|
14250
14250
|
"use strict";
|
|
14251
14251
|
__webpack_require__.r(__webpack_exports__);
|
|
14252
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return CONTROL_MSG; });
|
|
14253
14252
|
/* harmony import */ var _PubSub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PubSub */ "../pubsub/lib-esm/PubSub.js");
|
|
14254
14253
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PubSub", function() { return _PubSub__WEBPACK_IMPORTED_MODULE_0__["PubSub"]; });
|
|
14255
14254
|
|
|
@@ -14272,6 +14271,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14272
14271
|
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./types */ "../pubsub/lib-esm/types/index.js");
|
|
14273
14272
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectionState", function() { return _types__WEBPACK_IMPORTED_MODULE_3__["ConnectionState"]; });
|
|
14274
14273
|
|
|
14274
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return _types__WEBPACK_IMPORTED_MODULE_3__["CONTROL_MSG"]; });
|
|
14275
|
+
|
|
14275
14276
|
/*
|
|
14276
14277
|
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
14277
14278
|
*
|
|
@@ -14286,16 +14287,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14286
14287
|
*/
|
|
14287
14288
|
|
|
14288
14289
|
|
|
14289
|
-
var CONTROL_MSG;
|
|
14290
|
-
|
|
14291
|
-
(function (CONTROL_MSG) {
|
|
14292
|
-
CONTROL_MSG["CONNECTION_CLOSED"] = "Connection closed";
|
|
14293
|
-
CONTROL_MSG["CONNECTION_FAILED"] = "Connection failed";
|
|
14294
|
-
CONTROL_MSG["REALTIME_SUBSCRIPTION_INIT_ERROR"] = "AppSync Realtime subscription init error";
|
|
14295
|
-
CONTROL_MSG["SUBSCRIPTION_ACK"] = "Subscription ack";
|
|
14296
|
-
CONTROL_MSG["TIMEOUT_DISCONNECT"] = "Timeout disconnect";
|
|
14297
|
-
})(CONTROL_MSG || (CONTROL_MSG = {}));
|
|
14298
|
-
|
|
14299
14290
|
|
|
14300
14291
|
|
|
14301
14292
|
|
|
@@ -14307,17 +14298,41 @@ var CONTROL_MSG;
|
|
|
14307
14298
|
|
|
14308
14299
|
/***/ }),
|
|
14309
14300
|
|
|
14310
|
-
/***/ "../pubsub/lib-esm/types/
|
|
14311
|
-
|
|
14312
|
-
!*** ../pubsub/lib-esm/types/
|
|
14313
|
-
|
|
14314
|
-
/*! exports provided: ConnectionState */
|
|
14301
|
+
/***/ "../pubsub/lib-esm/types/PubSub.js":
|
|
14302
|
+
/*!*****************************************!*\
|
|
14303
|
+
!*** ../pubsub/lib-esm/types/PubSub.js ***!
|
|
14304
|
+
\*****************************************/
|
|
14305
|
+
/*! exports provided: CONTROL_MSG, ConnectionState */
|
|
14315
14306
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
14316
14307
|
|
|
14317
14308
|
"use strict";
|
|
14318
14309
|
__webpack_require__.r(__webpack_exports__);
|
|
14310
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return CONTROL_MSG; });
|
|
14319
14311
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionState", function() { return ConnectionState; });
|
|
14312
|
+
/*
|
|
14313
|
+
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
14314
|
+
*
|
|
14315
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
14316
|
+
* the License. A copy of the License is located at
|
|
14317
|
+
*
|
|
14318
|
+
* http://aws.amazon.com/apache2.0/
|
|
14319
|
+
*
|
|
14320
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
14321
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
14322
|
+
* and limitations under the License.
|
|
14323
|
+
*/
|
|
14324
|
+
var CONTROL_MSG;
|
|
14325
|
+
|
|
14326
|
+
(function (CONTROL_MSG) {
|
|
14327
|
+
CONTROL_MSG["CONNECTION_CLOSED"] = "Connection closed";
|
|
14328
|
+
CONTROL_MSG["CONNECTION_FAILED"] = "Connection failed";
|
|
14329
|
+
CONTROL_MSG["REALTIME_SUBSCRIPTION_INIT_ERROR"] = "AppSync Realtime subscription init error";
|
|
14330
|
+
CONTROL_MSG["SUBSCRIPTION_ACK"] = "Subscription ack";
|
|
14331
|
+
CONTROL_MSG["TIMEOUT_DISCONNECT"] = "Timeout disconnect";
|
|
14332
|
+
})(CONTROL_MSG || (CONTROL_MSG = {}));
|
|
14320
14333
|
/** @enum {string} */
|
|
14334
|
+
|
|
14335
|
+
|
|
14321
14336
|
var ConnectionState;
|
|
14322
14337
|
|
|
14323
14338
|
(function (ConnectionState) {
|
|
@@ -14362,6 +14377,24 @@ var ConnectionState;
|
|
|
14362
14377
|
ConnectionState["ConnectedPendingKeepAlive"] = "ConnectedPendingKeepAlive";
|
|
14363
14378
|
})(ConnectionState || (ConnectionState = {}));
|
|
14364
14379
|
|
|
14380
|
+
/***/ }),
|
|
14381
|
+
|
|
14382
|
+
/***/ "../pubsub/lib-esm/types/index.js":
|
|
14383
|
+
/*!****************************************!*\
|
|
14384
|
+
!*** ../pubsub/lib-esm/types/index.js ***!
|
|
14385
|
+
\****************************************/
|
|
14386
|
+
/*! exports provided: CONTROL_MSG, ConnectionState */
|
|
14387
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
14388
|
+
|
|
14389
|
+
"use strict";
|
|
14390
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14391
|
+
/* harmony import */ var _PubSub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PubSub */ "../pubsub/lib-esm/types/PubSub.js");
|
|
14392
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return _PubSub__WEBPACK_IMPORTED_MODULE_0__["CONTROL_MSG"]; });
|
|
14393
|
+
|
|
14394
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectionState", function() { return _PubSub__WEBPACK_IMPORTED_MODULE_0__["ConnectionState"]; });
|
|
14395
|
+
|
|
14396
|
+
|
|
14397
|
+
|
|
14365
14398
|
/***/ }),
|
|
14366
14399
|
|
|
14367
14400
|
/***/ "../pubsub/lib-esm/utils/ConnectionStateMonitor.js":
|
|
@@ -14376,7 +14409,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14376
14409
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_CHANGE", function() { return CONNECTION_CHANGE; });
|
|
14377
14410
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionStateMonitor", function() { return ConnectionStateMonitor; });
|
|
14378
14411
|
/* harmony import */ var zen_observable_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zen-observable-ts */ "../../node_modules/zen-observable-ts/lib/bundle.esm.js");
|
|
14379
|
-
/* harmony import */ var
|
|
14412
|
+
/* harmony import */ var _types_PubSub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../types/PubSub */ "../pubsub/lib-esm/types/PubSub.js");
|
|
14380
14413
|
/* harmony import */ var _ReachabilityMonitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ReachabilityMonitor */ "../pubsub/lib-esm/utils/ReachabilityMonitor/index.js");
|
|
14381
14414
|
/*
|
|
14382
14415
|
* Copyright 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -14542,15 +14575,15 @@ function () {
|
|
|
14542
14575
|
networkState = _a.networkState,
|
|
14543
14576
|
intendedConnectionState = _a.intendedConnectionState,
|
|
14544
14577
|
keepAliveState = _a.keepAliveState;
|
|
14545
|
-
if (connectionState === 'connected' && networkState === 'disconnected') return
|
|
14546
|
-
if (connectionState === 'connected' && intendedConnectionState === 'disconnected') return
|
|
14547
|
-
if (connectionState === 'disconnected' && intendedConnectionState === 'connected' && networkState === 'disconnected') return
|
|
14548
|
-
if (connectionState === 'disconnected' && intendedConnectionState === 'connected') return
|
|
14549
|
-
if (connectionState === 'connected' && keepAliveState === 'unhealthy') return
|
|
14550
|
-
|
|
14551
|
-
if (connectionState === 'connecting') return
|
|
14552
|
-
if (connectionState === 'disconnected') return
|
|
14553
|
-
return
|
|
14578
|
+
if (connectionState === 'connected' && networkState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingNetwork;
|
|
14579
|
+
if (connectionState === 'connected' && intendedConnectionState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingDisconnect;
|
|
14580
|
+
if (connectionState === 'disconnected' && intendedConnectionState === 'connected' && networkState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisruptedPendingNetwork;
|
|
14581
|
+
if (connectionState === 'disconnected' && intendedConnectionState === 'connected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisrupted;
|
|
14582
|
+
if (connectionState === 'connected' && keepAliveState === 'unhealthy') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingKeepAlive; // All remaining states directly correspond to the connection state
|
|
14583
|
+
|
|
14584
|
+
if (connectionState === 'connecting') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connecting;
|
|
14585
|
+
if (connectionState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Disconnected;
|
|
14586
|
+
return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connected;
|
|
14554
14587
|
};
|
|
14555
14588
|
|
|
14556
14589
|
return ConnectionStateMonitor;
|