appium-xcuitest-driver 7.21.2 → 7.22.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 (55) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/lib/commands/context.js +2 -2
  3. package/build/lib/commands/context.js.map +1 -1
  4. package/build/lib/commands/log.d.ts.map +1 -1
  5. package/build/lib/commands/log.js +27 -14
  6. package/build/lib/commands/log.js.map +1 -1
  7. package/build/lib/device-log/helpers.d.ts +4 -1
  8. package/build/lib/device-log/helpers.d.ts.map +1 -1
  9. package/build/lib/device-log/helpers.js +6 -2
  10. package/build/lib/device-log/helpers.js.map +1 -1
  11. package/build/lib/device-log/ios-crash-log.d.ts +0 -4
  12. package/build/lib/device-log/ios-crash-log.d.ts.map +1 -1
  13. package/build/lib/device-log/ios-crash-log.js +0 -8
  14. package/build/lib/device-log/ios-crash-log.js.map +1 -1
  15. package/build/lib/device-log/ios-device-log.d.ts +3 -3
  16. package/build/lib/device-log/ios-device-log.d.ts.map +1 -1
  17. package/build/lib/device-log/ios-log.d.ts +1 -3
  18. package/build/lib/device-log/ios-log.d.ts.map +1 -1
  19. package/build/lib/device-log/ios-log.js +12 -27
  20. package/build/lib/device-log/ios-log.js.map +1 -1
  21. package/build/lib/device-log/ios-performance-log.d.ts +4 -8
  22. package/build/lib/device-log/ios-performance-log.d.ts.map +1 -1
  23. package/build/lib/device-log/ios-performance-log.js +9 -16
  24. package/build/lib/device-log/ios-performance-log.js.map +1 -1
  25. package/build/lib/device-log/ios-simulator-log.d.ts +4 -4
  26. package/build/lib/device-log/ios-simulator-log.d.ts.map +1 -1
  27. package/build/lib/device-log/ios-simulator-log.js +4 -6
  28. package/build/lib/device-log/ios-simulator-log.js.map +1 -1
  29. package/build/lib/device-log/safari-console-log.d.ts +65 -6
  30. package/build/lib/device-log/safari-console-log.d.ts.map +1 -1
  31. package/build/lib/device-log/safari-console-log.js +61 -81
  32. package/build/lib/device-log/safari-console-log.js.map +1 -1
  33. package/build/lib/device-log/safari-network-log.d.ts +36 -8
  34. package/build/lib/device-log/safari-network-log.d.ts.map +1 -1
  35. package/build/lib/device-log/safari-network-log.js +28 -151
  36. package/build/lib/device-log/safari-network-log.js.map +1 -1
  37. package/lib/commands/context.js +2 -2
  38. package/lib/commands/log.js +32 -14
  39. package/lib/device-log/helpers.ts +6 -2
  40. package/lib/device-log/ios-crash-log.js +0 -9
  41. package/lib/device-log/ios-device-log.ts +3 -3
  42. package/lib/device-log/ios-log.ts +16 -33
  43. package/lib/device-log/ios-performance-log.ts +11 -22
  44. package/lib/device-log/ios-simulator-log.ts +9 -11
  45. package/lib/device-log/safari-console-log.ts +112 -0
  46. package/lib/device-log/safari-network-log.ts +80 -0
  47. package/npm-shrinkwrap.json +69 -24
  48. package/package.json +2 -2
  49. package/build/lib/device-log/rotating-log.d.ts +0 -21
  50. package/build/lib/device-log/rotating-log.d.ts.map +0 -1
  51. package/build/lib/device-log/rotating-log.js +0 -61
  52. package/build/lib/device-log/rotating-log.js.map +0 -1
  53. package/lib/device-log/rotating-log.js +0 -65
  54. package/lib/device-log/safari-console-log.js +0 -96
  55. package/lib/device-log/safari-network-log.js +0 -193
@@ -1,9 +1,13 @@
1
1
  import type { LogEntry } from '../commands/types';
2
2
 
