appium 2.10.2 → 2.11.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/appium.d.ts +28 -32
- package/build/lib/appium.d.ts.map +1 -1
- package/build/lib/cli/args.d.ts +3 -3
- package/build/lib/cli/args.d.ts.map +1 -1
- package/build/lib/cli/args.js +2 -2
- package/build/lib/cli/args.js.map +1 -1
- package/build/lib/cli/driver-command.d.ts +13 -13
- package/build/lib/cli/driver-command.d.ts.map +1 -1
- package/build/lib/cli/extension-command.d.ts +39 -39
- package/build/lib/cli/extension-command.d.ts.map +1 -1
- package/build/lib/cli/extension-command.js +11 -2
- package/build/lib/cli/extension-command.js.map +1 -1
- package/build/lib/cli/extension.d.ts +5 -5
- package/build/lib/cli/extension.d.ts.map +1 -1
- package/build/lib/cli/extension.js +2 -2
- package/build/lib/cli/extension.js.map +1 -1
- package/build/lib/cli/parser.d.ts +7 -7
- package/build/lib/cli/parser.d.ts.map +1 -1
- package/build/lib/cli/parser.js +2 -2
- package/build/lib/cli/parser.js.map +1 -1
- package/build/lib/cli/plugin-command.d.ts +12 -12
- package/build/lib/cli/plugin-command.d.ts.map +1 -1
- package/build/lib/cli/setup-command.d.ts +7 -7
- package/build/lib/cli/setup-command.d.ts.map +1 -1
- package/build/lib/cli/setup-command.js +4 -4
- package/build/lib/cli/setup-command.js.map +1 -1
- package/build/lib/cli/utils.js +4 -4
- package/build/lib/cli/utils.js.map +1 -1
- package/build/lib/config-file.d.ts +8 -8
- package/build/lib/config-file.d.ts.map +1 -1
- package/build/lib/config-file.js +3 -4
- package/build/lib/config-file.js.map +1 -1
- package/build/lib/config.d.ts +6 -6
- package/build/lib/config.d.ts.map +1 -1
- package/build/lib/config.js +10 -10
- package/build/lib/config.js.map +1 -1
- package/build/lib/doctor/doctor.d.ts +3 -9
- package/build/lib/doctor/doctor.d.ts.map +1 -1
- package/build/lib/extension/driver-config.d.ts +13 -13
- package/build/lib/extension/driver-config.d.ts.map +1 -1
- package/build/lib/extension/extension-config.d.ts +18 -18
- package/build/lib/extension/extension-config.d.ts.map +1 -1
- package/build/lib/extension/index.d.ts +8 -8
- package/build/lib/extension/index.d.ts.map +1 -1
- package/build/lib/extension/index.js +3 -4
- package/build/lib/extension/index.js.map +1 -1
- package/build/lib/extension/manifest-migrations.d.ts +9 -9
- package/build/lib/extension/manifest-migrations.d.ts.map +1 -1
- package/build/lib/extension/manifest-migrations.js +1 -2
- package/build/lib/extension/manifest-migrations.js.map +1 -1
- package/build/lib/extension/manifest.d.ts +12 -12
- package/build/lib/extension/manifest.d.ts.map +1 -1
- package/build/lib/extension/package-changed.d.ts.map +1 -1
- package/build/lib/extension/package-changed.js +1 -2
- package/build/lib/extension/package-changed.js.map +1 -1
- package/build/lib/extension/plugin-config.d.ts +4 -4
- package/build/lib/logsink.d.ts +3 -3
- package/build/lib/logsink.d.ts.map +1 -1
- package/build/lib/logsink.js +19 -14
- package/build/lib/logsink.js.map +1 -1
- package/build/lib/main.d.ts +20 -20
- package/build/lib/main.d.ts.map +1 -1
- package/build/lib/main.js +9 -5
- package/build/lib/main.js.map +1 -1
- package/build/lib/schema/arg-spec.d.ts +2 -2
- package/build/lib/schema/arg-spec.d.ts.map +1 -1
- package/build/lib/schema/cli-args.d.ts +3 -3
- package/build/lib/schema/cli-args.d.ts.map +1 -1
- package/build/lib/schema/cli-args.js +1 -2
- package/build/lib/schema/cli-args.js.map +1 -1
- package/build/lib/schema/cli-transformers.d.ts +1 -1
- package/build/lib/schema/cli-transformers.d.ts.map +1 -1
- package/build/lib/schema/cli-transformers.js +2 -2
- package/build/lib/schema/cli-transformers.js.map +1 -1
- package/build/lib/schema/keywords.d.ts +2 -2
- package/build/lib/schema/keywords.d.ts.map +1 -1
- package/build/lib/schema/schema.d.ts +9 -15
- package/build/lib/schema/schema.d.ts.map +1 -1
- package/build/lib/utils.d.ts +28 -74
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +15 -15
- package/build/lib/utils.js.map +1 -1
- package/build/types/index.d.ts +0 -1
- package/build/types/index.d.ts.map +1 -1
- package/lib/cli/extension-command.js +11 -2
- package/lib/logsink.js +27 -14
- package/lib/main.js +6 -2
- package/package.json +11 -11
package/build/lib/appium.d.ts
CHANGED
|
@@ -9,29 +9,25 @@ export class NoDriverProxyCommandError extends Error {
|
|
|
9
9
|
*/
|
|
10
10
|
code: Readonly<string>;
|
|
11
11
|
}
|
|
12
|
-
export type DriverData = import(
|
|
13
|
-
export type DriverOpts = import(
|
|
14
|
-
export type Constraints = import(
|
|
15
|
-
export type AppiumServer = import(
|
|
16
|
-
export type ExtensionType = import(
|
|
17
|
-
export type DriverConfig = import(
|
|
18
|
-
export type PluginType = import(
|
|
19
|
-
export type DriverType = import(
|
|
20
|
-
export type StringRecord = import(
|
|
21
|
-
export type ExternalDriver = import(
|
|
22
|
-
export type PluginClass = import(
|
|
23
|
-
export type Plugin = import(
|
|
24
|
-
export type DriverClass = import(
|
|
25
|
-
export type AppiumSessionHandler = import(
|
|
26
|
-
export type SessionHandlerCreateResult = SessionHandlerResult<[
|
|
27
|
-
|
|
28
|
-
caps: import('@appium/types').DriverCaps<Constraints>,
|
|
29
|
-
protocol: string | undefined
|
|
30
|
-
]>;
|
|
31
|
-
export type Core<C extends import("@appium/types").Constraints> = import('@appium/types').Core<C>;
|
|
12
|
+
export type DriverData = import("@appium/types").DriverData;
|
|
13
|
+
export type DriverOpts = import("@appium/types").ServerArgs;
|
|
14
|
+
export type Constraints = import("@appium/types").Constraints;
|
|
15
|
+
export type AppiumServer = import("@appium/types").AppiumServer;
|
|
16
|
+
export type ExtensionType = import("@appium/types").ExtensionType;
|
|
17
|
+
export type DriverConfig = import("./extension/driver-config").DriverConfig;
|
|
18
|
+
export type PluginType = import("@appium/types").PluginType;
|
|
19
|
+
export type DriverType = import("@appium/types").DriverType;
|
|
20
|
+
export type StringRecord = import("@appium/types").StringRecord;
|
|
21
|
+
export type ExternalDriver = import("@appium/types").ExternalDriver;
|
|
22
|
+
export type PluginClass = import("@appium/types").PluginClass;
|
|
23
|
+
export type Plugin = import("@appium/types").Plugin;
|
|
24
|
+
export type DriverClass = import("@appium/types").DriverClass<import("@appium/types").Driver>;
|
|
25
|
+
export type AppiumSessionHandler = import("@appium/types").ISessionHandler<AppiumDriverConstraints, SessionHandlerCreateResult, SessionHandlerDeleteResult>;
|
|
26
|
+
export type SessionHandlerCreateResult = SessionHandlerResult<[innerSessionId: string, caps: import("@appium/types").DriverCaps<Constraints>, protocol: string | undefined]>;
|
|
27
|
+
export type Core<C extends Constraints> = import("@appium/types").Core<C>;
|
|
32
28
|
export type SessionHandlerDeleteResult = SessionHandlerResult<void>;
|
|
33
29
|
/**
|
|
34
|
-
* Used by {@linkcode AppiumDriver.createSession
|
|
30
|
+
* Used by {@linkcode AppiumDriver.createSession} and {@linkcode AppiumDriver.deleteSession} to describe
|
|
35
31
|
* result.
|
|
36
32
|
*/
|
|
37
33
|
export type SessionHandlerResult<V> = {
|
|
@@ -40,7 +36,7 @@ export type SessionHandlerResult<V> = {
|
|
|
40
36
|
protocol?: string | undefined;
|
|
41
37
|
};
|
|
42
38
|
export type AppiumDriverConstraints = typeof desiredCapabilityConstraints;
|
|
43
|
-
export type W3CAppiumDriverCaps = import(
|
|
39
|
+
export type W3CAppiumDriverCaps = import("@appium/types").W3CDriverCaps<AppiumDriverConstraints>;
|
|
44
40
|
/**
|
|
45
41
|
* @extends {DriverCore<AppiumDriverConstraints>}
|
|
46
42
|
*/
|
|
@@ -57,7 +53,7 @@ export class AppiumDriver extends DriverCore<{
|
|
|
57
53
|
/**
|
|
58
54
|
* @param {import('@appium/types').DriverOpts<AppiumDriverConstraints>} opts
|
|
59
55
|
*/
|
|
60
|
-
constructor(opts: import(
|
|
56
|
+
constructor(opts: import("@appium/types").DriverOpts<AppiumDriverConstraints>);
|
|
61
57
|
/**
|
|
62
58
|
* Access to sessions list must be guarded with a Semaphore, because
|
|
63
59
|
* it might be changed by other async calls at any time
|
|
@@ -92,16 +88,16 @@ export class AppiumDriver extends DriverCore<{
|
|
|
92
88
|
/** @type {AppiumServer} */
|
|
93
89
|
server: AppiumServer;
|
|
94
90
|
/** @type {Record<string, import('ws').WebSocket[]>} */
|
|
95
|
-
bidiSockets: Record<string, import(
|
|
91
|
+
bidiSockets: Record<string, import("ws").WebSocket[]>;
|
|
96
92
|
/** @type {Record<string, import('ws').WebSocket>} */
|
|
97
|
-
bidiProxyClients: Record<string, import(
|
|
93
|
+
bidiProxyClients: Record<string, import("ws").WebSocket>;
|
|
98
94
|
/**
|
|
99
95
|
* @type {AppiumDriverConstraints}
|
|
100
96
|
* @readonly
|
|
101
97
|
*/
|
|
102
98
|
readonly desiredCapConstraints: AppiumDriverConstraints;
|
|
103
99
|
/** @type {import('@appium/types').DriverOpts<AppiumDriverConstraints>} */
|
|
104
|
-
args: import(
|
|
100
|
+
args: import("@appium/types").DriverOpts<AppiumDriverConstraints>;
|
|
105
101
|
_isShuttingDown: boolean;
|
|
106
102
|
sessionExists(sessionId: any): boolean;
|
|
107
103
|
driverForSession(sessionId: any): import("@appium/types").ExternalDriver<import("@appium/types").Constraints, string, import("@appium/types").StringRecord, import("@appium/types").StringRecord, import("@appium/types").DefaultCreateSessionResult<import("@appium/types").Constraints>, void, import("@appium/types").StringRecord>;
|
|
@@ -140,13 +136,13 @@ export class AppiumDriver extends DriverCore<{
|
|
|
140
136
|
* @param {import('ws').WebSocket} ws The websocket connection object
|
|
141
137
|
* @param {import('http').IncomingMessage} req The connection pathname, which might include the session id
|
|
142
138
|
*/
|
|
143
|
-
onBidiConnection(ws: import(
|
|
139
|
+
onBidiConnection(ws: import("ws").WebSocket, req: import("http").IncomingMessage): void;
|
|
144
140
|
/**
|
|
145
141
|
* Initialize a new bidi connection
|
|
146
142
|
* @param {import('ws').WebSocket} ws The websocket connection object
|
|
147
143
|
* @param {import('http').IncomingMessage} req The connection pathname, which might include the session id
|
|
148
144
|
*/
|
|
149
|
-
initBidiSocket(ws: import(
|
|
145
|
+
initBidiSocket(ws: import("ws").WebSocket, req: import("http").IncomingMessage): {
|
|
150
146
|
bidiHandlerDriver: AppiumDriver | import("@appium/types").ExternalDriver<import("@appium/types").Constraints, string, import("@appium/types").StringRecord, import("@appium/types").StringRecord, import("@appium/types").DefaultCreateSessionResult<import("@appium/types").Constraints>, void, import("@appium/types").StringRecord>;
|
|
151
147
|
proxyClient: WebSocket.WebSocket | null;
|
|
152
148
|
send: (data: string | Buffer) => Promise<void>;
|
|
@@ -162,7 +158,7 @@ export class AppiumDriver extends DriverCore<{
|
|
|
162
158
|
* @param {(data: string | Buffer) => Promise<void>} send - a method used to send data to the
|
|
163
159
|
* client
|
|
164
160
|
*/
|
|
165
|
-
initBidiProxyHandlers(proxyClient: import(
|
|
161
|
+
initBidiProxyHandlers(proxyClient: import("ws").WebSocket | null, ws: import("ws").WebSocket, send: (data: string | Buffer) => Promise<void>): void;
|
|
166
162
|
/**
|
|
167
163
|
* Set up handlers on the bidi socket connection to the client
|
|
168
164
|
*
|
|
@@ -177,7 +173,7 @@ export class AppiumDriver extends DriverCore<{
|
|
|
177
173
|
* handling the bidi commands
|
|
178
174
|
* @param {(err: Error) => void} logSocketErr - a special prefixed logger
|
|
179
175
|
*/
|
|
180
|
-
initBidiSocketHandlers(ws: import(
|
|
176
|
+
initBidiSocketHandlers(ws: import("ws").WebSocket, proxyClient: import("ws").WebSocket | null, send: (data: string | Buffer) => Promise<void>, sendToProxy: ((data: string | Buffer) => Promise<void>) | null, bidiHandlerDriver: import("@appium/types").ExternalDriver | AppiumDriver, logSocketErr: (err: Error) => void): void;
|
|
181
177
|
/**
|
|
182
178
|
* Set up bidi event listeners
|
|
183
179
|
*
|
|
@@ -187,7 +183,7 @@ export class AppiumDriver extends DriverCore<{
|
|
|
187
183
|
* @param {(data: string | Buffer) => Promise<void>} send - a method used to send data to the
|
|
188
184
|
* client
|
|
189
185
|
*/
|
|
190
|
-
initBidiEventListeners(ws: import(
|
|
186
|
+
initBidiEventListeners(ws: import("ws").WebSocket, bidiHandlerDriver: import("@appium/types").ExternalDriver | AppiumDriver, send: (data: string | Buffer) => Promise<void>): void;
|
|
191
187
|
/**
|
|
192
188
|
* @param {Buffer} data
|
|
193
189
|
* @param {ExternalDriver | AppiumDriver} driver
|
|
@@ -270,7 +266,7 @@ export class AppiumDriver extends DriverCore<{
|
|
|
270
266
|
value: any;
|
|
271
267
|
error?: Error;
|
|
272
268
|
protocol: string;
|
|
273
|
-
} | import(
|
|
269
|
+
} | import("type-fest").AsyncReturnType<ExternalDriver["executeCommand"]>>;
|
|
274
270
|
wrapCommandWithPlugins({ driver, cmd, args, next, cmdHandledBy, plugins }: {
|
|
275
271
|
driver: any;
|
|
276
272
|
cmd: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appium.d.ts","sourceRoot":"","sources":["../../lib/appium.js"],"names":[],"mappings":"AAyvCA;;;GAGG;AACH;IAME,cAOC;IAZD;;OAEG;IACH,MAFU,
|
|
1
|
+
{"version":3,"file":"appium.d.ts","sourceRoot":"","sources":["../../lib/appium.js"],"names":[],"mappings":"AAyvCA;;;GAGG;AACH;IAME,cAOC;IAZD;;OAEG;IACH,MAFU,QAAQ,CAAC,MAAM,CAAC,CAEgB;CAU3C;yBAKY,OAAO,eAAe,EAAE,UAAU;yBAClC,OAAO,eAAe,EAAE,UAAU;0BAClC,OAAO,eAAe,EAAE,WAAW;2BACnC,OAAO,eAAe,EAAE,YAAY;4BACpC,OAAO,eAAe,EAAE,aAAa;2BACrC,OAAO,2BAA2B,EAAE,YAAY;yBAChD,OAAO,eAAe,EAAE,UAAU;yBAClC,OAAO,eAAe,EAAE,UAAU;2BAClC,OAAO,eAAe,EAAE,YAAY;6BACpC,OAAO,eAAe,EAAE,cAAc;0BACtC,OAAO,eAAe,EAAE,WAAW;qBACnC,OAAO,eAAe,EAAE,MAAM;0BAC9B,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,MAAM,CAAC;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
|
|
1
|
-
export type ExtensionType = import(
|
|
1
|
+
export type ExtensionType = import("@appium/types").ExtensionType;
|
|
2
2
|
/**
|
|
3
3
|
* A tuple of argument aliases and argument options
|
|
4
4
|
*/
|
|
5
|
-
export type ArgumentDefinitions = Map<[name: string] | [name: string, alias: string], import(
|
|
5
|
+
export type ArgumentDefinitions = Map<[name: string] | [name: string, alias: string], import("argparse").ArgumentOptions>;
|
|
6
6
|
/**
|
|
7
7
|
* Derives the options for the `server` command from the schema, and adds the arguments
|
|
8
8
|
* which are disallowed in the config file.
|
|
@@ -12,6 +12,6 @@ export function getServerArgs(): ArgumentDefinitions;
|
|
|
12
12
|
/**
|
|
13
13
|
* Builds a Record of extension types to a Record of subcommands to their argument definitions
|
|
14
14
|
*/
|
|
15
|
-
export const getExtensionArgs: (() => Record<
|
|
15
|
+
export const getExtensionArgs: (() => Record<ExtensionType, Record<import("appium/types").CliExtensionSubcommand, ArgumentDefinitions>>) & _.MemoizedFunction;
|
|
16
16
|
import _ from 'lodash';
|
|
17
17
|
//# sourceMappingURL=args.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../lib/cli/args.js"],"names":[],"mappings":"4BAsUa,OAAO,eAAe,EAAE,aAAa;;;;kCAKrC,
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../lib/cli/args.js"],"names":[],"mappings":"4BAsUa,OAAO,eAAe,EAAE,aAAa;;;;kCAKrC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,GAAC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,EAAC,OAAO,UAAU,EAAE,eAAe,CAAC;AAzEjG;;;;GAIG;AACH,iCAFa,mBAAmB,CAI/B;AAjOD;;GAEG;AACH,sCAYoB,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,OAAO,cAAc,EAAE,sBAAsB,EAAC,mBAAmB,CAAC,CAAC,uBAGjH;cA1DW,QAAQ"}
|
package/build/lib/cli/args.js
CHANGED
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getExtensionArgs =
|
|
6
|
+
exports.getExtensionArgs = void 0;
|
|
7
|
+
exports.getServerArgs = getServerArgs;
|
|
7
8
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
9
|
const constants_1 = require("../constants");
|
|
9
10
|
const extension_config_1 = require("../extension/extension-config");
|
|
@@ -240,7 +241,6 @@ function makeRunArgs(type) {
|
|
|
240
241
|
function getServerArgs() {
|
|
241
242
|
return new Map([...(0, cli_args_1.toParserArgs)(), ...serverArgsDisallowedInConfig]);
|
|
242
243
|
}
|
|
243
|
-
exports.getServerArgs = getServerArgs;
|
|
244
244
|
/**
|
|
245
245
|
* These don't make sense in the context of a config file for obvious reasons.
|
|
246
246
|
* @type {ArgumentDefinitions}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../../lib/cli/args.js"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../../lib/cli/args.js"],"names":[],"mappings":";;;;;;AAmUQ,sCAAa;AAnUrB,oDAAuB;AACvB,4CASsB;AACtB,oEAA4D;AAC5D,iDAAgD;AAChD,MAAM,cAAc,GAAG,UAAU,CAAC;AAClC,MAAM,cAAc,GAAG,eAAe,CAAC;AAEvC;;;GAGG;AACH,MAAM,mBAAmB,GAAG,CAAC,GAAG,gCAAa,CAAC,CAAC;AAE/C,iCAAiC;AACjC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,uBAAW,EAAE,uBAAW,CAAC,CAAC,CAAC;AAE5D,qEAAqE;AACrE,kCAAkC;AAClC,MAAM,mBAAmB,G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AAIH;;GAEG;AAEH;;;GAGG"}
|
|
@@ -5,7 +5,7 @@ export default class DriverCliCommand extends ExtensionCliCommand<"driver"> {
|
|
|
5
5
|
/**
|
|
6
6
|
* @param {import('./extension-command').ExtensionCommandOptions<DriverType>} opts
|
|
7
7
|
*/
|
|
8
|
-
constructor({ config, json }: import(
|
|
8
|
+
constructor({ config, json }: import("./extension-command").ExtensionCommandOptions<DriverType>);
|
|
9
9
|
/**
|
|
10
10
|
* Install a driver
|
|
11
11
|
*
|
|
@@ -26,13 +26,13 @@ export default class DriverCliCommand extends ExtensionCliCommand<"driver"> {
|
|
|
26
26
|
* @param {DriverUpdateOpts} opts
|
|
27
27
|
* @return {Promise<import('./extension-command').ExtensionUpdateResult>}
|
|
28
28
|
*/
|
|
29
|
-
update({ driver, unsafe }: DriverUpdateOpts): Promise<import(
|
|
29
|
+
update({ driver, unsafe }: DriverUpdateOpts): Promise<import("./extension-command").ExtensionUpdateResult>;
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
32
|
* @param {DriverRunOptions} opts
|
|
33
33
|
* @return {Promise<import('./extension-command').RunOutput>}
|
|
34
34
|
*/
|
|
35
|
-
run({ driver, scriptName, extraArgs }: DriverRunOptions): Promise<import(
|
|
35
|
+
run({ driver, scriptName, extraArgs }: DriverRunOptions): Promise<import("./extension-command").RunOutput>;
|
|
36
36
|
/**
|
|
37
37
|
* Runs doctor checks for the given driver.
|
|
38
38
|
*
|
|
@@ -42,15 +42,15 @@ export default class DriverCliCommand extends ExtensionCliCommand<"driver"> {
|
|
|
42
42
|
*/
|
|
43
43
|
doctor({ driver }: DriverDoctorOptions): Promise<number>;
|
|
44
44
|
}
|
|
45
|
-
export type ExtensionType = import(
|
|
46
|
-
export type DriverType = import(
|
|
47
|
-
export type ExtRecord<ExtType extends
|
|
45
|
+
export type ExtensionType = import("@appium/types").ExtensionType;
|
|
46
|
+
export type DriverType = import("@appium/types").DriverType;
|
|
47
|
+
export type ExtRecord<ExtType extends ExtensionType> = import("appium/types").ExtRecord<ExtType>;
|
|
48
48
|
export type DriverCommandOptions = {
|
|
49
|
-
config: import(
|
|
49
|
+
config: import("../extension/extension-config").ExtensionConfig<DriverType>;
|
|
50
50
|
json: boolean;
|
|
51
51
|
};
|
|
52
52
|
/**
|
|
53
|
-
* Options for {@linkcode DriverCliCommand.install
|
|
53
|
+
* Options for {@linkcode DriverCliCommand.install}
|
|
54
54
|
*/
|
|
55
55
|
export type DriverInstallOpts = {
|
|
56
56
|
/**
|
|
@@ -66,9 +66,9 @@ export type DriverInstallOpts = {
|
|
|
66
66
|
*/
|
|
67
67
|
packageName?: string | undefined;
|
|
68
68
|
};
|
|
69
|
-
export type InstallType = import(
|
|
69
|
+
export type InstallType = import("appium/types").InstallType;
|
|
70
70
|
/**
|
|
71
|
-
* Options for {@linkcode DriverCliCommand.uninstall
|
|
71
|
+
* Options for {@linkcode DriverCliCommand.uninstall}
|
|
72
72
|
*/
|
|
73
73
|
export type DriverUninstallOpts = {
|
|
74
74
|
/**
|
|
@@ -77,7 +77,7 @@ export type DriverUninstallOpts = {
|
|
|
77
77
|
driver: string;
|
|
78
78
|
};
|
|
79
79
|
/**
|
|
80
|
-
* Options for {@linkcode DriverCliCommand.update
|
|
80
|
+
* Options for {@linkcode DriverCliCommand.update}
|
|
81
81
|
*/
|
|
82
82
|
export type DriverUpdateOpts = {
|
|
83
83
|
/**
|
|
@@ -90,7 +90,7 @@ export type DriverUpdateOpts = {
|
|
|
90
90
|
unsafe: boolean;
|
|
91
91
|
};
|
|
92
92
|
/**
|
|
93
|
-
* Options for {@linkcode DriverCliCommand.run
|
|
93
|
+
* Options for {@linkcode DriverCliCommand.run}.
|
|
94
94
|
*/
|
|
95
95
|
export type DriverRunOptions = {
|
|
96
96
|
/**
|
|
@@ -107,7 +107,7 @@ export type DriverRunOptions = {
|
|
|
107
107
|
extraArgs?: string[] | undefined;
|
|
108
108
|
};
|
|
109
109
|
/**
|
|
110
|
-
* Options for {@linkcode DriverCliCommand.doctor
|
|
110
|
+
* Options for {@linkcode DriverCliCommand.doctor}.
|
|
111
111
|
*/
|
|
112
112
|
export type DriverDoctorOptions = {
|
|
113
113
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver-command.d.ts","sourceRoot":"","sources":["../../../lib/cli/driver-command.js"],"names":[],"mappings":"AAOA;;GAEG;AAEH;IACE;;OAEG;IACH,8BAFW,OAAO,qBAAqB,EAAE,uBAAuB,CAAC,UAAU,CAAC,EAK3E;IAED;;;;;OAKG;IACH,8CAHW,iBAAiB,GAChB,
|
|
1
|
+
{"version":3,"file":"driver-command.d.ts","sourceRoot":"","sources":["../../../lib/cli/driver-command.js"],"names":[],"mappings":"AAOA;;GAEG;AAEH;IACE;;OAEG;IACH,8BAFW,OAAO,qBAAqB,EAAE,uBAAuB,CAAC,UAAU,CAAC,EAK3E;IAED;;;;;OAKG;IACH,8CAHW,iBAAiB,GAChB,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAQzC;IAED;;;;;OAKG;IACH,sBAHW,mBAAmB,GAClB,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAIzC;IAED;;;;;OAKG;IACH,2BAHW,gBAAgB,GACf,OAAO,CAAC,OAAO,qBAAqB,EAAE,qBAAqB,CAAC,CAIvE;IAED;;;;OAIG;IACH,uCAHW,gBAAgB,GACf,OAAO,CAAC,OAAO,qBAAqB,EAAE,SAAS,CAAC,CAS3D;IAED;;;;;;OAMG;IACH,mBAJW,mBAAmB,GACjB,OAAO,CAAC,MAAM,CAAC,CAO3B;CAqCF;4BAGY,OAAO,eAAe,EAAE,aAAa;yBACrC,OAAO,eAAe,EAAE,UAAU;sBAIlB,OAAO,SAAtB,aAAc,IACf,OAAO,cAAc,EAAE,SAAS,CAAC,OAAO,CAAC;;YAKxC,OAAO,+BAA+B,EAAE,eAAe,CAAC,UAAU,CAAC;UACnE,OAAO;;;;;;;;;YAMP,MAAM;;;;iBACN,WAAW;;;;;;0BAKZ,OAAO,cAAc,EAAE,WAAW;;;;;;;;YAMjC,MAAM;;;;;;;;;YAMN,MAAM;;;;YACN,OAAO;;;;;;;;;YAMP,MAAM;;;;gBACN,MAAM;;;;;;;;;;;;;YAON,MAAM;;gCAzKY,qBAAqB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default ExtensionCliCommand;
|
|
2
2
|
export { ExtensionCliCommand as ExtensionCommand };
|
|
3
3
|
/**
|
|
4
|
-
* Options for the {@linkcode ExtensionCliCommand
|
|
4
|
+
* Options for the {@linkcode ExtensionCliCommand} constructor
|
|
5
5
|
*/
|
|
6
|
-
export type ExtensionCommandOptions<ExtType extends
|
|
6
|
+
export type ExtensionCommandOptions<ExtType extends ExtensionType> = {
|
|
7
7
|
/**
|
|
8
8
|
* - the `DriverConfig` or `PluginConfig` instance used for this command
|
|
9
9
|
*/
|
|
@@ -14,7 +14,7 @@ export type ExtensionCommandOptions<ExtType extends import("@appium/types").Exte
|
|
|
14
14
|
json: boolean;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* Extra stuff about extensions; used indirectly by {@linkcode ExtensionCliCommand.list
|
|
17
|
+
* Extra stuff about extensions; used indirectly by {@linkcode ExtensionCliCommand.list}.
|
|
18
18
|
*/
|
|
19
19
|
export type ExtensionListMetadata = {
|
|
20
20
|
/**
|
|
@@ -42,26 +42,26 @@ export type ExtensionListMetadata = {
|
|
|
42
42
|
*/
|
|
43
43
|
devMode?: boolean | undefined;
|
|
44
44
|
};
|
|
45
|
-
export type ExtensionType = import(
|
|
46
|
-
export type DriverType = import(
|
|
47
|
-
export type PluginType = import(
|
|
48
|
-
export type ExtRecord<ExtType extends
|
|
49
|
-
export type ExtensionConfig<ExtType extends
|
|
50
|
-
export type ExtMetadata<ExtType extends
|
|
51
|
-
export type ExtManifest<ExtType extends
|
|
52
|
-
export type ExtPackageJson<ExtType extends
|
|
53
|
-
export type ExtInstallReceipt<ExtType extends
|
|
45
|
+
export type ExtensionType = import("@appium/types").ExtensionType;
|
|
46
|
+
export type DriverType = import("@appium/types").DriverType;
|
|
47
|
+
export type PluginType = import("@appium/types").PluginType;
|
|
48
|
+
export type ExtRecord<ExtType extends ExtensionType> = import("appium/types").ExtRecord<ExtType>;
|
|
49
|
+
export type ExtensionConfig<ExtType extends ExtensionType> = import("../extension/extension-config").ExtensionConfig<ExtType>;
|
|
50
|
+
export type ExtMetadata<ExtType extends ExtensionType> = import("appium/types").ExtMetadata<ExtType>;
|
|
51
|
+
export type ExtManifest<ExtType extends ExtensionType> = import("appium/types").ExtManifest<ExtType>;
|
|
52
|
+
export type ExtPackageJson<ExtType extends ExtensionType> = import("appium/types").ExtPackageJson<ExtType>;
|
|
53
|
+
export type ExtInstallReceipt<ExtType extends ExtensionType> = import("appium/types").ExtInstallReceipt<ExtType>;
|
|
54
54
|
/**
|
|
55
|
-
* Possible return value for {@linkcode ExtensionCliCommand.list
|
|
55
|
+
* Possible return value for {@linkcode ExtensionCliCommand.list}
|
|
56
56
|
*/
|
|
57
|
-
export type ExtensionListData<ExtType extends
|
|
58
|
-
export type InstalledExtensionListData<ExtType extends
|
|
57
|
+
export type ExtensionListData<ExtType extends ExtensionType> = Partial<ExtManifest<ExtType>> & Partial<ExtensionListMetadata>;
|
|
58
|
+
export type InstalledExtensionListData<ExtType extends ExtensionType> = ExtManifest<ExtType> & ExtensionListMetadata;
|
|
59
59
|
/**
|
|
60
|
-
* Return value of {@linkcode ExtensionCliCommand.list
|
|
60
|
+
* Return value of {@linkcode ExtensionCliCommand.list}.
|
|
61
61
|
*/
|
|
62
|
-
export type ExtensionList<ExtType extends
|
|
62
|
+
export type ExtensionList<ExtType extends ExtensionType> = Record<string, ExtensionListData<ExtType>>;
|
|
63
63
|
/**
|
|
64
|
-
* Options for {@linkcode ExtensionCliCommand._run
|
|
64
|
+
* Options for {@linkcode ExtensionCliCommand._run}.
|
|
65
65
|
*/
|
|
66
66
|
export type RunOptions = {
|
|
67
67
|
/**
|
|
@@ -83,7 +83,7 @@ export type RunOptions = {
|
|
|
83
83
|
bufferOutput?: boolean | undefined;
|
|
84
84
|
};
|
|
85
85
|
/**
|
|
86
|
-
* Options for {@linkcode ExtensionCliCommand.doctor
|
|
86
|
+
* Options for {@linkcode ExtensionCliCommand.doctor}.
|
|
87
87
|
*/
|
|
88
88
|
export type DoctorOptions = {
|
|
89
89
|
/**
|
|
@@ -92,7 +92,7 @@ export type DoctorOptions = {
|
|
|
92
92
|
installSpec: string;
|
|
93
93
|
};
|
|
94
94
|
/**
|
|
95
|
-
* Return value of {@linkcode ExtensionCliCommand._run
|
|
95
|
+
* Return value of {@linkcode ExtensionCliCommand._run}
|
|
96
96
|
*/
|
|
97
97
|
export type RunOutput = {
|
|
98
98
|
/**
|
|
@@ -100,12 +100,12 @@ export type RunOutput = {
|
|
|
100
100
|
*/
|
|
101
101
|
error?: string | undefined;
|
|
102
102
|
/**
|
|
103
|
-
* - script output if `bufferOutput` was `true` in {@linkcode RunOptions
|
|
103
|
+
* - script output if `bufferOutput` was `true` in {@linkcode RunOptions}
|
|
104
104
|
*/
|
|
105
105
|
output?: string[] | undefined;
|
|
106
106
|
};
|
|
107
107
|
/**
|
|
108
|
-
* Options for {@linkcode ExtensionCliCommand._update
|
|
108
|
+
* Options for {@linkcode ExtensionCliCommand._update}.
|
|
109
109
|
*/
|
|
110
110
|
export type ExtensionUpdateOpts = {
|
|
111
111
|
/**
|
|
@@ -118,7 +118,7 @@ export type ExtensionUpdateOpts = {
|
|
|
118
118
|
unsafe: boolean;
|
|
119
119
|
};
|
|
120
120
|
/**
|
|
121
|
-
* Return value of {@linkcode ExtensionCliCommand._update
|
|
121
|
+
* Return value of {@linkcode ExtensionCliCommand._update}.
|
|
122
122
|
*/
|
|
123
123
|
export type ExtensionUpdateResult = {
|
|
124
124
|
/**
|
|
@@ -126,12 +126,12 @@ export type ExtensionUpdateResult = {
|
|
|
126
126
|
*/
|
|
127
127
|
errors: Record<string, Error>;
|
|
128
128
|
/**
|
|
129
|
-
* - map of ext names to {@linkcode UpdateReport
|
|
129
|
+
* - map of ext names to {@linkcode UpdateReport}s
|
|
130
130
|
*/
|
|
131
131
|
updates: Record<string, UpdateReport>;
|
|
132
132
|
};
|
|
133
133
|
/**
|
|
134
|
-
* Part of result of {@linkcode ExtensionCliCommand._update
|
|
134
|
+
* Part of result of {@linkcode ExtensionCliCommand._update}.
|
|
135
135
|
*/
|
|
136
136
|
export type UpdateReport = {
|
|
137
137
|
/**
|
|
@@ -144,7 +144,7 @@ export type UpdateReport = {
|
|
|
144
144
|
to: string;
|
|
145
145
|
};
|
|
146
146
|
/**
|
|
147
|
-
* Options for {@linkcode ExtensionCliCommand._uninstall
|
|
147
|
+
* Options for {@linkcode ExtensionCliCommand._uninstall}.
|
|
148
148
|
*/
|
|
149
149
|
export type UninstallOpts = {
|
|
150
150
|
/**
|
|
@@ -153,7 +153,7 @@ export type UninstallOpts = {
|
|
|
153
153
|
installSpec: string;
|
|
154
154
|
};
|
|
155
155
|
/**
|
|
156
|
-
* Used by {@linkcode ExtensionCliCommand.getPostInstallText
|
|
156
|
+
* Used by {@linkcode ExtensionCliCommand.getPostInstallText}
|
|
157
157
|
*/
|
|
158
158
|
export type ExtensionArgs = {
|
|
159
159
|
/**
|
|
@@ -166,7 +166,7 @@ export type ExtensionArgs = {
|
|
|
166
166
|
extData: object;
|
|
167
167
|
};
|
|
168
168
|
/**
|
|
169
|
-
* Options for {@linkcode ExtensionCliCommand.installViaNpm
|
|
169
|
+
* Options for {@linkcode ExtensionCliCommand.installViaNpm}
|
|
170
170
|
*/
|
|
171
171
|
export type InstallViaNpmArgs = {
|
|
172
172
|
/**
|
|
@@ -180,14 +180,14 @@ export type InstallViaNpmArgs = {
|
|
|
180
180
|
/**
|
|
181
181
|
* - type of install
|
|
182
182
|
*/
|
|
183
|
-
installType: import(
|
|
183
|
+
installType: import("appium/types").InstallType;
|
|
184
184
|
/**
|
|
185
185
|
* - the specific version of the NPM package
|
|
186
186
|
*/
|
|
187
187
|
pkgVer?: string | undefined;
|
|
188
188
|
};
|
|
189
189
|
/**
|
|
190
|
-
* Object returned by {@linkcode ExtensionCliCommand.checkForExtensionUpdate
|
|
190
|
+
* Object returned by {@linkcode ExtensionCliCommand.checkForExtensionUpdate}
|
|
191
191
|
*/
|
|
192
192
|
export type PossibleUpdates = {
|
|
193
193
|
/**
|
|
@@ -204,7 +204,7 @@ export type PossibleUpdates = {
|
|
|
204
204
|
unsafeUpdate: string | null;
|
|
205
205
|
};
|
|
206
206
|
/**
|
|
207
|
-
* Options for {@linkcode ExtensionCliCommand._install
|
|
207
|
+
* Options for {@linkcode ExtensionCliCommand._install}
|
|
208
208
|
*/
|
|
209
209
|
export type InstallOpts = {
|
|
210
210
|
/**
|
|
@@ -220,7 +220,7 @@ export type InstallOpts = {
|
|
|
220
220
|
*/
|
|
221
221
|
packageName?: string | undefined;
|
|
222
222
|
};
|
|
223
|
-
export type KnownExtensions<ExtType extends
|
|
223
|
+
export type KnownExtensions<ExtType extends ExtensionType> = ExtType extends DriverType ? typeof import("../constants").KNOWN_DRIVERS : ExtType extends PluginType ? typeof import("../constants").KNOWN_PLUGINS : never;
|
|
224
224
|
export type ListOptions = {
|
|
225
225
|
/**
|
|
226
226
|
* - whether should show only installed extensions
|
|
@@ -236,19 +236,19 @@ export type ListOptions = {
|
|
|
236
236
|
verbose?: boolean | undefined;
|
|
237
237
|
};
|
|
238
238
|
/**
|
|
239
|
-
* Opts for {@linkcode ExtensionCliCommand.getInstallationReceipt
|
|
239
|
+
* Opts for {@linkcode ExtensionCliCommand.getInstallationReceipt}
|
|
240
240
|
*/
|
|
241
|
-
export type GetInstallationReceiptOpts<ExtType extends
|
|
241
|
+
export type GetInstallationReceiptOpts<ExtType extends ExtensionType> = {
|
|
242
242
|
installPath: string;
|
|
243
243
|
installSpec: string;
|
|
244
244
|
pkg: ExtPackageJson<ExtType>;
|
|
245
245
|
installType: InstallType;
|
|
246
246
|
};
|
|
247
|
-
export type InstallType = import(
|
|
247
|
+
export type InstallType = import("appium/types").InstallType;
|
|
248
248
|
/**
|
|
249
249
|
* @template {ExtensionType} ExtType
|
|
250
250
|
*/
|
|
251
|
-
declare class ExtensionCliCommand<ExtType extends
|
|
251
|
+
declare class ExtensionCliCommand<ExtType extends ExtensionType> {
|
|
252
252
|
/**
|
|
253
253
|
* Build an ExtensionCommand
|
|
254
254
|
* @param {ExtensionCommandOptions<ExtType>} opts
|
|
@@ -298,7 +298,7 @@ declare class ExtensionCliCommand<ExtType extends import("@appium/types").Extens
|
|
|
298
298
|
* @param {ListOptions} opts
|
|
299
299
|
* @return {Promise<ExtensionList<ExtType>>} map of extension names to extension data
|
|
300
300
|
*/
|
|
301
|
-
list<ExtType_1 extends
|
|
301
|
+
list<ExtType_1 extends ExtensionType>({ showInstalled, showUpdates, verbose }: ListOptions): Promise<ExtensionList<ExtType_1>>;
|
|
302
302
|
/**
|
|
303
303
|
* Checks whether the given extension is compatible with the currently installed server
|
|
304
304
|
*
|
|
@@ -347,7 +347,7 @@ declare class ExtensionCliCommand<ExtType extends import("@appium/types").Extens
|
|
|
347
347
|
* @throws {ReferenceError} If `package.json` has a missing or invalid field
|
|
348
348
|
* @returns {pkg is ExtPackageJson<ExtType>}
|
|
349
349
|
*/
|
|
350
|
-
validatePackageJson(pkg: import(
|
|
350
|
+
validatePackageJson(pkg: import("type-fest").PackageJson, installSpec: string): pkg is ExtPackageJson<ExtType>;
|
|
351
351
|
/**
|
|
352
352
|
* For any `package.json` fields which a particular type of extension requires, validate the
|
|
353
353
|
* presence and form of those fields on the `package.json` data, throwing an error if anything is
|
|
@@ -401,7 +401,7 @@ declare class ExtensionCliCommand<ExtType extends import("@appium/types").Extens
|
|
|
401
401
|
* @param {import('child_process').SpawnOptions} opts - Options
|
|
402
402
|
* @returns {import('node:child_process').ChildProcess}
|
|
403
403
|
*/
|
|
404
|
-
_runUnbuffered(cwd: string, script: string, args?: string[], opts?: import(
|
|
404
|
+
_runUnbuffered(cwd: string, script: string, args?: string[], opts?: import("child_process").SpawnOptions): import("node:child_process").ChildProcess;
|
|
405
405
|
/**
|
|
406
406
|
* Runs doctor checks for the given extension.
|
|
407
407
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension-command.d.ts","sourceRoot":"","sources":["../../../lib/cli/extension-command.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extension-command.d.ts","sourceRoot":"","sources":["../../../lib/cli/extension-command.js"],"names":[],"mappings":";;;;;oCA87B6B,OAAO,SAAtB,aAAc;;;;YAEd,eAAe,CAAC,OAAO,CAAC;;;;UACxB,OAAO;;;;;;;;;eAOP,OAAO;;;;cACP,OAAO;;;;mBACP,MAAM,GAAC,IAAI;;;;yBACX,MAAM,GAAC,IAAI;;;;;;;;;;4BAMZ,OAAO,eAAe,EAAE,aAAa;yBACrC,OAAO,eAAe,EAAE,UAAU;yBAClC,OAAO,eAAe,EAAE,UAAU;sBAIlB,OAAO,SAAtB,aAAc,IACf,OAAO,cAAc,EAAE,SAAS,CAAC,OAAO,CAAC;4BAIzB,OAAO,SAAtB,aAAc,IACf,OAAO,+BAA+B,EAAE,eAAe,CAAC,OAAO,CAAC;wBAIhD,OAAO,SAAtB,aAAc,IACf,OAAO,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC;wBAI3B,OAAO,SAAtB,aAAc,IACf,OAAO,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC;2BAI3B,OAAO,SAAtB,aAAc,IACf,OAAO,cAAc,EAAE,cAAc,CAAC,OAAO,CAAC;8BAI9B,OAAO,SAAtB,aAAc,IACf,OAAO,cAAc,EAAE,iBAAiB,CAAC,OAAO,CAAC;;;;8BAKjC,OAAO,SAAtB,aAAc,IACf,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC;uCAI9C,OAAO,SAAtB,aAAc,IACf,WAAW,CAAC,OAAO,CAAC,GAAG,qBAAqB;;;;0BAK5B,OA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AAY,CAQrD;IAED;;;;;;;OAOG;IACH,yBALW,aAAa,GACX,OAAO,CAAC,MAAM,CAAC,CA8E3B;IAED;;;;;;;;;;OAUG;IACH,2DAHW,UAAU,GACT,OAAO,CAAC,SAAS,CAAC,CAyG7B;CACF;wBAn7BiD,iBAAiB"}
|
|
@@ -491,7 +491,9 @@ class ExtensionCliCommand {
|
|
|
491
491
|
return this.config.installedExtensions;
|
|
492
492
|
}
|
|
493
493
|
const pkgName = extRecord.pkgName;
|
|
494
|
-
await
|
|
494
|
+
await (0, utils_1.spinWith)(this.isJsonOutput, `Uninstalling ${this.type} '${installSpec}'`, async () => {
|
|
495
|
+
await support_1.npm.uninstallPackage(this.config.appiumHome, pkgName);
|
|
496
|
+
});
|
|
495
497
|
await this.config.removeExtension(installSpec);
|
|
496
498
|
this.log.ok(`Successfully uninstalled ${this.type} '${installSpec}'`.green);
|
|
497
499
|
return this.config.installedExtensions;
|
|
@@ -538,7 +540,14 @@ class ExtensionCliCommand {
|
|
|
538
540
|
`breaking changes. If you want to apply this update, re-run with --unsafe`);
|
|
539
541
|
}
|
|
540
542
|
const updateVer = unsafe && update.unsafeUpdate ? update.unsafeUpdate : update.safeUpdate;
|
|
541
|
-
await (0, utils_1.spinWith)(this.isJsonOutput, `Updating
|
|
543
|
+
await (0, utils_1.spinWith)(this.isJsonOutput, `Updating ${this.type} '${e}' from ${update.current} to ${updateVer}`, async () => await this.updateExtension(e, updateVer));
|
|
544
|
+
// if we're doing a safe update, but an unsafe update is also available, let the user know
|
|
545
|
+
if (!unsafe && update.unsafeUpdate) {
|
|
546
|
+
const newMajorUpdateMsg = `A newer major version ${update.unsafeUpdate} ` +
|
|
547
|
+
`is available for ${this.type} '${e}', which could include breaking changes. ` +
|
|
548
|
+
`If you want to apply this update, re-run with --unsafe`;
|
|
549
|
+
this.log.info(newMajorUpdateMsg.yellow);
|
|
550
|
+
}
|
|
542
551
|
updates[e] = { from: update.current, to: updateVer };
|
|
543
552
|
}
|
|
544
553
|
catch (err) {
|