appium 3.2.1 → 3.3.0

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.
Files changed (122) hide show
  1. package/build/lib/cli/args.d.ts +16 -12
  2. package/build/lib/cli/args.d.ts.map +1 -1
  3. package/build/lib/cli/args.js +15 -35
  4. package/build/lib/cli/args.js.map +1 -1
  5. package/build/lib/cli/driver-command.d.ts +51 -93
  6. package/build/lib/cli/driver-command.d.ts.map +1 -1
  7. package/build/lib/cli/driver-command.js +11 -66
  8. package/build/lib/cli/driver-command.js.map +1 -1
  9. package/build/lib/cli/extension-command.d.ts +211 -415
  10. package/build/lib/cli/extension-command.d.ts.map +1 -1
  11. package/build/lib/cli/extension-command.js +384 -653
  12. package/build/lib/cli/extension-command.js.map +1 -1
  13. package/build/lib/cli/extension.d.ts +11 -16
  14. package/build/lib/cli/extension.d.ts.map +1 -1
  15. package/build/lib/cli/extension.js +10 -28
  16. package/build/lib/cli/extension.js.map +1 -1
  17. package/build/lib/cli/parser.d.ts +40 -69
  18. package/build/lib/cli/parser.d.ts.map +1 -1
  19. package/build/lib/cli/parser.js +24 -59
  20. package/build/lib/cli/parser.js.map +1 -1
  21. package/build/lib/cli/plugin-command.d.ts +50 -90
  22. package/build/lib/cli/plugin-command.d.ts.map +1 -1
  23. package/build/lib/cli/plugin-command.js +11 -63
  24. package/build/lib/cli/plugin-command.js.map +1 -1
  25. package/build/lib/cli/setup-command.d.ts +21 -26
  26. package/build/lib/cli/setup-command.d.ts.map +1 -1
  27. package/build/lib/cli/setup-command.js +13 -55
  28. package/build/lib/cli/setup-command.js.map +1 -1
  29. package/build/lib/cli/utils.d.ts +27 -29
  30. package/build/lib/cli/utils.d.ts.map +1 -1
  31. package/build/lib/cli/utils.js +29 -31
  32. package/build/lib/cli/utils.js.map +1 -1
  33. package/build/lib/config-file.d.ts +24 -67
  34. package/build/lib/config-file.d.ts.map +1 -1
  35. package/build/lib/config-file.js +56 -115
  36. package/build/lib/config-file.js.map +1 -1
  37. package/build/lib/config.d.ts +42 -44
  38. package/build/lib/config.d.ts.map +1 -1
  39. package/build/lib/config.js +75 -107
  40. package/build/lib/config.js.map +1 -1
  41. package/build/lib/constants.d.ts +23 -23
  42. package/build/lib/constants.d.ts.map +1 -1
  43. package/build/lib/constants.js +10 -15
  44. package/build/lib/constants.js.map +1 -1
  45. package/build/lib/doctor/doctor.d.ts +40 -57
  46. package/build/lib/doctor/doctor.d.ts.map +1 -1
  47. package/build/lib/doctor/doctor.js +29 -60
  48. package/build/lib/doctor/doctor.js.map +1 -1
  49. package/build/lib/grid-register.d.ts +32 -7
  50. package/build/lib/grid-register.d.ts.map +1 -1
  51. package/build/lib/grid-register.js +84 -48
  52. package/build/lib/grid-register.js.map +1 -1
  53. package/build/lib/logsink.d.ts +13 -22
  54. package/build/lib/logsink.d.ts.map +1 -1
  55. package/build/lib/logsink.js +48 -103
  56. package/build/lib/logsink.js.map +1 -1
  57. package/build/lib/main.js +1 -1
  58. package/build/lib/main.js.map +1 -1
  59. package/build/lib/schema/arg-spec.d.ts +32 -107
  60. package/build/lib/schema/arg-spec.d.ts.map +1 -1
  61. package/build/lib/schema/arg-spec.js +11 -107
  62. package/build/lib/schema/arg-spec.js.map +1 -1
  63. package/build/lib/schema/cli-args.d.ts +3 -15
  64. package/build/lib/schema/cli-args.d.ts.map +1 -1
  65. package/build/lib/schema/cli-args.js +15 -105
  66. package/build/lib/schema/cli-args.js.map +1 -1
  67. package/build/lib/schema/cli-transformers.d.ts +15 -12
  68. package/build/lib/schema/cli-transformers.d.ts.map +1 -1
  69. package/build/lib/schema/cli-transformers.js +15 -45
  70. package/build/lib/schema/cli-transformers.js.map +1 -1
  71. package/build/lib/schema/index.d.ts +2 -2
  72. package/build/lib/schema/index.d.ts.map +1 -1
  73. package/build/lib/schema/index.js.map +1 -1
  74. package/build/lib/schema/keywords.d.ts +12 -20
  75. package/build/lib/schema/keywords.d.ts.map +1 -1
  76. package/build/lib/schema/keywords.js +6 -51
  77. package/build/lib/schema/keywords.js.map +1 -1
  78. package/build/lib/schema/schema.d.ts +106 -231
  79. package/build/lib/schema/schema.d.ts.map +1 -1
  80. package/build/lib/schema/schema.js +75 -345
  81. package/build/lib/schema/schema.js.map +1 -1
  82. package/build/lib/utils.d.ts +59 -238
  83. package/build/lib/utils.d.ts.map +1 -1
  84. package/build/lib/utils.js +55 -207
  85. package/build/lib/utils.js.map +1 -1
  86. package/lib/cli/{args.js → args.ts} +40 -51
  87. package/lib/cli/driver-command.ts +122 -0
  88. package/lib/cli/{extension-command.js → extension-command.ts} +610 -689
  89. package/lib/cli/extension.ts +65 -0
  90. package/lib/cli/{parser.js → parser.ts} +48 -71
  91. package/lib/cli/plugin-command.ts +117 -0
  92. package/lib/cli/{setup-command.js → setup-command.ts} +57 -72
  93. package/lib/cli/utils.ts +97 -0
  94. package/lib/config-file.ts +212 -0
  95. package/lib/{config.js → config.ts} +129 -141
  96. package/lib/{constants.js → constants.ts} +30 -41
  97. package/lib/doctor/{doctor.js → doctor.ts} +81 -91
  98. package/lib/grid-register.ts +250 -0
  99. package/lib/{logsink.js → logsink.ts} +91 -137
  100. package/lib/main.js +1 -1
  101. package/lib/schema/arg-spec.ts +131 -0
  102. package/lib/schema/cli-args.ts +171 -0
  103. package/lib/schema/cli-transformers.ts +83 -0
  104. package/lib/schema/keywords.ts +96 -0
  105. package/lib/schema/schema.ts +449 -0
  106. package/lib/utils.ts +404 -0
  107. package/package.json +19 -20
  108. package/tsconfig.json +1 -1
  109. package/build/package.json +0 -99
  110. package/lib/cli/driver-command.js +0 -174
  111. package/lib/cli/extension.js +0 -74
  112. package/lib/cli/plugin-command.js +0 -164
  113. package/lib/cli/utils.js +0 -91
  114. package/lib/config-file.js +0 -228
  115. package/lib/grid-register.js +0 -146
  116. package/lib/schema/arg-spec.js +0 -229
  117. package/lib/schema/cli-args.js +0 -254
  118. package/lib/schema/cli-transformers.js +0 -113
  119. package/lib/schema/keywords.js +0 -136
  120. package/lib/schema/schema.js +0 -725
  121. package/lib/utils.js +0 -512
  122. /package/lib/schema/{index.js → index.ts} +0 -0
