Rename first batch for '.ts' files to '.tsx' in doctor, static and test-utils
Summary: Rename first batch for '.ts' files to '.tsx' Reviewed By: nikoant Differential Revision: D33843051 fbshipit-source-id: 68dd2dc6538afce2daaf24c6412dc5db8b38acbc
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6a28a712f9
commit
b4fc108c2e
36
desktop/doctor/src/cli.tsx
Normal file
36
desktop/doctor/src/cli.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* 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 {getHealthchecks} from './index';
|
||||
import {getEnvInfo} from './environmentInfo';
|
||||
|
||||
(async () => {
|
||||
const environmentInfo = await getEnvInfo();
|
||||
console.log(JSON.stringify(environmentInfo));
|
||||
const healthchecks = getHealthchecks();
|
||||
const results = await Promise.all(
|
||||
Object.entries(healthchecks).map(async ([key, category]) => [
|
||||
key,
|
||||
category.isSkipped
|
||||
? category
|
||||
: {
|
||||
label: category.label,
|
||||
results: await Promise.all(
|
||||
category.healthchecks.map(async ({key, label, run}) => ({
|
||||
key,
|
||||
label,
|
||||
result: await run!(environmentInfo),
|
||||
})),
|
||||
),
|
||||
},
|
||||
]),
|
||||
);
|
||||
|
||||
console.log(JSON.stringify(results, null, 2));
|
||||
})();
|
||||
Reference in New Issue
Block a user