3
- export function toLogEntry(message: string, timestamp: number): LogEntry {
3
+ export const DEFAULT_LOG_LEVEL = 'ALL';
4
+ export const MAX_JSON_LOG_LENGTH = 200;
5
+ export const MAX_BUFFERED_EVENTS_COUNT = 5000;
6
+
7
+ export function toLogEntry(message: string, timestamp: number, level: string = DEFAULT_LOG_LEVEL): LogEntry {
4
8
  return {
5
9
  timestamp,
6
- level: 'ALL',
10
+ level,
7
11
  message,
8
12
  };
9
13
  }
@@ -105,15 +105,6 @@ class IOSCrashLog {
105
105
  return await this.filesToJSON(diff);
106
106
  }
107
107
 
108
- /**
109
- * @returns {Promise<import('../commands/types').LogEntry[]>}
110
- */
111
- async getAllLogs() {
112
- let crashFiles = await this.getCrashes();
113
- let logFiles = _.difference(crashFiles, this.prevLogs);
114
- return await this.filesToJSON(logFiles);
115
- }
116
-
117
108
  /**
118
109
  * @param {string[]} paths
119
110
  * @returns {Promise<import('../commands/types').LogEntry[]>}
@@ -5,12 +5,12 @@ import type { AppiumLogger } from '@appium/types';
5
5
  export interface IOSDeviceLogOpts {
6
6
  udid: string;
7
7
  showLogs?: boolean;
8
- log?: AppiumLogger;
8
+ log: AppiumLogger;
9
9
  }
10
10
 
11
11
  export class IOSDeviceLog extends LineConsumingLog {
12
- private udid: string;
13
- private showLogs: boolean;
12
+ private readonly udid: string;
13
+ private readonly showLogs: boolean;
14
14
  private service: any | null;
15
15
 
16
16
  constructor(opts: IOSDeviceLogOpts) {
@@ -18,7 +18,6 @@ export abstract class IOSLog<
18
18
  > extends EventEmitter {
19
19
  private maxBufferSize: number;
20
20
  private logs: LRUCache<number, TSerializedEntry>;
21
- private logIndexSinceLastRequest: number | null;
22
21
  private _log: AppiumLogger;
23
22
 
24
23
  constructor(opts: IOSLogOptions = {}) {
@@ -27,7 +26,6 @@ export abstract class IOSLog<
27
26
  this.logs = new LRUCache({
28
27
  max: this.maxBufferSize,
29
28
  });
30
- this.logIndexSinceLastRequest = null;
31
29
  this._log = opts.log ?? logger.getLogger(this.constructor.name);
32
30
  }
33
31
 
@@ -39,40 +37,12 @@ export abstract class IOSLog<
39
37
  return this._log;
40
38
  }
41
39
 
42
- broadcast(entry: TRawEntry): void {
43
- let recentIndex = -1;
44
- for (const key of this.logs.rkeys()) {
45
- recentIndex = key;
46
- break;
47
- }
48
- const serializedEntry = this._serializeEntry(entry);
49
- this.logs.set(++recentIndex, serializedEntry);
50
- if (this.listenerCount('output')) {
51
- this.emit('output', this._deserializeEntry(serializedEntry));
52
- }
53
- }
54
-
55
40
  getLogs(): LogEntry[] {
56
41
  const result: LogEntry[] = [];
57
- let recentLogIndex: number | null = null;
58
- for (const [index, value] of this.logs.entries()) {
59
- if (this.logIndexSinceLastRequest && index > this.logIndexSinceLastRequest
60
- || !this.logIndexSinceLastRequest) {
61
- recentLogIndex = index;
62
- result.push(this._deserializeEntry(value));
63
- }
64
- }
65
- if (recentLogIndex !== null) {
66
- this.logIndexSinceLastRequest = recentLogIndex;
67
- }
68
- return result;
69
- }
70
-
71
- getAllLogs(): LogEntry[] {
72
- const result: LogEntry[] = [];
73
- for (const value of this.logs.values()) {
74
- result.push(this._deserializeEntry(value));
42
+ for (const value of this.logs.rvalues()) {
43
+ result.push(this._deserializeEntry(value as TSerializedEntry));
75
44
  }
45
+ this._clearEntries();
76
46
  return result;
77
47
  }
78
48
 
@@ -82,6 +52,19 @@ export abstract class IOSLog<
82
52
  protected _clearEntries() {
83
53
  this.logs.clear();
84
54
  }
55
+
56
+ protected broadcast(entry: TRawEntry): void {
57
+ let recentIndex = -1;
58
+ for (const key of this.logs.keys()) {
59
+ recentIndex = key;
60
+ break;
61
+ }
62
+ const serializedEntry = this._serializeEntry(entry);
63
+ this.logs.set(++recentIndex, serializedEntry);
64
+ if (this.listenerCount('output')) {
65
+ this.emit('output', this._deserializeEntry(serializedEntry));
66
+ }
67
+ }
85
68
  }
86
69
 
87
70
  export default IOSLog;
@@ -1,24 +1,22 @@
1
1
  import _ from 'lodash';
2
- import { IOSLog } from './ios-log';
3
- import type { LogEntry } from '../commands/types';
4
2
  import type { AppiumLogger } from '@appium/types';
5
-
6
- const MAX_EVENTS = 5000;
3
+ import { MAX_JSON_LOG_LENGTH, MAX_BUFFERED_EVENTS_COUNT } from './helpers';
4
+ import { LineConsumingLog } from './line-consuming-log';
7
5
 
8
6
  type PerformanceLogEntry = object;
9
7
  export interface IOSPerformanceLogOptions {
10
8
  remoteDebugger: any;
11
9
  maxEvents?: number;
12
- log?: AppiumLogger;
10
+ log: AppiumLogger;
13
11
  }
14
12
 
15
- export class IOSPerformanceLog extends IOSLog<PerformanceLogEntry, PerformanceLogEntry> {
16
- private remoteDebugger: any;
13
+ export class IOSPerformanceLog extends LineConsumingLog {
14
+ private readonly remoteDebugger: any;
17
15
  private _started: boolean;
18
16
 
19
17
  constructor(opts: IOSPerformanceLogOptions) {
20
18
  super({
21
- maxBufferSize: opts.maxEvents ?? MAX_EVENTS,
19
+ maxBufferSize: opts.maxEvents ?? MAX_BUFFERED_EVENTS_COUNT,
22
20
  log: opts.log,
23
21
  });
24
22
  this.remoteDebugger = opts.remoteDebugger;
@@ -28,33 +26,24 @@ export class IOSPerformanceLog extends IOSLog<PerformanceLogEntry, PerformanceLo
28
26
  override async startCapture(): Promise<void> {
29
27
  this.log.debug('Starting performance (Timeline) log capture');
30
28
  this._clearEntries();
31
- const result = await this.remoteDebugger.startTimeline(this.onTimelineEvent.bind(this));
29
+ await this.remoteDebugger.startTimeline(this.onTimelineEvent.bind(this));
32
30
  this._started = true;
33
- return result;
34
31
  }
35
32
 
36
33
  override async stopCapture(): Promise<void> {
37
34
  this.log.debug('Stopping performance (Timeline) log capture');
38
- const result = await this.remoteDebugger.stopTimeline();
35
+ await this.remoteDebugger.stopTimeline();
39
36
  this._started = false;
40
- return result;
41
37
  }
42
38
 
43
39
  override get isCapturing(): boolean {
44
40
  return this._started;
45
41
  }
46
42
 
47
- protected override _serializeEntry(value: PerformanceLogEntry): PerformanceLogEntry {
48
- return value;
49
- }
50
-
51
- protected override _deserializeEntry(value: PerformanceLogEntry): LogEntry {
52
- return value as LogEntry;
53
- }
54
-
55
43
  private onTimelineEvent(event: PerformanceLogEntry): void {
56
- this.log.debug(`Received Timeline event: ${_.truncate(JSON.stringify(event))}`);
57
- this.broadcast(event);
44
+ const serializedEntry = JSON.stringify(event);
45
+ this.broadcast(serializedEntry);
46
+ this.log.debug(`Received Timeline event: ${_.truncate(serializedEntry, {length: MAX_JSON_LOG_LENGTH})}`);
58
47
  }
59
48
  }
60
49
 
@@ -12,13 +12,13 @@ export interface IOSSimulatorLogOptions {
12
12
  sim: Simulator;
13
13
  showLogs?: boolean;
14
14
  iosSimulatorLogsPredicate?: string;
15
- log?: AppiumLogger;
15
+ log: AppiumLogger;
16
16
  }
17
17
 
18
18
  export class IOSSimulatorLog extends LineConsumingLog {
19
- private sim: Simulator;
20
- private showLogs: boolean;
21
- private predicate?: string;
19
+ private readonly sim: Simulator;
20
+ private readonly showLogs: boolean;
21
+ private readonly predicate?: string;
22
22
  private proc: SubProcess | null;
23
23
 
24
24
  constructor(opts: IOSSimulatorLogOptions) {
@@ -93,24 +93,22 @@ export class IOSSimulatorLog extends LineConsumingLog {
93
93
  }
94
94
  }
95
95
 
96
- private async finishStartingLogCapture() {
96
+ private async finishStartingLogCapture(): Promise<void> {
97
97
  if (!this.proc) {
98
98
  throw this.log.errorWithException('Could not capture simulator log');
99
99
  }
100
100
 
101
101
  for (const streamName of ['stdout', 'stderr']) {
102
- this.proc.on(`lines-${streamName}`, (/** @type {string[]} */ lines) => {
103
- for (const line of lines) {
104
- this.onOutput(line, ...(streamName === 'stderr' ? ['STDERR'] : []));
105
- }
102
+ this.proc.on(`line-${streamName}`, (line: string) => {
103
+ this.onOutput(line, ...(streamName === 'stderr' ? ['STDERR'] : []));
106
104
  });
107
105
  }
