Skip to content

Commit

Permalink
Woking found lan devices to connect.
Browse files Browse the repository at this point in the history
  • Loading branch information
vinicioslc committed Dec 12, 2019
1 parent f9a7ec1 commit bf371ae
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 61 deletions.
101 changes: 48 additions & 53 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"diff": ">=3.5.0"
},
"dependencies": {
"lanscanner": "0.0.5",
"diff": ">=3.5.0"
"diff": ">=3.5.0",
"local-devices": "^3.0.0"
}
}
10 changes: 4 additions & 6 deletions src/adb-actions/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { execSync } from 'child_process'
import { NetHelpers } from '../ip-helpers'
const find = require('local-devices')

export class ADBInterface {
static ConnectToDevice(deviceIP: string): ADBResult {
Expand Down Expand Up @@ -122,11 +122,9 @@ export class ADBInterface {
)
return `${ipAddress} | ${nameOfDevice}`
})
console.log('ips', ips)
let moreips = await NetHelpers.getAllLanIPs()
console.log('moreips', moreips)
for (const variable of moreips) {
ips.push(variable)
const foundedIPS = await find()
for (const foundIP of foundedIPS.map(fdevice => fdevice.ip)) {
ips.push(foundIP)
}
return ips
}
Expand Down

0 comments on commit bf371ae

Please sign in to comment.