diff --git a/desktop/flipper-server/src/index.tsx b/desktop/flipper-server/src/index.tsx index 482ffc81a..01c8f0aa1 100644 --- a/desktop/flipper-server/src/index.tsx +++ b/desktop/flipper-server/src/index.tsx @@ -74,12 +74,6 @@ const argv = yargs type: 'boolean', default: true, }, - tcp: { - describe: - 'Open a TCP port (--no-tcp can be specified as to use unix-domain-socket exclusively)', - type: 'boolean', - default: true, - }, replace: { describe: 'Replaces any running instance, if any.', type: 'boolean', @@ -214,7 +208,7 @@ async function start() { staticPath, entry: `index.web${argv.bundler ? '.dev' : ''}.html`, port: argv.port, - tcp: argv.tcp, + tcp: true, }); const t4 = performance.now(); @@ -308,10 +302,6 @@ async function start() { } async function launch() { - if (!argv.tcp) { - return; - } - let token: string | undefined; if (await hasAuthToken()) { token = await getAuthToken(); diff --git a/desktop/scripts/build-flipper-server-release.tsx b/desktop/scripts/build-flipper-server-release.tsx index 897083f0b..09530343f 100644 --- a/desktop/scripts/build-flipper-server-release.tsx +++ b/desktop/scripts/build-flipper-server-release.tsx @@ -90,11 +90,6 @@ const argv = yargs type: 'boolean', default: false, }, - tcp: { - describe: 'Enable TCP connections on flipper-server.', - type: 'boolean', - default: true, - }, 'rebuild-plugins': { describe: 'Enables rebuilding of default plugins on Flipper build. Only make sense in conjunction with "--no-bundled-plugins". Enabled by default, but if disabled using "--no-plugin-rebuild", then plugins are just released as is without rebuilding. This can save some time if you know plugin bundles are already up-to-date.', @@ -356,29 +351,17 @@ async function runPostBuildAction(archive: string, dir: string) { // didn't change console.log(`⚙️ Installing flipper-server.tgz using npx`); await fs.remove(path.join(homedir(), '.npm', '_npx')); - await spawn( - 'npx', - [ - archive, - argv.open ? '--open' : '--no-open', - argv.tcp ? '--tcp' : '--no-tcp', - ], - { - stdio: 'inherit', - shell: true, - }, - ); + await spawn('npx', [archive, argv.open ? '--open' : '--no-open'], { + stdio: 'inherit', + shell: true, + }); } else if (argv.start) { console.log(`⚙️ Starting flipper-server from build dir`); - await spawn( - './server.js', - [argv.open ? '--open' : '--no-open', argv.tcp ? '--tcp' : '--no-tcp'], - { - cwd: dir, - stdio: 'inherit', - shell: true, - }, - ); + await spawn('./server.js', [argv.open ? '--open' : '--no-open'], { + cwd: dir, + stdio: 'inherit', + shell: true, + }); } } diff --git a/desktop/scripts/build-utils.tsx b/desktop/scripts/build-utils.tsx index 44975e0cf..314e3cc5e 100644 --- a/desktop/scripts/build-utils.tsx +++ b/desktop/scripts/build-utils.tsx @@ -384,11 +384,7 @@ export function sleep(ms: number) { let proc: child.ChildProcess | undefined; -export async function launchServer( - startBundler: boolean, - open: boolean, - tcp: boolean, -) { +export async function launchServer(startBundler: boolean, open: boolean) { if (proc) { console.log('⚙️ Killing old flipper-server...'); proc.kill(9); @@ -401,7 +397,6 @@ export async function launchServer( `../flipper-server/server.js`, startBundler ? `--bundler` : `--no-bundler`, open ? `--open` : `--no-open`, - tcp ? `--tcp` : `--no-tcp`, ], { cwd: serverDir, diff --git a/desktop/scripts/start-flipper-server-dev.tsx b/desktop/scripts/start-flipper-server-dev.tsx index fd407495d..aae4740e5 100644 --- a/desktop/scripts/start-flipper-server-dev.tsx +++ b/desktop/scripts/start-flipper-server-dev.tsx @@ -44,11 +44,6 @@ const argv = yargs '[FB-internal only] Will force using public sources only, to be able to iterate quickly on the public version. If sources are checked out from GitHub this is already the default. Setting env var "FLIPPER_FORCE_PUBLIC_BUILD" is equivalent.', type: 'boolean', }, - tcp: { - describe: 'Enable TCP connections on flipper-server.', - type: 'boolean', - default: true, - }, channel: { description: 'Release channel for the build', choices: ['stable', 'insiders'], @@ -108,7 +103,7 @@ async function copyStaticResources() { async function restartServer() { try { await compileServerMain(true); - await launchServer(true, ++startCount === 1, argv.tcp); // only open on the first time + await launchServer(true, ++startCount === 1); // only open on the first time } catch (e) { console.error( chalk.red(