appium-xcuitest-driver 7.21.1 → 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.
- package/CHANGELOG.md +12 -0
- package/build/lib/commands/context.d.ts.map +1 -1
- package/build/lib/commands/context.js +6 -3
- package/build/lib/commands/context.js.map +1 -1
- package/build/lib/commands/log.d.ts.map +1 -1
- package/build/lib/commands/log.js +30 -16
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/device-log/helpers.d.ts +4 -1
- package/build/lib/device-log/helpers.d.ts.map +1 -1
- package/build/lib/device-log/helpers.js +6 -2
- package/build/lib/device-log/helpers.js.map +1 -1
- package/build/lib/device-log/ios-crash-log.d.ts +0 -4
- package/build/lib/device-log/ios-crash-log.d.ts.map +1 -1
- package/build/lib/device-log/ios-crash-log.js +0 -8
- package/build/lib/device-log/ios-crash-log.js.map +1 -1
- package/build/lib/device-log/ios-device-log.d.ts +16 -10
- package/build/lib/device-log/ios-device-log.d.ts.map +1 -1
- package/build/lib/device-log/ios-device-log.js +9 -24
- package/build/lib/device-log/ios-device-log.js.map +1 -1
- package/build/lib/device-log/ios-log.d.ts +21 -44
- package/build/lib/device-log/ios-log.d.ts.map +1 -1
- package/build/lib/device-log/ios-log.js +16 -77
- package/build/lib/device-log/ios-log.js.map +1 -1
- package/build/lib/device-log/ios-performance-log.d.ts +14 -26
- package/build/lib/device-log/ios-performance-log.d.ts.map +1 -1
- package/build/lib/device-log/ios-performance-log.js +16 -42
- package/build/lib/device-log/ios-performance-log.js.map +1 -1
- package/build/lib/device-log/ios-simulator-log.d.ts +21 -24
- package/build/lib/device-log/ios-simulator-log.d.ts.map +1 -1
- package/build/lib/device-log/ios-simulator-log.js +18 -36
- package/build/lib/device-log/ios-simulator-log.js.map +1 -1
- package/build/lib/device-log/line-consuming-log.d.ts +9 -0
- package/build/lib/device-log/line-consuming-log.d.ts.map +1 -0
- package/build/lib/device-log/line-consuming-log.js +16 -0
- package/build/lib/device-log/line-consuming-log.js.map +1 -0
- package/build/lib/device-log/safari-console-log.d.ts +65 -6
- package/build/lib/device-log/safari-console-log.d.ts.map +1 -1
- package/build/lib/device-log/safari-console-log.js +61 -81
- package/build/lib/device-log/safari-console-log.js.map +1 -1
- package/build/lib/device-log/safari-network-log.d.ts +36 -8
- package/build/lib/device-log/safari-network-log.d.ts.map +1 -1
- package/build/lib/device-log/safari-network-log.js +28 -151
- package/build/lib/device-log/safari-network-log.js.map +1 -1
- package/lib/commands/context.js +6 -3
- package/lib/commands/log.js +35 -16
- package/lib/device-log/helpers.ts +6 -2
- package/lib/device-log/ios-crash-log.js +0 -9
- package/lib/device-log/ios-device-log.ts +52 -0
- package/lib/device-log/ios-log.ts +70 -0
- package/lib/device-log/ios-performance-log.ts +50 -0
- package/lib/device-log/{ios-simulator-log.js → ios-simulator-log.ts} +40 -43
- package/lib/device-log/line-consuming-log.ts +16 -0
- package/lib/device-log/safari-console-log.ts +112 -0
- package/lib/device-log/safari-network-log.ts +80 -0
- package/npm-shrinkwrap.json +69 -24
- package/package.json +2 -2
- package/build/lib/device-log/rotating-log.d.ts +0 -21
- package/build/lib/device-log/rotating-log.d.ts.map +0 -1
- package/build/lib/device-log/rotating-log.js +0 -61
- package/build/lib/device-log/rotating-log.js.map +0 -1
- package/lib/device-log/ios-device-log.js +0 -56
- package/lib/device-log/ios-log.js +0 -116
- package/lib/device-log/ios-performance-log.js +0 -68
- package/lib/device-log/rotating-log.js +0 -65
- package/lib/device-log/safari-console-log.js +0 -96
- package/lib/device-log/safari-network-log.js +0 -193
|
@@ -3,43 +3,35 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.IOSLog = void 0;
|
|
4
4
|
const events_1 = require("events");
|
|
5
5
|
const lru_cache_1 = require("lru-cache");
|
|
6
|
-
const
|
|
6
|
+
const support_1 = require("appium/support");
|
|
7
7
|
// We keep only the most recent log entries to avoid out of memory error
|
|
8
8
|
const MAX_LOG_ENTRIES_COUNT = 10000;
|
|
9
|
-
// TODO: Rewrite this class to typescript for better generic typing
|
|
10
9
|
class IOSLog extends events_1.EventEmitter {
|
|
11
|
-
constructor(
|
|
10
|
+
constructor(opts = {}) {
|
|
12
11
|
super();
|
|
13
|
-
this.maxBufferSize = maxBufferSize;
|
|
14
|
-
/** @type {LRUCache<number, any>} */
|
|
12
|
+
this.maxBufferSize = opts.maxBufferSize ?? MAX_LOG_ENTRIES_COUNT;
|
|
15
13
|
this.logs = new lru_cache_1.LRUCache({
|
|
16
14
|
max: this.maxBufferSize,
|
|
17
15
|
});
|
|
18
|
-
|
|
19
|
-
this.logIndexSinceLastRequest = null;
|
|
16
|
+
this._log = opts.log ?? support_1.logger.getLogger(this.constructor.name);
|
|
20
17
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
async startCapture() {
|
|
24
|
-
throw new Error(`Sub-classes need to implement a 'startCapture' function`);
|
|
18
|
+
get log() {
|
|
19
|
+
return this._log;
|
|
25
20
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
getLogs() {
|
|
22
|
+
const result = [];
|
|
23
|
+
for (const value of this.logs.rvalues()) {
|
|
24
|
+
result.push(this._deserializeEntry(value));
|
|
25
|
+
}
|
|
26
|
+
this._clearEntries();
|
|
27
|
+
return result;
|
|
30
28
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
throw new Error(`Sub-classes need to implement a 'isCapturing' function`);
|
|
29
|
+
_clearEntries() {
|
|
30
|
+
this.logs.clear();
|
|
34
31
|
}
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @param {any} entry
|
|
38
|
-
* @returns {void}
|
|
39
|
-
*/
|
|
40
32
|
broadcast(entry) {
|
|
41
33
|
let recentIndex = -1;
|
|
42
|
-
for (const key of this.logs.
|
|
34
|
+
for (const key of this.logs.keys()) {
|
|
43
35
|
recentIndex = key;
|
|
44
36
|
break;
|
|
45
37
|
}
|
|
@@ -49,59 +41,6 @@ class IOSLog extends events_1.EventEmitter {
|
|
|
49
41
|
this.emit('output', this._deserializeEntry(serializedEntry));
|
|
50
42
|
}
|
|
51
43
|
}
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @returns {import('../commands/types').LogEntry[]}
|
|
55
|
-
*/
|
|
56
|
-
getLogs() {
|
|
57
|
-
/** @type {import('../commands/types').LogEntry[]} */
|
|
58
|
-
const result = [];
|
|
59
|
-
/** @type {number?} */
|
|
60
|
-
let recentLogIndex = null;
|
|
61
|
-
for (const [index, value] of this.logs.entries()) {
|
|
62
|
-
if (this.logIndexSinceLastRequest && index > this.logIndexSinceLastRequest
|
|
63
|
-
|| !this.logIndexSinceLastRequest) {
|
|
64
|
-
recentLogIndex = index;
|
|
65
|
-
result.push(this._deserializeEntry(value));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (recentLogIndex !== null) {
|
|
69
|
-
this.logIndexSinceLastRequest = recentLogIndex;
|
|
70
|
-
}
|
|
71
|
-
return result;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
* @returns {import('../commands/types').LogEntry[]}
|
|
76
|
-
*/
|
|
77
|
-
getAllLogs() {
|
|
78
|
-
/** @type {import('../commands/types').LogEntry[]} */
|
|
79
|
-
const result = [];
|
|
80
|
-
for (const value of this.logs.values()) {
|
|
81
|
-
result.push(this._deserializeEntry(value));
|
|
82
|
-
}
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
87
|
-
* @param {any} value
|
|
88
|
-
* @returns {any}
|
|
89
|
-
*/
|
|
90
|
-
_serializeEntry(value) {
|
|
91
|
-
return [value, Date.now()];
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
*
|
|
95
|
-
* @param {any} value
|
|
96
|
-
* @returns {any}
|
|
97
|
-
*/
|
|
98
|
-
_deserializeEntry(value) {
|
|
99
|
-
const [message, timestamp] = value;
|
|
100
|
-
return (0, helpers_1.toLogEntry)(message, timestamp);
|
|
101
|
-
}
|
|
102
|
-
_clearEntries() {
|
|
103
|
-
this.logs.clear();
|
|
104
|
-
}
|
|
105
44
|
}
|
|
106
45
|
exports.IOSLog = IOSLog;
|
|
107
46
|
exports.default = IOSLog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios-log.js","sourceRoot":"","sources":["../../../lib/device-log/ios-log.
|
|
1
|
+
{"version":3,"file":"ios-log.js","sourceRoot":"","sources":["../../../lib/device-log/ios-log.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AACpC,yCAAqC;AAGrC,4CAAsC;AAEtC,wEAAwE;AACxE,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAOpC,MAAsB,MAGpB,SAAQ,qBAAY;IAKpB,YAAY,OAAsB,EAAE;QAClC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,IAAI,qBAAqB,CAAC;QACjE,IAAI,CAAC,IAAI,GAAG,IAAI,oBAAQ,CAAC;YACvB,GAAG,EAAE,IAAI,CAAC,aAAa;SACxB,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,gBAAM,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClE,CAAC;IAMD,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,OAAO;QACL,MAAM,MAAM,GAAe,EAAE,CAAC;QAC9B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;YACxC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAyB,CAAC,CAAC,CAAC;QACjE,CAAC;QACD,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IAKS,aAAa;QACrB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;IAES,SAAS,CAAC,KAAgB;QAClC,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC;QACrB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;YACnC,WAAW,GAAG,GAAG,CAAC;YAClB,MAAM;QACR,CAAC;QACD,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;QAC9C,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;CACF;AArDD,wBAqDC;AAED,kBAAe,MAAM,CAAC"}
|
|
@@ -1,30 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { AppiumLogger } from '@appium/types';
|
|
2
|
+
import { LineConsumingLog } from './line-consuming-log';
|
|
3
|
+
export interface IOSPerformanceLogOptions {
|
|
3
4
|
remoteDebugger: any;
|
|
4
|
-
maxEvents
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* @override
|
|
16
|
-
*/
|
|
17
|
-
override _serializeEntry(value: any): any;
|
|
18
|
-
/**
|
|
19
|
-
* @override
|
|
20
|
-
*/
|
|
21
|
-
override _deserializeEntry(value: any): any;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param {import('../commands/types').LogEntry} event
|
|
25
|
-
*/
|
|
26
|
-
onTimelineEvent(event: import("../commands/types").LogEntry): void;
|
|
5
|
+
maxEvents?: number;
|
|
6
|
+
log: AppiumLogger;
|
|
7
|
+
}
|
|
8
|
+
export declare class IOSPerformanceLog extends LineConsumingLog {
|
|
9
|
+
private readonly remoteDebugger;
|
|
10
|
+
private _started;
|
|
11
|
+
constructor(opts: IOSPerformanceLogOptions);
|
|
12
|
+
startCapture(): Promise<void>;
|
|
13
|
+
stopCapture(): Promise<void>;
|
|
14
|
+
get isCapturing(): boolean;
|
|
15
|
+
private onTimelineEvent;
|
|
27
16
|
}
|
|
28
17
|
export default IOSPerformanceLog;
|
|
29
|
-
import { IOSLog } from './ios-log';
|
|
30
18
|
//# sourceMappingURL=ios-performance-log.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios-performance-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/ios-performance-log.
|
|
1
|
+
{"version":3,"file":"ios-performance-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/ios-performance-log.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,GAAG,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,YAAY,CAAC;CACnB;AAED,qBAAa,iBAAkB,SAAQ,gBAAgB;IACrD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAM;IACrC,OAAO,CAAC,QAAQ,CAAU;gBAEd,IAAI,EAAE,wBAAwB;IAS3B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAO7B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAM3C,IAAa,WAAW,IAAI,OAAO,CAElC;IAED,OAAO,CAAC,eAAe;CAKxB;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -4,62 +4,36 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.IOSPerformanceLog = void 0;
|
|
7
|
-
const support_1 = require("appium/support");
|
|
8
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const helpers_1 = require("./helpers");
|
|
9
|
+
const line_consuming_log_1 = require("./line-consuming-log");
|
|
10
|
+
class IOSPerformanceLog extends line_consuming_log_1.LineConsumingLog {
|
|
11
|
+
constructor(opts) {
|
|
12
|
+
super({
|
|
13
|
+
maxBufferSize: opts.maxEvents ?? helpers_1.MAX_BUFFERED_EVENTS_COUNT,
|
|
14
|
+
log: opts.log,
|
|
15
|
+
});
|
|
16
|
+
this.remoteDebugger = opts.remoteDebugger;
|
|
17
17
|
this._started = false;
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
20
|
-
* @override
|
|
21
|
-
*/
|
|
22
19
|
async startCapture() {
|
|
23
|
-
log.debug('Starting performance (Timeline) log capture');
|
|
20
|
+
this.log.debug('Starting performance (Timeline) log capture');
|
|
24
21
|
this._clearEntries();
|
|
25
|
-
|
|
22
|
+
await this.remoteDebugger.startTimeline(this.onTimelineEvent.bind(this));
|
|
26
23
|
this._started = true;
|
|
27
|
-
return result;
|
|
28
24
|
}
|
|
29
|
-
/**
|
|
30
|
-
* @override
|
|
31
|
-
*/
|
|
32
25
|
async stopCapture() {
|
|
33
|
-
log.debug('Stopping performance (Timeline) log capture');
|
|
34
|
-
|
|
26
|
+
this.log.debug('Stopping performance (Timeline) log capture');
|
|
27
|
+
await this.remoteDebugger.stopTimeline();
|
|
35
28
|
this._started = false;
|
|
36
|
-
return result;
|
|
37
29
|
}
|
|
38
|
-
/**
|
|
39
|
-
* @override
|
|
40
|
-
*/
|
|
41
30
|
get isCapturing() {
|
|
42
31
|
return this._started;
|
|
43
32
|
}
|
|
44
|
-
/**
|
|
45
|
-
* @override
|
|
46
|
-
*/
|
|
47
|
-
_serializeEntry(value) {
|
|
48
|
-
return value;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @override
|
|
52
|
-
*/
|
|
53
|
-
_deserializeEntry(value) {
|
|
54
|
-
return value;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
*
|
|
58
|
-
* @param {import('../commands/types').LogEntry} event
|
|
59
|
-
*/
|
|
60
33
|
onTimelineEvent(event) {
|
|
61
|
-
|
|
62
|
-
this.broadcast(
|
|
34
|
+
const serializedEntry = JSON.stringify(event);
|
|
35
|
+
this.broadcast(serializedEntry);
|
|
36
|
+
this.log.debug(`Received Timeline event: ${lodash_1.default.truncate(serializedEntry, { length: helpers_1.MAX_JSON_LOG_LENGTH })}`);
|
|
63
37
|
}
|
|
64
38
|
}
|
|
65
39
|
exports.IOSPerformanceLog = IOSPerformanceLog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios-performance-log.js","sourceRoot":"","sources":["../../../lib/device-log/ios-performance-log.
|
|
1
|
+
{"version":3,"file":"ios-performance-log.js","sourceRoot":"","sources":["../../../lib/device-log/ios-performance-log.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AAEvB,uCAA2E;AAC3E,6DAAwD;AASxD,MAAa,iBAAkB,SAAQ,qCAAgB;IAIrD,YAAY,IAA8B;QACxC,KAAK,CAAC;YACJ,aAAa,EAAE,IAAI,CAAC,SAAS,IAAI,mCAAyB;YAC1D,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC,CAAC;QACH,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAEQ,KAAK,CAAC,YAAY;QACzB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;QAC9D,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAEQ,KAAK,CAAC,WAAW;QACxB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;QAC9D,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAa,WAAW;QACtB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAEO,eAAe,CAAC,KAA0B;QAChD,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAChC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,4BAA4B,gBAAC,CAAC,QAAQ,CAAC,eAAe,EAAE,EAAC,MAAM,EAAE,6BAAmB,EAAC,CAAC,EAAE,CAAC,CAAC;IAC3G,CAAC;CACF;AAnCD,8CAmCC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
killLogSubProcess(): Promise<void>;
|
|
23
|
-
finishStartingLogCapture(): Promise<void>;
|
|
1
|
+
import { LineConsumingLog } from './line-consuming-log';
|
|
2
|
+
import type { Simulator } from 'appium-ios-simulator';
|
|
3
|
+
import type { AppiumLogger } from '@appium/types';
|
|
4
|
+
export interface IOSSimulatorLogOptions {
|
|
5
|
+
sim: Simulator;
|
|
6
|
+
showLogs?: boolean;
|
|
7
|
+
iosSimulatorLogsPredicate?: string;
|
|
8
|
+
log: AppiumLogger;
|
|
9
|
+
}
|
|
10
|
+
export declare class IOSSimulatorLog extends LineConsumingLog {
|
|
11
|
+
private readonly sim;
|
|
12
|
+
private readonly showLogs;
|
|
13
|
+
private readonly predicate?;
|
|
14
|
+
private proc;
|
|
15
|
+
constructor(opts: IOSSimulatorLogOptions);
|
|
16
|
+
startCapture(): Promise<void>;
|
|
17
|
+
stopCapture(): Promise<void>;
|
|
18
|
+
get isCapturing(): boolean;
|
|
19
|
+
private onOutput;
|
|
20
|
+
private killLogSubProcess;
|
|
21
|
+
private finishStartingLogCapture;
|
|
24
22
|
}
|
|
25
23
|
export default IOSSimulatorLog;
|
|
26
|
-
import { IOSLog } from './ios-log';
|
|
27
24
|
//# sourceMappingURL=ios-simulator-log.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios-simulator-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/ios-simulator-log.
|
|
1
|
+
{"version":3,"file":"ios-simulator-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/ios-simulator-log.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAMlD,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,SAAS,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,GAAG,EAAE,YAAY,CAAC;CACnB;AAED,qBAAa,eAAgB,SAAQ,gBAAgB;IACnD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAY;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAS;IACpC,OAAO,CAAC,IAAI,CAAoB;gBAEpB,IAAI,EAAE,sBAAsB;IAQzB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IA2B7B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ3C,IAAa,WAAW,IAAI,OAAO,CAElC;IAED,OAAO,CAAC,QAAQ;YAQF,iBAAiB;YAiBjB,wBAAwB;CAmBvC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -5,24 +5,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.IOSSimulatorLog = void 0;
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
-
const ios_log_1 = require("./ios-log");
|
|
9
|
-
const support_1 = require("appium/support");
|
|
10
8
|
const teen_process_1 = require("teen_process");
|
|
11
|
-
const
|
|
9
|
+
const line_consuming_log_1 = require("./line-consuming-log");
|
|
12
10
|
const EXECVP_ERROR_PATTERN = /execvp\(\)/;
|
|
13
11
|
const START_TIMEOUT = 10000;
|
|
14
|
-
class IOSSimulatorLog extends
|
|
15
|
-
constructor(
|
|
16
|
-
super();
|
|
17
|
-
this.sim = sim;
|
|
18
|
-
this.showLogs = !!showLogs;
|
|
19
|
-
this.
|
|
20
|
-
this.predicate = iosSimulatorLogsPredicate;
|
|
12
|
+
class IOSSimulatorLog extends line_consuming_log_1.LineConsumingLog {
|
|
13
|
+
constructor(opts) {
|
|
14
|
+
super({ log: opts.log });
|
|
15
|
+
this.sim = opts.sim;
|
|
16
|
+
this.showLogs = !!opts.showLogs;
|
|
17
|
+
this.predicate = opts.iosSimulatorLogsPredicate;
|
|
21
18
|
this.proc = null;
|
|
22
19
|
}
|
|
23
|
-
/**
|
|
24
|
-
* @override
|
|
25
|
-
*/
|
|
26
20
|
async startCapture() {
|
|
27
21
|
if (lodash_1.default.isUndefined(this.sim.udid)) {
|
|
28
22
|
throw new Error(`Log capture requires a sim udid`);
|
|
@@ -34,7 +28,7 @@ class IOSSimulatorLog extends ios_log_1.IOSLog {
|
|
|
34
28
|
if (this.predicate) {
|
|
35
29
|
spawnArgs.push('--predicate', this.predicate);
|
|
36
30
|
}
|
|
37
|
-
log.debug(`Starting log capture for iOS Simulator with udid '${this.sim.udid}' ` + `using simctl`);
|
|
31
|
+
this.log.debug(`Starting log capture for iOS Simulator with udid '${this.sim.udid}' ` + `using simctl`);
|
|
38
32
|
try {
|
|
39
33
|
// cleanup existing listeners if the previous session has not been terminated properly
|
|
40
34
|
await (0, teen_process_1.exec)('pkill', ['-f', [this.sim.udid, ...spawnArgs].join(' ')]);
|
|
@@ -48,9 +42,6 @@ class IOSSimulatorLog extends ios_log_1.IOSLog {
|
|
|
48
42
|
throw new Error(`Simulator log capture failed. Original error: ${e.message}`);
|
|
49
43
|
}
|
|
50
44
|
}
|
|
51
|
-
/**
|
|
52
|
-
* @override
|
|
53
|
-
*/
|
|
54
45
|
async stopCapture() {
|
|
55
46
|
if (!this.proc) {
|
|
56
47
|
return;
|
|
@@ -58,28 +49,21 @@ class IOSSimulatorLog extends ios_log_1.IOSLog {
|
|
|
58
49
|
await this.killLogSubProcess();
|
|
59
50
|
this.proc = null;
|
|
60
51
|
}
|
|
61
|
-
/**
|
|
62
|
-
* @override
|
|
63
|
-
*/
|
|
64
52
|
get isCapturing() {
|
|
65
|
-
return this.proc && this.proc.isRunning;
|
|
53
|
+
return Boolean(this.proc && this.proc.isRunning);
|
|
66
54
|
}
|
|
67
|
-
/**
|
|
68
|
-
* @param {string} logRow
|
|
69
|
-
* @param {string} [prefix='']
|
|
70
|
-
*/
|
|
71
55
|
onOutput(logRow, prefix = '') {
|
|
72
56
|
this.broadcast(logRow);
|
|
73
57
|
if (this.showLogs) {
|
|
74
58
|
const space = prefix.length > 0 ? ' ' : '';
|
|
75
|
-
log.info(`[IOS_SYSLOG_ROW${space}${prefix}] ${logRow}`);
|
|
59
|
+
this.log.info(`[IOS_SYSLOG_ROW${space}${prefix}] ${logRow}`);
|
|
76
60
|
}
|
|
77
61
|
}
|
|
78
62
|
async killLogSubProcess() {
|
|
79
|
-
if (!this.proc
|
|
63
|
+
if (!this.proc?.isRunning) {
|
|
80
64
|
return;
|
|
81
65
|
}
|
|
82
|
-
log.debug('Stopping iOS log capture');
|
|
66
|
+
this.log.debug('Stopping iOS log capture');
|
|
83
67
|
try {
|
|
84
68
|
await this.proc.stop('SIGTERM', 1000);
|
|
85
69
|
}
|
|
@@ -87,26 +71,24 @@ class IOSSimulatorLog extends ios_log_1.IOSLog {
|
|
|
87
71
|
if (!this.proc.isRunning) {
|
|
88
72
|
return;
|
|
89
73
|
}
|
|
90
|
-
log.warn('Cannot stop log capture process. Sending SIGKILL');
|
|
74
|
+
this.log.warn('Cannot stop log capture process. Sending SIGKILL');
|
|
91
75
|
await this.proc.stop('SIGKILL');
|
|
92
76
|
}
|
|
93
77
|
}
|
|
94
78
|
async finishStartingLogCapture() {
|
|
95
79
|
if (!this.proc) {
|
|
96
|
-
log.
|
|
80
|
+
throw this.log.errorWithException('Could not capture simulator log');
|
|
97
81
|
}
|
|
98
82
|
for (const streamName of ['stdout', 'stderr']) {
|
|
99
|
-
this.proc.on(`
|
|
100
|
-
|
|
101
|
-
this.onOutput(line, ...(streamName === 'stderr' ? ['STDERR'] : []));
|
|
102
|
-
}
|
|
83
|
+
this.proc.on(`line-${streamName}`, (line) => {
|
|
84
|
+
this.onOutput(line, ...(streamName === 'stderr' ? ['STDERR'] : []));
|
|
103
85
|
});
|
|
104
86
|
}
|
|
105
|
-
const startDetector = (
|
|
87
|
+
const startDetector = (stdout, stderr) => {
|
|
106
88
|
if (EXECVP_ERROR_PATTERN.test(stderr)) {
|
|
107
89
|
throw new Error('iOS log capture process failed to start');
|
|
108
90
|
}
|
|
109
|
-
return stdout || stderr;
|
|
91
|
+
return Boolean(stdout || stderr);
|
|
110
92
|
};
|
|
111
93
|
await this.proc.start(startDetector, START_TIMEOUT);
|
|
112
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios-simulator-log.js","sourceRoot":"","sources":["../../../lib/device-log/ios-simulator-log.
|
|
1
|
+
{"version":3,"file":"ios-simulator-log.js","sourceRoot":"","sources":["../../../lib/device-log/ios-simulator-log.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,+CAA8C;AAC9C,6DAAwD;AAIxD,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAE1C,MAAM,aAAa,GAAG,KAAK,CAAC;AAS5B,MAAa,eAAgB,SAAQ,qCAAgB;IAMnD,YAAY,IAA4B;QACtC,KAAK,CAAC,EAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAC,CAAC,CAAC;QACvB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,yBAAyB,CAAC;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEQ,KAAK,CAAC,YAAY;QACzB,IAAI,gBAAC,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,4BAA4B,IAAI,CAAC,GAAG,CAAC,IAAI,kBAAkB,CAAC,CAAC;QAC/E,CAAC;QACD,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;QAC1D,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;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C,CAAC,CAAC;QACL,CAAC;QAED,MAAM,aAAa,GAAG,CAAC,MAAc,EAAE,MAAc,EAAE,EAAE;YACvD,IAAI,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;gBACtC,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;YAC7D,CAAC;YACD,OAAO,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC;QACnC,CAAC,CAAC;QACF,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IACtD,CAAC;CACF;AAjGD,0CAiGC;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IOSLog } from './ios-log';
|
|
2
|
+
import type { LogEntry } from '../commands/types';
|
|
3
|
+
type TSerializedEntry = [string, number];
|
|
4
|
+
export declare abstract class LineConsumingLog extends IOSLog<string, TSerializedEntry> {
|
|
5
|
+
protected _serializeEntry(value: string): TSerializedEntry;
|
|
6
|
+
protected _deserializeEntry(value: TSerializedEntry): LogEntry;
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=line-consuming-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-consuming-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/line-consuming-log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAC;AAEjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,KAAK,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEzC,8BAAsB,gBAAiB,SAAQ,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC;cAC1D,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB;cAIhD,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,QAAQ;CAIxE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LineConsumingLog = void 0;
|
|
4
|
+
const ios_log_1 = require("./ios-log");
|
|
5
|
+
const helpers_1 = require("./helpers");
|
|
6
|
+
class LineConsumingLog extends ios_log_1.IOSLog {
|
|
7
|
+
_serializeEntry(value) {
|
|
8
|
+
return [value, Date.now()];
|
|
9
|
+
}
|
|
10
|
+
_deserializeEntry(value) {
|
|
11
|
+
const [message, timestamp] = value;
|
|
12
|
+
return (0, helpers_1.toLogEntry)(message, timestamp);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.LineConsumingLog = LineConsumingLog;
|
|
16
|
+
//# sourceMappingURL=line-consuming-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-consuming-log.js","sourceRoot":"","sources":["../../../lib/device-log/line-consuming-log.ts"],"names":[],"mappings":";;;AAAA,uCAAiC;AACjC,uCAAuC;AAKvC,MAAsB,gBAAiB,SAAQ,gBAAgC;IAC1D,eAAe,CAAC,KAAa;QAC9C,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7B,CAAC;IAEkB,iBAAiB,CAAC,KAAuB;QAC1D,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC;QACnC,OAAO,IAAA,oBAAU,EAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACxC,CAAC;CACF;AATD,4CASC"}
|
|
@@ -1,8 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { AppiumLogger } from '@appium/types';
|
|
2
|
+
import IOSLog from './ios-log';
|
|
3
|
+
import type { LogEntry } from '../commands/types';
|
|
4
|
+
export interface SafariConsoleLogOptions {
|
|
5
|
+
showLogs: boolean;
|
|
6
|
+
log: AppiumLogger;
|
|
7
|
+
}
|
|
8
|
+
export interface SafariConsoleStacktraceEntry {
|
|
9
|
+
functionName: string;
|
|
10
|
+
url: string;
|
|
11
|
+
scriptId: number;
|
|
12
|
+
lineNumber: number;
|
|
13
|
+
columnNumber: number;
|
|
14
|
+
}
|
|
15
|
+
export interface SafariConsoleEntry {
|
|
16
|
+
source: string;
|
|
17
|
+
level: string;
|
|
18
|
+
text: string;
|
|
19
|
+
type: string;
|
|
20
|
+
line: number;
|
|
21
|
+
column: number;
|
|
22
|
+
url?: string;
|
|
23
|
+
repeatCount: number;
|
|
24
|
+
stackTrace: SafariConsoleStacktraceEntry[];
|
|
6
25
|
}
|
|
7
|
-
|
|
26
|
+
type TSerializedEntry = [SafariConsoleEntry, number];
|
|
27
|
+
export declare class SafariConsoleLog extends IOSLog<SafariConsoleEntry, TSerializedEntry> {
|
|
28
|
+
private readonly _showLogs;
|
|
29
|
+
constructor(opts: SafariConsoleLogOptions);
|
|
30
|
+
startCapture(): Promise<void>;
|
|
31
|
+
stopCapture(): Promise<void>;
|
|
32
|
+
get isCapturing(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param err
|
|
36
|
+
* @param entry The output will be like:
|
|
37
|
+
* {
|
|
38
|
+
* "source": "javascript",
|
|
39
|
+
* "level":"error",
|
|
40
|
+
* "text":"ReferenceError: Can't find variable: s_account",
|
|
41
|
+
* "type":"log",
|
|
42
|
+
* "line":2,
|
|
43
|
+
* "column":21,
|
|
44
|
+
* "url":"https://assets.adobedtm.com/b46e318d845250834eda10c5a20827c045a4d76f/scripts/satellite-57866f8b64746d53a8000104-staging.js",
|
|
45
|
+
* "repeatCount":1,
|
|
46
|
+
* "stackTrace":[{
|
|
47
|
+
* "functionName":"global code",
|
|
48
|
+
* "url":"https://assets.adobedtm.com/b46e318d845250834eda10c5a20827c045a4d76f/scripts/satellite-57866f8b64746d53a8000104-staging.js",
|
|
49
|
+
* "scriptId":"6",
|
|
50
|
+
* "lineNumber":2,
|
|
51
|
+
* "columnNumber":21
|
|
52
|
+
* }]
|
|
53
|
+
* }
|
|
54
|
+
*
|
|
55
|
+
* we need, at least, `level` (in accordance with Java levels
|
|
56
|
+
* (https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html)),
|
|
57
|
+
* `timestamp`, and `message` to satisfy the java client. In order to
|
|
58
|
+
* provide all the information to the client, `message` is the full
|
|
59
|
+
* object, stringified.
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
onConsoleLogEvent(err: object | null, entry: SafariConsoleEntry): void;
|
|
63
|
+
protected _serializeEntry(value: SafariConsoleEntry): TSerializedEntry;
|
|
64
|
+
protected _deserializeEntry(value: TSerializedEntry): LogEntry;
|
|
65
|
+
}
|
|
66
|
+
export default SafariConsoleLog;
|
|
8
67
|
//# sourceMappingURL=safari-console-log.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safari-console-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/safari-console-log.
|
|
1
|
+
{"version":3,"file":"safari-console-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/safari-console-log.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAOlD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQlD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,YAAY,CAAC;CACnB;AAED,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,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