@metamask/polling-controller 4.0.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [5.0.0]
|
|
10
|
+
### Changed
|
|
11
|
+
- **BREAKING:** Bump `@metamask/network-controller` peer dependency to `^17.2.0` ([#3821](https://github.com/MetaMask/core/pull/3821))
|
|
12
|
+
- Bump `@metamask/utils` to `^8.3.0` ([#3769](https://github.com/MetaMask/core/pull/3769))
|
|
13
|
+
- Bump `@metamask/base-controller` to `^4.1.1` ([#3760](https://github.com/MetaMask/core/pull/3760), [#3821](https://github.com/MetaMask/core/pull/3821))
|
|
14
|
+
- Bump `@metamask/controller-utils` to `^8.0.2` ([#3821](https://github.com/MetaMask/core/pull/3821))
|
|
15
|
+
|
|
9
16
|
## [4.0.0]
|
|
10
17
|
### Changed
|
|
11
18
|
- **BREAKING:** Bump `@metamask/network-controller` dependency and peer dependency from `^17.0.0` to `^17.1.1` ([#3695](https://github.com/MetaMask/core/pull/3695))
|
|
@@ -59,7 +66,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
59
66
|
### Added
|
|
60
67
|
- Initial release
|
|
61
68
|
|
|
62
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@
|
|
69
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@5.0.0...HEAD
|
|
70
|
+
[5.0.0]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@4.0.0...@metamask/polling-controller@5.0.0
|
|
63
71
|
[4.0.0]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@3.0.0...@metamask/polling-controller@4.0.0
|
|
64
72
|
[3.0.0]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@2.0.0...@metamask/polling-controller@3.0.0
|
|
65
73
|
[2.0.0]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@1.0.2...@metamask/polling-controller@2.0.0
|
|
@@ -19,8 +19,8 @@ declare type Constructor = new (...args: any[]) => object;
|
|
|
19
19
|
* @returns The composed class.
|
|
20
20
|
*/
|
|
21
21
|
export declare function AbstractPollingControllerBaseMixin<TBase extends Constructor>(Base: TBase): (abstract new (...args: any[]) => {
|
|
22
|
-
readonly "__#
|
|
23
|
-
"__#
|
|
22
|
+
readonly "__#97100@#pollingTokenSets": Map<PollingTokenSetId, Set<string>>;
|
|
23
|
+
"__#97100@#callbacks": Map<`${string}:${string}`, Set<(PollingTokenSetId: `${string}:${string}`) => void>>;
|
|
24
24
|
_executePoll(networkClientId: NetworkClientId, options: Json): Promise<void>;
|
|
25
25
|
_startPollingByNetworkClientId(networkClientId: NetworkClientId, options: Json): void;
|
|
26
26
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
@@ -5,12 +5,12 @@ import type { PollingTokenSetId } from './AbstractPollingController';
|
|
|
5
5
|
declare class Empty {
|
|
6
6
|
}
|
|
7
7
|
export declare const BlockTrackerPollingControllerOnly: (abstract new (...args: any[]) => {
|
|
8
|
-
"__#
|
|
8
|
+
"__#97101@#activeListeners": Record<string, (options: Json) => Promise<void>>;
|
|
9
9
|
_getNetworkClientById(networkClientId: NetworkClientId): NetworkClient | undefined;
|
|
10
10
|
_startPollingByNetworkClientId(networkClientId: NetworkClientId, options: Json): void;
|
|
11
11
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
12
|
-
readonly "__#
|
|
13
|
-
"__#
|
|
12
|
+
readonly "__#97100@#pollingTokenSets": Map<`${string}:${string}`, Set<string>>;
|
|
13
|
+
"__#97100@#callbacks": Map<`${string}:${string}`, Set<(PollingTokenSetId: `${string}:${string}`) => void>>;
|
|
14
14
|
_executePoll(networkClientId: string, options: Json): Promise<void>;
|
|
15
15
|
startPollingByNetworkClientId(networkClientId: string, options?: Json): string;
|
|
16
16
|
stopAllPolling(): void;
|
|
@@ -18,12 +18,12 @@ export declare const BlockTrackerPollingControllerOnly: (abstract new (...args:
|
|
|
18
18
|
onPollingCompleteByNetworkClientId(networkClientId: string, callback: (networkClientId: string) => void, options?: Json): void;
|
|
19
19
|
}) & typeof Empty;
|
|
20
20
|
export declare const BlockTrackerPollingController: (abstract new (...args: any[]) => {
|
|
21
|
-
"__#
|
|
21
|
+
"__#97101@#activeListeners": Record<string, (options: Json) => Promise<void>>;
|
|
22
22
|
_getNetworkClientById(networkClientId: NetworkClientId): NetworkClient | undefined;
|
|
23
23
|
_startPollingByNetworkClientId(networkClientId: NetworkClientId, options: Json): void;
|
|
24
24
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
25
|
-
readonly "__#
|
|
26
|
-
"__#
|
|
25
|
+
readonly "__#97100@#pollingTokenSets": Map<`${string}:${string}`, Set<string>>;
|
|
26
|
+
"__#97100@#callbacks": Map<`${string}:${string}`, Set<(PollingTokenSetId: `${string}:${string}`) => void>>;
|
|
27
27
|
_executePoll(networkClientId: string, options: Json): Promise<void>;
|
|
28
28
|
startPollingByNetworkClientId(networkClientId: string, options?: Json): string;
|
|
29
29
|
stopAllPolling(): void;
|
|
@@ -31,12 +31,12 @@ export declare const BlockTrackerPollingController: (abstract new (...args: any[
|
|
|
31
31
|
onPollingCompleteByNetworkClientId(networkClientId: string, callback: (networkClientId: string) => void, options?: Json): void;
|
|
32
32
|
}) & typeof BaseController;
|
|
33
33
|
export declare const BlockTrackerPollingControllerV1: (abstract new (...args: any[]) => {
|
|
34
|
-
"__#
|
|
34
|
+
"__#97101@#activeListeners": Record<string, (options: Json) => Promise<void>>;
|
|
35
35
|
_getNetworkClientById(networkClientId: NetworkClientId): NetworkClient | undefined;
|
|
36
36
|
_startPollingByNetworkClientId(networkClientId: NetworkClientId, options: Json): void;
|
|
37
37
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
38
|
-
readonly "__#
|
|
39
|
-
"__#
|
|
38
|
+
readonly "__#97100@#pollingTokenSets": Map<`${string}:${string}`, Set<string>>;
|
|
39
|
+
"__#97100@#callbacks": Map<`${string}:${string}`, Set<(PollingTokenSetId: `${string}:${string}`) => void>>;
|
|
40
40
|
_executePoll(networkClientId: string, options: Json): Promise<void>;
|
|
41
41
|
startPollingByNetworkClientId(networkClientId: string, options?: Json): string;
|
|
42
42
|
stopAllPolling(): void;
|
|
@@ -10,14 +10,14 @@ import type { PollingTokenSetId } from './AbstractPollingController';
|
|
|
10
10
|
declare class Empty {
|
|
11
11
|
}
|
|
12
12
|
export declare const StaticIntervalPollingControllerOnly: (abstract new (...args: any[]) => {
|
|
13
|
-
readonly "__#
|
|
14
|
-
"__#
|
|
13
|
+
readonly "__#97102@#intervalIds": Record<PollingTokenSetId, NodeJS.Timeout>;
|
|
14
|
+
"__#97102@#intervalLength": number | undefined;
|
|
15
15
|
setIntervalLength(intervalLength: number): void;
|
|
16
16
|
getIntervalLength(): number | undefined;
|
|
17
17
|
_startPollingByNetworkClientId(networkClientId: NetworkClientId, options: Json): void;
|
|
18
18
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
19
|
-
readonly "__#
|
|
20
|
-
"__#
|
|
19
|
+
readonly "__#97100@#pollingTokenSets": Map<`${string}:${string}`, Set<string>>;
|
|
20
|
+
"__#97100@#callbacks": Map<`${string}:${string}`, Set<(PollingTokenSetId: `${string}:${string}`) => void>>;
|
|
21
21
|
_executePoll(networkClientId: string, options: Json): Promise<void>;
|
|
22
22
|
startPollingByNetworkClientId(networkClientId: string, options?: Json): string;
|
|
23
23
|
stopAllPolling(): void;
|
|
@@ -25,14 +25,14 @@ export declare const StaticIntervalPollingControllerOnly: (abstract new (...args
|
|
|
25
25
|
onPollingCompleteByNetworkClientId(networkClientId: string, callback: (networkClientId: string) => void, options?: Json): void;
|
|
26
26
|
}) & typeof Empty;
|
|
27
27
|
export declare const StaticIntervalPollingController: (abstract new (...args: any[]) => {
|
|
28
|
-
readonly "__#
|
|
29
|
-
"__#
|
|
28
|
+
readonly "__#97102@#intervalIds": Record<PollingTokenSetId, NodeJS.Timeout>;
|
|
29
|
+
"__#97102@#intervalLength": number | undefined;
|
|
30
30
|
setIntervalLength(intervalLength: number): void;
|
|
31
31
|
getIntervalLength(): number | undefined;
|
|
32
32
|
_startPollingByNetworkClientId(networkClientId: NetworkClientId, options: Json): void;
|
|
33
33
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
34
|
-
readonly "__#
|
|
35
|
-
"__#
|
|
34
|
+
readonly "__#97100@#pollingTokenSets": Map<`${string}:${string}`, Set<string>>;
|
|
35
|
+
"__#97100@#callbacks": Map<`${string}:${string}`, Set<(PollingTokenSetId: `${string}:${string}`) => void>>;
|
|
36
36
|
_executePoll(networkClientId: string, options: Json): Promise<void>;
|
|
37
37
|
startPollingByNetworkClientId(networkClientId: string, options?: Json): string;
|
|
38
38
|
stopAllPolling(): void;
|
|
@@ -40,14 +40,14 @@ export declare const StaticIntervalPollingController: (abstract new (...args: an
|
|
|
40
40
|
onPollingCompleteByNetworkClientId(networkClientId: string, callback: (networkClientId: string) => void, options?: Json): void;
|
|
41
41
|
}) & typeof BaseController;
|
|
42
42
|
export declare const StaticIntervalPollingControllerV1: (abstract new (...args: any[]) => {
|
|
43
|
-
readonly "__#
|
|
44
|
-
"__#
|
|
43
|
+
readonly "__#97102@#intervalIds": Record<PollingTokenSetId, NodeJS.Timeout>;
|
|
44
|
+
"__#97102@#intervalLength": number | undefined;
|
|
45
45
|
setIntervalLength(intervalLength: number): void;
|
|
46
46
|
getIntervalLength(): number | undefined;
|
|
47
47
|
_startPollingByNetworkClientId(networkClientId: NetworkClientId, options: Json): void;
|
|
48
48
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
49
|
-
readonly "__#
|
|
50
|
-
"__#
|
|
49
|
+
readonly "__#97100@#pollingTokenSets": Map<`${string}:${string}`, Set<string>>;
|
|
50
|
+
"__#97100@#callbacks": Map<`${string}:${string}`, Set<(PollingTokenSetId: `${string}:${string}`) => void>>;
|
|
51
51
|
_executePoll(networkClientId: string, options: Json): Promise<void>;
|
|
52
52
|
startPollingByNetworkClientId(networkClientId: string, options?: Json): string;
|
|
53
53
|
stopAllPolling(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/polling-controller",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Polling Controller is the base for controllers that polling by networkClientId",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"test:watch": "jest --watch"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@metamask/base-controller": "^4.
|
|
35
|
-
"@metamask/controller-utils": "^8.0.
|
|
36
|
-
"@metamask/network-controller": "^17.
|
|
37
|
-
"@metamask/utils": "^8.
|
|
34
|
+
"@metamask/base-controller": "^4.1.1",
|
|
35
|
+
"@metamask/controller-utils": "^8.0.2",
|
|
36
|
+
"@metamask/network-controller": "^17.2.0",
|
|
37
|
+
"@metamask/utils": "^8.3.0",
|
|
38
38
|
"@types/uuid": "^8.3.0",
|
|
39
39
|
"fast-json-stable-stringify": "^2.1.0",
|
|
40
40
|
"uuid": "^8.3.2"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"typescript": "~4.8.4"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@metamask/network-controller": "^17.
|
|
54
|
+
"@metamask/network-controller": "^17.2.0"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=16.0.0"
|