diff --git a/desktop/flipper-common/src/server-types.tsx b/desktop/flipper-common/src/server-types.tsx index d29d07479..344b344a7 100644 --- a/desktop/flipper-common/src/server-types.tsx +++ b/desktop/flipper-common/src/server-types.tsx @@ -280,6 +280,7 @@ type ENVIRONMENT_PATHS = export interface ExecOptions { maxBuffer?: number; timeout?: number; + cwd?: string; } export interface ExecError { diff --git a/desktop/plugins/public/kaios-allocations/index.tsx b/desktop/plugins/public/kaios-allocations/index.tsx index 678b571bc..c612edaf2 100644 --- a/desktop/plugins/public/kaios-allocations/index.tsx +++ b/desktop/plugins/public/kaios-allocations/index.tsx @@ -23,11 +23,11 @@ import { import {sleep} from 'flipper'; import util from 'util'; -import {exec} from 'promisify-child-process'; import FirefoxClient from 'firefox-client'; import BaseClientMethods from 'firefox-client/lib/client-methods'; 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 // 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() { - await exec( + await getFlipperLib().removeNodeAPI.childProcess.exec( 'adb forward tcp:6000 localfilesystem:/data/local/debugger-socket', ); await this.connectToDebugApi(); diff --git a/desktop/plugins/public/kaios-allocations/package.json b/desktop/plugins/public/kaios-allocations/package.json index d833c52a6..46a068b77 100644 --- a/desktop/plugins/public/kaios-allocations/package.json +++ b/desktop/plugins/public/kaios-allocations/package.json @@ -30,8 +30,7 @@ "patch-package": "^6.2.0" }, "dependencies": { - "firefox-client": "0.3.0", - "promisify-child-process": "^4.1.0" + "firefox-client": "0.3.0" }, "resolutions": { "minimist": "1.2.3" diff --git a/desktop/plugins/public/kaios-ram/index.tsx b/desktop/plugins/public/kaios-ram/index.tsx index e5b149970..31670bb3d 100644 --- a/desktop/plugins/public/kaios-ram/index.tsx +++ b/desktop/plugins/public/kaios-ram/index.tsx @@ -25,7 +25,7 @@ import { } from 'recharts'; import adb from 'adbkit'; -import {exec} from 'promisify-child-process'; +import {getFlipperLib} from 'flipper-plugin'; const PALETTE = [ '#FFD700', @@ -81,7 +81,7 @@ export default class KaiOSGraphs extends FlipperDevicePlugin { async init() { try { - await exec('adb root'); + await getFlipperLib().removeNodeAPI.childProcess.exec('adb root'); } catch (e) { console.error('Error obtaining root on the device', e); } diff --git a/desktop/plugins/public/kaios-ram/package.json b/desktop/plugins/public/kaios-ram/package.json index 04694a3f6..197f68fa3 100644 --- a/desktop/plugins/public/kaios-ram/package.json +++ b/desktop/plugins/public/kaios-ram/package.json @@ -24,8 +24,7 @@ "url": "https://github.com/facebook/flipper/issues" }, "dependencies": { - "promisify-child-process": "^4.1.0", - "recharts": "2.0.9", - "d3-array": "2.3.3" + "d3-array": "2.3.3", + "recharts": "2.0.9" } } diff --git a/desktop/plugins/public/package.json b/desktop/plugins/public/package.json index 447066a49..e6473ecc8 100644 --- a/desktop/plugins/public/package.json +++ b/desktop/plugins/public/package.json @@ -7,8 +7,7 @@ "*" ], "nohoist": [ - "flipper-plugin-kaios-big-allocations/firefox-client", - "flipper-plugin-kaios-big-allocations/patch-package" + "flipper-plugin-kaios-big-allocations/**" ] }, "bugs": { diff --git a/desktop/plugins/public/yarn.lock b/desktop/plugins/public/yarn.lock index b4a5175f2..47873d490 100644 --- a/desktop/plugins/public/yarn.lock +++ b/desktop/plugins/public/yarn.lock @@ -1478,11 +1478,6 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" 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: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"