node-simctl 8.0.9 → 8.1.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.
Files changed (156) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/index.d.ts +2 -1
  3. package/build/index.d.ts.map +1 -1
  4. package/build/index.js.map +1 -1
  5. package/build/lib/helpers.d.ts +17 -9
  6. package/build/lib/helpers.d.ts.map +1 -1
  7. package/build/lib/helpers.js +50 -4
  8. package/build/lib/helpers.js.map +1 -1
  9. package/build/lib/logger.d.ts +2 -3
  10. package/build/lib/logger.d.ts.map +1 -1
  11. package/build/lib/logger.js +3 -5
  12. package/build/lib/logger.js.map +1 -1
  13. package/build/lib/simctl.d.ts +82 -188
  14. package/build/lib/simctl.d.ts.map +1 -1
  15. package/build/lib/simctl.js +98 -150
  16. package/build/lib/simctl.js.map +1 -1
  17. package/build/lib/subcommands/addmedia.d.ts +14 -16
  18. package/build/lib/subcommands/addmedia.d.ts.map +1 -1
  19. package/build/lib/subcommands/addmedia.js +5 -7
  20. package/build/lib/subcommands/addmedia.js.map +1 -1
  21. package/build/lib/subcommands/appinfo.d.ts +13 -45
  22. package/build/lib/subcommands/appinfo.d.ts.map +1 -1
  23. package/build/lib/subcommands/appinfo.js +31 -42
  24. package/build/lib/subcommands/appinfo.js.map +1 -1
  25. package/build/lib/subcommands/boot.d.ts +9 -12
  26. package/build/lib/subcommands/boot.d.ts.map +1 -1
  27. package/build/lib/subcommands/boot.js +5 -40
  28. package/build/lib/subcommands/boot.js.map +1 -1
  29. package/build/lib/subcommands/bootstatus.d.ts +16 -56
  30. package/build/lib/subcommands/bootstatus.d.ts.map +1 -1
  31. package/build/lib/subcommands/bootstatus.js +8 -22
  32. package/build/lib/subcommands/bootstatus.js.map +1 -1
  33. package/build/lib/subcommands/create.d.ts +15 -34
  34. package/build/lib/subcommands/create.d.ts.map +1 -1
  35. package/build/lib/subcommands/create.js +23 -66
  36. package/build/lib/subcommands/create.js.map +1 -1
  37. package/build/lib/subcommands/delete.d.ts +9 -12
  38. package/build/lib/subcommands/delete.d.ts.map +1 -1
  39. package/build/lib/subcommands/delete.js +3 -5
  40. package/build/lib/subcommands/delete.js.map +1 -1
  41. package/build/lib/subcommands/erase.d.ts +12 -15
  42. package/build/lib/subcommands/erase.d.ts.map +1 -1
  43. package/build/lib/subcommands/erase.js +4 -6
  44. package/build/lib/subcommands/erase.js.map +1 -1
  45. package/build/lib/subcommands/get_app_container.d.ts +19 -22
  46. package/build/lib/subcommands/get_app_container.d.ts.map +1 -1
  47. package/build/lib/subcommands/get_app_container.js +6 -8
  48. package/build/lib/subcommands/get_app_container.js.map +1 -1
  49. package/build/lib/subcommands/getenv.d.ts +11 -14
  50. package/build/lib/subcommands/getenv.d.ts.map +1 -1
  51. package/build/lib/subcommands/getenv.js +5 -7
  52. package/build/lib/subcommands/getenv.js.map +1 -1
  53. package/build/lib/subcommands/install.d.ts +12 -15
  54. package/build/lib/subcommands/install.d.ts.map +1 -1
  55. package/build/lib/subcommands/install.js +4 -6
  56. package/build/lib/subcommands/install.js.map +1 -1
  57. package/build/lib/subcommands/io.d.ts +12 -15
  58. package/build/lib/subcommands/io.d.ts.map +1 -1
  59. package/build/lib/subcommands/io.js +4 -6
  60. package/build/lib/subcommands/io.js.map +1 -1
  61. package/build/lib/subcommands/keychain.d.ts +37 -55
  62. package/build/lib/subcommands/keychain.d.ts.map +1 -1
  63. package/build/lib/subcommands/keychain.js +16 -25
  64. package/build/lib/subcommands/keychain.js.map +1 -1
  65. package/build/lib/subcommands/launch.d.ts +16 -19
  66. package/build/lib/subcommands/launch.d.ts.map +1 -1
  67. package/build/lib/subcommands/launch.js +9 -11
  68. package/build/lib/subcommands/launch.js.map +1 -1
  69. package/build/lib/subcommands/list.d.ts +94 -125
  70. package/build/lib/subcommands/list.d.ts.map +1 -1
  71. package/build/lib/subcommands/list.js +34 -92
  72. package/build/lib/subcommands/list.js.map +1 -1
  73. package/build/lib/subcommands/location.d.ts +18 -22
  74. package/build/lib/subcommands/location.d.ts.map +1 -1
  75. package/build/lib/subcommands/location.js +11 -13
  76. package/build/lib/subcommands/location.js.map +1 -1
  77. package/build/lib/subcommands/openurl.d.ts +15 -17
  78. package/build/lib/subcommands/openurl.d.ts.map +1 -1
  79. package/build/lib/subcommands/openurl.js +5 -7
  80. package/build/lib/subcommands/openurl.js.map +1 -1
  81. package/build/lib/subcommands/pbcopy.d.ts +14 -17
  82. package/build/lib/subcommands/pbcopy.d.ts.map +1 -1
  83. package/build/lib/subcommands/pbcopy.js +5 -7
  84. package/build/lib/subcommands/pbcopy.js.map +1 -1
  85. package/build/lib/subcommands/pbpaste.d.ts +14 -17
  86. package/build/lib/subcommands/pbpaste.d.ts.map +1 -1
  87. package/build/lib/subcommands/pbpaste.js +5 -7
  88. package/build/lib/subcommands/pbpaste.js.map +1 -1
  89. package/build/lib/subcommands/privacy.d.ts +52 -57
  90. package/build/lib/subcommands/privacy.d.ts.map +1 -1
  91. package/build/lib/subcommands/privacy.js +15 -17
  92. package/build/lib/subcommands/privacy.js.map +1 -1
  93. package/build/lib/subcommands/push.d.ts +22 -25
  94. package/build/lib/subcommands/push.d.ts.map +1 -1
  95. package/build/lib/subcommands/push.js +5 -7
  96. package/build/lib/subcommands/push.js.map +1 -1
  97. package/build/lib/subcommands/shutdown.d.ts +9 -12
  98. package/build/lib/subcommands/shutdown.d.ts.map +1 -1
  99. package/build/lib/subcommands/shutdown.js +5 -40
  100. package/build/lib/subcommands/shutdown.js.map +1 -1
  101. package/build/lib/subcommands/spawn.d.ts +24 -27
  102. package/build/lib/subcommands/spawn.d.ts.map +1 -1
  103. package/build/lib/subcommands/spawn.js +12 -14
  104. package/build/lib/subcommands/spawn.js.map +1 -1
  105. package/build/lib/subcommands/terminate.d.ts +12 -15
  106. package/build/lib/subcommands/terminate.d.ts.map +1 -1
  107. package/build/lib/subcommands/terminate.js +4 -6
  108. package/build/lib/subcommands/terminate.js.map +1 -1
  109. package/build/lib/subcommands/ui.d.ts +97 -105
  110. package/build/lib/subcommands/ui.d.ts.map +1 -1
  111. package/build/lib/subcommands/ui.js +24 -26
  112. package/build/lib/subcommands/ui.js.map +1 -1
  113. package/build/lib/subcommands/uninstall.d.ts +13 -16
  114. package/build/lib/subcommands/uninstall.d.ts.map +1 -1
  115. package/build/lib/subcommands/uninstall.js +4 -6
  116. package/build/lib/subcommands/uninstall.js.map +1 -1
  117. package/build/lib/types.d.ts +231 -0
  118. package/build/lib/types.d.ts.map +1 -0
  119. package/build/lib/types.js +3 -0
  120. package/build/lib/types.js.map +1 -0
  121. package/index.ts +13 -0
  122. package/lib/helpers.ts +81 -0
  123. package/lib/{logger.js → logger.ts} +2 -5
  124. package/lib/simctl.ts +221 -0
  125. package/lib/subcommands/{addmedia.js → addmedia.ts} +6 -8
  126. package/lib/subcommands/appinfo.ts +39 -0
  127. package/lib/subcommands/{boot.js → boot.ts} +5 -10
  128. package/lib/subcommands/bootstatus.ts +108 -0
  129. package/lib/subcommands/{create.js → create.ts} +29 -35
  130. package/lib/subcommands/{delete.js → delete.ts} +3 -5
  131. package/lib/subcommands/{erase.js → erase.ts} +4 -7
  132. package/lib/subcommands/{get_app_container.js → get_app_container.ts} +10 -8
  133. package/lib/subcommands/{getenv.js → getenv.ts} +5 -7
  134. package/lib/subcommands/{install.js → install.ts} +4 -6
  135. package/lib/subcommands/{io.js → io.ts} +4 -7
  136. package/lib/subcommands/{keychain.js → keychain.ts} +30 -32
  137. package/lib/subcommands/{launch.js → launch.ts} +9 -12
  138. package/lib/subcommands/{list.js → list.ts} +67 -60
  139. package/lib/subcommands/{location.js → location.ts} +15 -14
  140. package/lib/subcommands/{openurl.js → openurl.ts} +6 -7
  141. package/lib/subcommands/{pbcopy.js → pbcopy.ts} +11 -8
  142. package/lib/subcommands/{pbpaste.js → pbpaste.ts} +5 -7
  143. package/lib/subcommands/{privacy.js → privacy.ts} +13 -17
  144. package/lib/subcommands/{push.js → push.ts} +5 -8
  145. package/lib/subcommands/{shutdown.js → shutdown.ts} +5 -8
  146. package/lib/subcommands/{spawn.js → spawn.ts} +21 -17
  147. package/lib/subcommands/{terminate.js → terminate.ts} +4 -6
  148. package/lib/subcommands/{ui.js → ui.ts} +19 -28
  149. package/lib/subcommands/{uninstall.js → uninstall.ts} +4 -6
  150. package/lib/types.ts +243 -0
  151. package/package.json +2 -2
  152. package/index.js +0 -4
  153. package/lib/helpers.js +0 -37
  154. package/lib/simctl.js +0 -299
  155. package/lib/subcommands/appinfo.js +0 -51
  156. package/lib/subcommands/bootstatus.js +0 -119
