Skip to content

Commit b130b20

Browse files
chore: fix typos and arguments (#76)
1 parent 3a8500a commit b130b20

9 files changed

+10
-10
lines changed

lib/appium-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class AppiumServer {
5656
this._hasStarted = hasStarted;
5757
}
5858

59-
public async start(port, deviceManager: IDeviceManager = new DeviceManger(port)) {
59+
public async start(port, deviceManager: IDeviceManager = new DeviceManger(this._args.deviceControllerServerPort)) {
6060
this._deviceManager = deviceManager;
6161
if (!this._args.device) {
6262
const device = await this._deviceManager.startDevice(this._args);

lib/interfaces/ns-capabilities.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ export interface INsCapabilities {
2121
device: IDevice;
2222
ignoreDeviceController: boolean;
2323
useDeviceControllerServer: boolean;
24-
deviceControllerServerPort: string;
24+
deviceControllerServerPort: number;
2525
}

lib/interfaces/ns-capabilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ export interface INsCapabilities {
2121
reuseDevice: boolean;
2222
device: IDevice;
2323
ignoreDeviceController: boolean;
24-
useDeviceControllerServer:boolean;
25-
deviceControllerServerPort:string;
24+
useDeviceControllerServer: boolean;
25+
deviceControllerServerPort: number;
2626
}

lib/ns-capabilities.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export declare class NsCapabilities implements INsCapabilities {
4444
appPath: string;
4545
readonly ignoreDeviceController: boolean;
4646
readonly useDeviceControllerServer: boolean;
47-
readonly deviceControllerServerPort: string;
47+
readonly deviceControllerServerPort: number;
4848
device: IDevice;
4949
readonly emulatorOptions: string;
5050
private isAndroidPlatform();

lib/ns-capabilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class NsCapabilities implements INsCapabilities {
2626
private _device: IDevice;
2727
private _ignoreDeviceController: boolean;
2828
private _useDeviceControllerServer: boolean;
29-
private _deviceControllerServerPort: string;
29+
private _deviceControllerServerPort: number;
3030
private exceptions: Array<string> = new Array();
3131

3232
constructor() {

lib/parser.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export declare const capabilitiesName = "appium.capabilities.json";
2-
export declare const projectDir: any, projectBinary: any, pluginRoot: any, pluginBinary: any, port: any, verbose: any, appiumCapsLocation: any, testFolder: any, runType: any, isSauceLab: any, appPath: any, storage: any, testReports: any, reuseDevice: any, ignoreDeviceController: any, useDeviceControllerServer: any, deviceControllerServerPort: any;
2+
export declare const projectDir: any, projectBinary: any, pluginRoot: any, pluginBinary: any, port: any, verbose: any, appiumCapsLocation: any, testFolder: any, runType: any, isSauceLab: any, appPath: any, storage: any, testReports: any, reuseDevice: any, ignoreDeviceController: any, useDeviceControllerServer: any, deviceControllerServerPort: number;

lib/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const config = (() => {
5555
reuseDevice: options.reuseDevice || process.env.npm_config_REUSE_DEVICE || process.env.REUSE_DEVICE,
5656
ignoreDeviceController: options.ignoreDeviceController,
5757
useDeviceControllerServer: options.useDeviceControllerServer || process.env['USE_DEVICE_CONTROLLER_SERVER'],
58-
deviceControllerServerPort: options.deviceControllerServerPort || process.env['DEVICE_CONTROLLER_SERVER_PORT'] || 8700
58+
deviceControllerServerPort: parseInt(options.deviceControllerServerPort) || parseInt(process.env['DEVICE_CONTROLLER_SERVER_PORT']) || 8700
5959
};
6060

6161
return config;

lib/service/service-context.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export declare class ServiceContext {
66
private readonly _utilsController;
77
private static serviceContext;
88
constructor(_port: any, _baseUrl: any);
9-
static createServer(port: any, host?: string): ServiceContext;
9+
static createServer(port?: number, host?: string): ServiceContext;
1010
subscribe(deviceName: any, platformName: any, platformVersion: any, info: any): Promise<{}>;
1111
unsubscribe(token: any): Promise<{}>;
1212
releasePort(port: any): Promise<{}>;

lib/service/service-context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class ServiceContext {
1010
constructor(private _port, private _baseUrl) {
1111
}
1212

13-
public static createServer(port, host = "localhost") {
13+
public static createServer(port = 8700, host = "localhost") {
1414
if (!ServiceContext.serviceContext) {
1515
ServiceContext.serviceContext = new ServiceContext(port, host);
1616
}

0 commit comments

Comments
 (0)