package/lib/utils.ts ADDED
@@ -0,0 +1,404 @@
1
+ import type {
2
+ BaseDriverCapConstraints,
3
+ Capabilities,
4
+ Constraints,
5
+ NSCapabilities,
6
+ W3CCapabilities,
7
+ } from '@appium/types';
8
+ import type {
9
+ Args,
10
+ CliCommand,
11
+ CliCommandDriver,
12
+ CliCommandPlugin,
13
+ CliCommandServer,
14
+ CliCommandSetup,
15
+ CliExtensionCommand,
16
+ CliExtensionSubcommand,
17
+ CliCommandSetupSubcommand,
18
+ } from 'appium/types';
19
+ import _ from 'lodash';
20
+ import logger from './logger';
21
+ import {
22
+ processCapabilities,
23
+ STANDARD_CAPS,
24
+ errors,
25
+ isW3cCaps,
26
+ } from '@appium/base-driver';
27
+ import {inspect as dump, type InspectOptions} from 'node:util';
28
+ import {node, fs} from '@appium/support';
29
+ import path from 'node:path';
30
+ import {SERVER_SUBCOMMAND, DRIVER_TYPE, PLUGIN_TYPE, SETUP_SUBCOMMAND} from './constants';
31
+ import os from 'node:os';
32
+
33
+ const W3C_APPIUM_PREFIX = 'appium';
34
+ const STANDARD_CAPS_LOWERCASE = new Set([...STANDARD_CAPS].map((cap) => cap.toLowerCase()));
35
+ export const V4_BROADCAST_IP = '0.0.0.0';
36
+ export const V6_BROADCAST_IP = '::';
37
+ export const npmPackage = fs.readPackageJsonFrom(__dirname);
38
+
39
+ /** If stdout is a TTY; used for tighter control over log output. */
40
+ const isStdoutTTY = process.stdout.isTTY;
41
+
42
+ /** Result of successfully parsing W3C capabilities for the inner driver. */
43
+ export interface ParsedDriverCaps<C extends Constraints = BaseDriverCapConstraints> {
44
+ desiredCaps: Capabilities<C>;
45
+ processedW3CCapabilities: W3CCapabilities<C>;
46
+ }
47
+
48
+ /** Result when capability parsing fails or caps are invalid. */
49
+ export interface InvalidCaps<C extends Constraints = BaseDriverCapConstraints> {
50
+ error: Error;
51
+ desiredCaps?: Capabilities<C>;
52
+ processedW3CCapabilities?: W3CCapabilities<C>;
53
+ }
54
+
55
+ /**
56
+ * Creates an error when a session receives non-W3C capabilities.
57
+ */
58
+ export function makeNonW3cCapsError(): Error {
59
+ return new errors.SessionNotCreatedError(
60
+ 'Session capabilities format must comply to the W3C standard. Make sure your client is up to date. ' +
61
+ 'See https://www.w3.org/TR/webdriver/#new-session for more details.'
62
+ );
63
+ }
64
+
65
+ /**
66
+ * Logs a value to the console using the info logger (with util.inspect formatting).
67
+ */
68
+ export const inspect = _.flow(
69
+ _.partialRight(dump as (object: unknown, options: InspectOptions) => string, {
70
+ colors: true,
71
+ depth: null,
72
+ compact: !isStdoutTTY,
73
+ }),
74
+ (...args: unknown[]) => {
75
+ logger.info(...args);
76
+ }
77
+ );
78
+
79
+ /**
80
+ * Parses W3C capabilities for the inner driver and applies defaults.
81
+ *
82
+ * @returns Parsed caps or an invalid result with an error.
83
+ */
84
+ export function parseCapsForInnerDriver<C extends Constraints = BaseDriverCapConstraints>(
85
+ w3cCapabilities: W3CCapabilities<C>,
86
+ constraints: C = {} as C,
87
+ defaultCapabilities: NSCapabilities<C> = {}
88
+ ): ParsedDriverCaps<C> | InvalidCaps<C> {
89
+ if (!isW3cCaps(w3cCapabilities)) {
90
+ return {error: makeNonW3cCapsError()};
91
+ }
92
+
93
+ let desiredCaps: Capabilities<C> = {} as Capabilities<C>;
94
+ // eslint-disable-next-line prefer-const -- assigned in success path after try
95
+ let processedW3CCapabilities: W3CCapabilities<C> | undefined;
96
+
97
+ w3cCapabilities = _.cloneDeep(w3cCapabilities);
98
+ defaultCapabilities = _.cloneDeep(defaultCapabilities);
99
+
100
+ if (!_.isEmpty(defaultCapabilities)) {
101
+ for (const [defaultCapKey, defaultCapValue] of _.toPairs(defaultCapabilities)) {
102
+ let isCapAlreadySet = false;
103
+ for (const firstMatchEntry of w3cCapabilities.firstMatch ?? []) {
104
+ if (
105
+ _.isPlainObject(firstMatchEntry) &&
106
+ _.has(removeAppiumPrefixes(firstMatchEntry as NSCapabilities<C>), removeAppiumPrefix(defaultCapKey))
107
+ ) {
108
+ isCapAlreadySet = true;
109
+ break;
110
+ }
111
+ }
112
+ isCapAlreadySet =
113
+ isCapAlreadySet ||
114
+ (_.isPlainObject(w3cCapabilities.alwaysMatch) &&
115
+ _.has(
116
+ removeAppiumPrefixes(w3cCapabilities.alwaysMatch),
117
+ removeAppiumPrefix(defaultCapKey)
118
+ ));
119
+ if (isCapAlreadySet) {
120
+ continue;
121
+ }
122
+
123
+ if (_.isEmpty(w3cCapabilities.firstMatch)) {
124
+ w3cCapabilities.firstMatch = [{[defaultCapKey]: defaultCapValue}] as W3CCapabilities<C>['firstMatch'];
125
+ } else {
126
+ (w3cCapabilities.firstMatch[0] as Record<string, unknown>)[defaultCapKey] = defaultCapValue;
127
+ }
128
+ }
129
+ }
130
+
131
+ try {
132
+ desiredCaps = processCapabilities(w3cCapabilities, constraints, true) as Capabilities<C>;
133
+ } catch (error) {
134
+ logger.info(`Could not parse W3C capabilities: ${(error as Error).message}`);
135
+ return {
136
+ desiredCaps,
137
+ processedW3CCapabilities,
138
+ error: error as Error,
139
+ };
140
+ }
141
+
142
+ processedW3CCapabilities = {
143
+ alwaysMatch: {...insertAppiumPrefixes(desiredCaps)},
144
+ firstMatch: [{}],
145
+ } as W3CCapabilities<C>;
146
+
147
+ return {
148
+ desiredCaps,
149
+ processedW3CCapabilities,
150
+ };
151
+ }
152
+
153
+ /**
154
+ * Prefixes capability keys with `appium:` where appropriate.
155
+ */
156
+ export function insertAppiumPrefixes<C extends Constraints = BaseDriverCapConstraints>(
157
+ caps: Capabilities<C>
158
+ ): NSCapabilities<C> {
159
+ return _.mapKeys(caps, (_, key) =>
160
+ STANDARD_CAPS_LOWERCASE.has(key.toLowerCase()) || key.includes(':')
161
+ ? key
162
+ : `${W3C_APPIUM_PREFIX}:${key}`
163
+ ) as NSCapabilities<C>;
164
+ }
165
+
166
+ /**
167
+ * Removes `appium:` prefix from capability keys.
168
+ */
169
+ export function removeAppiumPrefixes<C extends Constraints = BaseDriverCapConstraints>(
170
+ caps: NSCapabilities<C>
171
+ ): Capabilities<C> {
172
+ return _.mapKeys(caps, (_, key) => removeAppiumPrefix(key)) as Capabilities<C>;
173
+ }
174
+
175
+ /**
176
+ * Returns the root directory of the Appium module (memoized).
177
+ *
178
+ * @throws {Error} If the appium module root cannot be determined.
179
+ */
180
+ export const getAppiumModuleRoot = _.memoize(function getAppiumModuleRoot(): string {
181
+ const selfRoot = node.getModuleRootSync('appium', __filename);
182
+ if (!selfRoot) {
183
+ throw new Error('Cannot find the appium module root. This is likely a bug in Appium.');
184
+ }
185
+ return selfRoot;
186
+ });
187
+
188
+ /**
189
+ * Adjusts NODE_PATH so CJS drivers/plugins can load peer deps. Does not work with ESM.
190
+ */
191
+ export function adjustNodePath(): void {
192
+ let appiumModuleSearchRoot: string;
193
+ try {
194
+ appiumModuleSearchRoot = path.dirname(getAppiumModuleRoot());
195
+ } catch (error) {
196
+ logger.warn((error as Error).message);
197
+ return;
198
+ }
199
+
200
+ const refreshRequirePaths = (): boolean => {
201
+ try {
202
+ // Private API; see https://gist.github.com/branneman/8048520#7-the-hack
203
+ (require('node:module') as NodeModuleWithInitPaths).Module._initPaths();
204
+ return true;
205
+ } catch {
206
+ return false;
207
+ }
208
+ };
209
+
210
+ if (!process.env.NODE_PATH) {
211
+ process.env.NODE_PATH = appiumModuleSearchRoot;
212
+ if (refreshRequirePaths()) {
213
+ process.env.APPIUM_OMIT_PEER_DEPS = '1';
214
+ } else {
215
+ delete process.env.NODE_PATH;
216
+ }
217
+ return;
218
+ }
219
+
220
+ const nodePathParts = process.env.NODE_PATH.split(path.delimiter);
221
+ if (nodePathParts.includes(appiumModuleSearchRoot)) {
222
+ process.env.APPIUM_OMIT_PEER_DEPS = '1';
223
+ return;
224
+ }
225
+
226
+ nodePathParts.push(appiumModuleSearchRoot);
227
+ process.env.NODE_PATH = nodePathParts.join(path.delimiter);
228
+ if (refreshRequirePaths()) {
229
+ process.env.APPIUM_OMIT_PEER_DEPS = '1';
230
+ } else {
231
+ process.env.NODE_PATH = _.without(nodePathParts, appiumModuleSearchRoot).join(path.delimiter);
232
+ }
233
+ }
234
+
235
+ interface NodeModuleWithInitPaths {
236
+ Module: {_initPaths(): void};
237
+ }
238
+
239
+ /**
240
+ * Pulls Appium settings from capabilities (mutates caps). Supports
241
+ * `settings[key]: value` and `settings: { key: value }`.
242
+ *
243
+ * @returns Parsed settings object; empty if none found.
244
+ */
245
+ export function pullSettings(caps: Record<string, unknown> | null | undefined): Record<string, unknown> {
246
+ if (!_.isPlainObject(caps) || _.isEmpty(caps)) {
247
+ return {};
248
+ }
249
+
250
+ const result: Record<string, unknown> = {};
251
+ const singleSettings: Record<string, unknown> = {};
252
+ for (const [key, value] of _.toPairs(caps)) {
253
+ let match: RegExpExecArray | null;
254
+ if (/^(s|appium:s)ettings$/.test(key) && _.isPlainObject(value)) {
255
+ Object.assign(result, value);
256
+ delete caps[key];
257
+ } else if ((match = /^(s|appium:s)ettings\[(\S+)\]$/.exec(key))) {
258
+ singleSettings[match[2]] = value;
259
+ delete caps[key];
260
+ }
261
+ }
262
+ if (!_.isEmpty(singleSettings)) {
263
+ Object.assign(result, singleSettings);
264
+ }
265
+ return result;
266
+ }
267
+
268
+ type AnyArgs = Args<CliCommand, CliExtensionSubcommand | CliCommandSetupSubcommand | void>;
269
+
270
+ /**
271
+ * Type guard: args are for the server command.
272
+ */
273
+ export function isServerCommandArgs(args: AnyArgs): args is Args<CliCommandServer, void> {
274
+ return args.subcommand === SERVER_SUBCOMMAND;
275
+ }
276
+
277
+ /**
278
+ * Type guard: args are for the setup command.
279
+ */
280
+ export function isSetupCommandArgs(
281
+ args: AnyArgs
282
+ ): args is Args<CliCommandSetup, CliCommandSetupSubcommand> {
283
+ return args.subcommand === SETUP_SUBCOMMAND;
284
+ }
285
+
286
+ /**
287
+ * Type guard: args are for an extension command (driver or plugin).
288
+ */
289
+ export function isExtensionCommandArgs(
290
+ args: AnyArgs
291
+ ): args is Args<CliExtensionCommand, CliExtensionSubcommand> {
292
+ return args.subcommand === DRIVER_TYPE || args.subcommand === PLUGIN_TYPE;
293
+ }
294
+
295
+ /**
296
+ * Type guard: args are for a driver extension command.
297
+ */
298
+ export function isDriverCommandArgs(
299
+ args: AnyArgs
300
+ ): args is Args<CliCommandDriver, CliExtensionSubcommand> {
301
+ return args.subcommand === DRIVER_TYPE;
302
+ }
303
+
304
+ /**
305
+ * Type guard: args are for a plugin extension command.
306
+ */
307
+ export function isPluginCommandArgs(
308
+ args: AnyArgs
309
+ ): args is Args<CliCommandPlugin, CliExtensionSubcommand> {
310
+ return args.subcommand === PLUGIN_TYPE;
311
+ }
312
+
313
+ /**
314
+ * Returns network interfaces for the given IP family.
315
+ *
316
+ * @param family - 4 for IPv4, 6 for IPv6, or null for all.
317
+ */
318
+ export function fetchInterfaces(
319
+ family: 4 | 6 | null = null
320
+ ): os.NetworkInterfaceInfo[] {
321
+ let familyValue: (4 | 6 | string)[] | null = null;
322
+ if (family === 4) {
323
+ familyValue = [4, 'IPv4'];
324
+ } else if (family === 6) {
325
+ familyValue = [6, 'IPv6'];
326
+ }
327
+ const ifaces = _.values(os.networkInterfaces()).filter(Boolean) as os.NetworkInterfaceInfo[][];
328
+ return _.flatMap(ifaces).filter(
329
+ (info) => !familyValue || familyValue.includes(info.family as 4 | 6 | string)
330
+ );
331
+ }
332
+
333
+
334
+ /**
335
+ * Adler-32 checksum (see https://github.com/SheetJS/js-adler32).
336
+ */
337
+ export function adler32(str: string, seed: number | null = null): number {
338
+ let a = 1,
339
+ b = 0,
340
+ M = 0,
341
+ c = 0,
342
+ d = 0;
343
+ const L = str.length;
344
+ if (typeof seed === 'number') {
345
+ a = seed & 0xffff;
346
+ b = seed >>> 16;
347
+ }
348
+ for (let i = 0; i < L;) {
349
+ M = Math.min(L - i, 2918);
350
+ while (M > 0) {
351
+ c = str.charCodeAt(i++);
352
+ if (c < 0x80) {
353
+ a += c;
354
+ } else if (c < 0x800) {
355
+ a += 192 | ((c >> 6) & 31);
356
+ b += a;
357
+ --M;
358
+ a += 128 | (c & 63);
359
+ } else if (c >= 0xd800 && c < 0xe000) {
360
+ c = (c & 1023) + 64;
361
+ d = str.charCodeAt(i++) & 1023;
362
+ a += 240 | ((c >> 8) & 7);
363
+ b += a;
364
+ --M;
365
+ a += 128 | ((c >> 2) & 63);
366
+ b += a;
367
+ --M;
368
+ a += 128 | ((d >> 6) & 15) | ((c & 3) << 4);
369
+ b += a;
370
+ --M;
371
+ a += 128 | (d & 63);
372
+ } else {
373
+ a += 224 | ((c >> 12) & 15);
374
+ b += a;
375
+ --M;
376
+ a += 128 | ((c >> 6) & 63);
377
+ b += a;
378
+ --M;
379
+ a += 128 | (c & 63);
380
+ }
381
+ b += a;
382
+ --M;
383
+ }
384
+ a = 15 * (a >>> 16) + (a & 65535);
385
+ b = 15 * (b >>> 16) + (b & 65535);
386
+ }
387
+ return ((b % 65521) << 16) | (a % 65521);
388
+ }
389
+
390
+ /**
391
+ * Returns true if the address is a broadcast IP (0.0.0.0 or ::).
392
+ */
393
+ export function isBroadcastIp(address: string): boolean {
394
+ return [V4_BROADCAST_IP, V6_BROADCAST_IP, `[${V6_BROADCAST_IP}]`].includes(address);
395
+ }
396
+
397
+ // #region private helpers
398
+
399
+ function removeAppiumPrefix(key: string): string {
400
+ const prefix = `${W3C_APPIUM_PREFIX}:`;
401
+ return _.startsWith(key, prefix) ? key.substring(prefix.length) : key;
402
+ }
403
+
404
+ // #endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium",
3
- "version": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "description": "Automation for Apps.",
5
5
  "keywords": [
6
6
  "automation",
@@ -32,16 +32,15 @@
32
32
  },