@@ -1,53 +1,19 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
36
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
4
  };
38
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.bootDevice = bootDevice;
39
7
  const lodash_1 = __importDefault(require("lodash"));
40
- const logger_1 = __importStar(require("../logger"));
41
- const commands = {};
8
+ const logger_1 = require("../logger");
42
9
  /**
43
10
  * Boot the particular Simulator if it is not running.
44
11
  *
45
- * @this {import('../simctl').Simctl}
46
12
  * @throws {Error} If the corresponding simctl subcommand command
47
13
  * returns non-zero return code.
48
14
  * @throws {Error} If the `udid` instance property is unset
49
15
  */
50
- commands.bootDevice = async function bootDevice() {
16
+ async function bootDevice() {
51
17
  try {
52
18
  await this.exec('boot', {
53
19
  args: [this.requireUdid('boot')]
@@ -57,8 +23,7 @@ commands.bootDevice = async function bootDevice() {
57
23
  if (lodash_1.default.includes(e.message, 'Unable to boot device in current state: Booted')) {
58
24
  throw e;
59
25
  }
60
- logger_1.default.debug(logger_1.LOG_PREFIX, `Simulator already in 'Booted' state. Continuing`);
26
+ logger_1.log.debug(logger_1.LOG_PREFIX, `Simulator already in 'Booted' state. Continuing`);
61
27
  }
62
- };
63
- exports.default = commands;
28
+ }
64
29
  //# sourceMappingURL=boot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"boot.js","sourceRoot":"","sources":["../../../lib/subcommands/boot.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAuB;AACvB,oDAA4C;AAG5C,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;GAOG;AACH,QAAQ,CAAC,UAAU,GAAG,KAAK,UAAU,UAAU;IAC7C,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACtB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;SACjC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,gBAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,gDAAgD,CAAC,EAAE,CAAC;YAC5E,MAAM,CAAC,CAAC;QACV,CAAC;QACD,gBAAG,CAAC,KAAK,CAAC,mBAAU,EAAE,iDAAiD,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"boot.js","sourceRoot":"","sources":["../../../lib/subcommands/boot.ts"],"names":[],"mappings":";;;;;AAWA,gCAWC;AAtBD,oDAAuB;AACvB,sCAA4C;AAG5C;;;;;;GAMG;AACI,KAAK,UAAU,UAAU;IAC9B,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACtB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;SACjC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,IAAI,gBAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,gDAAgD,CAAC,EAAE,CAAC;YAC5E,MAAM,CAAC,CAAC;QACV,CAAC;QACD,YAAG,CAAC,KAAK,CAAC,mBAAU,EAAE,iDAAiD,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC"}
@@ -1,57 +1,17 @@
1
- export default commands;
2
- export type BootMonitorOptions = {
3
- /**
4
- * - Simulator booting timeout in ms.
5
- */
6
- timeout?: number | undefined;
7
- /**
8
- * - This event is fired when data migration stage starts.
9
- */
10
- onWaitingDataMigration?: Function | undefined;
11
- /**
12
- * - This event is fired when system app wait stage starts.
13
- */
14
- onWaitingSystemApp?: Function | undefined;
15
- /**
16
- * - This event is fired when Simulator is fully booted.
17
- */
18
- onFinished?: Function | undefined;
19
- /**
20
- * - This event is fired when there was an error while monitoring the booting process
21
- * or when the timeout has expired.
22
- */
23
- onError?: Function | undefined;
24
- /**
25
- * Whether to preboot the Simulator
26
- * if this command is called and it is not already in booted or booting state.
27
- */
28
- shouldPreboot?: boolean | undefined;
29
- };
30
- declare namespace commands {
31
- /**
32
- * @typedef {Object} BootMonitorOptions
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
- * or when the timeout has expired.
39
- * @property {boolean} [shouldPreboot=false] Whether to preboot the Simulator
40
- * if this command is called and it is not already in booted or booting state.
41
- */
42
- /**
43
- * Start monitoring for boot status of the particular Simulator.
44
- * If onFinished property is not set then the method will block
45
- * until Simulator booting is completed.
46
- * The method is only available since Xcode8.
47
- *
48
- * @this {import('../simctl').Simctl}
49
- * @param {BootMonitorOptions} [opts={}] - Monitoring options.
50
- * @returns {Promise<import('teen_process').SubProcess>} The instance of the corresponding monitoring process.
51
- * @throws {Error} If the Simulator fails to finish booting within the given timeout and onFinished
52
- * property is not set.
53
- * @throws {Error} If the `udid` instance property is unset
54
- */
55
- function startBootMonitor(this: import("../simctl").default, opts?: BootMonitorOptions): Promise<import("teen_process").SubProcess>;
56
- }
1
+ import type { Simctl } from '../simctl';
2
+ import type { BootMonitorOptions } from '../types';
3
+ import type { SubProcess } from 'teen_process';
4
+ /**
5
+ * Start monitoring for boot status of the particular Simulator.
6
+ * If onFinished property is not set then the method will block
7
+ * until Simulator booting is completed.
8
+ * The method is only available since Xcode8.
9
+ *
10
+ * @param opts - Monitoring options.
11
+ * @returns The instance of the corresponding monitoring process.
12
+ * @throws {Error} If the Simulator fails to finish booting within the given timeout and onFinished
13
+ * property is not set.
14
+ * @throws {Error} If the `udid` instance property is unset
15
+ */
16
+ export declare function startBootMonitor(this: Simctl, opts?: BootMonitorOptions): Promise<SubProcess>;
57
17
  //# sourceMappingURL=bootstatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bootstatus.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/bootstatus.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMA;;;;;;;;;;OAUG;IAEH;;;;;;;;;;;;OAYG;IACH,oEANW,kBAAkB,GAChB,OAAO,CAAC,OAAO,cAAc,EAAE,UAAU,CAAC,CA0FtD"}
1
+ {"version":3,"file":"bootstatus.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/bootstatus.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC,UAAU,CAAC,CAoFrB"}
@@ -3,38 +3,25 @@ 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
- const logger_1 = __importDefault(require("../logger"));
6
+ exports.startBootMonitor = startBootMonitor;
7
+ const logger_1 = require("../logger");
7
8
  const asyncbox_1 = require("asyncbox");
8
9
  const lodash_1 = __importDefault(require("lodash"));
9
- const commands = {};
10
- /**
11
- * @typedef {Object} BootMonitorOptions
12
- * @property {number} [timeout=240000] - Simulator booting timeout in ms.
13
- * @property {Function} [onWaitingDataMigration] - This event is fired when data migration stage starts.
14
- * @property {Function} [onWaitingSystemApp] - This event is fired when system app wait stage starts.
15
- * @property {Function} [onFinished] - This event is fired when Simulator is fully booted.
16
- * @property {Function} [onError] - This event is fired when there was an error while monitoring the booting process
17
- * or when the timeout has expired.
18
- * @property {boolean} [shouldPreboot=false] Whether to preboot the Simulator
19
- * if this command is called and it is not already in booted or booting state.
20
- */
21
10
  /**
22
11
  * Start monitoring for boot status of the particular Simulator.
23
12
  * If onFinished property is not set then the method will block
24
13
  * until Simulator booting is completed.
25
14
  * The method is only available since Xcode8.
26
15
  *
27
- * @this {import('../simctl').Simctl}
28
- * @param {BootMonitorOptions} [opts={}] - Monitoring options.
29
- * @returns {Promise<import('teen_process').SubProcess>} The instance of the corresponding monitoring process.
16
+ * @param opts - Monitoring options.
17
+ * @returns The instance of the corresponding monitoring process.
30
18
  * @throws {Error} If the Simulator fails to finish booting within the given timeout and onFinished
31
19
  * property is not set.
32
20
  * @throws {Error} If the `udid` instance property is unset
33
21
  */
34
- commands.startBootMonitor = async function startBootMonitor(opts = {}) {
22
+ async function startBootMonitor(opts = {}) {
35
23
  const { timeout = 240000, onWaitingDataMigration, onWaitingSystemApp, onFinished, onError, shouldPreboot, } = opts;
36
24
  const udid = this.requireUdid('bootstatus');
37
- /** @type {string[]} */
38
25
  const status = [];
39
26
  let isBootingFinished = false;
40
27
  let error = null;
@@ -47,7 +34,7 @@ commands.startBootMonitor = async function startBootMonitor(opts = {}) {
47
34
  args,
48
35
  asynchronous: true,
49
36
  });
50
- const onStreamLine = (/** @type {string} */ line) => {
37
+ const onStreamLine = (line) => {
51
38
  status.push(line);
52
39
  if (onWaitingDataMigration && line.includes('Waiting on Data Migration')) {
53
40
  onWaitingDataMigration();
@@ -86,7 +73,7 @@ commands.startBootMonitor = async function startBootMonitor(opts = {}) {
86
73
  await bootMonitor.stop();
87
74
  }
88
75
  catch (e) {
89
- logger_1.default.warn(e.message);
76
+ logger_1.log.warn(e.message);
90
77
  }
91
78
  }
92
79
  };
@@ -111,6 +98,5 @@ commands.startBootMonitor = async function startBootMonitor(opts = {}) {
111
98
  }
112
99
  }
113
100
  return bootMonitor;
114
- };
115
- exports.default = commands;
101
+ }
116
102
  //# sourceMappingURL=bootstatus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bootstatus.js","sourceRoot":"","sources":["../../../lib/subcommands/bootstatus.js"],"names":[],"mappings":";;;;;AAAA,uD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AACvB,CAAC"}
@@ -1,35 +1,16 @@
1
- export default commands;
2
- export type SimCreationOpts = {
3
- /**
4
- * - Platform name in order to specify runtime such as 'iOS', 'tvOS', 'watchOS'
5
- */
6
- platform?: string | undefined;
7
- /**
8
- * - The maximum number of milliseconds to wait
9
- * unit device creation is completed.
10
- */
11
- timeout?: number | undefined;
12
- };
13
- declare namespace commands {
14
- /**
15
- * @typedef {Object} SimCreationOpts
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
- * unit device creation is completed.
19
- */
20
- /**
21
- * Create Simulator device with given name for the particular
22
- * platform type and version.
23
- *
24
- * @this {import('../simctl').Simctl}
25
- * @param {string} name - The device name to be created.
26
- * @param {string} deviceTypeId - Device type, for example 'iPhone 6'.
27
- * @param {string} platformVersion - Platform version, for example '10.3'.
28
- * @param {SimCreationOpts} [opts={}] - Simulator options for creating devices.
29
- * @return {Promise<string>} The UDID of the newly created device.
30
- * @throws {Error} If the corresponding simctl subcommand command
31
- * returns non-zero return code.
32
- */
33
- function createDevice(this: import("../simctl").default, name: string, deviceTypeId: string, platformVersion: string, opts?: SimCreationOpts): Promise<string>;
34
- }
1
+ import type { Simctl } from '../simctl';
2
+ import type { SimCreationOpts } from '../types';
3
+ /**
4
+ * Create Simulator device with given name for the particular
5
+ * platform type and version.
6
+ *
7
+ * @param name - The device name to be created.
8
+ * @param deviceTypeId - Device type, for example 'iPhone 6'.
9
+ * @param platformVersion - Platform version, for example '10.3'.
10
+ * @param opts - Simulator options for creating devices.
11
+ * @return The UDID of the newly created device.
12
+ * @throws {Error} If the corresponding simctl subcommand command
13
+ * returns non-zero return code.
14
+ */
15
+ export declare function createDevice(this: Simctl, name: string, deviceTypeId: string, platformVersion: string, opts?: SimCreationOpts): Promise<string>;
35
16
  //# sourceMappingURL=create.d.ts.map
@@ -1 +1 @@
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,SACN,eAAe,GACd,OAAO,CAAC,MAAM,CAAC,CAwF1B"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/create.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKhD;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,IAAI,GAAE,eAAoB,GACzB,OAAO,CAAC,MAAM,CAAC,CAkFjB"}
@@ -1,70 +1,30 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
36
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
4
  };
