matterbridge-test 2.0.1-dev-20251114-4094133 → 2.0.2-dev-20251206-4ba1a1b

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
@@ -19,9 +19,19 @@ All notable changes to this project will be documented in this file.
19
19
 
20
20
  If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-test and sponsoring it.
21
21
 
22
- <a href="https://www.buymeacoffee.com/luligugithub">
23
- <img src="bmc-button.svg" alt="Buy me a coffee" width="120">
24
- </a>
22
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
23
+
24
+ ## [2.0.2] - 2025-12-05
25
+
26
+ ### Changed
27
+
28
+ - [package]: Updated dependencies.
29
+ - [package]: Updated to the current Matterbridge signatures.
30
+ - [package]: Requires Matterbridge v.3.4.0.
31
+ - [package]: Updated tests to use the Matterbridge Jest module.
32
+ - [package]: Bumped package to automator v.2.1.0.
33
+
34
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
25
35
 
26
36
  ## [2.0.1] - 2025-11-13
27
37
 
@@ -32,9 +42,7 @@ If you like this project and find it useful, please consider giving it a star on
32
42
  - [jest]: Updated jestHelpers to v.1.0.12.
33
43
  - [workflows]: Use shallow clones and --no-fund --no-audit for faster builds.
34
44
 
35
- <a href="https://www.buymeacoffee.com/luligugithub">
36
- <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
37
- </a>
45
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
38
46
 
39
47
  ## [2.0.0] - 2025-10-24
40
48
 
@@ -45,9 +53,7 @@ If you like this project and find it useful, please consider giving it a star on
45
53
  - [package]: Bumped package to automator v. 2.0.9.
46
54
  - [jest]: Updated jestHelpers to v. 1.0.9.
47
55
 
48
- <a href="https://www.buymeacoffee.com/luligugithub">
49
- <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
50
- </a>
56
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
51
57
 
52
58
  ## [1.3.0] - 2025-10-15
53
59
 
@@ -68,9 +74,7 @@ If you like this project and find it useful, please consider giving it a star on
68
74
  - [devcontainer]: Added the plugin name to the container.
69
75
  - [devcontainer]: Improved performance of first build with shallow clone.
70
76
 
71
- <a href="https://www.buymeacoffee.com/luligugithub">
72
- <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
73
- </a>
77
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
74
78
 
75
79
  ## [1.2.2] - 2025-09-02
76
80
 
@@ -79,9 +83,7 @@ If you like this project and find it useful, please consider giving it a star on
79
83
  - [package]: Updated dependencies.
80
84
  - [package]: Updated package to Automator v. 2.0.5.
81
85
 
82
- <a href="https://www.buymeacoffee.com/luligugithub">
83
- <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
84
- </a>
86
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
85
87
 
86
88
  ## [1.2.1] - 2025-07-29
87
89
 
@@ -94,9 +96,7 @@ If you like this project and find it useful, please consider giving it a star on
94
96
  - [package]: Updated package to Automator v. 2.0.3.
95
97
  - [package]: Updated dependencies.
96
98
 
97
- <a href="https://www.buymeacoffee.com/luligugithub">
98
- <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
99
- </a>
99
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
100
100
 
101
101
  ## [1.2.0] - 2025-06-25
102
102
 
package/dist/module.js CHANGED
@@ -12,8 +12,8 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
12
12
  constructor(matterbridge, log, config) {
13
13
  super(matterbridge, log, config);
14
14
  this.config = config;
15
- if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.3.0')) {
16
- throw new Error(`The test plugin requires Matterbridge version >= "3.3.0". Please update Matterbridge to the latest version in the frontend.`);
15
+ if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.4.0')) {
16
+ throw new Error(`The test plugin requires Matterbridge version >= "3.4.0". Please update Matterbridge to the latest version in the frontend.`);
17
17
  }
18
18
  this.log.info('Initializing platform:', this.config.name);
19
19
  this.log.debug('- with matterbridge version ', matterbridge.matterbridgeVersion);
@@ -31,14 +31,20 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
31
31
  this.log.debug('- with throwStart:', this.config.throwStart);
32
32
  this.log.debug('- with throwConfigure:', this.config.throwConfigure);
33
33
  this.log.debug('- with throwShutdown:', this.config.throwShutdown);
34
- if (this.config.throwLoad)
34
+ if (this.config.throwLoad) {
35
+ setImmediate(async () => {
36
+ await this.onShutdown('Throwing error in load');
37
+ });
35
38
  throw new Error('Throwing error in load');
39
+ }
36
40
  this.log.info('Finished initializing platform:', this.config.name);
37
41
  }
38
42
  async onStart(reason) {
39
43
  this.log.info('onStart called with reason:', reason ?? 'none');
40
- if (this.config.throwStart)
44
+ if (this.config.throwStart) {
45
+ await this.onShutdown('Throwing error in start');
41
46
  throw new Error('Throwing error in start');
47
+ }
42
48
  if (this.config.delayStart)
43
49
  await waiter('Delay start', () => false, false, 20000, 1000);
44
50
  if (this.config.longDelayStart)
@@ -204,8 +210,10 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
204
210
  async onConfigure() {
205
211
  await super.onConfigure();
206
212
  this.log.info('onConfigure called');
207
- if (this.config.throwConfigure)
213
+ if (this.config.throwConfigure) {
214
+ await this.onShutdown('Throwing error in configure');
208
215
  throw new Error('Throwing error in configure');
216
+ }
209
217
  if (this.config.setUpdateInterval === 0)
210
218
  return;
211
219
  const getRandomNumberInRange = (min, max) => {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-test",
3
- "version": "2.0.1-dev-20251114-4094133",
3
+ "version": "2.0.2-dev-20251206-4ba1a1b",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-test",
9
- "version": "2.0.1-dev-20251114-4094133",
9
+ "version": "2.0.2-dev-20251206-4ba1a1b",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "node-ansi-logger": "3.1.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-test",
3
- "version": "2.0.1-dev-20251114-4094133",
3
+ "version": "2.0.2-dev-20251206-4ba1a1b",
4
4
  "description": "Matterbridge test plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",