matterbridge-automations 0.0.1 → 0.0.2

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
@@ -1,16 +1,53 @@
1
+ <!-- eslint-disable markdown/no-missing-label-refs -->
2
+
1
3
  # <img src="https://matterbridge.io/assets/matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px">&nbsp;&nbsp;&nbsp;Matterbridge automations plugin changelog
2
4
 
5
+ [![npm version](https://img.shields.io/npm/v/matterbridge-automations.svg)](https://www.npmjs.com/package/matterbridge-automations)
6
+ [![npm downloads](https://img.shields.io/npm/dt/matterbridge-automations.svg)](https://www.npmjs.com/package/matterbridge-automations)
7
+ [![Docker Version](https://img.shields.io/docker/v/luligu/matterbridge/latest?label=docker%20version)](https://hub.docker.com/r/luligu/matterbridge)
8
+ [![Docker Pulls](https://img.shields.io/docker/pulls/luligu/matterbridge?label=docker%20pulls)](https://hub.docker.com/r/luligu/matterbridge)
9
+ ![Node.js CI](https://github.com/Luligu/matterbridge-automations/actions/workflows/build.yml/badge.svg)
10
+ ![CodeQL](https://github.com/Luligu/matterbridge-automations/actions/workflows/codeql.yml/badge.svg)
11
+ [![codecov](https://codecov.io/gh/Luligu/matterbridge-automations/branch/main/graph/badge.svg)](https://codecov.io/gh/Luligu/matterbridge-automations)
12
+ [![tested with Vitest](https://img.shields.io/badge/tested_with-Vitest-6E9F18.svg?logo=vitest&logoColor=white)](https://vitest.dev)
13
+ [![styled with Oxc](https://img.shields.io/badge/styled_with-Oxc-9BE4E0.svg?logo=oxc&logoColor=white)](https://oxc.rs/docs/guide/usage/formatter.html)
14
+ [![linted with Oxc](https://img.shields.io/badge/linted_with-Oxc-9BE4E0.svg?logo=oxc&logoColor=white)](https://oxc.rs/docs/guide/usage/linter.html)
15
+ [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
16
+ [![TypeScript Native](https://img.shields.io/badge/TypeScript_Native-3178C6?logo=typescript&logoColor=white)](https://github.com/microsoft/typescript-go)
17
+ [![ESM](https://img.shields.io/badge/ESM-Node.js-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
18
+ [![matterbridge.io](https://img.shields.io/badge/matterbridge.io-online-brightgreen)](https://matterbridge.io)
19
+
20
+ [![powered by](https://img.shields.io/badge/powered%20by-matterbridge-blue)](https://www.npmjs.com/package/matterbridge)
21
+ [![powered by](https://img.shields.io/badge/powered%20by-matter--history-blue)](https://www.npmjs.com/package/matter-history)
22
+ [![powered by](https://img.shields.io/badge/powered%20by-node--ansi--logger-blue)](https://www.npmjs.com/package/node-ansi-logger)
23
+ [![powered by](https://img.shields.io/badge/powered%20by-node--persist--manager-blue)](https://www.npmjs.com/package/node-persist-manager)
24
+
3
25
  All notable changes to this project will be documented in this file.
4
26
 
5
27
  If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-automations and sponsoring it.
6
28
 
29
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
30
+
31
+ ## [0.0.2] - 2026-07-17
32
+
33
+ ### Breaking changes
34
+
35
+ - Require matterbridge v.3.9.0 with matter v.1.5.1 and matter.js v.0.17.1.
36
+
37
+ ### Changed
38
+
39
+ - [package]: Apply uniform style.
40
+ - [package]: Upgrade package.
41
+ - [package]: Update dependencies.
42
+ - [toolchain]: Migrate to the native toolchain (tsgo + oxlint + oxfmt + vitest). Replace ESLint/Prettier with Oxc, migrate the unit tests from Jest to Vitest, and move them from `src/` to `vitest/`.
43
+
44
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
45
+
7
46
  ## [0.0.1] - 2026-01-27
8
47
 
9
- First published release.
48
+ - First published release.
10
49
 
11
- <a href="https://www.buymeacoffee.com/luligugithub">
12
- <img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120">
13
- </a>
50
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
14
51
 
15
52
  <!-- Commented out section
16
53
  ## [1.1.2] - 2024-03-08
package/README.md CHANGED
@@ -5,7 +5,15 @@
5
5
  [![Docker Version](https://img.shields.io/docker/v/luligu/matterbridge/latest?label=docker%20version)](https://hub.docker.com/r/luligu/matterbridge)
6
6
  [![Docker Pulls](https://img.shields.io/docker/pulls/luligu/matterbridge?label=docker%20pulls)](https://hub.docker.com/r/luligu/matterbridge)
7
7
  ![Node.js CI](https://github.com/Luligu/matterbridge-automations/actions/workflows/build.yml/badge.svg)
8
- ![Jest coverage](https://img.shields.io/badge/Jest%20coverage-100%25-brightgreen)
8
+ ![CodeQL](https://github.com/Luligu/matterbridge-automations/actions/workflows/codeql.yml/badge.svg)
9
+ [![codecov](https://codecov.io/gh/Luligu/matterbridge-automations/branch/main/graph/badge.svg)](https://codecov.io/gh/Luligu/matterbridge-automations)
10
+ [![tested with Vitest](https://img.shields.io/badge/tested_with-Vitest-6E9F18.svg?logo=vitest&logoColor=white)](https://vitest.dev)
11
+ [![styled with Oxc](https://img.shields.io/badge/styled_with-Oxc-9BE4E0.svg?logo=oxc&logoColor=white)](https://oxc.rs/docs/guide/usage/formatter.html)
12
+ [![linted with Oxc](https://img.shields.io/badge/linted_with-Oxc-9BE4E0.svg?logo=oxc&logoColor=white)](https://oxc.rs/docs/guide/usage/linter.html)
13
+ [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
14
+ [![TypeScript Native](https://img.shields.io/badge/TypeScript_Native-3178C6?logo=typescript&logoColor=white)](https://github.com/microsoft/typescript-go)
15
+ [![ESM](https://img.shields.io/badge/ESM-Node.js-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
16
+ [![matterbridge.io](https://img.shields.io/badge/matterbridge.io-online-brightgreen)](https://matterbridge.io)
9
17
 
10
18
  [![powered by](https://img.shields.io/badge/powered%20by-matterbridge-blue)](https://www.npmjs.com/package/matterbridge)
11
19
  [![powered by](https://img.shields.io/badge/powered%20by-matter--history-blue)](https://www.npmjs.com/package/matter-history)
package/dist/module.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { MatterbridgeDynamicPlatform } from 'matterbridge';
2
2
  export default function initializePlugin(matterbridge, log, config) {
3
- return new Platform(matterbridge, log, config);
3
+ return new AutomationsPlatform(matterbridge, log, config);
4
4
  }
5
- export class Platform extends MatterbridgeDynamicPlatform {
5
+ export class AutomationsPlatform extends MatterbridgeDynamicPlatform {
6
6
  constructor(matterbridge, log, config) {
7
7
  super(matterbridge, log, config);
8
- if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.5.0')) {
9
- throw new Error(`This plugin requires Matterbridge version >= "3.5.0". Please update Matterbridge to the latest version in the frontend.`);
8
+ if (typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.9.0')) {
9
+ throw new Error(`This plugin requires Matterbridge version >= "3.9.0". Please update Matterbridge to the latest version in the frontend.`);
10
10
  }
11
- this.log.info('Initializing platform:', this.config.name);
12
- this.log.info('Finished initializing platform:', this.config.name);
11
+ this.log.info(`Initializing platform: ${this.config.name}`);
12
+ this.log.info(`Finished initializing platform: ${this.config.name}`);
13
13
  }
14
14
  async onStart(reason) {
15
- this.log.info('onStart called with reason:', reason ?? 'none');
15
+ this.log.info(`onStart called with reason: ${reason ?? 'No reason provided'}`);
16
16
  }
17
17
  async onConfigure() {
18
18
  await super.onConfigure();
@@ -20,8 +20,8 @@ export class Platform extends MatterbridgeDynamicPlatform {
20
20
  }
21
21
  async onShutdown(reason) {
22
22
  await super.onShutdown(reason);
23
- this.log.info('onShutdown called with reason:', reason ?? 'none');
24
- if (this.config.unregisterOnShutdown === true)
23
+ this.log.info(`onShutdown called with reason: ${reason ?? 'No reason provided'}`);
24
+ if (this.config.unregisterOnShutdown)
25
25
  await this.unregisterAllDevices();
26
26
  }
27
27
  }
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "matterbridge-automations",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-automations",
9
- "version": "0.0.1",
9
+ "version": "0.0.2",
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.3.0",
13
+ "node-persist-manager": "2.1.0"
14
14
  },
15
15
  "engines": {
16
- "node": ">=20.0.0 <21.0.0 || >=22.0.0 <23.0.0 || >=24.0.0 <25.0.0"
16
+ "node": ">=20.19.0 <21.0.0 || >=22.13.0 <23.0.0 || >=24.0.0 <25.0.0 || >=26.0.0 <27.0.0"
17
17
  },
18
18
  "funding": {
19
19
  "type": "buymeacoffee",
@@ -21,48 +21,49 @@
21
21
  }
22
22
  },
23
23
  "node_modules/node-ansi-logger": {
24
- "version": "3.1.1",
25
- "resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.1.1.tgz",
26
- "integrity": "sha512-tFeCSxwiRg5XaNda5nC27alzraZP76nLtUk1JDZqb9byhW4WYaSGL7/lmxFHEI16gypQDMEYljuF+wcG+cPPHw==",
24
+ "version": "3.3.0",
25
+ "resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.3.0.tgz",
26
+ "integrity": "sha512-ZW77lbZkA8h3r2HA2rcE5RjTIcwRDNB072RkZVyimGQpmEorJT8ajZ7UDhkHGoh0JRrCJL0iUKBE8q4oU8MHMg==",
27
27
  "hasShrinkwrap": true,
28
28
  "license": "Apache-2.0",
29
29
  "engines": {
30
- "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"
30
+ "node": ">=20.19.0 <21.0.0 || >=22.13.0 <23.0.0 || >=24.0.0 <25.0.0 || >=26.0.0 <27.0.0"
31
31
  },
32
32
  "funding": {
33
33
  "type": "buymeacoffee",
34
34
  "url": "https://www.buymeacoffee.com/luligugithub"
35
35
  }
36
36
  },
37
- "node_modules/node-persist": {
38
- "version": "4.0.4",
39
- "resolved": "https://registry.npmjs.org/node-persist/-/node-persist-4.0.4.tgz",
40
- "integrity": "sha512-8sPAz/7tw1mCCc8xBG4f0wi+flHkSSgQeX998iQ75Pu27evA6UUWCjSE7xnrYTg2q33oU5leJ061EKPDv6BocQ==",
41
- "license": "MIT",
42
- "dependencies": {
43
- "p-limit": "^3.1.0"
44
- },
45
- "engines": {
46
- "node": ">=10.12.0"
47
- }
48
- },
49
37
  "node_modules/node-persist-manager": {
50
- "version": "2.0.0",
51
- "resolved": "https://registry.npmjs.org/node-persist-manager/-/node-persist-manager-2.0.0.tgz",
52
- "integrity": "sha512-jpgOqCCn4ZEnIr4WcvqkyyGmmLJarV6aUyBlDQdG1G84X9UUmOmI1W2OZtc9K0z375CYWhjtGEXaY7GXNiEOfA==",
53
- "license": "MIT",
38
+ "version": "2.1.0",
39
+ "resolved": "https://registry.npmjs.org/node-persist-manager/-/node-persist-manager-2.1.0.tgz",
40
+ "integrity": "sha512-LJze/Fcd8LijM4OMPnp0AQ+Z1e9mFMkjOEDw08xHA2HSRd2+N5s0uyH5ogYmXPC68f0sc4GrdKMpAcsHuO3PKA==",
41
+ "hasShrinkwrap": true,
42
+ "license": "Apache-2.0",
54
43
  "dependencies": {
55
44
  "node-persist": "4.0.4"
56
45
  },
57
46
  "engines": {
58
- "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"
47
+ "node": ">=20.19.0 <21.0.0 || >=22.13.0 <23.0.0 || >=24.0.0 <25.0.0 || >=26.0.0 <27.0.0"
59
48
  },
60
49
  "funding": {
61
50
  "type": "buymeacoffee",
62
51
  "url": "https://www.buymeacoffee.com/luligugithub"
63
52
  }
64
53
  },
65
- "node_modules/p-limit": {
54
+ "node_modules/node-persist-manager/node_modules/node-persist": {
55
+ "version": "4.0.4",
56
+ "resolved": "https://registry.npmjs.org/node-persist/-/node-persist-4.0.4.tgz",
57
+ "integrity": "sha512-8sPAz/7tw1mCCc8xBG4f0wi+flHkSSgQeX998iQ75Pu27evA6UUWCjSE7xnrYTg2q33oU5leJ061EKPDv6BocQ==",
58
+ "license": "MIT",
59
+ "dependencies": {
60
+ "p-limit": "^3.1.0"
61
+ },
62
+ "engines": {
63
+ "node": ">=10.12.0"
64
+ }
65
+ },
66
+ "node_modules/node-persist-manager/node_modules/p-limit": {
66
67
  "version": "3.1.0",
67
68
  "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
68
69
  "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
@@ -77,7 +78,7 @@
77
78
  "url": "https://github.com/sponsors/sindresorhus"
78
79
  }
79
80
  },
80
- "node_modules/yocto-queue": {
81
+ "node_modules/node-persist-manager/node_modules/yocto-queue": {
81
82
  "version": "0.1.0",
82
83
  "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
83
84
  "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
package/package.json CHANGED
@@ -1,12 +1,10 @@
1
1
  {
2
2
  "name": "matterbridge-automations",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Matterbridge automations plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",
7
- "type": "module",
8
- "main": "dist/module.js",
9
- "types": "dist/module.d.ts",
7
+ "homepage": "https://www.npmjs.com/package/matterbridge-automations",
10
8
  "repository": {
11
9
  "type": "git",
12
10
  "url": "git+https://github.com/Luligu/matterbridge-automations.git"
@@ -40,10 +38,23 @@
40
38
  "alexa",
41
39
  "homeassistant",
42
40
  "smartthings",
43
- "ewelink"
41
+ "ewelink",
42
+ "childbridge",
43
+ "gladysassistant",
44
+ "hass",
45
+ "hassio"
44
46
  ],
47
+ "type": "module",
48
+ "main": "dist/module.js",
49
+ "types": "dist/module.d.ts",
50
+ "exports": {
51
+ ".": {
52
+ "import": "./dist/module.js",
53
+ "types": "./dist/module.d.ts"
54
+ }
55
+ },
45
56
  "engines": {
46
- "node": ">=20.0.0 <21.0.0 || >=22.0.0 <23.0.0 || >=24.0.0 <25.0.0"
57
+ "node": ">=20.19.0 <21.0.0 || >=22.13.0 <23.0.0 || >=24.0.0 <25.0.0 || >=26.0.0 <27.0.0"
47
58
  },
48
59
  "files": [
49
60
  "bin",
@@ -54,7 +65,7 @@
54
65
  "*.schema.json"
55
66
  ],
56
67
  "dependencies": {
57
- "node-ansi-logger": "3.1.1",
58
- "node-persist-manager": "2.0.0"
68
+ "node-ansi-logger": "3.3.0",
69
+ "node-persist-manager": "2.1.0"
59
70
  }
60
71
  }
package/dist/module.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import { MatterbridgeDynamicPlatform, PlatformConfig, PlatformMatterbridge } from 'matterbridge';
2
- import { AnsiLogger } from 'matterbridge/logger';
3
- export default function initializePlugin(matterbridge: PlatformMatterbridge, log: AnsiLogger, config: PlatformConfig): Platform;
4
- export declare class Platform extends MatterbridgeDynamicPlatform {
5
- constructor(matterbridge: PlatformMatterbridge, log: AnsiLogger, config: PlatformConfig);
6
- onStart(reason?: string): Promise<void>;
7
- onConfigure(): Promise<void>;
8
- onShutdown(reason?: string): Promise<void>;
9
- }