Hide PWA app from Spotlight

Reviewed By: LukeDefeo

Differential Revision: D50411182

fbshipit-source-id: 46c089c69aefb58f85a861c7898ee355f094e03c
This commit is contained in:
Andrey Goncharov
2023-10-20 05:13:20 -07:00
committed by Facebook GitHub Bot
parent a8be443670
commit aea77cc4da
7 changed files with 85 additions and 31 deletions

View File

@@ -1,29 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import path from 'path';
import fs from 'fs-extra';
import os from 'os';
export async function findInstallation(): Promise<string | undefined> {
if (os.platform() !== 'darwin') {
return;
}
const appPath = path.join(
os.homedir(),
'Applications',
'Chrome Apps.localized',
'Flipper.app',
);
const appPlistPath = path.join(appPath, 'Contents', 'Info.plist');
if (await fs.pathExists(appPlistPath)) {
return appPath;
}
}

View File

@@ -31,8 +31,7 @@ import {
} from 'flipper-server-core';
import {addLogTailer, isTest, LoggerFormat} from 'flipper-common';
import exitHook from 'exit-hook';
import {getAuthToken} from 'flipper-server-core';
import {findInstallation} from './findInstallation';
import {getAuthToken, findInstallation} from 'flipper-server-core';
const argv = yargs
.usage('yarn flipper-server [args]')