@homebridge/dbus-native 0.7.0 → 0.7.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/index.d.ts +24 -13
- package/lib/dbus-buffer.js +1 -1
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -1,21 +1,32 @@
|
|
|
1
|
-
import {EventEmitter} from
|
|
2
|
-
import {Socket} from
|
|
1
|
+
import { EventEmitter } from "events";
|
|
2
|
+
import { Socket } from "net";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
on(event: string, callback: (error: Error, data: any) => void): void
|
|
6
|
-
}
|
|
4
|
+
export function systemBus(): MessageBus;
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export class MessageBus {
|
|
7
|
+
connection: BusConnection;
|
|
8
|
+
public invoke(message: any, callback: (error: { name: string, message: any } | undefined, value: any) => void): void;
|
|
9
|
+
public getService(name: string): DBusService;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
export class BusConnection extends EventEmitter {
|
|
13
|
+
public stream: Socket;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
export class DBusService {
|
|
17
|
+
public name: string;
|
|
18
|
+
public bus: MessageBus;
|
|
19
|
+
public getObject(name: string, callback: (error: null | Error, obj?: DBusObject) => void): DBusObject;
|
|
20
|
+
public getInterface(objName: string, ifaceName: string, callback: (error: null | Error, iface?: DBusInterface) => void): void;
|
|
21
|
+
}
|
|
18
22
|
|
|
19
|
-
export {
|
|
20
|
-
|
|
23
|
+
export class DBusObject {
|
|
24
|
+
public name: string;
|
|
25
|
+
public service: DBusService;
|
|
26
|
+
public as(name: string): DBusInterface;
|
|
27
|
+
}
|
|
21
28
|
|
|
29
|
+
export class DBusInterface extends EventEmitter implements Record<string, any> {
|
|
30
|
+
public $parent: DBusObject;
|
|
31
|
+
public $name: string; // string interface name
|
|
32
|
+
}
|
package/lib/dbus-buffer.js
CHANGED
|
@@ -11,7 +11,7 @@ function DBusBuffer(buffer, startPos, options) {
|
|
|
11
11
|
}
|
|
12
12
|
this.options = options;
|
|
13
13
|
this.buffer = buffer;
|
|
14
|
-
(this.startPos = startPos ? startPos : 0), (this.pos = 0);
|
|
14
|
+
((this.startPos = startPos ? startPos : 0), (this.pos = 0));
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
DBusBuffer.prototype.align = function (power) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homebridge/dbus-native",
|
|
3
3
|
"author": "Andrey Sidorov <sidorares@yandex.com>",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dbus",
|
|
7
7
|
"dcop",
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/minimist": "^1.2.5",
|
|
56
56
|
"eslint": "^8.57.1",
|
|
57
|
-
"eslint-config-prettier": "^10.1.
|
|
57
|
+
"eslint-config-prettier": "^10.1.8",
|
|
58
58
|
"eslint-plugin-markdown": "^5.1.0",
|
|
59
|
-
"eslint-plugin-prettier": "^5.
|
|
59
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
60
60
|
"husky": "^9.1.7",
|
|
61
|
-
"lint-staged": "^16.1.
|
|
62
|
-
"mocha": "^11.
|
|
61
|
+
"lint-staged": "^16.1.2",
|
|
62
|
+
"mocha": "^11.7.1",
|
|
63
63
|
"nyc": "^17.1.0",
|
|
64
|
-
"prettier": "^3.
|
|
64
|
+
"prettier": "^3.6.2"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"lint": "npm run lint:docs && npm run lint:code",
|