Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
merge doctor into flipper-server
Browse files Browse the repository at this point in the history
Summary:
* hg move doctor/src to flipper-server/src/doctor
* update imports
* move dependencies from doctor/package.json to flipper-server/package.json
* remove doctor
* remove mentions of doctor from build/tsconfigs

Reviewed By: LukeDefeo

Differential Revision: D59220610

fbshipit-source-id: 9f44c2a6be510b28552b43ae7e0bbb1cb024d0f2
  • Loading branch information
antonk52 authored and facebook-github-bot committed Jul 1, 2024
1 parent a05cb66 commit a17d3d6
Show file tree
Hide file tree
Showing 19 changed files with 15 additions and 99 deletions.
14 changes: 0 additions & 14 deletions desktop/doctor/.eslintrc.js

This file was deleted.

8 changes: 0 additions & 8 deletions desktop/doctor/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions desktop/doctor/jestconfig.json

This file was deleted.

32 changes: 0 additions & 32 deletions desktop/doctor/package.json

This file was deleted.

13 changes: 0 additions & 13 deletions desktop/doctor/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions desktop/doctor/tslint.json

This file was deleted.

4 changes: 3 additions & 1 deletion desktop/flipper-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
"bugs": "https://github.com/facebook/flipper/issues",
"dependencies": {
"chalk": "^4",
"envinfo": "^7.8.1",
"exit-hook": "^2.1.1",
"express": "^4.17.3",
"fb-watchman": "^2.0.2",
"file-stream-rotator": "^0.6.1",
"flipper-common": "0.0.0",
"flipper-pkg-lib": "0.0.0",
Expand All @@ -31,7 +33,6 @@
"archiver": "^5.3.1",
"async-mutex": "^0.3.2",
"axios": "^0.26.0",
"flipper-doctor": "0.0.0",
"flipper-plugin-lib": "0.0.0",
"form-data": "^4.0.0",
"invariant": "^2.2.4",
Expand All @@ -56,6 +57,7 @@
},
"devDependencies": {
"@types/express": "^4.17.13",
"@types/fb-watchman": "^2.0.1",
"@types/http-proxy": "^1.17.8",
"@types/node": "^17.0.31",
"@types/archiver": "^5.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export function getHealthchecks(
run: async (
_: FlipperDoctor.EnvironmentInfo,
): Promise<FlipperDoctor.HealthcheckRunResult> => {
// eslint-disable-next-line node/no-sync
const hasProblem = !fs.existsSync(
'/Applications/Android Studio.app',
);
Expand Down Expand Up @@ -106,6 +107,7 @@ export function getHealthchecks(
hasProblem: true,
message: ['android.sdk--no_ANDROID_HOME'],
};
// eslint-disable-next-line node/no-sync
} else if (!fs.existsSync(androidHome)) {
const androidStudioAndroidHome = `${os.homedir()}/Library/Android/sdk`;
const globalAndroidHome = '/opt/android_sdk';
Expand All @@ -125,6 +127,7 @@ export function getHealthchecks(
};
} else {
const platformToolsDir = path.join(androidHome, 'platform-tools');
// eslint-disable-next-line node/no-sync
if (!fs.existsSync(platformToolsDir)) {
return {
hasProblem: true,
Expand Down
2 changes: 1 addition & 1 deletion desktop/flipper-server/src/utils/runHealthchecks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @format
*/

import {getHealthchecks, getEnvInfo} from 'flipper-doctor';
import {getHealthchecks, getEnvInfo} from '../doctor';
import {FlipperDoctor} from 'flipper-common';
import produce from 'immer';

Expand Down
3 changes: 0 additions & 3 deletions desktop/flipper-server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
},
"include": ["./src/**/*"],
"references": [
{
"path": "../doctor"
},
{
"path": "../flipper-common"
},
Expand Down
2 changes: 1 addition & 1 deletion desktop/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
'^flipper-plugin$': '<rootDir>/flipper-plugin/src',
'^flipper-(server-core|ui-core|frontend-core|common)$':
'<rootDir>/flipper-$1/src',
'^flipper-(pkg|pkg-lib|doctor|test-utils)$': '<rootDir>/$1/src',
'^flipper-(pkg|pkg-lib|test-utils)$': '<rootDir>/$1/src',
'^.+\\.(css|scss)$': '<rootDir>/scripts/jest-css-stub.js',
},
clearMocks: true,
Expand Down
1 change: 0 additions & 1 deletion desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@
"packages": [
"scripts",
"babel-transformer",
"doctor",
"pkg",
"pkg-lib",
"flipper-common",
Expand Down
1 change: 0 additions & 1 deletion desktop/scripts/build-flipper-server-release.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ async function linkLocalDeps(buildFolder: string) {

const resolutions = {
...manifest.resolutions,
'flipper-doctor': `file:${rootDir}/doctor`,
'flipper-common': `file:${rootDir}/flipper-common`,
'flipper-server-client': `file:${rootDir}/flipper-server-client`,
'flipper-pkg-lib': `file:${rootDir}/pkg-lib`,
Expand Down
8 changes: 1 addition & 7 deletions desktop/scripts/start-flipper-server-dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,7 @@ async function startWatchChanges() {
// We only watch for changes that might affect the server.
// For UI changes, Metro / hot module reloading / fast refresh take care of the changes
await Promise.all(
[
'doctor',
'pkg-lib',
'plugin-lib',
'flipper-common',
'flipper-server',
].map((dir) =>
['pkg-lib', 'plugin-lib', 'flipper-common', 'flipper-server'].map((dir) =>
watchman.startWatchFiles(
dir,
() => {
Expand Down
3 changes: 0 additions & 3 deletions desktop/tsc-root/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
{
"path": "../pkg-lib"
},
{
"path": "../doctor"
},
{
"path": "../eslint-plugin-flipper"
},
Expand Down
10 changes: 6 additions & 4 deletions desktop/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3369,10 +3369,12 @@
"@types/qs" "*"
"@types/serve-static" "*"

"@types/[email protected]":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@types/fb-watchman/-/fb-watchman-2.0.1.tgz#4f44c7b7ac98463488765d41d269272dd34cb815"
integrity sha512-iJ7/e6drSmuCzAp96/dpksm8YjxbhhyXWV6m1HPbRHvZwUOUZ5vZvZIAUJxKDtI0UpdNfDvLPiai0MTJmmS+HA==
"@types/fb-watchman@^2.0.1":
version "2.0.4"
resolved "https://registry.yarnpkg.com/@types/fb-watchman/-/fb-watchman-2.0.4.tgz#3a02379aa90d86ceb965a2beaebd7e79faa81e82"
integrity sha512-h7yAQ5Sf96PdZz+sfDDl6Hscl/JqsVXadjF6YHmJeWviziDCGQtqUQUDS2tYjfD/eTzhfZwNfwcfb91a4PaZKQ==
dependencies:
"@types/node" "*"

"@types/file-saver@^2.0.5":
version "2.0.5"
Expand Down

0 comments on commit a17d3d6

Please sign in to comment.