@metamask/polling-controller 11.0.0 → 12.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/CHANGELOG.md +18 -1
- package/dist/AbstractPollingController.d.cts +2 -2
- package/dist/AbstractPollingController.d.mts +2 -2
- package/dist/BlockTrackerPollingController.d.cts +9 -9
- package/dist/BlockTrackerPollingController.d.mts +9 -9
- package/dist/StaticIntervalPollingController.d.cts +12 -12
- package/dist/StaticIntervalPollingController.d.mts +12 -12
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [12.0.1]
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Bump `@metamask/base-controller` from `^7.0.1` to `^7.0.2` ([#4862](https://github.com/MetaMask/core/pull/4862))
|
|
15
|
+
- Bump `@metamask/controller-utils` from `^11.4.0` to `^11.4.2` ([#4862](https://github.com/MetaMask/core/pull/4862), [#4870](https://github.com/MetaMask/core/pull/4870))
|
|
16
|
+
|
|
17
|
+
## [12.0.0]
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **BREAKING:** Bump `@metamask/network-controller` peer dependency to `^22.0.0` ([#4841](https://github.com/MetaMask/core/pull/4841))
|
|
22
|
+
- Bump `@metamask/controller-utils` to `^11.4.0` ([#4834](https://github.com/MetaMask/core/pull/4834))
|
|
23
|
+
- Bump `@metamask/utils` to `^10.0.0` ([#4831](https://github.com/MetaMask/core/pull/4831))
|
|
24
|
+
|
|
10
25
|
## [11.0.0]
|
|
11
26
|
|
|
12
27
|
### Changed
|
|
@@ -195,7 +210,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
195
210
|
|
|
196
211
|
- Initial release
|
|
197
212
|
|
|
198
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@
|
|
213
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@12.0.1...HEAD
|
|
214
|
+
[12.0.1]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@12.0.0...@metamask/polling-controller@12.0.1
|
|
215
|
+
[12.0.0]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@11.0.0...@metamask/polling-controller@12.0.0
|
|
199
216
|
[11.0.0]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@10.0.1...@metamask/polling-controller@11.0.0
|
|
200
217
|
[10.0.1]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@10.0.0...@metamask/polling-controller@10.0.1
|
|
201
218
|
[10.0.0]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@9.0.1...@metamask/polling-controller@10.0.0
|
|
@@ -8,8 +8,8 @@ export declare const getKey: <PollingInput>(input: PollingInput) => PollingToken
|
|
|
8
8
|
* @returns The composed class.
|
|
9
9
|
*/
|
|
10
10
|
export declare function AbstractPollingControllerBaseMixin<TBase extends Constructor, PollingInput extends Json>(Base: TBase): (abstract new (...args: any[]) => {
|
|
11
|
-
readonly "__#
|
|
12
|
-
"__#
|
|
11
|
+
readonly "__#787882@#pollingTokenSets": Map<PollingTokenSetId, Set<string>>;
|
|
12
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
13
13
|
_executePoll(input: PollingInput): Promise<void>;
|
|
14
14
|
_startPolling(input: PollingInput): void;
|
|
15
15
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
@@ -8,8 +8,8 @@ export declare const getKey: <PollingInput>(input: PollingInput) => PollingToken
|
|
|
8
8
|
* @returns The composed class.
|
|
9
9
|
*/
|
|
10
10
|
export declare function AbstractPollingControllerBaseMixin<TBase extends Constructor, PollingInput extends Json>(Base: TBase): (abstract new (...args: any[]) => {
|
|
11
|
-
readonly "__#
|
|
12
|
-
"__#
|
|
11
|
+
readonly "__#787882@#pollingTokenSets": Map<PollingTokenSetId, Set<string>>;
|
|
12
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
13
13
|
_executePoll(input: PollingInput): Promise<void>;
|
|
14
14
|
_startPolling(input: PollingInput): void;
|
|
15
15
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
@@ -12,12 +12,12 @@ export type BlockTrackerPollingInput = {
|
|
|
12
12
|
declare class Empty {
|
|
13
13
|
}
|
|
14
14
|
export declare const BlockTrackerPollingControllerOnly: <PollingInput extends BlockTrackerPollingInput>() => (abstract new (...args: any[]) => {
|
|
15
|
-
"__#
|
|
15
|
+
"__#787889@#activeListeners": Record<string, (options: Json) => Promise<void>>;
|
|
16
16
|
_getNetworkClientById(networkClientId: NetworkClientId): NetworkClient | undefined;
|
|
17
17
|
_startPolling(input: PollingInput): void;
|
|
18
18
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
19
|
-
readonly "__#
|
|
20
|
-
"__#
|
|
19
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
20
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
21
21
|
_executePoll(input: PollingInput): Promise<void>;
|
|
22
22
|
startPolling(input: PollingInput): string;
|
|
23
23
|
stopAllPolling(): void;
|
|
@@ -25,12 +25,12 @@ export declare const BlockTrackerPollingControllerOnly: <PollingInput extends Bl
|
|
|
25
25
|
onPollingComplete(input: PollingInput, callback: (input: PollingInput) => void): void;
|
|
26
26
|
}) & typeof Empty;
|
|
27
27
|
export declare const BlockTrackerPollingController: <PollingInput extends BlockTrackerPollingInput>() => (abstract new (...args: any[]) => {
|
|
28
|
-
"__#
|
|
28
|
+
"__#787889@#activeListeners": Record<string, (options: Json) => Promise<void>>;
|
|
29
29
|
_getNetworkClientById(networkClientId: NetworkClientId): NetworkClient | undefined;
|
|
30
30
|
_startPolling(input: PollingInput): void;
|
|
31
31
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
32
|
-
readonly "__#
|
|
33
|
-
"__#
|
|
32
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
33
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
34
34
|
_executePoll(input: PollingInput): Promise<void>;
|
|
35
35
|
startPolling(input: PollingInput): string;
|
|
36
36
|
stopAllPolling(): void;
|
|
@@ -38,12 +38,12 @@ export declare const BlockTrackerPollingController: <PollingInput extends BlockT
|
|
|
38
38
|
onPollingComplete(input: PollingInput, callback: (input: PollingInput) => void): void;
|
|
39
39
|
}) & typeof BaseController;
|
|
40
40
|
export declare const BlockTrackerPollingControllerV1: <PollingInput extends BlockTrackerPollingInput>() => (abstract new (...args: any[]) => {
|
|
41
|
-
"__#
|
|
41
|
+
"__#787889@#activeListeners": Record<string, (options: Json) => Promise<void>>;
|
|
42
42
|
_getNetworkClientById(networkClientId: NetworkClientId): NetworkClient | undefined;
|
|
43
43
|
_startPolling(input: PollingInput): void;
|
|
44
44
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
45
|
-
readonly "__#
|
|
46
|
-
"__#
|
|
45
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
46
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
47
47
|
_executePoll(input: PollingInput): Promise<void>;
|
|
48
48
|
startPolling(input: PollingInput): string;
|
|
49
49
|
stopAllPolling(): void;
|
|
@@ -12,12 +12,12 @@ export type BlockTrackerPollingInput = {
|
|
|
12
12
|
declare class Empty {
|
|
13
13
|
}
|
|
14
14
|
export declare const BlockTrackerPollingControllerOnly: <PollingInput extends BlockTrackerPollingInput>() => (abstract new (...args: any[]) => {
|
|
15
|
-
"__#
|
|
15
|
+
"__#787889@#activeListeners": Record<string, (options: Json) => Promise<void>>;
|
|
16
16
|
_getNetworkClientById(networkClientId: NetworkClientId): NetworkClient | undefined;
|
|
17
17
|
_startPolling(input: PollingInput): void;
|
|
18
18
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
19
|
-
readonly "__#
|
|
20
|
-
"__#
|
|
19
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
20
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
21
21
|
_executePoll(input: PollingInput): Promise<void>;
|
|
22
22
|
startPolling(input: PollingInput): string;
|
|
23
23
|
stopAllPolling(): void;
|
|
@@ -25,12 +25,12 @@ export declare const BlockTrackerPollingControllerOnly: <PollingInput extends Bl
|
|
|
25
25
|
onPollingComplete(input: PollingInput, callback: (input: PollingInput) => void): void;
|
|
26
26
|
}) & typeof Empty;
|
|
27
27
|
export declare const BlockTrackerPollingController: <PollingInput extends BlockTrackerPollingInput>() => (abstract new (...args: any[]) => {
|
|
28
|
-
"__#
|
|
28
|
+
"__#787889@#activeListeners": Record<string, (options: Json) => Promise<void>>;
|
|
29
29
|
_getNetworkClientById(networkClientId: NetworkClientId): NetworkClient | undefined;
|
|
30
30
|
_startPolling(input: PollingInput): void;
|
|
31
31
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
32
|
-
readonly "__#
|
|
33
|
-
"__#
|
|
32
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
33
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
34
34
|
_executePoll(input: PollingInput): Promise<void>;
|
|
35
35
|
startPolling(input: PollingInput): string;
|
|
36
36
|
stopAllPolling(): void;
|
|
@@ -38,12 +38,12 @@ export declare const BlockTrackerPollingController: <PollingInput extends BlockT
|
|
|
38
38
|
onPollingComplete(input: PollingInput, callback: (input: PollingInput) => void): void;
|
|
39
39
|
}) & typeof BaseController;
|
|
40
40
|
export declare const BlockTrackerPollingControllerV1: <PollingInput extends BlockTrackerPollingInput>() => (abstract new (...args: any[]) => {
|
|
41
|
-
"__#
|
|
41
|
+
"__#787889@#activeListeners": Record<string, (options: Json) => Promise<void>>;
|
|
42
42
|
_getNetworkClientById(networkClientId: NetworkClientId): NetworkClient | undefined;
|
|
43
43
|
_startPolling(input: PollingInput): void;
|
|
44
44
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
45
|
-
readonly "__#
|
|
46
|
-
"__#
|
|
45
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
46
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
47
47
|
_executePoll(input: PollingInput): Promise<void>;
|
|
48
48
|
startPolling(input: PollingInput): string;
|
|
49
49
|
stopAllPolling(): void;
|
|
@@ -4,14 +4,14 @@ import type { PollingTokenSetId } from "./types.cjs";
|
|
|
4
4
|
declare class Empty {
|
|
5
5
|
}
|
|
6
6
|
export declare const StaticIntervalPollingControllerOnly: <PollingInput extends Json>() => (abstract new (...args: any[]) => {
|
|
7
|
-
readonly "__#
|
|
8
|
-
"__#
|
|
7
|
+
readonly "__#787890@#intervalIds": Record<PollingTokenSetId, NodeJS.Timeout>;
|
|
8
|
+
"__#787890@#intervalLength": number | undefined;
|
|
9
9
|
setIntervalLength(intervalLength: number): void;
|
|
10
10
|
getIntervalLength(): number | undefined;
|
|
11
11
|
_startPolling(input: PollingInput): void;
|
|
12
12
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
13
|
-
readonly "__#
|
|
14
|
-
"__#
|
|
13
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
14
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
15
15
|
_executePoll(input: PollingInput): Promise<void>;
|
|
16
16
|
startPolling(input: PollingInput): string;
|
|
17
17
|
stopAllPolling(): void;
|
|
@@ -19,14 +19,14 @@ export declare const StaticIntervalPollingControllerOnly: <PollingInput extends
|
|
|
19
19
|
onPollingComplete(input: PollingInput, callback: (input: PollingInput) => void): void;
|
|
20
20
|
}) & typeof Empty;
|
|
21
21
|
export declare const StaticIntervalPollingController: <PollingInput extends Json>() => (abstract new (...args: any[]) => {
|
|
22
|
-
readonly "__#
|
|
23
|
-
"__#
|
|
22
|
+
readonly "__#787890@#intervalIds": Record<PollingTokenSetId, NodeJS.Timeout>;
|
|
23
|
+
"__#787890@#intervalLength": number | undefined;
|
|
24
24
|
setIntervalLength(intervalLength: number): void;
|
|
25
25
|
getIntervalLength(): number | undefined;
|
|
26
26
|
_startPolling(input: PollingInput): void;
|
|
27
27
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
28
|
-
readonly "__#
|
|
29
|
-
"__#
|
|
28
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
29
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
30
30
|
_executePoll(input: PollingInput): Promise<void>;
|
|
31
31
|
startPolling(input: PollingInput): string;
|
|
32
32
|
stopAllPolling(): void;
|
|
@@ -34,14 +34,14 @@ export declare const StaticIntervalPollingController: <PollingInput extends Json
|
|
|
34
34
|
onPollingComplete(input: PollingInput, callback: (input: PollingInput) => void): void;
|
|
35
35
|
}) & typeof BaseController;
|
|
36
36
|
export declare const StaticIntervalPollingControllerV1: <PollingInput extends Json>() => (abstract new (...args: any[]) => {
|
|
37
|
-
readonly "__#
|
|
38
|
-
"__#
|
|
37
|
+
readonly "__#787890@#intervalIds": Record<PollingTokenSetId, NodeJS.Timeout>;
|
|
38
|
+
"__#787890@#intervalLength": number | undefined;
|
|
39
39
|
setIntervalLength(intervalLength: number): void;
|
|
40
40
|
getIntervalLength(): number | undefined;
|
|
41
41
|
_startPolling(input: PollingInput): void;
|
|
42
42
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
43
|
-
readonly "__#
|
|
44
|
-
"__#
|
|
43
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
44
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
45
45
|
_executePoll(input: PollingInput): Promise<void>;
|
|
46
46
|
startPolling(input: PollingInput): string;
|
|
47
47
|
stopAllPolling(): void;
|
|
@@ -4,14 +4,14 @@ import type { PollingTokenSetId } from "./types.mjs";
|
|
|
4
4
|
declare class Empty {
|
|
5
5
|
}
|
|
6
6
|
export declare const StaticIntervalPollingControllerOnly: <PollingInput extends Json>() => (abstract new (...args: any[]) => {
|
|
7
|
-
readonly "__#
|
|
8
|
-
"__#
|
|
7
|
+
readonly "__#787890@#intervalIds": Record<PollingTokenSetId, NodeJS.Timeout>;
|
|
8
|
+
"__#787890@#intervalLength": number | undefined;
|
|
9
9
|
setIntervalLength(intervalLength: number): void;
|
|
10
10
|
getIntervalLength(): number | undefined;
|
|
11
11
|
_startPolling(input: PollingInput): void;
|
|
12
12
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
13
|
-
readonly "__#
|
|
14
|
-
"__#
|
|
13
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
14
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
15
15
|
_executePoll(input: PollingInput): Promise<void>;
|
|
16
16
|
startPolling(input: PollingInput): string;
|
|
17
17
|
stopAllPolling(): void;
|
|
@@ -19,14 +19,14 @@ export declare const StaticIntervalPollingControllerOnly: <PollingInput extends
|
|
|
19
19
|
onPollingComplete(input: PollingInput, callback: (input: PollingInput) => void): void;
|
|
20
20
|
}) & typeof Empty;
|
|
21
21
|
export declare const StaticIntervalPollingController: <PollingInput extends Json>() => (abstract new (...args: any[]) => {
|
|
22
|
-
readonly "__#
|
|
23
|
-
"__#
|
|
22
|
+
readonly "__#787890@#intervalIds": Record<PollingTokenSetId, NodeJS.Timeout>;
|
|
23
|
+
"__#787890@#intervalLength": number | undefined;
|
|
24
24
|
setIntervalLength(intervalLength: number): void;
|
|
25
25
|
getIntervalLength(): number | undefined;
|
|
26
26
|
_startPolling(input: PollingInput): void;
|
|
27
27
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
28
|
-
readonly "__#
|
|
29
|
-
"__#
|
|
28
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
29
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
30
30
|
_executePoll(input: PollingInput): Promise<void>;
|
|
31
31
|
startPolling(input: PollingInput): string;
|
|
32
32
|
stopAllPolling(): void;
|
|
@@ -34,14 +34,14 @@ export declare const StaticIntervalPollingController: <PollingInput extends Json
|
|
|
34
34
|
onPollingComplete(input: PollingInput, callback: (input: PollingInput) => void): void;
|
|
35
35
|
}) & typeof BaseController;
|
|
36
36
|
export declare const StaticIntervalPollingControllerV1: <PollingInput extends Json>() => (abstract new (...args: any[]) => {
|
|
37
|
-
readonly "__#
|
|
38
|
-
"__#
|
|
37
|
+
readonly "__#787890@#intervalIds": Record<PollingTokenSetId, NodeJS.Timeout>;
|
|
38
|
+
"__#787890@#intervalLength": number | undefined;
|
|
39
39
|
setIntervalLength(intervalLength: number): void;
|
|
40
40
|
getIntervalLength(): number | undefined;
|
|
41
41
|
_startPolling(input: PollingInput): void;
|
|
42
42
|
_stopPollingByPollingTokenSetId(key: PollingTokenSetId): void;
|
|
43
|
-
readonly "__#
|
|
44
|
-
"__#
|
|
43
|
+
readonly "__#787882@#pollingTokenSets": Map<string, Set<string>>;
|
|
44
|
+
"__#787882@#callbacks": Map<string, Set<(input: PollingInput) => void>>;
|
|
45
45
|
_executePoll(input: PollingInput): Promise<void>;
|
|
46
46
|
startPolling(input: PollingInput): string;
|
|
47
47
|
stopAllPolling(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/polling-controller",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"description": "Polling Controller is the base for controllers that polling by networkClientId",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -47,16 +47,16 @@
|
|
|
47
47
|
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@metamask/base-controller": "^7.0.
|
|
51
|
-
"@metamask/controller-utils": "^11.
|
|
52
|
-
"@metamask/utils": "^
|
|
50
|
+
"@metamask/base-controller": "^7.0.2",
|
|
51
|
+
"@metamask/controller-utils": "^11.4.2",
|
|
52
|
+
"@metamask/utils": "^10.0.0",
|
|
53
53
|
"@types/uuid": "^8.3.0",
|
|
54
54
|
"fast-json-stable-stringify": "^2.1.0",
|
|
55
55
|
"uuid": "^8.3.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@metamask/auto-changelog": "^3.4.4",
|
|
59
|
-
"@metamask/network-controller": "^
|
|
59
|
+
"@metamask/network-controller": "^22.0.1",
|
|
60
60
|
"@types/jest": "^27.4.1",
|
|
61
61
|
"deepmerge": "^4.2.2",
|
|
62
62
|
"jest": "^27.5.1",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"typescript": "~5.2.2"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@metamask/network-controller": "^
|
|
70
|
+
"@metamask/network-controller": "^22.0.0"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
73
|
"node": "^18.18 || >=20"
|