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
@@ -3,32 +3,30 @@ 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.launchApp = launchApp;
6
7
  const lodash_1 = __importDefault(require("lodash"));
7
8
  const asyncbox_1 = require("asyncbox");
8
- const commands = {};
9
9
  /**
10
10
  * Execute the particular application package on Simulator.
11
11
  * It is required that Simulator is in _booted_ state and
12
12
  * the application with given bundle identifier is already installed.
13
13
  *
14
- * @this {import('../simctl').Simctl}
15
- * @param {string} bundleId - Bundle identifier of the application,
14
+ * @param bundleId - Bundle identifier of the application,
16
15
  * which is going to be removed.
17
- * @param {number} [tries=5] - The maximum number of retries before
16
+ * @param tries - The maximum number of retries before
18
17
  * throwing an exception.
19
- * @return {Promise<string>} the actual command output
18
+ * @return the actual command output
20
19
  * @throws {Error} If the corresponding simctl subcommand command
21
20
  * returns non-zero return code.
22
21
  * @throws {Error} If the `udid` instance property is unset
23
22
  */
24
- commands.launchApp = async function launchApp(bundleId, tries = 5) {
25
- // @ts-ignore A string will always be returned
26
- return await (0, asyncbox_1.retryInterval)(tries, 1000, async () => {
23
+ async function launchApp(bundleId, tries = 5) {
24
+ const result = await (0, asyncbox_1.retryInterval)(tries, 1000, async () => {
27
25
  const { stdout } = await this.exec('launch', {
28
26
  args: [this.requireUdid('launch'), bundleId],
29
27
  });
30
- return lodash_1.default.trim(stdout);
28
+ return lodash_1.default.trim(stdout) || '';
31
29
  });
32
- };
33
- exports.default = commands;
30
+ return result || '';
31
+ }
34
32
  //# sourceMappingURL=launch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"launch.js","sourceRoot":"","sources":["../../../lib/subcommands/launch.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AACvB,uCAAyC;AAEzC,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;;;;;;GAcG;AACH,QAAQ,CAAC,SAAS,GAAG,KAAK,UAAU,SAAS,CAAE,QAAQ,EAAE,KAAK,GAAG,CAAC;IAChE,8CAA8C;IAC9C,OAAO,MAAM,IAAA,wBAAa,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE;QACjD,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACzC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;SAC7C,CAAC,CAAC;QACH,OAAO,gBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"launch.js","sourceRoot":"","sources":["../../../lib/subcommands/launch.ts"],"names":[],"mappings":";;;;;AAkBA,8BAQC;AA1BD,oDAAuB;AACvB,uCAAyC;AAGzC;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,SAAS,CAAgB,QAAgB,EAAE,QAAgB,CAAC;IAChF,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAa,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE;QACzD,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACzC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;SAC7C,CAAC,CAAC;QACH,OAAO,gBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,IAAI,EAAE,CAAC;AACtB,CAAC"}
@@ -1,126 +1,95 @@
1
- export default commands;
2
- export type DeviceInfo = {
3
- /**
4
- * - The device name.
5
- */
6
- name: string;
7
- /**
8
- * - The device UDID.
9
- */
10
- udid: string;
11
- /**
12
- * - The current Simulator state, for example 'booted' or 'shutdown'.
13
- */
14
- state: string;
15
- /**
16
- * - The SDK version, for example '10.3'.
17
- */
18
- sdk: string;
19
- };
20
- declare namespace commands {
21
- /**
22
- * @typedef {Object} DeviceInfo
23
- * @property {string} name - The device name.
24
- * @property {string} udid - The device UDID.
25
- * @property {string} state - The current Simulator state, for example 'booted' or 'shutdown'.
26
- * @property {string} sdk - The SDK version, for example '10.3'.
27
- */
28
- /**
29
- * Parse the list of existing Simulator devices to represent
30
- * it as convenient mapping.
31
- *
32
- * @this {import('../simctl').Simctl}
33
- * @param {string?} [platform] - The platform name, for example 'watchOS'.
34
- * @return {Promise<Record<string, any>>} The resulting mapping. Each key is platform version,
35
- * for example '10.3' and the corresponding value is an
36
- * array of the matching {@link DeviceInfo} instances.
37
- * @throws {Error} If the corresponding simctl subcommand command
38
- * returns non-zero return code.
39
- */
40
- function getDevicesByParsing(this: import("../simctl").default, platform?: string | null): Promise<Record<string, any>>;
41
- /**
42
- * Parse the list of existing Simulator devices to represent
43
- * it as convenient mapping for the particular platform version.
44
- *
45
- * @this {import('../simctl').Simctl}
46
- * @param {string?} [forSdk] - The sdk version,
47
- * for which the devices list should be parsed,
48
- * for example '10.3'.
49
- * @param {string?} [platform] - The platform name, for example 'watchOS'.
50
- * @return {Promise<Object|DeviceInfo[]>} If _forSdk_ is set then the list
51
- * of devices for the particular platform version.
52
- * Otherwise the same result as for {@link getDevicesByParsing}
53
- * function.
54
- * @throws {Error} If the corresponding simctl subcommand command
55
- * returns non-zero return code or if no matching
56
- * platform version is found in the system.
57
- */
58
- function getDevices(this: import("../simctl").default, forSdk?: string | null, platform?: string | null): Promise<any | DeviceInfo[]>;
59
- /**
60
- * Get the runtime for the particular platform version using --json flag
61
- *
62
- * @this {import('../simctl').Simctl}
63
- * @param {string} platformVersion - The platform version name,
64
- * for example '10.3'.
65
- * @param {string} [platform='iOS'] - The platform name, for example 'watchOS'.
66
- * @return {Promise<string>} The corresponding runtime name for the given
67
- * platform version.
68
- */
69
- function getRuntimeForPlatformVersionViaJson(this: import("../simctl").default, platformVersion: string, platform?: string): Promise<string>;
70
- /**
71
- * Get the runtime for the particular platform version.
72
- *
73
- * @this {import('../simctl').Simctl}
74
- * @param {string} platformVersion - The platform version name,
75
- * for example '10.3'.
76
- * @param {string} [platform='iOS'] - The platform name, for example 'watchOS'.
77
- * @return {Promise<string>} The corresponding runtime name for the given
78
- * platform version.
79
- */
80
- function getRuntimeForPlatformVersion(this: import("../simctl").default, platformVersion: string, platform?: string): Promise<string>;
81
- /**
82
- * Get the list of device types available in the current Xcode installation
83
- *
84
- * @this {import('../simctl').Simctl}
85
- * @return {Promise<string[]>} List of the types of devices available
86
- * @throws {Error} If the corresponding simctl command fails
87
- */
88
- function getDeviceTypes(this: import("../simctl").default): Promise<string[]>;
89
- /**
90
- * Get the full list of runtimes, devicetypes, devices and pairs as Object
91
- *
92
- * @this {import('../simctl').Simctl}
93
- * @return {Promise<Object>} Object containing device types, runtimes devices and pairs.
94
- * The resulting JSON will be like:
95
- * {
96
- * "devicetypes" : [
97
- * {
98
- * "name" : "iPhone 4s",
99
- * "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-4s"
100
- * },
101
- * ...
102
- * ],
103
- * "runtimes" : [
104
- * {
105
- * "version" : '13.0',
106
- * "bundlePath" : '/Applications/Xcode11beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime',
107
- * "isAvailable" : true,
108
- * "name" : 'iOS 13.0',
109
- * "identifier" : 'com.apple.CoreSimulator.SimRuntime.iOS-13-0',
110
- * "buildversion" : '17A5534d'
111
- * },
112
- * ...
113
- * },
114
- * "devices" :
115
- * {
116
- * 'com.apple.CoreSimulator.SimRuntime.iOS-13-0': [ [Object], [Object] ] },
117
- * ...
118
- * },
119
- * "pairs" : {} }
120
- *
121
- * }
122
- * @throws {Error} If the corresponding simctl command fails
123
- */
124
- function list(this: import("../simctl").default): Promise<any>;
125
- }
1
+ import type { Simctl } from '../simctl';
2
+ import type { DeviceInfo } from '../types';
3
+ /**
4
+ * Parse the list of existing Simulator devices to represent
5
+ * it as convenient mapping.
6
+ *
7
+ * @param platform - The platform name, for example 'watchOS'.
8
+ * @return The resulting mapping. Each key is platform version,
9
+ * for example '10.3' and the corresponding value is an
10
+ * array of the matching DeviceInfo instances.
11
+ * @throws {Error} If the corresponding simctl subcommand command
12
+ * returns non-zero return code.
13
+ */
14
+ export declare function getDevicesByParsing(this: Simctl, platform?: string | null): Promise<Record<string, DeviceInfo[]>>;
15
+ /**
16
+ * Parse the list of existing Simulator devices to represent
17
+ * it as convenient mapping for the particular platform version.
18
+ *
19
+ * @param forSdk - The sdk version,
20
+ * for which the devices list should be parsed,
21
+ * for example '10.3'.
22
+ * @param platform - The platform name, for example 'watchOS'.
23
+ * @return If _forSdk_ is set then the list
24
+ * of devices for the particular platform version.
25
+ * Otherwise the same result as for getDevicesByParsing
26
+ * function.
27
+ * @throws {Error} If the corresponding simctl subcommand command
28
+ * returns non-zero return code or if no matching
29
+ * platform version is found in the system.
30
+ */
31
+ export declare function getDevices(this: Simctl, forSdk: string, platform?: string | null): Promise<DeviceInfo[]>;
32
+ export declare function getDevices(this: Simctl, forSdk?: undefined | null, platform?: string | null): Promise<Record<string, DeviceInfo[]>>;
33
+ /**
34
+ * Get the runtime for the particular platform version using --json flag
35
+ *
36
+ * @param platformVersion - The platform version name,
37
+ * for example '10.3'.
38
+ * @param platform - The platform name, for example 'watchOS'.
39
+ * @return The corresponding runtime name for the given
40
+ * platform version.
41
+ */
42
+ export declare function getRuntimeForPlatformVersionViaJson(this: Simctl, platformVersion: string, platform?: string): Promise<string>;
43
+ /**
44
+ * Get the runtime for the particular platform version.
45
+ *
46
+ * @param platformVersion - The platform version name,
47
+ * for example '10.3'.
48
+ * @param platform - The platform name, for example 'watchOS'.
49
+ * @return The corresponding runtime name for the given
50
+ * platform version.
51
+ */
52
+ export declare function getRuntimeForPlatformVersion(this: Simctl, platformVersion: string, platform?: string): Promise<string>;
53
+ /**
54
+ * Get the list of device types available in the current Xcode installation
55
+ *
56
+ * @return List of the types of devices available
57
+ * @throws {Error} If the corresponding simctl command fails
58
+ */
59
+ export declare function getDeviceTypes(this: Simctl): Promise<string[]>;
60
+ /**
61
+ * Get the full list of runtimes, devicetypes, devices and pairs as Object
62
+ *
63
+ * @return Object containing device types, runtimes devices and pairs.
64
+ * The resulting JSON will be like:
65
+ * {
66
+ * "devicetypes" : [
67
+ * {
68
+ * "name" : "iPhone 4s",
69
+ * "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-4s"
70
+ * },
71
+ * ...
72
+ * ],
73
+ * "runtimes" : [
74
+ * {
75
+ * "version" : '13.0',
76
+ * "bundlePath" : '/Applications/Xcode11beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime',
77
+ * "isAvailable" : true,
78
+ * "name" : 'iOS 13.0',
79
+ * "identifier" : 'com.apple.CoreSimulator.SimRuntime.iOS-13-0',
80
+ * "buildversion" : '17A5534d'
81
+ * },
82
+ * ...
83
+ * },
84
+ * "devices" :
85
+ * {
86
+ * 'com.apple.CoreSimulator.SimRuntime.iOS-13-0': [ [Object], [Object] ] },
87
+ * ...
88
+ * },
89
+ * "pairs" : {} }
90
+ *
91
+ * }
92
+ * @throws {Error} If the corresponding simctl command fails
93
+ */
94
+ export declare function list(this: Simctl): Promise<any>;
126
95
  //# sourceMappingURL=list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/list.js"],"names":[],"mappings":";;;;;UASc,MAAM;;;;UACN,MAAM;;;;WACN,MAAM;;;;SACN,MAAM;;;IALpB;;;;;;OAMG;IAEH;;;;;;;;;;;OAWG;IACH,2EAPW,MAAM,OAAC,GACN,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAiEvC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,gEAZW,MAAM,OAAC,aAGP,MAAM,OAAC,GACN,OAAO,CAAC,MAAO,UAAU,EAAE,CAAC,CA2EvC;IAED;;;;;;;;;OASG;IACH,iGANW,MAAM,aAEN,MAAM,GACL,OAAO,CAAC,MAAM,CAAC,CAe1B;IAED;;;;;;;;;OASG;IACH,0FANW,MAAM,aAEN,MAAM,GACL,OAAO,CAAC,MAAM,CAAC,CAuB1B;IAED;;;;;;OAMG;IACH,4DAHY,OAAO,CAAC,MAAM,EAAE,CAAC,CAwB5B;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,kDA/BY,OAAO,KAAQ,CAwC1B"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/list.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CA2DvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;AACzB,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,EACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;AA0EzC;;;;;;;;GAQG;AACH,wBAAsB,mCAAmC,CACvD,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,MAAM,EACvB,QAAQ,GAAE,MAAc,GACvB,OAAO,CAAC,MAAM,CAAC,CAWjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,MAAM,EACvB,QAAQ,GAAE,MAAc,GACvB,OAAO,CAAC,MAAM,CAAC,CAmBjB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAqBrE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,IAAI,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAStD"}
@@ -1,65 +1,29 @@
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.getDevicesByParsing = getDevicesByParsing;
7
+ exports.getDevices = getDevices;
8
+ exports.getRuntimeForPlatformVersionViaJson = getRuntimeForPlatformVersionViaJson;
9
+ exports.getRuntimeForPlatformVersion = getRuntimeForPlatformVersion;
10
+ exports.getDeviceTypes = getDeviceTypes;
11
+ exports.list = list;
39
12
  const lodash_1 = __importDefault(require("lodash"));
40
13
  const helpers_1 = require("../helpers");
41
- const logger_1 = __importStar(require("../logger"));
42
- const commands = {};
43
- /**
44
- * @typedef {Object} DeviceInfo
45
- * @property {string} name - The device name.
46
- * @property {string} udid - The device UDID.
47
- * @property {string} state - The current Simulator state, for example 'booted' or 'shutdown'.
48
- * @property {string} sdk - The SDK version, for example '10.3'.
49
- */
14
+ const logger_1 = require("../logger");
50
15
  /**
51
16
  * Parse the list of existing Simulator devices to represent
52
17
  * it as convenient mapping.
53
18
  *
54
- * @this {import('../simctl').Simctl}
55
- * @param {string?} [platform] - The platform name, for example 'watchOS'.
56
- * @return {Promise<Record<string, any>>} The resulting mapping. Each key is platform version,
19
+ * @param platform - The platform name, for example 'watchOS'.
20
+ * @return The resulting mapping. Each key is platform version,
57
21
  * for example '10.3' and the corresponding value is an
58
- * array of the matching {@link DeviceInfo} instances.
22
+ * array of the matching DeviceInfo instances.
59
23
  * @throws {Error} If the corresponding simctl subcommand command
60
24
  * returns non-zero return code.
61
25
  */
62
- commands.getDevicesByParsing = async function getDevicesByParsing(platform) {
26
+ async function getDevicesByParsing(platform) {
63
27
  const { stdout } = await this.exec('list', {
64
28
  args: ['devices'],
65
29
  });
@@ -116,25 +80,8 @@ commands.getDevicesByParsing = async function getDevicesByParsing(platform) {
116
80
  }
117
81
  }
118
82
  return devices;
119
- };
120
- /**
121
- * Parse the list of existing Simulator devices to represent
122
- * it as convenient mapping for the particular platform version.
123
- *
124
- * @this {import('../simctl').Simctl}
125
- * @param {string?} [forSdk] - The sdk version,
126
- * for which the devices list should be parsed,
127
- * for example '10.3'.
128
- * @param {string?} [platform] - The platform name, for example 'watchOS'.
129
- * @return {Promise<Object|DeviceInfo[]>} If _forSdk_ is set then the list
130
- * of devices for the particular platform version.
131
- * Otherwise the same result as for {@link getDevicesByParsing}
132
- * function.
133
- * @throws {Error} If the corresponding simctl subcommand command
134
- * returns non-zero return code or if no matching
135
- * platform version is found in the system.
136
- */
137
- commands.getDevices = async function getDevices(forSdk, platform) {
83
+ }
84
+ async function getDevices(forSdk, platform) {
138
85
  let devices = {};
139
86
  try {
140
87
  const { stdout } = await this.exec('list', {
@@ -159,9 +106,9 @@ commands.getDevices = async function getDevices(forSdk, platform) {
159
106
  const versionMatchRe = lodash_1.default.isEmpty(platform) || !platform
160
107
  ? new RegExp(`^([^\\s-]+)[\\s-](\\S+)`, 'i')
161
108
  : new RegExp(`^${lodash_1.default.escapeRegExp(platform)}[\\s-](\\S+)`, 'i');
162
- for (let [sdkName, entries] of lodash_1.default.toPairs(JSON.parse(stdout).devices)) {
109
+ for (const [sdkNameRaw, entries] of lodash_1.default.toPairs(JSON.parse(stdout).devices)) {
163
110
  // there could be a longer name, so remove it
164
- sdkName = sdkName.replace(helpers_1.SIM_RUNTIME_NAME, '');
111
+ const sdkName = sdkNameRaw.replace(helpers_1.SIM_RUNTIME_NAME, '');
165
112
  const versionMatch = versionMatchRe.exec(sdkName);
166
113
  if (!versionMatch) {
167
114
  continue;
@@ -181,8 +128,8 @@ commands.getDevices = async function getDevices(forSdk, platform) {
181
128
  }
182
129
  }
183
130
  catch (err) {
184
- logger_1.default.debug(logger_1.LOG_PREFIX, `Unable to get JSON device list: ${err.stack}`);
185
- logger_1.default.debug(logger_1.LOG_PREFIX, 'Falling back to manual parsing');
131
+ logger_1.log.debug(logger_1.LOG_PREFIX, `Unable to get JSON device list: ${err.stack}`);
132
+ logger_1.log.debug(logger_1.LOG_PREFIX, 'Falling back to manual parsing');
186
133
  devices = await this.getDevicesByParsing(platform);
187
134
  }
188
135
  if (!forSdk) {
@@ -198,18 +145,17 @@ commands.getDevices = async function getDevices(forSdk, platform) {
198
145
  ? ` Only the following Simulator SDK versions are available on your system: ${availableSDKs.join(', ')}`
199
146
  : ` No Simulator SDK versions are available on your system. Please install some via Xcode preferences.`;
200
147
  throw new Error(errMsg);
201
- };
148
+ }
202
149
  /**
203
150
  * Get the runtime for the particular platform version using --json flag
204
151
  *
205
- * @this {import('../simctl').Simctl}
206
- * @param {string} platformVersion - The platform version name,
152
+ * @param platformVersion - The platform version name,
207
153
  * for example '10.3'.
208
- * @param {string} [platform='iOS'] - The platform name, for example 'watchOS'.
209
- * @return {Promise<string>} The corresponding runtime name for the given
154
+ * @param platform - The platform name, for example 'watchOS'.
155
+ * @return The corresponding runtime name for the given
210
156
  * platform version.
211
157
  */
212
- commands.getRuntimeForPlatformVersionViaJson = async function getRuntimeForPlatformVersionViaJson(platformVersion, platform = 'iOS') {
158
+ async function getRuntimeForPlatformVersionViaJson(platformVersion, platform = 'iOS') {
213
159
  const { stdout } = await this.exec('list', {
214
160
  args: ['runtimes', '--json'],
215
161
  });
@@ -220,18 +166,17 @@ commands.getRuntimeForPlatformVersionViaJson = async function getRuntimeForPlatf
220
166
  }
221
167
  }
222
168
  throw new Error(`Could not use --json flag to parse platform version`);
223
- };
169
+ }
224
170
  /**
225
171
  * Get the runtime for the particular platform version.
226
172
  *
227
- * @this {import('../simctl').Simctl}
228
- * @param {string} platformVersion - The platform version name,
173
+ * @param platformVersion - The platform version name,
229
174
  * for example '10.3'.
230
- * @param {string} [platform='iOS'] - The platform name, for example 'watchOS'.
231
- * @return {Promise<string>} The corresponding runtime name for the given
175
+ * @param platform - The platform name, for example 'watchOS'.
176
+ * @return The corresponding runtime name for the given
232
177
  * platform version.
233
178
  */
234
- commands.getRuntimeForPlatformVersion = async function getRuntimeForPlatformVersion(platformVersion, platform = 'iOS') {
179
+ async function getRuntimeForPlatformVersion(platformVersion, platform = 'iOS') {
235
180
  // Try with parsing
236
181
  try {
237
182
  const { stdout } = await this.exec('list', {
@@ -249,15 +194,14 @@ commands.getRuntimeForPlatformVersion = async function getRuntimeForPlatformVers
249
194
  catch { }
250
195
  // if nothing was found, pass platform version back
251
196
  return platformVersion;
252
- };
197
+ }
253
198
  /**
254
199
  * Get the list of device types available in the current Xcode installation
255
200
  *
256
- * @this {import('../simctl').Simctl}
257
- * @return {Promise<string[]>} List of the types of devices available
201
+ * @return List of the types of devices available
258
202
  * @throws {Error} If the corresponding simctl command fails
259
203
  */
260
- commands.getDeviceTypes = async function getDeviceTypes() {
204
+ async function getDeviceTypes() {
261
205
  const { stdout } = await this.exec('list', {
262
206
  args: ['devicetypes', '-j'],
263
207
  });
@@ -279,12 +223,11 @@ commands.getDeviceTypes = async function getDeviceTypes() {
279
223
  catch (err) {
280
224
  throw new Error(`Unable to get list of device types: ${err.message}`);
281
225
  }
282
- };
226
+ }
283
227
  /**
284
228
  * Get the full list of runtimes, devicetypes, devices and pairs as Object
285
229
  *
286
- * @this {import('../simctl').Simctl}
287
- * @return {Promise<Object>} Object containing device types, runtimes devices and pairs.
230
+ * @return Object containing device types, runtimes devices and pairs.
288
231
  * The resulting JSON will be like:
289
232
  * {
290
233
  * "devicetypes" : [
@@ -315,7 +258,7 @@ commands.getDeviceTypes = async function getDeviceTypes() {
315
258
  * }
316
259
  * @throws {Error} If the corresponding simctl command fails
317
260
  */
318
- commands.list = async function list() {
261
+ async function list() {
319
262
  const { stdout } = await this.exec('list', {
320
263
  args: ['-j'],
321
264
  });
@@ -325,6 +268,5 @@ commands.list = async function list() {
325
268
  catch (e) {
326
269
  throw new Error(`Unable to parse simctl list: ${e.message}`);
327
270
  }
328
- };
329
- exports.default = commands;
271
+ }
330
272
  //# sourceMappingURL=list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../lib/subcommands/list.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAuB;AACvB,wCAAgE;AAChE,oDAA4C;AAG5C,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,QAAQ,CAAC,mBAAmB,GAAG,KAAK,UAAU,mBAAmB,CAAE,QAAQ;IACzE,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QACvC,IAAI,EAAE,CAAC,SAAS,CAAC;KAClB,CAAC,CAAC;IAEH,+BAA+B;IAC/B,gBAAgB;IAChB,kEAAkE;IAClE,UAAU;IACV,gBAAgB;IAChB,kEAAkE;IAClE,UAAU;IACV,yDAAyD;IACzD,iEAAiE;IACjE,MAAM,eAAe,GAAG,gBAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ;QACtD,CAAC,CAAC,IAAI,MAAM,CAAC,oDAAoD,EAAE,KAAK,CAAC;QACzE,CAAC,CAAC,IAAI,MAAM,CAAC,aAAa,gBAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;IACjG,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,IAAI,KAAK,CAAC;IACV,qCAAqC;IACrC,OAAO,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CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IAEV,mDAAmD;IACnD,OAAO,eAAe,CAAC;AACzB,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,cAAc;IAClC,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QACvC,IAAI,EAAE,CAAC,aAAa,EAAE,IAAI,CAAC;KAC5B,CAAC,CAAC;IACH;;;;;;;;;;OAUG;IACH,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9C,OAAO,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/D,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,uCAAuC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACI,KAAK,UAAU,IAAI;IACxB,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QACvC,IAAI,EAAE,CAAC,IAAI,CAAC;KACb,CAAC,CAAC;IACH,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC"}
@@ -1,23 +1,19 @@
1
- export default commands;
2
- declare namespace commands {
3
- /**
4
- * Set the Simulator location to a specific latitude and longitude.
5
- * This functionality is only available since Xcode 14.
6
- *
7
- * @this {import('../simctl').Simctl}
8
- * @param {string|number} latitude Location latitude value
9
- * @param {string|number} longitude Location longitude value
10
- * @throws {Error} If the corresponding simctl subcommand command
11
- * returns non-zero return code.
12
- * @throws {TypeError} If any of the arguments is not a valid value.
13
- */
14
- function setLocation(this: import("../simctl").default, latitude: string | number, longitude: string | number): Promise<void>;
15
- /**
16
- * Stop any running scenario and clear any simulated location.
17
- *
18
- * @since Xcode 14.
19
- * @this {import('../simctl').Simctl}
20
- */
21
- function clearLocation(this: import("../simctl").default): Promise<void>;
22
- }
1
+ import type { Simctl } from '../simctl';
2
+ /**
3
+ * Set the Simulator location to a specific latitude and longitude.
4
+ * This functionality is only available since Xcode 14.
5
+ *
6
+ * @param latitude Location latitude value
7
+ * @param longitude Location longitude value
8
+ * @throws {Error} If the corresponding simctl subcommand command
9
+ * returns non-zero return code.
10
+ * @throws {TypeError} If any of the arguments is not a valid value.
11
+ */
12
+ export declare function setLocation(this: Simctl, latitude: string | number, longitude: string | number): Promise<void>;
13
+ /**
14
+ * Stop any running scenario and clear any simulated location.
15
+ *
16
+ * @since Xcode 14.
17
+ */
18
+ export declare function clearLocation(this: Simctl): Promise<void>;
23
19
  //# sourceMappingURL=location.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/location.js"],"names":[],"mappings":";;IAiBA;;;;;;;;;;OAUG;IACH,kEANW,MAAM,GAAC,MAAM,aACb,MAAM,GAAC,MAAM,iBAWvB;IAED;;;;;OAKG;IACH,yEAIC"}
1
+ {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/location.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAiBxC;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GAAG,MAAM,EACzB,SAAS,EAAE,MAAM,GAAG,MAAM,GACzB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhE"}