108
106
 
109
- const startDetector = (/** @type {string} */ stdout, /** @type {string} */ stderr) => {
107
+ const startDetector = (stdout: string, stderr: string) => {
110
108
  if (EXECVP_ERROR_PATTERN.test(stderr)) {
111
109
  throw new Error('iOS log capture process failed to start');
112
110
  }
113
- return stdout || stderr;
111
+ return Boolean(stdout || stderr);
114
112
  };
115
113
  await this.proc.start(startDetector, START_TIMEOUT);
116
114
  }
@@ -0,0 +1,112 @@
1
+ import _ from 'lodash';
2
+ import type { AppiumLogger } from '@appium/types';
3
+ import {
4
+ toLogEntry,
5
+ DEFAULT_LOG_LEVEL,
6
+ MAX_JSON_LOG_LENGTH,
7
+ MAX_BUFFERED_EVENTS_COUNT
8
+ } from './helpers';
9
+ import IOSLog from './ios-log';
10
+ import type { LogEntry } from '../commands/types';
11
+
12
+ const LOG_LEVELS_MAP = {
13
+ error: 'SEVERE',
14
+ warning: 'WARNING',
15
+ log: 'FINE',
16
+ };
17
+
18
+ export interface SafariConsoleLogOptions {
19
+ showLogs: boolean;
20
+ log: AppiumLogger;
21
+ }
22
+
23
+ export interface SafariConsoleStacktraceEntry {
24
+ functionName: string;
25
+ url: string;
26
+ scriptId: number;
27
+ lineNumber: number;
28
+ columnNumber: number;
29
+ }
30
+
31
+ export interface SafariConsoleEntry {
32
+ source: string;
33
+ level: string;
34
+ text: string;
35
+ type: string;
36
+ line: number;
37
+ column: number;
38
+ url?: string;
39
+ repeatCount: number;
40
+ stackTrace: SafariConsoleStacktraceEntry[];
41
+ }
42
+
43
+ type TSerializedEntry = [SafariConsoleEntry, number];
44
+
45
+ export class SafariConsoleLog extends IOSLog<SafariConsoleEntry, TSerializedEntry> {
46
+ private readonly _showLogs: boolean;
47
+
48
+ constructor(opts: SafariConsoleLogOptions) {
49
+ super({
50
+ log: opts.log,
51
+ maxBufferSize: MAX_BUFFERED_EVENTS_COUNT,
52
+ });
53
+ this._showLogs = opts.showLogs;
54
+ }
55
+
56
+ override async startCapture(): Promise<void> {}
57
+ override async stopCapture(): Promise<void> {}
58
+ override get isCapturing(): boolean {
59
+ return true;
60
+ }
61
+
62
+ /**
63
+ *
64
+ * @param err
65
+ * @param entry The output will be like:
66
+ * {
67
+ * "source": "javascript",
68
+ * "level":"error",
69
+ * "text":"ReferenceError: Can't find variable: s_account",
70
+ * "type":"log",
71
+ * "line":2,
72
+ * "column":21,
73
+ * "url":"https://assets.adobedtm.com/b46e318d845250834eda10c5a20827c045a4d76f/scripts/satellite-57866f8b64746d53a8000104-staging.js",
74
+ * "repeatCount":1,
75
+ * "stackTrace":[{
76
+ * "functionName":"global code",
77
+ * "url":"https://assets.adobedtm.com/b46e318d845250834eda10c5a20827c045a4d76f/scripts/satellite-57866f8b64746d53a8000104-staging.js",
78
+ * "scriptId":"6",
79
+ * "lineNumber":2,
80
+ * "columnNumber":21
81
+ * }]
82
+ * }
83
+ *
84
+ * we need, at least, `level` (in accordance with Java levels
85
+ * (https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html)),
86
+ * `timestamp`, and `message` to satisfy the java client. In order to
87
+ * provide all the information to the client, `message` is the full
88
+ * object, stringified.
89
+ *
90
+ */
91
+ onConsoleLogEvent(err: object | null, entry: SafariConsoleEntry): void {
92
+ this.broadcast(entry);
93
+ if (this._showLogs) {
94
+ this.log.info(`[SafariConsole] ${_.truncate(JSON.stringify(entry), {length: MAX_JSON_LOG_LENGTH})}`);
95
+ }
96
+ }
97
+
98
+ protected override _serializeEntry(value: SafariConsoleEntry): TSerializedEntry {
99
+ return [value, Date.now()];
100
+ }
101
+
102
+ protected override _deserializeEntry(value: TSerializedEntry): LogEntry {
103
+ const [entry, timestamp] = value;
104
+ return toLogEntry(JSON.stringify(entry), timestamp, mapLogLevel(entry.level));
105
+ }
106
+ }
107
+
108
+ function mapLogLevel(originalLevel: string): string {
109
+ return LOG_LEVELS_MAP[originalLevel] ?? DEFAULT_LOG_LEVEL;
110
+ }
111
+
112
+ export default SafariConsoleLog;
@@ -0,0 +1,80 @@
1
+ import _ from 'lodash';
2
+ import { LineConsumingLog } from './line-consuming-log';
3
+ import { MAX_JSON_LOG_LENGTH, MAX_BUFFERED_EVENTS_COUNT } from './helpers';
4
+ import type { AppiumLogger } from '@appium/types';
5
+
6
+ const EVENTS_TO_LOG = [
7
+ 'Network.loadingFinished',
8
+ 'Network.loadingFailed',
9
+ ];
10
+ const MONITORED_EVENTS = [
11
+ 'Network.requestWillBeSent',
12
+ 'Network.responseReceived',
13
+ ...EVENTS_TO_LOG,
14
+ ];
15
+
16
+ export interface SafariConsoleLogOptions {
17
+ showLogs: boolean;
18
+ log: AppiumLogger;
19
+ }
20
+
21
+ export interface SafariNetworkResponseTiming {
22
+ responseStart: number;
23
+ receiveHeadersEnd: number;
24
+ }
25
+
26
+ export interface SafariNetworkResponse {
27
+ url: string;
28
+ status: number;
29
+ timing: SafariNetworkResponseTiming;
30
+ source: string;
31
+ }
32
+
33
+ export interface SafariNetworkLogEntryMetrics {
34
+ responseBodyBytesReceived: number;
35
+ }
36
+
37
+ export interface SafariNetworkLogEntry {
38
+ requestId: string;
39
+ response?: SafariNetworkResponse;
40
+ type?: string;
41
+ initiator?: string;
42
+ // Safari has a `metrics` object on it's `Network.loadingFinished` event
43
+ metrics?: SafariNetworkLogEntryMetrics;
44
+ errorText?: string;
45
+ // When a network call is cancelled, Safari returns `cancelled` as error text
46
+ // but has a boolean `canceled`.
47
+ canceled?: boolean;
48
+ }
49
+
50
+ export class SafariNetworkLog extends LineConsumingLog {
51
+ private readonly _showLogs: boolean;
52
+
53
+ constructor(opts: SafariConsoleLogOptions) {
54
+ super({
55
+ log: opts.log,
56
+ maxBufferSize: MAX_BUFFERED_EVENTS_COUNT,
57
+ });
58
+ this._showLogs = opts.showLogs;
59
+ }
60
+
61
+ override async startCapture(): Promise<void> {}
62
+ override async stopCapture(): Promise<void> {}
63
+ override get isCapturing(): boolean {
64
+ return true;
65
+ }
66
+
67
+ onNetworkEvent(method: string, entry: SafariNetworkLogEntry): void {
68
+ if (!MONITORED_EVENTS.includes(method)) {
69
+ return;
70
+ }
71
+
72
+ const serializedEntry = JSON.stringify(entry);
73
+ this.broadcast(serializedEntry);
74
+ if (this._showLogs && EVENTS_TO_LOG.includes(method)) {
75
+ this.log.info(`[SafariNetwork] ${_.truncate(serializedEntry, {length: MAX_JSON_LOG_LENGTH})}`);
76
+ }
77
+ }
78
+ }
79
+
80
+ export default SafariNetworkLog;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "appium-xcuitest-driver",
3
- "version": "7.21.2",
3
+ "version": "7.22.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appium-xcuitest-driver",
9
- "version": "7.21.2",
9
+ "version": "7.22.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@colors/colors": "^1.6.0",
@@ -30,7 +30,7 @@
30
30
  "portscanner": "^2.2.0",