38
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createDevice = createDevice;
39
7
  const lodash_1 = __importDefault(require("lodash"));
40
- const logger_1 = __importStar(require("../logger"));
8
+ const logger_1 = require("../logger");
41
9
  const asyncbox_1 = require("asyncbox");
42
10
  const helpers_1 = require("../helpers");
43
11
  const SIM_RUNTIME_NAME_SUFFIX_IOS = 'iOS';
44
12
  const DEFAULT_CREATE_SIMULATOR_TIMEOUT = 10000;
45
- const commands = {};
46
- /**
47
- * @typedef {Object} SimCreationOpts
48
- * @property {string} [platform='iOS'] - Platform name in order to specify runtime such as 'iOS', 'tvOS', 'watchOS'
49
- * @property {number} [timeout=10000] - The maximum number of milliseconds to wait
50
- * unit device creation is completed.
51
- */
52
13
  /**
53
14
  * Create Simulator device with given name for the particular
54
15
  * platform type and version.
55
16
  *
56
- * @this {import('../simctl').Simctl}
57
- * @param {string} name - The device name to be created.
58
- * @param {string} deviceTypeId - Device type, for example 'iPhone 6'.
59
- * @param {string} platformVersion - Platform version, for example '10.3'.
60
- * @param {SimCreationOpts} [opts={}] - Simulator options for creating devices.
61
- * @return {Promise<string>} The UDID of the newly created device.
17
+ * @param name - The device name to be created.
18
+ * @param deviceTypeId - Device type, for example 'iPhone 6'.
19
+ * @param platformVersion - Platform version, for example '10.3'.
20
+ * @param opts - Simulator options for creating devices.
21
+ * @return The UDID of the newly created device.
62
22
  * @throws {Error} If the corresponding simctl subcommand command
63
23
  * returns non-zero return code.
64
24
  */
