@aws-amplify/api-graphql 4.0.1-unstable.cfbde4c.0 → 4.0.1
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/{lib → dist/cjs}/GraphQLAPI.js +8 -4
- package/dist/cjs/GraphQLAPI.js.map +1 -0
- package/{lib → dist/cjs}/Providers/AWSAppSyncRealTimeProvider/index.js +11 -8
- package/dist/cjs/Providers/AWSAppSyncRealTimeProvider/index.js.map +1 -0
- package/{lib → dist/cjs}/Providers/constants.js +8 -8
- package/dist/cjs/Providers/constants.js.map +1 -0
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/index.js.map +1 -0
- package/{lib → dist/cjs}/internals/InternalGraphQLAPI.js +18 -18
- package/dist/cjs/internals/InternalGraphQLAPI.js.map +1 -0
- package/dist/cjs/internals/index.js +14 -0
- package/dist/cjs/internals/index.js.map +1 -0
- package/{lib → dist/cjs}/internals/v6.js +4 -1
- package/dist/cjs/internals/v6.js.map +1 -0
- package/{lib → dist/cjs}/types/PubSub.js +6 -6
- package/dist/cjs/types/PubSub.js.map +1 -0
- package/{lib → dist/cjs}/types/index.js +7 -5
- package/dist/cjs/types/index.js.map +1 -0
- package/{lib → dist/cjs}/utils/ConnectionStateMonitor.js +8 -5
- package/dist/cjs/utils/ConnectionStateMonitor.js.map +1 -0
- package/{lib → dist/cjs}/utils/ReachabilityMonitor/index.js +6 -2
- package/dist/cjs/utils/ReachabilityMonitor/index.js.map +1 -0
- package/{lib → dist/cjs}/utils/ReachabilityMonitor/index.native.js +6 -2
- package/dist/cjs/utils/ReachabilityMonitor/index.native.js.map +1 -0
- package/{lib → dist/cjs}/utils/ReconnectionMonitor.js +4 -1
- package/dist/cjs/utils/ReconnectionMonitor.js.map +1 -0
- package/{lib → dist/cjs}/utils/errors/APIError.js +4 -1
- package/dist/cjs/utils/errors/APIError.js.map +1 -0
- package/{lib → dist/cjs}/utils/errors/assertValidationError.js +4 -1
- package/dist/cjs/utils/errors/assertValidationError.js.map +1 -0
- package/dist/cjs/utils/errors/index.js +14 -0
- package/dist/cjs/utils/errors/index.js.map +1 -0
- package/{lib → dist/cjs}/utils/errors/validation.js +4 -1
- package/dist/cjs/utils/errors/validation.js.map +1 -0
- package/dist/cjs/utils/index.js +11 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/{lib → dist/cjs}/utils/resolveConfig.js +7 -3
- package/dist/cjs/utils/resolveConfig.js.map +1 -0
- package/{lib-esm → dist/cjs}/utils/resolveLibraryOptions.js +7 -1
- package/dist/cjs/utils/resolveLibraryOptions.js.map +1 -0
- package/{lib-esm → dist/esm}/GraphQLAPI.d.ts +2 -2
- package/{lib-esm/GraphQLAPI.js → dist/esm/GraphQLAPI.mjs} +8 -4
- package/dist/esm/GraphQLAPI.mjs.map +1 -0
- package/{lib → dist/esm}/Providers/AWSAppSyncRealTimeProvider/index.d.ts +1 -1
- package/{lib-esm/Providers/AWSAppSyncRealTimeProvider/index.js → dist/esm/Providers/AWSAppSyncRealTimeProvider/index.mjs} +13 -9
- package/dist/esm/Providers/AWSAppSyncRealTimeProvider/index.mjs.map +1 -0
- package/{lib-esm/Providers/constants.js → dist/esm/Providers/constants.mjs} +18 -14
- package/dist/esm/Providers/constants.mjs.map +1 -0
- package/dist/esm/index.mjs +5 -0
- package/dist/esm/index.mjs.map +1 -0
- package/{lib → dist/esm}/internals/InternalGraphQLAPI.d.ts +1 -1
- package/{lib-esm/internals/InternalGraphQLAPI.js → dist/esm/internals/InternalGraphQLAPI.mjs} +19 -18
- package/dist/esm/internals/InternalGraphQLAPI.mjs.map +1 -0
- package/dist/esm/internals/index.mjs +3 -0
- package/dist/esm/internals/index.mjs.map +1 -0
- package/{lib-esm/internals/v6.js → dist/esm/internals/v6.mjs} +9 -5
- package/dist/esm/internals/v6.mjs.map +1 -0
- package/{lib → dist/esm}/types/PubSub.d.ts +2 -2
- package/{lib-esm/types/PubSub.js → dist/esm/types/PubSub.mjs} +5 -2
- package/dist/esm/types/PubSub.mjs.map +1 -0
- package/{lib-esm → dist/esm}/types/index.d.ts +25 -25
- package/{lib-esm/types/index.js → dist/esm/types/index.mjs} +7 -3
- package/dist/esm/types/index.mjs.map +1 -0
- package/{lib-esm → dist/esm}/utils/ConnectionStateMonitor.d.ts +3 -3
- package/{lib-esm/utils/ConnectionStateMonitor.js → dist/esm/utils/ConnectionStateMonitor.mjs} +9 -5
- package/dist/esm/utils/ConnectionStateMonitor.mjs.map +1 -0
- package/dist/esm/utils/ReachabilityMonitor/index.d.ts +1 -0
- package/{lib-esm/utils/ReachabilityMonitor/index.js → dist/esm/utils/ReachabilityMonitor/index.mjs} +6 -2
- package/dist/esm/utils/ReachabilityMonitor/index.mjs.map +1 -0
- package/dist/esm/utils/ReachabilityMonitor/index.native.d.ts +1 -0
- package/dist/esm/utils/ReachabilityMonitor/index.native.mjs +9 -0
- package/dist/esm/utils/ReachabilityMonitor/index.native.mjs.map +1 -0
- package/{lib-esm/utils/ReconnectionMonitor.js → dist/esm/utils/ReconnectionMonitor.mjs} +7 -3
- package/dist/esm/utils/ReconnectionMonitor.mjs.map +1 -0
- package/{lib-esm/utils/errors/APIError.js → dist/esm/utils/errors/APIError.mjs} +6 -2
- package/dist/esm/utils/errors/APIError.mjs.map +1 -0
- package/{lib-esm/utils/errors/assertValidationError.js → dist/esm/utils/errors/assertValidationError.mjs} +7 -3
- package/dist/esm/utils/errors/assertValidationError.mjs.map +1 -0
- package/dist/esm/utils/errors/index.mjs +4 -0
- package/dist/esm/utils/errors/index.mjs.map +1 -0
- package/{lib-esm/utils/errors/validation.js → dist/esm/utils/errors/validation.mjs} +5 -2
- package/dist/esm/utils/errors/validation.mjs.map +1 -0
- package/dist/esm/utils/index.mjs +3 -0
- package/dist/esm/utils/index.mjs.map +1 -0
- package/{lib → dist/esm}/utils/resolveConfig.d.ts +1 -1
- package/{lib-esm/utils/resolveConfig.js → dist/esm/utils/resolveConfig.mjs} +8 -2
- package/dist/esm/utils/resolveConfig.mjs.map +1 -0
- package/{lib → dist/esm}/utils/resolveLibraryOptions.d.ts +2 -2
- package/{lib/utils/resolveLibraryOptions.js → dist/esm/utils/resolveLibraryOptions.mjs} +4 -3
- package/dist/esm/utils/resolveLibraryOptions.mjs.map +1 -0
- package/internals/package.json +4 -4
- package/package.json +49 -25
- package/src/GraphQLAPI.ts +1 -1
- package/lib/GraphQLAPI.d.ts +0 -38
- package/lib/Providers/constants.d.ts +0 -95
- package/lib/index.d.ts +0 -3
- package/lib/index.js +0 -12
- package/lib/internals/index.d.ts +0 -2
- package/lib/internals/index.js +0 -11
- package/lib/internals/v6.d.ts +0 -101
- package/lib/tsconfig.tsbuildinfo +0 -6813
- package/lib/types/index.d.ts +0 -309
- package/lib/utils/ConnectionStateMonitor.d.ts +0 -41
- package/lib/utils/ReachabilityMonitor/index.d.ts +0 -1
- package/lib/utils/ReachabilityMonitor/index.native.d.ts +0 -1
- package/lib/utils/ReconnectionMonitor.d.ts +0 -29
- package/lib/utils/errors/APIError.d.ts +0 -7
- package/lib/utils/errors/assertValidationError.d.ts +0 -5
- package/lib/utils/errors/index.d.ts +0 -3
- package/lib/utils/errors/index.js +0 -11
- package/lib/utils/errors/validation.d.ts +0 -7
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/index.js +0 -8
- package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.d.ts +0 -64
- package/lib-esm/index.js +0 -5
- package/lib-esm/internals/InternalGraphQLAPI.d.ts +0 -58
- package/lib-esm/internals/index.js +0 -4
- package/lib-esm/tsconfig.tsbuildinfo +0 -6813
- package/lib-esm/types/PubSub.d.ts +0 -27
- package/lib-esm/utils/ReachabilityMonitor/index.d.ts +0 -1
- package/lib-esm/utils/ReachabilityMonitor/index.native.d.ts +0 -1
- package/lib-esm/utils/ReachabilityMonitor/index.native.js +0 -5
- package/lib-esm/utils/errors/index.js +0 -5
- package/lib-esm/utils/index.js +0 -4
- package/lib-esm/utils/resolveConfig.d.ts +0 -12
- package/lib-esm/utils/resolveLibraryOptions.d.ts +0 -11
- /package/{lib-esm → dist/esm}/Providers/constants.d.ts +0 -0
- /package/{lib-esm → dist/esm}/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/internals/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/internals/v6.d.ts +0 -0
- /package/{lib-esm → dist/esm}/utils/ReconnectionMonitor.d.ts +0 -0
- /package/{lib-esm → dist/esm}/utils/errors/APIError.d.ts +0 -0
- /package/{lib-esm → dist/esm}/utils/errors/assertValidationError.d.ts +0 -0
- /package/{lib-esm → dist/esm}/utils/errors/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/utils/errors/validation.d.ts +0 -0
- /package/{lib-esm → dist/esm}/utils/index.d.ts +0 -0
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.__amplify = exports.GraphQLAuthError = exports.ConnectionState = exports.CONTROL_MSG = void 0;
|
|
3
5
|
var PubSub_1 = require("./PubSub");
|
|
4
|
-
exports
|
|
5
|
-
exports
|
|
6
|
-
var GraphQLAuthError;
|
|
6
|
+
Object.defineProperty(exports, "CONTROL_MSG", { enumerable: true, get: function () { return PubSub_1.CONTROL_MSG; } });
|
|
7
|
+
Object.defineProperty(exports, "ConnectionState", { enumerable: true, get: function () { return PubSub_1.ConnectionState; } });
|
|
7
8
|
(function (GraphQLAuthError) {
|
|
8
9
|
GraphQLAuthError["NO_API_KEY"] = "No api-key configured";
|
|
9
10
|
GraphQLAuthError["NO_CURRENT_USER"] = "No current user";
|
|
10
11
|
GraphQLAuthError["NO_CREDENTIALS"] = "No credentials";
|
|
11
12
|
GraphQLAuthError["NO_FEDERATED_JWT"] = "No federated jwt";
|
|
12
13
|
GraphQLAuthError["NO_AUTH_TOKEN"] = "No auth token specified";
|
|
13
|
-
})(
|
|
14
|
+
})(exports.GraphQLAuthError || (exports.GraphQLAuthError = {}));
|
|
14
15
|
exports.__amplify = Symbol('amplify');
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/types/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.__amplify = exports.GraphQLAuthError = exports.ConnectionState = exports.CONTROL_MSG = void 0;\nvar PubSub_1 = require(\"./PubSub\");\nObject.defineProperty(exports, \"CONTROL_MSG\", { enumerable: true, get: function () { return PubSub_1.CONTROL_MSG; } });\nObject.defineProperty(exports, \"ConnectionState\", { enumerable: true, get: function () { return PubSub_1.ConnectionState; } });\nvar GraphQLAuthError;\n(function (GraphQLAuthError) {\n GraphQLAuthError[\"NO_API_KEY\"] = \"No api-key configured\";\n GraphQLAuthError[\"NO_CURRENT_USER\"] = \"No current user\";\n GraphQLAuthError[\"NO_CREDENTIALS\"] = \"No credentials\";\n GraphQLAuthError[\"NO_FEDERATED_JWT\"] = \"No federated jwt\";\n GraphQLAuthError[\"NO_AUTH_TOKEN\"] = \"No auth token specified\";\n})(GraphQLAuthError = exports.GraphQLAuthError || (exports.GraphQLAuthError = {}));\nexports.__amplify = Symbol('amplify');\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,WAAW,GAAG,KAAK,CAAC,CAAC;AACtG,IAAI,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACnC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;AACvH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,CAAC;AAE/H,CAAC,UAAU,gBAAgB,EAAE;AAC7B,IAAI,gBAAgB,CAAC,YAAY,CAAC,GAAG,uBAAuB,CAAC;AAC7D,IAAI,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC;AAC5D,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AAC1D,IAAI,gBAAgB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;AAC9D,IAAI,gBAAgB,CAAC,eAAe,CAAC,GAAG,yBAAyB,CAAC;AAClE,CAAC,EAAqB,OAAO,CAAC,gBAAgB,KAAK,OAAO,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC,CAAC;AACnF,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ConnectionStateMonitor = exports.CONNECTION_CHANGE = void 0;
|
|
5
7
|
const rxjs_1 = require("rxjs");
|
|
6
8
|
const PubSub_1 = require("../types/PubSub");
|
|
7
9
|
const ReachabilityMonitor_1 = require("./ReachabilityMonitor");
|
|
@@ -32,7 +34,7 @@ class ConnectionStateMonitor {
|
|
|
32
34
|
keepAliveState: 'healthy',
|
|
33
35
|
};
|
|
34
36
|
// Attempt to update the state with the current actual network state
|
|
35
|
-
this._initialNetworkStateSubscription = ReachabilityMonitor_1.ReachabilityMonitor().subscribe(({ online }) => {
|
|
37
|
+
this._initialNetworkStateSubscription = (0, ReachabilityMonitor_1.ReachabilityMonitor)().subscribe(({ online }) => {
|
|
36
38
|
this.record(online ? exports.CONNECTION_CHANGE.ONLINE : exports.CONNECTION_CHANGE.OFFLINE);
|
|
37
39
|
this._initialNetworkStateSubscription?.unsubscribe();
|
|
38
40
|
});
|
|
@@ -50,7 +52,7 @@ class ConnectionStateMonitor {
|
|
|
50
52
|
this._initialNetworkStateSubscription?.unsubscribe();
|
|
51
53
|
// Maintain the network state based on the reachability monitor
|
|
52
54
|
if (this._networkMonitoringSubscription === undefined) {
|
|
53
|
-
this._networkMonitoringSubscription = ReachabilityMonitor_1.ReachabilityMonitor().subscribe(({ online }) => {
|
|
55
|
+
this._networkMonitoringSubscription = (0, ReachabilityMonitor_1.ReachabilityMonitor)().subscribe(({ online }) => {
|
|
54
56
|
this.record(online ? exports.CONNECTION_CHANGE.ONLINE : exports.CONNECTION_CHANGE.OFFLINE);
|
|
55
57
|
});
|
|
56
58
|
}
|
|
@@ -74,10 +76,10 @@ class ConnectionStateMonitor {
|
|
|
74
76
|
// states without changing the overall connection state.
|
|
75
77
|
// After translating from linked states to ConnectionState, then remove any duplicates
|
|
76
78
|
return this._linkedConnectionStateObservable
|
|
77
|
-
.pipe(rxjs_1.map(value => {
|
|
79
|
+
.pipe((0, rxjs_1.map)(value => {
|
|
78
80
|
return this.connectionStatesTranslator(value);
|
|
79
81
|
}))
|
|
80
|
-
.pipe(rxjs_1.filter(current => {
|
|
82
|
+
.pipe((0, rxjs_1.filter)(current => {
|
|
81
83
|
const toInclude = current !== previous;
|
|
82
84
|
previous = current;
|
|
83
85
|
return toInclude;
|
|
@@ -129,3 +131,4 @@ class ConnectionStateMonitor {
|
|
|
129
131
|
}
|
|
130
132
|
}
|
|
131
133
|
exports.ConnectionStateMonitor = ConnectionStateMonitor;
|
|
134
|
+
//# sourceMappingURL=ConnectionStateMonitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectionStateMonitor.js","sources":["../../../src/utils/ConnectionStateMonitor.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConnectionStateMonitor = exports.CONNECTION_CHANGE = void 0;\nconst rxjs_1 = require(\"rxjs\");\nconst PubSub_1 = require(\"../types/PubSub\");\nconst ReachabilityMonitor_1 = require(\"./ReachabilityMonitor\");\nexports.CONNECTION_CHANGE = {\n KEEP_ALIVE_MISSED: { keepAliveState: 'unhealthy' },\n KEEP_ALIVE: { keepAliveState: 'healthy' },\n CONNECTION_ESTABLISHED: { connectionState: 'connected' },\n CONNECTION_FAILED: {\n intendedConnectionState: 'disconnected',\n connectionState: 'disconnected',\n },\n CLOSING_CONNECTION: { intendedConnectionState: 'disconnected' },\n OPENING_CONNECTION: {\n intendedConnectionState: 'connected',\n connectionState: 'connecting',\n },\n CLOSED: { connectionState: 'disconnected' },\n ONLINE: { networkState: 'connected' },\n OFFLINE: { networkState: 'disconnected' },\n};\nclass ConnectionStateMonitor {\n constructor() {\n this._networkMonitoringSubscription = undefined;\n this._linkedConnectionState = {\n networkState: 'connected',\n connectionState: 'disconnected',\n intendedConnectionState: 'disconnected',\n keepAliveState: 'healthy',\n };\n // Attempt to update the state with the current actual network state\n this._initialNetworkStateSubscription = (0, ReachabilityMonitor_1.ReachabilityMonitor)().subscribe(({ online }) => {\n this.record(online ? exports.CONNECTION_CHANGE.ONLINE : exports.CONNECTION_CHANGE.OFFLINE);\n this._initialNetworkStateSubscription?.unsubscribe();\n });\n this._linkedConnectionStateObservable =\n new rxjs_1.Observable(connectionStateObserver => {\n connectionStateObserver.next(this._linkedConnectionState);\n this._linkedConnectionStateObserver = connectionStateObserver;\n });\n }\n /**\n * Turn network state monitoring on if it isn't on already\n */\n enableNetworkMonitoring() {\n // If no initial network state was discovered, stop trying\n this._initialNetworkStateSubscription?.unsubscribe();\n // Maintain the network state based on the reachability monitor\n if (this._networkMonitoringSubscription === undefined) {\n this._networkMonitoringSubscription = (0, ReachabilityMonitor_1.ReachabilityMonitor)().subscribe(({ online }) => {\n this.record(online ? exports.CONNECTION_CHANGE.ONLINE : exports.CONNECTION_CHANGE.OFFLINE);\n });\n }\n }\n /**\n * Turn network state monitoring off if it isn't off already\n */\n disableNetworkMonitoring() {\n this._networkMonitoringSubscription?.unsubscribe();\n this._networkMonitoringSubscription = undefined;\n }\n /**\n * Get the observable that allows us to monitor the connection state\n *\n * @returns {Observable<ConnectionState>} - The observable that emits ConnectionState updates\n */\n get connectionStateObservable() {\n let previous;\n // The linked state aggregates state changes to any of the network, connection,\n // intendedConnection and keepAliveHealth. Some states will change these independent\n // states without changing the overall connection state.\n // After translating from linked states to ConnectionState, then remove any duplicates\n return this._linkedConnectionStateObservable\n .pipe((0, rxjs_1.map)(value => {\n return this.connectionStatesTranslator(value);\n }))\n .pipe((0, rxjs_1.filter)(current => {\n const toInclude = current !== previous;\n previous = current;\n return toInclude;\n }));\n }\n /*\n * Updates local connection state and emits the full state to the observer.\n */\n record(statusUpdates) {\n // Maintain the network monitor\n if (statusUpdates.intendedConnectionState === 'connected') {\n this.enableNetworkMonitoring();\n }\n else if (statusUpdates.intendedConnectionState === 'disconnected') {\n this.disableNetworkMonitoring();\n }\n // Maintain the socket state\n const newSocketStatus = {\n ...this._linkedConnectionState,\n ...statusUpdates,\n };\n this._linkedConnectionState = { ...newSocketStatus };\n this._linkedConnectionStateObserver?.next(this._linkedConnectionState);\n }\n /*\n * Translate the ConnectionState structure into a specific ConnectionState string literal union\n */\n connectionStatesTranslator({ connectionState, networkState, intendedConnectionState, keepAliveState, }) {\n if (connectionState === 'connected' && networkState === 'disconnected')\n return PubSub_1.ConnectionState.ConnectedPendingNetwork;\n if (connectionState === 'connected' &&\n intendedConnectionState === 'disconnected')\n return PubSub_1.ConnectionState.ConnectedPendingDisconnect;\n if (connectionState === 'disconnected' &&\n intendedConnectionState === 'connected' &&\n networkState === 'disconnected')\n return PubSub_1.ConnectionState.ConnectionDisruptedPendingNetwork;\n if (connectionState === 'disconnected' &&\n intendedConnectionState === 'connected')\n return PubSub_1.ConnectionState.ConnectionDisrupted;\n if (connectionState === 'connected' && keepAliveState === 'unhealthy')\n return PubSub_1.ConnectionState.ConnectedPendingKeepAlive;\n // All remaining states directly correspond to the connection state\n if (connectionState === 'connecting')\n return PubSub_1.ConnectionState.Connecting;\n if (connectionState === 'disconnected')\n return PubSub_1.ConnectionState.Disconnected;\n return PubSub_1.ConnectionState.Connected;\n }\n}\nexports.ConnectionStateMonitor = ConnectionStateMonitor;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;AACpE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC5C,MAAM,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAC/D,OAAO,CAAC,iBAAiB,GAAG;AAC5B,IAAI,iBAAiB,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE;AACtD,IAAI,UAAU,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE;AAC7C,IAAI,sBAAsB,EAAE,EAAE,eAAe,EAAE,WAAW,EAAE;AAC5D,IAAI,iBAAiB,EAAE;AACvB,QAAQ,uBAAuB,EAAE,cAAc;AAC/C,QAAQ,eAAe,EAAE,cAAc;AACvC,KAAK;AACL,IAAI,kBAAkB,EAAE,EAAE,uBAAuB,EAAE,cAAc,EAAE;AACnE,IAAI,kBAAkB,EAAE;AACxB,QAAQ,uBAAuB,EAAE,WAAW;AAC5C,QAAQ,eAAe,EAAE,YAAY;AACrC,KAAK;A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Ac;AAC9C,YAAY,OAAO,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC;AACzD,QAAQ,OAAO,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC;AAClD,KAAK;AACL,CAAC;AACD,OAAO,CAAC,sBAAsB,GAAG,sBAAsB;;"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ReachabilityMonitor = void 0;
|
|
3
5
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
6
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
7
|
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
|
-
|
|
8
|
+
const ReachabilityMonitor = () => new utils_1.Reachability().networkMonitor();
|
|
9
|
+
exports.ReachabilityMonitor = ReachabilityMonitor;
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/utils/ReachabilityMonitor/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReachabilityMonitor = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst ReachabilityMonitor = () => new utils_1.Reachability().networkMonitor();\nexports.ReachabilityMonitor = ReachabilityMonitor;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,mBAAmB,GAAG,KAAK,CAAC,CAAC;AACrC;AACA;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,mBAAmB,GAAG,MAAM,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC;AAC9E,OAAO,CAAC,mBAAmB,GAAG,mBAAmB;;"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ReachabilityMonitor = void 0;
|
|
3
5
|
const tslib_1 = require("tslib");
|
|
4
6
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
7
|
// SPDX-License-Identifier: Apache-2.0
|
|
6
8
|
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
9
|
const netinfo_1 = tslib_1.__importDefault(require("@react-native-community/netinfo"));
|
|
8
|
-
|
|
10
|
+
const ReachabilityMonitor = () => new utils_1.Reachability().networkMonitor(netinfo_1.default);
|
|
11
|
+
exports.ReachabilityMonitor = ReachabilityMonitor;
|
|
12
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","sources":["../../../../src/utils/ReachabilityMonitor/index.native.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReachabilityMonitor = void 0;\nconst tslib_1 = require(\"tslib\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst netinfo_1 = tslib_1.__importDefault(require(\"@react-native-community/netinfo\"));\nconst ReachabilityMonitor = () => new utils_1.Reachability().networkMonitor(netinfo_1.default);\nexports.ReachabilityMonitor = ReachabilityMonitor;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,mBAAmB,GAAG,KAAK,CAAC,CAAC;AACrC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACjC;AACA;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAC,CAAC;AACtF,MAAM,mBAAmB,GAAG,MAAM,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC/F,OAAO,CAAC,mBAAmB,GAAG,mBAAmB;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ReconnectionMonitor = exports.ReconnectEvent = void 0;
|
|
3
5
|
const constants_1 = require("../Providers/constants");
|
|
4
6
|
var ReconnectEvent;
|
|
5
7
|
(function (ReconnectEvent) {
|
|
@@ -66,3 +68,4 @@ class ReconnectionMonitor {
|
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
exports.ReconnectionMonitor = ReconnectionMonitor;
|
|
71
|
+
//# sourceMappingURL=ReconnectionMonitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReconnectionMonitor.js","sources":["../../../src/utils/ReconnectionMonitor.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReconnectionMonitor = exports.ReconnectEvent = void 0;\nconst constants_1 = require(\"../Providers/constants\");\nvar ReconnectEvent;\n(function (ReconnectEvent) {\n ReconnectEvent[\"START_RECONNECT\"] = \"START_RECONNECT\";\n ReconnectEvent[\"HALT_RECONNECT\"] = \"HALT_RECONNECT\";\n})(ReconnectEvent = exports.ReconnectEvent || (exports.ReconnectEvent = {}));\n/**\n * Captures the reconnect event logic used to determine when to reconnect to PubSub providers.\n * Reconnnect attempts are delayed by 5 seconds to let the interface settle.\n * Attempting to reconnect only once creates unrecoverable states when the network state isn't\n * supported by the browser, so this keeps retrying every minute until halted.\n */\nclass ReconnectionMonitor {\n constructor() {\n this.reconnectObservers = [];\n }\n /**\n * Add reconnect observer to the list of observers to alert on reconnect\n */\n addObserver(reconnectObserver) {\n this.reconnectObservers.push(reconnectObserver);\n }\n /**\n * Given a reconnect event, start the appropriate behavior\n */\n record(event) {\n if (event === ReconnectEvent.START_RECONNECT) {\n // If the reconnection hasn't been started\n if (this.reconnectSetTimeoutId === undefined &&\n this.reconnectIntervalId === undefined) {\n this.reconnectSetTimeoutId = setTimeout(() => {\n // Reconnect now\n this._triggerReconnect();\n // Retry reconnect every periodically until it works\n this.reconnectIntervalId = setInterval(() => {\n this._triggerReconnect();\n }, constants_1.RECONNECT_INTERVAL);\n }, constants_1.RECONNECT_DELAY);\n }\n }\n if (event === ReconnectEvent.HALT_RECONNECT) {\n if (this.reconnectIntervalId) {\n clearInterval(this.reconnectIntervalId);\n this.reconnectIntervalId = undefined;\n }\n if (this.reconnectSetTimeoutId) {\n clearTimeout(this.reconnectSetTimeoutId);\n this.reconnectSetTimeoutId = undefined;\n }\n }\n }\n /**\n * Complete all reconnect observers\n */\n close() {\n this.reconnectObservers.forEach(reconnectObserver => {\n reconnectObserver.complete?.();\n });\n }\n _triggerReconnect() {\n this.reconnectObservers.forEach(reconnectObserver => {\n reconnectObserver.next?.();\n });\n }\n}\nexports.ReconnectionMonitor = ReconnectionMonitor;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,cAAc,GAAG,KAAK,CAAC,CAAC;AAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACtD,IAAI,cAAc,CAAC;AACnB,CAAC,UAAU,cAAc,EAAE;AAC3B,IAAI,cAAc,CAAC,iBAAiB,CAAC,GAAG,i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AACrD,aAAa;AACb,YAAY,IAAI,IAAI,CAAC,qBAAqB,EAAE;AAC5C,gBAAgB,YAAY,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AACzD,gBAAgB,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAAC;AACvD,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,IAAI,KAAK,GAAG;AACZ,QAAQ,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,iBAAiB,IAAI;AAC7D,YAAY,iBAAiB,CAAC,QAAQ,IAAI,CAAC;AAC3C,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,iBAAiB,GAAG;AACxB,QAAQ,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,iBAAiB,IAAI;AAC7D,YAAY,iBAAiB,CAAC,IAAI,IAAI,CAAC;AACvC,SAAS,CAAC,CAAC;AACX,KAAK;AACL,CAAC;AACD,OAAO,CAAC,mBAAmB,GAAG,mBAAmB;;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.APIError = void 0;
|
|
5
7
|
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
8
|
/**
|
|
7
9
|
* @internal
|
|
@@ -16,3 +18,4 @@ class APIError extends utils_1.AmplifyError {
|
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
exports.APIError = APIError;
|
|
21
|
+
//# sourceMappingURL=APIError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"APIError.js","sources":["../../../../src/utils/errors/APIError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.APIError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * @internal\n */\nclass APIError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = APIError;\n Object.setPrototypeOf(this, APIError.prototype);\n }\n}\nexports.APIError = APIError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC;AAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D;AACA;AACA;AACA,MAAM,QAAQ,SAAS,OAAO,CAAC,YAAY,CAAC;AAC5C,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC,CAAC;AACtB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC;AACpC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;AACxD,KAAK;AACL,CAAC;AACD,OAAO,CAAC,QAAQ,GAAG,QAAQ;;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.assertValidationError = void 0;
|
|
5
7
|
const APIError_1 = require("./APIError");
|
|
6
8
|
const validation_1 = require("./validation");
|
|
7
9
|
/**
|
|
@@ -14,3 +16,4 @@ function assertValidationError(assertion, name) {
|
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
exports.assertValidationError = assertValidationError;
|
|
19
|
+
//# sourceMappingURL=assertValidationError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertValidationError.js","sources":["../../../../src/utils/errors/assertValidationError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertValidationError = void 0;\nconst APIError_1 = require(\"./APIError\");\nconst validation_1 = require(\"./validation\");\n/**\n * @internal\n */\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validation_1.validationErrorMap[name];\n if (!assertion) {\n throw new APIError_1.APIError({ name, message, recoverySuggestion });\n }\n}\nexports.assertValidationError = assertValidationError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,qBAAqB,GAAG,KAAK,CAAC,CAAC;AACvC,MAAM,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACzC,MAAM,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAC7C;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AAChD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAClF,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAC7E,KAAK;AACL,CAAC;AACD,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.validationErrorMap = exports.APIValidationErrorCode = exports.assertValidationError = exports.APIError = void 0;
|
|
7
|
+
var APIError_1 = require("./APIError");
|
|
8
|
+
Object.defineProperty(exports, "APIError", { enumerable: true, get: function () { return APIError_1.APIError; } });
|
|
9
|
+
var assertValidationError_1 = require("./assertValidationError");
|
|
10
|
+
Object.defineProperty(exports, "assertValidationError", { enumerable: true, get: function () { return assertValidationError_1.assertValidationError; } });
|
|
11
|
+
var validation_1 = require("./validation");
|
|
12
|
+
Object.defineProperty(exports, "APIValidationErrorCode", { enumerable: true, get: function () { return validation_1.APIValidationErrorCode; } });
|
|
13
|
+
Object.defineProperty(exports, "validationErrorMap", { enumerable: true, get: function () { return validation_1.validationErrorMap; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/utils/errors/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validationErrorMap = exports.APIValidationErrorCode = exports.assertValidationError = exports.APIError = void 0;\nvar APIError_1 = require(\"./APIError\");\nObject.defineProperty(exports, \"APIError\", { enumerable: true, get: function () { return APIError_1.APIError; } });\nvar assertValidationError_1 = require(\"./assertValidationError\");\nObject.defineProperty(exports, \"assertValidationError\", { enumerable: true, get: function () { return assertValidationError_1.assertValidationError; } });\nvar validation_1 = require(\"./validation\");\nObject.defineProperty(exports, \"APIValidationErrorCode\", { enumerable: true, get: function () { return validation_1.APIValidationErrorCode; } });\nObject.defineProperty(exports, \"validationErrorMap\", { enumerable: true, get: function () { return validation_1.validationErrorMap; } });\n"],"names":[],"mappings":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
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.validationErrorMap = exports.APIValidationErrorCode = void 0;
|
|
5
7
|
var APIValidationErrorCode;
|
|
6
8
|
(function (APIValidationErrorCode) {
|
|
7
9
|
APIValidationErrorCode["NoAuthSession"] = "NoAuthSession";
|
|
@@ -23,3 +25,4 @@ exports.validationErrorMap = {
|
|
|
23
25
|
message: 'Custom endpoint region is present without custom endpoint.',
|
|
24
26
|
},
|
|
25
27
|
};
|
|
28
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sources":["../../../../src/utils/errors/validation.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validationErrorMap = exports.APIValidationErrorCode = void 0;\nvar APIValidationErrorCode;\n(function (APIValidationErrorCode) {\n APIValidationErrorCode[\"NoAuthSession\"] = \"NoAuthSession\";\n APIValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n APIValidationErrorCode[\"NoCustomEndpoint\"] = \"NoCustomEndpoint\";\n})(APIValidationErrorCode = exports.APIValidationErrorCode || (exports.APIValidationErrorCode = {}));\nexports.validationErrorMap = {\n [APIValidationErrorCode.NoAuthSession]: {\n message: 'Auth session should not be empty.',\n },\n // TODO: re-enable when working in all test environments:\n // [APIValidationErrorCode.NoEndpoint]: {\n // \tmessage: 'Missing endpoint',\n // },\n [APIValidationErrorCode.NoRegion]: {\n message: 'Missing region.',\n },\n [APIValidationErrorCode.NoCustomEndpoint]: {\n message: 'Custom endpoint region is present without custom endpoint.',\n },\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,sBAAsB,GAAG,KAAK,CAAC,CAAC;AACrE,IAAI,sBAAsB,CAAC;AAC3B,CAAC,UAAU,sBAAsB,EAAE;AACnC,IAAI,sBAAsB,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC;AAC9D,IAAI,sBAAsB,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;AACpD,IAAI,sBAAsB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;AACpE,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,KAAK,OAAO,CAAC,sBAAsB,GAAG,EAAE,CAAC,CAAC,CAAC;AACrG,OAAO,CAAC,kBAAkB,GAAG;AAC7B,IAAI,CAAC,sBAAsB,CAAC,aAAa,GAAG;AAC5C,QAAQ,OAAO,EAAE,mCAAmC;AACpD,KAAK;AACL;AACA;AACA;AACA;AACA,IAAI,CAAC,sBAAsB,CAAC,QAAQ,GAAG;AACvC,QAAQ,OAAO,EAAE,iBAAiB;AAClC,KAAK;AACL,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,GAAG;AAC/C,QAAQ,OAAO,EAAE,4DAA4D;AAC7E,KAAK;AACL,CAAC;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.resolveLibraryOptions = exports.resolveConfig = void 0;
|
|
7
|
+
var resolveConfig_1 = require("./resolveConfig");
|
|
8
|
+
Object.defineProperty(exports, "resolveConfig", { enumerable: true, get: function () { return resolveConfig_1.resolveConfig; } });
|
|
9
|
+
var resolveLibraryOptions_1 = require("./resolveLibraryOptions");
|
|
10
|
+
Object.defineProperty(exports, "resolveLibraryOptions", { enumerable: true, get: function () { return resolveLibraryOptions_1.resolveLibraryOptions; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveLibraryOptions = exports.resolveConfig = void 0;\nvar resolveConfig_1 = require(\"./resolveConfig\");\nObject.defineProperty(exports, \"resolveConfig\", { enumerable: true, get: function () { return resolveConfig_1.resolveConfig; } });\nvar resolveLibraryOptions_1 = require(\"./resolveLibraryOptions\");\nObject.defineProperty(exports, \"resolveLibraryOptions\", { enumerable: true, get: function () { return resolveLibraryOptions_1.resolveLibraryOptions; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/D,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACjD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC;AAClI,IAAI,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AACjE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,uBAAuB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,uBAAuB,CAAC,qBAAqB,CAAC,EAAE,EAAE,CAAC;;"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.resolveConfig = void 0;
|
|
5
7
|
const errors_1 = require("./errors");
|
|
6
8
|
/**
|
|
7
9
|
* @internal
|
|
8
10
|
*/
|
|
9
|
-
|
|
11
|
+
const resolveConfig = (amplify) => {
|
|
10
12
|
const { apiKey, customEndpoint, customEndpointRegion, defaultAuthMode, endpoint, region, } = amplify.getConfig().API?.GraphQL ?? {};
|
|
11
13
|
// TODO: re-enable when working in all test environments:
|
|
12
14
|
// assertValidationError(!!endpoint, APIValidationErrorCode.NoEndpoint);
|
|
13
|
-
errors_1.assertValidationError(!(!customEndpoint && customEndpointRegion), errors_1.APIValidationErrorCode.NoCustomEndpoint);
|
|
15
|
+
(0, errors_1.assertValidationError)(!(!customEndpoint && customEndpointRegion), errors_1.APIValidationErrorCode.NoCustomEndpoint);
|
|
14
16
|
return {
|
|
15
17
|
apiKey,
|
|
16
18
|
customEndpoint,
|
|
@@ -20,3 +22,5 @@ exports.resolveConfig = (amplify) => {
|
|
|
20
22
|
region,
|
|
21
23
|
};
|
|
22
24
|
};
|
|
25
|
+
exports.resolveConfig = resolveConfig;
|
|
26
|
+
//# sourceMappingURL=resolveConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveConfig.js","sources":["../../../src/utils/resolveConfig.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveConfig = void 0;\nconst errors_1 = require(\"./errors\");\n/**\n * @internal\n */\nconst resolveConfig = (amplify) => {\n const { apiKey, customEndpoint, customEndpointRegion, defaultAuthMode, endpoint, region, } = amplify.getConfig().API?.GraphQL ?? {};\n // TODO: re-enable when working in all test environments:\n // assertValidationError(!!endpoint, APIValidationErrorCode.NoEndpoint);\n (0, errors_1.assertValidationError)(!(!customEndpoint && customEndpointRegion), errors_1.APIValidationErrorCode.NoCustomEndpoint);\n return {\n apiKey,\n customEndpoint,\n customEndpointRegion,\n defaultAuthMode,\n endpoint,\n region,\n };\n};\nexports.resolveConfig = resolveConfig;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACrC;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,OAAO,KAAK;AACnC,IAAI,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,oBAAoB,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,GAAG,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,OAAO,IAAI,EAAE,CAAC;AACxI;AACA;AACA,IAAI,IAAI,QAAQ,CAAC,qBAAqB,EAAE,EAAE,CAAC,cAAc,IAAI,oBAAoB,CAAC,EAAE,QAAQ,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;AACtI,IAAI,OAAO;AACX,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,oBAAoB;AAC5B,QAAQ,eAAe;AACvB,QAAQ,QAAQ;AAChB,QAAQ,MAAM;AACd,KAAK,CAAC;AACN,CAAC,CAAC;AACF,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
1
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.resolveLibraryOptions = void 0;
|
|
3
7
|
/**
|
|
4
8
|
* @internal
|
|
5
9
|
*/
|
|
6
|
-
|
|
10
|
+
const resolveLibraryOptions = (amplify) => {
|
|
7
11
|
const headers = amplify.libraryOptions?.API?.GraphQL?.headers;
|
|
8
12
|
const withCredentials = amplify.libraryOptions?.API?.GraphQL?.withCredentials;
|
|
9
13
|
return { headers, withCredentials };
|
|
10
14
|
};
|
|
15
|
+
exports.resolveLibraryOptions = resolveLibraryOptions;
|
|
16
|
+
//# sourceMappingURL=resolveLibraryOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveLibraryOptions.js","sources":["../../../src/utils/resolveLibraryOptions.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveLibraryOptions = void 0;\n/**\n * @internal\n */\nconst resolveLibraryOptions = (amplify) => {\n const headers = amplify.libraryOptions?.API?.GraphQL?.headers;\n const withCredentials = amplify.libraryOptions?.API?.GraphQL?.withCredentials;\n return { headers, withCredentials };\n};\nexports.resolveLibraryOptions = resolveLibraryOptions;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,qBAAqB,GAAG,KAAK,CAAC,CAAC;AACvC;AACA;AACA;AACA,MAAM,qBAAqB,GAAG,CAAC,OAAO,KAAK;AAC3C,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,cAAc,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC;AAClE,IAAI,MAAM,eAAe,GAAG,OAAO,CAAC,cAAc,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,CAAC;AAClF,IAAI,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;AACxC,CAAC,CAAC;AACF,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AmplifyClassV6 } from '@aws-amplify/core';
|
|
2
2
|
import { GraphQLOptions, GraphQLResult } from './types';
|
|
3
|
-
import { InternalGraphQLAPIClass } from './internals';
|
|
3
|
+
import { InternalGraphQLAPIClass } from './internals/InternalGraphQLAPI';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
export declare const graphqlOperation: (query: any, variables?: {}, authToken?: string
|
|
5
|
+
export declare const graphqlOperation: (query: any, variables?: {}, authToken?: string) => {
|
|
6
6
|
query: any;
|
|
7
7
|
variables: {};
|
|
8
8
|
authToken: string | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Category, ApiAction } from '@aws-amplify/core/internals/utils';
|
|
2
|
-
import { InternalGraphQLAPIClass } from './internals';
|
|
3
|
-
|
|
2
|
+
import { InternalGraphQLAPIClass } from './internals/InternalGraphQLAPI.mjs';
|
|
3
|
+
|
|
4
|
+
const graphqlOperation = (query, variables = {}, authToken) => ({
|
|
4
5
|
query,
|
|
5
6
|
variables,
|
|
6
7
|
authToken,
|
|
@@ -8,7 +9,7 @@ export const graphqlOperation = (query, variables = {}, authToken) => ({
|
|
|
8
9
|
/**
|
|
9
10
|
* Export Cloud Logic APIs
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
+
class GraphQLAPIClass extends InternalGraphQLAPIClass {
|
|
12
13
|
getModuleName() {
|
|
13
14
|
return 'GraphQLAPI';
|
|
14
15
|
}
|
|
@@ -42,4 +43,7 @@ export class GraphQLAPIClass extends InternalGraphQLAPIClass {
|
|
|
42
43
|
return super.cancel(request, message);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
+
const GraphQLAPI = new GraphQLAPIClass(null);
|
|
47
|
+
|
|
48
|
+
export { GraphQLAPI, GraphQLAPIClass, graphqlOperation };
|
|
49
|
+
//# sourceMappingURL=GraphQLAPI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphQLAPI.mjs","sources":["../../src/GraphQLAPI.ts"],"sourcesContent":["import { Category, ApiAction } from '@aws-amplify/core/internals/utils';\nimport { InternalGraphQLAPIClass } from './internals/InternalGraphQLAPI';\nexport const graphqlOperation = (query, variables = {}, authToken) => ({\n query,\n variables,\n authToken,\n});\n/**\n * Export Cloud Logic APIs\n */\nexport class GraphQLAPIClass extends InternalGraphQLAPIClass {\n getModuleName() {\n return 'GraphQLAPI';\n }\n /**\n * Executes a GraphQL operation\n *\n * @param options - GraphQL Options\n * @param [additionalHeaders] - headers to merge in after any `graphql_headers` set in the config\n * @returns An Observable if the query is a subscription query, else a promise of the graphql result.\n */\n graphql(amplify, options, additionalHeaders) {\n return super.graphql(amplify, options, additionalHeaders, {\n category: Category.API,\n action: ApiAction.GraphQl,\n });\n }\n /**\n * Checks to see if an error thrown is from an api request cancellation\n * @param error - Any error\n * @returns A boolean indicating if the error was from an api request cancellation\n */\n isCancelError(error) {\n return super.isCancelError(error);\n }\n /**\n * Cancels an inflight request. Only applicable for graphql queries and mutations\n * @param {any} request - request to cancel\n * @returns A boolean indicating if the request was cancelled\n */\n cancel(request, message) {\n return super.cancel(request, message);\n }\n}\nexport const GraphQLAPI = new GraphQLAPIClass(null);\n"],"names":[],"mappings":";;;AAEY,MAAC,gBAAgB,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,SAAS,MAAM;AACvE,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,SAAS;AACb,CAAC,EAAE;AACH;AACA;AACA;AACO,MAAM,eAAe,SAAS,uBAAuB,CAAC;AAC7D,IAAI,aAAa,GAAG;AACpB,QAAQ,OAAO,YAAY,CAAC;AAC5B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE;AACjD,QAAQ,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE;AAClE,YAAY,QAAQ,EAAE,QAAQ,CAAC,GAAG;AAClC,YAAY,MAAM,EAAE,SAAS,CAAC,OAAO;AACrC,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,CAAC,KAAK,EAAE;AACzB,QAAQ,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC1C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE;AAC7B,QAAQ,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC9C,KAAK;AACL,CAAC;AACW,MAAC,UAAU,GAAG,IAAI,eAAe,CAAC,IAAI;;;;"}
|
|
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { GraphQLAuthMode, CustomUserAgentDetails, DocumentType } from '@aws-amplify/core/internals/utils';
|
|
3
3
|
import { PubSubContentObserver } from '../../types/PubSub';
|
|
4
4
|
import { SUBSCRIPTION_STATUS } from '../constants';
|
|
5
|
-
export
|
|
5
|
+
export type ObserverQuery = {
|
|
6
6
|
observer: PubSubContentObserver;
|
|
7
7
|
query: string;
|
|
8
8
|
variables: Record<string, DocumentType>;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
1
|
import { Observable } from 'rxjs';
|
|
4
2
|
import { GraphQLError } from 'graphql';
|
|
5
|
-
import {
|
|
3
|
+
import { ConsoleLogger, fetchAuthSession, Hub } from '@aws-amplify/core';
|
|
6
4
|
import { signRequest } from '@aws-amplify/core/internals/aws-client-utils';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { ConnectionStateMonitor, CONNECTION_CHANGE
|
|
11
|
-
import {
|
|
5
|
+
import { amplifyUuid, USER_AGENT_HEADER, getAmplifyUserAgent, isNonRetryableError, base64Encoder, jitteredExponentialRetry, NonRetryableError, AmplifyUrl, AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';
|
|
6
|
+
import { ConnectionState, CONTROL_MSG } from '../../types/PubSub.mjs';
|
|
7
|
+
import { SOCKET_STATUS, DEFAULT_KEEP_ALIVE_TIMEOUT, SUBSCRIPTION_STATUS, MESSAGE_TYPES, START_ACK_TIMEOUT, DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT, MAX_DELAY_MS, CONNECTION_INIT_TIMEOUT, NON_RETRYABLE_CODES, AWS_APPSYNC_REALTIME_HEADERS, CONNECTION_STATE_CHANGE } from '../constants.mjs';
|
|
8
|
+
import { ConnectionStateMonitor, CONNECTION_CHANGE } from '../../utils/ConnectionStateMonitor.mjs';
|
|
9
|
+
import { ReconnectionMonitor, ReconnectEvent } from '../../utils/ReconnectionMonitor.mjs';
|
|
10
|
+
|
|
11
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
12
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
12
13
|
const logger = new ConsoleLogger('AWSAppSyncRealTimeProvider');
|
|
13
14
|
const dispatchApiEvent = payload => {
|
|
14
15
|
Hub.dispatch('api', payload, 'PubSub', AMPLIFY_SYMBOL);
|
|
15
16
|
};
|
|
16
17
|
const standardDomainPattern = /^https:\/\/\w{26}\.appsync\-api\.\w{2}(?:(?:\-\w{2,})+)\-\d\.amazonaws.com(?:\.cn)?\/graphql$/i;
|
|
17
18
|
const customDomainPath = '/realtime';
|
|
18
|
-
|
|
19
|
+
class AWSAppSyncRealTimeProvider {
|
|
19
20
|
constructor(options = {}) {
|
|
20
21
|
this.socketStatus = SOCKET_STATUS.CLOSED;
|
|
21
22
|
this.keepAliveTimeout = DEFAULT_KEEP_ALIVE_TIMEOUT;
|
|
@@ -685,3 +686,6 @@ export class AWSAppSyncRealTimeProvider {
|
|
|
685
686
|
};
|
|
686
687
|
}
|
|
687
688
|
}
|
|
689
|
+
|
|
690
|
+
export { AWSAppSyncRealTimeProvider };
|
|
691
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../src/Providers/AWSAppSyncRealTimeProvider/index.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Observable } from 'rxjs';\nimport { GraphQLError } from 'graphql';\nimport { Hub, fetchAuthSession, ConsoleLogger } from '@aws-amplify/core';\nimport { signRequest } from '@aws-amplify/core/internals/aws-client-utils';\nimport { base64Encoder, NonRetryableError, USER_AGENT_HEADER, getAmplifyUserAgent, isNonRetryableError, jitteredExponentialRetry, amplifyUuid, AmplifyUrl, } from '@aws-amplify/core/internals/utils';\nimport { CONTROL_MSG, ConnectionState, } from '../../types/PubSub';\nimport { AMPLIFY_SYMBOL, AWS_APPSYNC_REALTIME_HEADERS, CONNECTION_INIT_TIMEOUT, DEFAULT_KEEP_ALIVE_TIMEOUT, DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT, MAX_DELAY_MS, MESSAGE_TYPES, NON_RETRYABLE_CODES, SOCKET_STATUS, START_ACK_TIMEOUT, SUBSCRIPTION_STATUS, CONNECTION_STATE_CHANGE, } from '../constants';\nimport { ConnectionStateMonitor, CONNECTION_CHANGE, } from '../../utils/ConnectionStateMonitor';\nimport { ReconnectEvent, ReconnectionMonitor, } from '../../utils/ReconnectionMonitor';\nconst logger = new ConsoleLogger('AWSAppSyncRealTimeProvider');\nconst dispatchApiEvent = payload => {\n Hub.dispatch('api', payload, 'PubSub', AMPLIFY_SYMBOL);\n};\nconst standardDomainPattern = /^https:\\/\\/\\w{26}\\.appsync\\-api\\.\\w{2}(?:(?:\\-\\w{2,})+)\\-\\d\\.amazonaws.com(?:\\.cn)?\\/graphql$/i;\nconst customDomainPath = '/realtime';\nexport class AWSAppSyncRealTimeProvider {\n constructor(options = {}) {\n this.socketStatus = SOCKET_STATUS.CLOSED;\n this.keepAliveTimeout = DEFAULT_KEEP_ALIVE_TIMEOUT;\n this.subscriptionObserverMap = new Map();\n this.promiseArray = [];\n this.connectionStateMonitor = new ConnectionStateMonitor();\n this.reconnectionMonitor = new ReconnectionMonitor();\n // Monitor the connection state and pass changes along to Hub\n this.connectionStateMonitorSubscription =\n this.connectionStateMonitor.connectionStateObservable.subscribe(connectionState => {\n dispatchApiEvent({\n event: CONNECTION_STATE_CHANGE,\n data: {\n provider: this,\n connectionState,\n },\n message: `Connection state is ${connectionState}`,\n });\n this.connectionState = connectionState;\n // Trigger START_RECONNECT when the connection is disrupted\n if (connectionState === ConnectionState.ConnectionDisrupted) {\n this.reconnectionMonitor.record(ReconnectEvent.START_RECONNECT);\n }\n // Trigger HALT_RECONNECT to halt reconnection attempts when the state is anything other than\n // ConnectionDisrupted or Connecting\n if ([\n ConnectionState.Connected,\n ConnectionState.ConnectedPendingDisconnect,\n ConnectionState.ConnectedPendingKeepAlive,\n ConnectionState.ConnectedPendingNetwork,\n ConnectionState.ConnectionDisruptedPendingNetwork,\n ConnectionState.Disconnected,\n ].includes(connectionState)) {\n this.reconnectionMonitor.record(ReconnectEvent.HALT_RECONNECT);\n }\n });\n }\n /**\n * Mark the socket closed and release all active listeners\n */\n close() {\n // Mark the socket closed both in status and the connection monitor\n this.socketStatus = SOCKET_STATUS.CLOSED;\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CONNECTION_FAILED);\n // Turn off the subscription monitor Hub publishing\n this.connectionStateMonitorSubscription.unsubscribe();\n // Complete all reconnect observers\n this.reconnectionMonitor.close();\n }\n getNewWebSocket(url, protocol) {\n return new WebSocket(url, protocol);\n }\n getProviderName() {\n return 'AWSAppSyncRealTimeProvider';\n }\n // Check if url matches standard domain pattern\n isCustomDomain(url) {\n return url.match(standardDomainPattern) === null;\n }\n subscribe(options, customUserAgentDetails) {\n const { appSyncGraphqlEndpoint, region, query, variables, authenticationType, additionalHeaders, apiKey, } = options || {};\n return new Observable(observer => {\n if (!options || !appSyncGraphqlEndpoint) {\n observer.error({\n errors: [\n {\n ...new GraphQLError(`Subscribe only available for AWS AppSync endpoint`),\n },\n ],\n });\n observer.complete();\n }\n else {\n let subscriptionStartActive = false;\n const subscriptionId = amplifyUuid();\n const startSubscription = () => {\n if (!subscriptionStartActive) {\n subscriptionStartActive = true;\n const startSubscriptionPromise = this._startSubscriptionWithAWSAppSyncRealTime({\n options: {\n query,\n variables,\n region,\n authenticationType,\n appSyncGraphqlEndpoint,\n additionalHeaders,\n apiKey,\n },\n observer,\n subscriptionId,\n customUserAgentDetails,\n }).catch(err => {\n logger.debug(`${CONTROL_MSG.REALTIME_SUBSCRIPTION_INIT_ERROR}: ${err}`);\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSED);\n });\n startSubscriptionPromise.finally(() => {\n subscriptionStartActive = false;\n });\n }\n };\n let reconnectSubscription;\n // Add an observable to the reconnection list to manage reconnection for this subscription\n reconnectSubscription = new Observable(observer => {\n this.reconnectionMonitor.addObserver(observer);\n }).subscribe(() => {\n startSubscription();\n });\n startSubscription();\n return async () => {\n // Cleanup reconnection subscription\n reconnectSubscription?.unsubscribe();\n // Cleanup after unsubscribing or observer.complete was called after _startSubscriptionWithAWSAppSyncRealTime\n try {\n // Waiting that subscription has been connected before trying to unsubscribe\n await this._waitForSubscriptionToBeConnected(subscriptionId);\n const { subscriptionState } = this.subscriptionObserverMap.get(subscriptionId) || {};\n if (!subscriptionState) {\n // subscription already unsubscribed\n return;\n }\n if (subscriptionState === SUBSCRIPTION_STATUS.CONNECTED) {\n this._sendUnsubscriptionMessage(subscriptionId);\n }\n else {\n throw new Error('Subscription never connected');\n }\n }\n catch (err) {\n logger.debug(`Error while unsubscribing ${err}`);\n }\n finally {\n this._removeSubscriptionObserver(subscriptionId);\n }\n };\n }\n });\n }\n async _startSubscriptionWithAWSAppSyncRealTime({ options, observer, subscriptionId, customUserAgentDetails, }) {\n const { appSyncGraphqlEndpoint, authenticationType, query, variables, apiKey, region, graphql_headers = () => ({}), additionalHeaders = {}, } = options;\n const subscriptionState = SUBSCRIPTION_STATUS.PENDING;\n const data = {\n query,\n variables,\n };\n // Having a subscription id map will make it simple to forward messages received\n this.subscriptionObserverMap.set(subscriptionId, {\n observer,\n query: query ?? '',\n variables: variables ?? {},\n subscriptionState,\n startAckTimeoutId: undefined,\n });\n // Preparing payload for subscription message\n const dataString = JSON.stringify(data);\n const headerObj = {\n ...(await this._awsRealTimeHeaderBasedAuth({\n apiKey,\n appSyncGraphqlEndpoint,\n authenticationType,\n payload: dataString,\n canonicalUri: '',\n region,\n additionalHeaders,\n })),\n ...(await graphql_headers()),\n ...additionalHeaders,\n [USER_AGENT_HEADER]: getAmplifyUserAgent(customUserAgentDetails),\n };\n const subscriptionMessage = {\n id: subscriptionId,\n payload: {\n data: dataString,\n extensions: {\n authorization: {\n ...headerObj,\n },\n },\n },\n type: MESSAGE_TYPES.GQL_START,\n };\n const stringToAWSRealTime = JSON.stringify(subscriptionMessage);\n try {\n this.connectionStateMonitor.record(CONNECTION_CHANGE.OPENING_CONNECTION);\n await this._initializeWebSocketConnection({\n apiKey,\n appSyncGraphqlEndpoint,\n authenticationType,\n region,\n additionalHeaders,\n });\n }\n catch (err) {\n this._logStartSubscriptionError(subscriptionId, observer, err);\n return;\n }\n // Potential race condition can occur when unsubscribe is called during _initializeWebSocketConnection.\n // E.g.unsubscribe gets invoked prior to finishing WebSocket handshake or START_ACK.\n // Both subscriptionFailedCallback and subscriptionReadyCallback are used to synchronized this.\n const { subscriptionFailedCallback, subscriptionReadyCallback } = this.subscriptionObserverMap.get(subscriptionId) ?? {};\n // This must be done before sending the message in order to be listening immediately\n this.subscriptionObserverMap.set(subscriptionId, {\n observer,\n subscriptionState,\n query: query ?? '',\n variables: variables ?? {},\n subscriptionReadyCallback,\n subscriptionFailedCallback,\n startAckTimeoutId: setTimeout(() => {\n this._timeoutStartSubscriptionAck.call(this, subscriptionId);\n }, START_ACK_TIMEOUT),\n });\n if (this.awsRealTimeSocket) {\n this.awsRealTimeSocket.send(stringToAWSRealTime);\n }\n }\n // Log logic for start subscription failures\n _logStartSubscriptionError(subscriptionId, observer, err) {\n logger.debug({ err });\n const message = String(err.message ?? '');\n // Resolving to give the state observer time to propogate the update\n Promise.resolve(this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSED));\n // Capture the error only when the network didn't cause disruption\n if (this.connectionState !== ConnectionState.ConnectionDisruptedPendingNetwork) {\n // When the error is non-retriable, error out the observable\n if (isNonRetryableError(err)) {\n observer.error({\n errors: [\n {\n ...new GraphQLError(`${CONTROL_MSG.CONNECTION_FAILED}: ${message}`),\n },\n ],\n });\n }\n else {\n logger.debug(`${CONTROL_MSG.CONNECTION_FAILED}: ${message}`);\n }\n const { subscriptionFailedCallback } = this.subscriptionObserverMap.get(subscriptionId) || {};\n // Notify concurrent unsubscription\n if (typeof subscriptionFailedCallback === 'function') {\n subscriptionFailedCallback();\n }\n }\n }\n // Waiting that subscription has been connected before trying to unsubscribe\n async _waitForSubscriptionToBeConnected(subscriptionId) {\n const subscriptionObserver = this.subscriptionObserverMap.get(subscriptionId);\n if (subscriptionObserver) {\n const { subscriptionState } = subscriptionObserver;\n // This in case unsubscribe is invoked before sending start subscription message\n if (subscriptionState === SUBSCRIPTION_STATUS.PENDING) {\n return new Promise((res, rej) => {\n const { observer, subscriptionState, variables, query } = subscriptionObserver;\n this.subscriptionObserverMap.set(subscriptionId, {\n observer,\n subscriptionState,\n variables,\n query,\n subscriptionReadyCallback: res,\n subscriptionFailedCallback: rej,\n });\n });\n }\n }\n }\n _sendUnsubscriptionMessage(subscriptionId) {\n try {\n if (this.awsRealTimeSocket &&\n this.awsRealTimeSocket.readyState === WebSocket.OPEN &&\n this.socketStatus === SOCKET_STATUS.READY) {\n // Preparing unsubscribe message to stop receiving messages for that subscription\n const unsubscribeMessage = {\n id: subscriptionId,\n type: MESSAGE_TYPES.GQL_STOP,\n };\n const stringToAWSRealTime = JSON.stringify(unsubscribeMessage);\n this.awsRealTimeSocket.send(stringToAWSRealTime);\n }\n }\n catch (err) {\n // If GQL_STOP is not sent because of disconnection issue, then there is nothing the client can do\n logger.debug({ err });\n }\n }\n _removeSubscriptionObserver(subscriptionId) {\n this.subscriptionObserverMap.delete(subscriptionId);\n // Verifying 1000ms after removing subscription in case there are new subscription unmount/mount\n setTimeout(this._closeSocketIfRequired.bind(this), 1000);\n }\n _closeSocketIfRequired() {\n if (this.subscriptionObserverMap.size > 0) {\n // Active subscriptions on the WebSocket\n return;\n }\n if (!this.awsRealTimeSocket) {\n this.socketStatus = SOCKET_STATUS.CLOSED;\n return;\n }\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSING_CONNECTION);\n if (this.awsRealTimeSocket.bufferedAmount > 0) {\n // Still data on the WebSocket\n setTimeout(this._closeSocketIfRequired.bind(this), 1000);\n }\n else {\n logger.debug('closing WebSocket...');\n if (this.keepAliveTimeoutId) {\n clearTimeout(this.keepAliveTimeoutId);\n }\n if (this.keepAliveAlertTimeoutId) {\n clearTimeout(this.keepAliveAlertTimeoutId);\n }\n const tempSocket = this.awsRealTimeSocket;\n // Cleaning callbacks to avoid race condition, socket still exists\n tempSocket.onclose = null;\n tempSocket.onerror = null;\n tempSocket.close(1000);\n this.awsRealTimeSocket = undefined;\n this.socketStatus = SOCKET_STATUS.CLOSED;\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSED);\n }\n }\n _handleIncomingSubscriptionMessage(message) {\n if (typeof message.data !== 'string') {\n return;\n }\n logger.debug(`subscription message from AWS AppSync RealTime: ${message.data}`);\n const { id = '', payload, type, } = JSON.parse(String(message.data));\n const { observer = null, query = '', variables = {}, startAckTimeoutId, subscriptionReadyCallback, subscriptionFailedCallback, } = this.subscriptionObserverMap.get(id) || {};\n logger.debug({ id, observer, query, variables });\n if (type === MESSAGE_TYPES.GQL_DATA && payload && payload.data) {\n if (observer) {\n observer.next(payload);\n }\n else {\n logger.debug(`observer not found for id: ${id}`);\n }\n return;\n }\n if (type === MESSAGE_TYPES.GQL_START_ACK) {\n logger.debug(`subscription ready for ${JSON.stringify({ query, variables })}`);\n if (typeof subscriptionReadyCallback === 'function') {\n subscriptionReadyCallback();\n }\n if (startAckTimeoutId)\n clearTimeout(startAckTimeoutId);\n dispatchApiEvent({\n event: CONTROL_MSG.SUBSCRIPTION_ACK,\n data: { query, variables },\n message: 'Connection established for subscription',\n });\n const subscriptionState = SUBSCRIPTION_STATUS.CONNECTED;\n if (observer) {\n this.subscriptionObserverMap.set(id, {\n observer,\n query,\n variables,\n startAckTimeoutId: undefined,\n subscriptionState,\n subscriptionReadyCallback,\n subscriptionFailedCallback,\n });\n }\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CONNECTION_ESTABLISHED);\n return;\n }\n if (type === MESSAGE_TYPES.GQL_CONNECTION_KEEP_ALIVE) {\n if (this.keepAliveTimeoutId)\n clearTimeout(this.keepAliveTimeoutId);\n if (this.keepAliveAlertTimeoutId)\n clearTimeout(this.keepAliveAlertTimeoutId);\n this.keepAliveTimeoutId = setTimeout(() => this._errorDisconnect(CONTROL_MSG.TIMEOUT_DISCONNECT), this.keepAliveTimeout);\n this.keepAliveAlertTimeoutId = setTimeout(() => {\n this.connectionStateMonitor.record(CONNECTION_CHANGE.KEEP_ALIVE_MISSED);\n }, DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT);\n this.connectionStateMonitor.record(CONNECTION_CHANGE.KEEP_ALIVE);\n return;\n }\n if (type === MESSAGE_TYPES.GQL_ERROR) {\n const subscriptionState = SUBSCRIPTION_STATUS.FAILED;\n if (observer) {\n this.subscriptionObserverMap.set(id, {\n observer,\n query,\n variables,\n startAckTimeoutId,\n subscriptionReadyCallback,\n subscriptionFailedCallback,\n subscriptionState,\n });\n logger.debug(`${CONTROL_MSG.CONNECTION_FAILED}: ${JSON.stringify(payload)}`);\n observer.error({\n errors: [\n {\n ...new GraphQLError(`${CONTROL_MSG.CONNECTION_FAILED}: ${JSON.stringify(payload)}`),\n },\n ],\n });\n if (startAckTimeoutId)\n clearTimeout(startAckTimeoutId);\n if (typeof subscriptionFailedCallback === 'function') {\n subscriptionFailedCallback();\n }\n }\n }\n }\n _errorDisconnect(msg) {\n logger.debug(`Disconnect error: ${msg}`);\n if (this.awsRealTimeSocket) {\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSED);\n this.awsRealTimeSocket.close();\n }\n this.socketStatus = SOCKET_STATUS.CLOSED;\n }\n _timeoutStartSubscriptionAck(subscriptionId) {\n const subscriptionObserver = this.subscriptionObserverMap.get(subscriptionId);\n if (subscriptionObserver) {\n const { observer, query, variables } = subscriptionObserver;\n if (!observer) {\n return;\n }\n this.subscriptionObserverMap.set(subscriptionId, {\n observer,\n query,\n variables,\n subscriptionState: SUBSCRIPTION_STATUS.FAILED,\n });\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSED);\n logger.debug('timeoutStartSubscription', JSON.stringify({ query, variables }));\n }\n }\n _initializeWebSocketConnection({ appSyncGraphqlEndpoint, authenticationType, apiKey, region, additionalHeaders, }) {\n if (this.socketStatus === SOCKET_STATUS.READY) {\n return;\n }\n return new Promise(async (res, rej) => {\n this.promiseArray.push({ res, rej });\n if (this.socketStatus === SOCKET_STATUS.CLOSED) {\n try {\n this.socketStatus = SOCKET_STATUS.CONNECTING;\n const payloadString = '{}';\n const authHeader = await this._awsRealTimeHeaderBasedAuth({\n authenticationType,\n payload: payloadString,\n canonicalUri: '/connect',\n apiKey,\n appSyncGraphqlEndpoint,\n region,\n additionalHeaders,\n });\n const headerString = authHeader ? JSON.stringify(authHeader) : '';\n const headerQs = base64Encoder.convert(headerString);\n const payloadQs = base64Encoder.convert(payloadString);\n let discoverableEndpoint = appSyncGraphqlEndpoint ?? '';\n if (this.isCustomDomain(discoverableEndpoint)) {\n discoverableEndpoint =\n discoverableEndpoint.concat(customDomainPath);\n }\n else {\n discoverableEndpoint = discoverableEndpoint\n .replace('appsync-api', 'appsync-realtime-api')\n .replace('gogi-beta', 'grt-beta');\n }\n // Creating websocket url with required query strings\n const protocol = 'wss://';\n discoverableEndpoint = discoverableEndpoint\n .replace('https://', protocol)\n .replace('http://', protocol);\n const awsRealTimeUrl = `${discoverableEndpoint}?header=${headerQs}&payload=${payloadQs}`;\n await this._initializeRetryableHandshake(awsRealTimeUrl);\n this.promiseArray.forEach(({ res }) => {\n logger.debug('Notifying connection successful');\n res();\n });\n this.socketStatus = SOCKET_STATUS.READY;\n this.promiseArray = [];\n }\n catch (err) {\n logger.debug('Connection exited with', err);\n this.promiseArray.forEach(({ rej }) => rej(err));\n this.promiseArray = [];\n if (this.awsRealTimeSocket &&\n this.awsRealTimeSocket.readyState === WebSocket.OPEN) {\n this.awsRealTimeSocket.close(3001);\n }\n this.awsRealTimeSocket = undefined;\n this.socketStatus = SOCKET_STATUS.CLOSED;\n }\n }\n });\n }\n async _initializeRetryableHandshake(awsRealTimeUrl) {\n logger.debug(`Initializaling retryable Handshake`);\n await jitteredExponentialRetry(this._initializeHandshake.bind(this), [awsRealTimeUrl], MAX_DELAY_MS);\n }\n async _initializeHandshake(awsRealTimeUrl) {\n logger.debug(`Initializing handshake ${awsRealTimeUrl}`);\n // Because connecting the socket is async, is waiting until connection is open\n // Step 1: connect websocket\n try {\n await (() => {\n return new Promise((res, rej) => {\n const newSocket = this.getNewWebSocket(awsRealTimeUrl, 'graphql-ws');\n newSocket.onerror = () => {\n logger.debug(`WebSocket connection error`);\n };\n newSocket.onclose = () => {\n rej(new Error('Connection handshake error'));\n };\n newSocket.onopen = () => {\n this.awsRealTimeSocket = newSocket;\n return res();\n };\n });\n })();\n // Step 2: wait for ack from AWS AppSyncReaTime after sending init\n await (() => {\n return new Promise((res, rej) => {\n if (this.awsRealTimeSocket) {\n let ackOk = false;\n this.awsRealTimeSocket.onerror = error => {\n logger.debug(`WebSocket error ${JSON.stringify(error)}`);\n };\n this.awsRealTimeSocket.onclose = event => {\n logger.debug(`WebSocket closed ${event.reason}`);\n rej(new Error(JSON.stringify(event)));\n };\n this.awsRealTimeSocket.onmessage = (message) => {\n if (typeof message.data !== 'string') {\n return;\n }\n logger.debug(`subscription message from AWS AppSyncRealTime: ${message.data} `);\n const data = JSON.parse(message.data);\n const { type, payload: { connectionTimeoutMs = DEFAULT_KEEP_ALIVE_TIMEOUT, } = {}, } = data;\n if (type === MESSAGE_TYPES.GQL_CONNECTION_ACK) {\n ackOk = true;\n if (this.awsRealTimeSocket) {\n this.keepAliveTimeout = connectionTimeoutMs;\n this.awsRealTimeSocket.onmessage =\n this._handleIncomingSubscriptionMessage.bind(this);\n this.awsRealTimeSocket.onerror = err => {\n logger.debug(err);\n this._errorDisconnect(CONTROL_MSG.CONNECTION_CLOSED);\n };\n this.awsRealTimeSocket.onclose = event => {\n logger.debug(`WebSocket closed ${event.reason}`);\n this._errorDisconnect(CONTROL_MSG.CONNECTION_CLOSED);\n };\n }\n res('Cool, connected to AWS AppSyncRealTime');\n return;\n }\n if (type === MESSAGE_TYPES.GQL_CONNECTION_ERROR) {\n const { payload: { errors: [{ errorType = '', errorCode = 0 } = {}] = [], } = {}, } = data;\n rej({ errorType, errorCode });\n }\n };\n const gqlInit = {\n type: MESSAGE_TYPES.GQL_CONNECTION_INIT,\n };\n this.awsRealTimeSocket.send(JSON.stringify(gqlInit));\n const checkAckOk = (ackOk) => {\n if (!ackOk) {\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CONNECTION_FAILED);\n rej(new Error(`Connection timeout: ack from AWSAppSyncRealTime was not received after ${CONNECTION_INIT_TIMEOUT} ms`));\n }\n };\n setTimeout(() => checkAckOk(ackOk), CONNECTION_INIT_TIMEOUT);\n }\n });\n })();\n }\n catch (err) {\n const { errorType, errorCode } = err;\n if (NON_RETRYABLE_CODES.includes(errorCode)) {\n throw new NonRetryableError(errorType);\n }\n else if (errorType) {\n throw new Error(errorType);\n }\n else {\n throw err;\n }\n }\n }\n async _awsRealTimeHeaderBasedAuth({ apiKey, authenticationType, payload, canonicalUri, appSyncGraphqlEndpoint, region, additionalHeaders, }) {\n const headerHandler = {\n apiKey: this._awsRealTimeApiKeyHeader.bind(this),\n iam: this._awsRealTimeIAMHeader.bind(this),\n oidc: this._awsAuthTokenHeader.bind(this),\n userPool: this._awsAuthTokenHeader.bind(this),\n lambda: this._customAuthHeader,\n none: this._customAuthHeader,\n };\n if (!authenticationType || !headerHandler[authenticationType]) {\n logger.debug(`Authentication type ${authenticationType} not supported`);\n return undefined;\n }\n else {\n const handler = headerHandler[authenticationType];\n const host = appSyncGraphqlEndpoint\n ? new AmplifyUrl(appSyncGraphqlEndpoint).host\n : undefined;\n logger.debug(`Authenticating with ${JSON.stringify(authenticationType)}`);\n let resolvedApiKey;\n if (authenticationType === 'apiKey') {\n resolvedApiKey = apiKey;\n }\n const result = await handler({\n payload,\n canonicalUri,\n appSyncGraphqlEndpoint,\n apiKey: resolvedApiKey,\n region,\n host,\n additionalHeaders,\n });\n return result;\n }\n }\n async _awsAuthTokenHeader({ host }) {\n const session = await fetchAuthSession();\n return {\n Authorization: session?.tokens?.accessToken?.toString(),\n host,\n };\n }\n async _awsRealTimeApiKeyHeader({ apiKey, host, }) {\n const dt = new Date();\n const dtStr = dt.toISOString().replace(/[:\\-]|\\.\\d{3}/g, '');\n return {\n host,\n 'x-amz-date': dtStr,\n 'x-api-key': apiKey,\n };\n }\n async _awsRealTimeIAMHeader({ payload, canonicalUri, appSyncGraphqlEndpoint, region, }) {\n const endpointInfo = {\n region,\n service: 'appsync',\n };\n const creds = (await fetchAuthSession()).credentials;\n const request = {\n url: `${appSyncGraphqlEndpoint}${canonicalUri}`,\n data: payload,\n method: 'POST',\n headers: { ...AWS_APPSYNC_REALTIME_HEADERS },\n };\n const signed_params = signRequest({\n headers: request.headers,\n method: request.method,\n url: new AmplifyUrl(request.url),\n body: request.data,\n }, {\n // TODO: What do we need to do to remove these !'s?\n credentials: creds,\n signingRegion: endpointInfo.region,\n signingService: endpointInfo.service,\n });\n return signed_params.headers;\n }\n _customAuthHeader({ host, additionalHeaders, }) {\n if (!additionalHeaders?.['Authorization']) {\n throw new Error('No auth token specified');\n }\n return {\n Authorization: additionalHeaders.Authorization,\n host,\n };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AAUA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,4BAA4B,CAAC,CAAC;AAC/D,MAAM,gBAAgB,GAAG,OAAO,IAAI;AACpC,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;AAC3D,CAAC,CAAC;AACF,MAAM,qBAAqB,GAAG,gGAAgG,CAAC;AAC/H,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAC9B,MAAM,0BAA0B,CAAC;AACxC,IAAI,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;AAC9B,QAAQ,IAAI,CAAC,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC;AACjD,QAAQ,IAAI,CAAC,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,QAAQ,IAAI,CAAC,uBAAuB,GAAG,IAAI,GAAG,EAAE,CAAC;AACjD,QAAQ,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;AAC/B,QAAQ,IAAI,CAAC,sBAAsB,GAAG,IAAI,sBAAsB,EAAE,CAAC;AACnE,QAAQ,IAAI,CAAC,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC;AAC7D;AACA,QAAQ,IAAI,CAAC,kCAAkC;AAC/C,YAAY,IAAI,CAAC,sBAAsB,CAAC,yBAAyB,CAAC,SAAS,CAAC,eAAe,IAAI;AAC/F,gBAAgB,gBAAgB,CAAC;AACjC,oBAAoB,KAAK,EAAE,uBAAuB;AAClD,oBAAoB,IAAI,EAAE;AAC1B,wBAAwB,QAAQ,EAAE,IAAI;AACtC,wBAAwB,eAAe;AACvC,qBAAqB;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