diff --git a/lib/commands/generate-help.ts b/lib/commands/generate-help.ts index 71cfa998d4..18fc8af9a0 100644 --- a/lib/commands/generate-help.ts +++ b/lib/commands/generate-help.ts @@ -1,10 +1,10 @@ export class GenerateHelpCommand implements ICommand { public allowedParameters: ICommandParameter[] = []; - constructor(private $htmlHelpService: IHtmlHelpService) { } + constructor(private $helpService: IHelpService) { } public async execute(args: string[]): Promise { - return this.$htmlHelpService.generateHtmlPages(); + return this.$helpService.generateHtmlPages(); } } diff --git a/lib/commands/post-install.ts b/lib/commands/post-install.ts index 779703e5c3..f574171789 100644 --- a/lib/commands/post-install.ts +++ b/lib/commands/post-install.ts @@ -5,12 +5,12 @@ export class PostInstallCliCommand extends PostInstallCommand { private $subscriptionService: ISubscriptionService, $staticConfig: Config.IStaticConfig, $commandsService: ICommandsService, - $htmlHelpService: IHtmlHelpService, + $helpService: IHelpService, $options: ICommonOptions, $doctorService: IDoctorService, $analyticsService: IAnalyticsService, $logger: ILogger) { - super($fs, $staticConfig, $commandsService, $htmlHelpService, $options, $doctorService, $analyticsService, $logger); + super($fs, $staticConfig, $commandsService, $helpService, $options, $doctorService, $analyticsService, $logger); } public async execute(args: string[]): Promise { diff --git a/lib/common b/lib/common index 0812ce953f..06d4f68052 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 0812ce953f66e3f749f541b1e93af2794e40e866 +Subproject commit 06d4f680523cf79ecc7df47feeb61cf6acc7a2a7 diff --git a/lib/config.ts b/lib/config.ts index 4b6b21c942..dd4fcc8d13 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -60,10 +60,6 @@ export class StaticConfig extends StaticConfigBase implements IStaticConfig { public version = require("../package.json").version; - public get helpTextPath(): string { - return path.join(__dirname, "../resources/help.txt"); - } - public get HTML_CLI_HELPERS_DIR(): string { return path.join(__dirname, "../docs/helpers"); } diff --git a/test/commands/post-install.ts b/test/commands/post-install.ts index 5cadda5c0b..51f4dd8e02 100644 --- a/test/commands/post-install.ts +++ b/test/commands/post-install.ts @@ -18,7 +18,7 @@ const createTestInjector = (): IInjector => { tryExecuteCommand: async (commandName: string, commandArguments: string[]): Promise => undefined }); - testInjector.register("htmlHelpService", { + testInjector.register("helpService", { generateHtmlPages: async (): Promise => undefined }); diff --git a/test/platform-commands.ts b/test/platform-commands.ts index c14ce1cbd1..2a08302440 100644 --- a/test/platform-commands.ts +++ b/test/platform-commands.ts @@ -54,7 +54,7 @@ class ErrorsNoFailStub implements IErrors { throw new Error(); } - async beginCommand(action: () => Promise, printHelpCommand: () => Promise): Promise { + async beginCommand(action: () => Promise, printHelpCommand: () => Promise): Promise { let result = false; try { result = await action(); @@ -148,6 +148,9 @@ function createTestInjector() { }); testInjector.register("messages", Messages); testInjector.register("devicePathProvider", {}); + testInjector.register("helpService", { + showCommandLineHelp: async (): Promise => (undefined) + }); return testInjector; } diff --git a/test/platform-service.ts b/test/platform-service.ts index 4caf8b8992..1db73a785b 100644 --- a/test/platform-service.ts +++ b/test/platform-service.ts @@ -91,6 +91,9 @@ function createTestInjector() { }); testInjector.register("messages", Messages); testInjector.register("devicePathProvider", {}); + testInjector.register("helpService", { + showCommandLineHelp: async (): Promise => (undefined) + }); return testInjector; } diff --git a/test/plugins-service.ts b/test/plugins-service.ts index 6360e2ee0d..1f5953cec1 100644 --- a/test/plugins-service.ts +++ b/test/plugins-service.ts @@ -98,6 +98,9 @@ function createTestInjector() { }); testInjector.register("xmlValidator", XmlValidator); testInjector.register("config", StaticConfigLib.Configuration); + testInjector.register("helpService", { + showCommandLineHelp: async (): Promise => (undefined) + }); return testInjector; } diff --git a/test/stubs.ts b/test/stubs.ts index 5d45aa8dc9..f92ea63a1c 100644 --- a/test/stubs.ts +++ b/test/stubs.ts @@ -197,7 +197,7 @@ export class ErrorsStub implements IErrors { throw new Error(message); } - async beginCommand(action: () => Promise, printHelpCommand: () => Promise): Promise { + async beginCommand(action: () => Promise, printHelpCommand: () => Promise): Promise { throw new Error("not supported"); }