31
31
  "semver": "^7.5.4",
32
32
  "source-map-support": "^0.x",
33
- "teen_process": "^2.1.10",
33
+ "teen_process": "^2.2.0",
34
34
  "ws": "^8.13.0"
35
35
  },
36
36
  "devDependencies": {
@@ -113,6 +113,17 @@
113
113
  "spdy": "4.0.2"
114
114
  }
115
115
  },
116
+ "node_modules/@appium/base-driver/node_modules/type-fest": {
117
+ "version": "4.20.1",
118
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.20.1.tgz",
119
+ "integrity": "sha512-R6wDsVsoS9xYOpy8vgeBlqpdOyzJ12HNfQhC/aAKWM3YoCV9TtunJzh/QpkMgeDhkoynDcw5f1y+qF9yc/HHyg==",
120
+ "engines": {
121
+ "node": ">=16"
122
+ },
123
+ "funding": {
124
+ "url": "https://github.com/sponsors/sindresorhus"
125
+ }
126
+ },
116
127
  "node_modules/@appium/docutils": {
117
128
  "version": "1.0.17",
118
129
  "resolved": "https://registry.npmjs.org/@appium/docutils/-/docutils-1.0.17.tgz",
@@ -162,6 +173,29 @@
162
173
  "npm": ">=8"
163
174
  }
