@aws-amplify/api 4.0.52 → 4.0.54-baby-fix.10
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.0.54](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api@4.0.53...@aws-amplify/api@4.0.54) (2022-09-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-amplify/api
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [4.0.53](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api@4.0.52...@aws-amplify/api@4.0.53) (2022-09-08)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-amplify/api
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [4.0.52](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api@4.0.51...@aws-amplify/api@4.0.52) (2022-09-01)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @aws-amplify/api
|
package/dist/aws-amplify-api.js
CHANGED
|
@@ -10246,8 +10246,8 @@ function () {
|
|
|
10246
10246
|
} : _c;
|
|
10247
10247
|
var authenticationType = defaultAuthenticationType || aws_appsync_authenticationType || 'AWS_IAM';
|
|
10248
10248
|
|
|
10249
|
-
if (_aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__["
|
|
10250
|
-
return _aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__["
|
|
10249
|
+
if (_aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__["PubSub"] && typeof _aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__["PubSub"].subscribe === 'function') {
|
|
10250
|
+
return _aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__["PubSub"].subscribe('', {
|
|
10251
10251
|
provider: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER"],
|
|
10252
10252
|
appSyncGraphqlEndpoint: appSyncGraphqlEndpoint,
|
|
10253
10253
|
authenticationType: authenticationType,
|
|
@@ -12163,7 +12163,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12163
12163
|
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @aws-amplify/auth */ "@aws-amplify/auth");
|
|
12164
12164
|
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_7__);
|
|
12165
12165
|
/* harmony import */ var _PubSubProvider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../PubSubProvider */ "../pubsub/lib-esm/Providers/PubSubProvider.js");
|
|
12166
|
-
/* harmony import */ var
|
|
12166
|
+
/* harmony import */ var _types_PubSub__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../types/PubSub */ "../pubsub/lib-esm/types/PubSub.js");
|
|
12167
12167
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../constants */ "../pubsub/lib-esm/Providers/constants.js");
|
|
12168
12168
|
/* harmony import */ var _utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/ConnectionStateMonitor */ "../pubsub/lib-esm/utils/ConnectionStateMonitor.js");
|
|
12169
12169
|
var __extends = undefined && undefined.__extends || function () {
|
|
@@ -12435,7 +12435,7 @@ function (_super) {
|
|
|
12435
12435
|
_this.connectionStateMonitor = new _utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["ConnectionStateMonitor"](); // Monitor the connection state and pass changes along to Hub
|
|
12436
12436
|
|
|
12437
12437
|
_this.connectionStateMonitor.connectionStateObservable.subscribe(function (ConnectionState) {
|
|
12438
|
-
dispatchApiEvent(
|
|
12438
|
+
dispatchApiEvent(_constants__WEBPACK_IMPORTED_MODULE_10__["CONNECTION_STATE_CHANGE"], {
|
|
12439
12439
|
provider: _this,
|
|
12440
12440
|
connectionState: ConnectionState
|
|
12441
12441
|
}, "Connection state is " + ConnectionState);
|
|
@@ -12488,7 +12488,7 @@ function (_super) {
|
|
|
12488
12488
|
subscriptionId: subscriptionId_1
|
|
12489
12489
|
})["catch"](function (err) {
|
|
12490
12490
|
observer.error({
|
|
12491
|
-
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](
|
|
12491
|
+
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].REALTIME_SUBSCRIPTION_INIT_ERROR + ": " + err))]
|
|
12492
12492
|
});
|
|
12493
12493
|
|
|
12494
12494
|
_this.connectionStateMonitor.record(_utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["CONNECTION_CHANGE"].CLOSED);
|
|
@@ -12663,7 +12663,7 @@ function (_super) {
|
|
|
12663
12663
|
message = (_b = err_2['message']) !== null && _b !== void 0 ? _b : '';
|
|
12664
12664
|
this.connectionStateMonitor.record(_utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["CONNECTION_CHANGE"].CLOSED);
|
|
12665
12665
|
observer.error({
|
|
12666
|
-
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](
|
|
12666
|
+
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_FAILED + ": " + message))]
|
|
12667
12667
|
});
|
|
12668
12668
|
observer.complete();
|
|
12669
12669
|
subscriptionFailedCallback_1 = (this.subscriptionObserverMap.get(subscriptionId) || {}).subscriptionFailedCallback; // Notify concurrent unsubscription
|
|
@@ -12857,7 +12857,7 @@ function (_super) {
|
|
|
12857
12857
|
}
|
|
12858
12858
|
|
|
12859
12859
|
if (startAckTimeoutId) clearTimeout(startAckTimeoutId);
|
|
12860
|
-
dispatchApiEvent(
|
|
12860
|
+
dispatchApiEvent(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].SUBSCRIPTION_ACK, {
|
|
12861
12861
|
query: query,
|
|
12862
12862
|
variables: variables
|
|
12863
12863
|
}, 'Connection established for subscription');
|
|
@@ -12883,7 +12883,7 @@ function (_super) {
|
|
|
12883
12883
|
if (this.keepAliveTimeoutId) clearTimeout(this.keepAliveTimeoutId);
|
|
12884
12884
|
if (this.keepAliveAlertTimeoutId) clearTimeout(this.keepAliveAlertTimeoutId);
|
|
12885
12885
|
this.keepAliveTimeoutId = setTimeout(function () {
|
|
12886
|
-
return _this._errorDisconnect(
|
|
12886
|
+
return _this._errorDisconnect(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].TIMEOUT_DISCONNECT);
|
|
12887
12887
|
}, this.keepAliveTimeout);
|
|
12888
12888
|
this.keepAliveAlertTimeoutId = setTimeout(function () {
|
|
12889
12889
|
_this.connectionStateMonitor.record(_utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_11__["CONNECTION_CHANGE"].KEEP_ALIVE_MISSED);
|
|
@@ -12906,7 +12906,7 @@ function (_super) {
|
|
|
12906
12906
|
subscriptionState: subscriptionState
|
|
12907
12907
|
});
|
|
12908
12908
|
observer.error({
|
|
12909
|
-
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](
|
|
12909
|
+
errors: [__assign({}, new graphql__WEBPACK_IMPORTED_MODULE_1__["GraphQLError"](_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_FAILED + ": " + JSON.stringify(payload)))]
|
|
12910
12910
|
});
|
|
12911
12911
|
if (startAckTimeoutId) clearTimeout(startAckTimeoutId);
|
|
12912
12912
|
observer.complete();
|
|
@@ -13181,13 +13181,13 @@ function (_super) {
|
|
|
13181
13181
|
_this.awsRealTimeSocket.onerror = function (err) {
|
|
13182
13182
|
logger.debug(err);
|
|
13183
13183
|
|
|
13184
|
-
_this._errorDisconnect(
|
|
13184
|
+
_this._errorDisconnect(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_CLOSED);
|
|
13185
13185
|
};
|
|
13186
13186
|
|
|
13187
13187
|
_this.awsRealTimeSocket.onclose = function (event) {
|
|
13188
13188
|
logger.debug("WebSocket closed " + event.reason);
|
|
13189
13189
|
|
|
13190
|
-
_this._errorDisconnect(
|
|
13190
|
+
_this._errorDisconnect(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_CLOSED);
|
|
13191
13191
|
};
|
|
13192
13192
|
}
|
|
13193
13193
|
|
|
@@ -13798,7 +13798,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13798
13798
|
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_4__);
|
|
13799
13799
|
/* harmony import */ var _utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/ConnectionStateMonitor */ "../pubsub/lib-esm/utils/ConnectionStateMonitor.js");
|
|
13800
13800
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./constants */ "../pubsub/lib-esm/Providers/constants.js");
|
|
13801
|
-
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! .. */ "../pubsub/lib-esm/index.js");
|
|
13802
13801
|
function _typeof(obj) {
|
|
13803
13802
|
"@babel/helpers - typeof";
|
|
13804
13803
|
|
|
@@ -14027,7 +14026,6 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
14027
14026
|
|
|
14028
14027
|
|
|
14029
14028
|
|
|
14030
|
-
|
|
14031
14029
|
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_4__["ConsoleLogger"]('MqttOverWSProvider');
|
|
14032
14030
|
function mqttTopicMatch(filter, topic) {
|
|
14033
14031
|
var filterArray = filter.split('/');
|
|
@@ -14123,7 +14121,7 @@ function (_super) {
|
|
|
14123
14121
|
_this._clientIdObservers = new Map(); // Monitor the connection health state and pass changes along to Hub
|
|
14124
14122
|
|
|
14125
14123
|
_this.connectionStateMonitor.connectionStateObservable.subscribe(function (connectionStateChange) {
|
|
14126
|
-
dispatchPubSubEvent(
|
|
14124
|
+
dispatchPubSubEvent(_constants__WEBPACK_IMPORTED_MODULE_6__["CONNECTION_STATE_CHANGE"], {
|
|
14127
14125
|
provider: _this,
|
|
14128
14126
|
connectionState: connectionStateChange
|
|
14129
14127
|
}, "Connection state is " + connectionStateChange);
|
|
@@ -14607,13 +14605,14 @@ function () {
|
|
|
14607
14605
|
/*!************************************************!*\
|
|
14608
14606
|
!*** ../pubsub/lib-esm/Providers/constants.js ***!
|
|
14609
14607
|
\************************************************/
|
|
14610
|
-
/*! exports provided: MAX_DELAY_MS, NON_RETRYABLE_CODES, MESSAGE_TYPES, SUBSCRIPTION_STATUS, SOCKET_STATUS, AMPLIFY_SYMBOL, AWS_APPSYNC_REALTIME_HEADERS, CONNECTION_INIT_TIMEOUT, START_ACK_TIMEOUT, DEFAULT_KEEP_ALIVE_TIMEOUT, DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT */
|
|
14608
|
+
/*! exports provided: MAX_DELAY_MS, NON_RETRYABLE_CODES, CONNECTION_STATE_CHANGE, MESSAGE_TYPES, SUBSCRIPTION_STATUS, SOCKET_STATUS, AMPLIFY_SYMBOL, AWS_APPSYNC_REALTIME_HEADERS, CONNECTION_INIT_TIMEOUT, START_ACK_TIMEOUT, DEFAULT_KEEP_ALIVE_TIMEOUT, DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT */
|
|
14611
14609
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
14612
14610
|
|
|
14613
14611
|
"use strict";
|
|
14614
14612
|
__webpack_require__.r(__webpack_exports__);
|
|
14615
14613
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAX_DELAY_MS", function() { return MAX_DELAY_MS; });
|
|
14616
14614
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NON_RETRYABLE_CODES", function() { return NON_RETRYABLE_CODES; });
|
|
14615
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_STATE_CHANGE", function() { return CONNECTION_STATE_CHANGE; });
|
|
14617
14616
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MESSAGE_TYPES", function() { return MESSAGE_TYPES; });
|
|
14618
14617
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUBSCRIPTION_STATUS", function() { return SUBSCRIPTION_STATUS; });
|
|
14619
14618
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SOCKET_STATUS", function() { return SOCKET_STATUS; });
|
|
@@ -14625,6 +14624,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14625
14624
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT", function() { return DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT; });
|
|
14626
14625
|
var MAX_DELAY_MS = 5000;
|
|
14627
14626
|
var NON_RETRYABLE_CODES = [400, 401, 403];
|
|
14627
|
+
var CONNECTION_STATE_CHANGE = 'ConnectionStateChange';
|
|
14628
14628
|
var MESSAGE_TYPES;
|
|
14629
14629
|
|
|
14630
14630
|
(function (MESSAGE_TYPES) {
|
|
@@ -15165,13 +15165,11 @@ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].register(PubSub);
|
|
|
15165
15165
|
/*!**********************************!*\
|
|
15166
15166
|
!*** ../pubsub/lib-esm/index.js ***!
|
|
15167
15167
|
\**********************************/
|
|
15168
|
-
/*! exports provided: AbstractPubSubProvider, AWSAppSyncProvider, AWSAppSyncRealTimeProvider, AWSIoTProvider, mqttTopicMatch, MqttOverWSProvider, CONNECTION_STATE_CHANGE, ConnectionState,
|
|
15168
|
+
/*! exports provided: AbstractPubSubProvider, AWSAppSyncProvider, AWSAppSyncRealTimeProvider, AWSIoTProvider, mqttTopicMatch, MqttOverWSProvider, CONNECTION_STATE_CHANGE, ConnectionState, CONTROL_MSG, PubSub, default */
|
|
15169
15169
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15170
15170
|
|
|
15171
15171
|
"use strict";
|
|
15172
15172
|
__webpack_require__.r(__webpack_exports__);
|
|
15173
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_STATE_CHANGE", function() { return CONNECTION_STATE_CHANGE; });
|
|
15174
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return CONTROL_MSG; });
|
|
15175
15173
|
/* harmony import */ var _PubSub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PubSub */ "../pubsub/lib-esm/PubSub.js");
|
|
15176
15174
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PubSub", function() { return _PubSub__WEBPACK_IMPORTED_MODULE_0__["PubSub"]; });
|
|
15177
15175
|
|
|
@@ -15188,8 +15186,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15188
15186
|
|
|
15189
15187
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MqttOverWSProvider", function() { return _Providers__WEBPACK_IMPORTED_MODULE_1__["MqttOverWSProvider"]; });
|
|
15190
15188
|
|
|
15191
|
-
/* harmony import */ var
|
|
15192
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
15189
|
+
/* harmony import */ var _Providers_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Providers/constants */ "../pubsub/lib-esm/Providers/constants.js");
|
|
15190
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_STATE_CHANGE", function() { return _Providers_constants__WEBPACK_IMPORTED_MODULE_2__["CONNECTION_STATE_CHANGE"]; });
|
|
15191
|
+
|
|
15192
|
+
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./types */ "../pubsub/lib-esm/types/index.js");
|
|
15193
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectionState", function() { return _types__WEBPACK_IMPORTED_MODULE_3__["ConnectionState"]; });
|
|
15194
|
+
|
|
15195
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return _types__WEBPACK_IMPORTED_MODULE_3__["CONTROL_MSG"]; });
|
|
15193
15196
|
|
|
15194
15197
|
/*
|
|
15195
15198
|
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -15205,17 +15208,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15205
15208
|
*/
|
|
15206
15209
|
|
|
15207
15210
|
|
|
15208
|
-
var CONTROL_MSG;
|
|
15209
|
-
|
|
15210
|
-
(function (CONTROL_MSG) {
|
|
15211
|
-
CONTROL_MSG["CONNECTION_CLOSED"] = "Connection closed";
|
|
15212
|
-
CONTROL_MSG["CONNECTION_FAILED"] = "Connection failed";
|
|
15213
|
-
CONTROL_MSG["REALTIME_SUBSCRIPTION_INIT_ERROR"] = "AppSync Realtime subscription init error";
|
|
15214
|
-
CONTROL_MSG["SUBSCRIPTION_ACK"] = "Subscription ack";
|
|
15215
|
-
CONTROL_MSG["TIMEOUT_DISCONNECT"] = "Timeout disconnect";
|
|
15216
|
-
})(CONTROL_MSG || (CONTROL_MSG = {}));
|
|
15217
15211
|
|
|
15218
|
-
var CONNECTION_STATE_CHANGE = 'ConnectionStateChange';
|
|
15219
15212
|
|
|
15220
15213
|
|
|
15221
15214
|
/**
|
|
@@ -15226,17 +15219,41 @@ var CONNECTION_STATE_CHANGE = 'ConnectionStateChange';
|
|
|
15226
15219
|
|
|
15227
15220
|
/***/ }),
|
|
15228
15221
|
|
|
15229
|
-
/***/ "../pubsub/lib-esm/types/
|
|
15230
|
-
|
|
15231
|
-
!*** ../pubsub/lib-esm/types/
|
|
15232
|
-
|
|
15233
|
-
/*! exports provided: ConnectionState */
|
|
15222
|
+
/***/ "../pubsub/lib-esm/types/PubSub.js":
|
|
15223
|
+
/*!*****************************************!*\
|
|
15224
|
+
!*** ../pubsub/lib-esm/types/PubSub.js ***!
|
|
15225
|
+
\*****************************************/
|
|
15226
|
+
/*! exports provided: CONTROL_MSG, ConnectionState */
|
|
15234
15227
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15235
15228
|
|
|
15236
15229
|
"use strict";
|
|
15237
15230
|
__webpack_require__.r(__webpack_exports__);
|
|
15231
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return CONTROL_MSG; });
|
|
15238
15232
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionState", function() { return ConnectionState; });
|
|
15233
|
+
/*
|
|
15234
|
+
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15235
|
+
*
|
|
15236
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
15237
|
+
* the License. A copy of the License is located at
|
|
15238
|
+
*
|
|
15239
|
+
* http://aws.amazon.com/apache2.0/
|
|
15240
|
+
*
|
|
15241
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
15242
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
15243
|
+
* and limitations under the License.
|
|
15244
|
+
*/
|
|
15245
|
+
var CONTROL_MSG;
|
|
15246
|
+
|
|
15247
|
+
(function (CONTROL_MSG) {
|
|
15248
|
+
CONTROL_MSG["CONNECTION_CLOSED"] = "Connection closed";
|
|
15249
|
+
CONTROL_MSG["CONNECTION_FAILED"] = "Connection failed";
|
|
15250
|
+
CONTROL_MSG["REALTIME_SUBSCRIPTION_INIT_ERROR"] = "AppSync Realtime subscription init error";
|
|
15251
|
+
CONTROL_MSG["SUBSCRIPTION_ACK"] = "Subscription ack";
|
|
15252
|
+
CONTROL_MSG["TIMEOUT_DISCONNECT"] = "Timeout disconnect";
|
|
15253
|
+
})(CONTROL_MSG || (CONTROL_MSG = {}));
|
|
15239
15254
|
/** @enum {string} */
|
|
15255
|
+
|
|
15256
|
+
|
|
15240
15257
|
var ConnectionState;
|
|
15241
15258
|
|
|
15242
15259
|
(function (ConnectionState) {
|
|
@@ -15281,6 +15298,24 @@ var ConnectionState;
|
|
|
15281
15298
|
ConnectionState["ConnectedPendingKeepAlive"] = "ConnectedPendingKeepAlive";
|
|
15282
15299
|
})(ConnectionState || (ConnectionState = {}));
|
|
15283
15300
|
|
|
15301
|
+
/***/ }),
|
|
15302
|
+
|
|
15303
|
+
/***/ "../pubsub/lib-esm/types/index.js":
|
|
15304
|
+
/*!****************************************!*\
|
|
15305
|
+
!*** ../pubsub/lib-esm/types/index.js ***!
|
|
15306
|
+
\****************************************/
|
|
15307
|
+
/*! exports provided: CONTROL_MSG, ConnectionState */
|
|
15308
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15309
|
+
|
|
15310
|
+
"use strict";
|
|
15311
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15312
|
+
/* harmony import */ var _PubSub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PubSub */ "../pubsub/lib-esm/types/PubSub.js");
|
|
15313
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return _PubSub__WEBPACK_IMPORTED_MODULE_0__["CONTROL_MSG"]; });
|
|
15314
|
+
|
|
15315
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectionState", function() { return _PubSub__WEBPACK_IMPORTED_MODULE_0__["ConnectionState"]; });
|
|
15316
|
+
|
|
15317
|
+
|
|
15318
|
+
|
|
15284
15319
|
/***/ }),
|
|
15285
15320
|
|
|
15286
15321
|
/***/ "../pubsub/lib-esm/utils/ConnectionStateMonitor.js":
|
|
@@ -15295,7 +15330,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15295
15330
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_CHANGE", function() { return CONNECTION_CHANGE; });
|
|
15296
15331
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionStateMonitor", function() { return ConnectionStateMonitor; });
|
|
15297
15332
|
/* harmony import */ var zen_observable_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zen-observable-ts */ "../../node_modules/zen-observable-ts/lib/bundle.esm.js");
|
|
15298
|
-
/* harmony import */ var
|
|
15333
|
+
/* harmony import */ var _types_PubSub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../types/PubSub */ "../pubsub/lib-esm/types/PubSub.js");
|
|
15299
15334
|
/* harmony import */ var _ReachabilityMonitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ReachabilityMonitor */ "../pubsub/lib-esm/utils/ReachabilityMonitor/index.js");
|
|
15300
15335
|
/*
|
|
15301
15336
|
* Copyright 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -15461,15 +15496,15 @@ function () {
|
|
|
15461
15496
|
networkState = _a.networkState,
|
|
15462
15497
|
intendedConnectionState = _a.intendedConnectionState,
|
|
15463
15498
|
keepAliveState = _a.keepAliveState;
|
|
15464
|
-
if (connectionState === 'connected' && networkState === 'disconnected') return
|
|
15465
|
-
if (connectionState === 'connected' && intendedConnectionState === 'disconnected') return
|
|
15466
|
-
if (connectionState === 'disconnected' && intendedConnectionState === 'connected' && networkState === 'disconnected') return
|
|
15467
|
-
if (connectionState === 'disconnected' && intendedConnectionState === 'connected') return
|
|
15468
|
-
if (connectionState === 'connected' && keepAliveState === 'unhealthy') return
|
|
15469
|
-
|
|
15470
|
-
if (connectionState === 'connecting') return
|
|
15471
|
-
if (connectionState === 'disconnected') return
|
|
15472
|
-
return
|
|
15499
|
+
if (connectionState === 'connected' && networkState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingNetwork;
|
|
15500
|
+
if (connectionState === 'connected' && intendedConnectionState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingDisconnect;
|
|
15501
|
+
if (connectionState === 'disconnected' && intendedConnectionState === 'connected' && networkState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisruptedPendingNetwork;
|
|
15502
|
+
if (connectionState === 'disconnected' && intendedConnectionState === 'connected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectionDisrupted;
|
|
15503
|
+
if (connectionState === 'connected' && keepAliveState === 'unhealthy') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].ConnectedPendingKeepAlive; // All remaining states directly correspond to the connection state
|
|
15504
|
+
|
|
15505
|
+
if (connectionState === 'connecting') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connecting;
|
|
15506
|
+
if (connectionState === 'disconnected') return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Disconnected;
|
|
15507
|
+
return _types_PubSub__WEBPACK_IMPORTED_MODULE_1__["ConnectionState"].Connected;
|
|
15473
15508
|
};
|
|
15474
15509
|
|
|
15475
15510
|
return ConnectionStateMonitor;
|