65
- commands.createDevice = async function createDevice(name, deviceTypeId, platformVersion, opts = {}) {
25
+ async function createDevice(name, deviceTypeId, platformVersion, opts = {}) {
66
26
  const { platform = SIM_RUNTIME_NAME_SUFFIX_IOS, timeout = DEFAULT_CREATE_SIMULATOR_TIMEOUT } = opts;
67
- let runtimeIds = [];
27
+ const runtimeIds = [];
68
28
  // Try getting runtimeId using JSON flag
69
29
  try {
70
30
  runtimeIds.push(await this.getRuntimeForPlatformVersionViaJson(platformVersion, platform));
@@ -78,12 +38,12 @@ commands.createDevice = async function createDevice(name, deviceTypeId, platform
78
38
  runtimeId = await this.getRuntimeForPlatformVersion(platformVersion, platform);
79
39
  }
80
40
  catch {
81
- logger_1.default.warn(`Unable to find runtime for iOS '${platformVersion}'. Continuing`);
41
+ logger_1.log.warn(`Unable to find runtime for iOS '${platformVersion}'. Continuing`);
82
42
  runtimeId = platformVersion;
83
43
  }
84
44
  // get the possible runtimes, which will be iterated over
85
45
  // start with major-minor version
86
- let potentialRuntimeIds = [(0, helpers_1.normalizeVersion)(runtimeId)];
46
+ const potentialRuntimeIds = [(0, helpers_1.normalizeVersion)(runtimeId)];
87
47
  if (runtimeId.split('.').length === 3) {
88
48
  // add patch version if it exists
89
49
  potentialRuntimeIds.push(runtimeId);
@@ -95,7 +55,7 @@ commands.createDevice = async function createDevice(name, deviceTypeId, platform
95
55
  // go through the runtime ids and try to create a simulator with each
96
56
  let udid;
97
57
  for (const runtimeId of runtimeIds) {
98
- logger_1.default.debug(logger_1.LOG_PREFIX, `Creating simulator with name '${name}', device type id '${deviceTypeId}' and runtime id '${runtimeId}'`);
58
+ logger_1.log.debug(logger_1.LOG_PREFIX, `Creating simulator with name '${name}', device type id '${deviceTypeId}' and runtime id '${runtimeId}'`);
99
59
  try {
100
60
  const { stdout } = await this.exec('create', {
101
61
  args: [name, deviceTypeId, runtimeId]
@@ -115,24 +75,21 @@ commands.createDevice = async function createDevice(name, deviceTypeId, platform
115
75
  // make sure that it gets out of the "Creating" state
116
76
  const retries = parseInt(`${timeout / 1000}`, 10);
117
77
  await (0, asyncbox_1.retryInterval)(retries, 1000, async () => {
118
- const devices = lodash_1.default.values(await this.getDevices());
119
- for (const deviceArr of lodash_1.default.values(devices)) {
120
- for (const device of deviceArr) {
121
- if (device.udid === udid) {
122
- if (device.state === 'Creating') {
123
- // need to retry
124
- throw new Error(`Device with udid '${udid}' still being created`);
125
- }
126
- else {
127
- // stop looking, we're done
128
- return;
129
- }
78
+ const devices = lodash_1.default.flatMap(lodash_1.default.values(await this.getDevices()));
79
+ for (const device of devices) {
80
+ if (device.udid === udid) {
81
+ if (device.state === 'Creating') {
82
+ // need to retry
83
+ throw new Error(`Device with udid '${udid}' still being created`);
84
+ }
85
+ else {
86
+ // stop looking, we're done
87
+ return;
130
88
  }
131
89
  }
132
90
  }
133
91
  throw new Error(`Device with udid '${udid}' not yet created`);
134
92
  });
135
93
  return udid;
136
- };
137
- exports.default = commands;
94
+ }
138
95
  //# sourceMappingURL=create.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../lib/subcommands/create.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAuB;AACvB,oDAA4C;AAC5C,uCAAyC;AACzC,wCAAgE;AAGhE,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAC1C,MAAM,gCAAgC,GAAG,KAAK,CAAC;AAE/C,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;GAKG;AAEH;;;;;;;;;;;;GAYG;AACH,QAAQ,CAAC,YAAY,GAAG,KAAK,UAAU,YAAY,CAAE,IAAI,EAAE,YAAY,EAAE,eAAe,EAAE,IAAI,GAAG,EAAE;IACjG,MAAM,EACJ,QAAQ,GAAG,2BAA2B,EACtC,OAAO,GAAG,gCAAgC,EAC3C,GAAG,IAAI,CAAC;IAET,IAAI,UAAU,GAAG,EAAE,CAAC;IAEpB,wCAAwC;IACxC,IAAI,CAAC;QACH,UAAU,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,mCAAmC,CAAC,eAAe,E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EAAE,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,IAAA,wBAAa,EAAC,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,OAAO,GAAG,gBAAC,CAAC,OAAO,CAAC,gBAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QAC7D,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;gBACzB,IAAI,MAAM,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;oBAChC,gBAAgB;oBAChB,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,uBAAuB,CAAC,CAAC;gBACpE,CAAC;qBAAM,CAAC;oBACN,2BAA2B;oBAC3B,OAAO;gBACT,CAAC;YACH,CAAC;QACH,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,mBAAmB,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,13 +1,10 @@
1
- export default commands;
2
- declare namespace commands {
3
- /**
4
- * Delete the particular Simulator from available devices list.
5
- *
6
- * @this {import('../simctl').Simctl}
7
- * @throws {Error} If the corresponding simctl subcommand command
8
- * returns non-zero return code.
9
- * @throws {Error} If the `udid` instance property is unset
10
- */
11
- function deleteDevice(this: import("../simctl").default): Promise<void>;
12
- }
1
+ import type { Simctl } from '../simctl';
2
+ /**
3
+ * Delete the particular Simulator from available devices list.
4
+ *
5
+ * @throws {Error} If the corresponding simctl subcommand command
6
+ * returns non-zero return code.
7
+ * @throws {Error} If the `udid` instance property is unset
8
+ */
9
+ export declare function deleteDevice(this: Simctl): Promise<void>;
13
10
  //# sourceMappingURL=delete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/delete.js"],"names":[],"mappings":";;IAEA;;;;;;;OAOG;IACH,wEAIC"}
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/D"}
@@ -1,18 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const commands = {};
3
+ exports.deleteDevice = deleteDevice;
4
4
  /**
5
5
  * Delete the particular Simulator from available devices list.
6
6
  *
7
- * @this {import('../simctl').Simctl}
8
7
  * @throws {Error} If the corresponding simctl subcommand command
9
8
  * returns non-zero return code.
10
9
  * @throws {Error} If the `udid` instance property is unset
11
10
  */
12
- commands.deleteDevice = async function deleteDevice() {
11
+ async function deleteDevice() {
13
12
  await this.exec('delete', {
14
13
  args: [this.requireUdid('delete')]
15
14
  });
16
- };
17
- exports.default = commands;
15
+ }
18
16
  //# sourceMappingURL=delete.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../lib/subcommands/delete.js"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;GAOG;AACH,QAAQ,CAAC,YAAY,GAAG,KAAK,UAAU,YAAY;IACjD,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;QACxB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;KACnC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../lib/subcommands/delete.ts"],"names":[],"mappings":";;AASA,oCAIC;AAXD;;;;;;GAMG;AACI,KAAK,UAAU,YAAY;IAChC,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;QACxB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;KACnC,CAAC,CAAC;AACL,CAAC"}
@@ -1,16 +1,13 @@
1
- export default commands;
2
- declare namespace commands {
3
- /**
4
- * Reset the content and settings of the particular Simulator.
5
- * It is required that Simulator is in _shutdown_ state.
6
- *
7
- * @this {import('../simctl').Simctl}
8
- * @param {number} [timeout=10000] - The maximum number of milliseconds to wait
9
- * unit device reset is completed.
10
- * @throws {Error} If the corresponding simctl subcommand command
11
- * returns non-zero return code.
12
- * @throws {Error} If the `udid` instance property is unset
13
- */
14
- function eraseDevice(this: import("../simctl").default, timeout?: number): Promise<void>;
15
- }
1
+ import type { Simctl } from '../simctl';
2
+ /**
3
+ * Reset the content and settings of the particular Simulator.
4
+ * It is required that Simulator is in _shutdown_ state.
5
+ *
6
+ * @param timeout - The maximum number of milliseconds to wait
7
+ * unit device reset is completed.
8
+ * @throws {Error} If the corresponding simctl subcommand command
9
+ * returns non-zero return code.
10
+ * @throws {Error} If the `udid` instance property is unset
11
+ */
12
+ export declare function eraseDevice(this: Simctl, timeout?: number): Promise<void>;
16
13
  //# sourceMappingURL=erase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"erase.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/erase.js"],"names":[],"mappings":";;IAIA;;;;;;;;;;OAUG;IACH,kEANW,MAAM,iBAchB"}
1
+ {"version":3,"file":"erase.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/erase.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAQtF"}
@@ -1,24 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.eraseDevice = eraseDevice;
3
4
  const asyncbox_1 = require("asyncbox");
4
- const commands = {};
5
5
  /**
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
- * @this {import('../simctl').Simctl}
10
- * @param {number} [timeout=10000] - The maximum number of milliseconds to wait
9
+ * @param timeout - The maximum number of milliseconds to wait
11
10
  * unit device reset is completed.
12
11
  * @throws {Error} If the corresponding simctl subcommand command
13
12
  * returns non-zero return code.
14
13
  * @throws {Error} If the `udid` instance property is unset
15
14
  */
16
- commands.eraseDevice = async function eraseDevice(timeout = 1000) {
15
+ async function eraseDevice(timeout = 1000) {
17
16
  // retry erase with a sleep in between because it's flakey
18
17
  const retries = parseInt(`${timeout / 200}`, 10);
19
18
  await (0, asyncbox_1.retryInterval)(retries, 200, async () => await this.exec('erase', {
20
19
  args: [this.requireUdid('erase')]
21
20
  }));
22
- };
23
- exports.default = commands;
21
+ }
24
22
  //# sourceMappingURL=erase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"erase.js","sourceRoot":"","sources":["../../../lib/subcommands/erase.js"],"names":[],"mappings":";;AAAA,uCAAyC;AAEzC,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,QAAQ,CAAC,WAAW,GAAG,KAAK,UAAU,WAAW,CAAE,OAAO,GAAG,IAAI;IAC/D,0DAA0D;IAC1D,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,OAAO,GAAG,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IACjD,MAAM,IAAA,wBAAa,EAAC,OAAO,EAAE,GAAG,EAC9B,KAAK,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;QACnC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;KAClC,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"erase.js","sourceRoot":"","sources":["../../../lib/subcommands/erase.ts"],"names":[],"mappings":";;AAaA,kCAQC;AArBD,uCAAyC;AAGzC;;;;;;;;;GASG;AACI,KAAK,UAAU,WAAW,CAAgB,UAAkB,IAAI;IACrE,0DAA0D;IAC1D,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,OAAO,GAAG,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IACjD,MAAM,IAAA,wBAAa,EAAC,OAAO,EAAE,GAAG,EAC9B,KAAK,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;QACnC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;KAClC,CAAC,CACH,CAAC;AACJ,CAAC"}