Skip to content

fix: passing --hmr must always set bundle option to "webpack" #3936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/common/appbuilder/project/project-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export abstract class ProjectBase implements Project.IProjectBase {
protected $fs: IFileSystem,
protected $logger: ILogger,
protected $nativeScriptProjectCapabilities: Project.ICapabilities,
protected $options: ICommonOptions,
protected $options: IOptions,
protected $projectConstants: Project.IConstants,
protected $staticConfig: Config.IStaticConfig) {
this.configurationSpecificData = Object.create(null);
Expand Down
2 changes: 1 addition & 1 deletion lib/common/appbuilder/project/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class Project extends ProjectBase {
protected $fs: IFileSystem,
protected $logger: ILogger,
protected $nativeScriptProjectCapabilities: Project.ICapabilities,
protected $options: ICommonOptions,
protected $options: IOptions,
protected $projectConstants: Project.IConstants,
protected $staticConfig: Config.IStaticConfig) {
super($cordovaProjectCapabilities, $errors, $fs, $logger, $nativeScriptProjectCapabilities, $options, $projectConstants, $staticConfig);
Expand Down
2 changes: 0 additions & 2 deletions lib/common/appbuilder/proton-bootstrap.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
require("./appbuilder-bootstrap");
$injector.require("messages", "./messages/messages");

import { OptionsBase } from "../options";
$injector.require("staticConfig", "./appbuilder/proton-static-config");
$injector.register("config", {});
// Proton will track the features and exceptions, so no need of analyticsService here.
$injector.register("analyiticsService", {});
$injector.register("options", $injector.resolve(OptionsBase, { options: {}, defaultProfileDir: "" }));
$injector.requirePublicClass("deviceEmitter", "./appbuilder/device-emitter");
$injector.requirePublicClass("deviceLogProvider", "./appbuilder/device-log-provider");
import { installUncaughtExceptionListener } from "../errors";
Expand Down
2 changes: 1 addition & 1 deletion lib/common/appbuilder/providers/project-files-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class ProjectFilesProvider extends ProjectFilesProviderBase {
private $projectConstants: Project.IConstants,
private $injector: IInjector,
$mobileHelper: Mobile.IMobileHelper,
$options: ICommonOptions) {
$options: IOptions) {
super($mobileHelper, $options);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class AppBuilderAndroidLiveSyncService extends AndroidLiveSyncService imp
constructor(_device: Mobile.IAndroidDevice,
$fs: IFileSystem,
$mobileHelper: Mobile.IMobileHelper,
private $options: ICommonOptions) {
private $options: IOptions) {
super(_device, $fs, $mobileHelper);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class IOSLiveSyncService implements IDeviceLiveSyncService {
private $injector: IInjector,
private $logger: ILogger,
private $errors: IErrors,
private $options: ICommonOptions,
private $options: IOptions,
private $iosDeviceOperations: IIOSDeviceOperations) {
// If we execute livesync with --watch we do not want to dispose the $iosDeviceOperations.
this.$iosDeviceOperations.setShouldDispose(!this.$options.watch);
Expand Down
6 changes: 3 additions & 3 deletions lib/common/commands/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AnalyticsCommand implements ICommand {
constructor(protected $analyticsService: IAnalyticsService,
private $logger: ILogger,
private $errors: IErrors,
private $options: ICommonOptions,
private $options: IOptions,
private settingName: string,
private humanReadableSettingName: string) { }

Expand Down Expand Up @@ -51,7 +51,7 @@ export class UsageReportingCommand extends AnalyticsCommand {
constructor(protected $analyticsService: IAnalyticsService,
$logger: ILogger,
$errors: IErrors,
$options: ICommonOptions,
$options: IOptions,
$staticConfig: Config.IStaticConfig) {
super($analyticsService, $logger, $errors, $options, $staticConfig.TRACK_FEATURE_USAGE_SETTING_NAME, "Usage reporting");
}
Expand All @@ -62,7 +62,7 @@ export class ErrorReportingCommand extends AnalyticsCommand {
constructor(protected $analyticsService: IAnalyticsService,
$logger: ILogger,
$errors: IErrors,
$options: ICommonOptions,
$options: IOptions,
$staticConfig: Config.IStaticConfig
) {
super($analyticsService, $logger, $errors, $options, $staticConfig.ERROR_REPORT_SETTING_NAME, "Error reporting");
Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/device/device-log-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export class OpenDeviceLogStreamCommand implements ICommand {
constructor(private $devicesService: Mobile.IDevicesService,
private $errors: IErrors,
private $commandsService: ICommandsService,
private $options: ICommonOptions,
private $options: IOptions,
private $deviceLogProvider: Mobile.IDeviceLogProvider,
private $loggingLevels: Mobile.ILoggingLevels,
$iOSSimulatorLogProvider: Mobile.IiOSSimulatorLogProvider) {
Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/device/get-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export class GetFileCommand implements ICommand {
private $stringParameter: ICommandParameter,
private $project: Project.IProjectBase,
private $errors: IErrors,
private $options: ICommonOptions) { }
private $options: IOptions) { }

public allowedParameters: ICommandParameter[] = [this.$stringParameter, this.$stringParameter];

Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/device/list-applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as util from "util";
export class ListApplicationsCommand implements ICommand {
constructor(private $devicesService: Mobile.IDevicesService,
private $logger: ILogger,
private $options: ICommonOptions) { }
private $options: IOptions) { }

allowedParameters: ICommandParameter[] = [];

Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/device/list-devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class ListDevicesCommand implements ICommand {
private $logger: ILogger,
private $stringParameter: ICommandParameter,
private $mobileHelper: Mobile.IMobileHelper,
private $options: ICommonOptions) { }
private $options: IOptions) { }

public allowedParameters = [this.$stringParameter];

Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/device/list-files.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export class ListFilesCommand implements ICommand {
constructor(private $devicesService: Mobile.IDevicesService,
private $stringParameter: ICommandParameter,
private $options: ICommonOptions,
private $options: IOptions,
private $project: Project.IProjectBase,
private $errors: IErrors) { }

Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/device/put-file.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export class PutFileCommand implements ICommand {
constructor(private $devicesService: Mobile.IDevicesService,
private $stringParameter: ICommandParameter,
private $options: ICommonOptions,
private $options: IOptions,
private $project: Project.IProjectBase,
private $errors: IErrors) { }

Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/device/run-application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export class RunApplicationOnDeviceCommand implements ICommand {
private $errors: IErrors,
private $stringParameter: ICommandParameter,
private $staticConfig: Config.IStaticConfig,
private $options: ICommonOptions) { }
private $options: IOptions) { }

public allowedParameters: ICommandParameter[] = [this.$stringParameter, this.$stringParameter];

Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/device/stop-application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export class StopApplicationOnDeviceCommand implements ICommand {

constructor(private $devicesService: Mobile.IDevicesService,
private $stringParameter: ICommandParameter,
private $options: ICommonOptions) { }
private $options: IOptions) { }

allowedParameters: ICommandParameter[] = [this.$stringParameter, this.$stringParameter, this.$stringParameter];

Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/device/uninstall-application.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export class UninstallApplicationCommand implements ICommand {
constructor(private $devicesService: Mobile.IDevicesService,
private $stringParameter: ICommandParameter,
private $options: ICommonOptions) { }
private $options: IOptions) { }

allowedParameters: ICommandParameter[] = [this.$stringParameter];

Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/generate-messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class GenerateMessages implements ICommand {

constructor(private $fs: IFileSystem,
private $messageContractGenerator: IServiceContractGenerator,
private $options: ICommonOptions) {
private $options: IOptions) {
}

allowedParameters: ICommandParameter[] = [];
Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/help.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export class HelpCommand implements ICommand {
constructor(private $injector: IInjector,
private $helpService: IHelpService,
private $options: ICommonOptions) { }
private $options: IOptions) { }

public enableHooks = false;
public async canExecute(args: string[]): Promise<boolean> {
Expand Down
2 changes: 1 addition & 1 deletion lib/common/commands/proxy/proxy-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ProxySetCommand extends ProxyCommandBase {
private $staticConfig: Config.IStaticConfig,
protected $analyticsService: IAnalyticsService,
protected $logger: ILogger,
protected $options: ICommonOptions,
protected $options: IOptions,
protected $proxyService: IProxyService) {
super($analyticsService, $logger, $proxyService, proxySetCommandName);
}
Expand Down
43 changes: 1 addition & 42 deletions lib/common/declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1256,47 +1256,6 @@ interface IHasEmulatorOption {
emulator: boolean;
}

interface ICommonOptions extends IRelease, IDeviceIdentifier, IJustLaunch, IAvd, IAvailableDevices, IProfileDir, IHasEmulatorOption {
argv: IYargArgv;
validateOptions(commandSpecificDashedOptions?: IDictionary<IDashedOption>): void;
options: IDictionary<any>;
shorthands: string[];
/**
* Project Configuration
*/
config: string[];
log: string;
verbose: boolean;
path: string;
version: boolean;
help: boolean;
json: boolean;
watch: boolean;
timeout: string;
appid: string;
geny: string;
debugBrk: boolean;
debugPort: number;
start: boolean;
stop: boolean;
ddi: string; // the path to developer disk image
insecure: boolean;
skipRefresh: boolean;
file: string;
analyticsClient: string;
force: boolean;
companion: boolean;
sdk: string;
template: string;
certificate: string;
certificatePassword: string;
var: Object;
default: Boolean;
count: number;
hooks: boolean;
debug: boolean;
}

interface IYargArgv extends IDictionary<any> {
_: string[];
$0: string;
Expand Down Expand Up @@ -1372,7 +1331,7 @@ interface IDoctorService {
* @param configOptions: defines if the result should be tracked by Analytics
* @returns {Promise<void>}
*/
printWarnings(configOptions?: { trackResult: boolean, projectDir?: string, runtimeVersion?: string, options?: ICommonOptions }): Promise<void>;
printWarnings(configOptions?: { trackResult: boolean, projectDir?: string, runtimeVersion?: string, options?: IOptions }): Promise<void>;
/**
* Runs the setup script on host machine
* @returns {Promise<ISpawnResult>}
Expand Down
2 changes: 1 addition & 1 deletion lib/common/dispatchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class CommandDispatcher implements ICommandDispatcher {
private $commandsService: ICommandsService,
private $staticConfig: Config.IStaticConfig,
private $sysInfo: ISysInfo,
private $options: ICommonOptions,
private $options: IOptions,
private $fs: IFileSystem) { }

public async dispatchCommand(): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion lib/common/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class Logger implements ILogger {
private static LABEL = "[WARNING]:";

constructor($config: Config.IConfig,
private $options: ICommonOptions) {
private $options: IOptions) {
const appenders: log4js.IAppender[] = [];

if (!$config.CI_LOGGER) {
Expand Down
2 changes: 1 addition & 1 deletion lib/common/mobile/android/android-application-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class AndroidApplicationManager extends ApplicationManagerBase {

constructor(private adb: Mobile.IDeviceAndroidDebugBridge,
private identifier: string,
private $options: ICommonOptions,
private $options: IOptions,
private $logcatHelper: Mobile.ILogcatHelper,
private $androidProcessService: Mobile.IAndroidProcessService,
private $httpClient: Server.IHttpClient,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export class DeviceAppDataFactory implements Mobile.IDeviceAppDataFactory {
constructor(private $deviceAppDataProvider: Mobile.IDeviceAppDataProvider,
private $injector: IInjector,
private $options: ICommonOptions) { }
private $options: IOptions) { }

create<T>(appIdentifier: string, platform: string, device: Mobile.IDevice, liveSyncOptions?: { isForCompanionApp: boolean }): T {
const factoryRules = this.$deviceAppDataProvider.createFactoryRules();
Expand Down
2 changes: 1 addition & 1 deletion lib/common/mobile/ios/device/ios-application-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class IOSApplicationManager extends ApplicationManagerBase {
private $errors: IErrors,
private $iOSNotificationService: IiOSNotificationService,
private $iosDeviceOperations: IIOSDeviceOperations,
private $options: ICommonOptions,
private $options: IOptions,
private $deviceLogProvider: Mobile.IDeviceLogProvider) {
super($logger, $hooksService);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { cache } from "../../../decorators";
export class IOSSimulatorApplicationManager extends ApplicationManagerBase {
constructor(private iosSim: any,
private device: Mobile.IiOSDevice,
private $options: ICommonOptions,
private $options: IOptions,
private $fs: IFileSystem,
private $plistParser: IPlistParser,
private $deviceLogProvider: Mobile.IDeviceLogProvider,
Expand Down
2 changes: 1 addition & 1 deletion lib/common/mobile/mobile-core/devices-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class DevicesService extends EventEmitter implements Mobile.IDevicesServi
private $deviceLogProvider: Mobile.IDeviceLogProvider,
private $hostInfo: IHostInfo,
private $injector: IInjector,
private $options: ICommonOptions,
private $options: IOptions,
private $androidProcessService: Mobile.IAndroidProcessService,
private $processService: IProcessService,
private $iOSEmulatorServices: Mobile.IiOSSimulatorService,
Expand Down
Loading