164
175
  },
176
+ "node_modules/@appium/docutils/node_modules/type-fest": {
177
+ "version": "4.20.1",
178
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.20.1.tgz",
179
+ "integrity": "sha512-R6wDsVsoS9xYOpy8vgeBlqpdOyzJ12HNfQhC/aAKWM3YoCV9TtunJzh/QpkMgeDhkoynDcw5f1y+qF9yc/HHyg==",
180
+ "engines": {
181
+ "node": ">=16"
182
+ },
183
+ "funding": {
184
+ "url": "https://github.com/sponsors/sindresorhus"
185
+ }
186
+ },
187
+ "node_modules/@appium/docutils/node_modules/typescript": {
188
+ "version": "5.5.2",
189
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
190
+ "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
191
+ "bin": {
192
+ "tsc": "bin/tsc",
193
+ "tsserver": "bin/tsserver"
194
+ },
195
+ "engines": {
196
+ "node": ">=14.17"
197
+ }
198
+ },
165
199
  "node_modules/@appium/logger": {
166
200
  "version": "1.5.0",
167
201
  "resolved": "https://registry.npmjs.org/@appium/logger/-/logger-1.5.0.tgz",
@@ -284,6 +318,17 @@
284
318
  "npm": ">=8"
285
319
  }
286
320
  },
