@aws-amplify/pubsub 4.5.4 → 4.5.5
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 +11 -0
- package/dist/aws-amplify-pubsub.js +69 -36
- 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.map +1 -1
- package/lib/Providers/PubSubProvider.d.ts +1 -1
- package/lib/index.d.ts +2 -9
- package/lib/index.js +1 -9
- 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.map +1 -1
- package/lib-esm/Providers/PubSubProvider.d.ts +1 -1
- package/lib-esm/index.d.ts +2 -9
- package/lib-esm/index.js +2 -10
- 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 +2 -1
- package/src/Providers/PubSubProvider.ts +1 -1
- package/src/index.ts +2 -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/src/types/index.ts
CHANGED
|
@@ -12,46 +12,3 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export * from './Provider';
|
|
14
14
|
export * from './PubSub';
|
|
15
|
-
|
|
16
|
-
export interface SubscriptionObserver<T> {
|
|
17
|
-
closed: boolean;
|
|
18
|
-
next(value: T): void;
|
|
19
|
-
error(errorValue: any): void;
|
|
20
|
-
complete(): void;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/** @enum {string} */
|
|
24
|
-
export enum ConnectionState {
|
|
25
|
-
/*
|
|
26
|
-
* The connection is alive and healthy
|
|
27
|
-
*/
|
|
28
|
-
Connected = 'Connected',
|
|
29
|
-
/*
|
|
30
|
-
* The connection is alive, but the connection is offline
|
|
31
|
-
*/
|
|
32
|
-
ConnectedPendingNetwork = 'ConnectedPendingNetwork',
|
|
33
|
-
/*
|
|
34
|
-
* The connection has been disconnected while in use
|
|
35
|
-
*/
|
|
36
|
-
ConnectionDisrupted = 'ConnectionDisrupted',
|
|
37
|
-
/*
|
|
38
|
-
* The connection has been disconnected and the network is offline
|
|
39
|
-
*/
|
|
40
|
-
ConnectionDisruptedPendingNetwork = 'ConnectionDisruptedPendingNetwork',
|
|
41
|
-
/*
|
|
42
|
-
* The connection is in the process of connecting
|
|
43
|
-
*/
|
|
44
|
-
Connecting = 'Connecting',
|
|
45
|
-
/*
|
|
46
|
-
* The connection is not in use and is being disconnected
|
|
47
|
-
*/
|
|
48
|
-
ConnectedPendingDisconnect = 'ConnectedPendingDisconnect',
|
|
49
|
-
/*
|
|
50
|
-
* The connection is not in use and has been disconnected
|
|
51
|
-
*/
|
|
52
|
-
Disconnected = 'Disconnected',
|
|
53
|
-
/*
|
|
54
|
-
* The connection is alive, but a keep alive message has been missed
|
|
55
|
-
*/
|
|
56
|
-
ConnectedPendingKeepAlive = 'ConnectedPendingKeepAlive',
|
|
57
|
-
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import { Reachability } from '@aws-amplify/core';
|
|
15
15
|
import Observable, { ZenObservable } from 'zen-observable-ts';
|
|
16
|
-
import { ConnectionState } from '../
|
|
16
|
+
import { ConnectionState } from '../types/PubSub';
|
|
17
17
|
import { ReachabilityMonitor } from './ReachabilityMonitor';
|
|
18
18
|
|
|
19
19
|
// Internal types for tracking different connection states
|