mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 04:53:19 +02:00
Revert all adbkit upgrades (#207)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
var syrup = require('@devicefarmer/stf-syrup')
|
||||
var path = require('path')
|
||||
|
||||
var DeviceClient = require('@devicefarmer/adbkit/dist/src/adb/DeviceClient').default
|
||||
var logger = require('../../../util/logger')
|
||||
var wire = require('../../../wire')
|
||||
var wireutil = require('../../../wire/util')
|
||||
@@ -12,16 +11,15 @@ module.exports = syrup.serial()
|
||||
.dependency(require('../support/push'))
|
||||
.dependency(require('../support/storage'))
|
||||
.define(function(options, adb, router, push, storage) {
|
||||
var deviceClient = new DeviceClient(adb, options.serial)
|
||||
var log = logger.createLogger('device:plugins:filesystem')
|
||||
var plugin = Object.create(null)
|
||||
|
||||
plugin.retrieve = function(file) {
|
||||
log.info('Retrieving file "%s"', file)
|
||||
|
||||
return deviceClient.stat(file)
|
||||
return adb.stat(options.serial, file)
|
||||
.then(function(stats) {
|
||||
return deviceClient.pull(file)
|
||||
return adb.pull(options.serial, file)
|
||||
.then(function(transfer) {
|
||||
// We may have add new storage plugins for various file types
|
||||
// in the future, and add proper detection for the mimetype.
|
||||
@@ -56,7 +54,7 @@ module.exports = syrup.serial()
|
||||
|
||||
router.on(wire.FileSystemListMessage, function(channel, message) {
|
||||
var reply = wireutil.reply(options.serial)
|
||||
deviceClient.readdir(message.dir)
|
||||
adb.readdir(options.serial, message.dir)
|
||||
.then(function(files) {
|
||||
push.send([
|
||||
channel
|
||||
|
||||
Reference in New Issue
Block a user