node-simctl 8.0.8 → 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 +12 -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 +3 -3
  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,13 +1,10 @@
1
- export default commands;
2
- declare namespace commands {
3
- /**
4
- * Shutdown the given Simulator if it is running.
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 shutdownDevice(this: import("../simctl").default): Promise<void>;
12
- }
1
+ import type { Simctl } from '../simctl';
2
+ /**
3
+ * Shutdown the given Simulator if it is running.
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 shutdownDevice(this: Simctl): Promise<void>;
13
10
  //# sourceMappingURL=shutdown.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shutdown.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/shutdown.js"],"names":[],"mappings":";;IAKA;;;;;;;OAOG;IACH,0EAWC"}
1
+ {"version":3,"file":"shutdown.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/shutdown.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWjE"}
@@ -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.shutdownDevice = shutdownDevice;
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
  * Shutdown the given Simulator if it is 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.shutdownDevice = async function shutdownDevice() {
16
+ async function shutdownDevice() {
51
17
  try {
52
18
  await this.exec('shutdown', {
53
19
  args: [this.requireUdid('shutdown')],
@@ -57,8 +23,7 @@ commands.shutdownDevice = async function shutdownDevice() {
57
23
  if (!lodash_1.default.includes(e.message, 'current state: Shutdown')) {
58
24
  throw e;
59
25
  }
60
- logger_1.default.debug(logger_1.LOG_PREFIX, `Simulator already in 'Shutdown' state. Continuing`);
26
+ logger_1.log.debug(logger_1.LOG_PREFIX, `Simulator already in 'Shutdown' state. Continuing`);
61
27
  }
62
- };
63
- exports.default = commands;
28
+ }
64
29
  //# sourceMappingURL=shutdown.js.map
@@ -1 +1 @@
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;;;;;;;GAOG;AACH,QAAQ,CAAC,cAAc,GAAG,KAAK,UAAU,cAAc;IACrD,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAC1B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;SACrC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,yBAAyB,CAAC,EAAE,CAAC;YACtD,MAAM,CAAC,CAAC;QACV,CAAC;QACD,gBAAG,CAAC,KAAK,CAAC,mBAAU,EAAE,mDAAmD,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"shutdown.js","sourceRoot":"","sources":["../../../lib/subcommands/shutdown.ts"],"names":[],"mappings":";;;;;AAWA,wCAWC;AAtBD,oDAAuB;AACvB,sCAA4C;AAG5C;;;;;;GAMG;AACI,KAAK,UAAU,cAAc;IAClC,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAC1B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;SACrC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,yBAAyB,CAAC,EAAE,CAAC;YACtD,MAAM,CAAC,CAAC;QACV,CAAC;QACD,YAAG,CAAC,KAAK,CAAC,mBAAU,EAAE,mDAAmD,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC"}
@@ -1,28 +1,25 @@
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
- * @this {import('../simctl').Simctl}
8
- * @param {string|string[]} args - Spawn arguments
9
- * @param {object} [env={}] - Additional environment variables mapping.
10
- * @return {Promise<import('teen_process').TeenProcessExecResult>} Command execution result.
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
- */
15
- function spawnProcess(this: import("../simctl").default, args: string | string[], env?: object): Promise<import("teen_process").TeenProcessExecResult<any>>;
16
- /**
17
- * Prepare SubProcess instance for a new process, which is going to be spawned
18
- * on Simulator.
19
- *
20
- * @this {import('../simctl').Simctl}
21
- * @param {string|string[]} args - Spawn arguments
22
- * @param {object} [env={}] - Additional environment variables mapping.
23
- * @return {Promise<import('teen_process').SubProcess>} The instance of the process to be spawned.
24
- * @throws {Error} If the `udid` instance property is unset
25
- */
26
- function spawnSubProcess(this: import("../simctl").default, args: string | string[], env?: object): Promise<import("teen_process").SubProcess>;
27
- }
1
+ import type { Simctl } from '../simctl';
2
+ import type { TeenProcessExecResult, SubProcess } from 'teen_process';
3
+ /**
4
+ * Spawn the particular process on Simulator.
5
+ * It is required that Simulator is in _booted_ state.
6
+ *
7
+ * @param args - Spawn arguments
8
+ * @param env - Additional environment variables mapping.
9
+ * @return 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
+ export declare function spawnProcess(this: Simctl, args: string | string[], env?: Record<string, any>): Promise<TeenProcessExecResult<string>>;
15
+ /**
16
+ * Prepare SubProcess instance for a new process, which is going to be spawned
17
+ * on Simulator.
18
+ *
19
+ * @param args - Spawn arguments
20
+ * @param env - Additional environment variables mapping.
21
+ * @return The instance of the process to be spawned.
22
+ * @throws {Error} If the `udid` instance property is unset
23
+ */
24
+ export declare function spawnSubProcess(this: Simctl, args: string | string[], env?: Record<string, any>): Promise<SubProcess>;
28
25
  //# 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,+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
