<commit_before>///<reference path="../.d.ts"/>
"use strict";

export class DeployOnDeviceCommand implements ICommand {
	constructor(private $platformService: IPlatformService,
		private $platformCommandParameter: ICommandParameter,
				private $options: IOptions,
				private $errors: IErrors) { }

	execute(args: string[]): IFuture<void> {
		let config = this.$options.staticBindings ? { runSbGenerator: true } : undefined;
		return this.$platformService.deployOnDevice(args[0], config);
	}

	public canExecute(args: string[]): IFuture<boolean> {
		return (() => {
			if (this.$options.release && (!this.$options.keyStorePath || !this.$options.keyStorePassword || !this.$options.keyStoreAlias || !this.$options.keyStoreAliasPassword)) {
				this.$errors.fail("When producing a release build, you need to specify all --key-store-* options.");
			}
			let res = (args.length === 1) && this.$platformCommandParameter.validate(args[0]).wait();
			return res;
		}).future<boolean>()();
	}

	allowedParameters: ICommandParameter[] = [];
}
$injector.registerCommand("deploy", DeployOnDeviceCommand);<commit_msg>Don't print incorrect message when `tns deploy ios --release` command is executed FIxes https://github.com/NativeScript/nativescript-cli/issues/1403<commit_after>///<reference path="../.d.ts"/>
"use strict";

export class DeployOnDeviceCommand implements ICommand {
	constructor(private $platformService: IPlatformService,
		private $platformCommandParameter: ICommandParameter,
				private $options: IOptions,
				private $errors: IErrors,
				private $mobileHelper: Mobile.IMobileHelper) { }

	execute(args: string[]): IFuture<void> {
		let config = this.$options.staticBindings ? { runSbGenerator: true } : undefined;
		return this.$platformService.deployOnDevice(args[0], config);
	}

	public canExecute(args: string[]): IFuture<boolean> {
		return (() => {
			if (!args || !args.length || args.length > 1) {
				return false;
			}

			if (!this.$platformCommandParameter.validate(args[0]).wait()) {
				return false;
			}

			if (this.$mobileHelper.isAndroidPlatform(args[0]) && this.$options.release && (!this.$options.keyStorePath || !this.$options.keyStorePassword || !this.$options.keyStoreAlias || !this.$options.keyStoreAliasPassword)) {
				this.$errors.fail("When producing a release build, you need to specify all --key-store-* options.");
			}

			return true;
		}).future<boolean>()();
	}

	allowedParameters: ICommandParameter[] = [];
}
$injector.registerCommand("deploy", DeployOnDeviceCommand);
{'fraction_non_alphanumeric': 0.1544876886417792, 'fraction_numerical': 0.004368546465448769, 'mean_word_length': 5.069879518072289, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3269774', 'n_tokens_mistral': 800, 'n_tokens_neox': 718, 'n_words': 158}