diff --git a/lib/common b/lib/common index ea3c400b85..6a21306e45 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit ea3c400b85c9cff8c803bb1756ce50b2e0b7c1b9 +Subproject commit 6a21306e4573af63a4880cb4aeb1d09a496d13b2 diff --git a/lib/services/doctor-service.ts b/lib/services/doctor-service.ts index 5c13a1f718..5cccff7cf4 100644 --- a/lib/services/doctor-service.ts +++ b/lib/services/doctor-service.ts @@ -20,7 +20,7 @@ class DoctorService implements IDoctorService { private $terminalSpinnerService: ITerminalSpinnerService, private $versionsService: IVersionsService) { } - public async printWarnings(configOptions?: { trackResult: boolean }): Promise { + public async printWarnings(configOptions?: { trackResult: boolean }): Promise { const infos = await this.$terminalSpinnerService.execute({ text: `Getting environment information ${EOL}` }, () => doctor.getInfos()); @@ -42,6 +42,8 @@ class DoctorService implements IDoctorService { if (hasWarnings) { this.$logger.info("There seem to be issues with your configuration."); await this.promptForHelp(); + } else { + this.$logger.out("No issues were detected.".bold); } try { @@ -49,8 +51,6 @@ class DoctorService implements IDoctorService { } catch (err) { this.$logger.error("Cannot get the latest versions information from npm. Please try again later."); } - - return hasWarnings; } public runSetupScript(): Promise { @@ -70,10 +70,8 @@ class DoctorService implements IDoctorService { } public async canExecuteLocalBuild(platform?: string): Promise { - let infos = await doctor.getInfos(); - if (platform) { - infos = this.filterInfosByPlatform(infos, platform); - } + const infos = await doctor.getInfos({ platform }); + this.printInfosCore(infos); const warnings = this.filterInfosByType(infos, constants.WARNING_TYPE_NAME); if (warnings.length > 0) { @@ -149,10 +147,6 @@ class DoctorService implements IDoctorService { }); } - private filterInfosByPlatform(infos: NativeScriptDoctor.IInfo[], platform: string): NativeScriptDoctor.IInfo[] { - return infos.filter(info => _.includes(info.platforms, platform)); - } - private filterInfosByType(infos: NativeScriptDoctor.IInfo[], type: string): NativeScriptDoctor.IInfo[] { return infos.filter(info => info.type === type); } diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index ed7ed119c9..3008da2f39 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1869,8 +1869,7 @@ }, "jsbn": { "version": "0.1.1", - "bundled": true, - "optional": true + "bundled": true }, "json-schema": { "version": "0.2.3", @@ -3875,9 +3874,9 @@ "integrity": "sha512-8eRaxn8u/4wN8tGkhlc2cgwwvOLMLUMUn4IYTexMgWd+LyUDfeXVkk2ygQR0hvIHbJQXgHujia3ieUUDwNGkEA==" }, "nativescript-doctor": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/nativescript-doctor/-/nativescript-doctor-0.10.0.tgz", - "integrity": "sha512-bfIc/z0Z/4ud38hhlJ4bdKUKX4bNt44+QYbLcrd678wnht987B5QfJ/zFa33M9PwQP1xiRzoZpOdFmd0UCQ2AQ==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/nativescript-doctor/-/nativescript-doctor-0.11.0.tgz", + "integrity": "sha512-190QYxSE2mG/shNErdTUf3sBQALt05IYKoyEiTlwqr2rQEXftkV0vRmJM2tCWBGFE9vyJpzQiSLtDWLPhVWVlg==", "requires": { "osenv": "0.1.3", "semver": "5.3.0", diff --git a/package.json b/package.json index 6fbe42b8b9..bc3b8e7659 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "minimatch": "3.0.2", "mkdirp": "0.5.1", "mute-stream": "0.0.5", - "nativescript-doctor": "0.10.0", + "nativescript-doctor": "0.11.0", "open": "0.0.5", "ora": "2.0.0", "osenv": "0.1.3",