node-simctl 7.2.2 → 7.3.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 (130) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/index.js +9 -17
  3. package/build/lib/helpers.d.ts +13 -0
  4. package/build/lib/helpers.d.ts.map +1 -0
  5. package/build/lib/helpers.js +22 -16
  6. package/build/lib/helpers.js.map +1 -1
  7. package/build/lib/logger.d.ts +4 -0
  8. package/build/lib/logger.d.ts.map +1 -0
  9. package/build/lib/logger.js +13 -19
  10. package/build/lib/logger.js.map +1 -1
  11. package/build/lib/simctl.d.ts +131 -0
  12. package/build/lib/simctl.d.ts.map +1 -0
  13. package/build/lib/simctl.js +170 -94
  14. package/build/lib/simctl.js.map +1 -1
  15. package/build/lib/subcommands/addmedia.d.ts +16 -0
  16. package/build/lib/subcommands/addmedia.d.ts.map +1 -0
  17. package/build/lib/subcommands/addmedia.js +17 -12
  18. package/build/lib/subcommands/addmedia.js.map +1 -1
  19. package/build/lib/subcommands/appinfo.d.ts +45 -0
  20. package/build/lib/subcommands/appinfo.d.ts.map +1 -0
  21. package/build/lib/subcommands/appinfo.js +47 -15
  22. package/build/lib/subcommands/appinfo.js.map +1 -1
  23. package/build/lib/subcommands/boot.d.ts +12 -0
  24. package/build/lib/subcommands/boot.d.ts.map +1 -0
  25. package/build/lib/subcommands/boot.js +47 -22
  26. package/build/lib/subcommands/boot.js.map +1 -1
  27. package/build/lib/subcommands/bootstatus.d.ts +56 -0
  28. package/build/lib/subcommands/bootstatus.d.ts.map +1 -0
  29. package/build/lib/subcommands/bootstatus.js +102 -87
  30. package/build/lib/subcommands/bootstatus.js.map +1 -1
  31. package/build/lib/subcommands/create.d.ts +34 -0
  32. package/build/lib/subcommands/create.d.ts.map +1 -0
  33. package/build/lib/subcommands/create.js +115 -65
  34. package/build/lib/subcommands/create.js.map +1 -1
  35. package/build/lib/subcommands/delete.d.ts +12 -0
  36. package/build/lib/subcommands/delete.d.ts.map +1 -0
  37. package/build/lib/subcommands/delete.js +13 -12
  38. package/build/lib/subcommands/delete.js.map +1 -1
  39. package/build/lib/subcommands/erase.d.ts +15 -0
  40. package/build/lib/subcommands/erase.d.ts.map +1 -0
  41. package/build/lib/subcommands/erase.js +19 -14
  42. package/build/lib/subcommands/erase.js.map +1 -1
  43. package/build/lib/subcommands/get_app_container.d.ts +22 -0
  44. package/build/lib/subcommands/get_app_container.d.ts.map +1 -0
  45. package/build/lib/subcommands/get_app_container.js +26 -19
  46. package/build/lib/subcommands/get_app_container.js.map +1 -1
  47. package/build/lib/subcommands/getenv.d.ts +14 -0
  48. package/build/lib/subcommands/getenv.d.ts.map +1 -0
  49. package/build/lib/subcommands/getenv.js +17 -17
  50. package/build/lib/subcommands/getenv.js.map +1 -1
  51. package/build/lib/subcommands/index.d.ts +3 -0
  52. package/build/lib/subcommands/index.d.ts.map +1 -0
  53. package/build/lib/subcommands/index.js +33 -36
  54. package/build/lib/subcommands/index.js.map +1 -1
  55. package/build/lib/subcommands/install.d.ts +15 -0
  56. package/build/lib/subcommands/install.d.ts.map +1 -0
  57. package/build/lib/subcommands/install.js +16 -12
  58. package/build/lib/subcommands/install.js.map +1 -1
  59. package/build/lib/subcommands/io.d.ts +15 -0
  60. package/build/lib/subcommands/io.d.ts.map +1 -0
  61. package/build/lib/subcommands/io.js +32 -25
  62. package/build/lib/subcommands/io.js.map +1 -1
  63. package/build/lib/subcommands/keychain.d.ts +53 -0
  64. package/build/lib/subcommands/keychain.d.ts.map +1 -0
  65. package/build/lib/subcommands/keychain.js +85 -51
  66. package/build/lib/subcommands/keychain.js.map +1 -1
  67. package/build/lib/subcommands/launch.d.ts +19 -0
  68. package/build/lib/subcommands/launch.d.ts.map +1 -0
  69. package/build/lib/subcommands/launch.js +28 -19
  70. package/build/lib/subcommands/launch.js.map +1 -1
  71. package/build/lib/subcommands/list.d.ts +120 -0
  72. package/build/lib/subcommands/list.d.ts.map +1 -0
  73. package/build/lib/subcommands/list.js +296 -138
  74. package/build/lib/subcommands/list.js.map +1 -1
  75. package/build/lib/subcommands/location.d.ts +20 -0
  76. package/build/lib/subcommands/location.d.ts.map +1 -0
  77. package/build/lib/subcommands/location.js +37 -22
  78. package/build/lib/subcommands/location.js.map +1 -1
  79. package/build/lib/subcommands/openurl.d.ts +17 -0
  80. package/build/lib/subcommands/openurl.d.ts.map +1 -0
  81. package/build/lib/subcommands/openurl.js +18 -12
  82. package/build/lib/subcommands/openurl.js.map +1 -1
  83. package/build/lib/subcommands/pbcopy.d.ts +17 -0
  84. package/build/lib/subcommands/pbcopy.d.ts.map +1 -0
  85. package/build/lib/subcommands/pbcopy.js +26 -20
  86. package/build/lib/subcommands/pbcopy.js.map +1 -1
  87. package/build/lib/subcommands/pbpaste.d.ts +17 -0
  88. package/build/lib/subcommands/pbpaste.d.ts.map +1 -0
  89. package/build/lib/subcommands/pbpaste.js +20 -16
  90. package/build/lib/subcommands/pbpaste.js.map +1 -1
  91. package/build/lib/subcommands/privacy.d.ts +55 -0
  92. package/build/lib/subcommands/privacy.d.ts.map +1 -0
  93. package/build/lib/subcommands/privacy.js +60 -18
  94. package/build/lib/subcommands/privacy.js.map +1 -1
  95. package/build/lib/subcommands/push.d.ts +25 -0
  96. package/build/lib/subcommands/push.d.ts.map +1 -0
  97. package/build/lib/subcommands/push.js +41 -24
  98. package/build/lib/subcommands/push.js.map +1 -1
  99. package/build/lib/subcommands/shutdown.d.ts +12 -0
  100. package/build/lib/subcommands/shutdown.d.ts.map +1 -0
  101. package/build/lib/subcommands/shutdown.js +47 -22
  102. package/build/lib/subcommands/shutdown.js.map +1 -1
  103. package/build/lib/subcommands/spawn.d.ts +26 -0
  104. package/build/lib/subcommands/spawn.d.ts.map +1 -0
  105. package/build/lib/subcommands/spawn.js +42 -26
  106. package/build/lib/subcommands/spawn.js.map +1 -1
  107. package/build/lib/subcommands/terminate.d.ts +15 -0
  108. package/build/lib/subcommands/terminate.d.ts.map +1 -0
  109. package/build/lib/subcommands/terminate.js +16 -12
  110. package/build/lib/subcommands/terminate.js.map +1 -1
  111. package/build/lib/subcommands/ui.d.ts +24 -0
  112. package/build/lib/subcommands/ui.d.ts.map +1 -0
  113. package/build/lib/subcommands/ui.js +32 -20
  114. package/build/lib/subcommands/ui.js.map +1 -1
  115. package/build/lib/subcommands/uninstall.d.ts +16 -0
  116. package/build/lib/subcommands/uninstall.d.ts.map +1 -0
  117. package/build/lib/subcommands/uninstall.js +17 -12
  118. package/build/lib/subcommands/uninstall.js.map +1 -1
  119. package/lib/simctl.js +13 -3
  120. package/lib/subcommands/addmedia.js +1 -1
  121. package/lib/subcommands/bootstatus.js +2 -2
  122. package/lib/subcommands/create.js +2 -2
  123. package/lib/subcommands/erase.js +1 -1
  124. package/lib/subcommands/keychain.js +2 -2
  125. package/lib/subcommands/launch.js +1 -0
  126. package/lib/subcommands/list.js +6 -6
  127. package/lib/subcommands/location.js +1 -1
  128. package/lib/subcommands/openurl.js +1 -1
  129. package/lib/subcommands/spawn.js +2 -2
  130. package/package.json +28 -17