+ {"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/spawn.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC5B,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CASxC;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC5B,OAAO,CAAC,UAAU,CAAC,CAUrB"}
@@ -3,21 +3,21 @@ 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.spawnProcess = spawnProcess;
7
+ exports.spawnSubProcess = spawnSubProcess;
6
8
  const lodash_1 = __importDefault(require("lodash"));
7
- const commands = {};
8
9
  /**
9
10
  * Spawn the particular process on Simulator.
10
11
  * It is required that Simulator is in _booted_ state.
11
12
  *
12
- * @this {import('../simctl').Simctl}
13
- * @param {string|string[]} args - Spawn arguments
14
- * @param {object} [env={}] - Additional environment variables mapping.
15
- * @return {Promise<import('teen_process').TeenProcessExecResult>} Command execution result.
13
+ * @param args - Spawn arguments
14
+ * @param env - Additional environment variables mapping.
15
+ * @return Command execution result.
16
16
  * @throws {Error} If the corresponding simctl subcommand command
17
17
  * returns non-zero return code.
18
18
  * @throws {Error} If the `udid` instance property is unset
19
19
  */
20
- commands.spawnProcess = async function spawnProcess(args, env = {}) {
20
+ async function spawnProcess(args, env = {}) {
21
21
  if (lodash_1.default.isEmpty(args)) {
22
22
  throw new Error('Spawn arguments are required');
23
23
  }
@@ -25,18 +25,17 @@ commands.spawnProcess = async function spawnProcess(args, env = {}) {
25
25
  args: [this.requireUdid('spawn'), ...(lodash_1.default.isArray(args) ? args : [args])],
26
26
  env,
27
27
  });
28
- };
28
+ }
29
29
  /**
30
30
  * Prepare SubProcess instance for a new process, which is going to be spawned
31
31
  * on Simulator.
32
32
  *
33
- * @this {import('../simctl').Simctl}
34
- * @param {string|string[]} args - Spawn arguments
35
- * @param {object} [env={}] - Additional environment variables mapping.
36
- * @return {Promise<import('teen_process').SubProcess>} The instance of the process to be spawned.
33
+ * @param args - Spawn arguments
34
+ * @param env - Additional environment variables mapping.
35
+ * @return The instance of the process to be spawned.
37
36
  * @throws {Error} If the `udid` instance property is unset
38
37
  */
39
- commands.spawnSubProcess = async function spawnSubProcess(args, env = {}) {
38
+ async function spawnSubProcess(args, env = {}) {
40
39
  if (lodash_1.default.isEmpty(args)) {
41
40
  throw new Error('Spawn arguments are required');
42
41
  }
@@ -45,6 +44,5 @@ commands.spawnSubProcess = async function spawnSubProcess(args, env = {}) {
45
44
  env,
46
45
  asynchronous: true,
47
46
  });
48
- };
49
- exports.default = commands;
47
+ }
50
48
  //# sourceMappingURL=spawn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spawn.js","sourceRoot":"","sources":["../../../lib/subcommands/spawn.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AAGvB,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;;;GAWG;AACH,QAAQ,CAAC,YAAY,GAAG,KAAK,UAAU,YAAY,CAAE,IAAI,EAAE,GAAG,GAAG,EAAE;IACjE,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;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;;;;;;;;;GASG;AACH,QAAQ,CAAC,eAAe,GAAG,KAAK,UAAU,eAAe,CAAE,IAAI,EAAE,GAAG,GAAG,EAAE;IACvE,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;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"}
