@wdio/appium-service 8.15.6 → 8.15.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -85,10 +85,10 @@ export const config = {
85
85
  ### args
86
86
  Map of arguments for the Appium server, passed directly to `appium`.
87
87
 
88
- See [the documentation](https://appium.github.io/appium.io/docs/en/writing-running-appium/server-args/index.html) for possible arguments.
89
- The arguments should be supplied in lower camel case, so `--pre-launch true` becomes `preLaunch: true` or passed as an array.
88
+ See [the documentation](https://github.com/appium/appium/blob/master/packages/appium/docs/en/cli/args.md) for possible arguments.
89
+ The arguments are supplied in lower camel case. For instance, `debugLogSpacing: true` transforms into `--debug-log-spacing`, or they can be supplied as outlined in the Appium documentation.
90
90
 
91
- Type: `Object` or `Array`
91
+ Type: `Object`
92
92
 
93
93
  Default: `{}`
94
94
 
@@ -101,16 +101,15 @@ export const config = {
101
101
  args: {
102
102
  // ...
103
103
  debugLogSpacing: true,
104
- platformName: 'iOS',
104
+ platformName: 'iOS'
105
105
  // ...
106
106
  }
107
- // or
108
- // args: ['-p', '4722', '--relaxed-security', '--log-level', 'info:info']
109
107
  }]
110
108
  ],
111
109
  // ...
112
110
  }
