Remove child_process from kaios-allocation, kaios-ram, uiqr
Summary: Changelog: Remove child_process usage from kaios-allocation, kaios-ram plugins Facebok: Remove child_process usage from uiqr plugin Reviewed By: mweststrate Differential Revision: D32881860 fbshipit-source-id: 4270aaf28808baee399e263a6a7528f20242784f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9df3437683
commit
a87b99cd3d
@@ -280,6 +280,7 @@ type ENVIRONMENT_PATHS =
|
|||||||
export interface ExecOptions {
|
export interface ExecOptions {
|
||||||
maxBuffer?: number;
|
maxBuffer?: number;
|
||||||
timeout?: number;
|
timeout?: number;
|
||||||
|
cwd?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExecError {
|
export interface ExecError {
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ import {
|
|||||||
import {sleep} from 'flipper';
|
import {sleep} from 'flipper';
|
||||||
|
|
||||||
import util from 'util';
|
import util from 'util';
|
||||||
import {exec} from 'promisify-child-process';
|
|
||||||
|
|
||||||
import FirefoxClient from 'firefox-client';
|
import FirefoxClient from 'firefox-client';
|
||||||
import BaseClientMethods from 'firefox-client/lib/client-methods';
|
import BaseClientMethods from 'firefox-client/lib/client-methods';
|
||||||
import extend from 'firefox-client/lib/extend';
|
import extend from 'firefox-client/lib/extend';
|
||||||
|
import {getFlipperLib} from 'flipper-plugin';
|
||||||
|
|
||||||
// This uses legacy `extend` from `firefox-client`, since this seems to be what the implementation expects
|
// This uses legacy `extend` from `firefox-client`, since this seems to be what the implementation expects
|
||||||
// It's probably possible to rewrite this in a modern way and properly type it, but for now leaving this as it is
|
// It's probably possible to rewrite this in a modern way and properly type it, but for now leaving this as it is
|
||||||
@@ -262,7 +262,7 @@ export default class AllocationsPlugin extends FlipperDevicePlugin<
|
|||||||
}
|
}
|
||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
await exec(
|
await getFlipperLib().removeNodeAPI.childProcess.exec(
|
||||||
'adb forward tcp:6000 localfilesystem:/data/local/debugger-socket',
|
'adb forward tcp:6000 localfilesystem:/data/local/debugger-socket',
|
||||||
);
|
);
|
||||||
await this.connectToDebugApi();
|
await this.connectToDebugApi();
|
||||||
|
|||||||
@@ -30,8 +30,7 @@
|
|||||||
"patch-package": "^6.2.0"
|
"patch-package": "^6.2.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"firefox-client": "0.3.0",
|
"firefox-client": "0.3.0"
|
||||||
"promisify-child-process": "^4.1.0"
|
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"minimist": "1.2.3"
|
"minimist": "1.2.3"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import {
|
|||||||
} from 'recharts';
|
} from 'recharts';
|
||||||
|
|
||||||
import adb from 'adbkit';
|
import adb from 'adbkit';
|
||||||
import {exec} from 'promisify-child-process';
|
import {getFlipperLib} from 'flipper-plugin';
|
||||||
|
|
||||||
const PALETTE = [
|
const PALETTE = [
|
||||||
'#FFD700',
|
'#FFD700',
|
||||||
@@ -81,7 +81,7 @@ export default class KaiOSGraphs extends FlipperDevicePlugin<State, any, any> {
|
|||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
try {
|
try {
|
||||||
await exec('adb root');
|
await getFlipperLib().removeNodeAPI.childProcess.exec('adb root');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Error obtaining root on the device', e);
|
console.error('Error obtaining root on the device', e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,7 @@
|
|||||||
"url": "https://github.com/facebook/flipper/issues"
|
"url": "https://github.com/facebook/flipper/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"promisify-child-process": "^4.1.0",
|
"d3-array": "2.3.3",
|
||||||
"recharts": "2.0.9",
|
"recharts": "2.0.9"
|
||||||
"d3-array": "2.3.3"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
"*"
|
"*"
|
||||||
],
|
],
|
||||||
"nohoist": [
|
"nohoist": [
|
||||||
"flipper-plugin-kaios-big-allocations/firefox-client",
|
"flipper-plugin-kaios-big-allocations/**"
|
||||||
"flipper-plugin-kaios-big-allocations/patch-package"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|||||||
@@ -1478,11 +1478,6 @@ process@^0.11.10:
|
|||||||
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
|
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
|
||||||
integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
|
integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
|
||||||
|
|
||||||
promisify-child-process@^4.1.0:
|
|
||||||
version "4.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/promisify-child-process/-/promisify-child-process-4.1.1.tgz#290659e079f9c7bd46708404d4488a1a6b802686"
|
|
||||||
integrity sha512-/sRjHZwoXf1rJ+8s4oWjYjGRVKNK1DUnqfRC1Zek18pl0cN6k3yJ1cCbqd0tWNe4h0Gr+SY4vR42N33+T82WkA==
|
|
||||||
|
|
||||||
prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2:
|
prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2:
|
||||||
version "15.7.2"
|
version "15.7.2"
|
||||||
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
|
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
|
||||||
|
|||||||
Reference in New Issue
Block a user