1
+ {"version":3,"file":"spawn.js","sourceRoot":"","sources":["../../../lib/subcommands/spawn.ts"],"names":[],"mappings":";;;;;AAeA,oCAaC;AAWD,0CAcC;AArDD,oDAAuB;AAIvB;;;;;;;;;;GAUG;AACI,KAAK,UAAU,YAAY,CAEhC,IAAuB,EACvB,MAA2B,EAAE;IAE7B,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;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;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,eAAe,CAEnC,IAAuB,EACvB,MAA2B,EAAE;IAE7B,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;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,CAAe,CAAC;AACnB,CAAC"}
@@ -1,16 +1,13 @@
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
- * @this {import('../simctl').Simctl}
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
- */
14
- function terminateApp(this: import("../simctl").default, bundleId: string): Promise<void>;
15
- }
1
+ import type { Simctl } from '../simctl';
2
+ /**
3
+ * Terminate the given running application on Simulator.
4
+ * It is required that Simulator is in _booted_ state.
5
+ *
6
+ * @param bundleId - Bundle identifier of the application,
7
+ * which is going to be terminated.
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 terminateApp(this: Simctl, bundleId: string): Promise<void>;
16
13
  //# sourceMappingURL=terminate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"terminate.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/terminate.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;OAUG;IACH,mEANW,MAAM,iBAUhB"}
1
+ {"version":3,"file":"terminate.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/terminate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjF"}
@@ -1,21 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const commands = {};
3
+ exports.terminateApp = terminateApp;
4
4
  /**
5
5
  * Terminate the given running application on Simulator.
6
6
  * It is required that Simulator is in _booted_ state.
7
7
  *
8
- * @this {import('../simctl').Simctl}
9
- * @param {string} bundleId - Bundle identifier of the application,
8
+ * @param bundleId - Bundle identifier of the application,
10
9
  * which is going to be terminated.
11
10
  * @throws {Error} If the corresponding simctl subcommand command
12
11
  * returns non-zero return code.
13
12
  * @throws {Error} If the `udid` instance property is unset
14
13
  */
15
- commands.terminateApp = async function terminateApp(bundleId) {
14
+ async function terminateApp(bundleId) {
16
15
  await this.exec('terminate', {
17
16
  args: [this.requireUdid('terminate'), bundleId],
18
17
  });
19
- };
20
- exports.default = commands;
18
+ }
21
19
  //# sourceMappingURL=terminate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"terminate.js","sourceRoot":"","sources":["../../../lib/subcommands/terminate.js"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;;GAUG;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"}
