Skip to content

Commit 4fc6b8e

Browse files
committed
fix: rename platformsData to platformsDataService
1 parent 40d5b56 commit 4fc6b8e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+152
-151
lines changed

lib/bootstrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $injector.require("projectTemplatesService", "./services/project-templates-servi
3232
$injector.require("projectNameService", "./services/project-name-service");
3333
$injector.require("tnsModulesService", "./services/tns-modules-service");
3434

35-
$injector.require("platformsData", "./platforms-data");
35+
$injector.require("platformsDataService", "./services/platforms-data-service");
3636
$injector.require("addPlatformService", "./services/platform/add-platform-service");
3737
$injector.require("buildInfoFileService", "./services/build-info-file-service");
3838
$injector.require("prepareNativePlatformService", "./services/platform/prepare-native-platform-service");

lib/commands/add-platform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ export class AddPlatformCommand extends ValidatePlatformCommandBase implements I
77
private $platformCommandsService: IPlatformCommandsService,
88
$platformValidationService: IPlatformValidationService,
99
$projectData: IProjectData,
10-
$platformsData: IPlatformsData,
10+
$platformsDataService: IPlatformsDataService,
1111
private $errors: IErrors) {
12-
super($options, $platformsData, $platformValidationService, $projectData);
12+
super($options, $platformsDataService, $platformValidationService, $projectData);
1313
this.$projectData.initializeProjectData();
1414
}
1515