33
33
  "files": [
34
34
  "lib",
35
- "build",
35
+ "build/lib",
36
+ "build/types",
36
37
  "index.js",
37
38
  "driver.*",
38
39
  "support.*",
39
40
  "plugin.*",
40
41
  "scripts/autoinstall-extensions.js",
41
42
  "types",
42
- "tsconfig.json",
43
- "!build/tsconfig.tsbuildinfo",
44
- "!build/test"
43
+ "tsconfig.json"
45
44
  ],
46
45
  "scripts": {
47
46
  "build:docs": "node docs/scripts/build-docs.js",
@@ -61,32 +60,32 @@
61
60
  "test:unit": "mocha \"./test/unit/**/*.spec.ts\""
62
61
  },
63
62
  "dependencies": {
64
- "@appium/base-driver": "^10.2.1",
65
- "@appium/base-plugin": "^3.1.0",
66
- "@appium/docutils": "^2.2.2",
67
- "@appium/logger": "^2.0.5",
68
- "@appium/schema": "^1.1.0",
69
- "@appium/support": "^7.0.6",
70
- "@appium/types": "^1.2.1",
63
+ "@appium/base-driver": "10.3.0",
64
+ "@appium/base-plugin": "3.2.0",
65
+ "@appium/docutils": "2.3.0",
66
+ "@appium/logger": "2.0.6",
67
+ "@appium/schema": "1.1.0",
68
+ "@appium/support": "7.1.0",
69
+ "@appium/types": "1.3.0",
71
70
  "@sidvind/better-ajv-errors": "4.0.1",
72
71
  "ajv": "8.18.0",
73
72
  "ajv-formats": "3.0.1",
74
73
  "argparse": "2.0.1",
75
74
  "async-lock": "1.4.1",
76
- "axios": "1.13.6",
75
+ "axios": "1.15.0",
77
76
  "bluebird": "3.7.2",
78
77
  "lilconfig": "3.1.3",
79
- "lodash": "4.17.23",
80
- "lru-cache": "11.2.6",
78
+ "lodash": "4.18.1",
79
+ "lru-cache": "11.3.3",
81
80
  "ora": "5.4.1",
82
81
  "package-changed": "3.0.0",
83
82
  "resolve-from": "5.0.0",
84
83
  "semver": "7.7.4",
85
- "teen_process": "4.0.10",
86
- "type-fest": "5.4.4",
84
+ "teen_process": "4.1.0",
85
+ "type-fest": "5.5.0",
87
86
  "winston": "3.19.0",
88
- "ws": "8.19.0",
89
- "yaml": "2.8.2"
87
+ "ws": "8.20.0",
88
+ "yaml": "2.8.3"
90
89
  },