1
+ {"version":3,"file":"terminate.js","sourceRoot":"","sources":["../../../lib/subcommands/terminate.ts"],"names":[],"mappings":";;AAYA,oCAIC;AAdD;;;;;;;;;GASG;AACI,KAAK,UAAU,YAAY,CAAgB,QAAgB;IAChE,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"}
@@ -1,106 +1,98 @@
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
- * @this {import('../simctl').Simctl}
8
- * @return {Promise<string>} the appearance value, for example 'light' or 'dark'
9
- * @throws {Error} if the current SDK version does not support the command
10
- * or there was an error while getting the value
11
- * @throws {Error} If the `udid` instance property is unset
12
- */
13
- function getAppearance(this: import("../simctl").default): Promise<string>;
14
- /**
15
- * Sets the UI appearance to the given style
16
- *
17
- * @since Xcode 11.4 SDK
18
- * @this {import('../simctl').Simctl}
19
- * @param {string} appearance valid appearance value, for example 'light' or 'dark'
20
- * @throws {Error} if the current SDK version does not support the command
21
- * or there was an error while getting the value
22
- * @throws {Error} If the `udid` instance property is unset
23
- */
24
- function setAppearance(this: import("../simctl").default, appearance: string): Promise<void>;
25
- /**
26
- * Retrieves the current increase contrast configuration value from the given simulator.
27
- * The value could be:
28
- * - enabled: Increase Contrast is enabled.
29
- * - disabled: Increase Contrast is disabled.
30
- * - unsupported: The platform or runtime version do not support the Increase Contrast setting.
31
- * - unknown: The current setting is unknown or there was an error detecting it.
32
- *
33
- * @since Xcode 15 (but lower xcode could have this command)
34
- * @this {import('../simctl').Simctl}
35
- * @return {Promise<string>} the contrast configuration value.
36
- * Possible return value is 'enabled', 'disabled',
37
- * 'unsupported' or 'unknown' with Xcode 16.2.
38
- * @throws {Error} if the current SDK version does not support the command
39
- * or there was an error while getting the value.
40
- * @throws {Error} If the `udid` instance property is unset
41
- */
42
- function getIncreaseContrast(this: import("../simctl").default): Promise<string>;
43
- /**
44
- * Sets the increase constrast configuration for the given simulator.
45
- * Acceptable values (with Xcode 16.2, iOS 18.1) are 'enabled' or 'disabled'
46
- * They would change in the future version, so please validate the given value
47
- * in the caller side.
48
- *
49
- * @since Xcode 15 (but lower xcode could have this command)
50
- * @this {import('../simctl').Simctl}
51
- * @param {string} increaseContrast valid increase constrast configuration value.
52
- * Acceptable value is 'enabled' or 'disabled' with Xcode 16.2.
53
- * @throws {Error} if the current SDK version does not support the command
54
- * or the given value was invalid for the command.
55
- * @throws {Error} If the `udid` instance property is unset
56
- */
57
- function setIncreaseContrast(this: import("../simctl").default, increaseContrast: string): Promise<void>;
58
- /**
59
- * Retrieves the current content size value from the given simulator.
60
- * The value could be:
61
- * Standard sizes: extra-small, small, medium, large, extra-large,
62
- * extra-extra-large, extra-extra-extra-large
63
- * Extended range sizes: accessibility-medium, accessibility-large,
64
- * accessibility-extra-large, accessibility-extra-extra-large,
65
- * accessibility-extra-extra-extra-large
66
- * Other values: unknown, unsupported.
67
- *
68
- * @since Xcode 15 (but lower xcode could have this command)
69
- * @this {import('../simctl').Simctl}
70
- * @return {Promise<string>} the content size value. Possible return value is
71
- * extra-small, small, medium, large, extra-large, extra-extra-large,
72
- * extra-extra-extra-large, accessibility-medium, accessibility-large,
73
- * accessibility-extra-large, accessibility-extra-extra-large,
74
- * accessibility-extra-extra-extra-large,
75
- * unknown or unsupported with Xcode 16.2.
76
- * @throws {Error} if the current SDK version does not support the command
77
- * or there was an error while getting the value.
78
- * @throws {Error} If the `udid` instance property is unset
79
- */
80
- function getContentSize(this: import("../simctl").default): Promise<string>;
81
- /**
82
- * Sets content size for the given simulator.
83
- * Acceptable values (with Xcode 16.2, iOS 18.1) are below:
84
- * Standard sizes: extra-small, small, medium, large, extra-large,
85
- * extra-extra-large, extra-extra-extra-large
86
- * Extended range sizes: accessibility-medium, accessibility-large,
87
- * accessibility-extra-large, accessibility-extra-extra-large,
88
- * accessibility-extra-extra-extra-large
89
- * Or 'increment' or 'decrement'
90
- * They would change in the future version, so please validate the given value
91
- * in the caller side.
92
- *
93
- * @since Xcode 15 (but lower xcode could have this command)
94
- * @this {import('../simctl').Simctl}
95
- * @param {string} contentSizeAction valid content size or action value. Acceptable value is
96
- * extra-small, small, medium, large, extra-large, extra-extra-large,
97
- * extra-extra-extra-large, accessibility-medium, accessibility-large,
98
- * accessibility-extra-large, accessibility-extra-extra-large,
99
- * accessibility-extra-extra-extra-large with Xcode 16.2.
100
- * @throws {Error} if the current SDK version does not support the command
101
- * or the given value was invalid for the command.
102
- * @throws {Error} If the `udid` instance property is unset
103
- */
104
- function setContentSize(this: import("../simctl").default, contentSizeAction: string): Promise<void>;
105
- }
1
+ import type { Simctl } from '../simctl';
2
+ /**
3
+ * Retrieves the current UI appearance value from the given simulator
4
+ *
5
+ * @since Xcode 11.4 SDK
6
+ * @return the appearance value, for example 'light' or 'dark'
7
+ * @throws {Error} if the current SDK version does not support the command
8
+ * or there was an error while getting the value
9
+ * @throws {Error} If the `udid` instance property is unset
10
+ */
11
+ export declare function getAppearance(this: Simctl): Promise<string>;
12
+ /**
13
+ * Sets the UI appearance to the given style
14
+ *
15
+ * @since Xcode 11.4 SDK
16
+ * @param appearance valid appearance value, for example 'light' or 'dark'
17
+ * @throws {Error} if the current SDK version does not support the command
18
+ * or there was an error while getting the value
19
+ * @throws {Error} If the `udid` instance property is unset
20
+ */
21
+ export declare function setAppearance(this: Simctl, appearance: string): Promise<void>;
22
+ /**
23
+ * Retrieves the current increase contrast configuration value from the given simulator.
24
+ * The value could be:
25
+ * - enabled: Increase Contrast is enabled.
26
+ * - disabled: Increase Contrast is disabled.
27
+ * - unsupported: The platform or runtime version do not support the Increase Contrast setting.
28
+ * - unknown: The current setting is unknown or there was an error detecting it.
29
+ *
30
+ * @since Xcode 15 (but lower xcode could have this command)
31
+ * @return the contrast configuration value.
32
+ * Possible return value is 'enabled', 'disabled',
33
+ * 'unsupported' or 'unknown' with Xcode 16.2.
34
+ * @throws {Error} if the current SDK version does not support the command
35
+ * or there was an error while getting the value.
36
+ * @throws {Error} If the `udid` instance property is unset
37
+ */
38
+ export declare function getIncreaseContrast(this: Simctl): Promise<string>;
39
+ /**
40
+ * Sets the increase constrast configuration for the given simulator.
41
+ * Acceptable values (with Xcode 16.2, iOS 18.1) are 'enabled' or 'disabled'
42
+ * They would change in the future version, so please validate the given value
43
+ * in the caller side.
44
+ *
45
+ * @since Xcode 15 (but lower xcode could have this command)
46
+ * @param increaseContrast valid increase constrast configuration value.
47
+ * Acceptable value is 'enabled' or 'disabled' with Xcode 16.2.
48
+ * @throws {Error} if the current SDK version does not support the command
49
+ * or the given value was invalid for the command.
50
+ * @throws {Error} If the `udid` instance property is unset
51
+ */
52
+ export declare function setIncreaseContrast(this: Simctl, increaseContrast: string): Promise<void>;
53
+ /**
54
+ * Retrieves the current content size value from the given simulator.
55
+ * The value could be:
56
+ * Standard sizes: extra-small, small, medium, large, extra-large,
57
+ * extra-extra-large, extra-extra-extra-large
58
+ * Extended range sizes: accessibility-medium, accessibility-large,
59
+ * accessibility-extra-large, accessibility-extra-extra-large,
60
+ * accessibility-extra-extra-extra-large
61
+ * Other values: unknown, unsupported.
62
+ *
63
+ * @since Xcode 15 (but lower xcode could have this command)
64
+ * @return the content size value. Possible return value is
65
+ * extra-small, small, medium, large, extra-large, extra-extra-large,
66
+ * extra-extra-extra-large, accessibility-medium, accessibility-large,
67
+ * accessibility-extra-large, accessibility-extra-extra-large,
68
+ * accessibility-extra-extra-extra-large,
69
+ * unknown or unsupported with Xcode 16.2.
70
+ * @throws {Error} if the current SDK version does not support the command
71
+ * or there was an error while getting the value.
72
+ * @throws {Error} If the `udid` instance property is unset
73
+ */
74
+ export declare function getContentSize(this: Simctl): Promise<string>;
75
+ /**
76
+ * Sets content size for the given simulator.
77
+ * Acceptable values (with Xcode 16.2, iOS 18.1) are below:
78
+ * Standard sizes: extra-small, small, medium, large, extra-large,
79
+ * extra-extra-large, extra-extra-extra-large
80
+ * Extended range sizes: accessibility-medium, accessibility-large,
81
+ * accessibility-extra-large, accessibility-extra-extra-large,
82
+ * accessibility-extra-extra-extra-large
83
+ * Or 'increment' or 'decrement'
84
+ * They would change in the future version, so please validate the given value
85
+ * in the caller side.
86
+ *
87
+ * @since Xcode 15 (but lower xcode could have this command)
88
+ * @param contentSizeAction valid content size or action value. Acceptable value is
89
+ * extra-small, small, medium, large, extra-large, extra-extra-large,
90
+ * extra-extra-extra-large, accessibility-medium, accessibility-large,
91
+ * accessibility-extra-large, accessibility-extra-extra-large,
92
+ * accessibility-extra-extra-extra-large with Xcode 16.2.
93
+ * @throws {Error} if the current SDK version does not support the command
94
+ * or the given value was invalid for the command.
95
+ * @throws {Error} If the `udid` instance property is unset
96
+ */
97
+ export declare function setContentSize(this: Simctl, contentSizeAction: string): Promise<void>;
106
98
  //# sourceMappingURL=ui.d.ts.map
@@ -1 +1 @@
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;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,iEAPY,OAAO,CAAC,MAAM,CAAC,CAY1B;IAED;;;;;;;;;;;;;OAaG;IACH,kFANW,MAAM,iBAUhB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,4DAVY,OAAO,CAAC,MAAM,CAAC,CAe1B;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,8EATW,MAAM,iBAahB"}
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/ui.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKlE;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIpF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKxE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,CAAE,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhG;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,cAAc,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKnE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,cAAc,CAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI5F"}