node-simctl 7.2.2 → 7.3.1
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 +14 -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 +29 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [7.3.1](https://github.com/appium/node-simctl/compare/v7.3.0...v7.3.1) (2023-08-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Miscellaneous Chores
|
|
5
|
+
|
|
6
|
+
* **deps-dev:** bump semantic-release from 20.1.3 to 21.1.0 ([#194](https://github.com/appium/node-simctl/issues/194)) ([2943a2f](https://github.com/appium/node-simctl/commit/2943a2f27095a9df2ec5965d3dd9dbd82d4c26ad))
|
|
7
|
+
|
|
8
|
+
## [7.3.0](https://github.com/appium/node-simctl/compare/v7.2.2...v7.3.0) (2023-08-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Switch from babel to typescript ([#190](https://github.com/appium/node-simctl/issues/190)) ([bed549f](https://github.com/appium/node-simctl/commit/bed549f4be5c0261ebc2e479fdbed68db963fc15))
|
|
14
|
+
|
|
1
15
|
## [7.2.2](https://github.com/appium/node-simctl/compare/v7.2.1...v7.2.2) (2023-08-14)
|
|
2
16
|
|
|
3
17
|
|
package/build/index.js
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
exports.default = void 0;
|
|
14
|
-
require("source-map-support/register");
|
|
15
|
-
var _simctl = _interopRequireDefault(require("./lib/simctl"));
|
|
16
|
-
var _default = _simctl.default;
|
|
17
|
-
exports.default = _default;
|
|
18
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfc2ltY3RsIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJfZGVmYXVsdCIsIlNpbWN0bCIsImV4cG9ydHMiLCJkZWZhdWx0Il0sInNvdXJjZXMiOlsiLi4vaW5kZXguanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFNpbWN0bCBmcm9tICcuL2xpYi9zaW1jdGwnO1xuXG5leHBvcnQgeyBTaW1jdGwgfTtcbmV4cG9ydCBkZWZhdWx0IFNpbWN0bDtcbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFBQSxJQUFBQSxPQUFBLEdBQUFDLHNCQUFBLENBQUFDLE9BQUE7QUFBa0MsSUFBQUMsUUFBQSxHQUduQkMsZUFBTTtBQUFBQyxPQUFBLENBQUFDLE9BQUEsR0FBQUgsUUFBQSJ9
|
|
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
|
+
exports.Simctl = void 0;
|
|
7
|
+
const simctl_1 = __importDefault(require("./lib/simctl"));
|
|
8
|
+
exports.Simctl = simctl_1.default;
|
|
9
|
+
exports.default = simctl_1.default;
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function getXcrunBinary(): string;
|
|
2
|
+
export const DEFAULT_EXEC_TIMEOUT: number;
|
|
3
|
+
export const SIM_RUNTIME_NAME: "com.apple.CoreSimulator.SimRuntime.";
|
|
4
|
+
/**
|
|
5
|
+
* "Normalize" the version, since iOS uses 'major.minor' but the runtimes can
|
|
6
|
+
* be 'major.minor.patch'
|
|
7
|
+
*
|
|
8
|
+
* @param {string} version - the string version
|
|
9
|
+
* @return {string} The version in 'major.minor' form
|
|
10
|
+
* @throws {Error} If the version not parseable by the `semver` package
|
|
11
|
+
*/
|
|
12
|
+
export function normalizeVersion(version: string): string;
|
|
13
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/helpers.js"],"names":[],"mappings":"AA0BO,yCAAgE;AAxBvE,0CAA4C;AAC5C,qEAA+D;AAE/D;;;;;;;GAOG;AACH,0CAJW,MAAM,GACL,MAAM,CASjB"}
|
package/build/lib/helpers.js
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
require("source-map-support/register");
|
|
10
|
-
var _semver = _interopRequireDefault(require("semver"));
|
|
11
|
-
const DEFAULT_EXEC_TIMEOUT = 10 * 60 * 1000;
|
|
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
|
+
exports.getXcrunBinary = exports.normalizeVersion = exports.SIM_RUNTIME_NAME = exports.DEFAULT_EXEC_TIMEOUT = void 0;
|
|
7
|
+
const semver_1 = __importDefault(require("semver"));
|
|
8
|
+
const DEFAULT_EXEC_TIMEOUT = 10 * 60 * 1000; // ms
|
|
12
9
|
exports.DEFAULT_EXEC_TIMEOUT = DEFAULT_EXEC_TIMEOUT;
|
|
13
10
|
const SIM_RUNTIME_NAME = 'com.apple.CoreSimulator.SimRuntime.';
|
|
14
11
|
exports.SIM_RUNTIME_NAME = SIM_RUNTIME_NAME;
|
|
12
|
+
/**
|
|
13
|
+
* "Normalize" the version, since iOS uses 'major.minor' but the runtimes can
|
|
14
|
+
* be 'major.minor.patch'
|
|
15
|
+
*
|
|
16
|
+
* @param {string} version - the string version
|
|
17
|
+
* @return {string} The version in 'major.minor' form
|
|
18
|
+
* @throws {Error} If the version not parseable by the `semver` package
|
|
19
|
+
*/
|
|
15
20
|
function normalizeVersion(version) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
const semverVersion = semver_1.default.coerce(version);
|
|
22
|
+
if (!semverVersion) {
|
|
23
|
+
throw new Error(`Unable to parse version '${version}'`);
|
|
24
|
+
}
|
|
25
|
+
return `${semverVersion.major}.${semverVersion.minor}`;
|
|
21
26
|
}
|
|
27
|
+
exports.normalizeVersion = normalizeVersion;
|
|
22
28
|
const getXcrunBinary = () => process.env.XCRUN_BINARY || 'xcrun';
|
|
23
29
|
exports.getXcrunBinary = getXcrunBinary;
|
|
24
|
-
//# sourceMappingURL=
|
|
30
|
+
//# sourceMappingURL=helpers.js.map
|
package/build/lib/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.js"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,MAAM,oBAAoB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,KAAK;AAoBhD,oDAAoB;AAnBtB,MAAM,gBAAgB,GAAG,qCAAqC,CAAC;AAmBvC,4CAAgB;AAjBxC;;;;;;;GAOG;AACH,SAAS,gBAAgB,CAAE,OAAO;IAChC,MAAM,aAAa,GAAG,gBAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,4BAA4B,OAAO,GAAG,CAAC,CAAC;KACzD;IACD,OAAO,GAAG,aAAa,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,EAAE,CAAC;AACzD,CAAC;AAIC,4CAAgB;AAGX,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC;AAA3D,QAAA,cAAc,kBAA6C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.js"],"names":[],"mappings":";AAGA,kCAA4B;AAU5B,uBAAwB"}
|
package/build/lib/logger.js
CHANGED
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
require("source-map-support/register");
|
|
9
|
-
var _npmlog = _interopRequireDefault(require("npmlog"));
|
|
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
|
+
exports.LOG_PREFIX = void 0;
|
|
7
|
+
const npmlog_1 = __importDefault(require("npmlog"));
|
|
10
8
|
const LOG_PREFIX = 'simctl';
|
|
11
9
|
exports.LOG_PREFIX = LOG_PREFIX;
|
|
12
10
|
function getLogger() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, 'dbug');
|
|
19
|
-
}
|
|
20
|
-
return logger;
|
|
11
|
+
const logger = global._global_npmlog || npmlog_1.default;
|
|
12
|
+
if (!logger.debug) {
|
|
13
|
+
logger.addLevel('debug', 1000, { fg: 'blue', bg: 'black' }, 'dbug');
|
|
14
|
+
}
|
|
15
|
+
return logger;
|
|
21
16
|
}
|
|
22
17
|
const log = getLogger();
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbnBtbG9nIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJMT0dfUFJFRklYIiwiZXhwb3J0cyIsImdldExvZ2dlciIsImxvZ2dlciIsImdsb2JhbCIsIl9nbG9iYWxfbnBtbG9nIiwibnBtbG9nIiwiZGVidWciLCJhZGRMZXZlbCIsImZnIiwiYmciLCJsb2ciLCJfZGVmYXVsdCIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi9saWIvbG9nZ2VyLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBucG1sb2cgZnJvbSAnbnBtbG9nJztcblxuXG5jb25zdCBMT0dfUFJFRklYID0gJ3NpbWN0bCc7XG5cbmZ1bmN0aW9uIGdldExvZ2dlciAoKSB7XG4gIGNvbnN0IGxvZ2dlciA9IGdsb2JhbC5fZ2xvYmFsX25wbWxvZyB8fCBucG1sb2c7XG4gIGlmICghbG9nZ2VyLmRlYnVnKSB7XG4gICAgbG9nZ2VyLmFkZExldmVsKCdkZWJ1ZycsIDEwMDAsIHsgZmc6ICdibHVlJywgYmc6ICdibGFjaycgfSwgJ2RidWcnKTtcbiAgfVxuICByZXR1cm4gbG9nZ2VyO1xufVxuXG5jb25zdCBsb2cgPSBnZXRMb2dnZXIoKTtcblxuZXhwb3J0IHsgTE9HX1BSRUZJWCB9O1xuZXhwb3J0IGRlZmF1bHQgbG9nO1xuIl0sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUFBLElBQUFBLE9BQUEsR0FBQUMsc0JBQUEsQ0FBQUMsT0FBQTtBQUdBLE1BQU1DLFVBQVUsR0FBRyxRQUFRO0FBQUNDLE9BQUEsQ0FBQUQsVUFBQSxHQUFBQSxVQUFBO0FBRTVCLFNBQVNFLFNBQVNBLENBQUEsRUFBSTtFQUNwQixNQUFNQyxNQUFNLEdBQUdDLE1BQU0sQ0FBQ0MsY0FBYyxJQUFJQyxlQUFNO0VBQzlDLElBQUksQ0FBQ0gsTUFBTSxDQUFDSSxLQUFLLEVBQUU7SUFDakJKLE1BQU0sQ0FBQ0ssUUFBUSxDQUFDLE9BQU8sRUFBRSxJQUFJLEVBQUU7TUFBRUMsRUFBRSxFQUFFLE1BQU07TUFBRUMsRUFBRSxFQUFFO0lBQVEsQ0FBQyxFQUFFLE1BQU0sQ0FBQztFQUNyRTtFQUNBLE9BQU9QLE1BQU07QUFDZjtBQUVBLE1BQU1RLEdBQUcsR0FBR1QsU0FBUyxDQUFDLENBQUM7QUFBQyxJQUFBVSxRQUFBLEdBR1RELEdBQUc7QUFBQVYsT0FBQSxDQUFBWSxPQUFBLEdBQUFELFFBQUEifQ==
|
|
18
|
+
exports.default = log;
|
|
19
|
+
//# sourceMappingURL=logger.js.map
|
package/build/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.js"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAG5B,MAAM,UAAU,GAAG,QAAQ,CAAC;AAYnB,gCAAU;AAVnB,SAAS,SAAS;IAChB,MAAM,MAAM,GAAG,MAAM,CAAC,cAAc,IAAI,gBAAM,CAAC;IAC/C,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;QACjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;KACrE;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;AAGxB,kBAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
export default Simctl;
|
|
2
|
+
export type ExecOpts = {
|
|
3
|
+
/**
|
|
4
|
+
* [[]] - The list of additional subcommand arguments.
|
|
5
|
+
* It's empty by default.
|
|
6
|
+
*/
|
|
7
|
+
args: string[];
|
|
8
|
+
/**
|
|
9
|
+
* [{}] - Environment variables mapping. All these variables
|
|
10
|
+
* will be passed Simulator and used in the executing function.
|
|
11
|
+
*/
|
|
12
|
+
env: any;
|
|
13
|
+
/**
|
|
14
|
+
* [true] - Set it to _false_ to throw execution errors
|
|
15
|
+
* immediately without logging any additional information.
|
|
16
|
+
*/
|
|
17
|
+
logErrors: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* [false] - Whether to execute the given command
|
|
20
|
+
* 'synchronously' or 'asynchronously'. Affects the returned result of the function.
|
|
21
|
+
*/
|
|
22
|
+
asynchronous: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* - Explicitly sets streams encoding for the executed
|
|
25
|
+
* command input and outputs.
|
|
26
|
+
*/
|
|
27
|
+
encoding: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* - One or more architecture names to be enforced while
|
|
30
|
+
* executing xcrun. See https://github.com/appium/appium/issues/18966 for more details.
|
|
31
|
+
*/
|
|
32
|
+
architectures: string | string[];
|
|
33
|
+
};
|
|
34
|
+
export type SimctlOpts = {
|
|
35
|
+
/**
|
|
36
|
+
* - The xcrun properties. Currently only one property
|
|
37
|
+
* is supported, which is `path` and it by default contains `null`, which enforces
|
|
38
|
+
* the instance to automatically detect the full path to `xcrun` tool and to throw
|
|
39
|
+
* an exception if it cannot be detected. If the path is set upon instance creation
|
|
40
|
+
* then it is going to be used by `exec` and no autodetection will happen.
|
|
41
|
+
*/
|
|
42
|
+
xcrun: any | null;
|
|
43
|
+
/**
|
|
44
|
+
* [600000] - The maximum number of milliseconds
|
|
45
|
+
* to wait for single synchronous xcrun command.
|
|
46
|
+
*/
|
|
47
|
+
execTimeout: number;
|
|
48
|
+
/**
|
|
49
|
+
* [true] - Whether to wire xcrun error messages
|
|
50
|
+
* into debug log before throwing them.
|
|
51
|
+
*/
|
|
52
|
+
logErrors: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* - The unique identifier of the current device, which is
|
|
55
|
+
* going to be implicitly passed to all methods, which require it. It can either be set
|
|
56
|
+
* upon instance creation if it is already known in advance or later when/if needed via the
|
|
57
|
+
* corresponding instance setter.
|
|
58
|
+
*/
|
|
59
|
+
udid: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* - Full path to the set of devices that you want to manage.
|
|
62
|
+
* By default this path usually equals to ~/Library/Developer/CoreSimulator/Devices
|
|
63
|
+
*/
|
|
64
|
+
devicesSetPath: string | null;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* @typedef {Object} ExecOpts
|
|
68
|
+
* @property {string[]} args [[]] - The list of additional subcommand arguments.
|
|
69
|
+
* It's empty by default.
|
|
70
|
+
* @property {Object} env [{}] - Environment variables mapping. All these variables
|
|
71
|
+
* will be passed Simulator and used in the executing function.
|
|
72
|
+
* @property {boolean} logErrors [true] - Set it to _false_ to throw execution errors
|
|
73
|
+
* immediately without logging any additional information.
|
|
74
|
+
* @property {boolean} asynchronous [false] - Whether to execute the given command
|
|
75
|
+
* 'synchronously' or 'asynchronously'. Affects the returned result of the function.
|
|
76
|
+
* @property {string?} encoding - Explicitly sets streams encoding for the executed
|
|
77
|
+
* command input and outputs.
|
|
78
|
+
* @property {string|string[]} architectures - One or more architecture names to be enforced while
|
|
79
|
+
* executing xcrun. See https://github.com/appium/appium/issues/18966 for more details.
|
|
80
|
+
*/
|
|
81
|
+
/**
|
|
82
|
+
* @typedef {Object} SimctlOpts
|
|
83
|
+
* @property {Object?} xcrun - The xcrun properties. Currently only one property
|
|
84
|
+
* is supported, which is `path` and it by default contains `null`, which enforces
|
|
85
|
+
* the instance to automatically detect the full path to `xcrun` tool and to throw
|
|
86
|
+
* an exception if it cannot be detected. If the path is set upon instance creation
|
|
87
|
+
* then it is going to be used by `exec` and no autodetection will happen.
|
|
88
|
+
* @property {number} execTimeout [600000] - The maximum number of milliseconds
|
|
89
|
+
* to wait for single synchronous xcrun command.
|
|
90
|
+
* @property {boolean} logErrors [true] - Whether to wire xcrun error messages
|
|
91
|
+
* into debug log before throwing them.
|
|
92
|
+
* @property {string?} udid - The unique identifier of the current device, which is
|
|
93
|
+
* going to be implicitly passed to all methods, which require it. It can either be set
|
|
94
|
+
* upon instance creation if it is already known in advance or later when/if needed via the
|
|
95
|
+
* corresponding instance setter.
|
|
96
|
+
* @property {string?} devicesSetPath - Full path to the set of devices that you want to manage.
|
|
97
|
+
* By default this path usually equals to ~/Library/Developer/CoreSimulator/Devices
|
|
98
|
+
*/
|
|
99
|
+
export class Simctl {
|
|
100
|
+
/**
|
|
101
|
+
* @param {Partial<SimctlOpts>} opts
|
|
102
|
+
*/
|
|
103
|
+
constructor(opts?: Partial<SimctlOpts>);
|
|
104
|
+
/** @type {any?} */
|
|
105
|
+
xcrun: any | null;
|
|
106
|
+
/** @type {number} */
|
|
107
|
+
execTimeout: number;
|
|
108
|
+
/** @type {boolean} */
|
|
109
|
+
logErrors: boolean;
|
|
110
|
+
_udid: string | null;
|
|
111
|
+
_devicesSetPath: string | null;
|
|
112
|
+
set udid(arg: string | null);
|
|
113
|
+
get udid(): string | null;
|
|
114
|
+
set devicesSetPath(arg: string | null);
|
|
115
|
+
get devicesSetPath(): string | null;
|
|
116
|
+
requireUdid(commandName?: null): string;
|
|
117
|
+
requireXcrun(): Promise<any>;
|
|
118
|
+
/**
|
|
119
|
+
* Execute the particular simctl command.
|
|
120
|
+
*
|
|
121
|
+
* @param {string} subcommand - One of available simctl subcommands.
|
|
122
|
+
* Execute `xcrun simctl` in Terminal to see the full list
|
|
123
|
+
* of available subcommands.
|
|
124
|
+
* @param {Partial<ExecOpts>} opts
|
|
125
|
+
* @return {Promise<import('teen_process').TeenProcessExecResult|import('teen_process').SubProcess>} Either the result of teen process's `exec` or
|
|
126
|
+
* `SubProcess` instance depending of `opts.asynchronous` value.
|
|
127
|
+
* @throws {Error} If the simctl subcommand command returns non-zero return code.
|
|
128
|
+
*/
|
|
129
|
+
exec(subcommand: string, opts?: Partial<ExecOpts>): Promise<import("teen_process").TeenProcessExecResult<any> | import('teen_process').SubProcess>;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=simctl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simctl.d.ts","sourceRoot":"","sources":["../../lib/simctl.js"],"names":[],"mappings":";;;;;;UAoBc,MAAM,EAAE;;;;;;;;;;eAIR,OAAO;;;;;kBAEP,OAAO;;;;;cAEP,MAAM;;;;;mBAEN,MAAM,GAAC,MAAM,EAAE;;;;;;;;;;;;;;;iBAYf,MAAM;;;;;eAEN,OAAO;;;;;;;UAEP,MAAM;;;;;oBAIN,MAAM;;AAhCpB;;;;;;;;;;;;;;GAcG;AAGH;;;;;;;;;;;;;;;;;GAiBG;AAGH;IAUE;;OAEG;IACH,mBAFW,QAAQ,UAAU,CAAC,EAU7B;IApBD,mBAAmB;IACnB,OADW,GAAG,QACR;IAEN,qBAAqB;IACrB,aADW,MAAM,CACL;IAEZ,sBAAsB;IACtB,WADW,OAAO,CACR;IAWR,qBAAkD;IAClD,+BAAgF;IAGlF,6BAEC;IAED,0BAEC;IAED,uCAEC;IAED,oCAEC;IAED,wCAMC;IAED,6BAYC;IAED;;;;;;;;;;OAUG;IACH,iBARW,MAAM,SAGN,QAAQ,QAAQ,CAAC,GAChB,QAAQ,oDAA6C,OAAO,cAAc,EAAE,UAAU,CAAC,CAyDlG;CACF"}
|