node-simctl 7.5.5 → 7.6.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 +6 -0
- package/build/lib/simctl.d.ts +11 -2
- package/build/lib/simctl.d.ts.map +1 -1
- package/build/lib/simctl.js +6 -3
- package/build/lib/simctl.js.map +1 -1
- package/lib/simctl.js +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [7.6.0](https://github.com/appium/node-simctl/compare/v7.5.5...v7.6.0) (2024-08-31)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* add timeout option for exec ([#254](https://github.com/appium/node-simctl/issues/254)) ([1c2e1d8](https://github.com/appium/node-simctl/commit/1c2e1d829815f1e465c0497b0e87914e56222e8e))
|
|
6
|
+
|
|
1
7
|
## [7.5.5](https://github.com/appium/node-simctl/compare/v7.5.4...v7.5.5) (2024-08-29)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/build/lib/simctl.d.ts
CHANGED
|
@@ -39,6 +39,12 @@ export type ExecOpts = {
|
|
|
39
39
|
* executing xcrun. See https://github.com/appium/appium/issues/18966 for more details.
|
|
40
40
|
*/
|
|
41
41
|
architectures?: string | string[] | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* - The maximum number of milliseconds
|
|
44
|
+
* to wait for single synchronous xcrun command. If not provided explicitly, then
|
|
45
|
+
* the value of execTimeout property is used by default.
|
|
46
|
+
*/
|
|
47
|
+
timeout?: number | undefined;
|
|
42
48
|
};
|
|
43
49
|
export type SimctlOpts = {
|
|
44
50
|
/**
|
|
@@ -50,7 +56,7 @@ export type SimctlOpts = {
|
|
|
50
56
|
*/
|
|
51
57
|
xcrun?: XCRun | undefined;
|
|
52
58
|
/**
|
|
53
|
-
* - The maximum number of milliseconds
|
|
59
|
+
* - The default maximum number of milliseconds
|
|
54
60
|
* to wait for single synchronous xcrun command.
|
|
55
61
|
*/
|
|
56
62
|
execTimeout?: number | undefined;
|
|
@@ -93,6 +99,9 @@ export type SimctlOpts = {
|
|
|
93
99
|
* command input and outputs.
|
|
94
100
|
* @property {string|string[]} [architectures] - One or more architecture names to be enforced while
|
|
95
101
|
* executing xcrun. See https://github.com/appium/appium/issues/18966 for more details.
|
|
102
|
+
* @property {number} [timeout] - The maximum number of milliseconds
|
|
103
|
+
* to wait for single synchronous xcrun command. If not provided explicitly, then
|
|
104
|
+
* the value of execTimeout property is used by default.
|
|
96
105
|
*/
|
|
97
106
|
/**
|
|
98
107
|
* @typedef {Object} SimctlOpts
|
|
@@ -101,7 +110,7 @@ export type SimctlOpts = {
|
|
|
101
110
|
* the instance to automatically detect the full path to `xcrun` tool and to throw
|
|
102
111
|
* an exception if it cannot be detected. If the path is set upon instance creation
|
|
103
112
|
* then it is going to be used by `exec` and no autodetection will happen.
|
|
104
|
-
* @property {number} [execTimeout=600000] - The maximum number of milliseconds
|
|
113
|
+
* @property {number} [execTimeout=600000] - The default maximum number of milliseconds
|
|
105
114
|
* to wait for single synchronous xcrun command.
|
|
106
115
|
* @property {boolean} [logErrors=true] - Whether to wire xcrun error messages
|
|
107
116
|
* into debug log before throwing them.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simctl.d.ts","sourceRoot":"","sources":["../../lib/simctl.js"],"names":[],"mappings":";;;;;UA4Cc,MAAM,OAAC;;yBAIR;IAAC,YAAY,EAAE,IAAI,CAAA;CAAC
|
|
1
|
+
{"version":3,"file":"simctl.d.ts","sourceRoot":"","sources":["../../lib/simctl.js"],"names":[],"mappings":";;;;;UA4Cc,MAAM,OAAC;;yBAIR;IAAC,YAAY,EAAE,IAAI,CAAA;CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AANjC;;;GAGG;AAEH;;GAEG;AAEH;;;;;;;;;;;;;;;;;GAiBG;A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T_OPTS = {
|
|
|
86
86
|
* command input and outputs.
|
|
87
87
|
* @property {string|string[]} [architectures] - One or more architecture names to be enforced while
|
|
88
88
|
* executing xcrun. See https://github.com/appium/appium/issues/18966 for more details.
|
|
89
|
+
* @property {number} [timeout] - The maximum number of milliseconds
|
|
90
|
+
* to wait for single synchronous xcrun command. If not provided explicitly, then
|
|
91
|
+
* the value of execTimeout property is used by default.
|
|
89
92
|
*/
|
|
90
93
|
/**
|
|
91
94
|
* @typedef {Object} SimctlOpts
|
|
@@ -94,7 +97,7 @@ const DEFAULT_OPTS = {
|
|
|
94
97
|
* the instance to automatically detect the full path to `xcrun` tool and to throw
|
|
95
98
|
* an exception if it cannot be detected. If the path is set upon instance creation
|
|
96
99
|
* then it is going to be used by `exec` and no autodetection will happen.
|
|
97
|
-
* @property {number} [execTimeout=600000] - The maximum number of milliseconds
|
|
100
|
+
* @property {number} [execTimeout=600000] - The default maximum number of milliseconds
|
|
98
101
|
* to wait for single synchronous xcrun command.
|
|
99
102
|
* @property {boolean} [logErrors=true] - Whether to wire xcrun error messages
|
|
100
103
|
* into debug log before throwing them.
|
|
@@ -209,7 +212,7 @@ class Simctl {
|
|
|
209
212
|
* @throws {Error} If the simctl subcommand command returns non-zero return code.
|
|
210
213
|
*/
|
|
211
214
|
async exec(subcommand, opts) {
|
|
212
|
-
let { args = [], env = {}, asynchronous = false, encoding, logErrors = true, architectures, } = opts ?? {};
|
|
215
|
+
let { args = [], env = {}, asynchronous = false, encoding, logErrors = true, architectures, timeout, } = opts ?? {};
|
|
213
216
|
// run a particular simctl command
|
|
214
217
|
args = [
|
|
215
218
|
'simctl',
|
|
@@ -225,7 +228,7 @@ class Simctl {
|
|
|
225
228
|
encoding,
|
|
226
229
|
};
|
|
227
230
|
if (!asynchronous) {
|
|
228
|
-
execOpts.timeout = this.execTimeout;
|
|
231
|
+
execOpts.timeout = timeout || this.execTimeout;
|
|
229
232
|
}
|
|
230
233
|
const xcrun = await this.requireXcrun();
|
|
231
234
|
try {
|
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,kDAA0B;AAC1B,mDAA2C;AAC3C,uCAEmB;AACnB,+CAA0D;AAC1D,sEAAsD;AACtD,oEAAoD;AACpD,8DAA8C;AAC9C,0EAA0D;AAC1D,kEAAkD;AAClD,kEAAkD;AAClD,gEAAgD;AAChD,wFAAsE;AACtE,oEAAoD;AACpD,0DAA0C;AAC1C,sEAAsD;AACtD,kEAAkD;AAClD,8DAA8C;AAC9C,oEAAoD;AACpD,kEAAkD;AAClD,oEAAoD;AACpD,oEAAoD;AACpD,8DAA8C;AAC9C,kEAA+C;AAC/C,sEAAsD;AACtD,gEAAgD;AAChD,wEAAwD;AACxD,0DAA0C;AAC1C,wEAAwD;AACxD,sEAAsD;AAEtD,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;;;GAGG;AAEH;;GAEG;AAEH
|
|
1
|
+
{"version":3,"file":"simctl.js","sourceRoot":"","sources":["../../lib/simctl.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAuB;AACvB,kDAA0B;AAC1B,mDAA2C;AAC3C,uCAEmB;AACnB,+CAA0D;AAC1D,sEAAsD;AACtD,oEAAoD;AACpD,8DAA8C;AAC9C,0EAA0D;AAC1D,kEAAkD;AAClD,kEAAkD;AAClD,gEAAgD;AAChD,wFAAsE;AACtE,oEAAoD;AACpD,0DAA0C;AAC1C,sEAAsD;AACtD,kEAAkD;AAClD,8DAA8C;AAC9C,oEAAoD;AACpD,kEAAkD;AAClD,oEAAoD;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
63
63
|
* command input and outputs.
|
|
64
64
|
* @property {string|string[]} [architectures] - One or more architecture names to be enforced while
|
|
65
65
|
* executing xcrun. See https://github.com/appium/appium/issues/18966 for more details.
|
|
66
|
+
* @property {number} [timeout] - The maximum number of milliseconds
|
|
67
|
+
* to wait for single synchronous xcrun command. If not provided explicitly, then
|
|
68
|
+
* the value of execTimeout property is used by default.
|
|
66
69
|
*/
|
|
67
70
|
|
|
68
71
|
/**
|
|
@@ -72,7 +75,7 @@ const DEFAULT_OPTS = {
|
|
|
72
75
|
* the instance to automatically detect the full path to `xcrun` tool and to throw
|
|
73
76
|
* an exception if it cannot be detected. If the path is set upon instance creation
|
|
74
77
|
* then it is going to be used by `exec` and no autodetection will happen.
|
|
75
|
-
* @property {number} [execTimeout=600000] - The maximum number of milliseconds
|
|
78
|
+
* @property {number} [execTimeout=600000] - The default maximum number of milliseconds
|
|
76
79
|
* to wait for single synchronous xcrun command.
|
|
77
80
|
* @property {boolean} [logErrors=true] - Whether to wire xcrun error messages
|
|
78
81
|
* into debug log before throwing them.
|
|
@@ -175,6 +178,7 @@ class Simctl {
|
|
|
175
178
|
encoding,
|
|
176
179
|
logErrors = true,
|
|
177
180
|
architectures,
|
|
181
|
+
timeout,
|
|
178
182
|
} = opts ?? {};
|
|
179
183
|
// run a particular simctl command
|
|
180
184
|
args = [
|
|
@@ -196,7 +200,7 @@ class Simctl {
|
|
|
196
200
|
encoding,
|
|
197
201
|
};
|
|
198
202
|
if (!asynchronous) {
|
|
199
|
-
execOpts.timeout = this.execTimeout;
|
|
203
|
+
execOpts.timeout = timeout || this.execTimeout;
|
|
200
204
|
}
|
|
201
205
|
const xcrun = await this.requireXcrun();
|
|
202
206
|
try {
|