@appium/support 7.0.5 → 7.0.6
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/LICENSE +201 -0
- package/build/lib/console.d.ts +42 -88
- package/build/lib/console.d.ts.map +1 -1
- package/build/lib/console.js +20 -80
- package/build/lib/console.js.map +1 -1
- package/build/lib/doctor.d.ts +6 -18
- package/build/lib/doctor.d.ts.map +1 -1
- package/build/lib/doctor.js +0 -15
- package/build/lib/doctor.js.map +1 -1
- package/build/lib/env.d.ts +14 -20
- package/build/lib/env.d.ts.map +1 -1
- package/build/lib/env.js +13 -50
- package/build/lib/env.js.map +1 -1
- package/build/lib/fs.d.ts +109 -148
- package/build/lib/fs.d.ts.map +1 -1
- package/build/lib/fs.js +88 -188
- package/build/lib/fs.js.map +1 -1
- package/build/lib/image-util.d.ts +7 -6
- package/build/lib/image-util.d.ts.map +1 -1
- package/build/lib/image-util.js +9 -6
- package/build/lib/image-util.js.map +1 -1
- package/build/lib/index.d.ts +19 -17
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/logger.d.ts +1 -1
- package/build/lib/logger.d.ts.map +1 -1
- package/build/lib/logger.js +1 -1
- package/build/lib/logger.js.map +1 -1
- package/build/lib/logging.d.ts +7 -15
- package/build/lib/logging.d.ts.map +1 -1
- package/build/lib/logging.js +36 -62
- package/build/lib/logging.js.map +1 -1
- package/build/lib/mjpeg.d.ts +19 -56
- package/build/lib/mjpeg.d.ts.map +1 -1
- package/build/lib/mjpeg.js +53 -76
- package/build/lib/mjpeg.js.map +1 -1
- package/build/lib/mkdirp.d.ts +4 -1
- package/build/lib/mkdirp.d.ts.map +1 -1
- package/build/lib/mkdirp.js +1 -2
- package/build/lib/mkdirp.js.map +1 -1
- package/build/lib/net.d.ts +52 -90
- package/build/lib/net.d.ts.map +1 -1
- package/build/lib/net.js +104 -193
- package/build/lib/net.js.map +1 -1
- package/build/lib/node.d.ts +16 -17
- package/build/lib/node.d.ts.map +1 -1
- package/build/lib/node.js +106 -111
- package/build/lib/node.js.map +1 -1
- package/build/lib/npm.d.ts +65 -86
- package/build/lib/npm.d.ts.map +1 -1
- package/build/lib/npm.js +59 -117
- package/build/lib/npm.js.map +1 -1
- package/build/lib/plist.d.ts +36 -29
- package/build/lib/plist.d.ts.map +1 -1
- package/build/lib/plist.js +62 -59
- package/build/lib/plist.js.map +1 -1
- package/build/lib/process.d.ts +19 -2
- package/build/lib/process.d.ts.map +1 -1
- package/build/lib/process.js +24 -7
- package/build/lib/process.js.map +1 -1
- package/build/lib/system.d.ts +41 -6
- package/build/lib/system.d.ts.map +1 -1
- package/build/lib/system.js +46 -11
- package/build/lib/system.js.map +1 -1
- package/build/lib/tempdir.d.ts +26 -49
- package/build/lib/tempdir.d.ts.map +1 -1
- package/build/lib/tempdir.js +41 -73
- package/build/lib/tempdir.js.map +1 -1
- package/build/lib/timing.d.ts +28 -22
- package/build/lib/timing.d.ts.map +1 -1
- package/build/lib/timing.js +16 -17
- package/build/lib/timing.js.map +1 -1
- package/build/lib/util.d.ts +164 -181
- package/build/lib/util.d.ts.map +1 -1
- package/build/lib/util.js +193 -247
- package/build/lib/util.js.map +1 -1
- package/build/lib/zip.d.ts +81 -139
- package/build/lib/zip.d.ts.map +1 -1
- package/build/lib/zip.js +210 -258
- package/build/lib/zip.js.map +1 -1
- package/lib/console.ts +139 -0
- package/lib/{doctor.js → doctor.ts} +6 -20
- package/lib/{env.js → env.ts} +31 -59
- package/lib/fs.ts +453 -0
- package/lib/image-util.ts +40 -0
- package/lib/index.ts +1 -0
- package/lib/{logger.js → logger.ts} +1 -1
- package/lib/logging.ts +157 -0
- package/lib/mjpeg.ts +186 -0
- package/lib/{mkdirp.js → mkdirp.ts} +2 -2
- package/lib/net.ts +305 -0
- package/lib/{node.js → node.ts} +134 -133
- package/lib/npm.ts +291 -0
- package/lib/plist.ts +187 -0
- package/lib/process.ts +62 -0
- package/lib/system.ts +95 -0
- package/lib/tempdir.ts +115 -0
- package/lib/{timing.js → timing.ts} +28 -33
- package/lib/util.ts +561 -0
- package/lib/{zip.js → zip.ts} +341 -296
- package/package.json +20 -22
- package/tsconfig.json +3 -5
- package/index.js +0 -1
- package/lib/console.js +0 -173
- package/lib/fs.js +0 -496
- package/lib/image-util.js +0 -32
- package/lib/logging.js +0 -145
- package/lib/mjpeg.js +0 -207
- package/lib/net.js +0 -336
- package/lib/npm.js +0 -310
- package/lib/plist.js +0 -182
- package/lib/process.js +0 -46
- package/lib/system.js +0 -48
- package/lib/tempdir.js +0 -131
- package/lib/util.js +0 -584
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/build/lib/console.d.ts
CHANGED
|
@@ -1,109 +1,63 @@
|
|
|
1
|
+
import type { Color } from '@colors/colors';
|
|
2
|
+
import '@colors/colors';
|
|
3
|
+
import symbols from 'log-symbols';
|
|
4
|
+
import type { InspectOptions } from 'node:util';
|
|
5
|
+
import type { JsonValue } from 'type-fest';
|
|
6
|
+
/** Symbol keys from log-symbols used for decoration */
|
|
7
|
+
type SymbolKey = keyof typeof symbols;
|
|
8
|
+
/**
|
|
9
|
+
* Options for {@linkcode CliConsole}.
|
|
10
|
+
*
|
|
11
|
+
* @see https://npm.im/supports-color
|
|
12
|
+
*/
|
|
13
|
+
export interface ConsoleOpts {
|
|
14
|
+
/** If _truthy_, suppress all output except JSON (use {@linkcode CliConsole#json}), which writes to `STDOUT`. */
|
|
15
|
+
jsonMode?: boolean;
|
|
16
|
+
/** If _falsy_, do not use fancy symbols. */
|
|
17
|
+
useSymbols?: boolean;
|
|
18
|
+
/** If _falsy_, do not use color output. If _truthy_, forces color output. By default, checks terminal/TTY for support via pkg `supports-color`. Ignored if `useSymbols` is `false`. */
|
|
19
|
+
useColor?: boolean;
|
|
20
|
+
}
|
|
1
21
|
/**
|
|
2
22
|
* A particular console/logging class for Appium's CLI.
|
|
3
23
|
*
|
|
4
24
|
* - By default, uses some fancy symbols
|
|
5
25
|
* - Writes to `STDERR`, generally.
|
|
6
|
-
* - In "JSON mode", `STDERR` is squelched. Use {@linkcode
|
|
26
|
+
* - In "JSON mode", `STDERR` is squelched. Use {@linkcode CliConsole.json} to write the JSON.
|
|
7
27
|
*
|
|
8
28
|
* DO NOT extend this to do anything other than what it already does. Download a library or something.
|
|
9
29
|
*/
|
|
10
|
-
export class CliConsole {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
static symbolToColor: Record<keyof typeof symbols, keyof Extract<import("@colors/colors").Color, "string">>;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @param {ConsoleOpts} opts
|
|
18
|
-
*/
|
|
19
|
-
constructor({ jsonMode, useSymbols, useColor }?: ConsoleOpts);
|
|
30
|
+
export declare class CliConsole {
|
|
31
|
+
#private;
|
|
32
|
+
static readonly symbolToColor: Record<SymbolKey, keyof Color>;
|
|
33
|
+
constructor(opts?: ConsoleOpts);
|
|
20
34
|
/**
|
|
21
35
|
* Wraps a message string in breathtaking fanciness
|
|
22
36
|
*
|
|
23
37
|
* Returns `undefined` if `msg` is `undefined`.
|
|
24
|
-
* @param {string} [msg] - Message to decorate, if anything
|
|
25
|
-
* @param {keyof typeof CliConsole['symbolToColor']} [symbol] - Symbol to use
|
|
26
|
-
* @returns {string|undefined}
|
|
27
38
|
*/
|
|
28
|
-
decorate(msg
|
|
39
|
+
decorate(msg: string | undefined, symbol?: SymbolKey): string | undefined;
|
|
29
40
|
/**
|
|
30
41
|
* Writes to `STDOUT`. Must be stringifyable.
|
|
31
42
|
*
|
|
32
43
|
* You probably don't want to call this more than once before exiting (since that will output invalid JSON).
|
|
33
|
-
* @param {import('type-fest').JsonValue} value
|
|
34
|
-
*/
|
|
35
|
-
json(value: import("type-fest").JsonValue): void;
|
|
36
|
-
/**
|
|
37
|
-
* General logging function.
|
|
38
|
-
* @param {string} [message]
|
|
39
|
-
* @param {...any} args
|
|
40
|
-
*/
|
|
41
|
-
log(message?: string, ...args: any[]): void;
|
|
42
|
-
/**
|
|
43
|
-
* A "success" message
|
|
44
|
-
* @param {string} [message]
|
|
45
|
-
* @param {...any} args
|
|
46
44
|
*/
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
debug(message?: string, ...args:
|
|
54
|
-
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
* @param {string} [message]
|
|
63
|
-
* @param {...any} args
|
|
64
|
-
*/
|
|
65
|
-
info(message?: string, ...args: any[]): void;
|
|
66
|
-
/**
|
|
67
|
-
* A "warning" message
|
|
68
|
-
* @param {string} [message]
|
|
69
|
-
* @param {...any} args
|
|
70
|
-
*/
|
|
71
|
-
warn(message?: string, ...args: any[]): void;
|
|
72
|
-
/**
|
|
73
|
-
* An "error" message
|
|
74
|
-
* @param {string} [message]
|
|
75
|
-
* @param {...any} args
|
|
76
|
-
*/
|
|
77
|
-
error(message?: string, ...args: any[]): void;
|
|
78
|
-
#private;
|
|
45
|
+
json(value: JsonValue): void;
|
|
46
|
+
/** General logging function. */
|
|
47
|
+
log(message?: string, ...args: unknown[]): void;
|
|
48
|
+
/** A "success" message */
|
|
49
|
+
ok(message?: string, ...args: unknown[]): void;
|
|
50
|
+
/** Alias for {@linkcode CliConsole.log} */
|
|
51
|
+
debug(message?: string, ...args: unknown[]): void;
|
|
52
|
+
/** Wraps {@link console.dir} */
|
|
53
|
+
dump(item: unknown, opts?: InspectOptions): void;
|
|
54
|
+
/** An "info" message */
|
|
55
|
+
info(message?: string, ...args: unknown[]): void;
|
|
56
|
+
/** A "warning" message */
|
|
57
|
+
warn(message?: string, ...args: unknown[]): void;
|
|
58
|
+
/** An "error" message */
|
|
59
|
+
error(message?: string, ...args: unknown[]): void;
|
|
79
60
|
}
|
|
80
|
-
|
|
81
|
-
* Options for {@linkcode CliConsole}.
|
|
82
|
-
*
|
|
83
|
-
* @typedef ConsoleOpts
|
|
84
|
-
* @property {boolean} [jsonMode] - If _truthy_, suppress all output except JSON (use {@linkcode CliConsole#json}), which writes to `STDOUT`.
|
|
85
|
-
* @property {boolean} [useSymbols] - If _falsy_, do not use fancy symbols.
|
|
86
|
-
* @property {boolean} [useColor] - If _falsy_, do not use color output. If _truthy_, forces color output. By default, checks terminal/TTY for support via pkg `supports-color`. Ignored if `useSymbols` is `false`.
|
|
87
|
-
* @see https://npm.im/supports-color
|
|
88
|
-
*/
|
|
89
|
-
export const console: CliConsole;
|
|
61
|
+
export declare const console: CliConsole;
|
|
90
62
|
export { symbols };
|
|
91
|
-
/**
|
|
92
|
-
* Options for {@linkcode CliConsole}.
|
|
93
|
-
*/
|
|
94
|
-
export type ConsoleOpts = {
|
|
95
|
-
/**
|
|
96
|
-
* - If _truthy_, suppress all output except JSON (use {@linkcode CliConsole#json}), which writes to `STDOUT`.
|
|
97
|
-
*/
|
|
98
|
-
jsonMode?: boolean | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* - If _falsy_, do not use fancy symbols.
|
|
101
|
-
*/
|
|
102
|
-
useSymbols?: boolean | undefined;
|
|
103
|
-
/**
|
|
104
|
-
* - If _falsy_, do not use color output. If _truthy_, forces color output. By default, checks terminal/TTY for support via pkg `supports-color`. Ignored if `useSymbols` is `false`.
|
|
105
|
-
*/
|
|
106
|
-
useColor?: boolean | undefined;
|
|
107
|
-
};
|
|
108
|
-
import symbols from 'log-symbols';
|
|
109
63
|
//# sourceMappingURL=console.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../lib/console.
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../lib/console.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,gBAAgB,CAAC;AACxB,OAAO,OAAO,MAAM,aAAa,CAAC;AAElC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,WAAW,CAAC;AAEzC,uDAAuD;AACvD,KAAK,SAAS,GAAG,MAAM,OAAO,OAAO,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,gHAAgH;IAChH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uLAAuL;IACvL,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiBD;;;;;;;;GAQG;AACH,qBAAa,UAAU;;IAKrB,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,KAAK,CAAC,CAK3D;gBAEU,IAAI,GAAE,WAAgB;IAUlC;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS;IAczE;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAI5B,gCAAgC;IAChC,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI/C,0BAA0B;IAC1B,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI9C,2CAA2C;IAC3C,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIjD,gCAAgC;IAChC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI;IAIhD,wBAAwB;IACxB,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIhD,0BAA0B;IAC1B,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIhD,yBAAyB;IACzB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;CAGlD;AAED,eAAO,MAAM,OAAO,YAAmB,CAAC;AACxC,OAAO,EAAC,OAAO,EAAC,CAAC"}
|
package/build/lib/console.js
CHANGED
|
@@ -15,7 +15,7 @@ const node_stream_1 = require("node:stream");
|
|
|
15
15
|
* Stream to nowhere. Used when we want to disable any output other than JSON output.
|
|
16
16
|
*/
|
|
17
17
|
class NullWritable extends node_stream_1.Writable {
|
|
18
|
-
|
|
18
|
+
/* eslint-disable promise/prefer-await-to-callbacks -- Node stream callback API */
|
|
19
19
|
_write(chunk, encoding, callback) {
|
|
20
20
|
setImmediate(callback);
|
|
21
21
|
}
|
|
@@ -25,40 +25,22 @@ class NullWritable extends node_stream_1.Writable {
|
|
|
25
25
|
*
|
|
26
26
|
* - By default, uses some fancy symbols
|
|
27
27
|
* - Writes to `STDERR`, generally.
|
|
28
|
-
* - In "JSON mode", `STDERR` is squelched. Use {@linkcode
|
|
28
|
+
* - In "JSON mode", `STDERR` is squelched. Use {@linkcode CliConsole.json} to write the JSON.
|
|
29
29
|
*
|
|
30
30
|
* DO NOT extend this to do anything other than what it already does. Download a library or something.
|
|
31
31
|
*/
|
|
32
32
|
class CliConsole {
|
|
33
|
-
/**
|
|
34
|
-
* Internal console
|
|
35
|
-
* @type {globalThis.Console}
|
|
36
|
-
*/
|
|
37
33
|
#console;
|
|
38
|
-
/**
|
|
39
|
-
* Whether or not to use fancy symbols when logging.
|
|
40
|
-
* @type {boolean}
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
34
|
#useSymbols;
|
|
44
|
-
/**
|
|
45
|
-
* Whether or not to use color.
|
|
46
|
-
*/
|
|
47
35
|
#useColor;
|
|
48
|
-
/**
|
|
49
|
-
* @type {Record<keyof typeof symbols,keyof Extract<import('@colors/colors').Color, 'string'>>}
|
|
50
|
-
*/
|
|
51
36
|
static symbolToColor = {
|
|
52
37
|
success: 'green',
|
|
53
38
|
info: 'cyan',
|
|
54
39
|
warning: 'yellow',
|
|
55
40
|
error: 'red',
|
|
56
41
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
* @param {ConsoleOpts} opts
|
|
60
|
-
*/
|
|
61
|
-
constructor({ jsonMode = false, useSymbols = true, useColor } = {}) {
|
|
42
|
+
constructor(opts = {}) {
|
|
43
|
+
const { jsonMode = false, useSymbols = true, useColor } = opts;
|
|
62
44
|
this.#console = new node_console_1.Console(process.stdout, jsonMode ? new NullWritable() : process.stderr);
|
|
63
45
|
this.#useSymbols = Boolean(useSymbols);
|
|
64
46
|
this.#useColor = Boolean(useColor ?? (0, supports_color_1.createSupportsColor)(process.stderr));
|
|
@@ -67,98 +49,56 @@ class CliConsole {
|
|
|
67
49
|
* Wraps a message string in breathtaking fanciness
|
|
68
50
|
*
|
|
69
51
|
* Returns `undefined` if `msg` is `undefined`.
|
|
70
|
-
* @param {string} [msg] - Message to decorate, if anything
|
|
71
|
-
* @param {keyof typeof CliConsole['symbolToColor']} [symbol] - Symbol to use
|
|
72
|
-
* @returns {string|undefined}
|
|
73
52
|
*/
|
|
74
53
|
decorate(msg, symbol) {
|
|
75
|
-
if (lodash_1.default.isString(msg)) {
|
|
76
|
-
|
|
77
|
-
if (lodash_1.default.isString(symbol) && this.#useSymbols) {
|
|
78
|
-
newMsg = `${log_symbols_1.default[symbol]} ${newMsg}`;
|
|
79
|
-
if (this.#useColor) {
|
|
80
|
-
newMsg = newMsg[CliConsole.symbolToColor[symbol]];
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return newMsg;
|
|
54
|
+
if (!lodash_1.default.isString(msg) || !lodash_1.default.isString(symbol) || !this.#useSymbols) {
|
|
55
|
+
return msg;
|
|
84
56
|
}
|
|
85
|
-
|
|
57
|
+
let newMsg = `${log_symbols_1.default[symbol]} ${msg}`;
|
|
58
|
+
if (this.#useColor) {
|
|
59
|
+
const color = CliConsole.symbolToColor[symbol];
|
|
60
|
+
// @colors/colors extends String with color getters (e.g. .green, .red)
|
|
61
|
+
newMsg = newMsg[color] ?? newMsg;
|
|
62
|
+
}
|
|
63
|
+
return newMsg;
|
|
86
64
|
}
|
|
87
65
|
/**
|
|
88
66
|
* Writes to `STDOUT`. Must be stringifyable.
|
|
89
67
|
*
|
|
90
68
|
* You probably don't want to call this more than once before exiting (since that will output invalid JSON).
|
|
91
|
-
* @param {import('type-fest').JsonValue} value
|
|
92
69
|
*/
|
|
93
70
|
json(value) {
|
|
94
71
|
this.#console.log(JSON.stringify(value));
|
|
95
72
|
}
|
|
96
|
-
/**
|
|
97
|
-
* General logging function.
|
|
98
|
-
* @param {string} [message]
|
|
99
|
-
* @param {...any} args
|
|
100
|
-
*/
|
|
73
|
+
/** General logging function. */
|
|
101
74
|
log(message, ...args) {
|
|
102
75
|
this.#console.error(message, ...args);
|
|
103
76
|
}
|
|
104
|
-
/**
|
|
105
|
-
* A "success" message
|
|
106
|
-
* @param {string} [message]
|
|
107
|
-
* @param {...any} args
|
|
108
|
-
*/
|
|
77
|
+
/** A "success" message */
|
|
109
78
|
ok(message, ...args) {
|
|
110
79
|
this.#console.error(this.decorate(message, 'success'), ...args);
|
|
111
80
|
}
|
|
112
|
-
/**
|
|
113
|
-
* Alias for {@linkcode Console.log}
|
|
114
|
-
* @param {string} [message]
|
|
115
|
-
* @param {...any} args
|
|
116
|
-
*/
|
|
81
|
+
/** Alias for {@linkcode CliConsole.log} */
|
|
117
82
|
debug(message, ...args) {
|
|
118
83
|
this.log(message, ...args);
|
|
119
84
|
}
|
|
120
|
-
/**
|
|
121
|
-
* Wraps {@link console.dir}
|
|
122
|
-
* @param {any} item
|
|
123
|
-
* @param {import('util').InspectOptions} [opts]
|
|
124
|
-
*/
|
|
85
|
+
/** Wraps {@link console.dir} */
|
|
125
86
|
dump(item, opts) {
|
|
126
87
|
this.#console.dir(item, opts);
|
|
127
88
|
}
|
|
128
|
-
/**
|
|
129
|
-
* An "info" message
|
|
130
|
-
* @param {string} [message]
|
|
131
|
-
* @param {...any} args
|
|
132
|
-
*/
|
|
89
|
+
/** An "info" message */
|
|
133
90
|
info(message, ...args) {
|
|
134
91
|
this.log(this.decorate(message, 'info'), ...args);
|
|
135
92
|
}
|
|
136
|
-
/**
|
|
137
|
-
* A "warning" message
|
|
138
|
-
* @param {string} [message]
|
|
139
|
-
* @param {...any} args
|
|
140
|
-
*/
|
|
93
|
+
/** A "warning" message */
|
|
141
94
|
warn(message, ...args) {
|
|
142
95
|
this.log(this.decorate(message, 'warning'), ...args);
|
|
143
96
|
}
|
|
144
|
-
/**
|
|
145
|
-
* An "error" message
|
|
146
|
-
* @param {string} [message]
|
|
147
|
-
* @param {...any} args
|
|
148
|
-
*/
|
|
97
|
+
/** An "error" message */
|
|
149
98
|
error(message, ...args) {
|
|
150
99
|
this.log(this.decorate(message, 'error'), ...args);
|
|
151
100
|
}
|
|
152
101
|
}
|
|
153
102
|
exports.CliConsole = CliConsole;
|
|
154
|
-
/**
|
|
155
|
-
* Options for {@linkcode CliConsole}.
|
|
156
|
-
*
|
|
157
|
-
* @typedef ConsoleOpts
|
|
158
|
-
* @property {boolean} [jsonMode] - If _truthy_, suppress all output except JSON (use {@linkcode CliConsole#json}), which writes to `STDOUT`.
|
|
159
|
-
* @property {boolean} [useSymbols] - If _falsy_, do not use fancy symbols.
|
|
160
|
-
* @property {boolean} [useColor] - If _falsy_, do not use color output. If _truthy_, forces color output. By default, checks terminal/TTY for support via pkg `supports-color`. Ignored if `useSymbols` is `false`.
|
|
161
|
-
* @see https://npm.im/supports-color
|
|
162
|
-
*/
|
|
163
103
|
exports.console = new CliConsole();
|
|
164
104
|
//# sourceMappingURL=console.js.map
|
package/build/lib/console.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.js","sourceRoot":"","sources":["../../lib/console.
|
|
1
|
+
{"version":3,"file":"console.js","sourceRoot":"","sources":["../../lib/console.ts"],"names":[],"mappings":"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"}
|
package/build/lib/doctor.d.ts
CHANGED
|
@@ -1,36 +1,24 @@
|
|
|
1
|
+
import type { DoctorCheckResult } from '@appium/types';
|
|
1
2
|
/**
|
|
2
3
|
* A shortcut for a successful required doctor check
|
|
3
|
-
*
|
|
4
|
-
* @param {string} message
|
|
5
|
-
* @returns {DoctorCheckResult}
|
|
6
4
|
*/
|
|
7
|
-
export function ok(message: string): DoctorCheckResult;
|
|
5
|
+
export declare function ok(message: string): DoctorCheckResult;
|
|
8
6
|
/**
|
|
9
7
|
* A shortcut for an unsuccessful required doctor check
|
|
10
|
-
*
|
|
11
|
-
* @param {string} message
|
|
12
|
-
* @returns {DoctorCheckResult}
|
|
13
8
|
*/
|
|
14
|
-
export function nok(message: string): DoctorCheckResult;
|
|
9
|
+
export declare function nok(message: string): DoctorCheckResult;
|
|
15
10
|
/**
|
|
16
11
|
* A shortcut for a successful optional doctor check
|
|
17
|
-
*
|
|
18
|
-
* @param {string} message
|
|
19
|
-
* @returns {DoctorCheckResult}
|
|
20
12
|
*/
|
|
21
|
-
export function okOptional(message: string): DoctorCheckResult;
|
|
13
|
+
export declare function okOptional(message: string): DoctorCheckResult;
|
|
22
14
|
/**
|
|
23
15
|
* A shortcut for an unsuccessful optional doctor check
|
|
24
|
-
*
|
|
25
|
-
* @param {string} message
|
|
26
|
-
* @returns {DoctorCheckResult}
|
|
27
16
|
*/
|
|
28
|
-
export function nokOptional(message: string): DoctorCheckResult;
|
|
17
|
+
export declare function nokOptional(message: string): DoctorCheckResult;
|
|
29
18
|
/**
|
|
30
19
|
* Throw this exception in the fix() method
|
|
31
20
|
* of your doctor check to skip the actual fix if hasAutofix() is true
|
|
32
21
|
*/
|
|
33
|
-
export class FixSkippedError extends Error {
|
|
22
|
+
export declare class FixSkippedError extends Error {
|
|
34
23
|
}
|
|
35
|
-
export type DoctorCheckResult = import("@appium/types").DoctorCheckResult;
|
|
36
24
|
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../lib/doctor.
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../lib/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAErD;;GAEG;AACH,wBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAErD;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAEtD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAE7D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAE9D;AAED;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,KAAK;CAAG"}
|
package/build/lib/doctor.js
CHANGED
|
@@ -7,36 +7,24 @@ exports.okOptional = okOptional;
|
|
|
7
7
|
exports.nokOptional = nokOptional;
|
|
8
8
|
/**
|
|
9
9
|
* A shortcut for a successful required doctor check
|
|
10
|
-
*
|
|
11
|
-
* @param {string} message
|
|
12
|
-
* @returns {DoctorCheckResult}
|
|
13
10
|
*/
|
|
14
11
|
function ok(message) {
|
|
15
12
|
return { ok: true, optional: false, message };
|
|
16
13
|
}
|
|
17
14
|
/**
|
|
18
15
|
* A shortcut for an unsuccessful required doctor check
|
|
19
|
-
*
|
|
20
|
-
* @param {string} message
|
|
21
|
-
* @returns {DoctorCheckResult}
|
|
22
16
|
*/
|
|
23
17
|
function nok(message) {
|
|
24
18
|
return { ok: false, optional: false, message };
|
|
25
19
|
}
|
|
26
20
|
/**
|
|
27
21
|
* A shortcut for a successful optional doctor check
|
|
28
|
-
*
|
|
29
|
-
* @param {string} message
|
|
30
|
-
* @returns {DoctorCheckResult}
|
|
31
22
|
*/
|
|
32
23
|
function okOptional(message) {
|
|
33
24
|
return { ok: true, optional: true, message };
|
|
34
25
|
}
|
|
35
26
|
/**
|
|
36
27
|
* A shortcut for an unsuccessful optional doctor check
|
|
37
|
-
*
|
|
38
|
-
* @param {string} message
|
|
39
|
-
* @returns {DoctorCheckResult}
|
|
40
28
|
*/
|
|
41
29
|
function nokOptional(message) {
|
|
42
30
|
return { ok: false, optional: true, message };
|
|
@@ -48,7 +36,4 @@ function nokOptional(message) {
|
|
|
48
36
|
class FixSkippedError extends Error {
|
|
49
37
|
}
|
|
50
38
|
exports.FixSkippedError = FixSkippedError;
|
|
51
|
-
/**
|
|
52
|
-
* @typedef {import('@appium/types').DoctorCheckResult} DoctorCheckResult
|
|
53
|
-
*/
|
|
54
39
|
//# sourceMappingURL=doctor.js.map
|
package/build/lib/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../lib/doctor.
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../lib/doctor.ts"],"names":[],"mappings":";;;AAKA,gBAEC;AAKD,kBAEC;AAKD,gCAEC;AAKD,kCAEC;AA1BD;;GAEG;AACH,SAAgB,EAAE,CAAC,OAAe;IAChC,OAAO,EAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,SAAgB,GAAG,CAAC,OAAe;IACjC,OAAO,EAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAC,CAAC;AAC/C,CAAC;AAED;;GAEG;AACH,SAAgB,UAAU,CAAC,OAAe;IACxC,OAAO,EAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,SAAgB,WAAW,CAAC,OAAe;IACzC,OAAO,EAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC;AAC9C,CAAC;AAED;;;GAGG;AACH,MAAa,eAAgB,SAAQ,KAAK;CAAG;AAA7C,0CAA6C"}
|