113
111
  ```
112
+ **Note:** The utilization of aliases is discouraged and unsupported. Instead, please use the full property name in lower camel case.
114
113
 
115
114
  ----
116
115
 
@@ -1 +1 @@
1
- {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGlE,OAAO,KAAK,EAAyB,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAY5E,MAAM,CAAC,OAAO,OAAO,cAAe,YAAW,QAAQ,CAAC,eAAe;IAO/D,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,OAAO,CAAC;IARpB,OAAO,CAA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auncher {
85
85
  });
86
86
  }
87
87
  async onPrepare() {
88
+ /**
89
+ * Throws an error if `this._options.args` is defined and is an array.
90
+ * @throws {Error} If `this._options.args` is an array.
91
+ */
92
+ if (Array.isArray(this._options.args)) {
93
+ throw new Error('Args should be an object');
94
+ }
88
95
  /**
89
96
  * Append remaining arguments
90
97
  */
package/build/types.d.ts CHANGED
@@ -1,10 +1,112 @@
1
1
  export type AppiumServerArguments = {
2
- [capability: string]: any;
2
+ /**
3
+ * Hostname to listen on
4
+ */
5
+ address?: string;
6
+ /**
7
+ * Allow web browser connections from any host
8
+ */
9
+ allowCors?: boolean;
10
+ /**
11
+ * Comma-separated list of insecure features which are allowed to run in server session
12
+ */
13
+ allowInsecure?: string;
14
+ /**
15
+ * Base path to use as the prefix for all webdriver routes running on the server
16
+ */
17
+ basePath?: string;
18
+ /**
19
+ * Callback IP address
20
+ */
21
+ callbackAddress?: string;
22
+ /**
23
+ * Callback Port
24
+ */
25
+ callbackPort?: number | string;
26
+ /**
27
+ * Add exaggerated spacing in logs
28
+ */
29
+ debugLogSpacing?: boolean;
30
+ /**
31
+ * Default desired capabilities, which will be added to each session unless overridden by received capabilities
32
+ */
33
+ defaultCapabilities?: object;
34
+ /**
35
+ * Comma-separated list of insecure features which are not allowed to run in server session
36
+ */
37
+ denyInsecure?: string;
38
+ /**
39
+ * Number of seconds the server applies as both the keep-alive timeout and the connection timeout for all requests
40
+ */
41
+ keepAliveTimeout?: number | string;
42
+ /**
43
+ * Use local timezone for timestamps
44
+ */
45
+ localTimezone?: boolean;
46
+ /**
47
+ * Send log output to the file
48
+ */
49
+ log?: string;
50
+ /**
51
+ * Log level
52
+ */
53
+ logLevel?: string;
54
+ /**
55
+ * Use color in console output
56
+ */
57
+ logNoColors?: boolean;
58
+ /**
59
+ * Show timestamps in console output
60
+ */
61
+ logTimestamp?: boolean;
62
+ /**
63
+ * Add long stack traces to log entries
64
+ */
65
+ longStacktrace?: boolean;
66
+ /**
67
+ * Do not check that needed files are readable and/or writable
68
+ */
69
+ noPermsCheck?: boolean;
70
+ /**
71
+ * Path to configuration JSON file or the configuration itself
72
+ */
73
+ nodeconfig?: string | object;
3
74
  /**
4
75
  * Port to listen on
5
76
  */
6
77
  port?: number | string;
7
- basePath?: string;
78
+ /**
79
+ * Disable additional security checks
80
+ */
81
+ relaxedSecurity?: boolean;
82
+ /**
83
+ * Enables session override (clobbering)
84
+ */
85
+ sessionOverride?: boolean;
86
+ /**
87
+ * Trigger session failures when provided desired capabilities are not recognized as valid
88
+ */
89
+ strictCaps?: boolean;
90
+ /**
91
+ * Absolute path to directory used for managing temporary files
92
+ */
93
+ tmp?: string;
94
+ /**
95
+ * Absolute path to directory used to save iOS instrument traces
96
+ */
97
+ traceDir?: string;
98
+ /**
99
+ * Comma-separated list of drivers to activate
100
+ */
101
+ useDrivers?: string;
102
+ /**
103
+ * Comma-separated list of plugins to activate
104
+ */
105
+ usePlugins?: string;
106
+ /**
107
+ * Directs the log output to the listener
108
+ */
109
+ webhook?: string;
8
110
  };
9
111
  export interface AppiumSessionCapabilities {
10
112
  /**
@@ -29,9 +131,9 @@ export interface AppiumServiceConfig {
29
131
  * Map of arguments for the Appium server, passed directly to `appium`.
30
132
  * @default {}
31
133
  */
32
- args?: AppiumServerArguments | Array<string>;
134
+ args?: AppiumServerArguments;
33
135
  }
34
- export type ArgValue = string | number | boolean | null;
136
+ export type ArgValue = string | number | boolean | null | object;
35
137
  export type KeyValueArgs = {
36
138
  [key: string]: ArgValue;
37
139
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAChC,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAAA;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,WAAW,yBAAyB;IACtC;;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CAAA;AAChE,MAAM,MAAM,YAAY,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAA;CAAE,CAAA"}
package/build/utils.d.ts CHANGED
@@ -6,7 +6,7 @@ import type { ArgValue, KeyValueArgs } from './types.js';
6
6
  * @return {String} absolute file path
7
7
  */
8
8
  export declare function getFilePath(filePath: string, defaultFilename: string): string;
9
- export declare function formatCliArgs(args: KeyValueArgs | ArgValue[]): string[];
9
+ export declare function formatCliArgs(args: KeyValueArgs): string[];
10
10
  export declare function sanitizeCliOptionValue(value: ArgValue): string;
11
11
  export declare function isWindows(): boolean;
12
12
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAIxD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAU9E;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,CAoBvE;AAED,wBAAgB,sBAAsB,CAAE,KAAK,EAAE,QAAQ,UAItD;AAED,wBAAgB,SAAS,IAAI,OAAO,CAEnC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAIxD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAU9E;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,EAAE,CAgB1D;AAED,wBAAgB,sBAAsB,CAAE,KAAK,EAAE,QAAQ,UAItD;AAED,wBAAgB,SAAS,IAAI,OAAO,CAEnC"}
package/build/utils.js CHANGED
@@ -17,9 +17,6 @@ export function getFilePath(filePath, defaultFilename) {
17
17
  return absolutePath;
18
18
  }
19
19
  export function formatCliArgs(args) {
20
- if (Array.isArray(args)) {
21
- return args.map(arg => sanitizeCliOptionValue(arg));
22
- }
23
20
  const cliArgs = [];
24
21
  for (const key in args) {
25
22
  const value = args[key];
@@ -36,7 +33,7 @@ export function formatCliArgs(args) {
36
33
  return cliArgs;
37
34
  }
38
35
  export function sanitizeCliOptionValue(value) {
39
- const valueString = String(value);
36
+ const valueString = typeof value === 'object' ? JSON.stringify(value) : String(value);
40
37
  // Encapsulate the value string in single quotes if it contains a white space
41
38
  return /\s/.test(valueString) ? `'${valueString}'` : valueString;
42
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/appium-service",
3
- "version": "8.15.6",
3
+ "version": "8.15.8",
4
4
  "description": "A WebdriverIO service to start & stop Appium Server",
5
5
  "author": "Morten Bjerg Gregersen <morten@mogee.dk>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-appium-service",
@@ -33,15 +33,15 @@
33
33
  },
34
34
  "typeScriptVersion": "3.8.3",
35
35
  "dependencies": {
36
- "@wdio/config": "8.15.6",
36
+ "@wdio/config": "8.15.8",
37
37
  "@wdio/logger": "8.11.0",
38
- "@wdio/types": "8.15.0",
38
+ "@wdio/types": "8.15.7",
39
39
  "import-meta-resolve": "^3.0.0",
40
40
  "param-case": "^3.0.4",
41
- "webdriverio": "8.15.6"
41
+ "webdriverio": "8.15.8"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "c205398c7773823b1eb365a5abeadbcc2fb6b8a3"
46
+ "gitHead": "ed14f208c4a88e2caae4e001c642ee9272fac52c"
47
47
  }