321
+ "node_modules/@appium/support/node_modules/type-fest": {
322
+ "version": "4.20.1",
323
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.20.1.tgz",
324
+ "integrity": "sha512-R6wDsVsoS9xYOpy8vgeBlqpdOyzJ12HNfQhC/aAKWM3YoCV9TtunJzh/QpkMgeDhkoynDcw5f1y+qF9yc/HHyg==",
325
+ "engines": {
326
+ "node": ">=16"
327
+ },
328
+ "funding": {
329
+ "url": "https://github.com/sponsors/sindresorhus"
330
+ }
331
+ },
287
332
  "node_modules/@appium/tsconfig": {
288
333
  "version": "0.3.3",
289
334
  "resolved": "https://registry.npmjs.org/@appium/tsconfig/-/tsconfig-0.3.3.tgz",
@@ -313,6 +358,17 @@
313
358
  "npm": ">=8"
314
359
  }
315
360
  },
361
+ "node_modules/@appium/types/node_modules/type-fest": {
362
+ "version": "4.20.1",
363
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.20.1.tgz",
364
+ "integrity": "sha512-R6wDsVsoS9xYOpy8vgeBlqpdOyzJ12HNfQhC/aAKWM3YoCV9TtunJzh/QpkMgeDhkoynDcw5f1y+qF9yc/HHyg==",
365
+ "engines": {
366
+ "node": ">=16"
367
+ },
368
+ "funding": {
369
+ "url": "https://github.com/sponsors/sindresorhus"
370
+ }
371
+ },
316
372
  "node_modules/@babel/code-frame": {
317
373
  "version": "7.24.7",
318
374
  "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz",
@@ -923,9 +979,9 @@
923
979
  }
