@limrun/appium-xcuitest-driver 10.4.3-lim.1 → 10.10.1-lim.10

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 (205) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/build/lib/app-utils.d.ts +2 -2
  3. package/build/lib/app-utils.d.ts.map +1 -1
  4. package/build/lib/app-utils.js +4 -1
  5. package/build/lib/app-utils.js.map +1 -1
  6. package/build/lib/commands/app-management.js +2 -2
  7. package/build/lib/commands/app-management.js.map +1 -1
  8. package/build/lib/commands/appearance.js +2 -2
  9. package/build/lib/commands/appearance.js.map +1 -1
  10. package/build/lib/commands/bidi/models.d.ts.map +1 -1
  11. package/build/lib/commands/bidi/models.js +1 -0
  12. package/build/lib/commands/bidi/models.js.map +1 -1
  13. package/build/lib/commands/bidi/types.d.ts +1 -0
  14. package/build/lib/commands/bidi/types.d.ts.map +1 -1
  15. package/build/lib/commands/biometric.js +3 -3
  16. package/build/lib/commands/biometric.js.map +1 -1
  17. package/build/lib/commands/certificate.d.ts.map +1 -1
  18. package/build/lib/commands/certificate.js +9 -3
  19. package/build/lib/commands/certificate.js.map +1 -1
  20. package/build/lib/commands/condition.d.ts +2 -0
  21. package/build/lib/commands/condition.d.ts.map +1 -1
  22. package/build/lib/commands/condition.js +75 -2
  23. package/build/lib/commands/condition.js.map +1 -1
  24. package/build/lib/commands/context.d.ts +5 -5
  25. package/build/lib/commands/context.d.ts.map +1 -1
  26. package/build/lib/commands/context.js +6 -6
  27. package/build/lib/commands/context.js.map +1 -1
  28. package/build/lib/commands/file-movement.d.ts.map +1 -1
  29. package/build/lib/commands/file-movement.js +7 -7
  30. package/build/lib/commands/file-movement.js.map +1 -1
  31. package/build/lib/commands/general.js +1 -1
  32. package/build/lib/commands/general.js.map +1 -1
  33. package/build/lib/commands/gesture.js +1 -1
  34. package/build/lib/commands/gesture.js.map +1 -1
  35. package/build/lib/commands/keychains.js +1 -1
  36. package/build/lib/commands/keychains.js.map +1 -1
  37. package/build/lib/commands/localization.js +1 -1
  38. package/build/lib/commands/localization.js.map +1 -1
  39. package/build/lib/commands/location.d.ts +3 -2
  40. package/build/lib/commands/location.d.ts.map +1 -1
  41. package/build/lib/commands/location.js +10 -4
  42. package/build/lib/commands/location.js.map +1 -1
  43. package/build/lib/commands/log.js +9 -9
  44. package/build/lib/commands/log.js.map +1 -1
  45. package/build/lib/commands/memory.js +1 -1
  46. package/build/lib/commands/memory.js.map +1 -1
  47. package/build/lib/commands/notifications.js +1 -1
  48. package/build/lib/commands/notifications.js.map +1 -1
  49. package/build/lib/commands/pasteboard.js +2 -2
  50. package/build/lib/commands/pasteboard.js.map +1 -1
  51. package/build/lib/commands/pcap.js +1 -1
  52. package/build/lib/commands/pcap.js.map +1 -1
  53. package/build/lib/commands/performance.d.ts.map +1 -1
  54. package/build/lib/commands/performance.js +13 -4
  55. package/build/lib/commands/performance.js.map +1 -1
  56. package/build/lib/commands/permissions.js +2 -2
  57. package/build/lib/commands/permissions.js.map +1 -1
  58. package/build/lib/commands/proxy-helper.d.ts.map +1 -1
  59. package/build/lib/commands/proxy-helper.js +0 -3
  60. package/build/lib/commands/proxy-helper.js.map +1 -1
  61. package/build/lib/commands/screenshots.js +1 -1
  62. package/build/lib/commands/screenshots.js.map +1 -1
  63. package/build/lib/commands/simctl.d.ts +1 -1
  64. package/build/lib/commands/simctl.d.ts.map +1 -1
  65. package/build/lib/commands/simctl.js +1 -1
  66. package/build/lib/commands/simctl.js.map +1 -1
  67. package/build/lib/commands/web.js +1 -1
  68. package/build/lib/commands/web.js.map +1 -1
  69. package/build/lib/commands/xctest-record-screen.js +2 -2
  70. package/build/lib/commands/xctest-record-screen.js.map +1 -1
  71. package/build/lib/desired-caps.d.ts +392 -505
  72. package/build/lib/desired-caps.d.ts.map +1 -1
  73. package/build/lib/desired-caps.js +19 -10
  74. package/build/lib/desired-caps.js.map +1 -1
  75. package/build/lib/device/clients/base-device-client.d.ts +22 -0
  76. package/build/lib/device/clients/base-device-client.d.ts.map +1 -0
  77. package/build/lib/device/clients/base-device-client.js +14 -0
  78. package/build/lib/device/clients/base-device-client.js.map +1 -0
  79. package/build/lib/device/clients/py-ios-device-client.d.ts +21 -0
  80. package/build/lib/device/clients/py-ios-device-client.d.ts.map +1 -0
  81. package/build/lib/device/clients/py-ios-device-client.js +125 -0
  82. package/build/lib/device/clients/py-ios-device-client.js.map +1 -0
  83. package/build/lib/device/device-connections-factory.d.ts +18 -0
  84. package/build/lib/device/device-connections-factory.d.ts.map +1 -0
  85. package/build/lib/device/device-connections-factory.js +260 -0
  86. package/build/lib/device/device-connections-factory.js.map +1 -0
  87. package/build/lib/device/log/helpers.d.ts +10 -0
  88. package/build/lib/device/log/helpers.d.ts.map +1 -0
  89. package/build/lib/device/log/helpers.js +37 -0
  90. package/build/lib/device/log/helpers.js.map +1 -0
  91. package/build/lib/device/log/ios-crash-log.d.ts +34 -0
  92. package/build/lib/device/log/ios-crash-log.d.ts.map +1 -0
  93. package/build/lib/device/log/ios-crash-log.js +141 -0
  94. package/build/lib/device/log/ios-crash-log.js.map +1 -0
  95. package/build/lib/device/log/ios-device-log.d.ts +19 -0
  96. package/build/lib/device/log/ios-device-log.d.ts.map +1 -0
  97. package/build/lib/device/log/ios-device-log.js +42 -0
  98. package/build/lib/device/log/ios-device-log.js.map +1 -0
  99. package/build/lib/device/log/ios-log.d.ts +24 -0
  100. package/build/lib/device/log/ios-log.d.ts.map +1 -0
  101. package/build/lib/device/log/ios-log.js +50 -0
  102. package/build/lib/device/log/ios-log.js.map +1 -0
  103. package/build/lib/device/log/ios-performance-log.d.ts +18 -0
  104. package/build/lib/device/log/ios-performance-log.d.ts.map +1 -0
  105. package/build/lib/device/log/ios-performance-log.js +43 -0
  106. package/build/lib/device/log/ios-performance-log.js.map +1 -0
  107. package/build/lib/device/log/ios-simulator-log.d.ts +38 -0
  108. package/build/lib/device/log/ios-simulator-log.d.ts.map +1 -0
  109. package/build/lib/device/log/ios-simulator-log.js +184 -0
  110. package/build/lib/device/log/ios-simulator-log.js.map +1 -0
  111. package/build/lib/device/log/line-consuming-log.d.ts +9 -0
  112. package/build/lib/device/log/line-consuming-log.d.ts.map +1 -0
  113. package/build/lib/device/log/line-consuming-log.js +16 -0
  114. package/build/lib/device/log/line-consuming-log.js.map +1 -0
  115. package/build/lib/device/log/safari-console-log.d.ts +67 -0
  116. package/build/lib/device/log/safari-console-log.d.ts.map +1 -0
  117. package/build/lib/device/log/safari-console-log.js +81 -0
  118. package/build/lib/device/log/safari-console-log.js.map +1 -0
  119. package/build/lib/device/log/safari-network-log.d.ts +75 -0
  120. package/build/lib/device/log/safari-network-log.d.ts.map +1 -0
  121. package/build/lib/device/log/safari-network-log.js +47 -0
  122. package/build/lib/device/log/safari-network-log.js.map +1 -0
  123. package/build/lib/device/real-device-management.d.ts +146 -0
  124. package/build/lib/device/real-device-management.d.ts.map +1 -0
  125. package/build/lib/device/real-device-management.js +740 -0
  126. package/build/lib/device/real-device-management.js.map +1 -0
  127. package/build/lib/device/simulator-management.d.ts +65 -0
  128. package/build/lib/device/simulator-management.d.ts.map +1 -0
  129. package/build/lib/device/simulator-management.js +261 -0
  130. package/build/lib/device/simulator-management.js.map +1 -0
  131. package/build/lib/device-log/ios-crash-log.d.ts +1 -1
  132. package/build/lib/device-log/ios-crash-log.d.ts.map +1 -1
  133. package/build/lib/device-log/ios-simulator-log.d.ts +1 -1
  134. package/build/lib/device-log/ios-simulator-log.d.ts.map +1 -1
  135. package/build/lib/doctor/required-checks.js +1 -1
  136. package/build/lib/doctor/required-checks.js.map +1 -1
  137. package/build/lib/driver.d.ts +129 -1377
  138. package/build/lib/driver.d.ts.map +1 -1
  139. package/build/lib/driver.js +461 -573
  140. package/build/lib/driver.js.map +1 -1
  141. package/build/lib/method-map.d.ts +1 -1
  142. package/build/lib/method-map.d.ts.map +1 -1
  143. package/build/lib/method-map.js +2 -2
  144. package/build/lib/method-map.js.map +1 -1
  145. package/build/lib/simulator-management.d.ts +10 -0
  146. package/build/lib/simulator-management.d.ts.map +1 -1
  147. package/build/lib/simulator-management.js +9 -5
  148. package/build/lib/simulator-management.js.map +1 -1
  149. package/build/lib/utils.d.ts +2 -9
  150. package/build/lib/utils.d.ts.map +1 -1
  151. package/build/lib/utils.js +3 -47
  152. package/build/lib/utils.js.map +1 -1
  153. package/lib/app-utils.js +5 -1
  154. package/lib/commands/app-management.js +2 -2
  155. package/lib/commands/appearance.js +2 -2
  156. package/lib/commands/bidi/models.ts +1 -0
  157. package/lib/commands/bidi/types.ts +1 -0
  158. package/lib/commands/biometric.js +3 -3
  159. package/lib/commands/certificate.js +9 -3
  160. package/lib/commands/condition.js +85 -2
  161. package/lib/commands/context.js +6 -6
  162. package/lib/commands/file-movement.js +11 -7
  163. package/lib/commands/general.js +1 -1
  164. package/lib/commands/gesture.js +1 -1
  165. package/lib/commands/keychains.js +1 -1
  166. package/lib/commands/localization.js +1 -1
  167. package/lib/commands/location.js +11 -4
  168. package/lib/commands/log.js +9 -9
  169. package/lib/commands/memory.js +1 -1
  170. package/lib/commands/notifications.js +1 -1
  171. package/lib/commands/pasteboard.js +2 -2
  172. package/lib/commands/pcap.js +1 -1
  173. package/lib/commands/performance.js +12 -1
  174. package/lib/commands/permissions.js +2 -2
  175. package/lib/commands/proxy-helper.js +0 -3
  176. package/lib/commands/screenshots.js +1 -1
  177. package/lib/commands/simctl.js +1 -1
  178. package/lib/commands/web.js +1 -1
  179. package/lib/commands/xctest-record-screen.js +2 -2
  180. package/lib/{desired-caps.js → desired-caps.ts} +20 -6
  181. package/lib/{real-device-clients → device/clients}/py-ios-device-client.ts +1 -1
  182. package/lib/{device-connections-factory.js → device/device-connections-factory.ts} +96 -60
  183. package/lib/{device-log → device/log}/helpers.ts +1 -1
  184. package/lib/{device-log → device/log}/ios-crash-log.ts +4 -4
  185. package/lib/{device-log → device/log}/ios-log.ts +1 -1
  186. package/lib/{device-log → device/log}/ios-simulator-log.ts +9 -9
  187. package/lib/{device-log → device/log}/line-consuming-log.ts +1 -1
  188. package/lib/{device-log → device/log}/safari-console-log.ts +1 -1
  189. package/lib/device/real-device-management.ts +831 -0
  190. package/lib/{simulator-management.js → device/simulator-management.ts} +75 -64
  191. package/lib/doctor/required-checks.ts +1 -1
  192. package/lib/{driver.js → driver.ts} +623 -707
  193. package/lib/{method-map.js → method-map.ts} +5 -2
  194. package/lib/utils.js +3 -54
  195. package/package.json +17 -19
  196. package/scripts/build-wda.js +3 -3
  197. package/lib/ios-fs-helpers.js +0 -355
  198. package/lib/ios-generic-simulators.js +0 -11
  199. package/lib/real-device-management.js +0 -133
  200. package/lib/real-device.js +0 -347
  201. package/lib/xcrun.js +0 -16
  202. /package/lib/{real-device-clients → device/clients}/base-device-client.ts +0 -0
  203. /package/lib/{device-log → device/log}/ios-device-log.ts +0 -0
  204. /package/lib/{device-log → device/log}/ios-performance-log.ts +0 -0
  205. /package/lib/{device-log → device/log}/safari-network-log.ts +0 -0
