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.
- package/build/lib/cli/args.d.ts +16 -12
- package/build/lib/cli/args.d.ts.map +1 -1
- package/build/lib/cli/args.js +15 -35
- package/build/lib/cli/args.js.map +1 -1
- package/build/lib/cli/driver-command.d.ts +51 -93
- package/build/lib/cli/driver-command.d.ts.map +1 -1
- package/build/lib/cli/driver-command.js +11 -66
- package/build/lib/cli/driver-command.js.map +1 -1
- package/build/lib/cli/extension-command.d.ts +211 -415
- package/build/lib/cli/extension-command.d.ts.map +1 -1
- package/build/lib/cli/extension-command.js +384 -653
- package/build/lib/cli/extension-command.js.map +1 -1
- package/build/lib/cli/extension.d.ts +11 -16
- package/build/lib/cli/extension.d.ts.map +1 -1
- package/build/lib/cli/extension.js +10 -28
- package/build/lib/cli/extension.js.map +1 -1
- package/build/lib/cli/parser.d.ts +40 -69
- package/build/lib/cli/parser.d.ts.map +1 -1
- package/build/lib/cli/parser.js +24 -59
- package/build/lib/cli/parser.js.map +1 -1
- package/build/lib/cli/plugin-command.d.ts +50 -90
- package/build/lib/cli/plugin-command.d.ts.map +1 -1
- package/build/lib/cli/plugin-command.js +11 -63
- package/build/lib/cli/plugin-command.js.map +1 -1
- package/build/lib/cli/setup-command.d.ts +21 -26
- package/build/lib/cli/setup-command.d.ts.map +1 -1
- package/build/lib/cli/setup-command.js +13 -55
- package/build/lib/cli/setup-command.js.map +1 -1
- package/build/lib/cli/utils.d.ts +27 -29
- package/build/lib/cli/utils.d.ts.map +1 -1
- package/build/lib/cli/utils.js +29 -31
- package/build/lib/cli/utils.js.map +1 -1
- package/build/lib/config-file.d.ts +24 -67
- package/build/lib/config-file.d.ts.map +1 -1
- package/build/lib/config-file.js +56 -115
- package/build/lib/config-file.js.map +1 -1
- package/build/lib/config.d.ts +42 -44
- package/build/lib/config.d.ts.map +1 -1
- package/build/lib/config.js +75 -107
- package/build/lib/config.js.map +1 -1
- package/build/lib/constants.d.ts +23 -23
- package/build/lib/constants.d.ts.map +1 -1
- package/build/lib/constants.js +10 -15
- package/build/lib/constants.js.map +1 -1
- package/build/lib/doctor/doctor.d.ts +40 -57
- package/build/lib/doctor/doctor.d.ts.map +1 -1
- package/build/lib/doctor/doctor.js +29 -60
- package/build/lib/doctor/doctor.js.map +1 -1
- package/build/lib/grid-register.d.ts +32 -7
- package/build/lib/grid-register.d.ts.map +1 -1
- package/build/lib/grid-register.js +84 -48
- package/build/lib/grid-register.js.map +1 -1
- package/build/lib/logsink.d.ts +13 -22
- package/build/lib/logsink.d.ts.map +1 -1
- package/build/lib/logsink.js +48 -103
- package/build/lib/logsink.js.map +1 -1
- package/build/lib/main.js +1 -1
- package/build/lib/main.js.map +1 -1
- package/build/lib/schema/arg-spec.d.ts +32 -107
- package/build/lib/schema/arg-spec.d.ts.map +1 -1
- package/build/lib/schema/arg-spec.js +11 -107
- package/build/lib/schema/arg-spec.js.map +1 -1
- package/build/lib/schema/cli-args.d.ts +3 -15
- package/build/lib/schema/cli-args.d.ts.map +1 -1
- package/build/lib/schema/cli-args.js +15 -105
- package/build/lib/schema/cli-args.js.map +1 -1
- package/build/lib/schema/cli-transformers.d.ts +15 -12
- package/build/lib/schema/cli-transformers.d.ts.map +1 -1
- package/build/lib/schema/cli-transformers.js +15 -45
- package/build/lib/schema/cli-transformers.js.map +1 -1
- package/build/lib/schema/index.d.ts +2 -2
- package/build/lib/schema/index.d.ts.map +1 -1
- package/build/lib/schema/index.js.map +1 -1
- package/build/lib/schema/keywords.d.ts +12 -20
- package/build/lib/schema/keywords.d.ts.map +1 -1
- package/build/lib/schema/keywords.js +6 -51
- package/build/lib/schema/keywords.js.map +1 -1
- package/build/lib/schema/schema.d.ts +106 -231
- package/build/lib/schema/schema.d.ts.map +1 -1
- package/build/lib/schema/schema.js +75 -345
- package/build/lib/schema/schema.js.map +1 -1
- package/build/lib/utils.d.ts +59 -238
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +55 -207
- package/build/lib/utils.js.map +1 -1
- package/lib/cli/{args.js → args.ts} +40 -51
- package/lib/cli/driver-command.ts +122 -0
- package/lib/cli/{extension-command.js → extension-command.ts} +610 -689
- package/lib/cli/extension.ts +65 -0
- package/lib/cli/{parser.js → parser.ts} +48 -71
- package/lib/cli/plugin-command.ts +117 -0
- package/lib/cli/{setup-command.js → setup-command.ts} +57 -72
- package/lib/cli/utils.ts +97 -0
- package/lib/config-file.ts +212 -0
- package/lib/{config.js → config.ts} +129 -141
- package/lib/{constants.js → constants.ts} +30 -41
- package/lib/doctor/{doctor.js → doctor.ts} +81 -91
- package/lib/grid-register.ts +250 -0
- package/lib/{logsink.js → logsink.ts} +91 -137
- package/lib/main.js +1 -1
- package/lib/schema/arg-spec.ts +131 -0
- package/lib/schema/cli-args.ts +171 -0
- package/lib/schema/cli-transformers.ts +83 -0
- package/lib/schema/keywords.ts +96 -0
- package/lib/schema/schema.ts +449 -0
- package/lib/utils.ts +404 -0
- package/package.json +19 -20
- package/tsconfig.json +1 -1
- package/build/package.json +0 -99
- package/lib/cli/driver-command.js +0 -174
- package/lib/cli/extension.js +0 -74
- package/lib/cli/plugin-command.js +0 -164
- package/lib/cli/utils.js +0 -91
- package/lib/config-file.js +0 -228
- package/lib/grid-register.js +0 -146
- package/lib/schema/arg-spec.js +0 -229
- package/lib/schema/cli-args.js +0 -254
- package/lib/schema/cli-transformers.js +0 -113
- package/lib/schema/keywords.js +0 -136
- package/lib/schema/schema.js +0 -725
- package/lib/utils.js +0 -512
- /package/lib/schema/{index.js → index.ts} +0 -0
package/build/lib/cli/utils.d.ts
CHANGED
|
@@ -1,44 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const JSON_SPACES = 4;
|
|
2
|
+
/**
|
|
2
3
|
* Log an error to the console and exit the process.
|
|
3
|
-
*
|
|
4
|
-
* @param
|
|
4
|
+
*
|
|
5
|
+
* @param json - whether we should log json or text
|
|
6
|
+
* @param msg - error message, object, Error instance, etc.
|
|
5
7
|
*/
|
|
6
|
-
export function errAndQuit(json: boolean, msg:
|
|
8
|
+
export declare function errAndQuit(json: boolean, msg: unknown): never;
|
|
7
9
|
/**
|
|
8
|
-
* Conditionally log something to the console
|
|
9
|
-
*
|
|
10
|
-
* @param
|
|
10
|
+
* Conditionally log something to the console.
|
|
11
|
+
*
|
|
12
|
+
* @param json - whether we are in json mode (and should therefore not log)
|
|
13
|
+
* @param msg - string to log
|
|
11
14
|
*/
|
|
12
|
-
export function log(json: boolean, msg: string): void;
|
|
15
|
+
export declare function log(json: boolean, msg: string): void;
|
|
13
16
|
/**
|
|
14
|
-
* Start a spinner, execute an async function, and then stop the spinner
|
|
15
|
-
*
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
17
|
+
* Start a spinner, execute an async function, and then stop the spinner.
|
|
18
|
+
*
|
|
19
|
+
* @param json - whether we are in json mode (and should therefore not log)
|
|
20
|
+
* @param msg - string to log
|
|
21
|
+
* @param fn - function to wrap with spinning
|
|
22
|
+
* @returns result of `fn`
|
|
18
23
|
*/
|
|
19
|
-
export function spinWith(json: boolean, msg: string, fn:
|
|
20
|
-
export
|
|
21
|
-
|
|
24
|
+
export declare function spinWith<T>(json: boolean, msg: string, fn: () => T | Promise<T>): Promise<T>;
|
|
25
|
+
export declare class RingBuffer<T = any> {
|
|
26
|
+
private readonly size;
|
|
27
|
+
private readonly buffer;
|
|
22
28
|
constructor(size?: number);
|
|
23
|
-
size: number;
|
|
24
|
-
buffer: any[];
|
|
25
29
|
/**
|
|
26
|
-
* Get the current buffer contents
|
|
27
|
-
*
|
|
28
|
-
* @returns {any[]}
|
|
30
|
+
* Get the current buffer contents.
|
|
29
31
|
*/
|
|
30
|
-
getBuff():
|
|
32
|
+
getBuff(): T[];
|
|
31
33
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* @returns {void}
|
|
34
|
+
* Add an item to the buffer.
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
enqueue(item: T): void;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* @param {any} item
|
|
38
|
+
* Remove the oldest item from the buffer.
|
|
41
39
|
*/
|
|
42
|
-
|
|
40
|
+
dequeue(): void;
|
|
43
41
|
}
|
|
44
42
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/cli/utils.
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/cli/utils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,IAAI,CAAC;AAI7B;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,GAAG,KAAK,CAU7D;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAIpD;AAED;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAAC,CAAC,EAC9B,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GACvB,OAAO,CAAC,CAAC,CAAC,CAaZ;AAED,qBAAa,UAAU,CAAC,CAAC,GAAG,GAAG;IAC7B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAW;gBAEtB,IAAI,SAAK;IAIrB;;OAEG;IACH,OAAO,IAAI,CAAC,EAAE;IAId;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI;IAOtB;;OAEG;IACH,OAAO,IAAI,IAAI;CAGhB"}
|
package/build/lib/cli/utils.js
CHANGED
|
@@ -10,27 +10,29 @@ exports.log = log;
|
|
|
10
10
|
exports.spinWith = spinWith;
|
|
11
11
|
const ora_1 = __importDefault(require("ora"));
|
|
12
12
|
exports.JSON_SPACES = 4;
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
14
|
* Log an error to the console and exit the process.
|
|
15
|
-
*
|
|
16
|
-
* @param
|
|
15
|
+
*
|
|
16
|
+
* @param json - whether we should log json or text
|
|
17
|
+
* @param msg - error message, object, Error instance, etc.
|
|
17
18
|
*/
|
|
18
19
|
function errAndQuit(json, msg) {
|
|
19
20
|
if (json) {
|
|
20
|
-
console.log(JSON.stringify({ error:
|
|
21
|
+
console.log(JSON.stringify({ error: String(msg) }, null, exports.JSON_SPACES));
|
|
21
22
|
}
|
|
22
23
|
else {
|
|
23
|
-
console.error(
|
|
24
|
-
if (msg
|
|
25
|
-
console.error(
|
|
24
|
+
console.error(String(msg).red);
|
|
25
|
+
if (msg?.stderr) {
|
|
26
|
+
console.error(String(msg.stderr).red);
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
process.exit(1);
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
|
-
* Conditionally log something to the console
|
|
32
|
-
*
|
|
33
|
-
* @param
|
|
32
|
+
* Conditionally log something to the console.
|
|
33
|
+
*
|
|
34
|
+
* @param json - whether we are in json mode (and should therefore not log)
|
|
35
|
+
* @param msg - string to log
|
|
34
36
|
*/
|
|
35
37
|
function log(json, msg) {
|
|
36
38
|
if (!json) {
|
|
@@ -38,19 +40,20 @@ function log(json, msg) {
|
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
/**
|
|
41
|
-
* Start a spinner, execute an async function, and then stop the spinner
|
|
42
|
-
*
|
|
43
|
-
* @param
|
|
44
|
-
* @param
|
|
43
|
+
* Start a spinner, execute an async function, and then stop the spinner.
|
|
44
|
+
*
|
|
45
|
+
* @param json - whether we are in json mode (and should therefore not log)
|
|
46
|
+
* @param msg - string to log
|
|
47
|
+
* @param fn - function to wrap with spinning
|
|
48
|
+
* @returns result of `fn`
|
|
45
49
|
*/
|
|
46
50
|
async function spinWith(json, msg, fn) {
|
|
47
51
|
if (json) {
|
|
48
52
|
return await fn();
|
|
49
53
|
}
|
|
50
54
|
const spinner = (0, ora_1.default)(msg).start();
|
|
51
|
-
let res;
|
|
52
55
|
try {
|
|
53
|
-
res = await fn();
|
|
56
|
+
const res = await fn();
|
|
54
57
|
spinner.succeed();
|
|
55
58
|
return res;
|
|
56
59
|
}
|
|
@@ -60,30 +63,19 @@ async function spinWith(json, msg, fn) {
|
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
65
|
class RingBuffer {
|
|
66
|
+
size;
|
|
67
|
+
buffer = [];
|
|
63
68
|
constructor(size = 50) {
|
|
64
69
|
this.size = size;
|
|
65
|
-
this.buffer = [];
|
|
66
70
|
}
|
|
67
71
|
/**
|
|
68
|
-
* Get the current buffer contents
|
|
69
|
-
*
|
|
70
|
-
* @returns {any[]}
|
|
72
|
+
* Get the current buffer contents.
|
|
71
73
|
*/
|
|
72
74
|
getBuff() {
|
|
73
75
|
return this.buffer;
|
|
74
76
|
}
|
|
75
77
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* @returns {void}
|
|
79
|
-
*/
|
|
80
|
-
dequeue() {
|
|
81
|
-
this.buffer.shift();
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Add an item to the buffer
|
|
85
|
-
*
|
|
86
|
-
* @param {any} item
|
|
78
|
+
* Add an item to the buffer.
|
|
87
79
|
*/
|
|
88
80
|
enqueue(item) {
|
|
89
81
|
if (this.buffer.length >= this.size) {
|
|
@@ -91,6 +83,12 @@ class RingBuffer {
|
|
|
91
83
|
}
|
|
92
84
|
this.buffer.push(item);
|
|
93
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Remove the oldest item from the buffer.
|
|
88
|
+
*/
|
|
89
|
+
dequeue() {
|
|
90
|
+
this.buffer.shift();
|
|
91
|
+
}
|
|
94
92
|
}
|
|
95
93
|
exports.RingBuffer = RingBuffer;
|
|
96
94
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../lib/cli/utils.
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../lib/cli/utils.ts"],"names":[],"mappings":";AAAA,+BAA+B;;;;;;AAc/B,gCAUC;AAQD,kBAIC;AAUD,4BAiBC;AA7DD,8CAAsB;AAET,QAAA,WAAW,GAAG,CAAC,CAAC;AAI7B;;;;;GAKG;AACH,SAAgB,UAAU,CAAC,IAAa,EAAE,GAAY;IACpD,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,EAAC,EAAE,IAAI,EAAE,mBAAW,CAAC,CAAC,CAAC;IACvE,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAE,MAAM,CAAC,GAAG,CAAS,CAAC,GAAG,CAAC,CAAC;QACxC,IAAK,GAAiB,EAAE,MAAM,EAAE,CAAC;YAC/B,OAAO,CAAC,KAAK,CAAE,MAAM,CAAE,GAAiB,CAAC,MAAM,CAAS,CAAC,GAAG,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,GAAG,CAAC,IAAa,EAAE,GAAW;IAC5C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,QAAQ,CAC5B,IAAa,EACb,GAAW,EACX,EAAwB;IAExB,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;IACD,MAAM,OAAO,GAAG,IAAA,aAAG,EAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;IACjC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,EAAE,EAAE,CAAC;QACvB,OAAO,CAAC,OAAO,EAAE,CAAC;QAClB,OAAO,GAAG,CAAC;IACb,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC;AAED,MAAa,UAAU;IACJ,IAAI,CAAS;IACb,MAAM,GAAQ,EAAE,CAAC;IAElC,YAAY,IAAI,GAAG,EAAE;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,IAAO;QACb,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACpC,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;CACF;AA/BD,gCA+BC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { type IOutputError } from '@sidvind/better-ajv-errors';
|
|
2
|
+
import type { ErrorObject } from 'ajv';
|
|
3
|
+
import type { AppiumConfig, NormalizedAppiumConfig } from '@appium/types';
|
|
1
4
|
/**
|
|
2
5
|
* Given an array of errors and the result of loading a config file, generate a
|
|
3
6
|
* helpful string for the user.
|
|
@@ -6,76 +9,39 @@
|
|
|
6
9
|
* _string_ of the config file. This is only applicable if the config file
|
|
7
10
|
* was in JSON format. If present, it will associate line numbers with errors.
|
|
8
11
|
* - If `errors` happens to be empty, this will throw.
|
|
9
|
-
*
|
|
10
|
-
* @param {ReadConfigFileResult['config']|any} [config] -
|
|
11
|
-
* Configuration & metadata
|
|
12
|
-
* @param {FormatConfigErrorsOptions} [opts]
|
|
12
|
+
*
|
|
13
13
|
* @throws {TypeError} If `errors` is empty
|
|
14
|
-
* @returns {string}
|
|
15
14
|
*/
|
|
16
|
-
export function formatErrors(errors?:
|
|
15
|
+
export declare function formatErrors(errors?: ErrorObject[], config?: ReadConfigFileResult['config'] | Record<string, unknown> | string, opts?: FormatConfigErrorsOptions): string | IOutputError[];
|
|
17
16
|
/**
|
|
18
17
|
* Given an optional path, read a config file. Validates the config file.
|
|
19
18
|
*
|
|
20
19
|
* Call {@link validate} if you already have a config object.
|
|
21
|
-
* @param {string} [filepath] - Path to config file, if we have one
|
|
22
|
-
* @param {ReadConfigFileOptions} [opts] - Options
|
|
23
20
|
* @public
|
|
24
|
-
* @returns
|
|
21
|
+
* @returns Contains config and filepath, if found, and any errors
|
|
25
22
|
*/
|
|
26
|
-
export function readConfigFile(filepath?: string, opts?: ReadConfigFileOptions): Promise<ReadConfigFileResult>;
|
|
23
|
+
export declare function readConfigFile(filepath?: string, opts?: ReadConfigFileOptions): Promise<ReadConfigFileResult>;
|
|
27
24
|
/**
|
|
28
25
|
* Convert schema property names to either a) the value of the `appiumCliDest` property, if any; or b) camel-case
|
|
29
|
-
* @
|
|
30
|
-
* @returns {NormalizedAppiumConfig} New object with camel-cased keys (or `dest` keys).
|
|
26
|
+
* @returns New object with camel-cased keys (or `dest` keys).
|
|
31
27
|
*/
|
|
32
|
-
export function normalizeConfig(config: AppiumConfig): NormalizedAppiumConfig;
|
|
28
|
+
export declare function normalizeConfig(config: AppiumConfig): NormalizedAppiumConfig;
|
|
33
29
|
/**
|
|
34
30
|
* Result of calling {@link readConfigFile}.
|
|
35
31
|
*/
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
filepath?: string | undefined;
|
|
45
|
-
/**
|
|
46
|
-
* - If `true`, the config file exists but is empty
|
|
47
|
-
*/
|
|
48
|
-
isEmpty?: boolean | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* - The parsed configuration
|
|
51
|
-
*/
|
|
52
|
-
config?: import("@appium/types").NormalizedAppiumConfig | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* - Human-readable error messages and suggestions. If the `pretty` option is `true`, this will be a nice string to print.
|
|
55
|
-
*/
|
|
56
|
-
reason?: string | import("@sidvind/better-ajv-errors").IOutputError[] | undefined;
|
|
57
|
-
};
|
|
32
|
+
export interface ReadConfigFileResult {
|
|
33
|
+
errors?: ErrorObject[];
|
|
34
|
+
filepath?: string;
|
|
35
|
+
isEmpty?: boolean;
|
|
36
|
+
config?: NormalizedAppiumConfig;
|
|
37
|
+
reason?: string | IOutputError[];
|
|
38
|
+
}
|
|
58
39
|
/**
|
|
59
40
|
* Options for {@link readConfigFile}.
|
|
60
41
|
*/
|
|
61
|
-
export
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
*/
|
|
65
|
-
pretty?: boolean | undefined;
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* This is an `AsyncSearcher` which is inexplicably _not_ exported by the `lilconfig` type definition.
|
|
69
|
-
*/
|
|
70
|
-
export type LilconfigAsyncSearcher = ReturnType<typeof import("lilconfig")["lilconfig"]>;
|
|
71
|
-
/**
|
|
72
|
-
* The contents of an Appium config file. Generated from schema
|
|
73
|
-
*/
|
|
74
|
-
export type AppiumConfig = import("@appium/types").AppiumConfig;
|
|
75
|
-
/**
|
|
76
|
-
* The contents of an Appium config file with camelcased property names (and using `appiumCliDest` value if present). Generated from {@link AppiumConfig}
|
|
77
|
-
*/
|
|
78
|
-
export type NormalizedAppiumConfig = import("@appium/types").NormalizedAppiumConfig;
|
|
42
|
+
export interface ReadConfigFileOptions {
|
|
43
|
+
pretty?: boolean;
|
|
44
|
+
}
|
|
79
45
|
/**
|
|
80
46
|
* The string should be a raw JSON string.
|
|
81
47
|
*/
|
|
@@ -83,18 +49,9 @@ export type RawJson = string;
|
|
|
83
49
|
/**
|
|
84
50
|
* Options for {@link formatErrors}.
|
|
85
51
|
*/
|
|
86
|
-
export
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* - Whether to format errors as a CLI-friendly string
|
|
93
|
-
*/
|
|
94
|
-
pretty?: boolean | undefined;
|
|
95
|
-
/**
|
|
96
|
-
* - Specific ID of a prop; otherwise entire schema
|
|
97
|
-
*/
|
|
98
|
-
schemaId?: string | undefined;
|
|
99
|
-
};
|
|
52
|
+
export interface FormatConfigErrorsOptions {
|
|
53
|
+
json?: RawJson;
|
|
54
|
+
pretty?: boolean;
|
|
55
|
+
schemaId?: string;
|
|
56
|
+
}
|
|
100
57
|
//# sourceMappingURL=config-file.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-file.d.ts","sourceRoot":"","sources":["../../lib/config-file.
|
|
1
|
+
{"version":3,"file":"config-file.d.ts","sourceRoot":"","sources":["../../lib/config-file.ts"],"names":[],"mappings":"AAAA,OAAwB,EAAC,KAAK,YAAY,EAAC,MAAM,4BAA4B,CAAC;AAC9E,OAAO,KAAK,EAAC,WAAW,EAAe,MAAM,KAAK,CAAC;AAInD,OAAO,KAAK,EAAC,YAAY,EAAE,sBAAsB,EAAC,MAAM,eAAe,CAAC;AAUxE;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,MAAM,GAAE,WAAW,EAAO,EAC1B,MAAM,GAAE,oBAAoB,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAW,EAC9E,IAAI,GAAE,yBAA8B,GACnC,MAAM,GAAG,YAAY,EAAE,CAQzB;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,QAAQ,CAAC,EAAE,MAAM,EACjB,IAAI,GAAE,qBAA0B,GAC/B,OAAO,CAAC,oBAAoB,CAAC,CAsC/B;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,sBAAsB,CAwB5E;AA0DD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,EAAE,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
package/build/lib/config-file.js
CHANGED
|
@@ -44,71 +44,12 @@ const lilconfig_1 = require("lilconfig");
|
|
|
44
44
|
const lodash_1 = __importDefault(require("lodash"));
|
|
45
45
|
const yaml = __importStar(require("yaml"));
|
|
46
46
|
const schema_1 = require("./schema/schema");
|
|
47
|
-
/**
|
|
48
|
-
* lilconfig loader to handle `.yaml` files
|
|
49
|
-
* @type {import('lilconfig').LoaderSync}
|
|
50
|
-
*/
|
|
51
|
-
function yamlLoader(filepath, content) {
|
|
52
|
-
try {
|
|
53
|
-
return yaml.parse(content);
|
|
54
|
-
}
|
|
55
|
-
catch (e) {
|
|
56
|
-
throw new Error(`The YAML config at '${filepath}' cannot be loaded. Original error: ${e.message}`);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
47
|
/**
|
|
60
48
|
* A cache of the raw config file (a JSON string) at a filepath.
|
|
61
49
|
* This is used for better error reporting.
|
|
62
50
|
* Note that config files needn't be JSON, but it helps if they are.
|
|
63
|
-
* @type {Map<string,RawJson>}
|
|
64
51
|
*/
|
|
65
52
|
const rawConfig = new Map();
|
|
66
|
-
/**
|
|
67
|
-
* Custom JSON loader that caches the raw config file (for use with `better-ajv-errors`).
|
|
68
|
-
* If it weren't for this cache, this would be unnecessary.
|
|
69
|
-
* @type {import('lilconfig').LoaderSync}
|
|
70
|
-
*/
|
|
71
|
-
function jsonLoader(filepath, content) {
|
|
72
|
-
rawConfig.set(filepath, content);
|
|
73
|
-
try {
|
|
74
|
-
return JSON.parse(content);
|
|
75
|
-
}
|
|
76
|
-
catch (e) {
|
|
77
|
-
throw new Error(`The JSON config at '${filepath}' cannot be loaded. Original error: ${e.message}`);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Loads a config file from an explicit path
|
|
82
|
-
* @param {LilconfigAsyncSearcher} lc - lilconfig instance
|
|
83
|
-
* @param {string} filepath - Path to config file
|
|
84
|
-
* @returns {Promise<import('lilconfig').LilconfigResult>}
|
|
85
|
-
*/
|
|
86
|
-
async function loadConfigFile(lc, filepath) {
|
|
87
|
-
try {
|
|
88
|
-
// removing "await" will cause any rejection to _not_ be caught in this block!
|
|
89
|
-
return await lc.load(filepath);
|
|
90
|
-
}
|
|
91
|
-
catch ( /** @type {unknown} */err) {
|
|
92
|
-
if ( /** @type {NodeJS.ErrnoException} */(err).code === 'ENOENT') {
|
|
93
|
-
/** @type {NodeJS.ErrnoException} */ (err).message = `Config file not found at user-provided path: ${filepath}`;
|
|
94
|
-
throw err;
|
|
95
|
-
}
|
|
96
|
-
else if (err instanceof SyntaxError) {
|
|
97
|
-
// generally invalid JSON
|
|
98
|
-
err.message = `Config file at user-provided path ${filepath} is invalid:\n${err.message}`;
|
|
99
|
-
throw err;
|
|
100
|
-
}
|
|
101
|
-
throw err;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Searches for a config file
|
|
106
|
-
* @param {LilconfigAsyncSearcher} lc - lilconfig instance
|
|
107
|
-
* @returns {Promise<import('lilconfig').LilconfigResult>}
|
|
108
|
-
*/
|
|
109
|
-
async function searchConfigFile(lc) {
|
|
110
|
-
return await lc.search();
|
|
111
|
-
}
|
|
112
53
|
/**
|
|
113
54
|
* Given an array of errors and the result of loading a config file, generate a
|
|
114
55
|
* helpful string for the user.
|
|
@@ -117,12 +58,8 @@ async function searchConfigFile(lc) {
|
|
|
117
58
|
* _string_ of the config file. This is only applicable if the config file
|
|
118
59
|
* was in JSON format. If present, it will associate line numbers with errors.
|
|
119
60
|
* - If `errors` happens to be empty, this will throw.
|
|
120
|
-
*
|
|
121
|
-
* @param {ReadConfigFileResult['config']|any} [config] -
|
|
122
|
-
* Configuration & metadata
|
|
123
|
-
* @param {FormatConfigErrorsOptions} [opts]
|
|
61
|
+
*
|
|
124
62
|
* @throws {TypeError} If `errors` is empty
|
|
125
|
-
* @returns {string}
|
|
126
63
|
*/
|
|
127
64
|
function formatErrors(errors = [], config = {}, opts = {}) {
|
|
128
65
|
if (errors && !errors.length) {
|
|
@@ -130,17 +67,15 @@ function formatErrors(errors = [], config = {}, opts = {}) {
|
|
|
130
67
|
}
|
|
131
68
|
return (0, better_ajv_errors_1.default)((0, schema_1.getSchema)(opts.schemaId), config, errors, {
|
|
132
69
|
json: opts.json,
|
|
133
|
-
format: 'cli',
|
|
70
|
+
format: opts.pretty === false ? 'js' : 'cli',
|
|
134
71
|
});
|
|
135
72
|
}
|
|
136
73
|
/**
|
|
137
74
|
* Given an optional path, read a config file. Validates the config file.
|
|
138
75
|
*
|
|
139
76
|
* Call {@link validate} if you already have a config object.
|
|
140
|
-
* @param {string} [filepath] - Path to config file, if we have one
|
|
141
|
-
* @param {ReadConfigFileOptions} [opts] - Options
|
|
142
77
|
* @public
|
|
143
|
-
* @returns
|
|
78
|
+
* @returns Contains config and filepath, if found, and any errors
|
|
144
79
|
*/
|
|
145
80
|
async function readConfigFile(filepath, opts = {}) {
|
|
146
81
|
const lc = (0, lilconfig_1.lilconfig)('appium', {
|
|
@@ -169,7 +104,7 @@ async function readConfigFile(filepath, opts = {}) {
|
|
|
169
104
|
configResult = reason ? { ...result, errors, reason } : { ...result, errors };
|
|
170
105
|
}
|
|
171
106
|
// normalize (to camel case) all top-level property names of the config file
|
|
172
|
-
configResult.config = normalizeConfig(
|
|
107
|
+
configResult.config = normalizeConfig(configResult.config);
|
|
173
108
|
return configResult;
|
|
174
109
|
}
|
|
175
110
|
finally {
|
|
@@ -181,69 +116,75 @@ async function readConfigFile(filepath, opts = {}) {
|
|
|
181
116
|
}
|
|
182
117
|
/**
|
|
183
118
|
* Convert schema property names to either a) the value of the `appiumCliDest` property, if any; or b) camel-case
|
|
184
|
-
* @
|
|
185
|
-
* @returns {NormalizedAppiumConfig} New object with camel-cased keys (or `dest` keys).
|
|
119
|
+
* @returns New object with camel-cased keys (or `dest` keys).
|
|
186
120
|
*/
|
|
187
121
|
function normalizeConfig(config) {
|
|
188
122
|
const schema = (0, schema_1.getSchema)();
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const normalize = (config, section) => {
|
|
196
|
-
const obj = lodash_1.default.isUndefined(section) ? config : lodash_1.default.get(config, section, config);
|
|
197
|
-
const mappedObj = lodash_1.default.mapKeys(obj, (__, prop) => lodash_1.default.get(schema, `properties.server.properties[${prop}].appiumCliDest`, lodash_1.default.camelCase(prop)));
|
|
123
|
+
const isSchemaTypeObject = (schemaObj) => Boolean(schemaObj?.properties || schemaObj?.type === 'object');
|
|
124
|
+
const normalize = (rootConfig, section) => {
|
|
125
|
+
const obj = lodash_1.default.isUndefined(section)
|
|
126
|
+
? rootConfig
|
|
127
|
+
: lodash_1.default.get(rootConfig, section, rootConfig);
|
|
128
|
+
const mappedObj = lodash_1.default.mapKeys(obj, (_v, prop) => lodash_1.default.get(schema, `properties.server.properties[${prop}].appiumCliDest`, lodash_1.default.camelCase(prop)));
|
|
198
129
|
return lodash_1.default.mapValues(mappedObj, (value, property) => {
|
|
199
130
|
const nextSection = section ? `${section}.${property}` : property;
|
|
200
131
|
return isSchemaTypeObject(schema.properties?.[property])
|
|
201
|
-
? normalize(
|
|
132
|
+
? normalize(rootConfig, nextSection)
|
|
202
133
|
: value;
|
|
203
134
|
});
|
|
204
135
|
};
|
|
205
|
-
/**
|
|
206
|
-
* Returns `true` if the schema prop references an object, or if it's an object itself
|
|
207
|
-
* @param {import('ajv').SchemaObject|object} schema - Referencing schema object
|
|
208
|
-
*/
|
|
209
|
-
const isSchemaTypeObject = (schema) => Boolean(schema?.properties || schema?.type === 'object');
|
|
210
136
|
return normalize(config);
|
|
211
137
|
}
|
|
212
138
|
/**
|
|
213
|
-
*
|
|
214
|
-
* @typedef ReadConfigFileResult
|
|
215
|
-
* @property {import('ajv').ErrorObject[]} [errors] - Validation errors
|
|
216
|
-
* @property {string} [filepath] - The path to the config file, if found
|
|
217
|
-
* @property {boolean} [isEmpty] - If `true`, the config file exists but is empty
|
|
218
|
-
* @property {NormalizedAppiumConfig} [config] - The parsed configuration
|
|
219
|
-
* @property {string|import('@sidvind/better-ajv-errors').IOutputError[]} [reason] - Human-readable error messages and suggestions. If the `pretty` option is `true`, this will be a nice string to print.
|
|
220
|
-
*/
|
|
221
|
-
/**
|
|
222
|
-
* Options for {@link readConfigFile}.
|
|
223
|
-
* @typedef ReadConfigFileOptions
|
|
224
|
-
* @property {boolean} [pretty=true] If `false`, do not use color and fancy formatting in the `reason` property of the {@link ReadConfigFileResult}. The value of `reason` is then suitable for machine-reading.
|
|
225
|
-
*/
|
|
226
|
-
/**
|
|
227
|
-
* This is an `AsyncSearcher` which is inexplicably _not_ exported by the `lilconfig` type definition.
|
|
228
|
-
* @typedef {ReturnType<import('lilconfig')["lilconfig"]>} LilconfigAsyncSearcher
|
|
229
|
-
*/
|
|
230
|
-
/**
|
|
231
|
-
* The contents of an Appium config file. Generated from schema
|
|
232
|
-
* @typedef {import('@appium/types').AppiumConfig} AppiumConfig
|
|
139
|
+
* lilconfig loader to handle `.yaml` files
|
|
233
140
|
*/
|
|
141
|
+
function yamlLoader(filepath, content) {
|
|
142
|
+
try {
|
|
143
|
+
return yaml.parse(content);
|
|
144
|
+
}
|
|
145
|
+
catch (e) {
|
|
146
|
+
throw new Error(`The YAML config at '${filepath}' cannot be loaded. Original error: ${e.message}`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
234
149
|
/**
|
|
235
|
-
*
|
|
236
|
-
*
|
|
150
|
+
* Custom JSON loader that caches the raw config file (for use with `better-ajv-errors`).
|
|
151
|
+
* If it weren't for this cache, this would be unnecessary.
|
|
237
152
|
*/
|
|
153
|
+
function jsonLoader(filepath, content) {
|
|
154
|
+
rawConfig.set(filepath, content);
|
|
155
|
+
try {
|
|
156
|
+
return JSON.parse(content);
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
rawConfig.delete(filepath);
|
|
160
|
+
throw new Error(`The JSON config at '${filepath}' cannot be loaded. Original error: ${e.message}`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
238
163
|
/**
|
|
239
|
-
*
|
|
240
|
-
* @typedef {string} RawJson
|
|
164
|
+
* Loads a config file from an explicit path
|
|
241
165
|
*/
|
|
166
|
+
async function loadConfigFile(lc, filepath) {
|
|
167
|
+
try {
|
|
168
|
+
// removing "await" will cause any rejection to _not_ be caught in this block!
|
|
169
|
+
return await lc.load(filepath);
|
|
170
|
+
}
|
|
171
|
+
catch (err) {
|
|
172
|
+
if (err.code === 'ENOENT') {
|
|
173
|
+
err.message = `Config file not found at user-provided path: ${filepath}`;
|
|
174
|
+
throw err;
|
|
175
|
+
}
|
|
176
|
+
else if (err instanceof SyntaxError) {
|
|
177
|
+
// generally invalid JSON
|
|
178
|
+
err.message = `Config file at user-provided path ${filepath} is invalid:\n${err.message}`;
|
|
179
|
+
throw err;
|
|
180
|
+
}
|
|
181
|
+
throw err;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
242
184
|
/**
|
|
243
|
-
*
|
|
244
|
-
* @typedef FormatConfigErrorsOptions
|
|
245
|
-
* @property {import('./config-file').RawJson} [json] - Raw JSON config (as string)
|
|
246
|
-
* @property {boolean} [pretty=true] - Whether to format errors as a CLI-friendly string
|
|
247
|
-
* @property {string} [schemaId] - Specific ID of a prop; otherwise entire schema
|
|
185
|
+
* Searches for a config file
|
|
248
186
|
*/
|
|
187
|
+
async function searchConfigFile(lc) {
|
|
188
|
+
return await lc.search();
|
|
189
|
+
}
|
|
249
190
|
//# sourceMappingURL=config-file.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-file.js","sourceRoot":"","sources":["../../lib/config-file.
|
|
1
|
+
{"version":3,"file":"config-file.js","sourceRoot":"","sources":["../../lib/config-file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,oCAYC;AASD,wCAyCC;AAMD,0CAwBC;AAtHD,mFAA8E;AAE9E,yCAA2E;AAC3E,oDAAuB;AACvB,2CAA6B;AAE7B,4CAAoD;AAEpD;;;;GAIG;AACH,MAAM,SAAS,GAAG,IAAI,GAAG,EAAmB,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,SAAgB,YAAY,CAC1B,SAAwB,EAAE,EAC1B,SAA4E,EAAE,EAC9E,OAAkC,EAAE;IAEpC,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC7B,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,IAAA,2BAAe,EAAC,IAAA,kBAAS,EAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE;QAC/D,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,MAAM,EAAE,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;KAC7C,CAAC,CAAC;AACL,CAAC;AAED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