@@ -0,0 +1,12 @@
1
+ export default commands;
2
+ declare namespace commands {
3
+ /**
4
+ * Shutdown the given Simulator if it is running.
5
+ *
6
+ * @throws {Error} If the corresponding simctl subcommand command
7
+ * returns non-zero return code.
8
+ * @throws {Error} If the `udid` instance property is unset
9
+ */
10
+ function shutdownDevice(): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=shutdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shutdown.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/shutdown.js"],"names":[],"mappings":";;IAKA;;;;;;OAMG;IACH,yCAWC"}
@@ -1,28 +1,53 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
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;
6
17
  });
7
- exports.default = void 0;
8
- require("source-map-support/register");
9
- var _lodash = _interopRequireDefault(require("lodash"));
10
- var _logger = _interopRequireWildcard(require("../logger"));
11
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const lodash_1 = __importDefault(require("lodash"));
30
+ const logger_1 = __importStar(require("../logger"));
13
31
  const commands = {};
32
+ /**
33
+ * Shutdown the given Simulator if it is running.
34
+ *
35
+ * @throws {Error} If the corresponding simctl subcommand command
36
+ * returns non-zero return code.
37
+ * @throws {Error} If the `udid` instance property is unset
38
+ */
14
39
  commands.shutdownDevice = async function shutdownDevice() {
15
- try {
16
- await this.exec('shutdown', {
17
- args: [this.requireUdid('shutdown')]
18
- });
19
- } catch (e) {
20
- if (!_lodash.default.includes(e.message, 'current state: Shutdown')) {
21
- throw e;
40
+ try {
41
+ await this.exec('shutdown', {
42
+ args: [this.requireUdid('shutdown')],
43
+ });
44
+ }
45
+ catch (e) {
46
+ if (!lodash_1.default.includes(e.message, 'current state: Shutdown')) {
47
+ throw e;
48
+ }
49
+ logger_1.default.debug(logger_1.LOG_PREFIX, `Simulator already in 'Shutdown' state. Continuing`);
22
50
  }
23
- _logger.default.debug(_logger.LOG_PREFIX, `Simulator already in 'Shutdown' state. Continuing`);
24
- }
25
51
  };
26
- var _default = commands;
27
- exports.default = _default;
28
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbG9kYXNoIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJfbG9nZ2VyIiwiX2ludGVyb3BSZXF1aXJlV2lsZGNhcmQiLCJfZ2V0UmVxdWlyZVdpbGRjYXJkQ2FjaGUiLCJub2RlSW50ZXJvcCIsIldlYWtNYXAiLCJjYWNoZUJhYmVsSW50ZXJvcCIsImNhY2hlTm9kZUludGVyb3AiLCJvYmoiLCJfX2VzTW9kdWxlIiwiZGVmYXVsdCIsImNhY2hlIiwiaGFzIiwiZ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BRSx5QkFBeUIsQ0FBQyxFQUFFO01BQ3JELE1BQU1ILENBQUM7SUFDVDtJQUNBSSxlQUFHLENBQUNDLEtBQUssQ0FBQ0Msa0JBQVUsRUFBRyxtREFBa0QsQ0FBQztFQUM1RTtBQUNGLENBQUM7QUFBQyxJQUFBQyxRQUFBLEdBRWFaLFFBQVE7QUFBQWEsT0FBQSxDQUFBNUIsT0FBQSxHQUFBMkIsUUFBQSJ9
52
+ exports.default = commands;
53
+ //# sourceMappingURL=shutdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shutdown.js","names":["_lodash","_interopRequireDefault","require","_logger","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","commands","shutdownDevice","exec","args","requireUdid","e","_","includes","message","log","debug","LOG_PREFIX","_default","exports"],"sources":["../../../lib/subcommands/shutdown.js"],"sourcesContent":["import _ from 'lodash';\nimport log, { LOG_PREFIX } from '../logger';\n\nconst commands = {};\n\n/**\n * Shutdown the given Simulator if it is running.\n *\n * @throws {Error} If the corresponding simctl subcommand command\n * returns non-zero return code.\n * @throws {Error} If the `udid` instance property is unset\n */\ncommands.shutdownDevice = async function shutdownDevice () {\n try {\n await this.exec('shutdown', {\n args: [this.requireUdid('shutdown')],\n });\n } catch (e) {\n if (!_.includes(e.message, 'current state: Shutdown')) {\n throw e;\n }\n log.debug(LOG_PREFIX, `Simulator already in 'Shutdown' state. Continuing`);\n }\n};\n\nexport default commands;\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA4C,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wB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C,CAAC,OAAOC,CAAC,EAAE;IACV,IAAI,CAACC,eAAC,CAACC,QAAQ,CAACF,CAAC,CAACG,OAAO,EAAE,yBAAyB,CAAC,EAAE;MACrD,MAAMH,CAAC;IACT;IACAI,eAAG,CAACC,KAAK,CAACC,kBAAU,EAAG,mDAAkD,CAAC;EAC5E;AACF,CAAC;AAAC,IAAAC,QAAA,GAEaZ,QAAQ;AAAAa,OAAA,CAAA5B,OAAA,GAAA2B,QAAA"}
1
+ {"version":3,"file":"shutdown.js","sourceRoot":"","sources":["../../../lib/subcommands/shutdown.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAuB;AACvB,oDAA4C;AAE5C,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;GAMG;AACH,QAAQ,CAAC,cAAc,GAAG,KAAK,UAAU,cAAc;IACrD,IAAI;QACF,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAC1B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;SACrC,CAAC,CAAC;KACJ;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,yBAAyB,CAAC,EAAE;YACrD,MAAM,CAAC,CAAC;SACT;QACD,gBAAG,CAAC,KAAK,CAAC,mBAAU,EAAE,mDAAmD,CAAC,CAAC;KAC5E;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,26 @@
1
+ export default commands;
2
+ declare namespace commands {
3
+ /**
4
+ * Spawn the particular process on Simulator.
5
+ * It is required that Simulator is in _booted_ state.
6
+ *
7
+ * @param {string|string[]} args - Spawn arguments
8
+ * @param {object} env [{}] - Additional environment variables mapping.
9
+ * @return {Promise<import('teen_process').TeenProcessExecResult>} Command execution result.
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 spawnProcess(args: string | string[], env?: any): Promise<import("teen_process").TeenProcessExecResult<any>>;
15
+ /**
16
+ * Prepare SubProcess instance for a new process, which is going to be spawned
17
+ * on Simulator.
18
+ *
19
+ * @param {string|string[]} args - Spawn arguments
20
+ * @param {object} env [{}] - Additional environment variables mapping.
21
+ * @return {Promise<import('teen_process').SubProcess>} The instance of the process to be spawned.
22
+ * @throws {Error} If the `udid` instance property is unset
23
+ */
24
+ function spawnSubProcess(args: string | string[], env?: any): Promise<import("teen_process").SubProcess>;
25
+ }
26
+ //# sourceMappingURL=spawn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/spawn.js"],"names":[],"mappings":";;IAKA;;;;;;;;;;OAUG;IACH,sHASC;IAED;;;;;;;;OAQG;IACH,yGAUC"}
@@ -1,32 +1,48 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- require("source-map-support/register");
9
- var _lodash = _interopRequireDefault(require("lodash"));
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const lodash_1 = __importDefault(require("lodash"));
10
7
  const commands = {};
8
+ /**
9
+ * Spawn the particular process on Simulator.
10
+ * It is required that Simulator is in _booted_ state.
11
+ *
12
+ * @param {string|string[]} args - Spawn arguments
13
+ * @param {object} env [{}] - Additional environment variables mapping.
14
+ * @return {Promise<import('teen_process').TeenProcessExecResult>} Command execution result.
15
+ * @throws {Error} If the corresponding simctl subcommand command
16
+ * returns non-zero return code.
17
+ * @throws {Error} If the `udid` instance property is unset
18
+ */
11
19
  commands.spawnProcess = async function spawnProcess(args, env = {}) {
12
- if (_lodash.default.isEmpty(args)) {
13
- throw new Error('Spawn arguments are required');
14
- }
15
- return await this.exec('spawn', {
16
- args: [this.requireUdid('spawn'), ...(_lodash.default.isArray(args) ? args : [args])],
17
- env
18
- });
20
+ if (lodash_1.default.isEmpty(args)) {
21
+ throw new Error('Spawn arguments are required');
22
+ }
23
+ return await this.exec('spawn', {
24
+ args: [this.requireUdid('spawn'), ...(lodash_1.default.isArray(args) ? args : [args])],
25
+ env,
26
+ });
19
27
  };
28
+ /**
29
+ * Prepare SubProcess instance for a new process, which is going to be spawned
30
+ * on Simulator.
31
+ *
32
+ * @param {string|string[]} args - Spawn arguments
33
+ * @param {object} env [{}] - Additional environment variables mapping.
34
+ * @return {Promise<import('teen_process').SubProcess>} The instance of the process to be spawned.
35
+ * @throws {Error} If the `udid` instance property is unset
36
+ */
20
37
  commands.spawnSubProcess = async function spawnSubProcess(args, env = {}) {
21
- if (_lodash.default.isEmpty(args)) {
22
- throw new Error('Spawn arguments are required');
23
- }
24
- return await this.exec('spawn', {
25
- args: [this.requireUdid('spawn'), ...(_lodash.default.isArray(args) ? args : [args])],
26
- env,
27
- asynchronous: true
28
- });
38
+ if (lodash_1.default.isEmpty(args)) {
39
+ throw new Error('Spawn arguments are required');
40
+ }
41
+ return await this.exec('spawn', {
42
+ args: [this.requireUdid('spawn'), ...(lodash_1.default.isArray(args) ? args : [args])],
43
+ env,
44
+ asynchronous: true,
45
+ });
29
46
  };
30
- var _default = commands;
31
- exports.default = _default;
32
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbG9kYXNoIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJjb21tYW5kcyIsInNwYXduUHJvY2VzcyIsImFyZ3MiLCJlbnYiLCJfIiwiaXNFbXB0eSIsIkVycm9yIiwiZXhlYyIsInJlcXVpcmVVZGlkIiwiaXNBcnJheSIsInNwYXduU3ViUHJvY2VzcyIsImFzeW5jaHJvbm91cyIsI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Q00sV0FBVyxDQUFDLE9BQU8sQ0FBQyxFQUFFLElBQUlKLGVBQUMsQ0FBQ0ssT0FBTyxDQUFDUCxJQUFJLENBQUMsR0FBR0EsSUFBSSxHQUFHLENBQUNBLElBQUksQ0FBQyxDQUFDLENBQUM7SUFDdkVDLEdBQUc7SUFDSFEsWUFBWSxFQUFFO0VBQ2hCLENBQUMsQ0FBQztBQUNKLENBQUM7QUFBQyxJQUFBQyxRQUFBLEdBRWFaLFFBQVE7QUFBQWEsT0FBQSxDQUFBQyxPQUFBLEdBQUFGLFFBQUEifQ==
47
+ exports.default = commands;
48
+ //# sourceMappingURL=spawn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spawn.js","names":["_lodash","_interopRequireDefault","require","commands","spawnProcess","args","env","_","isEmpty","Error","exec","requireUdid","isArray","spawnSubProcess","asynchronous","_default","exports","default"],"sources":["../../../lib/subcommands/spawn.js"],"sourcesContent":["import _ from 'lodash';\n\n\nconst commands = {};\n\n/**\n * Spawn the particular process on Simulator.\n * It is required that Simulator is in _booted_ state.\n *\n * @param {string|string[]} args - Spawn arguments\n * @param {object} env [{}] - Additional environment variables mapping.\n * @return {Promise<ExecResult>} Command execution result.\n * @throws {Error} If the corresponding simctl subcommand command\n * returns non-zero return code.\n * @throws {Error} If the `udid` instance property is unset\n */\ncommands.spawnProcess = async function spawnProcess (args, env = {}) {\n if (_.isEmpty(args)) {\n throw new Error('Spawn arguments are required');\n }\n\n return await this.exec('spawn', {\n args: [this.requireUdid('spawn'), ...(_.isArray(args) ? args : [args])],\n env,\n });\n};\n\n/**\n * Prepare SubProcess instance for a new process, which is going to be spawned\n * on Simulator.\n *\n * @param {string|string[]} args - Spawn arguments\n * @param {object} env [{}] - Additional environment variables mapping.\n * @return {Promise<SubProcess>} The instance of the process to be spawned.\n * @throws {Error} If the `udid` instance property is unset\n */\ncommands.spawnSubProcess = async function spawnSubProcess (args, env = {}) {\n if (_.isEmpty(args)) {\n throw new Error('Spawn arguments are required');\n }\n\n return await this.exec('spawn', {\n args: [this.requireUdid('spawn'), ...(_.isArray(args) ? args : [args])],\n env,\n asynchronous: true,\n });\n};\n\nexport default commands;\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,MAAMC,QAAQ,GAAG,CAAC,CAAC;AAanBA,QAAQ,CAACC,YAAY,GAAG,eAAeA,YAAYA,CAAEC,IAAI,EAAEC,GAAG,GAAG,CAAC,CAAC,EAAE;EACnE,IAAIC,eAAC,CAACC,OAAO,CAACH,IAAI,CAAC,EAAE;IACnB,MAAM,IAAII,KAAK,CAAC,8BAA8B,CAAC;EACjD;EAEA,OAAO,MAAM,IAAI,CAACC,IAAI,CAAC,OAAO,EAAE;IAC9BL,IAAI,EAAE,CAAC,IAAI,CAACM,WAAW,CAAC,OAAO,CAAC,EAAE,IAAIJ,eAAC,CAACK,OAAO,CAACP,IAAI,CAAC,GAAGA,IAAI,GAAG,CAACA,IAAI,CAAC,CAAC,CAAC;IACvEC;EACF,CAAC,CAAC;AACJ,CAAC;AAWDH,QAAQ,CAACU,eAAe,GAAG,eAAeA,eAAeA,CAAER,IAAI,EAAEC,GAAG,GAAG,CAAC,CAAC,EAAE;EACzE,IAAIC,eAAC,CAACC,OAAO,CAACH,IAAI,CAAC,EAAE;IACnB,MAAM,IAAII,KAAK,CAAC,8BAA8B,CAAC;EACjD;EAEA,OAAO,MAAM,IAAI,CAACC,IAAI,CAAC,OAAO,EAAE;IAC9BL,IAAI,EAAE,CAAC,IAAI,CAACM,WAAW,CAAC,OAAO,CAAC,EAAE,IAAIJ,eAAC,CAACK,OAAO,CAACP,IAAI,CAAC,GAAGA,IAAI,GAAG,CAACA,IAAI,CAAC,CAAC,CAAC;IACvEC,GAAG;IACHQ,YAAY,EAAE;EAChB,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAC,QAAA,GAEaZ,QAAQ;AAAAa,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"file":"spawn.js","sourceRoot":"","sources":["../../../lib/subcommands/spawn.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AAGvB,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,QAAQ,CAAC,YAAY,GAAG,KAAK,UAAU,YAAY,CAAE,IAAI,EAAE,GAAG,GAAG,EAAE;IACjE,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KACjD;IAED,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;QAC9B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACvE,GAAG;KACJ,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,QAAQ,CAAC,eAAe,GAAG,KAAK,UAAU,eAAe,CAAE,IAAI,EAAE,GAAG,GAAG,EAAE;IACvE,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KACjD;IAED,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;QAC9B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACvE,GAAG;QACH,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,15 @@
1
+ export default commands;
2
+ declare namespace commands {
3
+ /**
4
+ * Terminate the given running application on Simulator.
5
+ * It is required that Simulator is in _booted_ state.
6
+ *
7
+ * @param {string} bundleId - Bundle identifier of the application,
8
+ * which is going to be terminated.
9
+ * @throws {Error} If the corresponding simctl subcommand command
10
+ * returns non-zero return code.
11
+ * @throws {Error} If the `udid` instance property is unset
12
+ */
13
+ function terminateApp(bundleId: string): Promise<void>;
14
+ }
15
+ //# sourceMappingURL=terminate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminate.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/terminate.js"],"names":[],"mappings":";;IAEA;;;;;;;;;OASG;IACH,uDAIC"}
@@ -1,16 +1,20 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- require("source-map-support/register");
2
+ Object.defineProperty(exports, "__esModule", { value: true });
8
3
  const commands = {};
4
+ /**
5
+ * Terminate the given running application on Simulator.
6
+ * It is required that Simulator is in _booted_ state.
7
+ *
8
+ * @param {string} bundleId - Bundle identifier of the application,
9
+ * which is going to be terminated.
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
+ */
9
14
  commands.terminateApp = async function terminateApp(bundleId) {
10
- await this.exec('terminate', {
11
- args: [this.requireUdid('terminate'), bundleId]
12
- });
15
+ await this.exec('terminate', {
16
+ args: [this.requireUdid('terminate'), bundleId],
17
+ });
13
18
  };
14
- var _default = commands;
15
- exports.default = _default;
16
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb21tYW5kcyIsInRlcm1pbmF0ZUFwcCIsImJ1bmRsZUlkIiwiZXhlYyIsImFyZ3MiLCJyZXF1aXJlVWRpZCIsIl9kZWZhdWx0IiwiZXhwb3J0cyIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvc3ViY29tbWFuZ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QzdELE1BQU0sSUFBSSxDQUFDQyxJQUFJLENBQUMsV0FBVyxFQUFFO0lBQzNCQyxJQUFJLEVBQUUsQ0FBQyxJQUFJLENBQUNDLFdBQVcsQ0FBQyxXQUFXLENBQUMsRUFBRUgsUUFBUTtFQUNoRCxDQUFDLENBQUM7QUFDSixDQUFDO0FBQUMsSUFBQUksUUFBQSxHQUVhTixRQUFRO0FBQUFPLE9BQUEsQ0FBQUMsT0FBQSxHQUFBRixRQUFBIn0=
19
+ exports.default = commands;
20
+ //# sourceMappingURL=terminate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"terminate.js","names":["commands","terminateApp","bundleId","exec","args","requireUdid","_default","exports","default"],"sources":["../../../lib/subcommands/terminate.js"],"sourcesContent":["const commands = {};\n\n/**\n * Terminate the given running application on Simulator.\n * It is required that Simulator is in _booted_ state.\n *\n * @param {string} bundleId - Bundle identifier of the application,\n * which is going to be terminated.\n * @throws {Error} If the corresponding simctl subcommand command\n * returns non-zero return code.\n * @throws {Error} If the `udid` instance property is unset\n */\ncommands.terminateApp = async function terminateApp (bundleId) {\n await this.exec('terminate', {\n args: [this.requireUdid('terminate'), bundleId],\n });\n};\n\nexport default commands;\n"],"mappings":";;;;;;;AAAA,MAAMA,QAAQ,GAAG,CAAC,CAAC;AAYnBA,QAAQ,CAACC,YAAY,GAAG,eAAeA,YAAYA,CAAEC,QAAQ,EAAE;EAC7D,MAAM,IAAI,CAACC,IAAI,CAAC,WAAW,EAAE;IAC3BC,IAAI,EAAE,CAAC,IAAI,CAACC,WAAW,CAAC,WAAW,CAAC,EAAEH,QAAQ;EAChD,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAI,QAAA,GAEaN,QAAQ;AAAAO,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"file":"terminate.js","sourceRoot":"","sources":["../../../lib/subcommands/terminate.js"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;GASG;AACH,QAAQ,CAAC,YAAY,GAAG,KAAK,UAAU,YAAY,CAAE,QAAQ;IAC3D,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;QAC3B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC;KAChD,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,24 @@
1
+ export default commands;
2
+ declare namespace commands {
3
+ /**
4
+ * Retrieves the current UI appearance value from the given simulator
5
+ *
6
+ * @since Xcode 11.4 SDK
7
+ * @return {Promise<string>} the appearance value, for example 'light' or 'dark'
8
+ * @throws {Error} if the current SDK version does not support the command
9
+ * or there was an error while getting the value
10
+ * @throws {Error} If the `udid` instance property is unset
11
+ */
12
+ function getAppearance(): Promise<string>;
13
+ /**
14
+ * Sets the UI appearance to the given style
15
+ *
16
+ * @since Xcode 11.4 SDK
17
+ * @param {string} appearance valid appearance value, for example 'light' or 'dark'
18
+ * @throws {Error} if the current SDK version does not support the command
19
+ * or there was an error while getting the value
20
+ * @throws {Error} If the `udid` instance property is unset
21
+ */
22
+ function setAppearance(appearance: string): Promise<void>;
23
+ }
24
+ //# sourceMappingURL=ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/ui.js"],"names":[],"mappings":";;IAKA;;;;;;;;OAQG;IACH,0CAKC;IAED;;;;;;;;OAQG;IACH,0DAIC"}
@@ -1,26 +1,38 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- require("source-map-support/register");
9
- var _lodash = _interopRequireDefault(require("lodash"));
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const lodash_1 = __importDefault(require("lodash"));
10
7
  const commands = {};
8
+ /**
9
+ * Retrieves the current UI appearance value from the given simulator
10
+ *
11
+ * @since Xcode 11.4 SDK
12
+ * @return {Promise<string>} the appearance value, for example 'light' or 'dark'
13
+ * @throws {Error} if the current SDK version does not support the command
14
+ * or there was an error while getting the value
15
+ * @throws {Error} If the `udid` instance property is unset
16
+ */
11
17
  commands.getAppearance = async function getAppearance() {
12
- const {
13
- stdout
14
- } = await this.exec('ui', {
15
- args: [this.requireUdid('ui'), 'appearance']
16
- });
17
- return _lodash.default.trim(stdout);
18
+ const { stdout } = await this.exec('ui', {
19
+ args: [this.requireUdid('ui'), 'appearance'],
20
+ });
21
+ return lodash_1.default.trim(stdout);
18
22
  };
23
+ /**
24
+ * Sets the UI appearance to the given style
25
+ *
26
+ * @since Xcode 11.4 SDK
27
+ * @param {string} appearance valid appearance value, for example 'light' or 'dark'
28
+ * @throws {Error} if the current SDK version does not support the command
29
+ * or there was an error while getting the value
30
+ * @throws {Error} If the `udid` instance property is unset
31
+ */
19
32
  commands.setAppearance = async function setAppearance(appearance) {
20
- await this.exec('ui', {
21
- args: [this.requireUdid('ui'), 'appearance', appearance]
22
- });
33
+ await this.exec('ui', {
34
+ args: [this.requireUdid('ui'), 'appearance', appearance],
35
+ });
23
36
  };
24
- var _default = commands;
25
- exports.default = _default;
26
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbG9kYXNoIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJjb21tYW5kcyIsImdldEFwcGVhcmFuY2UiLCJzdGRvdXQiLCJleGVjIiwiYXJncyIsInJlcXVpcmVVZGlkIiwiXyIsInRyaW0iLCJzZXRBcHBlYXJhbmNlIiwiYXBwZWFyYW5jZSIsIl9kZWZhdWx0IiwiZXhwb3J0cyIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi8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EsYUFBYSxHQUFHLGVBQWVBLGFBQWFBLENBQUVDLFVBQVUsRUFBRTtFQUNqRSxNQUFNLElBQUksQ0FBQ04sSUFBSSxDQUFDLElBQUksRUFBRTtJQUNwQkMsSUFBSSxFQUFFLENBQUMsSUFBSSxDQUFDQyxXQUFXLENBQUMsSUFBSSxDQUFDLEVBQUUsWUFBWSxFQUFFSSxVQUFVO0VBQ3pELENBQUMsQ0FBQztBQUNKLENBQUM7QUFBQyxJQUFBQyxRQUFBLEdBRWFWLFFBQVE7QUFBQVcsT0FBQSxDQUFBQyxPQUFBLEdBQUFGLFFBQUEifQ==
37
+ exports.default = commands;
38
+ //# sourceMappingURL=ui.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui.js","names":["_lodash","_interopRequireDefault","require","commands","getAppearance","stdout","exec","args","requireUdid","_","trim","setAppearance","appearance","_default","exports","default"],"sources":["../../../lib/subcommands/ui.js"],"sourcesContent":["import _ from 'lodash';\n\n\nconst commands = {};\n\n/**\n * Retrieves the current UI appearance value from the given simulator\n *\n * @since Xcode 11.4 SDK\n * @return {Promise<string>} the appearance value, for example 'light' or 'dark'\n * @throws {Error} if the current SDK version does not support the command\n * or there was an error while getting the value\n * @throws {Error} If the `udid` instance property is unset\n */\ncommands.getAppearance = async function getAppearance () {\n const {stdout} = await this.exec('ui', {\n args: [this.requireUdid('ui'), 'appearance'],\n });\n return _.trim(stdout);\n};\n\n/**\n * Sets the UI appearance to the given style\n *\n * @since Xcode 11.4 SDK\n * @param {string} appearance valid appearance value, for example 'light' or 'dark'\n * @throws {Error} if the current SDK version does not support the command\n * or there was an error while getting the value\n * @throws {Error} If the `udid` instance property is unset\n */\ncommands.setAppearance = async function setAppearance (appearance) {\n await this.exec('ui', {\n args: [this.requireUdid('ui'), 'appearance', appearance],\n });\n};\n\nexport default commands;\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,MAAMC,QAAQ,GAAG,CAAC,CAA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,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC;KACzD,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,16 @@
1
+ export default commands;
2
+ declare namespace commands {
3
+ /**
4
+ * Remove the particular application package from Simulator.
5
+ * It is required that Simulator is in _booted_ state and
6
+ * the application with given bundle identifier is already installed.
7
+ *
8
+ * @param {string} bundleId - Bundle identifier of the application,
9
+ * which is going to be removed.
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 removeApp(bundleId: string): Promise<void>;
15
+ }
16
+ //# sourceMappingURL=uninstall.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/uninstall.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;OAUG;IACH,oDAIC"}
@@ -1,16 +1,21 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- require("source-map-support/register");
2
+ Object.defineProperty(exports, "__esModule", { value: true });
8
3
  const commands = {};
4
+ /**
5
+ * Remove the particular application package from Simulator.
6
+ * It is required that Simulator is in _booted_ state and
7
+ * the application with given bundle identifier is already installed.
8
+ *
9
+ * @param {string} bundleId - Bundle identifier of the application,
10
+ * which is going to be removed.
11
+ * @throws {Error} If the corresponding simctl subcommand command
12
+ * returns non-zero return code.
13
+ * @throws {Error} If the `udid` instance property is unset
14
+ */
9
15
  commands.removeApp = async function removeApp(bundleId) {
10
- await this.exec('uninstall', {
11
- args: [this.requireUdid('uninstall'), bundleId]
12
- });
16
+ await this.exec('uninstall', {
17
+ args: [this.requireUdid('uninstall'), bundleId],
18
+ });
13
19
  };
14
- var _default = commands;
15
- exports.default = _default;
16
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W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3M6IFt0aGlzLnJlcXVpcmVVZGlkKCd1bmluc3RhbGwnKSwgYnVuZGxlSWRdLFxuICB9KTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IGNvbW1hbmRzO1xuIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsTUFBTUEsUUFBUSxHQUFHLENBQUMsQ0FBQztBQWFuQkEsUUFBUSxDQUFDQyxTQUFTLEdBQUcsZUFBZUEsU0FBU0EsQ0FBRUMsUUFBUSxFQUFFO0VBQ3ZELE1BQU0sSUFBSSxDQUFDQyxJQUFJLENBQUMsV0FBVyxFQUFFO0lBQzNCQyxJQUFJLEVBQUUsQ0FBQyxJQUFJLENBQUNDLFdBQVcsQ0FBQyxXQUFXLENBQUMsRUFBRUgsUUFBUTtFQUNoRCxDQUFDLENBQUM7QUFDSixDQUFDO0FBQUMsSUFBQUksUUFBQSxHQUVhTixRQUFRO0FBQUFPLE9BQUEsQ0FBQUMsT0FBQSxHQUFBRixRQUFBIn0=
20
+ exports.default = commands;
21
+ //# sourceMappingURL=uninstall.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"uninstall.js","names":["commands","removeApp","bundleId","exec","args","requireUdid","_default","exports","default"],"sources":["../../../lib/subcommands/uninstall.js"],"sourcesContent":["const commands = {};\n\n/**\n * Remove the particular application package from Simulator.\n * It is required that Simulator is in _booted_ state and\n * the application with given bundle identifier is already installed.\n *\n * @param {string} bundleId - Bundle identifier of the application,\n * which is going to be removed.\n * @throws {Error} If the corresponding simctl subcommand command\n * returns non-zero return code.\n * @throws {Error} If the `udid` instance property is unset\n */\ncommands.removeApp = async function removeApp (bundleId) {\n await this.exec('uninstall', {\n args: [this.requireUdid('uninstall'), bundleId],\n });\n};\n\nexport default commands;\n"],"mappings":";;;;;;;AAAA,MAAMA,QAAQ,GAAG,CAAC,CAAC;AAanBA,QAAQ,CAACC,SAAS,GAAG,eAAeA,SAASA,CAAEC,QAAQ,EAAE;EACvD,MAAM,IAAI,CAACC,IAAI,CAAC,WAAW,EAAE;IAC3BC,IAAI,EAAE,CAAC,IAAI,CAACC,WAAW,CAAC,WAAW,CAAC,EAAEH,QAAQ;EAChD,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAI,QAAA,GAEaN,QAAQ;AAAAO,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../lib/subcommands/uninstall.js"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,QAAQ,CAAC,SAAS,GAAG,KAAK,UAAU,SAAS,CAAE,QAAQ;IACrD,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;QAC3B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC;KAChD,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
package/lib/simctl.js CHANGED
@@ -54,8 +54,17 @@ const DEFAULT_OPTS = {
54
54
 
55
55
 
56
56
  class Simctl {
57
+ /** @type {any?} */
58
+ xcrun;
59
+
60
+ /** @type {number} */
61
+ execTimeout;
62
+
63
+ /** @type {boolean} */
64
+ logErrors;
65
+
57
66
  /**
58
- * @param {SimctlOpts} opts
67
+ * @param {Partial<SimctlOpts>} opts
59
68
  */
60
69
  constructor (opts = {}) {
61
70
  opts = _.cloneDeep(opts);
@@ -111,8 +120,8 @@ class Simctl {
111
120
  * @param {string} subcommand - One of available simctl subcommands.
112
121
  * Execute `xcrun simctl` in Terminal to see the full list
113
122
  * of available subcommands.
114
- * @param {ExecOpts?} opts
115
- * @return {Promise<ExecResult|SubProcess>} Either the result of teen process's `exec` or
123
+ * @param {Partial<ExecOpts>} opts
124
+ * @return {Promise<import('teen_process').TeenProcessExecResult|import('teen_process').SubProcess>} Either the result of teen process's `exec` or
116
125
  * `SubProcess` instance depending of `opts.asynchronous` value.
117
126
  * @throws {Error} If the simctl subcommand command returns non-zero return code.
118
127
  */
@@ -154,6 +163,7 @@ class Simctl {
154
163
  );
155
164
  execArgs = ['arch', [...archArgs, xcrun, ...args], execOpts];
156
165
  }
166
+ // @ts-ignore We know what we are doing here
157
167
  return asynchronous ? new SubProcess(...execArgs) : await tpExec(...execArgs);
158
168
  } catch (e) {
159
169
  if (!this.logErrors || !logErrors) {
@@ -6,7 +6,7 @@ const commands = {};
6
6
  *
7
7
  * @param {string} filePath - Full path to a media file on the local
8
8
  * file system.
9
- * @return {Promise<ExecResult>} Command execution result.
9
+ * @return {Promise<import('teen_process').TeenProcessExecResult>} Command execution result.
10
10
  * @throws {Error} If the corresponding simctl subcommand command
11
11
  * returns non-zero return code.
12
12
  * @throws {Error} If the `udid` instance property is unset
@@ -22,8 +22,8 @@ const commands = {};
22
22
  * until Simulator booting is completed.
23
23
  * The method is only available since Xcode8.
24
24
  *
25
- * @param {BootMonitorOptions} opts - Monitoring options.
26
- * @returns {Promise<SubProcess>} The instance of the corresponding monitoring process.
25
+ * @param {Partial<BootMonitorOptions>} opts - Monitoring options.
26
+ * @returns {Promise<import('teen_process').SubProcess>} The instance of the corresponding monitoring process.
27
27
  * @throws {Error} If the Simulator fails to finish booting within the given timeout and onFinished
28
28
  * property is not set.
29
29
  * @throws {Error} If the `udid` instance property is unset
@@ -23,7 +23,7 @@ const commands = {};
23
23
  * @param {string} name - The device name to be created.
24
24
  * @param {string} deviceTypeId - Device type, for example 'iPhone 6'.
25
25
  * @param {string} platformVersion - Platform version, for example '10.3'.
26
- * @param {SimCreationOpts} opts - Simulator options for creating devices.
26
+ * @param {Partial<SimCreationOpts>} opts - Simulator options for creating devices.
27
27
  * @return {Promise<string>} The UDID of the newly created device.
28
28
  * @throws {Error} If the corresponding simctl subcommand command
29
29
  * returns non-zero return code.
@@ -92,7 +92,7 @@ commands.createDevice = async function createDevice (name, deviceTypeId, platfor
92
92
  }
93
93
 
94
94
  // make sure that it gets out of the "Creating" state
95
- const retries = parseInt(timeout / 1000, 10);
95
+ const retries = parseInt(`${timeout / 1000}`, 10);
96
96
  await retryInterval(retries, 1000, async () => {
97
97
  const devices = _.values(await this.getDevices());
98
98
  for (const deviceArr of _.values(devices)) {
@@ -14,7 +14,7 @@ const commands = {};
14
14
  */
15
15
  commands.eraseDevice = async function eraseDevice (timeout = 1000) {
16
16
  // retry erase with a sleep in between because it's flakey
17
- const retries = parseInt(timeout / 200, 10);
17
+ const retries = parseInt(`${timeout / 200}`, 10);
18
18
  await retryInterval(retries, 200,
19
19
  async () => await this.exec('erase', {
20
20
  args: [this.requireUdid('erase')]
@@ -36,7 +36,7 @@ async function handleRawPayload (payload, onPayloadStored) {
36
36
  * @param {string} cert the full path to a valid .cert file containing
37
37
  * the certificate content or the certificate content itself, depending on
38
38
  * options
39
- * @param {CertOptions} opts
39
+ * @param {Partial<CertOptions>} opts
40
40
  * @throws {Error} if the current SDK version does not support the command
41
41
  * or there was an error while adding the certificate
42
42
  * @throws {Error} If the `udid` instance property is unset
@@ -62,7 +62,7 @@ commands.addRootCertificate = async function addRootCertificate (cert, opts = {}
62
62
  * @param {string} cert the full path to a valid .cert file containing
63
63
  * the certificate content or the certificate content itself, depending on
64
64
  * options
65
- * @param {CertOptions} opts
65
+ * @param {Partial<CertOptions>} opts
66
66
  * @throws {Error} if the current SDK version does not support the command
67
67
  * or there was an error while adding the certificate
68
68
  * @throws {Error} If the `udid` instance property is unset
@@ -18,6 +18,7 @@ const commands = {};
18
18
  * @throws {Error} If the `udid` instance property is unset
19
19
  */
20
20
  commands.launchApp = async function launchApp (bundleId, tries = 5) {
21
+ // @ts-ignore A string will always be returned
21
22
  return await retryInterval(tries, 1000, async () => {
22
23
  const {stdout} = await this.exec('launch', {
23
24
  args: [this.requireUdid('launch'), bundleId],