lib/commands/build.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ export abstract class BuildCommandBase extends ValidatePlatformCommandBase {
77
constructor($options: IOptions,
88
protected $errors: IErrors,
99
$projectData: IProjectData,
10-
$platformsData: IPlatformsData,
10+
$platformsDataService: IPlatformsDataService,
1111
protected $devicePlatformsConstants: Mobile.IDevicePlatformsConstants,
1212
protected $buildController: BuildController,
1313
$platformValidationService: IPlatformValidationService,
1414
private $bundleValidatorHelper: IBundleValidatorHelper,
1515
private $buildDataService: BuildDataService,
1616
protected $logger: ILogger) {
17-
super($options, $platformsData, $platformValidationService, $projectData);
17+
super($options, $platformsDataService, $platformValidationService, $projectData);
1818
this.$projectData.initializeProjectData();
1919
}
2020

@@ -62,18 +62,18 @@ export class BuildIosCommand extends BuildCommandBase implements ICommand {
6262
constructor(protected $options: IOptions,
6363
$errors: IErrors,
6464
$projectData: IProjectData,
65-
$platformsData: IPlatformsData,
65+
$platformsDataService: IPlatformsDataService,
6666
$devicePlatformsConstants: Mobile.IDevicePlatformsConstants,
6767
$buildController: BuildController,
6868
$platformValidationService: IPlatformValidationService,
6969
$bundleValidatorHelper: IBundleValidatorHelper,
7070
$logger: ILogger,
7171
$buildDataService: BuildDataService) {
72-
super($options, $errors, $projectData, $platformsData, $devicePlatformsConstants, $buildController, $platformValidationService, $bundleValidatorHelper, $buildDataService, $logger);
72+
super($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $bundleValidatorHelper, $buildDataService, $logger);
7373
}
7474

7575
public async execute(args: string[]): Promise<void> {
76-
await this.executeCore([this.$platformsData.availablePlatforms.iOS]);
76+
await this.executeCore([this.$platformsDataService.availablePlatforms.iOS]);
7777
}
7878

7979
public async canExecute(args: string[]): Promise<boolean | ICanExecuteCommandOutput> {
@@ -98,19 +98,19 @@ export class BuildAndroidCommand extends BuildCommandBase implements ICommand {
9898
constructor(protected $options: IOptions,
9999
protected $errors: IErrors,
100100
$projectData: IProjectData,
101-
$platformsData: IPlatformsData,
101+
$platformsDataService: IPlatformsDataService,
102102
$devicePlatformsConstants: Mobile.IDevicePlatformsConstants,
103103
$buildController: BuildController,
104104
$platformValidationService: IPlatformValidationService,
105105
$bundleValidatorHelper: IBundleValidatorHelper,
106106
protected $androidBundleValidatorHelper: IAndroidBundleValidatorHelper,
107107
$buildDataService: BuildDataService,
108108
protected $logger: ILogger) {
109-
super($options, $errors, $projectData, $platformsData, $devicePlatformsConstants, $buildController, $platformValidationService, $bundleValidatorHelper, $buildDataService, $logger);
109+
super($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $bundleValidatorHelper, $buildDataService, $logger);
110110
}
111111

112112
public async execute(args: string[]): Promise<void> {
113-
await this.executeCore([this.$platformsData.availablePlatforms.Android]);
113+
await this.executeCore([this.$platformsDataService.availablePlatforms.Android]);
114114

115115
if (this.$options.aab) {
116116
this.$logger.info(AndroidAppBundleMessages.ANDROID_APP_BUNDLE_DOCS_MESSAGE);

lib/commands/command-base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export abstract class ValidatePlatformCommandBase {
22
constructor(protected $options: IOptions,
3-
protected $platformsData: IPlatformsData,
3+
protected $platformsDataService: IPlatformsDataService,
44
protected $platformValidationService: IPlatformValidationService,
55
protected $projectData: IProjectData) { }
66

@@ -22,7 +22,7 @@ export abstract class ValidatePlatformCommandBase {
2222
}
2323

2424
private async validatePlatformBase(platform: string, notConfiguredEnvOptions: INotConfiguredEnvOptions): Promise<IValidatePlatformOutput> {
25-
const platformData = this.$platformsData.getPlatformData(platform, this.$projectData);
25+
const platformData = this.$platformsDataService.getPlatformData(platform, this.$projectData);
2626
const platformProjectService = platformData.platformProjectService;
2727
const result = await platformProjectService.validate(this.$projectData, this.$options, notConfiguredEnvOptions);
2828
return result;

lib/commands/debug.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ export class DebugPlatformCommand extends ValidatePlatformCommandBase implements
1313
$platformValidationService: IPlatformValidationService,
1414
$projectData: IProjectData,
1515
$options: IOptions,
16-
$platformsData: IPlatformsData,
16+
$platformsDataService: IPlatformsDataService,
1717
protected $logger: ILogger,
1818
protected $errors: IErrors,
1919
private $debugDataService: IDebugDataService,
2020
private $deviceDebugAppService: DeviceDebugAppService,
2121
private $liveSyncCommandHelper: ILiveSyncCommandHelper,
2222
private $androidBundleValidatorHelper: IAndroidBundleValidatorHelper) {
23-
super($options, $platformsData, $platformValidationService, $projectData);
23+
super($options, $platformsDataService, $platformValidationService, $projectData);
2424
}
2525

2626
public async execute(args: string[]): Promise<void> {

lib/commands/deploy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ export class DeployOnDeviceCommand extends ValidatePlatformCommandBase implement
1111
$projectData: IProjectData,
1212
private $errors: IErrors,
1313
private $mobileHelper: Mobile.IMobileHelper,
14-
$platformsData: IPlatformsData,
14+
$platformsDataService: IPlatformsDataService,
1515
private $bundleValidatorHelper: IBundleValidatorHelper,
1616
private $deployCommandHelper: DeployCommandHelper,
1717
private $androidBundleValidatorHelper: IAndroidBundleValidatorHelper) {
18-
super($options, $platformsData, $platformValidationService, $projectData);
18+
super($options, $platformsDataService, $platformValidationService, $projectData);
1919
this.$projectData.initializeProjectData();
2020
}
2121

lib/commands/install.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export class InstallCommand implements ICommand {
55
public allowedParameters: ICommandParameter[] = [this.$stringParameter];
66

77
constructor(private $options: IOptions,
8-
private $platformsData: IPlatformsData,
8+
private $platformsDataService: IPlatformsDataService,
99
private $platformCommandsService: IPlatformCommandsService,
1010
private $projectData: IProjectData,
1111
private $projectDataService: IProjectDataService,
@@ -26,8 +26,8 @@ export class InstallCommand implements ICommand {
2626

2727
await this.$pluginsService.ensureAllDependenciesAreInstalled(this.$projectData);
2828

29-
for (const platform of this.$platformsData.platformsNames) {
30-
const platformData = this.$platformsData.getPlatformData(platform, this.$projectData);
29+
for (const platform of this.$platformsDataService.platformsNames) {
30+
const platformData = this.$platformsDataService.getPlatformData(platform, this.$projectData);
3131
const frameworkPackageData = this.$projectDataService.getNSValue(this.$projectData.projectDir, platformData.frameworkPackageName);
3232
if (frameworkPackageData && frameworkPackageData.version) {
3333
try {

lib/commands/prepare.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export class PrepareCommand extends ValidatePlatformCommandBase implements IComm
1414
$platformValidationService: IPlatformValidationService,
1515
$projectData: IProjectData,
1616
private $platformCommandParameter: ICommandParameter,
17-
$platformsData: IPlatformsData,
17+
$platformsDataService: IPlatformsDataService,
1818
private $prepareDataService: PrepareDataService) {
19-
super($options, $platformsData, $platformValidationService, $projectData);
19+
super($options, $platformsDataService, $platformValidationService, $projectData);
2020
this.$projectData.initializeProjectData();
2121
}
2222

lib/commands/run.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class RunIosCommand implements ICommand {
6767
private $errors: IErrors,
6868
private $injector: IInjector,
6969
private $options: IOptions,
70-
private $platformsData: IPlatformsData,
70+
private $platformsDataService: IPlatformsDataService,
7171
private $platformValidationService: IPlatformValidationService,
7272
private $projectDataService: IProjectDataService,
7373
) {
@@ -84,7 +84,7 @@ export class RunIosCommand implements ICommand {
8484
this.$errors.fail(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`);
8585
}
8686

87-
const result = await this.runCommand.canExecute(args) && await this.$platformValidationService.validateOptions(this.$options.provision, this.$options.teamId, projectData, this.$platformsData.availablePlatforms.iOS);
87+
const result = await this.runCommand.canExecute(args) && await this.$platformValidationService.validateOptions(this.$options.provision, this.$options.teamId, projectData, this.$platformsDataService.availablePlatforms.iOS);
8888
return result;
8989
}
9090
}
@@ -110,7 +110,7 @@ export class RunAndroidCommand implements ICommand {
110110
private $errors: IErrors,
111111
private $injector: IInjector,
112112
private $options: IOptions,
113-
private $platformsData: IPlatformsData,
113+
private $platformsDataService: IPlatformsDataService,
114114
private $platformValidationService: IPlatformValidationService,
115115
private $projectData: IProjectData,
116116
) { }
@@ -130,7 +130,7 @@ export class RunAndroidCommand implements ICommand {
130130
this.$errors.fail(ANDROID_RELEASE_BUILD_ERROR_MESSAGE);
131131
}
132132

133-
return this.$platformValidationService.validateOptions(this.$options.provision, this.$options.teamId, this.$projectData, this.$platformsData.availablePlatforms.Android);
133+
return this.$platformValidationService.validateOptions(this.$options.provision, this.$options.teamId, this.$projectData, this.$platformsDataService.availablePlatforms.Android);
134134
}
135135
}
136136

lib/commands/update.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ export class UpdateCommand extends ValidatePlatformCommandBase implements IComma
1010
private $logger: ILogger,
1111
$options: IOptions,
1212
private $platformCommandsService: IPlatformCommandsService,
13-
$platformsData: IPlatformsData,
13+
$platformsDataService: IPlatformsDataService,
1414
$platformValidationService: IPlatformValidationService,
1515
private $pluginsService: IPluginsService,
1616
$projectData: IProjectData,
1717
private $projectDataService: IProjectDataService,
1818
) {
19-
super($options, $platformsData, $platformValidationService, $projectData);
19+
super($options, $platformsDataService, $platformValidationService, $projectData);
2020
this.$projectData.initializeProjectData();
2121
}
2222

@@ -81,7 +81,7 @@ export class UpdateCommand extends ValidatePlatformCommandBase implements IComma
8181
const platforms = this.getPlatforms();
8282

8383
for (const platform of _.xor(platforms.installed, platforms.packagePlatforms)) {
84-
const platformData = this.$platformsData.getPlatformData(platform, this.$projectData);
84+
const platformData = this.$platformsDataService.getPlatformData(platform, this.$projectData);
8585
this.$projectDataService.removeNSProperty(this.$projectData.projectDir, platformData.frameworkPackageName);
8686
}
8787

@@ -115,7 +115,7 @@ export class UpdateCommand extends ValidatePlatformCommandBase implements IComma
115115
const packagePlatforms: string[] = [];
116116

117117
for (const platform of availablePlatforms) {
118-
const platformData = this.$platformsData.getPlatformData(platform, this.$projectData);
118+
const platformData = this.$platformsDataService.getPlatformData(platform, this.$projectData);
119119
const platformVersion = this.$projectDataService.getNSValue(this.$projectData.projectDir, platformData.frameworkPackageName);
120120
if (platformVersion) {
121121
packagePlatforms.push(platform);

0 commit comments

Comments
 (0)