matterbridge-webhooks 0.0.5 → 1.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
@@ -8,6 +8,28 @@ If you like this project and find it useful, please consider giving it a star on
8
8
  <img src="bmc-button.svg" alt="Buy me a coffee" width="120">
9
9
  </a>
10
10
 
11
+ ## [1.0.0] - 2025-10-28
12
+
13
+ ### Changed
14
+
15
+ - [package]: Updated dependencies.
16
+ - [package]: Bumped platform to v.1.0.0.
17
+ - [package]: Bumped package to automator v.2.0.10
18
+ - [jest]: Bumped jestHelpers to v.1.0.10.
19
+ - [package]: Require matterbridge v.3.3.0.
20
+ - [package]: Added default config.
21
+ - [platform]: Updated to new signature PlatformMatterbridge.
22
+ - [workflows]: Ignore any .md in build.yaml.
23
+ - [workflows]: Ignore any .md in codeql.yaml.
24
+ - [workflows]: Ignore any .md in codecov.yaml.
25
+ - [workflows]: Improved speed on Node CI.
26
+ - [devcontainer]: Added the plugin name to the container.
27
+ - [devcontainer]: Improved performance of first build with shallow clone.
28
+
29
+ <a href="https://www.buymeacoffee.com/luligugithub">
30
+ <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
31
+ </a>
32
+
11
33
  ## [0.0.5] - 2025-07-02
12
34
 
13
35
  ### Added
package/README.md CHANGED
@@ -30,12 +30,6 @@ If you like this project and find it useful, please consider giving it a star on
30
30
  <img src="bmc-button.svg" alt="Buy me a coffee" width="120">
31
31
  </a>
32
32
 
33
- ## Sponsors
34
-
35
- I'm looking for sponsors and some help to test the plugin with different platform.
36
-
37
- It would be nice to add here a few example of webhooks with different eco systems.
38
-
39
33
  ## Prerequisites
40
34
 
41
35
  ### Matterbridge
@@ -1,16 +1,19 @@
1
1
  import { bridgedNode, MatterbridgeDynamicPlatform, MatterbridgeEndpoint, onOffLight, onOffOutlet, onOffSwitch } from 'matterbridge';
2
2
  import { isValidObject } from 'matterbridge/utils';
3
3
  import { fetch } from './fetch.js';
4
- export class Platform extends MatterbridgeDynamicPlatform {
4
+ export default function initializePlugin(matterbridge, log, config) {
5
+ return new WebhooksPlatform(matterbridge, log, config);
6
+ }
7
+ export class WebhooksPlatform extends MatterbridgeDynamicPlatform {
5
8
  webhooks;
6
9
  bridgedDevices = new Map();
7
10
  constructor(matterbridge, log, config) {
8
11
  super(matterbridge, log, config);
9
- if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.0.0')) {
10
- throw new Error(`This plugin requires Matterbridge version >= "3.0.0". Please update Matterbridge to the latest version in the frontend.`);
12
+ if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.3.0')) {
13
+ throw new Error(`This plugin requires Matterbridge version >= "3.3.0". Please update Matterbridge to the latest version in the frontend.`);
11
14
  }
12
15
  this.log.info('Initializing platform:', this.config.name);
13
- this.webhooks = this.config.webhooks;
16
+ this.webhooks = config.webhooks;
14
17
  this.log.info('Finished initializing platform:', this.config.name);
15
18
  }
16
19
  async onStart(reason) {
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "matterbridge-webhooks",
3
+ "type": "DynamicPlatform",
4
+ "version": "1.0.0",
5
+ "whiteList": [],
6
+ "blackList": [],
7
+ "deviceType": "Outlet",
8
+ "webhooks": {},
9
+ "debug": false,
10
+ "unregisterOnShutdown": false
11
+ }
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "matterbridge-webhooks",
3
- "version": "0.0.5",
3
+ "version": "1.0.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-webhooks",
9
- "version": "0.0.5",
9
+ "version": "1.0.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
- "node-ansi-logger": "^3.1.1",
13
- "node-persist-manager": "^2.0.0"
12
+ "node-ansi-logger": "3.1.1",
13
+ "node-persist-manager": "2.0.0"
14
14
  },
15
15
  "engines": {
16
- "node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0 <23.0.0 || >=24.0.0 <25.0.0"
16
+ "node": ">=20.0.0 <21.0.0 || >=22.0.0 <23.0.0 || >=24.0.0 <25.0.0"
17
17
  },
18
18
  "funding": {
19
19
  "type": "buymeacoffee",
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-webhooks",
3
- "version": "0.0.5",
3
+ "version": "1.0.0",
4
4
  "description": "Matterbridge webhooks plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",
7
7
  "homepage": "https://www.npmjs.com/package/matterbridge-webhooks",
8
8
  "type": "module",
9
- "main": "dist/index.js",
9
+ "main": "dist/module.js",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/Luligu/matterbridge-webhooks.git"
@@ -40,13 +40,15 @@
40
40
  "alexa",
41
41
  "homeassistant",
42
42
  "smartthings",
43
- "ewelink"
43
+ "ewelink",
44
+ "webhooks",
45
+ "hooks"
44
46
  ],
45
47
  "engines": {
46
- "node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0 <23.0.0 || >=24.0.0 <25.0.0"
48
+ "node": ">=20.0.0 <21.0.0 || >=22.0.0 <23.0.0 || >=24.0.0 <25.0.0"
47
49
  },
48
50
  "dependencies": {
49
- "node-ansi-logger": "^3.1.1",
50
- "node-persist-manager": "^2.0.0"
51
+ "node-ansi-logger": "3.1.1",
52
+ "node-persist-manager": "2.0.0"
51
53
  }
52
54
  }
package/dist/index.js DELETED
@@ -1,4 +0,0 @@
1
- import { Platform } from './platform.js';
2
- export default function initializePlugin(matterbridge, log, config) {
3
- return new Platform(matterbridge, log, config);
4
- }