use adbkit instead of adbkit-fb
Summary: Finally we are able to switch back from our adbkit-fb fork to the original `adbkit`. Replacing all imports Reviewed By: jknoxville Differential Revision: D17343236 fbshipit-source-id: e6dd328f1a956544e8be2ab768aa270972463c6b
This commit is contained in:
committed by
Facebook Github Bot
parent
b3de081f68
commit
e33f72bb21
@@ -35,7 +35,8 @@
|
||||
]
|
||||
},
|
||||
"resolutions": {
|
||||
"@jest-runner/electron/electron": "5.0.8"
|
||||
"@jest-runner/electron/electron": "5.0.8",
|
||||
"adbkit/adbkit-logcat": "2"
|
||||
},
|
||||
"jest": {
|
||||
"transform": {
|
||||
@@ -99,7 +100,8 @@
|
||||
"@types/rsocket-tcp-server": "^0.0.2",
|
||||
"@types/which": "^1.3.1",
|
||||
"JSONStream": "^1.3.1",
|
||||
"adbkit-fb": "2.10.1",
|
||||
"adbkit": "^2.11.1",
|
||||
"adbkit-logcat": "^2.0.1",
|
||||
"ansi-to-html": "^0.6.3",
|
||||
"async-mutex": "^0.1.3",
|
||||
"chalk": "^2.3.0",
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import BaseDevice, {DeviceType, DeviceShell, LogLevel} from './BaseDevice';
|
||||
import adb, {Client as ADBClient} from 'adbkit-fb';
|
||||
import {Priority} from 'adbkit-logcat-fb';
|
||||
import child_process from 'child_process';
|
||||
import {spawn} from 'promisify-child-process';
|
||||
import BaseDevice, {DeviceType, LogLevel} from './BaseDevice';
|
||||
import adb, {Client as ADBClient} from 'adbkit';
|
||||
import {Priority} from 'adbkit-logcat';
|
||||
import ArchivedDevice from './ArchivedDevice';
|
||||
import {createWriteStream} from 'fs';
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import {getAdbClient} from '../utils/adbClient';
|
||||
import {default as which} from 'which';
|
||||
import {promisify} from 'util';
|
||||
import {ServerPorts} from '../reducers/application';
|
||||
import {Client as ADBClient} from 'adbkit-fb';
|
||||
import {Client as ADBClient} from 'adbkit';
|
||||
|
||||
function createDevice(
|
||||
adbClient: ADBClient,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {FlipperDevicePlugin, Device} from 'flipper';
|
||||
import adb from 'adbkit-fb';
|
||||
import {FlipperDevicePlugin, Device, AndroidDevice} from 'flipper';
|
||||
import adb, {Client as ADBClient} from 'adbkit';
|
||||
import TemperatureTable from './TemperatureTable';
|
||||
|
||||
import {
|
||||
@@ -23,10 +23,6 @@ import {
|
||||
} from 'flipper';
|
||||
import React from 'react';
|
||||
|
||||
type ADBClient = any;
|
||||
type AndroidDevice = {
|
||||
adb: ADBClient;
|
||||
};
|
||||
type TableRows = any;
|
||||
|
||||
// we keep vairable name with underline for to physical path mappings on device
|
||||
@@ -131,7 +127,6 @@ export default class CPUFrequencyTable extends FlipperDevicePlugin<
|
||||
any,
|
||||
any
|
||||
> {
|
||||
adbClient: ADBClient;
|
||||
intervalID: NodeJS.Timer | null = null;
|
||||
state: CPUState = {
|
||||
cpuCount: 0,
|
||||
@@ -150,9 +145,6 @@ export default class CPUFrequencyTable extends FlipperDevicePlugin<
|
||||
}
|
||||
|
||||
init() {
|
||||
const device = (this.device as any) as AndroidDevice;
|
||||
this.adbClient = device.adb;
|
||||
|
||||
this.updateHardwareInfo();
|
||||
this.readThermalZones();
|
||||
|
||||
@@ -188,7 +180,7 @@ export default class CPUFrequencyTable extends FlipperDevicePlugin<
|
||||
}, 'cat /sys/devices/system/cpu/possible');
|
||||
}
|
||||
executeShell = (callback: ShellCallBack, command: string) => {
|
||||
return this.adbClient
|
||||
return (this.device as AndroidDevice).adb
|
||||
.shell(this.device.serial, command)
|
||||
.then(adb.util.readAll)
|
||||
.then(function(output: {toString: () => {trim: () => string}}) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"main": "index.tsx",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"adbkit-fb": "2.10.1"
|
||||
"adbkit": "^2.11.1"
|
||||
},
|
||||
"title": "CPU",
|
||||
"icon": "underline",
|
||||
|
||||
@@ -2,23 +2,10 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
adbkit-fb@2.10.1:
|
||||
version "2.10.1"
|
||||
resolved "https://registry.yarnpkg.com/adbkit-fb/-/adbkit-fb-2.10.1.tgz#accd6209d8da9388124ace97f4fc3047aead18cc"
|
||||
integrity sha512-ERq2JXpDkr/tpSDYKwQ4SbBakozBWnWbz3Pjc8EQ1bGCzxD0XkAnUjTaW4ANX9ijrj/fWgrCqp3FDTNq8fIYDQ==
|
||||
dependencies:
|
||||
adbkit-logcat-fb "^1.1.0"
|
||||
adbkit-monkey "~1.0.1"
|
||||
bluebird "~2.9.24"
|
||||
commander "^2.3.0"
|
||||
debug "~2.6.3"
|
||||
node-forge "^0.7.1"
|
||||
split "~0.3.3"
|
||||
|
||||
adbkit-logcat-fb@^1.1.0:
|
||||
adbkit-logcat@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/adbkit-logcat-fb/-/adbkit-logcat-fb-1.1.0.tgz#af6416c7be95c18220a128a320276602881ec6b7"
|
||||
integrity sha512-4A4gpQk0Y+xryVvQRkXFTMiqRauwGDQU5CKujymtcS/CQP78oDWfHkbjtm2ryc7O9DqrMlnsGRch1q41ErXJlA==
|
||||
resolved "https://registry.yarnpkg.com/adbkit-logcat/-/adbkit-logcat-1.1.0.tgz#01d7f9b0cef9093a30bcb3b007efff301508962f"
|
||||
integrity sha1-Adf5sM75CTowvLOwB+//MBUIli8=
|
||||
|
||||
adbkit-monkey@~1.0.1:
|
||||
version "1.0.1"
|
||||
@@ -27,6 +14,19 @@ adbkit-monkey@~1.0.1:
|
||||
dependencies:
|
||||
async "~0.2.9"
|
||||
|
||||
adbkit@^2.11.1:
|
||||
version "2.11.1"
|
||||
resolved "https://registry.yarnpkg.com/adbkit/-/adbkit-2.11.1.tgz#7da847fe561254f3121088947bc1907ef053e894"
|
||||
integrity sha512-hDTiRg9NX3HQt7WoDAPCplUpvzr4ZzQa2lq7BdTTJ/iOZ6O7YNAs6UYD8sFAiBEcYHDRIyq3cm9sZP6uZnhvXw==
|
||||
dependencies:
|
||||
adbkit-logcat "^1.1.0"
|
||||
adbkit-monkey "~1.0.1"
|
||||
bluebird "~2.9.24"
|
||||
commander "^2.3.0"
|
||||
debug "~2.6.3"
|
||||
node-forge "^0.7.1"
|
||||
split "~0.3.3"
|
||||
|
||||
async@~0.2.9:
|
||||
version "0.2.10"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
|
||||
@@ -38,9 +38,9 @@ bluebird@~2.9.24:
|
||||
integrity sha1-L3tOyAIWMoqf3evfacjUlC/v99g=
|
||||
|
||||
commander@^2.3.0:
|
||||
version "2.18.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970"
|
||||
integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==
|
||||
version "2.20.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
|
||||
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
|
||||
|
||||
debug@~2.6.3:
|
||||
version "2.6.9"
|
||||
|
||||
@@ -20,7 +20,7 @@ import {reportPlatformFailures} from './metrics';
|
||||
import {getAdbClient} from './adbClient';
|
||||
import * as androidUtil from './androidContainerUtility';
|
||||
import os from 'os';
|
||||
import {Client as ADBClient} from 'adbkit-fb';
|
||||
import {Client as ADBClient} from 'adbkit';
|
||||
|
||||
const tmpFile = promisify(tmp.file) as (
|
||||
options?: FileOptions,
|
||||
|
||||
@@ -9,7 +9,7 @@ import {promisify} from 'util';
|
||||
import child_process from 'child_process';
|
||||
import promiseRetry from 'promise-retry';
|
||||
import adbConfig from '../utils/adbConfig';
|
||||
import adbkit, {Client} from 'adbkit-fb';
|
||||
import adbkit, {Client} from 'adbkit';
|
||||
|
||||
const MAX_RETRIES = 5;
|
||||
let instance: Promise<Client>;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
import {getAdbClient} from './adbClient';
|
||||
import {UnsupportedError} from './metrics';
|
||||
import adbkit from 'adbkit-fb';
|
||||
import adbkit from 'adbkit';
|
||||
|
||||
const allowedAppNameRegex = /^[a-zA-Z0-9._\-]+$/;
|
||||
const appNotDebuggableRegex = /debuggable/;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// This module declaration is a stub!
|
||||
// Please extend this as needed.
|
||||
|
||||
declare module 'adbkit-logcat-fb' {
|
||||
declare module 'adbkit-logcat' {
|
||||
type PriorityValue = number;
|
||||
|
||||
interface Reader extends NodeJS.EventEmitter {
|
||||
@@ -41,7 +41,7 @@ interface DeviceTracker extends NodeJS.EventEmitter {
|
||||
on(event: 'end', listener: () => void): this;
|
||||
}
|
||||
|
||||
declare module 'adbkit-fb' {
|
||||
declare module 'adbkit' {
|
||||
const util: Util;
|
||||
const adbkit: any;
|
||||
export interface Client {
|
||||
@@ -62,7 +62,8 @@ declare module 'adbkit-fb' {
|
||||
options?: {
|
||||
clear?: boolean;
|
||||
},
|
||||
) => Promise<import('adbkit-logcat-fb').Reader>;
|
||||
callback?: any,
|
||||
) => Promise<import('adbkit-logcat').Reader>;
|
||||
getProperties: (serial: string) => Promise<{[key: string]: string}>;
|
||||
trackDevices: () => Promise<DeviceTracker>;
|
||||
kill: () => Promise<boolean>;
|
||||
34
yarn.lock
34
yarn.lock
@@ -1434,23 +1434,10 @@ acorn@^7.0.0:
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.0.0.tgz#26b8d1cd9a9b700350b71c0905546f64d1284e7a"
|
||||
integrity sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ==
|
||||
|
||||
adbkit-fb@2.10.1:
|
||||
version "2.10.1"
|
||||
resolved "https://registry.yarnpkg.com/adbkit-fb/-/adbkit-fb-2.10.1.tgz#accd6209d8da9388124ace97f4fc3047aead18cc"
|
||||
integrity sha512-ERq2JXpDkr/tpSDYKwQ4SbBakozBWnWbz3Pjc8EQ1bGCzxD0XkAnUjTaW4ANX9ijrj/fWgrCqp3FDTNq8fIYDQ==
|
||||
dependencies:
|
||||
adbkit-logcat-fb "^1.1.0"
|
||||
adbkit-monkey "~1.0.1"
|
||||
bluebird "~2.9.24"
|
||||
commander "^2.3.0"
|
||||
debug "~2.6.3"
|
||||
node-forge "^0.7.1"
|
||||
split "~0.3.3"
|
||||
|
||||
adbkit-logcat-fb@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/adbkit-logcat-fb/-/adbkit-logcat-fb-1.1.0.tgz#af6416c7be95c18220a128a320276602881ec6b7"
|
||||
integrity sha512-4A4gpQk0Y+xryVvQRkXFTMiqRauwGDQU5CKujymtcS/CQP78oDWfHkbjtm2ryc7O9DqrMlnsGRch1q41ErXJlA==
|
||||
adbkit-logcat@2, adbkit-logcat@^1.1.0, adbkit-logcat@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/adbkit-logcat/-/adbkit-logcat-2.0.1.tgz#d4986b9fc7cfda42733389d46a52124abef43ca5"
|
||||
integrity sha512-MznVzzEzcrWhIaIyblll+a0AL1TICJe/yuaia7HDYTAtiNabR/9amJkAnLt30U8/W7MVBc3mvU1jB/6MJ/TYHw==
|
||||
|
||||
adbkit-monkey@~1.0.1:
|
||||
version "1.0.1"
|
||||
@@ -1459,6 +1446,19 @@ adbkit-monkey@~1.0.1:
|
||||
dependencies:
|
||||
async "~0.2.9"
|
||||
|
||||
adbkit@^2.11.1:
|
||||
version "2.11.1"
|
||||
resolved "https://registry.yarnpkg.com/adbkit/-/adbkit-2.11.1.tgz#7da847fe561254f3121088947bc1907ef053e894"
|
||||
integrity sha512-hDTiRg9NX3HQt7WoDAPCplUpvzr4ZzQa2lq7BdTTJ/iOZ6O7YNAs6UYD8sFAiBEcYHDRIyq3cm9sZP6uZnhvXw==
|
||||
dependencies:
|
||||
adbkit-logcat "^1.1.0"
|
||||
adbkit-monkey "~1.0.1"
|
||||
bluebird "~2.9.24"
|
||||
commander "^2.3.0"
|
||||
debug "~2.6.3"
|
||||
node-forge "^0.7.1"
|
||||
split "~0.3.3"
|
||||
|
||||
address@^1.0.1:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/address/-/address-1.1.0.tgz#ef8e047847fcd2c5b6f50c16965f924fd99fe709"
|
||||
|
||||
Reference in New Issue
Block a user