Comparing version 2.6.2 to 2.7.0
@@ -1,2 +0,2 @@ | ||
var ClearCommand, Client, Connection, ForwardCommand, FrameBufferCommand, GetDevicePathCommand, GetFeaturesCommand, GetPackagesCommand, GetPropertiesCommand, GetSerialNoCommand, GetStateCommand, HostConnectCommand, HostDevicesCommand, HostDevicesWithPathsCommand, HostDisconnectCommand, HostKillCommand, HostTrackDevicesCommand, HostTransportCommand, HostVersionCommand, InstallCommand, IsInstalledCommand, ListForwardsCommand, LocalCommand, LogCommand, Logcat, LogcatCommand, Monkey, MonkeyCommand, Parser, ProcStat, Promise, RebootCommand, RemountCommand, ScreencapCommand, ShellCommand, StartActivityCommand, StartServiceCommand, Sync, SyncCommand, TcpCommand, TcpIpCommand, TcpUsbServer, TrackJdwpCommand, UninstallCommand, UsbCommand, WaitBootCompleteCommand, WaitForDeviceCommand, debug; | ||
var ClearCommand, Client, Connection, ForwardCommand, FrameBufferCommand, GetDevicePathCommand, GetFeaturesCommand, GetPackagesCommand, GetPropertiesCommand, GetSerialNoCommand, GetStateCommand, HostConnectCommand, HostDevicesCommand, HostDevicesWithPathsCommand, HostDisconnectCommand, HostKillCommand, HostTrackDevicesCommand, HostTransportCommand, HostVersionCommand, InstallCommand, IsInstalledCommand, ListForwardsCommand, ListReversesCommand, LocalCommand, LogCommand, Logcat, LogcatCommand, Monkey, MonkeyCommand, Parser, ProcStat, Promise, RebootCommand, RemountCommand, ReverseCommand, ScreencapCommand, ShellCommand, StartActivityCommand, StartServiceCommand, Sync, SyncCommand, TcpCommand, TcpIpCommand, TcpUsbServer, TrackJdwpCommand, UninstallCommand, UsbCommand, WaitBootCompleteCommand, WaitForDeviceCommand, debug; | ||
@@ -49,2 +49,4 @@ Monkey = require('adbkit-monkey'); | ||
ListReversesCommand = require('./command/host-transport/listreverses'); | ||
LocalCommand = require('./command/host-transport/local'); | ||
@@ -62,2 +64,4 @@ | ||
ReverseCommand = require('./command/host-transport/reverse'); | ||
ScreencapCommand = require('./command/host-transport/screencap'); | ||
@@ -256,2 +260,14 @@ | ||
Client.prototype.reverse = function(serial, remote, local, callback) { | ||
return this.transport(serial).then(function(transport) { | ||
return new ReverseCommand(transport).execute(remote, local).nodeify(callback); | ||
}); | ||
}; | ||
Client.prototype.listReverses = function(serial, callback) { | ||
return this.transport(serial).then(function(transport) { | ||
return new ListReversesCommand(transport).execute(); | ||
}).nodeify(callback); | ||
}; | ||
Client.prototype.transport = function(serial, callback) { | ||
@@ -258,0 +274,0 @@ return this.connection().then(function(conn) { |
{ | ||
"name": "adbkit", | ||
"version": "2.6.2", | ||
"version": "2.7.0", | ||
"description": "A pure Node.js client for the Android Debug Bridge.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -549,2 +549,16 @@ # adbkit | ||
#### client.listReverses(serial[, callback]) | ||
Lists forwarded connections on the device. This is analogous to `adb reverse --list`. | ||
* **serial** The serial number of the device. Corresponds to the device ID in `client.listDevices()`. | ||
* **callback(err, forwards)** Optional. Use this or the returned `Promise`. | ||
- **err** `null` when successful, `Error` otherwise. | ||
- **reverses** An array of reverse objects with the following properties: | ||
* **remote** The remote endpoint on the device. Same format as `client.reverse()`'s `remote` argument. | ||
* **local** The local endpoint on the host. Same format as `client.reverse()`'s `local` argument. | ||
* Returns: `Promise` | ||
* Resolves with: `reverses` (see callback) | ||
#### client.openLocal(serial, path[, callback]) | ||
@@ -696,2 +710,18 @@ | ||
#### client.reverse(serial, remote, local[, callback]) | ||
Reverses socket connections from the device (remote) to the ADB server host (local). This is analogous to `adb reverse <remote> <local>`. It's important to note that if you are connected to a remote ADB server, the reverse will be created on that host. | ||
* **serial** The serial number of the device. Corresponds to the device ID in `client.listDevices()`. | ||
* **remote** A string representing the remote endpoint on the device. At time of writing, can be one of: | ||
- `tcp:<port>` | ||
- `localabstract:<unix domain socket name>` | ||
- `localreserved:<unix domain socket name>` | ||
- `localfilesystem:<unix domain socket name>` | ||
* **local** A string representing the local endpoint on the ADB host. At time of writing, can be any value accepted by the `remote` argument. | ||
* **callback(err)** Optional. Use this or the returned `Promise`. | ||
- **err** `null` when successful, `Error` otherwise. | ||
* Returns: `Promise` | ||
* Resolves with: `true` | ||
#### client.screencap(serial[, callback]) | ||
@@ -698,0 +728,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
220896
71
4406
1122