@httptoolkit/dbus-native
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -21,2 +21,20 @@ const EventEmitter = require('events').EventEmitter; | ||
this.disconnect = function () { | ||
if (// Some of these might be redundant, but best to check everything explicitly: | ||
conn.writableEnded || | ||
conn.readableEnded || | ||
conn.closed || | ||
conn.destroyed || | ||
conn.errored | ||
) { | ||
return Promise.resolve(); | ||
} | ||
return new Promise(function (resolve, reject) { | ||
conn.on('end', resolve); | ||
conn.on('error', reject); | ||
conn.end(); | ||
}); | ||
}; | ||
this.invoke = promisify(function(msg, callback) { | ||
@@ -23,0 +41,0 @@ if (!msg.type) msg.type = constants.messageType.methodCall; |
{ | ||
"name": "@httptoolkit/dbus-native", | ||
"author": "Tim Perry <tim@httptoolkit.com>", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "dbus", |
@@ -31,11 +31,3 @@ # @httptoolkit/dbus-native [![Build Status](https://github.com/httptoolkit/dbus-native/workflows/CI/badge.svg)](https://github.com/httptoolkit/dbus-native/actions) | ||
``` | ||
or | ||
```shell | ||
git clone https://github.com/httptoolkit/node-dbus # clone the repo | ||
cd node-dbus | ||
npm install # install dependencies | ||
sudo cp examples/com.github.sidorares.dbus.Example.conf /etc/dbus-1/system.d/ # if you want to test examples/service.js | ||
``` | ||
Usage | ||
@@ -42,0 +34,0 @@ ------ |
@@ -11,2 +11,3 @@ import * as stream from 'stream'; | ||
getService(name: string): DBusService; | ||
disconnect(): Promise<void>; | ||
} | ||
@@ -13,0 +14,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75195
2043
133