node-simctl 7.3.3 → 7.3.5
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 +15 -0
- package/build/lib/helpers.d.ts +6 -3
- package/build/lib/helpers.d.ts.map +1 -1
- package/build/lib/helpers.js +8 -5
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/simctl.d.ts +50 -38
- package/build/lib/simctl.d.ts.map +1 -1
- package/build/lib/simctl.js +25 -18
- package/build/lib/simctl.js.map +1 -1
- package/build/lib/subcommands/bootstatus.d.ts +16 -16
- package/build/lib/subcommands/bootstatus.d.ts.map +1 -1
- package/build/lib/subcommands/bootstatus.js +7 -7
- package/build/lib/subcommands/create.d.ts +9 -9
- package/build/lib/subcommands/create.d.ts.map +1 -1
- package/build/lib/subcommands/create.js +3 -3
- package/build/lib/subcommands/erase.d.ts +2 -2
- package/build/lib/subcommands/erase.d.ts.map +1 -1
- package/build/lib/subcommands/erase.js +1 -1
- package/build/lib/subcommands/get_app_container.d.ts +2 -2
- package/build/lib/subcommands/get_app_container.d.ts.map +1 -1
- package/build/lib/subcommands/get_app_container.js +1 -1
- package/build/lib/subcommands/keychain.d.ts +7 -7
- package/build/lib/subcommands/keychain.d.ts.map +1 -1
- package/build/lib/subcommands/keychain.js +3 -3
- package/build/lib/subcommands/launch.d.ts +2 -2
- package/build/lib/subcommands/launch.d.ts.map +1 -1
- package/build/lib/subcommands/launch.js +1 -1
- package/build/lib/subcommands/list.d.ts +9 -9
- package/build/lib/subcommands/list.d.ts.map +1 -1
- package/build/lib/subcommands/list.js +5 -5
- package/build/lib/subcommands/pbcopy.d.ts +2 -2
- package/build/lib/subcommands/pbcopy.d.ts.map +1 -1
- package/build/lib/subcommands/pbcopy.js +1 -1
- package/build/lib/subcommands/pbpaste.d.ts +2 -2
- package/build/lib/subcommands/pbpaste.d.ts.map +1 -1
- package/build/lib/subcommands/pbpaste.js +1 -1
- package/build/lib/subcommands/spawn.d.ts +2 -2
- package/build/lib/subcommands/spawn.js +2 -2
- package/lib/helpers.js +9 -9
- package/lib/simctl.js +29 -20
- package/lib/subcommands/bootstatus.js +7 -7
- package/lib/subcommands/create.js +3 -3
- package/lib/subcommands/erase.js +1 -1
- package/lib/subcommands/get_app_container.js +1 -1
- package/lib/subcommands/keychain.js +3 -3
- package/lib/subcommands/launch.js +1 -1
- package/lib/subcommands/list.js +5 -5
- package/lib/subcommands/pbcopy.js +1 -1
- package/lib/subcommands/pbpaste.js +1 -1
- package/lib/subcommands/spawn.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [7.3.5](https://github.com/appium/node-simctl/compare/v7.3.4...v7.3.5) (2023-09-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Miscellaneous Chores
|
|
5
|
+
|
|
6
|
+
* **deps-dev:** bump @types/teen_process from 2.0.0 to 2.0.1 ([#201](https://github.com/appium/node-simctl/issues/201)) ([24b224c](https://github.com/appium/node-simctl/commit/24b224cec5124990f5098f474bbffc4749830776))
|
|
7
|
+
* **deps-dev:** bump sinon from 15.2.0 to 16.0.0 ([#202](https://github.com/appium/node-simctl/issues/202)) ([e436b63](https://github.com/appium/node-simctl/commit/e436b632962a87cdea543e1395bd83307dd2427f))
|
|
8
|
+
|
|
9
|
+
## [7.3.4](https://github.com/appium/node-simctl/compare/v7.3.3...v7.3.4) (2023-09-01)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Miscellaneous Chores
|
|
13
|
+
|
|
14
|
+
* Improve type declarations ([#198](https://github.com/appium/node-simctl/issues/198)) ([314df12](https://github.com/appium/node-simctl/commit/314df12dfa9f2e7afa06d67f211b3dffe84755dc))
|
|
15
|
+
|
|
1
16
|
## [7.3.3](https://github.com/appium/node-simctl/compare/v7.3.2...v7.3.3) (2023-08-31)
|
|
2
17
|
|
|
3
18
|
|
package/build/lib/helpers.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export function getXcrunBinary(): string;
|
|
2
|
-
export const DEFAULT_EXEC_TIMEOUT: number;
|
|
3
|
-
export const SIM_RUNTIME_NAME: "com.apple.CoreSimulator.SimRuntime.";
|
|
4
1
|
/**
|
|
5
2
|
* "Normalize" the version, since iOS uses 'major.minor' but the runtimes can
|
|
6
3
|
* be 'major.minor.patch'
|
|
@@ -10,4 +7,10 @@ export const SIM_RUNTIME_NAME: "com.apple.CoreSimulator.SimRuntime.";
|
|
|
10
7
|
* @throws {Error} If the version not parseable by the `semver` package
|
|
11
8
|
*/
|
|
12
9
|
export function normalizeVersion(version: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* @returns {string}
|
|
12
|
+
*/
|
|
13
|
+
export function getXcrunBinary(): string;
|
|
14
|
+
export const DEFAULT_EXEC_TIMEOUT: number;
|
|
15
|
+
export const SIM_RUNTIME_NAME: "com.apple.CoreSimulator.SimRuntime.";
|
|
13
16
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/helpers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/helpers.js"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,0CAJW,MAAM,GACL,MAAM,CASjB;AAED;;GAEG;AACH,kCAFa,MAAM,CAIlB;AAxBD,0CAAmD;AACnD,qEAAsE"}
|
package/build/lib/helpers.js
CHANGED
|
@@ -5,10 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getXcrunBinary = exports.normalizeVersion = exports.SIM_RUNTIME_NAME = exports.DEFAULT_EXEC_TIMEOUT = void 0;
|
|
7
7
|
const semver_1 = __importDefault(require("semver"));
|
|
8
|
-
|
|
9
|
-
exports.
|
|
10
|
-
const SIM_RUNTIME_NAME = 'com.apple.CoreSimulator.SimRuntime.';
|
|
11
|
-
exports.SIM_RUNTIME_NAME = SIM_RUNTIME_NAME;
|
|
8
|
+
exports.DEFAULT_EXEC_TIMEOUT = 10 * 60 * 1000; // ms
|
|
9
|
+
exports.SIM_RUNTIME_NAME = 'com.apple.CoreSimulator.SimRuntime.';
|
|
12
10
|
/**
|
|
13
11
|
* "Normalize" the version, since iOS uses 'major.minor' but the runtimes can
|
|
14
12
|
* be 'major.minor.patch'
|
|
@@ -25,6 +23,11 @@ function normalizeVersion(version) {
|
|
|
25
23
|
return `${semverVersion.major}.${semverVersion.minor}`;
|
|
26
24
|
}
|
|
27
25
|
exports.normalizeVersion = normalizeVersion;
|
|
28
|
-
|
|
26
|
+
/**
|
|
27
|
+
* @returns {string}
|
|
28
|
+
*/
|
|
29
|
+
function getXcrunBinary() {
|
|
30
|
+
return process.env.XCRUN_BINARY || 'xcrun';
|
|
31
|
+
}
|
|
29
32
|
exports.getXcrunBinary = getXcrunBinary;
|
|
30
33
|
//# sourceMappingURL=helpers.js.map
|
package/build/lib/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.js"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.js"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAEf,QAAA,oBAAoB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,KAAK;AAC5C,QAAA,gBAAgB,GAAG,qCAAqC,CAAC;AAEtE;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAAE,OAAO;IACvC,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;AAND,4CAMC;AAED;;GAEG;AACH,SAAgB,cAAc;IAC5B,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC;AAC7C,CAAC;AAFD,wCAEC"}
|
package/build/lib/simctl.d.ts
CHANGED
|
@@ -1,35 +1,41 @@
|
|
|
1
1
|
export default Simctl;
|
|
2
|
+
export type XCRun = {
|
|
3
|
+
/**
|
|
4
|
+
* Full path to the xcrun script
|
|
5
|
+
*/
|
|
6
|
+
path: string | null;
|
|
7
|
+
};
|
|
2
8
|
export type ExecOpts = {
|
|
3
9
|
/**
|
|
4
|
-
*
|
|
10
|
+
* - The list of additional subcommand arguments.
|
|
5
11
|
* It's empty by default.
|
|
6
12
|
*/
|
|
7
|
-
args
|
|
13
|
+
args?: string[] | undefined;
|
|
8
14
|
/**
|
|
9
|
-
*
|
|
15
|
+
* - Environment variables mapping. All these variables
|
|
10
16
|
* will be passed Simulator and used in the executing function.
|
|
11
17
|
*/
|
|
12
|
-
env
|
|
18
|
+
env?: Record<string, any> | undefined;
|
|
13
19
|
/**
|
|
14
|
-
*
|
|
20
|
+
* - Set it to _false_ to throw execution errors
|
|
15
21
|
* immediately without logging any additional information.
|
|
16
22
|
*/
|
|
17
|
-
logErrors
|
|
23
|
+
logErrors?: boolean | undefined;
|
|
18
24
|
/**
|
|
19
|
-
*
|
|
25
|
+
* - Whether to execute the given command
|
|
20
26
|
* 'synchronously' or 'asynchronously'. Affects the returned result of the function.
|
|
21
27
|
*/
|
|
22
|
-
asynchronous
|
|
28
|
+
asynchronous?: boolean | undefined;
|
|
23
29
|
/**
|
|
24
30
|
* - Explicitly sets streams encoding for the executed
|
|
25
31
|
* command input and outputs.
|
|
26
32
|
*/
|
|
27
|
-
encoding
|
|
33
|
+
encoding?: string | undefined;
|
|
28
34
|
/**
|
|
29
35
|
* - One or more architecture names to be enforced while
|
|
30
36
|
* executing xcrun. See https://github.com/appium/appium/issues/18966 for more details.
|
|
31
37
|
*/
|
|
32
|
-
architectures
|
|
38
|
+
architectures?: string | string[] | undefined;
|
|
33
39
|
};
|
|
34
40
|
export type SimctlOpts = {
|
|
35
41
|
/**
|
|
@@ -39,93 +45,99 @@ export type SimctlOpts = {
|
|
|
39
45
|
* an exception if it cannot be detected. If the path is set upon instance creation
|
|
40
46
|
* then it is going to be used by `exec` and no autodetection will happen.
|
|
41
47
|
*/
|
|
42
|
-
xcrun
|
|
48
|
+
xcrun?: XCRun | undefined;
|
|
43
49
|
/**
|
|
44
|
-
*
|
|
50
|
+
* - The maximum number of milliseconds
|
|
45
51
|
* to wait for single synchronous xcrun command.
|
|
46
52
|
*/
|
|
47
|
-
execTimeout
|
|
53
|
+
execTimeout?: number | undefined;
|
|
48
54
|
/**
|
|
49
|
-
*
|
|
55
|
+
* - Whether to wire xcrun error messages
|
|
50
56
|
* into debug log before throwing them.
|
|
51
57
|
*/
|
|
52
|
-
logErrors
|
|
58
|
+
logErrors?: boolean | undefined;
|
|
53
59
|
/**
|
|
54
60
|
* - The unique identifier of the current device, which is
|
|
55
61
|
* going to be implicitly passed to all methods, which require it. It can either be set
|
|
56
62
|
* upon instance creation if it is already known in advance or later when/if needed via the
|
|
57
63
|
* corresponding instance setter.
|
|
58
64
|
*/
|
|
59
|
-
udid
|
|
65
|
+
udid?: string | null | undefined;
|
|
60
66
|
/**
|
|
61
67
|
* - Full path to the set of devices that you want to manage.
|
|
62
68
|
* By default this path usually equals to ~/Library/Developer/CoreSimulator/Devices
|
|
63
69
|
*/
|
|
64
|
-
devicesSetPath
|
|
70
|
+
devicesSetPath?: string | null | undefined;
|
|
65
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* @typedef {Object} XCRun
|
|
74
|
+
* @property {string?} path Full path to the xcrun script
|
|
75
|
+
*/
|
|
66
76
|
/**
|
|
67
77
|
* @typedef {Object} ExecOpts
|
|
68
|
-
* @property {string[]} args
|
|
78
|
+
* @property {string[]} [args=[]] - The list of additional subcommand arguments.
|
|
69
79
|
* It's empty by default.
|
|
70
|
-
* @property {
|
|
80
|
+
* @property {Record<string, any>} [env={}] - Environment variables mapping. All these variables
|
|
71
81
|
* will be passed Simulator and used in the executing function.
|
|
72
|
-
* @property {boolean} logErrors
|
|
82
|
+
* @property {boolean} [logErrors=true] - Set it to _false_ to throw execution errors
|
|
73
83
|
* immediately without logging any additional information.
|
|
74
|
-
* @property {boolean} asynchronous
|
|
84
|
+
* @property {boolean} [asynchronous=false] - Whether to execute the given command
|
|
75
85
|
* 'synchronously' or 'asynchronously'. Affects the returned result of the function.
|
|
76
|
-
* @property {string
|
|
86
|
+
* @property {string} [encoding] - Explicitly sets streams encoding for the executed
|
|
77
87
|
* command input and outputs.
|
|
78
|
-
* @property {string|string[]} architectures - One or more architecture names to be enforced while
|
|
88
|
+
* @property {string|string[]} [architectures] - One or more architecture names to be enforced while
|
|
79
89
|
* executing xcrun. See https://github.com/appium/appium/issues/18966 for more details.
|
|
80
90
|
*/
|
|
81
91
|
/**
|
|
82
92
|
* @typedef {Object} SimctlOpts
|
|
83
|
-
* @property {
|
|
93
|
+
* @property {XCRun} [xcrun] - The xcrun properties. Currently only one property
|
|
84
94
|
* is supported, which is `path` and it by default contains `null`, which enforces
|
|
85
95
|
* the instance to automatically detect the full path to `xcrun` tool and to throw
|
|
86
96
|
* an exception if it cannot be detected. If the path is set upon instance creation
|
|
87
97
|
* then it is going to be used by `exec` and no autodetection will happen.
|
|
88
|
-
* @property {number} execTimeout
|
|
98
|
+
* @property {number} [execTimeout=600000] - The maximum number of milliseconds
|
|
89
99
|
* to wait for single synchronous xcrun command.
|
|
90
|
-
* @property {boolean} logErrors
|
|
100
|
+
* @property {boolean} [logErrors=true] - Whether to wire xcrun error messages
|
|
91
101
|
* into debug log before throwing them.
|
|
92
|
-
* @property {string?} udid - The unique identifier of the current device, which is
|
|
102
|
+
* @property {string?} [udid] - The unique identifier of the current device, which is
|
|
93
103
|
* going to be implicitly passed to all methods, which require it. It can either be set
|
|
94
104
|
* upon instance creation if it is already known in advance or later when/if needed via the
|
|
95
105
|
* corresponding instance setter.
|
|
96
|
-
* @property {string?} devicesSetPath - Full path to the set of devices that you want to manage.
|
|
106
|
+
* @property {string?} [devicesSetPath] - Full path to the set of devices that you want to manage.
|
|
97
107
|
* By default this path usually equals to ~/Library/Developer/CoreSimulator/Devices
|
|
98
108
|
*/
|
|
99
109
|
export class Simctl {
|
|
100
110
|
/**
|
|
101
|
-
* @param {
|
|
111
|
+
* @param {SimctlOpts} [opts={}]
|
|
102
112
|
*/
|
|
103
|
-
constructor(opts?:
|
|
104
|
-
/** @type {
|
|
105
|
-
xcrun:
|
|
113
|
+
constructor(opts?: SimctlOpts | undefined);
|
|
114
|
+
/** @type {XCRun} */
|
|
115
|
+
xcrun: XCRun;
|
|
106
116
|
/** @type {number} */
|
|
107
117
|
execTimeout: number;
|
|
108
118
|
/** @type {boolean} */
|
|
109
119
|
logErrors: boolean;
|
|
120
|
+
/** @type {string?} */
|
|
110
121
|
_udid: string | null;
|
|
122
|
+
/** @type {string?} */
|
|
111
123
|
_devicesSetPath: string | null;
|
|
112
124
|
set udid(arg: string | null);
|
|
113
125
|
get udid(): string | null;
|
|
114
126
|
set devicesSetPath(arg: string | null);
|
|
115
127
|
get devicesSetPath(): string | null;
|
|
116
128
|
requireUdid(commandName?: null): string;
|
|
117
|
-
requireXcrun(): Promise<
|
|
129
|
+
requireXcrun(): Promise<string>;
|
|
118
130
|
/**
|
|
119
131
|
* Execute the particular simctl command.
|
|
120
132
|
*
|
|
121
133
|
* @param {string} subcommand - One of available simctl subcommands.
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* @
|
|
125
|
-
*
|
|
134
|
+
* Execute `xcrun simctl` in Terminal to see the full list of available subcommands.
|
|
135
|
+
* @param {ExecOpts} [opts={}]
|
|
136
|
+
* @return {Promise<import('teen_process').TeenProcessExecResult|import('teen_process').SubProcess>}
|
|
137
|
+
* Either the result of teen process's `exec` or
|
|
126
138
|
* `SubProcess` instance depending of `opts.asynchronous` value.
|
|
127
139
|
* @throws {Error} If the simctl subcommand command returns non-zero return code.
|
|
128
140
|
*/
|
|
129
|
-
exec(subcommand: string, opts?:
|
|
141
|
+
exec(subcommand: string, opts?: ExecOpts | undefined): Promise<import("teen_process").TeenProcessExecResult<any> | import('teen_process').SubProcess>;
|
|
130
142
|
}
|
|
131
143
|
//# sourceMappingURL=simctl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simctl.d.ts","sourceRoot":"","sources":["../../lib/simctl.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"simctl.d.ts","sourceRoot":"","sources":["../../lib/simctl.js"],"names":[],"mappings":";;;;;UAoBc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAFpB;;;GAGG;AAEH;;;;;;;;;;;;;;GAcG;AAGH;;;;;;;;;;;;;;;;;GAiBG;AAGH;IAUE;;OAEG;IACH,2CAUC;IAtBD,oBAAoB;IACpB,OADW,KAAK,CACV;IAEN,qBAAqB;IACrB,aADW,MAAM,CACL;IAEZ,sBAAsB;IACtB,WADW,OAAO,CACR;IAWR,sBAAsB;IACtB,OADW,MAAM,QACiC;IAClD,sBAAsB;IACtB,iBADW,MAAM,QAC+D;IAGlF,6BAEC;IAED,0BAEC;IAED,uCAEC;IAED,oCAEC;IAED,wCAMC;IAED,gCAYC;IAED;;;;;;;;;;OAUG;IACH,iBARW,MAAM,gCAGL,QAAQ,oDAA6C,OAAO,cAAc,EAAE,UAAU,CAAC,CA4DlG;CACF"}
|
package/build/lib/simctl.js
CHANGED
|
@@ -41,42 +41,46 @@ const DEFAULT_OPTS = {
|
|
|
41
41
|
execTimeout: helpers_1.DEFAULT_EXEC_TIMEOUT,
|
|
42
42
|
logErrors: true,
|
|
43
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* @typedef {Object} XCRun
|
|
46
|
+
* @property {string?} path Full path to the xcrun script
|
|
47
|
+
*/
|
|
44
48
|
/**
|
|
45
49
|
* @typedef {Object} ExecOpts
|
|
46
|
-
* @property {string[]} args
|
|
50
|
+
* @property {string[]} [args=[]] - The list of additional subcommand arguments.
|
|
47
51
|
* It's empty by default.
|
|
48
|
-
* @property {
|
|
52
|
+
* @property {Record<string, any>} [env={}] - Environment variables mapping. All these variables
|
|
49
53
|
* will be passed Simulator and used in the executing function.
|
|
50
|
-
* @property {boolean} logErrors
|
|
54
|
+
* @property {boolean} [logErrors=true] - Set it to _false_ to throw execution errors
|
|
51
55
|
* immediately without logging any additional information.
|
|
52
|
-
* @property {boolean} asynchronous
|
|
56
|
+
* @property {boolean} [asynchronous=false] - Whether to execute the given command
|
|
53
57
|
* 'synchronously' or 'asynchronously'. Affects the returned result of the function.
|
|
54
|
-
* @property {string
|
|
58
|
+
* @property {string} [encoding] - Explicitly sets streams encoding for the executed
|
|
55
59
|
* command input and outputs.
|
|
56
|
-
* @property {string|string[]} architectures - One or more architecture names to be enforced while
|
|
60
|
+
* @property {string|string[]} [architectures] - One or more architecture names to be enforced while
|
|
57
61
|
* executing xcrun. See https://github.com/appium/appium/issues/18966 for more details.
|
|
58
62
|
*/
|
|
59
63
|
/**
|
|
60
64
|
* @typedef {Object} SimctlOpts
|
|
61
|
-
* @property {
|
|
65
|
+
* @property {XCRun} [xcrun] - The xcrun properties. Currently only one property
|
|
62
66
|
* is supported, which is `path` and it by default contains `null`, which enforces
|
|
63
67
|
* the instance to automatically detect the full path to `xcrun` tool and to throw
|
|
64
68
|
* an exception if it cannot be detected. If the path is set upon instance creation
|
|
65
69
|
* then it is going to be used by `exec` and no autodetection will happen.
|
|
66
|
-
* @property {number} execTimeout
|
|
70
|
+
* @property {number} [execTimeout=600000] - The maximum number of milliseconds
|
|
67
71
|
* to wait for single synchronous xcrun command.
|
|
68
|
-
* @property {boolean} logErrors
|
|
72
|
+
* @property {boolean} [logErrors=true] - Whether to wire xcrun error messages
|
|
69
73
|
* into debug log before throwing them.
|
|
70
|
-
* @property {string?} udid - The unique identifier of the current device, which is
|
|
74
|
+
* @property {string?} [udid] - The unique identifier of the current device, which is
|
|
71
75
|
* going to be implicitly passed to all methods, which require it. It can either be set
|
|
72
76
|
* upon instance creation if it is already known in advance or later when/if needed via the
|
|
73
77
|
* corresponding instance setter.
|
|
74
|
-
* @property {string?} devicesSetPath - Full path to the set of devices that you want to manage.
|
|
78
|
+
* @property {string?} [devicesSetPath] - Full path to the set of devices that you want to manage.
|
|
75
79
|
* By default this path usually equals to ~/Library/Developer/CoreSimulator/Devices
|
|
76
80
|
*/
|
|
77
81
|
class Simctl {
|
|
78
82
|
/**
|
|
79
|
-
* @param {
|
|
83
|
+
* @param {SimctlOpts} [opts={}]
|
|
80
84
|
*/
|
|
81
85
|
constructor(opts = {}) {
|
|
82
86
|
opts = lodash_1.default.cloneDeep(opts);
|
|
@@ -84,7 +88,9 @@ class Simctl {
|
|
|
84
88
|
for (const key of lodash_1.default.keys(DEFAULT_OPTS)) {
|
|
85
89
|
this[key] = opts[key];
|
|
86
90
|
}
|
|
91
|
+
/** @type {string?} */
|
|
87
92
|
this._udid = lodash_1.default.isNil(opts.udid) ? null : opts.udid;
|
|
93
|
+
/** @type {string?} */
|
|
88
94
|
this._devicesSetPath = lodash_1.default.isNil(opts.devicesSetPath) ? null : opts.devicesSetPath;
|
|
89
95
|
}
|
|
90
96
|
set udid(value) {
|
|
@@ -123,17 +129,18 @@ class Simctl {
|
|
|
123
129
|
* Execute the particular simctl command.
|
|
124
130
|
*
|
|
125
131
|
* @param {string} subcommand - One of available simctl subcommands.
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* @
|
|
129
|
-
*
|
|
132
|
+
* Execute `xcrun simctl` in Terminal to see the full list of available subcommands.
|
|
133
|
+
* @param {ExecOpts} [opts={}]
|
|
134
|
+
* @return {Promise<import('teen_process').TeenProcessExecResult|import('teen_process').SubProcess>}
|
|
135
|
+
* Either the result of teen process's `exec` or
|
|
130
136
|
* `SubProcess` instance depending of `opts.asynchronous` value.
|
|
131
137
|
* @throws {Error} If the simctl subcommand command returns non-zero return code.
|
|
132
138
|
*/
|
|
133
139
|
async exec(subcommand, opts = {}) {
|
|
134
140
|
let { args = [], env = {}, asynchronous = false, encoding, logErrors = true, architectures, } = opts;
|
|
135
141
|
// run a particular simctl command
|
|
136
|
-
args = [
|
|
142
|
+
args = [
|
|
143
|
+
'simctl',
|
|
137
144
|
...(this.devicesSetPath ? ['--set', this.devicesSetPath] : []),
|
|
138
145
|
subcommand,
|
|
139
146
|
...args
|
|
@@ -151,7 +158,7 @@ class Simctl {
|
|
|
151
158
|
const xcrun = await this.requireXcrun();
|
|
152
159
|
try {
|
|
153
160
|
let execArgs = [xcrun, args, execOpts];
|
|
154
|
-
if (
|
|
161
|
+
if (architectures?.length) {
|
|
155
162
|
const archArgs = lodash_1.default.flatMap((lodash_1.default.isArray(architectures) ? architectures : [architectures]).map((arch) => ['-arch', arch]));
|
|
156
163
|
execArgs = ['arch', [...archArgs, xcrun, ...args], execOpts];
|
|
157
164
|
}
|
package/build/lib/simctl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simctl.js","sourceRoot":"","sources":["../../lib/simctl.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAuB;AACvB,sEAAiD;AACjD,kDAA0B;AAC1B,mDAA2C;AAC3C,uCAEmB;AACnB,+CAA0D;AAE1D,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAC1C,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE;QACL,IAAI,EAAE,IAAI;KACX;IACD,WAAW,EAAE,8BAAoB;IACjC,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AAGH;;;;;;;;;;;;;;;;;GAiBG;AAGH,MAAM,MAAM;IAUV;;OAE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AW,CAAC,EAAE;IACjD,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;CAC/B;AAED,kBAAe,MAAM,CAAC"}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
export default commands;
|
|
2
2
|
export type BootMonitorOptions = {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* - Simulator booting timeout in ms.
|
|
5
5
|
*/
|
|
6
|
-
timeout
|
|
6
|
+
timeout?: number | undefined;
|
|
7
7
|
/**
|
|
8
8
|
* - This event is fired when data migration stage starts.
|
|
9
9
|
*/
|
|
10
|
-
onWaitingDataMigration
|
|
10
|
+
onWaitingDataMigration?: Function | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* - This event is fired when system app wait stage starts.
|
|
13
13
|
*/
|
|
14
|
-
onWaitingSystemApp
|
|
14
|
+
onWaitingSystemApp?: Function | undefined;
|
|
15
15
|
/**
|
|
16
16
|
* - This event is fired when Simulator is fully booted.
|
|
17
17
|
*/
|
|
18
|
-
onFinished
|
|
18
|
+
onFinished?: Function | undefined;
|
|
19
19
|
/**
|
|
20
20
|
* - This event is fired when there was an error while monitoring the booting process
|
|
21
21
|
* or when the timeout has expired.
|
|
22
22
|
*/
|
|
23
|
-
onError
|
|
23
|
+
onError?: Function | undefined;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Whether to preboot the Simulator
|
|
26
26
|
* if this command is called and it is not already in booted or booting state.
|
|
27
27
|
*/
|
|
28
|
-
shouldPreboot
|
|
28
|
+
shouldPreboot?: boolean | undefined;
|
|
29
29
|
};
|
|
30
30
|
declare namespace commands {
|
|
31
31
|
/**
|
|
32
32
|
* @typedef {Object} BootMonitorOptions
|
|
33
|
-
* @property {number} timeout
|
|
34
|
-
* @property {Function
|
|
35
|
-
* @property {Function
|
|
36
|
-
* @property {Function
|
|
37
|
-
* @property {Function
|
|
33
|
+
* @property {number} [timeout=240000] - Simulator booting timeout in ms.
|
|
34
|
+
* @property {Function} [onWaitingDataMigration] - This event is fired when data migration stage starts.
|
|
35
|
+
* @property {Function} [onWaitingSystemApp] - This event is fired when system app wait stage starts.
|
|
36
|
+
* @property {Function} [onFinished] - This event is fired when Simulator is fully booted.
|
|
37
|
+
* @property {Function} [onError] - This event is fired when there was an error while monitoring the booting process
|
|
38
38
|
* or when the timeout has expired.
|
|
39
|
-
* @property {boolean} shouldPreboot
|
|
39
|
+
* @property {boolean} [shouldPreboot=false] Whether to preboot the Simulator
|
|
40
40
|
* if this command is called and it is not already in booted or booting state.
|
|
41
41
|
*/
|
|
42
42
|
/**
|
|
@@ -45,12 +45,12 @@ declare namespace commands {
|
|
|
45
45
|
* until Simulator booting is completed.
|
|
46
46
|
* The method is only available since Xcode8.
|
|
47
47
|
*
|
|
48
|
-
* @param {
|
|
48
|
+
* @param {BootMonitorOptions} [opts={}] - Monitoring options.
|
|
49
49
|
* @returns {Promise<import('teen_process').SubProcess>} The instance of the corresponding monitoring process.
|
|
50
50
|
* @throws {Error} If the Simulator fails to finish booting within the given timeout and onFinished
|
|
51
51
|
* property is not set.
|
|
52
52
|
* @throws {Error} If the `udid` instance property is unset
|
|
53
53
|
*/
|
|
54
|
-
function startBootMonitor(opts?:
|
|
54
|
+
function startBootMonitor(opts?: BootMonitorOptions | undefined): Promise<import("teen_process").SubProcess>;
|
|
55
55
|
}
|
|
56
56
|
//# sourceMappingURL=bootstatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstatus.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/bootstatus.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bootstatus.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/bootstatus.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMA;;;;;;;;;;OAUG;IAEH;;;;;;;;;;;OAWG;IACH,6GAgFC"}
|
|
@@ -8,13 +8,13 @@ const asyncbox_1 = require("asyncbox");
|
|
|
8
8
|
const commands = {};
|
|
9
9
|
/**
|
|
10
10
|
* @typedef {Object} BootMonitorOptions
|
|
11
|
-
* @property {number} timeout
|
|
12
|
-
* @property {Function
|
|
13
|
-
* @property {Function
|
|
14
|
-
* @property {Function
|
|
15
|
-
* @property {Function
|
|
11
|
+
* @property {number} [timeout=240000] - Simulator booting timeout in ms.
|
|
12
|
+
* @property {Function} [onWaitingDataMigration] - This event is fired when data migration stage starts.
|
|
13
|
+
* @property {Function} [onWaitingSystemApp] - This event is fired when system app wait stage starts.
|
|
14
|
+
* @property {Function} [onFinished] - This event is fired when Simulator is fully booted.
|
|
15
|
+
* @property {Function} [onError] - This event is fired when there was an error while monitoring the booting process
|
|
16
16
|
* or when the timeout has expired.
|
|
17
|
-
* @property {boolean} shouldPreboot
|
|
17
|
+
* @property {boolean} [shouldPreboot=false] Whether to preboot the Simulator
|
|
18
18
|
* if this command is called and it is not already in booted or booting state.
|
|
19
19
|
*/
|
|
20
20
|
/**
|
|
@@ -23,7 +23,7 @@ const commands = {};
|
|
|
23
23
|
* until Simulator booting is completed.
|
|
24
24
|
* The method is only available since Xcode8.
|
|
25
25
|
*
|
|
26
|
-
* @param {
|
|
26
|
+
* @param {BootMonitorOptions} [opts={}] - Monitoring options.
|
|
27
27
|
* @returns {Promise<import('teen_process').SubProcess>} The instance of the corresponding monitoring process.
|
|
28
28
|
* @throws {Error} If the Simulator fails to finish booting within the given timeout and onFinished
|
|
29
29
|
* property is not set.
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export default commands;
|
|
2
2
|
export type SimCreationOpts = {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* - Platform name in order to specify runtime such as 'iOS', 'tvOS', 'watchOS'
|
|
5
5
|
*/
|
|
6
|
-
platform
|
|
6
|
+
platform?: string | undefined;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* - The maximum number of milliseconds to wait
|
|
9
|
+
* unit device creation is completed.
|
|
10
10
|
*/
|
|
11
|
-
timeout
|
|
11
|
+
timeout?: number | undefined;
|
|
12
12
|
};
|
|
13
13
|
declare namespace commands {
|
|
14
14
|
/**
|
|
15
15
|
* @typedef {Object} SimCreationOpts
|
|
16
|
-
* @property {string} platform
|
|
17
|
-
* @property {number} timeout
|
|
16
|
+
* @property {string} [platform='iOS'] - Platform name in order to specify runtime such as 'iOS', 'tvOS', 'watchOS'
|
|
17
|
+
* @property {number} [timeout=10000] - The maximum number of milliseconds to wait
|
|
18
18
|
* unit device creation is completed.
|
|
19
19
|
*/
|
|
20
20
|
/**
|
|
@@ -24,11 +24,11 @@ declare namespace commands {
|
|
|
24
24
|
* @param {string} name - The device name to be created.
|
|
25
25
|
* @param {string} deviceTypeId - Device type, for example 'iPhone 6'.
|
|
26
26
|
* @param {string} platformVersion - Platform version, for example '10.3'.
|
|
27
|
-
* @param {
|
|
27
|
+
* @param {SimCreationOpts} [opts={}] - Simulator options for creating devices.
|
|
28
28
|
* @return {Promise<string>} The UDID of the newly created device.
|
|
29
29
|
* @throws {Error} If the corresponding simctl subcommand command
|
|
30
30
|
* returns non-zero return code.
|
|
31
31
|
*/
|
|
32
|
-
function createDevice(name: string, deviceTypeId: string, platformVersion: string, opts?:
|
|
32
|
+
function createDevice(name: string, deviceTypeId: string, platformVersion: string, opts?: SimCreationOpts | undefined): Promise<string>;
|
|
33
33
|
}
|
|
34
34
|
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/create.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/create.js"],"names":[],"mappings":";;;;;;;;;;;;;IAWA;;;;;OAKG;IAEH;;;;;;;;;;;OAWG;IACH,wIAoFC"}
|
|
@@ -35,8 +35,8 @@ const DEFAULT_CREATE_SIMULATOR_TIMEOUT = 10000;
|
|
|
35
35
|
const commands = {};
|
|
36
36
|
/**
|
|
37
37
|
* @typedef {Object} SimCreationOpts
|
|
38
|
-
* @property {string} platform
|
|
39
|
-
* @property {number} timeout
|
|
38
|
+
* @property {string} [platform='iOS'] - Platform name in order to specify runtime such as 'iOS', 'tvOS', 'watchOS'
|
|
39
|
+
* @property {number} [timeout=10000] - The maximum number of milliseconds to wait
|
|
40
40
|
* unit device creation is completed.
|
|
41
41
|
*/
|
|
42
42
|
/**
|
|
@@ -46,7 +46,7 @@ const commands = {};
|
|
|
46
46
|
* @param {string} name - The device name to be created.
|
|
47
47
|
* @param {string} deviceTypeId - Device type, for example 'iPhone 6'.
|
|
48
48
|
* @param {string} platformVersion - Platform version, for example '10.3'.
|
|
49
|
-
* @param {
|
|
49
|
+
* @param {SimCreationOpts} [opts={}] - Simulator options for creating devices.
|
|
50
50
|
* @return {Promise<string>} The UDID of the newly created device.
|
|
51
51
|
* @throws {Error} If the corresponding simctl subcommand command
|
|
52
52
|
* returns non-zero return code.
|
|
@@ -4,12 +4,12 @@ declare namespace commands {
|
|
|
4
4
|
* Reset the content and settings of the particular Simulator.
|
|
5
5
|
* It is required that Simulator is in _shutdown_ state.
|
|
6
6
|
*
|
|
7
|
-
* @param {number} timeout
|
|
7
|
+
* @param {number} [timeout=10000] - The maximum number of milliseconds to wait
|
|
8
8
|
* unit device reset is completed.
|
|
9
9
|
* @throws {Error} If the corresponding simctl subcommand command
|
|
10
10
|
* returns non-zero return code.
|
|
11
11
|
* @throws {Error} If the `udid` instance property is unset
|
|
12
12
|
*/
|
|
13
|
-
function eraseDevice(timeout?: number): Promise<void>;
|
|
13
|
+
function eraseDevice(timeout?: number | undefined): Promise<void>;
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=erase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"erase.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/erase.js"],"names":[],"mappings":";;IAIA;;;;;;;;;OASG;IACH,
|
|
1
|
+
{"version":3,"file":"erase.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/erase.js"],"names":[],"mappings":";;IAIA;;;;;;;;;OASG;IACH,kEAQC"}
|
|
@@ -6,7 +6,7 @@ const commands = {};
|
|
|
6
6
|
* Reset the content and settings of the particular Simulator.
|
|
7
7
|
* It is required that Simulator is in _shutdown_ state.
|
|
8
8
|
*
|
|
9
|
-
* @param {number} timeout
|
|
9
|
+
* @param {number} [timeout=10000] - The maximum number of milliseconds to wait
|
|
10
10
|
* unit device reset is completed.
|
|
11
11
|
* @throws {Error} If the corresponding simctl subcommand command
|
|
12
12
|
* returns non-zero return code.
|
|
@@ -8,7 +8,7 @@ declare namespace commands {
|
|
|
8
8
|
* It is required that Simulator is in _booted_ state.
|
|
9
9
|
*
|
|
10
10
|
* @param {string} bundleId - Bundle identifier of an application.
|
|
11
|
-
* @param {string?} containerType - Which container type to return. Possible values
|
|
11
|
+
* @param {string?} [containerType=null] - Which container type to return. Possible values
|
|
12
12
|
* are 'app', 'data', 'groups', '<A specific App Group container>'.
|
|
13
13
|
* The default value is 'app'.
|
|
14
14
|
* @return {Promise<string>} Full path to the given application container on the local
|
|
@@ -17,6 +17,6 @@ declare namespace commands {
|
|
|
17
17
|
* returns non-zero return code.
|
|
18
18
|
* @throws {Error} If the `udid` instance property is unset
|
|
19
19
|
*/
|
|
20
|
-
function getAppContainer(bundleId: string, containerType?: string | null): Promise<string>;
|
|
20
|
+
function getAppContainer(bundleId: string, containerType?: string | null | undefined): Promise<string>;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=get_app_container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_app_container.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/get_app_container.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;;;;;OAgBG;IACH,
|
|
1
|
+
{"version":3,"file":"get_app_container.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/get_app_container.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;;;;;OAgBG;IACH,uGAOC"}
|
|
@@ -9,7 +9,7 @@ const commands = {};
|
|
|
9
9
|
* It is required that Simulator is in _booted_ state.
|
|
10
10
|
*
|
|
11
11
|
* @param {string} bundleId - Bundle identifier of an application.
|
|
12
|
-
* @param {string?} containerType - Which container type to return. Possible values
|
|
12
|
+
* @param {string?} [containerType=null] - Which container type to return. Possible values
|
|
13
13
|
* are 'app', 'data', 'groups', '<A specific App Group container>'.
|
|
14
14
|
* The default value is 'app'.
|
|
15
15
|
* @return {Promise<string>} Full path to the given application container on the local
|