@@ -1,25 +1,25 @@
1
- import {getSimulator} from '@limrun/appium-ios-simulator';
2
- import {Simctl} from '@limrun/node-simctl';
1
+ import {getSimulator, type Simulator, type LocalizationOptions} from 'appium-ios-simulator';
2
+ import {Simctl} from 'node-simctl';
3
3
  import {resetTestProcesses} from 'appium-webdriveragent';
4
4
  import _ from 'lodash';
5
5
  import {util, timing} from 'appium/support';
6
- import {UDID_AUTO, normalizePlatformName} from './utils';
7
- import {buildSafariPreferences} from './app-utils';
6
+ import {UDID_AUTO, normalizePlatformName} from '../utils';
7
+ import {buildSafariPreferences} from '../app-utils';
8
+ import type { XCUITestDriver } from '../driver';
8
9
 
9
10
  const APPIUM_SIM_PREFIX = 'appiumTest';
10
11
 
11
12
  /**
12
13
  * Create a new simulator with `appiumTest-` prefix and return the object.
13
14
  *
14
- * @this {import('./driver').XCUITestDriver}
15
- * @returns {Promise<object>} Simulator object associated with the udid passed in.
15
+ * @returns Simulator object associated with the udid passed in.
16
16
  */
17
- export async function createSim() {
17
+ export async function createSim(this: XCUITestDriver): Promise<Simulator> {
18
18
  const {simulatorDevicesSetPath: devicesSetPath, deviceName, platformVersion} = this.opts;
19
19
  const platform = normalizePlatformName(this.opts.platformName);
20
20
  const simctl = new Simctl({devicesSetPath});
21
21
  if (!deviceName) {
22
- let deviceNames = 'none';
22
+ let deviceNames: string | string[] = 'none';
23
23
  try {
24
24
  deviceNames = (await simctl
25
25
  .getDevices(platformVersion, platform))
@@ -47,42 +47,36 @@ export async function createSim() {
47
47
  });
48
48
  }
49
49
 
50
- /**
51
- * @typedef {Object} SimulatorLookupOptions
52
- * @property {string} [deviceName] - The name of the device to lookup
53
- * @property {string} platformVersion - The platform version string
54
- * @property {string} [simulatorDevicesSetPath] - The full path to the simulator devices set
55
- * @property {string} [udid] - Simulator udid
56
- * @property {string} [platformName] The name of the current platform
57
- */
58
-
59
50
  /**
60
51
  * Get an existing simulator matching the provided capabilities.
61
52
  *
62
- * @this {import('./driver').XCUITestDriver}
63
- * @returns {Promise<import('./driver').Simulator|null>} The matched Simulator instance or `null` if no matching device is found.
53
+ * @returns The matched Simulator instance or `null` if no matching device is found.
64
54
  */
65
- export async function getExistingSim() {
55
+ export async function getExistingSim(this: XCUITestDriver): Promise<Simulator | null> {
66
56
  const {
67
57
  platformVersion,
68
58
  deviceName,
69
59
  udid,
70
60
  simulatorDevicesSetPath: devicesSetPath,
71
61
  platformName,
62
+ limInstanceApiUrl,
63
+ limInstanceToken,
72
64
  } = this.opts;
73
65
 
74
66
  const platform = normalizePlatformName(platformName);
75
- const selectSim = async (/** @type {{ udid: string; platform: string; }} */ dev) =>
67
+ const selectSim = async (dev: { udid: string; platform: string; }): Promise<Simulator> =>
76
68
  await getSimulator(dev.udid, {
77
69
  platform,
78
70
  checkExistence: false,
79
71
  devicesSetPath,
80
72
  // @ts-ignore This is ok
81
73
  logger: this.log,
74
+ limInstanceApiUrl,
75
+ limInstanceToken,
82
76
  });
83
77
 
84
- const simctl = new Simctl({devicesSetPath});
85
- let devicesMap;
78
+ const simctl = new Simctl({devicesSetPath, limInstanceApiUrl, limInstanceToken});
79
+ let devicesMap: Record<string, any[]> | undefined;
86
80
  if (udid && _.toLower(udid) !== UDID_AUTO) {
87
81
  this.log.debug(`Looking for an existing Simulator with UDID '${udid}'`);
88
82
  devicesMap = await simctl.getDevices(null, platform);
@@ -123,21 +117,23 @@ export async function getExistingSim() {
123
117
  }
124
118
 
125
119
  /**
126
- * @this {import('./driver').XCUITestDriver}
120
+ * Shutdown simulator
127
121
  */
128
- export async function shutdownSimulator() {
129
- const device = /** @type {import('./driver').Simulator} */ (this.device);
122
+ export async function shutdownSimulator(this: XCUITestDriver): Promise<void> {
123
+ const device = this.device as Simulator;
130
124
  // stop XCTest processes if running to avoid unexpected side effects
131
125
  await resetTestProcesses(device.udid, true);
132
126
  await device.shutdown();
133
127
  }
134
128
 
135
129
  /**
136
- * @this {import('./driver').XCUITestDriver}
137
- * @property {boolean} [enforceSimulatorShutdown=false]
138
- * @returns {Promise<void>}
130
+ * Run simulator reset
131
+ * @param enforceSimulatorShutdown Whether to enforce simulator shutdown
139
132
  */
140
- export async function runSimulatorReset(enforceSimulatorShutdown = false) {
133
+ export async function runSimulatorReset(
134
+ this: XCUITestDriver,
135
+ enforceSimulatorShutdown: boolean = false
136
+ ): Promise<void> {
141
137
  const {
142
138
  noReset,
143
139
  fullReset,
@@ -152,7 +148,7 @@ export async function runSimulatorReset(enforceSimulatorShutdown = false) {
152
148
  this.log.debug('Reset: noReset is on. Leaving simulator as is');
153
149
  return;
154
150
  }
155
- const device = /** @type {import('./driver').Simulator} */ (this.device);
151
+ const device = this.device as Simulator;
156
152
 
157
153
  if (!this.device) {
158
154
  this.log.debug('Reset: no device available. Skipping');
@@ -165,7 +161,7 @@ export async function runSimulatorReset(enforceSimulatorShutdown = false) {
165
161
  const isKeychainsBackupSuccessful = (keychainsExcludePatterns || keepKeyChains) && (await device.backupKeychains());
166
162
  await device.clean();
167
163
  if (isKeychainsBackupSuccessful) {
168
- await device.restoreKeychains(keychainsExcludePatterns || []);
164
+ await device.restoreKeychains(keychainsExcludePatterns?.split(',')?.map(_.trim) || []);
169
165
  this.log.info(`Successfully restored keychains after full reset`);
170
166
  } else if (keychainsExcludePatterns || keepKeyChains) {
171
167
  this.log.warn(
@@ -194,8 +190,8 @@ export async function runSimulatorReset(enforceSimulatorShutdown = false) {
194
190
  await device.scrubApp(bundleId);
195
191
  }
196
192
  } catch (err) {
197
- this.log.debug(err.stack);
198
- this.log.warn(err.message);
193
+ this.log.debug((err as Error).stack);
194
+ this.log.warn((err as Error).message);
199
195
  this.log.warn(
200
196
  `Reset: could not scrub ${
201
197
  isSafari ? 'Safari browser' : 'application with id "' + this.opts.bundleId + '"'
@@ -205,36 +201,30 @@ export async function runSimulatorReset(enforceSimulatorShutdown = false) {
205
201
  }
206
202
 
207
203
  if (enforceSimulatorShutdown && (await device.isRunning())) {
208
- await shutdownSimulator.bind(this)(device);
204
+ await shutdownSimulator.bind(this)();
209
205
  }
210
206
  }
211
207
  }
212
208
 
213
209
  /**
214
- * @typedef {Object} InstallOptions
215
- *
216
- * @property {boolean} [skipUninstall] Whether to skip app uninstall before installing it
217
- * @property {boolean} [newSimulator=false] Whether the simulator is brand new
218
- */
219
-
220
- /**
221
- * @this {import('./driver').XCUITestDriver}
222
- * @param {string} app The app to the path
223
- * @param {string} [bundleId] The bundle id to ensure it is already installed and uninstall it
224
- * @param {InstallOptions} [opts={}]
210
+ * Install app to simulator
211
+ * @param app The app to the path
212
+ * @param bundleId The bundle id to ensure it is already installed and uninstall it
213
+ * @param opts Install options
225
214
  */
226
215
  export async function installToSimulator(
227
- app,
228
- bundleId,
229
- opts = {},
230
- ) {
216
+ this: XCUITestDriver,
217
+ app: string,
218
+ bundleId?: string,
219
+ opts: SimulatorInstallOptions = {},
220
+ ): Promise<void> {
231
221
  if (!app) {
232
222
  this.log.debug('No app path is given. Nothing to install.');
233
223
  return;
234
224
  }
235
225
 
236
226
  const {skipUninstall, newSimulator = false} = opts;
237
- const device = /** @type {import('./driver').Simulator} */ (this.device);
227
+ const device = this.device as Simulator;
238
228
 
239
229
  if (!skipUninstall && !newSimulator && bundleId && (await device.isAppInstalled(bundleId))) {
240
230
  this.log.debug(`Reset requested. Removing app with id '${bundleId}' from the device`);
@@ -248,10 +238,10 @@ export async function installToSimulator(
248
238
  }
249
239
 
250
240
  /**
251
- * @this {import('./driver').XCUITestDriver}
241
+ * Shutdown other simulators
252
242
  */
253
- export async function shutdownOtherSimulators() {
254
- const device = /** @type {import('./driver').Simulator} */ (this.device);
243
+ export async function shutdownOtherSimulators(this: XCUITestDriver): Promise<void> {
244
+ const device = this.device as Simulator;
255
245
  const simctl = new Simctl({
256
246
  devicesSetPath: device.devicesSetPath,
257
247
  });
@@ -281,30 +271,27 @@ export async function shutdownOtherSimulators() {
281
271
  /**
282
272
  * Configures Safari options based on the given session capabilities
283
273
  *
284
- * @this {import('./driver').XCUITestDriver}
285
- * @return {Promise<boolean>} true if any preferences have been updated
274
+ * @returns true if any preferences have been updated
286
275
  */
287
- export async function setSafariPrefs() {
276
+ export async function setSafariPrefs(this: XCUITestDriver): Promise<boolean> {
288
277
  const prefs = buildSafariPreferences(this.opts);
289
278
  if (_.isEmpty(prefs)) {
290
279
  return false;
291
280
  }
292
281
 
293
282
  this.log.debug(`About to update Safari preferences: ${JSON.stringify(prefs)}`);
294
- await /** @type {import('./driver').Simulator} */ (this.device).updateSafariSettings(prefs);
283
+ await (this.device as Simulator).updateSafariSettings(prefs);
295
284
  return true;
296
285
  }
297
286
 
298
287
  /**
299
288
  * Changes Simulator localization preferences
300
289
  *
301
- * @this {import('./driver').XCUITestDriver}
302
- * @returns {Promise<boolean>} True if preferences were changed
290
+ * @returns True if preferences were changed
303
291
  */
304
- export async function setLocalizationPrefs() {
292
+ export async function setLocalizationPrefs(this: XCUITestDriver): Promise<boolean> {
305
293
  const {language, locale, calendarFormat, skipSyncUiDialogTranslation} = this.opts;
306
- /** @type {import('@limrun/appium-ios-simulator').LocalizationOptions} */
307
- const l10nConfig = {};
294
+ const l10nConfig: LocalizationOptions = {};
308
295
  if (language) {
309
296
  l10nConfig.language = {name: language, skipSyncUiDialogTranslation };
310
297
  }
@@ -319,6 +306,30 @@ export async function setLocalizationPrefs() {
319
306
  }
320
307
 
321
308
  this.log.debug(`About to update localization preferences: ${JSON.stringify(l10nConfig)}`);
322
- await /** @type {import('./driver').Simulator} */ (this.device).configureLocalization(l10nConfig);
309
+ await (this.device as Simulator).configureLocalization(l10nConfig);
323
310
  return true;
324
311
  }
312
+
313
+ //#region Type Definitions
314
+
315
+ export interface SimulatorLookupOptions {
316
+ /** The name of the device to lookup */
317
+ deviceName?: string;
318
+ /** The platform version string */
319
+ platformVersion: string;
320
+ /** The full path to the simulator devices set */
321
+ simulatorDevicesSetPath?: string;
322
+ /** Simulator udid */
323
+ udid?: string;
324
+ /** The name of the current platform */
325
+ platformName?: string;
326
+ }
327
+
328
+ export interface SimulatorInstallOptions {
329
+ /** Whether to skip app uninstall before installing it */
330
+ skipUninstall?: boolean;
331
+ /** Whether the simulator is brand new */
332
+ newSimulator?: boolean;
333
+ }
334
+
335
+ //#endregion
@@ -1,6 +1,6 @@
1
1
  import {fs, doctor} from 'appium/support';
2
2
  import {exec} from 'teen_process';
3
- import { getPath as getXcodePath } from '@limrun/appium-xcode';
3
+ import { getPath as getXcodePath } from 'appium-xcode';
4
4
  import type {IDoctorCheck, AppiumLogger, DoctorCheckResult} from '@appium/types';
5
5
  import '@colors/colors';
6
6