Skip to content

Commit 6054866

Browse files
committed
chore: remove platformTemplate logic
1 parent 573da91 commit 6054866

19 files changed

+72
-130
lines changed

lib/commands/add-platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class AddPlatformCommand extends ValidatePlatformCommandBase implements I
1313
}
1414

1515
public async execute(args: string[]): Promise<void> {
16-
await this.$platformService.addPlatforms(args, this.$options.platformTemplate, this.$projectData, this.$options, this.$options.frameworkPath);
16+
await this.$platformService.addPlatforms(args, this.$projectData, this.$options, this.$options.frameworkPath);
1717
}
1818

1919
public async canExecute(args: string[]): Promise<ICanExecuteCommandOutput> {

lib/commands/appstore-upload.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export class PublishIOS implements ICommand {
6464
const platformInfo: IPreparePlatformInfo = {
6565
platform,
6666
appFilesUpdaterOptions,
67-
platformTemplate: this.$options.platformTemplate,
6867
projectData: this.$projectData,
6968
config: this.$options,
7069
env: this.$options.env

lib/commands/build.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export abstract class BuildCommandBase extends ValidatePlatformCommandBase {
2424
const platformInfo: IPreparePlatformInfo = {
2525
platform,
2626
appFilesUpdaterOptions,
27-
platformTemplate: this.$options.platformTemplate,
2827
projectData: this.$projectData,
2928
config: this.$options,
3029
env: this.$options.env

lib/commands/clean-app.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export class CleanAppCommandBase extends ValidatePlatformCommandBase implements
2525
appFilesUpdaterOptions,
2626
platform: this.platform.toLowerCase(),
2727
config: this.$options,
28-
platformTemplate: this.$options.platformTemplate,
2928
projectData: this.$projectData,
3029
env: this.$options.env
3130
};

lib/commands/install.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class InstallCommand implements ICommand {
3434
const platformProjectService = platformData.platformProjectService;
3535
await platformProjectService.validate(this.$projectData, this.$options);
3636

37-
await this.$platformService.addPlatforms([`${platform}@${frameworkPackageData.version}`], this.$options.platformTemplate, this.$projectData, this.$options, this.$options.frameworkPath);
37+
await this.$platformService.addPlatforms([`${platform}@${frameworkPackageData.version}`], this.$projectData, this.$options, this.$options.frameworkPath);
3838
} catch (err) {
3939
error = `${error}${EOL}${err}`;
4040
}

lib/commands/platform-clean.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class CleanCommand implements ICommand {
1010
}
1111

1212
public async execute(args: string[]): Promise<void> {
13-
await this.$platformService.cleanPlatforms(args, this.$options.platformTemplate, this.$projectData, this.$options);
13+
await this.$platformService.cleanPlatforms(args, this.$projectData, this.$options);
1414
}
1515

1616
public async canExecute(args: string[]): Promise<boolean> {

lib/commands/prepare.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export class PrepareCommand extends ValidatePlatformCommandBase implements IComm
2121
const platformInfo: IPreparePlatformInfo = {
2222
platform: args[0],
2323
appFilesUpdaterOptions,
24-
platformTemplate: this.$options.platformTemplate,
2524
projectData: this.$projectData,
2625
config: this.$options,
2726
env: this.$options.env

lib/commands/update-platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class UpdatePlatformCommand implements ICommand {
1010
}
1111

1212
public async execute(args: string[]): Promise<void> {
13-
await this.$platformService.updatePlatforms(args, this.$options.platformTemplate, this.$projectData, this.$options);
13+
await this.$platformService.updatePlatforms(args, this.$projectData, this.$options);
1414
}
1515

1616
public async canExecute(args: string[]): Promise<boolean> {

lib/commands/update.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ export class UpdateCommand extends ValidatePlatformCommandBase implements IComma
9494

9595
if (args.length === 1) {
9696
for (const platform of platforms.packagePlatforms) {
97-
await this.$platformService.addPlatforms([platform + "@" + args[0]], this.$options.platformTemplate, this.$projectData, this.$options, this.$options.frameworkPath);
97+
await this.$platformService.addPlatforms([platform + "@" + args[0]], this.$projectData, this.$options, this.$options.frameworkPath);
9898
}
9999

100100
await this.$pluginsService.add(`${constants.TNS_CORE_MODULES_NAME}@${args[0]}`, this.$projectData);
101101
} else {
102-
await this.$platformService.addPlatforms(platforms.packagePlatforms, this.$options.platformTemplate, this.$projectData, this.$options, this.$options.frameworkPath);
102+
await this.$platformService.addPlatforms(platforms.packagePlatforms, this.$projectData, this.$options, this.$options.frameworkPath);
103103
await this.$pluginsService.add(constants.TNS_CORE_MODULES_NAME, this.$projectData);
104104
}
105105

lib/declarations.d.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,6 @@ interface IBundleString {
441441
bundle: string;
442442
}
443443

444-
interface IPlatformTemplate {
445-
platformTemplate: string;
446-
}
447-
448-
449444
interface IClean {
450445
clean: boolean;
451446
}
@@ -499,7 +494,7 @@ interface IAndroidBundleOptions {
499494
aab: boolean;
500495
}
501496

502-
interface IOptions extends IRelease, IDeviceIdentifier, IJustLaunch, IAvd, IAvailableDevices, IProfileDir, IHasEmulatorOption, IBundleString, IPlatformTemplate, IHasEmulatorOption, IClean, IProvision, ITeamIdentifier, IAndroidReleaseOptions, IAndroidBundleOptions, INpmInstallConfigurationOptions, IPort, IEnvOptions, IPluginSeedOptions, IGenerateOptions {
497+
interface IOptions extends IRelease, IDeviceIdentifier, IJustLaunch, IAvd, IAvailableDevices, IProfileDir, IHasEmulatorOption, IBundleString, IHasEmulatorOption, IClean, IProvision, ITeamIdentifier, IAndroidReleaseOptions, IAndroidBundleOptions, INpmInstallConfigurationOptions, IPort, IEnvOptions, IPluginSeedOptions, IGenerateOptions {
503498
argv: IYargArgv;
504499
validateOptions(commandSpecificDashedOptions?: IDictionary<IDashedOption>): void;
505500
options: IDictionary<IDashedOption>;
@@ -589,11 +584,11 @@ interface IDeviceEmulator extends IHasEmulatorOption, IDeviceIdentifier { }
589584

590585
interface IRunPlatformOptions extends IJustLaunch, IDeviceEmulator { }
591586

592-
interface IDeployPlatformOptions extends IAndroidReleaseOptions, IPlatformTemplate, IRelease, IClean, IDeviceEmulator, IProvision, ITeamIdentifier, IProjectDir {
587+
interface IDeployPlatformOptions extends IAndroidReleaseOptions, IRelease, IClean, IDeviceEmulator, IProvision, ITeamIdentifier, IProjectDir {
593588
forceInstall?: boolean;
594589
}
595590

596-
interface IUpdatePlatformOptions extends IPlatformTemplate {
591+
interface IUpdatePlatformOptions {
597592
currentVersion: string;
598593
newVersion: string;
599594
canUpdate: boolean;

0 commit comments

Comments
 (0)