924
980
  },
925
981
  "node_modules/appium-webdriveragent": {
926
- "version": "8.7.5",
927
- "resolved": "https://registry.npmjs.org/appium-webdriveragent/-/appium-webdriveragent-8.7.5.tgz",
928
- "integrity": "sha512-SydTNYy7VSOC15ujkWbtx7boGH/IDTm97kI6ZmvHXgR49SA5Y4h39/snqwWAo7TGD825bvSPDYEb5ontzKmcTw==",
982
+ "version": "8.7.6",
983
+ "resolved": "https://registry.npmjs.org/appium-webdriveragent/-/appium-webdriveragent-8.7.6.tgz",
984
+ "integrity": "sha512-TrpMaiDlrtHISpF3J1At/a0Bsd8stR4B0YYXYqe8pfmsG9F9n/c2X+o44vnm6+Kt7imcxo9fhpIbn76/jI3Tpg==",
929
985
  "dependencies": {
930
986
  "@appium/base-driver": "^9.0.0",
931
987
  "@appium/strongbox": "^0.x",
@@ -938,7 +994,7 @@
938
994
  "bluebird": "^3.5.5",
939
995
  "lodash": "^4.17.11",
940
996
  "source-map-support": "^0.x",
941
- "teen_process": "^2.0.0"
997
+ "teen_process": "^2.2.0"
942
998
  },
943
999
  "engines": {
944
1000
  "node": ">=14",
@@ -3742,9 +3798,9 @@
3742
3798
  }
3743
3799
  },
