node-simctl 7.5.2 → 7.5.3

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/lib/helpers.js +3 -3
  3. package/build/lib/helpers.js.map +1 -1
  4. package/build/lib/simctl.d.ts +5 -5
  5. package/build/lib/simctl.d.ts.map +1 -1
  6. package/build/lib/subcommands/addmedia.d.ts.map +1 -1
  7. package/build/lib/subcommands/appinfo.d.ts.map +1 -1
  8. package/build/lib/subcommands/bootstatus.d.ts.map +1 -1
  9. package/build/lib/subcommands/bootstatus.js +20 -15
  10. package/build/lib/subcommands/bootstatus.js.map +1 -1
  11. package/build/lib/subcommands/create.d.ts.map +1 -1
  12. package/build/lib/subcommands/get_app_container.d.ts.map +1 -1
  13. package/build/lib/subcommands/getenv.d.ts.map +1 -1
  14. package/build/lib/subcommands/install.d.ts.map +1 -1
  15. package/build/lib/subcommands/io.d.ts.map +1 -1
  16. package/build/lib/subcommands/keychain.d.ts.map +1 -1
  17. package/build/lib/subcommands/launch.d.ts.map +1 -1
  18. package/build/lib/subcommands/list.d.ts +1 -1
  19. package/build/lib/subcommands/list.d.ts.map +1 -1
  20. package/build/lib/subcommands/location.d.ts.map +1 -1
  21. package/build/lib/subcommands/openurl.d.ts.map +1 -1
  22. package/build/lib/subcommands/pbcopy.d.ts.map +1 -1
  23. package/build/lib/subcommands/pbpaste.d.ts.map +1 -1
  24. package/build/lib/subcommands/privacy.d.ts.map +1 -1
  25. package/build/lib/subcommands/spawn.d.ts +2 -2
  26. package/build/lib/subcommands/spawn.d.ts.map +1 -1
  27. package/build/lib/subcommands/terminate.d.ts.map +1 -1
  28. package/build/lib/subcommands/ui.d.ts.map +1 -1
  29. package/build/lib/subcommands/uninstall.d.ts.map +1 -1
  30. package/lib/subcommands/bootstatus.js +20 -15
  31. package/package.json +2 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [7.5.3](https://github.com/appium/node-simctl/compare/v7.5.2...v7.5.3) (2024-07-03)
2
+
3
+ ### Miscellaneous Chores
4
+
5
+ * Simplify booting status monitoring ([#250](https://github.com/appium/node-simctl/issues/250)) ([508a2e5](https://github.com/appium/node-simctl/commit/508a2e55021c8bc8119c07ba20fbc2073bd84192))
6
+
1
7
  ## [7.5.2](https://github.com/appium/node-simctl/compare/v7.5.1...v7.5.2) (2024-06-18)
2
8
 
3
9
  ### Miscellaneous Chores
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getXcrunBinary = exports.normalizeVersion = exports.SIM_RUNTIME_NAME = exports.DEFAULT_EXEC_TIMEOUT = void 0;
6
+ exports.SIM_RUNTIME_NAME = exports.DEFAULT_EXEC_TIMEOUT = void 0;
7
+ exports.normalizeVersion = normalizeVersion;
8
+ exports.getXcrunBinary = getXcrunBinary;
7
9
  const semver_1 = __importDefault(require("semver"));
8
10
  exports.DEFAULT_EXEC_TIMEOUT = 10 * 60 * 1000; // ms
9
11
  exports.SIM_RUNTIME_NAME = 'com.apple.CoreSimulator.SimRuntime.';
@@ -22,12 +24,10 @@ function normalizeVersion(version) {
22
24
  }
23
25
  return `${semverVersion.major}.${semverVersion.minor}`;
24
26
  }
25
- exports.normalizeVersion = normalizeVersion;
26
27
  /**
27
28
  * @returns {string}
28
29
  */
29
30
  function getXcrunBinary() {
30
31
  return process.env.XCRUN_BINARY || 'xcrun';
31
32
  }
32
- exports.getXcrunBinary = getXcrunBinary;
33
33
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
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,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,4BAA4B,OAAO,GAAG,CAAC,CAAC;IAC1D,CAAC;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"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.js"],"names":[],"mappings":";;;;;;AAaA,4CAMC;AAKD,wCAEC;AA1BD,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,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,4BAA4B,OAAO,GAAG,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,GAAG,aAAa,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,EAAE,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,SAAgB,cAAc;IAC5B,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC;AAC7C,CAAC"}
@@ -152,11 +152,11 @@ export class Simctl {
152
152
  * `SubProcess` instance depending of `opts.asynchronous` value.
153
153
  * @throws {Error} If the simctl subcommand command returns non-zero return code.
154
154
  */
155
- exec<TExecOpts extends ExecOpts>(subcommand: string, opts?: TExecOpts | undefined): Promise<TExecOpts extends TAsyncOpts ? SubProcess : import("teen_process").TeenProcessExecResult<any>>;
155
+ exec<TExecOpts extends ExecOpts>(subcommand: string, opts?: TExecOpts | undefined): Promise<TExecOpts extends TAsyncOpts ? import("teen_process").SubProcess : import("teen_process").TeenProcessExecResult<any>>;
156
156
  addMedia: (this: Simctl, filePath: string) => Promise<import("teen_process").TeenProcessExecResult<any>>;
157
157
  appInfo: (this: Simctl, bundleId: string) => Promise<string>;
158
158
  bootDevice: (this: Simctl) => Promise<void>;
159
- startBootMonitor: (this: Simctl, opts?: import("./subcommands/bootstatus").BootMonitorOptions | undefined) => Promise<SubProcess>;
159
+ startBootMonitor: (this: Simctl, opts?: import("./subcommands/bootstatus").BootMonitorOptions | undefined) => Promise<import("teen_process").SubProcess>;
160
160
  createDevice: (this: Simctl, name: string, deviceTypeId: string, platformVersion: string, opts?: import("./subcommands/create").SimCreationOpts | undefined) => Promise<string>;
161
161
  deleteDevice: (this: Simctl) => Promise<void>;
162
162
  eraseDevice: (this: Simctl, timeout?: number | undefined) => Promise<void>;
@@ -169,7 +169,7 @@ export class Simctl {
169
169
  resetKeychain: (this: Simctl) => Promise<void>;
170
170
  launchApp: (this: Simctl, bundleId: string, tries?: number | undefined) => Promise<string>;
171
171
  getDevicesByParsing: (this: Simctl, platform?: string | null | undefined) => Promise<Record<string, any>>;
172
- getDevices: (this: Simctl, forSdk?: string | null | undefined, platform?: string | null | undefined) => Promise<any>;
172
+ getDevices: (this: Simctl, forSdk?: string | null | undefined, platform?: string | null | undefined) => Promise<any | DeviceInfo[]>;
173
173
  getRuntimeForPlatformVersionViaJson: (this: Simctl, platformVersion: string, platform?: string | undefined) => Promise<string>;
174
174
  getRuntimeForPlatformVersion: (this: Simctl, platformVersion: string, platform?: string | undefined) => Promise<string>;
175
175
  getDeviceTypes: (this: Simctl) => Promise<string[]>;
@@ -184,8 +184,8 @@ export class Simctl {
184
184
  resetPermission: (this: Simctl, bundleId: string, perm: string) => Promise<void>;
185
185
  pushNotification: (this: Simctl, payload: any) => Promise<void>;
186
186
  shutdownDevice: (this: Simctl) => Promise<void>;
187
- spawnProcess: (this: Simctl, args: string | string[], env?: any) => Promise<import("teen_process").TeenProcessExecResult<any>>;
188
- spawnSubProcess: (this: Simctl, args: string | string[], env?: any) => Promise<SubProcess>;
187
+ spawnProcess: (this: Simctl, args: string | string[], env?: object) => Promise<import("teen_process").TeenProcessExecResult<any>>;
188
+ spawnSubProcess: (this: Simctl, args: string | string[], env?: object) => Promise<import("teen_process").SubProcess>;
189
189
  terminateApp: (this: Simctl, bundleId: string) => Promise<void>;
190
190
  getAppearance: (this: Simctl) => Promise<string>;
191
191
  setAppearance: (this: Simctl, appearance: string) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"simctl.d.ts","sourceRoot":"","sources":["../../lib/simctl.js"],"names":[],"mappings":";;;;;UA4Cc,MAAM;;yBAIP;IAAC,YAAY,EAAE,IAAI,CAAA;CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AANjC;;;GAGG;AAEH;;GAEG;AAEH;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;;;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,+BAEC;IAED,0BAEC;IAED,yCAEC;IAED,oCAEC;IAED;;;OAGG;IACH,sDAFa,MAAM,CAQlB;IAED;;OAEG;IACH,gBAFa,QAAQ,MAAM,CAAC,CAc3B;IAED;;;;;;;;;;;OAWG;IACH,6CARW,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;IACH,gBAFa,OAAO,CAAC,MAAM,CAAC,CAc3B;IAED;;;;;;;;;;;OAWG;IACH,KATwB,SAAS,SAAnB,QAAS,cACZ,MAAM,iCAGL,OAAO,CAAC,SAAS,SAAS,UAAU,GAAG,OAAO,cAAc,EAAE,UAAU,GAAG,iDAA4C,CAAC,CA4DnI;IAED,yGAAqC;IAErC,6DAAkC;IAElC,4CAAqC;IAErC,6HA/MqC,cAClC,cA8MoD;IAEvD,gLAA2C;IAE3C,8CAA2C;IAE3C,2EAAwC;IAExC,gHAA0D;IAE1D,kEAA4B;IAE5B,6DAAwC;IAExC,iDAAyC;IAEzC,mIAAyD;IACzD,+HAAiD;IACjD,+CAA+C;IAE/C,2FAAqC;IAErC,0GAAuD;IACvD,oIAAqC;IACrC,+HAAuF;IACvF,wHAAyE;IACzE,oDAA6C;IAC7C,qCAAyB;IAEzB,oGAA2C;IAC3C,+CAA+C;IAE/C,mGAAkC;IAElC,uGAA6C;IAE7C,gFAA8C;IAE9C,iFAAkD;IAClD,kFAAoD;IACpD,iFAAkD;IAElD,gEAAiD;IAEjD,gDAAiD;IAEjD,kIAA0C;IAC1C,yFA9PD,cAAc,cA8PmC;IAEhD,gEAA8C;IAE9C,iDAAyC;IACzC,mEAAyC;IAEzC,6DAAwC;CACzC;2BAzR0C,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"addmedia.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/addmedia.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;OAWG;IACH,mIAIC"}
1
+ {"version":3,"file":"addmedia.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/addmedia.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;OAWG;IACH,+DAPW,MAAM,GAEL,OAAO,CAAC,iDAA4C,CAAC,CAShE"}
@@ -1 +1 @@
1
- {"version":3,"file":"appinfo.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/appinfo.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,uFAKC"}
1
+ {"version":3,"file":"appinfo.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/appinfo.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,8DAjCW,MAAM,GACL,OAAO,CAAC,MAAM,CAAC,CAqC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"bootstatus.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/bootstatus.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMA;;;;;;;;;;OAUG;IAEH;;;;;;;;;;;;OAYG;IACH,gJAgFC"}
1
+ {"version":3,"file":"bootstatus.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/bootstatus.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMA;;;;;;;;;;OAUG;IAEH;;;;;;;;;;;;OAYG;IACH,qGALa,OAAO,CAAC,OAAO,cAAc,EAAE,UAAU,CAAC,CA0FtD"}
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const logger_1 = __importDefault(require("../logger"));
7
7
  const asyncbox_1 = require("asyncbox");
8
+ const lodash_1 = __importDefault(require("lodash"));
8
9
  const commands = {};
9
10
  /**
10
11
  * @typedef {Object} BootMonitorOptions
@@ -33,7 +34,8 @@ const commands = {};
33
34
  commands.startBootMonitor = async function startBootMonitor(opts = {}) {
34
35
  const { timeout = 240000, onWaitingDataMigration, onWaitingSystemApp, onFinished, onError, shouldPreboot, } = opts;
35
36
  const udid = this.requireUdid('bootstatus');
36
- let status = '';
37
+ /** @type {string[]} */
38
+ const status = [];
37
39
  let isBootingFinished = false;
38
40
  let error = null;
39
41
  let timeoutHandler = null;
@@ -45,18 +47,19 @@ commands.startBootMonitor = async function startBootMonitor(opts = {}) {
45
47
  args,
46
48
  asynchronous: true,
47
49
  });
48
- bootMonitor.on('output', (stdout, stderr) => {
49
- status += stdout || stderr;
50
- if (stdout) {
51
- if (stdout.includes('Waiting on Data Migration') && onWaitingDataMigration) {
52
- onWaitingDataMigration();
53
- }
54
- else if (stdout.includes('Waiting on System App') && onWaitingSystemApp) {
55
- onWaitingSystemApp();
56
- }
50
+ const onStreamLine = (/** @type {string} */ line) => {
51
+ status.push(line);
52
+ if (onWaitingDataMigration && line.includes('Waiting on Data Migration')) {
53
+ onWaitingDataMigration();
57
54
  }
58
- });
59
- bootMonitor.on('exit', (code, signal) => {
55
+ else if (onWaitingSystemApp && line.includes('Waiting on System App')) {
56
+ onWaitingSystemApp();
57
+ }
58
+ };
59
+ for (const streamName of ['stdout', 'stderr']) {
60
+ bootMonitor.on(`line-${streamName}`, onStreamLine);
61
+ }
62
+ bootMonitor.once('exit', (code, signal) => {
60
63
  if (timeoutHandler) {
61
64
  clearTimeout(timeoutHandler);
62
65
  }
@@ -67,8 +70,10 @@ commands.startBootMonitor = async function startBootMonitor(opts = {}) {
67
70
  isBootingFinished = true;
68
71
  }
69
72
  else {
70
- status = status || signal;
71
- error = new Error(status);
73
+ const errMessage = lodash_1.default.isEmpty(status)
74
+ ? `The simulator booting process has exited with code ${code} by signal ${signal}`
75
+ : status.join('\n');
76
+ error = new Error(errMessage);
72
77
  if (onError) {
73
78
  onError(error);
74
79
  }
@@ -102,7 +107,7 @@ commands.startBootMonitor = async function startBootMonitor(opts = {}) {
102
107
  await stopMonitor();
103
108
  const [seconds] = process.hrtime(start);
104
109
  throw new Error(`The simulator ${udid} has failed to finish booting after ${seconds}s. ` +
105
- `Original status: ${status}`);
110
+ `Original status: ${status.join('\n')}`);
106
111
  }
107
112
  }
108
113
  return bootMonitor;
@@ -1 +1 @@
1
- {"version":3,"file":"bootstatus.js","sourceRoot":"","sources":["../../../lib/subcommands/bootstatus.js"],"names":[],"mappings":";;;;;AAAA,uDAA4B;AAC5B,uCAA4C;AAG5C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;IACH,2KAoFC"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/create.js"],"names":[],"mappings":";;;;;;;;;;;;;IAWA;;;;;OAKG;IAEH;;;;;;;;;;;;OAYG;IACH,+DARW,MAAM,gBACN,MAAM,mBACN,MAAM,uCAEL,OAAO,CAAC,MAAM,CAAC,CAwF1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"get_app_container.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/get_app_container.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;;;;;;OAiBG;IACH,0IAOC"}
1
+ {"version":3,"file":"get_app_container.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/get_app_container.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;;;;;;OAiBG;IACH,sEAVW,MAAM,8CAIL,OAAO,CAAC,MAAM,CAAC,CAa1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"getenv.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/getenv.js"],"names":[],"mappings":";;IAEA;;;;;;;;;OASG;IACH,4FAMC"}
1
+ {"version":3,"file":"getenv.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/getenv.js"],"names":[],"mappings":";;IAEA;;;;;;;;;OASG;IACH,4DANW,MAAM,GACJ,OAAO,CAAC,MAAM,GAAC,IAAI,CAAC,CAWhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/install.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;OAUG;IACH,uFAIC"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/install.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;OAUG;IACH,gEANW,MAAM,iBAUhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/io.js"],"names":[],"mappings":";;IAQA;;;;;;;;;;OAUG;IACH,2EAWC"}
1
+ {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/io.js"],"names":[],"mappings":";;IAQA;;;;;;;;;;OAUG;IACH,2DALY,OAAO,CAAC,MAAM,CAAC,CAgB1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"keychain.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/keychain.js"],"names":[],"mappings":";;;;;;;;;;IA6BA;;;;;OAKG;IAEH;;;;;;;;;;;;OAYG;IACH,4HAYC;IAED;;;;;;;;;;;;OAYG;IACH,wHAYC;IAED;;;;;;;;OAQG;IACH,yEAIC"}
1
+ {"version":3,"file":"keychain.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/keychain.js"],"names":[],"mappings":";;;;;;;;;;IA6BA;;;;;OAKG;IAEH;;;;;;;;;;;;OAYG;IACH,qEARW,MAAM,iDAoBhB;IAED;;;;;;;;;;;;OAYG;IACH,iEARW,MAAM,iDAoBhB;IAED;;;;;;;;OAQG;IACH,yEAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/launch.js"],"names":[],"mappings":";;IAKA;;;;;;;;;;;;;;OAcG;IACH,qHAQC"}
1
+ {"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/launch.js"],"names":[],"mappings":";;IAKA;;;;;;;;;;;;;;OAcG;IACH,gEATW,MAAM,+BAIL,OAAO,CAAC,MAAM,CAAC,CAa1B"}
@@ -55,7 +55,7 @@ declare namespace commands {
55
55
  * returns non-zero return code or if no matching
56
56
  * platform version is found in the system.
57
57
  */
58
- function getDevices(this: import("../simctl").default, forSdk?: string | null | undefined, platform?: string | null | undefined): Promise<any>;
58
+ function getDevices(this: import("../simctl").default, forSdk?: string | null | undefined, platform?: string | null | undefined): Promise<any | DeviceInfo[]>;
59
59
  /**
60
60
  * Get the runtime for the particular platform version using --json flag
61
61
  *
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/list.js"],"names":[],"mappings":";;;;;UASc,MAAM;;;;UACN,MAAM;;;;WACN,MAAM;;;;SACN,MAAM;;;IALpB;;;;;;OAMG;IAEH;;;;;;;;;;;OAWG;IACH,oIA2DC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,+IAmEC;IAED;;;;;;;;;OASG;IACH,yJAYC;IAED;;;;;;;;;OASG;IACH,kJAoBC;IAED;;;;;;OAMG;IACH,8EAqBC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,+DASC"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/list.js"],"names":[],"mappings":";;;;;UASc,MAAM;;;;UACN,MAAM;;;;WACN,MAAM;;;;SACN,MAAM;;;IALpB;;;;;;OAMG;IAEH;;;;;;;;;;;OAWG;IACH,uGANY,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAiEvC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,kIARY,OAAO,CAAC,MAAO,UAAU,EAAE,CAAC,CA2EvC;IAED;;;;;;;;;OASG;IACH,iGANW,MAAM,kCAGL,OAAO,CAAC,MAAM,CAAC,CAe1B;IAED;;;;;;;;;OASG;IACH,0FANW,MAAM,kCAGL,OAAO,CAAC,MAAM,CAAC,CAuB1B;IAED;;;;;;OAMG;IACH,4DAHY,OAAO,CAAC,MAAM,EAAE,CAAC,CAwB5B;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,kDA/BY,OAAO,KAAQ,CAwC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/location.js"],"names":[],"mappings":";;IAiBA;;;;;;;;;;OAUG;IACH,8HAMC;IAED;;;;;OAKG;IACH,yEAIC"}
1
+ {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/location.js"],"names":[],"mappings":";;IAiBA;;;;;;;;;;OAUG;IACH,kEANW,MAAM,GAAC,MAAM,aACb,MAAM,GAAC,MAAM,iBAWvB;IAED;;;;;OAKG;IACH,yEAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"openurl.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/openurl.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;OAYG;IACH,6HAIC"}
1
+ {"version":3,"file":"openurl.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/openurl.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;OAYG;IACH,yDAPW,MAAM,GAEL,OAAO,CAAC,iDAA4C,CAAC,CAShE"}
@@ -1 +1 @@
1
- {"version":3,"file":"pbcopy.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/pbcopy.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;OAYG;IACH,iIAcC"}
1
+ {"version":3,"file":"pbcopy.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/pbcopy.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;OAYG;IACH,mEAPW,MAAM,wDAqBhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"pbpaste.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/pbpaste.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;OAYG;IACH,0GAMC"}
1
+ {"version":3,"file":"pbpaste.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/pbpaste.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;OAYG;IACH,0FALY,OAAO,CAAC,MAAM,CAAC,CAW1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"privacy.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/privacy.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,2GAIC;IAED;;;;;;;;;;;;OAYG;IACH,4GAIC;IAED;;;;;;;;;;;;OAYG;IACH,2GAIC"}
1
+ {"version":3,"file":"privacy.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/privacy.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,sEApBW,MAAM,QAEN,MAAM,iBAsBhB;IAED;;;;;;;;;;;;OAYG;IACH,uEAPW,MAAM,QAEN,MAAM,iBAShB;IAED;;;;;;;;;;;;OAYG;IACH,sEAPW,MAAM,QAEN,MAAM,iBAShB"}
@@ -12,7 +12,7 @@ declare namespace commands {
12
12
  * returns non-zero return code.
13
13
  * @throws {Error} If the `udid` instance property is unset
14
14
  */
15
- function spawnProcess(this: import("../simctl").default, args: string | string[], env?: any): Promise<import("teen_process").TeenProcessExecResult<any>>;
15
+ function spawnProcess(this: import("../simctl").default, args: string | string[], env?: object): Promise<import("teen_process").TeenProcessExecResult<any>>;
16
16
  /**
17
17
  * Prepare SubProcess instance for a new process, which is going to be spawned
18
18
  * on Simulator.
@@ -23,6 +23,6 @@ declare namespace commands {
23
23
  * @return {Promise<import('teen_process').SubProcess>} The instance of the process to be spawned.
24
24
  * @throws {Error} If the `udid` instance property is unset
25
25
  */
26
- function spawnSubProcess(this: import("../simctl").default, args: string | string[], env?: any): Promise<import("teen_process").SubProcess>;
26
+ function spawnSubProcess(this: import("../simctl").default, args: string | string[], env?: object): Promise<import("teen_process").SubProcess>;
27
27
  }
28
28
  //# sourceMappingURL=spawn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/spawn.js"],"names":[],"mappings":";;IAKA;;;;;;;;;;;OAWG;IACH,yJASC;IAED;;;;;;;;;OASG;IACH,4IAUC"}
1
+ {"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/spawn.js"],"names":[],"mappings":";;IAKA;;;;;;;;;;;OAWG;IACH,+DAPW,MAAM,GAAC,MAAM,EAAE,QACf,MAAM,GACL,OAAO,CAAC,iDAA4C,CAAC,CAchE;IAED;;;;;;;;;OASG;IACH,kEALW,MAAM,GAAC,MAAM,EAAE,QACf,MAAM,GACL,OAAO,CAAC,OAAO,cAAc,EAAE,UAAU,CAAC,CAarD"}
@@ -1 +1 @@
1
- {"version":3,"file":"terminate.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/terminate.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;OAUG;IACH,0FAIC"}
1
+ {"version":3,"file":"terminate.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/terminate.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;OAUG;IACH,mEANW,MAAM,iBAUhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/ui.js"],"names":[],"mappings":";;IAKA;;;;;;;;;OASG;IACH,2EAKC;IAED;;;;;;;;;OASG;IACH,6FAIC"}
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/ui.js"],"names":[],"mappings":";;IAKA;;;;;;;;;OASG;IACH,2DALY,OAAO,CAAC,MAAM,CAAC,CAU1B;IAED;;;;;;;;;OASG;IACH,sEALW,MAAM,iBAShB"}
@@ -1 +1 @@
1
- {"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/uninstall.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;OAWG;IACH,uFAIC"}
1
+ {"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/uninstall.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;OAWG;IACH,gEANW,MAAM,iBAUhB"}
@@ -1,6 +1,6 @@
1
1
  import log from '../logger';
2
2
  import { waitForCondition } from 'asyncbox';
3
-
3
+ import _ from 'lodash';
4
4
 
5
5
  const commands = {};
6
6
 
@@ -40,7 +40,8 @@ commands.startBootMonitor = async function startBootMonitor (opts = {}) {
40
40
  } = opts;
41
41
  const udid = this.requireUdid('bootstatus');
42
42
 
43
- let status = '';
43
+ /** @type {string[]} */
44
+ const status = [];
44
45
  let isBootingFinished = false;
45
46
  let error = null;
46
47
  let timeoutHandler = null;
@@ -52,17 +53,18 @@ commands.startBootMonitor = async function startBootMonitor (opts = {}) {
52
53
  args,
53
54
  asynchronous: true,
54
55
  });
55
- bootMonitor.on('output', (stdout, stderr) => {
56
- status += stdout || stderr;
57
- if (stdout) {
58
- if (stdout.includes('Waiting on Data Migration') && onWaitingDataMigration) {
59
- onWaitingDataMigration();
60
- } else if (stdout.includes('Waiting on System App') && onWaitingSystemApp) {
61
- onWaitingSystemApp();
62
- }
56
+ const onStreamLine = (/** @type {string} */ line) => {
57
+ status.push(line);
58
+ if (onWaitingDataMigration && line.includes('Waiting on Data Migration')) {
59
+ onWaitingDataMigration();
60
+ } else if (onWaitingSystemApp && line.includes('Waiting on System App')) {
61
+ onWaitingSystemApp();
63
62
  }
64
- });
65
- bootMonitor.on('exit', (code, signal) => {
63
+ };
64
+ for (const streamName of ['stdout', 'stderr']) {
65
+ bootMonitor.on(`line-${streamName}`, onStreamLine);
66
+ }
67
+ bootMonitor.once('exit', (code, signal) => {
66
68
  if (timeoutHandler) {
67
69
  clearTimeout(timeoutHandler);
68
70
  }
@@ -72,8 +74,10 @@ commands.startBootMonitor = async function startBootMonitor (opts = {}) {
72
74
  }
73
75
  isBootingFinished = true;
74
76
  } else {
75
- status = status || signal;
76
- error = new Error(status);
77
+ const errMessage = _.isEmpty(status)
78
+ ? `The simulator booting process has exited with code ${code} by signal ${signal}`
79
+ : status.join('\n');
80
+ error = new Error(errMessage);
77
81
  if (onError) {
78
82
  onError(error);
79
83
  }
@@ -105,7 +109,8 @@ commands.startBootMonitor = async function startBootMonitor (opts = {}) {
105
109
  const [seconds] = process.hrtime(start);
106
110
  throw new Error(
107
111
  `The simulator ${udid} has failed to finish booting after ${seconds}s. ` +
108
- `Original status: ${status}`);
112
+ `Original status: ${status.join('\n')}`
113
+ );
109
114
  }
110
115
  }
111
116
  return bootMonitor;
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "ios",
7
7
  "simctl"
8
8
  ],
9
- "version": "7.5.2",
9
+ "version": "7.5.3",
10
10
  "author": "Appium Contributors",
11
11
  "license": "Apache-2.0",
12
12
  "repository": {
@@ -40,7 +40,7 @@
40
40
  "rimraf": "^5.0.0",
41
41
  "semver": "^7.0.0",
42
42
  "source-map-support": "^0.x",
43
- "teen_process": "^2.0.0",
43
+ "teen_process": "^2.2.0",
44
44
  "uuid": "^10.0.0",
45
45
  "which": "^4.0.0"
46
46
  },
@@ -61,7 +61,6 @@
61
61
  "singleQuote": true
62
62
  },
63
63
  "devDependencies": {
64
- "@appium/eslint-config-appium": "^8.0.4",
65
64
  "@appium/eslint-config-appium-ts": "^0.x",
66
65
  "@appium/tsconfig": "^0.x",
67
66
  "@appium/types": "^0.x",