microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
src/extension/services/validationService/checks/index.ts
53lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for details. |
| 3 | |
| 4 | // also check out this cool things |
| 5 | // https://www.npmjs.com/package/envinfo // does not list all required info |
| 6 | // https://www.npmjs.com/package/command-exists // might find its use later on |
| 7 | |
| 8 | import { adbAndroid, adbExpo } from "./adb"; |
| 9 | import cocoaPods from "./cocoaPods"; |
| 10 | import emulator from "./emulator"; |
| 11 | import { androidHome } from "./env"; |
| 12 | import gradle from "./gradle"; |
| 13 | import java from "./java"; |
| 14 | import nodeJs from "./nodeJS"; |
| 15 | import npm from "./npm"; |
| 16 | import watchman from "./watchman"; |
| 17 | import iosDeploy from "./iosDeploy"; |
| 18 | import xcodebuild from "./xcodebuild"; |
| 19 | import expoCli from "./expoCli"; |
| 20 | import devmode from "./devmode"; |
| 21 | import visualStudio from "./visualStudio"; |
| 22 | import longPath from "./longPath"; |
| 23 | import windows from "./windows"; |
| 24 | import dotnet from "./dotnet"; |
| 25 | |
| 26 | import { IValidation } from "./types"; |
| 27 | |
| 28 | export const getChecks = (): IValidation[] => { |
| 29 | // if some checks become obsolete (e.g. no need to check both npm and yarn) - write logic here |
| 30 | |
| 31 | const checks = [ |
| 32 | iosDeploy, |
| 33 | adbAndroid, |
| 34 | adbExpo, |
| 35 | emulator, |
| 36 | androidHome, |
| 37 | java, |
| 38 | nodeJs, |
| 39 | gradle, |
| 40 | cocoaPods, |
| 41 | npm, |
| 42 | watchman, |
| 43 | xcodebuild, |
| 44 | expoCli, |
| 45 | devmode, |
| 46 | visualStudio, |
| 47 | longPath, |
| 48 | windows, |
| 49 | dotnet, |
| 50 | ] as const; |
| 51 | |
| 52 | return checks.filter(it => (it.platform ? it.platform.includes(process.platform) : true)); |
| 53 | }; |
| 54 | |