Skip to content

Commit bb1a886

Browse files
committed
Fix setup commands
1 parent af0198d commit bb1a886

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

docs/man_pages/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ Command | Description
5757
[device run](device/device-run.html) | Runs the selected application on a connected device.
5858
[device list-applications](device/device-list-applications.html) | Lists the installed applications on all connected devices.
5959

60+
## Environment Configuration Commands
61+
Command | Description
62+
---|---
63+
[setup](env-configuration/setup.html) | Run the setup script to try to automatically configure your environment for local builds.
64+
[setup cloud](cloud/cloud-setup.html) | Install the `nativescript-cloud extension` to configure your environment for cloud builds.
65+
6066
## Global Options
6167
Option | Description
6268
-------|---------

lib/bootstrap.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ $injector.requireCommand("appstore|upload", "./commands/appstore-upload");
7272
$injector.requireCommand("publish|ios", "./commands/appstore-upload");
7373
$injector.require("itmsTransporterService", "./services/itmstransporter-service");
7474

75-
$injector.requireCommand("setup", "./commands/setup");
76-
$injector.requireCommand("cloud|setup", "./commands/setup");
75+
$injector.requireCommand("setup|*", "./commands/setup");
76+
$injector.requireCommand(["setup|cloud", "cloud|setup"], "./commands/setup");
7777

7878
$injector.requirePublic("npm", "./node-package-manager");
7979
$injector.require("npmInstallationManager", "./npm-installation-manager");
8080
$injector.require("dynamicHelpProvider", "./dynamic-help-provider");
8181
$injector.require("mobilePlatformsCapabilities", "./mobile-platforms-capabilities");
8282
$injector.require("commandsServiceProvider", "./providers/commands-service-provider");
83-
$injector.require("deviceAppDataProvider", "./providers/device-app-data-provider");
83+
$injector.require("AppDataProvider", "./providers/device-app-data-provider");
8484

8585
$injector.require("deviceLogProvider", "./common/mobile/device-log-provider");
8686
$injector.require("projectFilesProvider", "./providers/project-files-provider");

lib/commands/setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export class SetupCommand implements ICommand {
77
return this.$doctorService.runSetupScript();
88
}
99
}
10-
$injector.registerCommand("setup", SetupCommand);
10+
$injector.registerCommand("setup|*", SetupCommand);
1111

1212
export class CloudSetupCommand implements ICommand {
1313
public allowedParameters: ICommandParameter[] = [];
@@ -18,4 +18,4 @@ export class CloudSetupCommand implements ICommand {
1818
return this.$nativescriptCloudExtensionService.install();
1919
}
2020
}
21-
$injector.registerCommand("cloud|setup", CloudSetupCommand);
21+
$injector.registerCommand(["setup|cloud", "cloud|setup"], CloudSetupCommand);

lib/services/nativescript-cloud-extension-service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ import * as constants from "../constants";
22

33
export class NativescriptCloudExtensionService implements INativescriptCloudExtensionService {
44

5-
constructor(private $extensibilityService: IExtensibilityService) { }
5+
constructor(private $extensibilityService: IExtensibilityService,
6+
private $logger: ILogger) { }
67

78
public install(): Promise<IExtensionData> {
89
const installedExtensions = this.$extensibilityService.getInstalledExtensions();
910
if (!installedExtensions[constants.NATIVESCRIPT_CLOUD_EXTENSION_NAME]) {
1011
return this.$extensibilityService.installExtension(constants.NATIVESCRIPT_CLOUD_EXTENSION_NAME);
1112
}
13+
14+
this.$logger.out(`Extension ${constants.NATIVESCRIPT_CLOUD_EXTENSION_NAME} is already installed.`);
1215
}
1316
}
1417
$injector.register("nativescriptCloudExtensionService", NativescriptCloudExtensionService);

0 commit comments

Comments
 (0)