3744
3800
  "node_modules/teen_process": {
3745
- "version": "2.1.10",
3746
- "resolved": "https://registry.npmjs.org/teen_process/-/teen_process-2.1.10.tgz",
3747
- "integrity": "sha512-zEXJ+qOij5Kiov7X5rvWexo3yV9EJiVdjM53XTD0E7v8QxEOHoGBeIy4J/iKDD2sCO60sIaSIRS4Y50Tya5/PA==",
3801
+ "version": "2.2.0",
3802
+ "resolved": "https://registry.npmjs.org/teen_process/-/teen_process-2.2.0.tgz",
3803
+ "integrity": "sha512-YYHdMnRGAMXrP+KmUH3/WBelsR+OZUfdqCZEXHfhN/2Bn2eTVP11NyB4FeMOjlmtZB/Y5CiZnRKQqu2lJzzlVw==",
3748
3804
  "dependencies": {
3749
3805
  "bluebird": "^3.7.2",
3750
3806
  "lodash": "^4.17.21",
@@ -3790,17 +3846,6 @@
3790
3846
  "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
3791
3847
  "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ=="
3792
3848
  },
3793
- "node_modules/type-fest": {
3794
- "version": "4.20.1",
3795
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.20.1.tgz",
3796
- "integrity": "sha512-R6wDsVsoS9xYOpy8vgeBlqpdOyzJ12HNfQhC/aAKWM3YoCV9TtunJzh/QpkMgeDhkoynDcw5f1y+qF9yc/HHyg==",
3797
- "engines": {
3798
- "node": ">=16"
3799
- },
3800
- "funding": {
3801
- "url": "https://github.com/sponsors/sindresorhus"
3802
- }
3803
- },
3804
3849
  "node_modules/type-is": {
3805
3850
  "version": "1.6.18",
3806
3851
  "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
@@ -3814,9 +3859,9 @@
3814
3859
  }
3815
3860
  },
3816
3861
  "node_modules/typescript": {
3817
- "version": "5.5.2",
3818
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
3819
- "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
3862
+ "version": "5.5.3",
3863
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz",
3864
+ "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==",
3820
3865
  "bin": {
3821
3866
  "tsc": "bin/tsc",
3822
3867
  "tsserver": "bin/tsserver"
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "xcuitest",
9
9
  "xctest"
10
10
  ],
11
- "version": "7.21.2",
11
+ "version": "7.22.0",
12
12
  "author": "Appium Contributors",
13
13
  "license": "Apache-2.0",
14
14
  "repository": {
@@ -97,7 +97,7 @@
97
97
  "portscanner": "^2.2.0",
98
98
  "semver": "^7.5.4",
99
99
  "source-map-support": "^0.x",
100
- "teen_process": "^2.1.10",
100
+ "teen_process": "^2.2.0",
101
101
  "ws": "^8.13.0"
102
102
  },
103
103
  "scripts": {
@@ -1,21 +0,0 @@
1
- export default RotatingLog;
2
- export class RotatingLog {
3
- constructor(showLogs?: boolean, label?: string);
4
- log: import("@appium/types").AppiumLogger;
5
- showLogs: boolean;
6
- set logs(logs: any);
7
- get logs(): any;
8
- logIdxSinceLastRequest: number;
9
- isCapturing: boolean;
10
- startCapture(): Promise<void>;
11
- stopCapture(): Promise<void>;
12
- /**
13
- * @privateRemarks Subclasses must implement this.
14
- */
15
- addLogLine(): void;
16
- getLogs(): Promise<any>;
17
- getAllLogs(): Promise<any>;
18
- _logs: any;
19
- }
20
- export const MAX_LOG_ENTRIES_COUNT: 10000;
21
- //# sourceMappingURL=rotating-log.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rotating-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/rotating-log.js"],"names":[],"mappings":";AAKA;IACE,gDAQC;IAPC,0CAAkC;IAElC,kBAAwB;IAiD1B,oBAEC;IATD,gBAKC;IA7CC,+BAA+B;IAE/B,qBAAwB;IAI1B,8BAEC;IAGD,6BAEC;IAED;;OAEG;IACH,mBAEC;IAGD,wBAUC;IAGD,2BAEC;IAUC,WAAiB;CAEpB;AA1DD,0CAAoC"}