Skip to content

Commit 39622f6

Browse files
committed
Fix PR comments
1 parent d99972b commit 39622f6

File tree

12 files changed

+27
-28
lines changed

12 files changed

+27
-28
lines changed

lib/commands/add-platform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { CommandBase } from "./command-base";
1+
import { ValidatePlatformCommandBase } from "./command-base";
22

3-
export class AddPlatformCommand extends CommandBase implements ICommand {
3+
export class AddPlatformCommand extends ValidatePlatformCommandBase implements ICommand {
44
public allowedParameters: ICommandParameter[] = [];
55

66
constructor($options: IOptions,

lib/commands/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ANDROID_RELEASE_BUILD_ERROR_MESSAGE } from "../constants";
2-
import { CommandBase } from "./command-base";
2+
import { ValidatePlatformCommandBase } from "./command-base";
33

4-
export abstract class BuildCommandBase extends CommandBase {
4+
export abstract class BuildCommandBase extends ValidatePlatformCommandBase {
55
constructor($options: IOptions,
66
protected $errors: IErrors,
77
$projectData: IProjectData,

lib/commands/clean-app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { CommandBase } from "./command-base";
1+
import { ValidatePlatformCommandBase } from "./command-base";
22

3-
export class CleanAppCommandBase extends CommandBase implements ICommand {
3+
export class CleanAppCommandBase extends ValidatePlatformCommandBase implements ICommand {
44
public allowedParameters: ICommandParameter[] = [];
55

66
protected platform: string;

lib/commands/command-base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export abstract class CommandBase implements ICommandBase {
1+
export abstract class ValidatePlatformCommandBase {
22
constructor(protected $options: IOptions,
33
protected $platformsData: IPlatformsData,
44
protected $platformService: IPlatformService,

lib/commands/debug.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { CONNECTED_STATUS } from "../common/constants";
22
import { isInteractive } from "../common/helpers";
33
import { cache } from "../common/decorators";
44
import { DebugCommandErrors } from "../constants";
5-
import { CommandBase } from "./command-base";
5+
import { ValidatePlatformCommandBase } from "./command-base";
66

7-
export class DebugPlatformCommand extends CommandBase implements ICommand {
7+
export class DebugPlatformCommand extends ValidatePlatformCommandBase implements ICommand {
88
public allowedParameters: ICommandParameter[] = [];
99

1010
constructor(private platform: string,

lib/commands/deploy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ANDROID_RELEASE_BUILD_ERROR_MESSAGE } from "../constants";
2-
import { CommandBase } from "./command-base";
2+
import { ValidatePlatformCommandBase } from "./command-base";
33

4-
export class DeployOnDeviceCommand extends CommandBase implements ICommand {
4+
export class DeployOnDeviceCommand extends ValidatePlatformCommandBase implements ICommand {
55
public allowedParameters: ICommandParameter[] = [];
66

77
constructor($platformService: IPlatformService,

lib/commands/prepare.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { CommandBase } from "./command-base";
1+
import { ValidatePlatformCommandBase } from "./command-base";
22

3-
export class PrepareCommand extends CommandBase implements ICommand {
3+
export class PrepareCommand extends ValidatePlatformCommandBase implements ICommand {
44
public allowedParameters = [this.$platformCommandParameter];
55

66
constructor($options: IOptions,

lib/commands/update.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as path from "path";
22
import * as constants from "../constants";
3-
import { CommandBase } from "./command-base";
3+
import { ValidatePlatformCommandBase } from "./command-base";
44

5-
export class UpdateCommand extends CommandBase implements ICommand {
5+
export class UpdateCommand extends ValidatePlatformCommandBase implements ICommand {
66
public allowedParameters: ICommandParameter[] = [];
77

88
constructor($options: IOptions,

lib/common

lib/definitions/livesync.d.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ interface IOptionalSkipWatcher {
142142
/**
143143
* Describes a LiveSync operation.
144144
*/
145-
interface ILiveSyncInfo extends IProjectDir, IEnvOptions, IBundle, IRelease, IOptionalSkipWatcher, IHasUseHotModuleReloadOption {
145+
interface ILiveSyncInfo extends IProjectDir, IEnvOptions, IBundle, IRelease, IOptionalSkipWatcher, IHasUseHotModuleReloadOption, IHasSyncToPreviewAppOption {
146146
/**
147147
* Defines if all project files should be watched for changes. In case it is not passed, only `app` dir of the project will be watched for changes.
148148
* In case it is set to true, the package.json of the project and node_modules directory will also be watched, so any change there will be transferred to device(s).
@@ -159,7 +159,12 @@ interface ILiveSyncInfo extends IProjectDir, IEnvOptions, IBundle, IRelease, IOp
159159
* If not provided, defaults to 10seconds.
160160
*/
161161
timeout: string;
162+
}
162163

164+
interface IHasSyncToPreviewAppOption {
165+
/**
166+
* Defines if the livesync should be executed in preview app on device.
167+
*/
163168
syncToPreviewApp?: boolean;
164169
}
165170

@@ -512,7 +517,7 @@ interface IDevicePathProvider {
512517
/**
513518
* Describes additional options, that can be passed to LiveSyncCommandHelper.
514519
*/
515-
interface ILiveSyncCommandHelperAdditionalOptions extends IBuildPlatformAction, INativePrepare {
520+
interface ILiveSyncCommandHelperAdditionalOptions extends IBuildPlatformAction, INativePrepare, IHasSyncToPreviewAppOption {
516521
/**
517522
* A map representing devices which have debugging enabled initially.
518523
*/
@@ -524,7 +529,6 @@ interface ILiveSyncCommandHelperAdditionalOptions extends IBuildPlatformAction,
524529
* @returns {string} The build output directory.
525530
*/
526531
getOutputDirectory?(options: IOutputDirectoryOptions): string;
527-
syncToPreviewApp?: boolean;
528532
}
529533

530534
interface ILiveSyncCommandHelper {

0 commit comments

Comments
 (0)