Socket
Socket
Sign inDemoInstall

adb-driver

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adb-driver - npm Package Compare versions

Comparing version 0.0.7 to 0.1.0

lib/AdbDriver.ts

42

package.json
{
"name": "adb-driver",
"version": "0.0.7",
"version": "0.1.0",
"description": "A ADB(Android Debugging Bridge) command executor",
"main": "index.js",
"main": "build/AdbDriver.js",
"license": "MIT",
"author": "cangpeng<dustyface@163.com>",
"scripts": {
"start": "node index.js"
"start": "tsc -w",
"clean": "rimraf build",
"format": "prettier \"{examples,lib,script,test}/**/*.{js,ts}\" \"*.yml\" --write",
"test": "jest",
"build": "npm run clean && tsc -p ./tsconfig.json"
},
"author": "cangpeng<dustyface@163.com>"
}
"jest": {
"testEnvironment": "node",
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testMatch": [
"**/?(*.)(spec|test).(ts|tsx|js)",
"**/__tests__/*.(ts|tsx|js)",
"**/test/*.(ts|tsx|js)"
]
},
"devDependencies": {
"@types/jest": "23.3.11",
"@types/node": "10.12.18",
"jest": "23.6.0",
"prettier": "1.15.3",
"rimraf": "2.6.3",
"ts-jest": "23.10.5",
"ts-node": "6.0.0",
"typescript": "3.2.4"
},
"gitHead": "b3cec16873e6c67289cf618ac195eb73bfb03385"
}

28

README.md
# adb-driver
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
## usage

@@ -9,13 +12,11 @@

const adbDriver = require('adb-driver')
const { exec } = adbDriver
const { execADBCommand } = adbDriver
exec(`adb devices`)
.then((result) => {
if (result instanceof Error) {
console.error(`fail to execute adb devices`)
return
}
console.info(`you can parse your devices info here: ${result}`)
})
execADBCommand(`adb devices`).then(result => {
if (result instanceof Error) {
console.error(`fail to execute adb devices`)
return
}
console.info(`you can parse your devices info here: ${result}`)
})
```

@@ -27,6 +28,6 @@

const adbDriver = require('adb-driver')
const { exec } = adbDriver
const { execADBCommand } = adbDriver
async function getDevices (callback) {
const result = await exec(`adb devices`)
async function getDevices(callback) {
const result = await execADBCommand(`adb devices`)
if (result instanceof Error) {

@@ -40,2 +41,1 @@ console.error(`fail to execute adb devices`)

```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc