node-simctl 7.2.2 → 7.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/CHANGELOG.md +7 -0
- package/build/index.js +9 -17
- package/build/lib/helpers.d.ts +13 -0
- package/build/lib/helpers.d.ts.map +1 -0
- package/build/lib/helpers.js +22 -16
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/logger.d.ts +4 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +13 -19
- package/build/lib/logger.js.map +1 -1
- package/build/lib/simctl.d.ts +131 -0
- package/build/lib/simctl.d.ts.map +1 -0
- package/build/lib/simctl.js +170 -94
- package/build/lib/simctl.js.map +1 -1
- package/build/lib/subcommands/addmedia.d.ts +16 -0
- package/build/lib/subcommands/addmedia.d.ts.map +1 -0
- package/build/lib/subcommands/addmedia.js +17 -12
- package/build/lib/subcommands/addmedia.js.map +1 -1
- package/build/lib/subcommands/appinfo.d.ts +45 -0
- package/build/lib/subcommands/appinfo.d.ts.map +1 -0
- package/build/lib/subcommands/appinfo.js +47 -15
- package/build/lib/subcommands/appinfo.js.map +1 -1
- package/build/lib/subcommands/boot.d.ts +12 -0
- package/build/lib/subcommands/boot.d.ts.map +1 -0
- package/build/lib/subcommands/boot.js +47 -22
- package/build/lib/subcommands/boot.js.map +1 -1
- package/build/lib/subcommands/bootstatus.d.ts +56 -0
- package/build/lib/subcommands/bootstatus.d.ts.map +1 -0
- package/build/lib/subcommands/bootstatus.js +102 -87
- package/build/lib/subcommands/bootstatus.js.map +1 -1
- package/build/lib/subcommands/create.d.ts +34 -0
- package/build/lib/subcommands/create.d.ts.map +1 -0
- package/build/lib/subcommands/create.js +115 -65
- package/build/lib/subcommands/create.js.map +1 -1
- package/build/lib/subcommands/delete.d.ts +12 -0
- package/build/lib/subcommands/delete.d.ts.map +1 -0
- package/build/lib/subcommands/delete.js +13 -12
- package/build/lib/subcommands/delete.js.map +1 -1
- package/build/lib/subcommands/erase.d.ts +15 -0
- package/build/lib/subcommands/erase.d.ts.map +1 -0
- package/build/lib/subcommands/erase.js +19 -14
- package/build/lib/subcommands/erase.js.map +1 -1
- package/build/lib/subcommands/get_app_container.d.ts +22 -0
- package/build/lib/subcommands/get_app_container.d.ts.map +1 -0
- package/build/lib/subcommands/get_app_container.js +26 -19
- package/build/lib/subcommands/get_app_container.js.map +1 -1
- package/build/lib/subcommands/getenv.d.ts +14 -0
- package/build/lib/subcommands/getenv.d.ts.map +1 -0
- package/build/lib/subcommands/getenv.js +17 -17
- package/build/lib/subcommands/getenv.js.map +1 -1
- package/build/lib/subcommands/index.d.ts +3 -0
- package/build/lib/subcommands/index.d.ts.map +1 -0
- package/build/lib/subcommands/index.js +33 -36
- package/build/lib/subcommands/index.js.map +1 -1
- package/build/lib/subcommands/install.d.ts +15 -0
- package/build/lib/subcommands/install.d.ts.map +1 -0
- package/build/lib/subcommands/install.js +16 -12
- package/build/lib/subcommands/install.js.map +1 -1
- package/build/lib/subcommands/io.d.ts +15 -0
- package/build/lib/subcommands/io.d.ts.map +1 -0
- package/build/lib/subcommands/io.js +32 -25
- package/build/lib/subcommands/io.js.map +1 -1
- package/build/lib/subcommands/keychain.d.ts +53 -0
- package/build/lib/subcommands/keychain.d.ts.map +1 -0
- package/build/lib/subcommands/keychain.js +85 -51
- package/build/lib/subcommands/keychain.js.map +1 -1
- package/build/lib/subcommands/launch.d.ts +19 -0
- package/build/lib/subcommands/launch.d.ts.map +1 -0
- package/build/lib/subcommands/launch.js +28 -19
- package/build/lib/subcommands/launch.js.map +1 -1
- package/build/lib/subcommands/list.d.ts +120 -0
- package/build/lib/subcommands/list.d.ts.map +1 -0
- package/build/lib/subcommands/list.js +296 -138
- package/build/lib/subcommands/list.js.map +1 -1
- package/build/lib/subcommands/location.d.ts +20 -0
- package/build/lib/subcommands/location.d.ts.map +1 -0
- package/build/lib/subcommands/location.js +37 -22
- package/build/lib/subcommands/location.js.map +1 -1
- package/build/lib/subcommands/openurl.d.ts +17 -0
- package/build/lib/subcommands/openurl.d.ts.map +1 -0
- package/build/lib/subcommands/openurl.js +18 -12
- package/build/lib/subcommands/openurl.js.map +1 -1
- package/build/lib/subcommands/pbcopy.d.ts +17 -0
- package/build/lib/subcommands/pbcopy.d.ts.map +1 -0
- package/build/lib/subcommands/pbcopy.js +26 -20
- package/build/lib/subcommands/pbcopy.js.map +1 -1
- package/build/lib/subcommands/pbpaste.d.ts +17 -0
- package/build/lib/subcommands/pbpaste.d.ts.map +1 -0
- package/build/lib/subcommands/pbpaste.js +20 -16
- package/build/lib/subcommands/pbpaste.js.map +1 -1
- package/build/lib/subcommands/privacy.d.ts +55 -0
- package/build/lib/subcommands/privacy.d.ts.map +1 -0
- package/build/lib/subcommands/privacy.js +60 -18
- package/build/lib/subcommands/privacy.js.map +1 -1
- package/build/lib/subcommands/push.d.ts +25 -0
- package/build/lib/subcommands/push.d.ts.map +1 -0
- package/build/lib/subcommands/push.js +41 -24
- package/build/lib/subcommands/push.js.map +1 -1
- package/build/lib/subcommands/shutdown.d.ts +12 -0
- package/build/lib/subcommands/shutdown.d.ts.map +1 -0
- package/build/lib/subcommands/shutdown.js +47 -22
- package/build/lib/subcommands/shutdown.js.map +1 -1
- package/build/lib/subcommands/spawn.d.ts +26 -0
- package/build/lib/subcommands/spawn.d.ts.map +1 -0
- package/build/lib/subcommands/spawn.js +42 -26
- package/build/lib/subcommands/spawn.js.map +1 -1
- package/build/lib/subcommands/terminate.d.ts +15 -0
- package/build/lib/subcommands/terminate.d.ts.map +1 -0
- package/build/lib/subcommands/terminate.js +16 -12
- package/build/lib/subcommands/terminate.js.map +1 -1
- package/build/lib/subcommands/ui.d.ts +24 -0
- package/build/lib/subcommands/ui.d.ts.map +1 -0
- package/build/lib/subcommands/ui.js +32 -20
- package/build/lib/subcommands/ui.js.map +1 -1
- package/build/lib/subcommands/uninstall.d.ts +16 -0
- package/build/lib/subcommands/uninstall.d.ts.map +1 -0
- package/build/lib/subcommands/uninstall.js +17 -12
- package/build/lib/subcommands/uninstall.js.map +1 -1
- package/lib/simctl.js +13 -3
- package/lib/subcommands/addmedia.js +1 -1
- package/lib/subcommands/bootstatus.js +2 -2
- package/lib/subcommands/create.js +2 -2
- package/lib/subcommands/erase.js +1 -1
- package/lib/subcommands/keychain.js +2 -2
- package/lib/subcommands/launch.js +1 -0
- package/lib/subcommands/list.js +6 -6
- package/lib/subcommands/location.js +1 -1
- package/lib/subcommands/openurl.js +1 -1
- package/lib/subcommands/spawn.js +2 -2
- package/package.json +28 -17
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default commands;
|
|
2
|
+
declare namespace commands {
|
|
3
|
+
/**
|
|
4
|
+
* Shutdown the given Simulator if it is running.
|
|
5
|
+
*
|
|
6
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
7
|
+
* returns non-zero return code.
|
|
8
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
9
|
+
*/
|
|
10
|
+
function shutdownDevice(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=shutdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shutdown.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/shutdown.js"],"names":[],"mappings":";;IAKA;;;;;;OAMG;IACH,yCAWC"}
|
|
@@ -1,28 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.
|
|
5
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
6
17
|
});
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
30
|
+
const logger_1 = __importStar(require("../logger"));
|
|
13
31
|
const commands = {};
|
|
32
|
+
/**
|
|
33
|
+
* Shutdown the given Simulator if it is running.
|
|
34
|
+
*
|
|
35
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
36
|
+
* returns non-zero return code.
|
|
37
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
38
|
+
*/
|
|
14
39
|
commands.shutdownDevice = async function shutdownDevice() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
40
|
+
try {
|
|
41
|
+
await this.exec('shutdown', {
|
|
42
|
+
args: [this.requireUdid('shutdown')],
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
if (!lodash_1.default.includes(e.message, 'current state: Shutdown')) {
|
|
47
|
+
throw e;
|
|
48
|
+
}
|
|
49
|
+
logger_1.default.debug(logger_1.LOG_PREFIX, `Simulator already in 'Shutdown' state. Continuing`);
|
|
22
50
|
}
|
|
23
|
-
_logger.default.debug(_logger.LOG_PREFIX, `Simulator already in 'Shutdown' state. Continuing`);
|
|
24
|
-
}
|
|
25
51
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbG9kYXNoIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJfbG9nZ2VyIiwiX2ludGVyb3BSZXF1aXJlV2lsZGNhcmQiLCJfZ2V0UmVxdWlyZVdpbGRjYXJkQ2FjaGUiLCJub2RlSW50ZXJvcCIsIldlYWtNYXAiLCJjYWNoZUJhYmVsSW50ZXJvcCIsImNhY2hlTm9kZUludGVyb3AiLCJvYmoiLCJfX2VzTW9kdWxlIiwiZGVmYXVsdCIsImNhY2hlIiwiaGFzIiwiZ2V0IiwibmV3T2JqIiwiaGFzUHJvcGVydHlEZXNjcmlwdG9yIiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IiLCJrZXkiLCJwcm90b3R5cGUiLCJoYXNPd25Qcm9wZXJ0eSIsImNhbGwiLCJkZXNjIiwic2V0IiwiY29tbWFuZHMiLCJzaHV0ZG93bkRldmljZSIsImV4ZWMiLCJhcmdzIiwicmVxdWlyZVVkaWQiLCJlIiwiXyIsImluY2x1ZGVzIiwibWVzc2FnZSIsImxvZyIsImRlYnVnIiwiTE9HX1BSRUZJWCIsIl9kZWZhdWx0IiwiZXhwb3J0cyJdLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9zdWJjb21tYW5kcy9zaHV0ZG93bi5qcyJdLCJzb3VyY2Vz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EVBQUFJLElBQUEsWUFBQVQsTUFBQSxDQUFBSyxHQUFBLElBQUFYLEdBQUEsQ0FBQVcsR0FBQSxTQUFBTCxNQUFBLENBQUFKLE9BQUEsR0FBQUYsR0FBQSxNQUFBRyxLQUFBLElBQUFBLEtBQUEsQ0FBQWEsR0FBQSxDQUFBaEIsR0FBQSxFQUFBTSxNQUFBLFlBQUFBLE1BQUE7QUFFNUMsTUFBTVcsUUFBUSxHQUFHLENBQUMsQ0FBQztBQVNuQkEsUUFBUSxDQUFDQyxjQUFjLEdBQUcsZUFBZUEsY0FBY0EsQ0FBQSxFQUFJO0VBQ3pELElBQUk7SUFDRixNQUFNLElBQUksQ0FBQ0MsSUFBSSxDQUFDLFVBQVUsRUFBRTtNQUMxQkMsSUFBSSxFQUFFLENBQUMsSUFBSSxDQUFDQyxXQUFXLENBQUMsVUFBVSxDQUFDO0lBQ3JDLENBQUMsQ0FBQztFQUNKLENBQUMsQ0FBQyxPQUFPQyxDQUFDLEVBQUU7SUFDVixJQUFJLENBQUNDLGVBQUMsQ0FBQ0MsUUFBUSxDQUFDRixDQUFDLENBQUNHLE9BQU8sRUFBRSx5QkFBeUIsQ0FBQyxFQUFFO01BQ3JELE1BQU1ILENBQUM7SUFDVDtJQUNBSSxlQUFHLENBQUNDLEtBQUssQ0FBQ0Msa0JBQVUsRUFBRyxtREFBa0QsQ0FBQztFQUM1RTtBQUNGLENBQUM7QUFBQyxJQUFBQyxRQUFBLEdBRWFaLFFBQVE7QUFBQWEsT0FBQSxDQUFBNUIsT0FBQSxHQUFBMkIsUUFBQSJ9
|
|
52
|
+
exports.default = commands;
|
|
53
|
+
//# sourceMappingURL=shutdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shutdown.js","
|
|
1
|
+
{"version":3,"file":"shutdown.js","sourceRoot":"","sources":["../../../lib/subcommands/shutdown.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAuB;AACvB,oDAA4C;AAE5C,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;GAMG;AACH,QAAQ,CAAC,cAAc,GAAG,KAAK,UAAU,cAAc;IACrD,IAAI;QACF,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAC1B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;SACrC,CAAC,CAAC;KACJ;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,yBAAyB,CAAC,EAAE;YACrD,MAAM,CAAC,CAAC;SACT;QACD,gBAAG,CAAC,KAAK,CAAC,mBAAU,EAAE,mDAAmD,CAAC,CAAC;KAC5E;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default commands;
|
|
2
|
+
declare namespace commands {
|
|
3
|
+
/**
|
|
4
|
+
* Spawn the particular process on Simulator.
|
|
5
|
+
* It is required that Simulator is in _booted_ state.
|
|
6
|
+
*
|
|
7
|
+
* @param {string|string[]} args - Spawn arguments
|
|
8
|
+
* @param {object} env [{}] - Additional environment variables mapping.
|
|
9
|
+
* @return {Promise<import('teen_process').TeenProcessExecResult>} Command execution result.
|
|
10
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
11
|
+
* returns non-zero return code.
|
|
12
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
13
|
+
*/
|
|
14
|
+
function spawnProcess(args: string | string[], env?: any): Promise<import("teen_process").TeenProcessExecResult<any>>;
|
|
15
|
+
/**
|
|
16
|
+
* Prepare SubProcess instance for a new process, which is going to be spawned
|
|
17
|
+
* on Simulator.
|
|
18
|
+
*
|
|
19
|
+
* @param {string|string[]} args - Spawn arguments
|
|
20
|
+
* @param {object} env [{}] - Additional environment variables mapping.
|
|
21
|
+
* @return {Promise<import('teen_process').SubProcess>} The instance of the process to be spawned.
|
|
22
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
23
|
+
*/
|
|
24
|
+
function spawnSubProcess(args: string | string[], env?: any): Promise<import("teen_process").SubProcess>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=spawn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/spawn.js"],"names":[],"mappings":";;IAKA;;;;;;;;;;OAUG;IACH,sHASC;IAED;;;;;;;;OAQG;IACH,yGAUC"}
|
|
@@ -1,32 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
require("source-map-support/register");
|
|
9
|
-
var _lodash = _interopRequireDefault(require("lodash"));
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
10
7
|
const commands = {};
|
|
8
|
+
/**
|
|
9
|
+
* Spawn the particular process on Simulator.
|
|
10
|
+
* It is required that Simulator is in _booted_ state.
|
|
11
|
+
*
|
|
12
|
+
* @param {string|string[]} args - Spawn arguments
|
|
13
|
+
* @param {object} env [{}] - Additional environment variables mapping.
|
|
14
|
+
* @return {Promise<import('teen_process').TeenProcessExecResult>} Command execution result.
|
|
15
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
16
|
+
* returns non-zero return code.
|
|
17
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
18
|
+
*/
|
|
11
19
|
commands.spawnProcess = async function spawnProcess(args, env = {}) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
if (lodash_1.default.isEmpty(args)) {
|
|
21
|
+
throw new Error('Spawn arguments are required');
|
|
22
|
+
}
|
|
23
|
+
return await this.exec('spawn', {
|
|
24
|
+
args: [this.requireUdid('spawn'), ...(lodash_1.default.isArray(args) ? args : [args])],
|
|
25
|
+
env,
|
|
26
|
+
});
|
|
19
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Prepare SubProcess instance for a new process, which is going to be spawned
|
|
30
|
+
* on Simulator.
|
|
31
|
+
*
|
|
32
|
+
* @param {string|string[]} args - Spawn arguments
|
|
33
|
+
* @param {object} env [{}] - Additional environment variables mapping.
|
|
34
|
+
* @return {Promise<import('teen_process').SubProcess>} The instance of the process to be spawned.
|
|
35
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
36
|
+
*/
|
|
20
37
|
commands.spawnSubProcess = async function spawnSubProcess(args, env = {}) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
38
|
+
if (lodash_1.default.isEmpty(args)) {
|
|
39
|
+
throw new Error('Spawn arguments are required');
|
|
40
|
+
}
|
|
41
|
+
return await this.exec('spawn', {
|
|
42
|
+
args: [this.requireUdid('spawn'), ...(lodash_1.default.isArray(args) ? args : [args])],
|
|
43
|
+
env,
|
|
44
|
+
asynchronous: true,
|
|
45
|
+
});
|
|
29
46
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbG9kYXNoIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJjb21tYW5kcyIsInNwYXduUHJvY2VzcyIsImFyZ3MiLCJlbnYiLCJfIiwiaXNFbXB0eSIsIkVycm9yIiwiZXhlYyIsInJlcXVpcmVVZGlkIiwiaXNBcnJheSIsInNwYXduU3ViUHJvY2VzcyIsImFzeW5jaHJvbm91cyIs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BQ00sV0FBVyxDQUFDLE9BQU8sQ0FBQyxFQUFFLElBQUlKLGVBQUMsQ0FBQ0ssT0FBTyxDQUFDUCxJQUFJLENBQUMsR0FBR0EsSUFBSSxHQUFHLENBQUNBLElBQUksQ0FBQyxDQUFDLENBQUM7SUFDdkVDLEdBQUc7SUFDSFEsWUFBWSxFQUFFO0VBQ2hCLENBQUMsQ0FBQztBQUNKLENBQUM7QUFBQyxJQUFBQyxRQUFBLEdBRWFaLFFBQVE7QUFBQWEsT0FBQSxDQUFBQyxPQUFBLEdBQUFGLFFBQUEifQ==
|
|
47
|
+
exports.default = commands;
|
|
48
|
+
//# sourceMappingURL=spawn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn.js","
|
|
1
|
+
{"version":3,"file":"spawn.js","sourceRoot":"","sources":["../../../lib/subcommands/spawn.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AAGvB,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,QAAQ,CAAC,YAAY,GAAG,KAAK,UAAU,YAAY,CAAE,IAAI,EAAE,GAAG,GAAG,EAAE;IACjE,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KACjD;IAED,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;QAC9B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACvE,GAAG;KACJ,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,QAAQ,CAAC,eAAe,GAAG,KAAK,UAAU,eAAe,CAAE,IAAI,EAAE,GAAG,GAAG,EAAE;IACvE,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KACjD;IAED,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;QAC9B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACvE,GAAG;QACH,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default commands;
|
|
2
|
+
declare namespace commands {
|
|
3
|
+
/**
|
|
4
|
+
* Terminate the given running application on Simulator.
|
|
5
|
+
* It is required that Simulator is in _booted_ state.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} bundleId - Bundle identifier of the application,
|
|
8
|
+
* which is going to be terminated.
|
|
9
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
10
|
+
* returns non-zero return code.
|
|
11
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
12
|
+
*/
|
|
13
|
+
function terminateApp(bundleId: string): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=terminate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminate.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/terminate.js"],"names":[],"mappings":";;IAEA;;;;;;;;;OASG;IACH,uDAIC"}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
require("source-map-support/register");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
3
|
const commands = {};
|
|
4
|
+
/**
|
|
5
|
+
* Terminate the given running application on Simulator.
|
|
6
|
+
* It is required that Simulator is in _booted_ state.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} bundleId - Bundle identifier of the application,
|
|
9
|
+
* which is going to be terminated.
|
|
10
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
11
|
+
* returns non-zero return code.
|
|
12
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
13
|
+
*/
|
|
9
14
|
commands.terminateApp = async function terminateApp(bundleId) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
await this.exec('terminate', {
|
|
16
|
+
args: [this.requireUdid('terminate'), bundleId],
|
|
17
|
+
});
|
|
13
18
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb21tYW5kcyIsInRlcm1pbmF0ZUFwcCIsImJ1bmRsZUlkIiwiZXhlYyIsImFyZ3MiLCJyZXF1aXJlVWRpZCIsIl9kZWZhdWx0IiwiZXhwb3J0cyIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvc3ViY29tbWFuZHMvdGVybWluYXRlLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImNvbnN0IGNvbW1hbmRzID0ge307XG5cbi8qKlxuICogVGVybWluYXRlIHRoZSBnaXZlbiBydW5uaW5nIGFwcGxpY2F0aW9uIG9uIFNpbXVsYXRvci5cbiAqIEl0IGlzIHJlcXVpcmVkIHRoYXQgU2ltdWxhdG9yIGlzIGluIF9ib290ZWRfIHN0YXRlLlxuICpcbiAqIEBwYXJhbSB7c3RyaW5nfSBidW5kbGVJZCAtIEJ1bmRsZSBpZGVudGlmaWVyIG9mIHRoZSBhcHBsaWNhdGlvbixcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWNoIGlzIGdvaW5n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ate.js","sourceRoot":"","sources":["../../../lib/subcommands/terminate.js"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;GASG;AACH,QAAQ,CAAC,YAAY,GAAG,KAAK,UAAU,YAAY,CAAE,QAAQ;IAC3D,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;QAC3B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC;KAChD,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default commands;
|
|
2
|
+
declare namespace commands {
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves the current UI appearance value from the given simulator
|
|
5
|
+
*
|
|
6
|
+
* @since Xcode 11.4 SDK
|
|
7
|
+
* @return {Promise<string>} the appearance value, for example 'light' or 'dark'
|
|
8
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
9
|
+
* or there was an error while getting the value
|
|
10
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
11
|
+
*/
|
|
12
|
+
function getAppearance(): Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Sets the UI appearance to the given style
|
|
15
|
+
*
|
|
16
|
+
* @since Xcode 11.4 SDK
|
|
17
|
+
* @param {string} appearance valid appearance value, for example 'light' or 'dark'
|
|
18
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
19
|
+
* or there was an error while getting the value
|
|
20
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
21
|
+
*/
|
|
22
|
+
function setAppearance(appearance: string): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/ui.js"],"names":[],"mappings":";;IAKA;;;;;;;;OAQG;IACH,0CAKC;IAED;;;;;;;;OAQG;IACH,0DAIC"}
|
|
@@ -1,26 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
require("source-map-support/register");
|
|
9
|
-
var _lodash = _interopRequireDefault(require("lodash"));
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
10
7
|
const commands = {};
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves the current UI appearance value from the given simulator
|
|
10
|
+
*
|
|
11
|
+
* @since Xcode 11.4 SDK
|
|
12
|
+
* @return {Promise<string>} the appearance value, for example 'light' or 'dark'
|
|
13
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
14
|
+
* or there was an error while getting the value
|
|
15
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
16
|
+
*/
|
|
11
17
|
commands.getAppearance = async function getAppearance() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
return _lodash.default.trim(stdout);
|
|
18
|
+
const { stdout } = await this.exec('ui', {
|
|
19
|
+
args: [this.requireUdid('ui'), 'appearance'],
|
|
20
|
+
});
|
|
21
|
+
return lodash_1.default.trim(stdout);
|
|
18
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Sets the UI appearance to the given style
|
|
25
|
+
*
|
|
26
|
+
* @since Xcode 11.4 SDK
|
|
27
|
+
* @param {string} appearance valid appearance value, for example 'light' or 'dark'
|
|
28
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
29
|
+
* or there was an error while getting the value
|
|
30
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
31
|
+
*/
|
|
19
32
|
commands.setAppearance = async function setAppearance(appearance) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
33
|
+
await this.exec('ui', {
|
|
34
|
+
args: [this.requireUdid('ui'), 'appearance', appearance],
|
|
35
|
+
});
|
|
23
36
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbG9kYXNoIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJjb21tYW5kcyIsImdldEFwcGVhcmFuY2UiLCJzdGRvdXQiLCJleGVjIiwiYXJncyIsInJlcXVpcmVVZGlkIiwiXyIsInRyaW0iLCJzZXRBcHBlYXJhbmNlIiwiYXBwZWFyYW5jZSIsIl9kZWZhdWx0IiwiZXhwb3J0cyIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvc3ViY29tbWFuZHMvdWkuanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IF8gZnJvbSAnbG9kYXNoJztcblxuXG5jb25zdCBjb21tYW5kcyA9IHt9O1xuXG4vKipcbiAqIFJldHJpZXZlcyB0aGUgY3VycmVudCBVSSBhcHBlYXJhbmNlIHZhbHVlIGZyb20gdGhlIGdpdmVuIHNpbXVsYXRvclxuICpcbiAqIEBzaW5jZSBYY29kZSAxMS40IFNES1xuICogQHJldHVybiB7UHJvbWlzZTxzdHJpbmc+fSB0aGUgYXBwZWFyYW5jZSB2YWx1ZSwgZm9yIGV4YW1wbGUgJ2xpZ2h0JyBvciAnZGFyaydcbiAqIEB0aHJvd3Mge0Vycm9yfSBpZiB0aGUgY3VycmVudCBTREsgdmVyc2lvbiBkb2VzIG5vdCBzdXBwb3J0IHRoZSBjb21tYW5kXG4gKiBvciB0aGVyZSB3YXMgYW4gZXJyb3Igd2hpbGUgZ2V0dGluZyB0aGUgdmFsdWVcbiAqIEB0aHJvd3Mge0Vycm9yfSBJZiB0aGUgYHVkaWRgI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I7Ozs7Ozs7O0FBQUEsSUFBQUEsT0FBQSxHQUFBQyxzQkFBQSxDQUFBQyxPQUFBO0FBR0EsTUFBTUMsUUFBUSxHQUFHLENBQUMsQ0FBQztBQVduQkEsUUFBUSxDQUFDQyxhQUFhLEdBQUcsZUFBZUEsYUFBYUEsQ0FBQSxFQUFJO0VBQ3ZELE1BQU07SUFBQ0M7RUFBTSxDQUFDLEdBQUcsTUFBTSxJQUFJLENBQUNDLElBQUksQ0FBQyxJQUFJLEVBQUU7SUFDckNDLElBQUksRUFBRSxDQUFDLElBQUksQ0FBQ0MsV0FBVyxDQUFDLElBQUksQ0FBQyxFQUFFLFlBQVk7RUFDN0MsQ0FBQyxDQUFDO0VBQ0YsT0FBT0MsZUFBQyxDQUFDQyxJQUFJLENBQUNMLE1BQU0sQ0FBQztBQUN2QixDQUFDO0FBV0RGLFFBQVEsQ0FBQ1EsYUFBYSxHQUFHLGVBQWVBLGFBQWFBLENBQUVDLFVBQVUsRUFBRTtFQUNqRSxNQUFNLElBQUksQ0FBQ04sSUFBSSxDQUFDLElBQUksRUFBRTtJQUNwQkMsSUFBSSxFQUFFLENBQUMsSUFBSSxDQUFDQyxXQUFXLENBQUMsSUFBSSxDQUFDLEVBQUUsWUFBWSxFQUFFSSxVQUFVO0VBQ3pELENBQUMsQ0FBQztBQUNKLENBQUM7QUFBQyxJQUFBQyxRQUFBLEdBRWFWLFFBQVE7QUFBQVcsT0FBQSxDQUFBQyxPQUFBLEdBQUFGLFFBQUEifQ==
|
|
37
|
+
exports.default = commands;
|
|
38
|
+
//# sourceMappingURL=ui.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../../lib/subcommands/ui.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AAGvB,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;GAQG;AACH,QAAQ,CAAC,aAAa,GAAG,KAAK,UAAU,aAAa;IACnD,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACrC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;KAC7C,CAAC,CAAC;IACH,OAAO,gBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,QAAQ,CAAC,aAAa,GAAG,KAAK,UAAU,aAAa,CAAE,UAAU;IAC/D,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACpB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC;KACzD,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default commands;
|
|
2
|
+
declare namespace commands {
|
|
3
|
+
/**
|
|
4
|
+
* Remove the particular application package from Simulator.
|
|
5
|
+
* It is required that Simulator is in _booted_ state and
|
|
6
|
+
* the application with given bundle identifier is already installed.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} bundleId - Bundle identifier of the application,
|
|
9
|
+
* which is going to be removed.
|
|
10
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
11
|
+
* returns non-zero return code.
|
|
12
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
13
|
+
*/
|
|
14
|
+
function removeApp(bundleId: string): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=uninstall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/uninstall.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;OAUG;IACH,oDAIC"}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
require("source-map-support/register");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
3
|
const commands = {};
|
|
4
|
+
/**
|
|
5
|
+
* Remove the particular application package from Simulator.
|
|
6
|
+
* It is required that Simulator is in _booted_ state and
|
|
7
|
+
* the application with given bundle identifier is already installed.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} bundleId - Bundle identifier of the application,
|
|
10
|
+
* which is going to be removed.
|
|
11
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
12
|
+
* returns non-zero return code.
|
|
13
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
14
|
+
*/
|
|
9
15
|
commands.removeApp = async function removeApp(bundleId) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
await this.exec('uninstall', {
|
|
17
|
+
args: [this.requireUdid('uninstall'), bundleId],
|
|
18
|
+
});
|
|
13
19
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb21tYW5kcyIsInJlbW92ZUFwcCIsImJ1bmRsZUlkIiwiZXhlYyIsImFyZ3MiLCJyZXF1aXJlVWRpZCIsIl9kZWZhdWx0IiwiZXhwb3J0cyIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvc3ViY29tbWFuZHMvdW5pbnN0YWxsLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImNvbnN0IGNvbW1hbmRzID0ge307XG5cbi8qKlxuICogUmVtb3ZlIHRoZSBwYXJ0aWN1bGFyIGFwcGxpY2F0aW9uIHBhY2thZ2UgZnJvbSBTaW11bGF0b3IuXG4gKiBJdCBpcyByZXF1aXJlZCB0aGF0IFNpbXVsYXRvciBpcyBpbiBfYm9vdGVkXyBzdG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gsUUFBUTtFQUNoRCxDQUFDLENBQUM7QUFDSixDQUFDO0FBQUMsSUFBQUksUUFBQSxHQUVhTixRQUFRO0FBQUFPLE9BQUEsQ0FBQUMsT0FBQSxHQUFBRixRQUFBIn0=
|
|
20
|
+
exports.default = commands;
|
|
21
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.js","
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../lib/subcommands/uninstall.js"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,QAAQ,CAAC,SAAS,GAAG,KAAK,UAAU,SAAS,CAAE,QAAQ;IACrD,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;QAC3B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC;KAChD,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
package/lib/simctl.js
CHANGED
|
@@ -54,8 +54,17 @@ const DEFAULT_OPTS = {
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
class Simctl {
|
|
57
|
+
/** @type {any?} */
|
|
58
|
+
xcrun;
|
|
59
|
+
|
|
60
|
+
/** @type {number} */
|
|
61
|
+
execTimeout;
|
|
62
|
+
|
|
63
|
+
/** @type {boolean} */
|
|
64
|
+
logErrors;
|
|
65
|
+
|
|
57
66
|
/**
|
|
58
|
-
* @param {SimctlOpts} opts
|
|
67
|
+
* @param {Partial<SimctlOpts>} opts
|
|
59
68
|
*/
|
|
60
69
|
constructor (opts = {}) {
|
|
61
70
|
opts = _.cloneDeep(opts);
|
|
@@ -111,8 +120,8 @@ class Simctl {
|
|
|
111
120
|
* @param {string} subcommand - One of available simctl subcommands.
|
|
112
121
|
* Execute `xcrun simctl` in Terminal to see the full list
|
|
113
122
|
* of available subcommands.
|
|
114
|
-
* @param {ExecOpts
|
|
115
|
-
* @return {Promise<
|
|
123
|
+
* @param {Partial<ExecOpts>} opts
|
|
124
|
+
* @return {Promise<import('teen_process').TeenProcessExecResult|import('teen_process').SubProcess>} Either the result of teen process's `exec` or
|
|
116
125
|
* `SubProcess` instance depending of `opts.asynchronous` value.
|
|
117
126
|
* @throws {Error} If the simctl subcommand command returns non-zero return code.
|
|
118
127
|
*/
|
|
@@ -154,6 +163,7 @@ class Simctl {
|
|
|
154
163
|
);
|
|
155
164
|
execArgs = ['arch', [...archArgs, xcrun, ...args], execOpts];
|
|
156
165
|
}
|
|
166
|
+
// @ts-ignore We know what we are doing here
|
|
157
167
|
return asynchronous ? new SubProcess(...execArgs) : await tpExec(...execArgs);
|
|
158
168
|
} catch (e) {
|
|
159
169
|
if (!this.logErrors || !logErrors) {
|
|
@@ -6,7 +6,7 @@ const commands = {};
|
|
|
6
6
|
*
|
|
7
7
|
* @param {string} filePath - Full path to a media file on the local
|
|
8
8
|
* file system.
|
|
9
|
-
* @return {Promise<
|
|
9
|
+
* @return {Promise<import('teen_process').TeenProcessExecResult>} Command execution result.
|
|
10
10
|
* @throws {Error} If the corresponding simctl subcommand command
|
|
11
11
|
* returns non-zero return code.
|
|
12
12
|
* @throws {Error} If the `udid` instance property is unset
|
|
@@ -22,8 +22,8 @@ const commands = {};
|
|
|
22
22
|
* until Simulator booting is completed.
|
|
23
23
|
* The method is only available since Xcode8.
|
|
24
24
|
*
|
|
25
|
-
* @param {BootMonitorOptions} opts - Monitoring options.
|
|
26
|
-
* @returns {Promise<SubProcess>} The instance of the corresponding monitoring process.
|
|
25
|
+
* @param {Partial<BootMonitorOptions>} opts - Monitoring options.
|
|
26
|
+
* @returns {Promise<import('teen_process').SubProcess>} The instance of the corresponding monitoring process.
|
|
27
27
|
* @throws {Error} If the Simulator fails to finish booting within the given timeout and onFinished
|
|
28
28
|
* property is not set.
|
|
29
29
|
* @throws {Error} If the `udid` instance property is unset
|
|
@@ -23,7 +23,7 @@ const commands = {};
|
|
|
23
23
|
* @param {string} name - The device name to be created.
|
|
24
24
|
* @param {string} deviceTypeId - Device type, for example 'iPhone 6'.
|
|
25
25
|
* @param {string} platformVersion - Platform version, for example '10.3'.
|
|
26
|
-
* @param {SimCreationOpts} opts - Simulator options for creating devices.
|
|
26
|
+
* @param {Partial<SimCreationOpts>} opts - Simulator options for creating devices.
|
|
27
27
|
* @return {Promise<string>} The UDID of the newly created device.
|
|
28
28
|
* @throws {Error} If the corresponding simctl subcommand command
|
|
29
29
|
* returns non-zero return code.
|
|
@@ -92,7 +92,7 @@ commands.createDevice = async function createDevice (name, deviceTypeId, platfor
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// make sure that it gets out of the "Creating" state
|
|
95
|
-
const retries = parseInt(timeout / 1000
|
|
95
|
+
const retries = parseInt(`${timeout / 1000}`, 10);
|
|
96
96
|
await retryInterval(retries, 1000, async () => {
|
|
97
97
|
const devices = _.values(await this.getDevices());
|
|
98
98
|
for (const deviceArr of _.values(devices)) {
|
package/lib/subcommands/erase.js
CHANGED
|
@@ -14,7 +14,7 @@ const commands = {};
|
|
|
14
14
|
*/
|
|
15
15
|
commands.eraseDevice = async function eraseDevice (timeout = 1000) {
|
|
16
16
|
// retry erase with a sleep in between because it's flakey
|
|
17
|
-
const retries = parseInt(timeout / 200
|
|
17
|
+
const retries = parseInt(`${timeout / 200}`, 10);
|
|
18
18
|
await retryInterval(retries, 200,
|
|
19
19
|
async () => await this.exec('erase', {
|
|
20
20
|
args: [this.requireUdid('erase')]
|
|
@@ -36,7 +36,7 @@ async function handleRawPayload (payload, onPayloadStored) {
|
|
|
36
36
|
* @param {string} cert the full path to a valid .cert file containing
|
|
37
37
|
* the certificate content or the certificate content itself, depending on
|
|
38
38
|
* options
|
|
39
|
-
* @param {CertOptions} opts
|
|
39
|
+
* @param {Partial<CertOptions>} opts
|
|
40
40
|
* @throws {Error} if the current SDK version does not support the command
|
|
41
41
|
* or there was an error while adding the certificate
|
|
42
42
|
* @throws {Error} If the `udid` instance property is unset
|
|
@@ -62,7 +62,7 @@ commands.addRootCertificate = async function addRootCertificate (cert, opts = {}
|
|
|
62
62
|
* @param {string} cert the full path to a valid .cert file containing
|
|
63
63
|
* the certificate content or the certificate content itself, depending on
|
|
64
64
|
* options
|
|
65
|
-
* @param {CertOptions} opts
|
|
65
|
+
* @param {Partial<CertOptions>} opts
|
|
66
66
|
* @throws {Error} if the current SDK version does not support the command
|
|
67
67
|
* or there was an error while adding the certificate
|
|
68
68
|
* @throws {Error} If the `udid` instance property is unset
|
|
@@ -18,6 +18,7 @@ const commands = {};
|
|
|
18
18
|
* @throws {Error} If the `udid` instance property is unset
|
|
19
19
|
*/
|
|
20
20
|
commands.launchApp = async function launchApp (bundleId, tries = 5) {
|
|
21
|
+
// @ts-ignore A string will always be returned
|
|
21
22
|
return await retryInterval(tries, 1000, async () => {
|
|
22
23
|
const {stdout} = await this.exec('launch', {
|
|
23
24
|
args: [this.requireUdid('launch'), bundleId],
|