91
90
  "engines": {
92
91
  "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
@@ -95,5 +94,5 @@
95
94
  "publishConfig": {
96
95
  "access": "public"
97
96
  },
98
- "gitHead": "980a121804ae006db879fb6860f627ac36174c15"
97
+ "gitHead": "7a8965f5c30ffec2ad04ce75903b3960537cef06"
99
98
  }
package/tsconfig.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "checkJs": true,
16
16
  "types": ["mocha", "chai", "chai-as-promised", "node"]
17
17
  },
18
- "include": ["lib", "types", "test", "package.json"],
18
+ "include": ["lib", "types", "test"],
19
19
  "references": [
20
20
  {"path": "../schema"},
21
21
  {"path": "../types"},
@@ -1,99 +0,0 @@
1
- {
2
- "name": "appium",
3
- "version": "3.2.1",
4
- "description": "Automation for Apps.",
5
- "keywords": [
6
- "automation",
7
- "javascript",
8
- "selenium",
9
- "webdriver",
10
- "ios",
11
- "android",
12
- "firefoxos",
13
- "testing"
14
- ],
15
- "homepage": "https://appium.io",
16
- "bugs": {
17
- "url": "https://github.com/appium/appium/issues"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/appium/appium.git",
22
- "directory": "packages/appium"
23
- },
24
- "license": "Apache-2.0",
25
- "author": "https://github.com/appium",
26
- "types": "./build/lib/main.d.ts",
27
- "bin": {
28
- "appium": "index.js"
29
- },
30
- "directories": {
31
- "lib": "./lib"
32
- },
33
- "files": [
34
- "lib",
35
- "build",
36
- "index.js",
37
- "driver.*",
38
- "support.*",
39
- "plugin.*",
40
- "scripts/autoinstall-extensions.js",
41
- "types",
42
- "tsconfig.json",
43
- "!build/tsconfig.tsbuildinfo",
44
- "!build/test"
45
- ],
46
- "scripts": {
47
- "build:docs": "node docs/scripts/build-docs.js",
48
- "build:docs:preview": "cross-env APPIUM_DOCS_PREVIEW=1 npm run build:docs",
49
- "build:docs:cli": "node docs/scripts/gen-cli-args-docs.js",
50
- "build:docs:reference": "node docs/scripts/build-reference.js",
51
- "dev:docs": "npm run dev:docs:en",
52
- "dev:docs:en": "appium-docs build --serve --mkdocs-yml ./docs/mkdocs-en.yml",
53
- "dev:docs:ja": "appium-docs build --serve --mkdocs-yml ./docs/mkdocs-ja.yml",
54
- "dev:docs:zh": "appium-docs build --serve --mkdocs-yml ./docs/mkdocs-zh.yml",
55
- "install-docs-deps": "appium-docs init --no-mkdocs",
56
- "postinstall": "node ./scripts/autoinstall-extensions.js",
57
- "publish:docs": "cross-env APPIUM_DOCS_PUBLISH=1 npm run build:docs",
58
- "test": "npm run test:unit",
59
- "test:e2e": "mocha --exit --timeout 1m --slow 30s \"./test/e2e/**/*.spec.ts\"",
60
- "test:smoke": "cross-env APPIUM_HOME=./local_appium_home node ./index.js driver install uiautomator2 && cross-env APPIUM_HOME=./local_appium_home node ./index.js driver list",
61
- "test:unit": "mocha \"./test/unit/**/*.spec.ts\""
62
- },
63
- "dependencies": {
64
- "@appium/base-driver": "^10.2.1",
65
- "@appium/base-plugin": "^3.1.0",
66
- "@appium/docutils": "^2.2.2",
67
- "@appium/logger": "^2.0.5",
68
- "@appium/schema": "^1.1.0",
69
- "@appium/support": "^7.0.6",
70
- "@appium/types": "^1.2.1",
71
- "@sidvind/better-ajv-errors": "4.0.1",
72
- "ajv": "8.18.0",
73
- "ajv-formats": "3.0.1",
74
- "argparse": "2.0.1",
75
- "async-lock": "1.4.1",
76
- "axios": "1.13.6",
77
- "bluebird": "3.7.2",
78
- "lilconfig": "3.1.3",
79
- "lodash": "4.17.23",
80
- "lru-cache": "11.2.6",
81
- "ora": "5.4.1",
82
- "package-changed": "3.0.0",
83
- "resolve-from": "5.0.0",
84
- "semver": "7.7.4",
85
- "teen_process": "4.0.10",
86
- "type-fest": "5.4.4",
87
- "winston": "3.19.0",
88
- "ws": "8.19.0",
89
- "yaml": "2.8.2"
90
- },
91
- "engines": {
92
- "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
93
- "npm": ">=10"
94
- },
95
- "publishConfig": {
96
- "access": "public"
97
- },
98
- "gitHead": "980a121804ae006db879fb6860f627ac36174c15"
99
- }