@aws-amplify/pubsub 4.5.2 → 4.5.4-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 +19 -0
- package/dist/aws-amplify-pubsub.js +78 -43
- package/dist/aws-amplify-pubsub.js.map +1 -1
- package/dist/aws-amplify-pubsub.min.js +1 -1
- package/dist/aws-amplify-pubsub.min.js.map +1 -1
- package/lib/Providers/AWSAppSyncRealTimeProvider/index.d.ts +1 -1
- package/lib/Providers/AWSAppSyncRealTimeProvider/index.js +9 -9
- package/lib/Providers/AWSAppSyncRealTimeProvider/index.js.map +1 -1
- package/lib/Providers/MqttOverWSProvider.d.ts +2 -1
- package/lib/Providers/MqttOverWSProvider.js +1 -2
- package/lib/Providers/MqttOverWSProvider.js.map +1 -1
- package/lib/Providers/PubSubProvider.d.ts +1 -1
- package/lib/Providers/constants.d.ts +1 -0
- package/lib/Providers/constants.js +1 -0
- package/lib/Providers/constants.js.map +1 -1
- package/lib/index.d.ts +3 -10
- package/lib/index.js +3 -10
- package/lib/index.js.map +1 -1
- package/lib/types/Provider.d.ts +10 -1
- package/lib/types/PubSub.d.ts +22 -8
- package/lib/types/PubSub.js +56 -0
- package/lib/types/PubSub.js.map +1 -1
- package/lib/types/index.d.ts +0 -17
- package/lib/types/index.js +4 -36
- package/lib/types/index.js.map +1 -1
- package/lib/utils/ConnectionStateMonitor.d.ts +1 -1
- package/lib/utils/ConnectionStateMonitor.js +9 -9
- package/lib/utils/ConnectionStateMonitor.js.map +1 -1
- package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.d.ts +1 -1
- package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.js +2 -2
- package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.js.map +1 -1
- package/lib-esm/Providers/MqttOverWSProvider.d.ts +2 -1
- package/lib-esm/Providers/MqttOverWSProvider.js +1 -2
- package/lib-esm/Providers/MqttOverWSProvider.js.map +1 -1
- package/lib-esm/Providers/PubSubProvider.d.ts +1 -1
- package/lib-esm/Providers/constants.d.ts +1 -0
- package/lib-esm/Providers/constants.js +1 -0
- package/lib-esm/Providers/constants.js.map +1 -1
- package/lib-esm/index.d.ts +3 -10
- package/lib-esm/index.js +3 -11
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/types/Provider.d.ts +10 -1
- package/lib-esm/types/PubSub.d.ts +22 -8
- package/lib-esm/types/PubSub.js +56 -0
- package/lib-esm/types/PubSub.js.map +1 -1
- package/lib-esm/types/index.d.ts +0 -17
- package/lib-esm/types/index.js +1 -36
- package/lib-esm/types/index.js.map +1 -1
- package/lib-esm/utils/ConnectionStateMonitor.d.ts +1 -1
- package/lib-esm/utils/ConnectionStateMonitor.js +1 -1
- package/lib-esm/utils/ConnectionStateMonitor.js.map +1 -1
- package/package.json +5 -5
- package/src/Providers/AWSAppSyncRealTimeProvider/index.ts +3 -2
- package/src/Providers/MqttOverWSProvider.ts +3 -3
- package/src/Providers/PubSubProvider.ts +1 -1
- package/src/Providers/constants.ts +2 -0
- package/src/index.ts +3 -10
- package/src/types/Provider.ts +13 -1
- package/src/types/PubSub.ts +47 -8
- package/src/types/index.ts +0 -43
- package/src/utils/ConnectionStateMonitor.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.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
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-amplify/pubsub
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [4.5.3](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/pubsub@4.5.2...@aws-amplify/pubsub@4.5.3) (2022-09-08)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **pubsub:** Fix vite build issue ([#10298](https://github.com/aws-amplify/amplify-js/issues/10298)) ([89cdfd3](https://github.com/aws-amplify/amplify-js/commit/89cdfd3d6e9686ebfe181ab23492fc9402535c85))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [4.5.2](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/pubsub@4.5.1...@aws-amplify/pubsub@4.5.2) (2022-09-01)
|
|
7
26
|
|
|
8
27
|
**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
|
|
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(
|
|
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"](
|
|
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"](
|
|
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(
|
|
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(
|
|
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"](
|
|
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(
|
|
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(
|
|
8667
|
+
_this._errorDisconnect(_types_PubSub__WEBPACK_IMPORTED_MODULE_9__["CONTROL_MSG"].CONNECTION_CLOSED);
|
|
8668
8668
|
};
|
|
8669
8669
|
}
|
|
8670
8670
|
|
|
@@ -9275,7 +9275,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9275
9275
|
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_4__);
|
|
9276
9276
|
/* harmony import */ var _utils_ConnectionStateMonitor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/ConnectionStateMonitor */ "./lib-esm/utils/ConnectionStateMonitor.js");
|
|
9277
9277
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./constants */ "./lib-esm/Providers/constants.js");
|
|
9278
|
-
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! .. */ "./lib-esm/index.js");
|
|
9279
9278
|
function _typeof(obj) {
|
|
9280
9279
|
"@babel/helpers - typeof";
|
|
9281
9280
|
|
|
@@ -9504,7 +9503,6 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
9504
9503
|
|
|
9505
9504
|
|
|
9506
9505
|
|
|
9507
|
-
|
|
9508
9506
|
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_4__["ConsoleLogger"]('MqttOverWSProvider');
|
|
9509
9507
|
function mqttTopicMatch(filter, topic) {
|
|
9510
9508
|
var filterArray = filter.split('/');
|
|
@@ -9600,7 +9598,7 @@ function (_super) {
|
|
|
9600
9598
|
_this._clientIdObservers = new Map(); // Monitor the connection health state and pass changes along to Hub
|
|
9601
9599
|
|
|
9602
9600
|
_this.connectionStateMonitor.connectionStateObservable.subscribe(function (connectionStateChange) {
|
|
9603
|
-
dispatchPubSubEvent(
|
|
9601
|
+
dispatchPubSubEvent(_constants__WEBPACK_IMPORTED_MODULE_6__["CONNECTION_STATE_CHANGE"], {
|
|
9604
9602
|
provider: _this,
|
|
9605
9603
|
connectionState: connectionStateChange
|
|
9606
9604
|
}, "Connection state is " + connectionStateChange);
|
|
@@ -10084,13 +10082,14 @@ function () {
|
|
|
10084
10082
|
/*!****************************************!*\
|
|
10085
10083
|
!*** ./lib-esm/Providers/constants.js ***!
|
|
10086
10084
|
\****************************************/
|
|
10087
|
-
/*! 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 */
|
|
10085
|
+
/*! 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 */
|
|
10088
10086
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10089
10087
|
|
|
10090
10088
|
"use strict";
|
|
10091
10089
|
__webpack_require__.r(__webpack_exports__);
|
|
10092
10090
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAX_DELAY_MS", function() { return MAX_DELAY_MS; });
|
|
10093
10091
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NON_RETRYABLE_CODES", function() { return NON_RETRYABLE_CODES; });
|
|
10092
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_STATE_CHANGE", function() { return CONNECTION_STATE_CHANGE; });
|
|
10094
10093
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MESSAGE_TYPES", function() { return MESSAGE_TYPES; });
|
|
10095
10094
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUBSCRIPTION_STATUS", function() { return SUBSCRIPTION_STATUS; });
|
|
10096
10095
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SOCKET_STATUS", function() { return SOCKET_STATUS; });
|
|
@@ -10102,6 +10101,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10102
10101
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT", function() { return DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT; });
|
|
10103
10102
|
var MAX_DELAY_MS = 5000;
|
|
10104
10103
|
var NON_RETRYABLE_CODES = [400, 401, 403];
|
|
10104
|
+
var CONNECTION_STATE_CHANGE = 'ConnectionStateChange';
|
|
10105
10105
|
var MESSAGE_TYPES;
|
|
10106
10106
|
|
|
10107
10107
|
(function (MESSAGE_TYPES) {
|
|
@@ -10642,13 +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,
|
|
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__, "CONNECTION_STATE_CHANGE", function() { return CONNECTION_STATE_CHANGE; });
|
|
10651
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return CONTROL_MSG; });
|
|
10652
10650
|
/* harmony import */ var _PubSub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PubSub */ "./lib-esm/PubSub.js");
|
|
10653
10651
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PubSub", function() { return _PubSub__WEBPACK_IMPORTED_MODULE_0__["PubSub"]; });
|
|
10654
10652
|
|
|
@@ -10665,8 +10663,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10665
10663
|
|
|
10666
10664
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MqttOverWSProvider", function() { return _Providers__WEBPACK_IMPORTED_MODULE_1__["MqttOverWSProvider"]; });
|
|
10667
10665
|
|
|
10668
|
-
/* harmony import */ var
|
|
10669
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
10666
|
+
/* harmony import */ var _Providers_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Providers/constants */ "./lib-esm/Providers/constants.js");
|
|
10667
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_STATE_CHANGE", function() { return _Providers_constants__WEBPACK_IMPORTED_MODULE_2__["CONNECTION_STATE_CHANGE"]; });
|
|
10668
|
+
|
|
10669
|
+
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./types */ "./lib-esm/types/index.js");
|
|
10670
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectionState", function() { return _types__WEBPACK_IMPORTED_MODULE_3__["ConnectionState"]; });
|
|
10671
|
+
|
|
10672
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return _types__WEBPACK_IMPORTED_MODULE_3__["CONTROL_MSG"]; });
|
|
10670
10673
|
|
|
10671
10674
|
/*
|
|
10672
10675
|
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -10682,17 +10685,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10682
10685
|
*/
|
|
10683
10686
|
|
|
10684
10687
|
|
|
10685
|
-
var CONTROL_MSG;
|
|
10686
|
-
|
|
10687
|
-
(function (CONTROL_MSG) {
|
|
10688
|
-
CONTROL_MSG["CONNECTION_CLOSED"] = "Connection closed";
|
|
10689
|
-
CONTROL_MSG["CONNECTION_FAILED"] = "Connection failed";
|
|
10690
|
-
CONTROL_MSG["REALTIME_SUBSCRIPTION_INIT_ERROR"] = "AppSync Realtime subscription init error";
|
|
10691
|
-
CONTROL_MSG["SUBSCRIPTION_ACK"] = "Subscription ack";
|
|
10692
|
-
CONTROL_MSG["TIMEOUT_DISCONNECT"] = "Timeout disconnect";
|
|
10693
|
-
})(CONTROL_MSG || (CONTROL_MSG = {}));
|
|
10694
10688
|
|
|
10695
|
-
var CONNECTION_STATE_CHANGE = 'ConnectionStateChange';
|
|
10696
10689
|
|
|
10697
10690
|
|
|
10698
10691
|
/**
|
|
@@ -10703,17 +10696,41 @@ var CONNECTION_STATE_CHANGE = 'ConnectionStateChange';
|
|
|
10703
10696
|
|
|
10704
10697
|
/***/ }),
|
|
10705
10698
|
|
|
10706
|
-
/***/ "./lib-esm/types/
|
|
10707
|
-
|
|
10708
|
-
!*** ./lib-esm/types/
|
|
10709
|
-
|
|
10710
|
-
/*! exports provided: ConnectionState */
|
|
10699
|
+
/***/ "./lib-esm/types/PubSub.js":
|
|
10700
|
+
/*!*********************************!*\
|
|
10701
|
+
!*** ./lib-esm/types/PubSub.js ***!
|
|
10702
|
+
\*********************************/
|
|
10703
|
+
/*! exports provided: CONTROL_MSG, ConnectionState */
|
|
10711
10704
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10712
10705
|
|
|
10713
10706
|
"use strict";
|
|
10714
10707
|
__webpack_require__.r(__webpack_exports__);
|
|
10708
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTROL_MSG", function() { return CONTROL_MSG; });
|
|
10715
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 = {}));
|
|
10716
10731
|
/** @enum {string} */
|
|
10732
|
+
|
|
10733
|
+
|
|
10717
10734
|
var ConnectionState;
|
|
10718
10735
|
|
|
10719
10736
|
(function (ConnectionState) {
|
|
@@ -10758,6 +10775,24 @@ var ConnectionState;
|
|
|
10758
10775
|
ConnectionState["ConnectedPendingKeepAlive"] = "ConnectedPendingKeepAlive";
|
|
10759
10776
|
})(ConnectionState || (ConnectionState = {}));
|
|
10760
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
|
+
|
|
10761
10796
|
/***/ }),
|
|
10762
10797
|
|
|
10763
10798
|
/***/ "./lib-esm/utils/ConnectionStateMonitor.js":
|
|
@@ -10772,7 +10807,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10772
10807
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_CHANGE", function() { return CONNECTION_CHANGE; });
|
|
10773
10808
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionStateMonitor", function() { return ConnectionStateMonitor; });
|
|
10774
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");
|
|
10775
|
-
/* harmony import */ var
|
|
10810
|
+
/* harmony import */ var _types_PubSub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../types/PubSub */ "./lib-esm/types/PubSub.js");
|
|
10776
10811
|
/* harmony import */ var _ReachabilityMonitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ReachabilityMonitor */ "./lib-esm/utils/ReachabilityMonitor/index.js");
|
|
10777
10812
|
/*
|
|
10778
10813
|
* Copyright 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -10938,15 +10973,15 @@ function () {
|
|
|
10938
10973
|
networkState = _a.networkState,
|
|
10939
10974
|
intendedConnectionState = _a.intendedConnectionState,
|
|
10940
10975
|
keepAliveState = _a.keepAliveState;
|
|
10941
|
-
if (connectionState === 'connected' && networkState === 'disconnected') return
|
|
10942
|
-
if (connectionState === 'connected' && intendedConnectionState === 'disconnected') return
|
|
10943
|
-
if (connectionState === 'disconnected' && intendedConnectionState === 'connected' && networkState === 'disconnected') return
|
|
10944
|
-
if (connectionState === 'disconnected' && intendedConnectionState === 'connected') return
|
|
10945
|
-
if (connectionState === 'connected' && keepAliveState === 'unhealthy') return
|
|
10946
|
-
|
|
10947
|
-
if (connectionState === 'connecting') return
|
|
10948
|
-
if (connectionState === 'disconnected') return
|
|
10949
|
-
return
|
|
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;
|
|
10950
10985
|
};
|
|
10951
10986
|
|
|
10952
10987
|
return ConnectionStateMonitor;
|