1
1
import { ERROR_NO_VALID_SUBCOMMAND_FORMAT } from "../common/constants" ;
2
- import {
3
- ANDROID_RELEASE_BUILD_ERROR_MESSAGE ,
4
- ANDROID_APP_BUNDLE_SIGNING_ERROR_MESSAGE ,
5
- } from "../constants" ;
2
+ import { IErrors , IHostInfo } from "../common/declarations" ;
6
3
import { cache } from "../common/decorators" ;
7
- import { hasValidAndroidSigning } from "../common/helpers" ;
8
- import { IProjectData , IProjectDataService } from "../definitions/project" ;
9
- import { IMigrateController } from "../definitions/migrate" ;
10
- import { IOptions , IPlatformValidationService } from "../declarations" ;
11
4
import { ICommand , ICommandParameter } from "../common/definitions/commands" ;
12
- import { IErrors , IHostInfo } from "../common/declarations" ;
5
+ import {
6
+ IKeyCommandHelper ,
7
+ IKeyCommandPlatform ,
8
+ } from "../common/definitions/key-commands" ;
13
9
import { IInjector } from "../common/definitions/yok" ;
10
+ import { hasValidAndroidSigning } from "../common/helpers" ;
14
11
import { injector } from "../common/yok" ;
12
+ import {
13
+ ANDROID_APP_BUNDLE_SIGNING_ERROR_MESSAGE ,
14
+ ANDROID_RELEASE_BUILD_ERROR_MESSAGE ,
15
+ } from "../constants" ;
16
+ import { IOptions , IPlatformValidationService } from "../declarations" ;
17
+ import { IMigrateController } from "../definitions/migrate" ;
18
+ import { IProjectData , IProjectDataService } from "../definitions/project" ;
15
19
16
20
export class RunCommandBase implements ICommand {
17
- private liveSyncCommandHelperAdditionalOptions : ILiveSyncCommandHelperAdditionalOptions = <
18
- ILiveSyncCommandHelperAdditionalOptions
19
- > { } ;
21
+ private liveSyncCommandHelperAdditionalOptions : ILiveSyncCommandHelperAdditionalOptions =
22
+ < ILiveSyncCommandHelperAdditionalOptions > { } ;
20
23
21
24
public platform : string ;
22
25
constructor (
@@ -26,15 +29,23 @@ export class RunCommandBase implements ICommand {
26
29
private $liveSyncCommandHelper : ILiveSyncCommandHelper ,
27
30
private $migrateController : IMigrateController ,
28
31
private $options : IOptions ,
29
- private $projectData : IProjectData
32
+ private $projectData : IProjectData ,
33
+ private $keyCommandHelper : IKeyCommandHelper
30
34
) { }
31
35
32
36
public allowedParameters : ICommandParameter [ ] = [ ] ;
33
37
public async execute ( args : string [ ] ) : Promise < void > {
34
- return this . $liveSyncCommandHelper . executeCommandLiveSync (
38
+ await this . $liveSyncCommandHelper . executeCommandLiveSync (
35
39
this . platform ,
36
40
this . liveSyncCommandHelperAdditionalOptions
37
41
) ;
42
+
43
+ if ( process . env . NS_IS_INTERACTIVE ) {
44
+ this . $keyCommandHelper . attachKeyCommands (
45
+ this . platform as IKeyCommandPlatform ,
46
+ "run"
47
+ ) ;
48
+ }
38
49
}
39
50
40
51
public async canExecute ( args : string [ ] ) : Promise < boolean > {
0 commit comments