@ebowwa/ios-devices 1.0.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.
@@ -0,0 +1,487 @@
1
+ /**
2
+ * @ebowwa/ios-devices - Type definitions
3
+ * iOS device control types for devicectl, libimobiledevice, and simctl
4
+ */
5
+ import { z } from 'zod';
6
+ export declare const IOSDeviceSchema: z.ZodObject<{
7
+ identifier: z.ZodString;
8
+ name: z.ZodString;
9
+ model: z.ZodString;
10
+ modelCode: z.ZodString;
11
+ productType: z.ZodString;
12
+ osVersion: z.ZodString;
13
+ osBuildVersion: z.ZodString;
14
+ architecture: z.ZodString;
15
+ platform: z.ZodEnum<["iOS", "iPadOS", "tvOS", "watchOS", "visionOS"]>;
16
+ connectionType: z.ZodEnum<["USB", "Network", "Wireless"]>;
17
+ isTrusted: z.ZodBoolean;
18
+ isAvailable: z.ZodBoolean;
19
+ }, "strip", z.ZodTypeAny, {
20
+ identifier: string;
21
+ name: string;
22
+ model: string;
23
+ modelCode: string;
24
+ productType: string;
25
+ osVersion: string;
26
+ osBuildVersion: string;
27
+ architecture: string;
28
+ platform: "iOS" | "iPadOS" | "tvOS" | "watchOS" | "visionOS";
29
+ connectionType: "USB" | "Network" | "Wireless";
30
+ isTrusted: boolean;
31
+ isAvailable: boolean;
32
+ }, {
33
+ identifier: string;
34
+ name: string;
35
+ model: string;
36
+ modelCode: string;
37
+ productType: string;
38
+ osVersion: string;
39
+ osBuildVersion: string;
40
+ architecture: string;
41
+ platform: "iOS" | "iPadOS" | "tvOS" | "watchOS" | "visionOS";
42
+ connectionType: "USB" | "Network" | "Wireless";
43
+ isTrusted: boolean;
44
+ isAvailable: boolean;
45
+ }>;
46
+ export type IOSDevice = z.infer<typeof IOSDeviceSchema>;
47
+ export declare const DeviceDetailsSchema: z.ZodObject<{
48
+ udid: z.ZodString;
49
+ name: z.ZodString;
50
+ model: z.ZodString;
51
+ productType: z.ZodString;
52
+ productVersion: z.ZodString;
53
+ buildVersion: z.ZodString;
54
+ serialNumber: z.ZodOptional<z.ZodString>;
55
+ cpuArchitecture: z.ZodString;
56
+ deviceName: z.ZodString;
57
+ timeZone: z.ZodOptional<z.ZodString>;
58
+ locale: z.ZodOptional<z.ZodString>;
59
+ totalDiskSpace: z.ZodOptional<z.ZodNumber>;
60
+ freeDiskSpace: z.ZodOptional<z.ZodNumber>;
61
+ batteryLevel: z.ZodOptional<z.ZodNumber>;
62
+ batteryState: z.ZodOptional<z.ZodEnum<["unplugged", "charging", "full"]>>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ name: string;
65
+ model: string;
66
+ productType: string;
67
+ udid: string;
68
+ productVersion: string;
69
+ buildVersion: string;
70
+ cpuArchitecture: string;
71
+ deviceName: string;
72
+ serialNumber?: string | undefined;
73
+ timeZone?: string | undefined;
74
+ locale?: string | undefined;
75
+ totalDiskSpace?: number | undefined;
76
+ freeDiskSpace?: number | undefined;
77
+ batteryLevel?: number | undefined;
78
+ batteryState?: "unplugged" | "charging" | "full" | undefined;
79
+ }, {
80
+ name: string;
81
+ model: string;
82
+ productType: string;
83
+ udid: string;
84
+ productVersion: string;
85
+ buildVersion: string;
86
+ cpuArchitecture: string;
87
+ deviceName: string;
88
+ serialNumber?: string | undefined;
89
+ timeZone?: string | undefined;
90
+ locale?: string | undefined;
91
+ totalDiskSpace?: number | undefined;
92
+ freeDiskSpace?: number | undefined;
93
+ batteryLevel?: number | undefined;
94
+ batteryState?: "unplugged" | "charging" | "full" | undefined;
95
+ }>;
96
+ export type DeviceDetails = z.infer<typeof DeviceDetailsSchema>;
97
+ export declare const ProcessInfoSchema: z.ZodObject<{
98
+ pid: z.ZodNumber;
99
+ name: z.ZodString;
100
+ user: z.ZodOptional<z.ZodString>;
101
+ cpuPercent: z.ZodOptional<z.ZodNumber>;
102
+ memoryMB: z.ZodOptional<z.ZodNumber>;
103
+ startTime: z.ZodOptional<z.ZodNumber>;
104
+ bundleIdentifier: z.ZodOptional<z.ZodString>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ name: string;
107
+ pid: number;
108
+ user?: string | undefined;
109
+ cpuPercent?: number | undefined;
110
+ memoryMB?: number | undefined;
111
+ startTime?: number | undefined;
112
+ bundleIdentifier?: string | undefined;
113
+ }, {
114
+ name: string;
115
+ pid: number;
116
+ user?: string | undefined;
117
+ cpuPercent?: number | undefined;
118
+ memoryMB?: number | undefined;
119
+ startTime?: number | undefined;
120
+ bundleIdentifier?: string | undefined;
121
+ }>;
122
+ export type ProcessInfo = z.infer<typeof ProcessInfoSchema>;
123
+ export declare const ProcessSignalSchema: z.ZodEnum<["SIGTERM", "SIGKILL", "SIGHUP", "SIGINT", "SIGSTOP", "SIGCONT", "SIGUSR1", "SIGUSR2"]>;
124
+ export type ProcessSignal = z.infer<typeof ProcessSignalSchema>;
125
+ export declare const InstalledAppSchema: z.ZodObject<{
126
+ bundleIdentifier: z.ZodString;
127
+ bundleName: z.ZodString;
128
+ bundleVersion: z.ZodString;
129
+ shortVersion: z.ZodOptional<z.ZodString>;
130
+ installPath: z.ZodString;
131
+ dataContainerPath: z.ZodOptional<z.ZodString>;
132
+ executableName: z.ZodOptional<z.ZodString>;
133
+ platform: z.ZodEnum<["iOS", "iPadOS", "tvOS", "watchOS", "visionOS", "macOS"]>;
134
+ type: z.ZodEnum<["User", "System", "Internal"]>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ platform: "iOS" | "iPadOS" | "tvOS" | "watchOS" | "visionOS" | "macOS";
137
+ type: "User" | "System" | "Internal";
138
+ bundleIdentifier: string;
139
+ bundleName: string;
140
+ bundleVersion: string;
141
+ installPath: string;
142
+ shortVersion?: string | undefined;
143
+ dataContainerPath?: string | undefined;
144
+ executableName?: string | undefined;
145
+ }, {
146
+ platform: "iOS" | "iPadOS" | "tvOS" | "watchOS" | "visionOS" | "macOS";
147
+ type: "User" | "System" | "Internal";
148
+ bundleIdentifier: string;
149
+ bundleName: string;
150
+ bundleVersion: string;
151
+ installPath: string;
152
+ shortVersion?: string | undefined;
153
+ dataContainerPath?: string | undefined;
154
+ executableName?: string | undefined;
155
+ }>;
156
+ export type InstalledApp = z.infer<typeof InstalledAppSchema>;
157
+ export declare const AppInstallResultSchema: z.ZodObject<{
158
+ success: z.ZodBoolean;
159
+ bundleIdentifier: z.ZodOptional<z.ZodString>;
160
+ error: z.ZodOptional<z.ZodString>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ success: boolean;
163
+ bundleIdentifier?: string | undefined;
164
+ error?: string | undefined;
165
+ }, {
166
+ success: boolean;
167
+ bundleIdentifier?: string | undefined;
168
+ error?: string | undefined;
169
+ }>;
170
+ export type AppInstallResult = z.infer<typeof AppInstallResultSchema>;
171
+ export declare const LogEntrySchema: z.ZodObject<{
172
+ timestamp: z.ZodString;
173
+ process: z.ZodString;
174
+ pid: z.ZodOptional<z.ZodNumber>;
175
+ level: z.ZodOptional<z.ZodEnum<["debug", "info", "notice", "warning", "error", "fault"]>>;
176
+ message: z.ZodString;
177
+ subsystem: z.ZodOptional<z.ZodString>;
178
+ category: z.ZodOptional<z.ZodString>;
179
+ }, "strip", z.ZodTypeAny, {
180
+ message: string;
181
+ timestamp: string;
182
+ process: string;
183
+ pid?: number | undefined;
184
+ level?: "error" | "debug" | "info" | "notice" | "warning" | "fault" | undefined;
185
+ subsystem?: string | undefined;
186
+ category?: string | undefined;
187
+ }, {
188
+ message: string;
189
+ timestamp: string;
190
+ process: string;
191
+ pid?: number | undefined;
192
+ level?: "error" | "debug" | "info" | "notice" | "warning" | "fault" | undefined;
193
+ subsystem?: string | undefined;
194
+ category?: string | undefined;
195
+ }>;
196
+ export type LogEntry = z.infer<typeof LogEntrySchema>;
197
+ export declare const LogFilterSchema: z.ZodObject<{
198
+ match: z.ZodOptional<z.ZodString>;
199
+ unmatch: z.ZodOptional<z.ZodString>;
200
+ process: z.ZodOptional<z.ZodString>;
201
+ exclude: z.ZodOptional<z.ZodString>;
202
+ kernel: z.ZodOptional<z.ZodBoolean>;
203
+ trigger: z.ZodOptional<z.ZodString>;
204
+ untrigger: z.ZodOptional<z.ZodString>;
205
+ }, "strip", z.ZodTypeAny, {
206
+ process?: string | undefined;
207
+ match?: string | undefined;
208
+ unmatch?: string | undefined;
209
+ exclude?: string | undefined;
210
+ kernel?: boolean | undefined;
211
+ trigger?: string | undefined;
212
+ untrigger?: string | undefined;
213
+ }, {
214
+ process?: string | undefined;
215
+ match?: string | undefined;
216
+ unmatch?: string | undefined;
217
+ exclude?: string | undefined;
218
+ kernel?: boolean | undefined;
219
+ trigger?: string | undefined;
220
+ untrigger?: string | undefined;
221
+ }>;
222
+ export type LogFilter = z.infer<typeof LogFilterSchema>;
223
+ export declare const FileInfoSchema: z.ZodObject<{
224
+ path: z.ZodString;
225
+ name: z.ZodString;
226
+ isDirectory: z.ZodBoolean;
227
+ size: z.ZodOptional<z.ZodNumber>;
228
+ modifiedTime: z.ZodOptional<z.ZodNumber>;
229
+ createdTime: z.ZodOptional<z.ZodNumber>;
230
+ permissions: z.ZodOptional<z.ZodString>;
231
+ }, "strip", z.ZodTypeAny, {
232
+ name: string;
233
+ path: string;
234
+ isDirectory: boolean;
235
+ size?: number | undefined;
236
+ modifiedTime?: number | undefined;
237
+ createdTime?: number | undefined;
238
+ permissions?: string | undefined;
239
+ }, {
240
+ name: string;
241
+ path: string;
242
+ isDirectory: boolean;
243
+ size?: number | undefined;
244
+ modifiedTime?: number | undefined;
245
+ createdTime?: number | undefined;
246
+ permissions?: string | undefined;
247
+ }>;
248
+ export type FileInfo = z.infer<typeof FileInfoSchema>;
249
+ export declare const FileCopyOptionsSchema: z.ZodObject<{
250
+ source: z.ZodString;
251
+ destination: z.ZodString;
252
+ overwrite: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
253
+ }, "strip", z.ZodTypeAny, {
254
+ source: string;
255
+ destination: string;
256
+ overwrite: boolean;
257
+ }, {
258
+ source: string;
259
+ destination: string;
260
+ overwrite?: boolean | undefined;
261
+ }>;
262
+ export type FileCopyOptions = z.infer<typeof FileCopyOptionsSchema>;
263
+ export declare const DiagnosticsTypeSchema: z.ZodEnum<["All", "WiFi", "GasGauge", "NAND", "Battery", "HDMI"]>;
264
+ export type DiagnosticsType = z.infer<typeof DiagnosticsTypeSchema>;
265
+ export interface IOKitEntry {
266
+ name: string;
267
+ path: string;
268
+ properties?: Record<string, unknown>;
269
+ children?: IOKitEntry[];
270
+ }
271
+ export declare const IOKitEntrySchema: z.ZodType<IOKitEntry>;
272
+ export declare const BackupInfoSchema: z.ZodObject<{
273
+ snapshotId: z.ZodString;
274
+ deviceName: z.ZodString;
275
+ deviceType: z.ZodString;
276
+ iOSVersion: z.ZodString;
277
+ buildVersion: z.ZodString;
278
+ date: z.ZodString;
279
+ size: z.ZodOptional<z.ZodNumber>;
280
+ isEncrypted: z.ZodOptional<z.ZodBoolean>;
281
+ }, "strip", z.ZodTypeAny, {
282
+ date: string;
283
+ buildVersion: string;
284
+ deviceName: string;
285
+ snapshotId: string;
286
+ deviceType: string;
287
+ iOSVersion: string;
288
+ size?: number | undefined;
289
+ isEncrypted?: boolean | undefined;
290
+ }, {
291
+ date: string;
292
+ buildVersion: string;
293
+ deviceName: string;
294
+ snapshotId: string;
295
+ deviceType: string;
296
+ iOSVersion: string;
297
+ size?: number | undefined;
298
+ isEncrypted?: boolean | undefined;
299
+ }>;
300
+ export type BackupInfo = z.infer<typeof BackupInfoSchema>;
301
+ export declare const SimulatorDeviceSchema: z.ZodObject<{
302
+ udid: z.ZodString;
303
+ name: z.ZodString;
304
+ state: z.ZodEnum<["Shutdown", "Booted", "Shutting Down"]>;
305
+ runtime: z.ZodString;
306
+ deviceType: z.ZodString;
307
+ availability: z.ZodEnum<["available", "unavailable"]>;
308
+ }, "strip", z.ZodTypeAny, {
309
+ name: string;
310
+ udid: string;
311
+ deviceType: string;
312
+ state: "Shutdown" | "Booted" | "Shutting Down";
313
+ runtime: string;
314
+ availability: "available" | "unavailable";
315
+ }, {
316
+ name: string;
317
+ udid: string;
318
+ deviceType: string;
319
+ state: "Shutdown" | "Booted" | "Shutting Down";
320
+ runtime: string;
321
+ availability: "available" | "unavailable";
322
+ }>;
323
+ export type SimulatorDevice = z.infer<typeof SimulatorDeviceSchema>;
324
+ export declare const SimulatorRuntimeSchema: z.ZodObject<{
325
+ identifier: z.ZodString;
326
+ name: z.ZodString;
327
+ version: z.ZodString;
328
+ buildVersion: z.ZodString;
329
+ isAvailable: z.ZodBoolean;
330
+ platform: z.ZodString;
331
+ }, "strip", z.ZodTypeAny, {
332
+ identifier: string;
333
+ name: string;
334
+ platform: string;
335
+ isAvailable: boolean;
336
+ buildVersion: string;
337
+ version: string;
338
+ }, {
339
+ identifier: string;
340
+ name: string;
341
+ platform: string;
342
+ isAvailable: boolean;
343
+ buildVersion: string;
344
+ version: string;
345
+ }>;
346
+ export type SimulatorRuntime = z.infer<typeof SimulatorRuntimeSchema>;
347
+ export declare const SimulatorDeviceTypeSchema: z.ZodObject<{
348
+ identifier: z.ZodString;
349
+ name: z.ZodString;
350
+ productFamily: z.ZodString;
351
+ minRuntimeVersion: z.ZodOptional<z.ZodString>;
352
+ maxRuntimeVersion: z.ZodOptional<z.ZodString>;
353
+ }, "strip", z.ZodTypeAny, {
354
+ identifier: string;
355
+ name: string;
356
+ productFamily: string;
357
+ minRuntimeVersion?: string | undefined;
358
+ maxRuntimeVersion?: string | undefined;
359
+ }, {
360
+ identifier: string;
361
+ name: string;
362
+ productFamily: string;
363
+ minRuntimeVersion?: string | undefined;
364
+ maxRuntimeVersion?: string | undefined;
365
+ }>;
366
+ export type SimulatorDeviceType = z.infer<typeof SimulatorDeviceTypeSchema>;
367
+ export declare const DisplayInfoSchema: z.ZodObject<{
368
+ id: z.ZodNumber;
369
+ width: z.ZodNumber;
370
+ height: z.ZodNumber;
371
+ scale: z.ZodNumber;
372
+ refreshRate: z.ZodOptional<z.ZodNumber>;
373
+ colorSpace: z.ZodOptional<z.ZodString>;
374
+ }, "strip", z.ZodTypeAny, {
375
+ id: number;
376
+ width: number;
377
+ height: number;
378
+ scale: number;
379
+ refreshRate?: number | undefined;
380
+ colorSpace?: string | undefined;
381
+ }, {
382
+ id: number;
383
+ width: number;
384
+ height: number;
385
+ scale: number;
386
+ refreshRate?: number | undefined;
387
+ colorSpace?: string | undefined;
388
+ }>;
389
+ export type DisplayInfo = z.infer<typeof DisplayInfoSchema>;
390
+ export declare const LocationSchema: z.ZodObject<{
391
+ latitude: z.ZodNumber;
392
+ longitude: z.ZodNumber;
393
+ altitude: z.ZodOptional<z.ZodNumber>;
394
+ horizontalAccuracy: z.ZodOptional<z.ZodNumber>;
395
+ }, "strip", z.ZodTypeAny, {
396
+ latitude: number;
397
+ longitude: number;
398
+ altitude?: number | undefined;
399
+ horizontalAccuracy?: number | undefined;
400
+ }, {
401
+ latitude: number;
402
+ longitude: number;
403
+ altitude?: number | undefined;
404
+ horizontalAccuracy?: number | undefined;
405
+ }>;
406
+ export type Location = z.infer<typeof LocationSchema>;
407
+ export declare const ProvisioningProfileSchema: z.ZodObject<{
408
+ uuid: z.ZodString;
409
+ name: z.ZodString;
410
+ teamName: z.ZodString;
411
+ teamIdentifier: z.ZodString;
412
+ platform: z.ZodString;
413
+ expirationDate: z.ZodString;
414
+ creationDate: z.ZodString;
415
+ appIds: z.ZodArray<z.ZodString, "many">;
416
+ }, "strip", z.ZodTypeAny, {
417
+ name: string;
418
+ platform: string;
419
+ uuid: string;
420
+ teamName: string;
421
+ teamIdentifier: string;
422
+ expirationDate: string;
423
+ creationDate: string;
424
+ appIds: string[];
425
+ }, {
426
+ name: string;
427
+ platform: string;
428
+ uuid: string;
429
+ teamName: string;
430
+ teamIdentifier: string;
431
+ expirationDate: string;
432
+ creationDate: string;
433
+ appIds: string[];
434
+ }>;
435
+ export type ProvisioningProfile = z.infer<typeof ProvisioningProfileSchema>;
436
+ export declare const CommandResultSchema: z.ZodObject<{
437
+ success: z.ZodBoolean;
438
+ stdout: z.ZodString;
439
+ stderr: z.ZodString;
440
+ exitCode: z.ZodNumber;
441
+ json: z.ZodOptional<z.ZodUnknown>;
442
+ }, "strip", z.ZodTypeAny, {
443
+ success: boolean;
444
+ stdout: string;
445
+ stderr: string;
446
+ exitCode: number;
447
+ json?: unknown;
448
+ }, {
449
+ success: boolean;
450
+ stdout: string;
451
+ stderr: string;
452
+ exitCode: number;
453
+ json?: unknown;
454
+ }>;
455
+ export type CommandResult = z.infer<typeof CommandResultSchema>;
456
+ export declare const DeviceIdentifierSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
457
+ udid: z.ZodString;
458
+ }, "strip", z.ZodTypeAny, {
459
+ udid: string;
460
+ }, {
461
+ udid: string;
462
+ }>, z.ZodObject<{
463
+ name: z.ZodString;
464
+ }, "strip", z.ZodTypeAny, {
465
+ name: string;
466
+ }, {
467
+ name: string;
468
+ }>, z.ZodObject<{
469
+ ecid: z.ZodString;
470
+ }, "strip", z.ZodTypeAny, {
471
+ ecid: string;
472
+ }, {
473
+ ecid: string;
474
+ }>]>;
475
+ export type DeviceIdentifier = z.infer<typeof DeviceIdentifierSchema>;
476
+ export declare const DarwinNotificationSchema: z.ZodObject<{
477
+ name: z.ZodString;
478
+ userInfo: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
479
+ }, "strip", z.ZodTypeAny, {
480
+ name: string;
481
+ userInfo?: Record<string, unknown> | undefined;
482
+ }, {
483
+ name: string;
484
+ userInfo?: Record<string, unknown> | undefined;
485
+ }>;
486
+ export type DarwinNotification = z.infer<typeof DarwinNotificationSchema>;
487
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,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,CAAC,CAAC;AAM5D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAKzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAMtD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;EASpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAM5E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;EAM9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;IAKjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAMtE,eAAO,MAAM,wBAAwB;;;;;;;;;EAGnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * Unified API - Single interface for iOS device control
3
+ * Automatically selects best available tool (devicectl > libimobiledevice)
4
+ */
5
+ import { SimCtl } from './sim-ctl.js';
6
+ import { type IOSDevice, type DeviceDetails, type ProcessInfo, type InstalledApp, type LogFilter, type CommandResult, type SimulatorDevice } from './types.js';
7
+ export interface IOSDevicesOptions {
8
+ timeout?: number;
9
+ preferDeviceCtl?: boolean;
10
+ }
11
+ export declare class IOSDevices {
12
+ private options;
13
+ private deviceCtl;
14
+ private libIMobile;
15
+ private simCtl;
16
+ private availableTools;
17
+ constructor(options?: IOSDevicesOptions);
18
+ /**
19
+ * Initialize and check available tools
20
+ */
21
+ initialize(): Promise<void>;
22
+ /**
23
+ * Get available tools status
24
+ */
25
+ getToolsStatus(): {
26
+ devicectl: boolean;
27
+ simctl: boolean;
28
+ libimobiledevice: boolean;
29
+ } | null;
30
+ /**
31
+ * List all connected devices
32
+ */
33
+ listDevices(): Promise<IOSDevice[]>;
34
+ /**
35
+ * Get device details
36
+ */
37
+ getDeviceDetails(deviceId: string): Promise<DeviceDetails | null>;
38
+ /**
39
+ * Reboot device
40
+ */
41
+ rebootDevice(deviceId: string): Promise<CommandResult>;
42
+ /**
43
+ * List processes on device
44
+ */
45
+ listProcesses(deviceId: string): Promise<ProcessInfo[]>;
46
+ /**
47
+ * Launch app
48
+ */
49
+ launchApp(deviceId: string, bundleId: string): Promise<CommandResult>;
50
+ /**
51
+ * Terminate app/process
52
+ */
53
+ terminateProcess(deviceId: string, pidOrName: number | string): Promise<CommandResult>;
54
+ /**
55
+ * List installed apps
56
+ */
57
+ listApps(deviceId: string): Promise<InstalledApp[]>;
58
+ /**
59
+ * Install app
60
+ */
61
+ installApp(deviceId: string, appPath: string): Promise<CommandResult>;
62
+ /**
63
+ * Uninstall app
64
+ */
65
+ uninstallApp(deviceId: string, bundleId: string): Promise<CommandResult>;
66
+ /**
67
+ * Stream syslog
68
+ */
69
+ streamSyslog(deviceId: string, filter?: LogFilter): Promise<CommandResult>;
70
+ /**
71
+ * Get syslog archive
72
+ */
73
+ getSyslogArchive(deviceId: string, outputPath: string): Promise<CommandResult>;
74
+ /**
75
+ * Take screenshot
76
+ */
77
+ takeScreenshot(deviceId: string, outputPath?: string): Promise<CommandResult>;
78
+ /**
79
+ * Set simulated location
80
+ */
81
+ setLocation(deviceId: string, latitude: number, longitude: number): Promise<CommandResult>;
82
+ /**
83
+ * Reset location
84
+ */
85
+ resetLocation(deviceId: string): Promise<CommandResult>;
86
+ /**
87
+ * Create backup
88
+ */
89
+ createBackup(deviceId: string, directory: string, encrypt?: boolean, password?: string): Promise<CommandResult>;
90
+ /**
91
+ * Restore backup
92
+ */
93
+ restoreBackup(deviceId: string, directory: string, password?: string): Promise<CommandResult>;
94
+ /**
95
+ * Get SimCtl instance for simulator control
96
+ */
97
+ getSimulator(): SimCtl;
98
+ /**
99
+ * List simulators
100
+ */
101
+ listSimulators(): Promise<SimulatorDevice[]>;
102
+ /**
103
+ * Boot simulator
104
+ */
105
+ bootSimulator(udid: string): Promise<CommandResult>;
106
+ /**
107
+ * Shutdown simulator
108
+ */
109
+ shutdownSimulator(udid: string): Promise<CommandResult>;
110
+ private parseDeviceList;
111
+ private parseDeviceListLegacy;
112
+ private parseDeviceDetails;
113
+ private parseDeviceDetailsLegacy;
114
+ private parseProcessList;
115
+ private parseAppList;
116
+ private parseSimulatorList;
117
+ }
118
+ export { DeviceCtl } from './device-ctl.js';
119
+ export { LibIMobileDevice } from './lib-imobiledevice.js';
120
+ export { SimCtl } from './sim-ctl.js';
121
+ export { checkAvailableTools } from './utils.js';
122
+ //# sourceMappingURL=unified-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unified-api.d.ts","sourceRoot":"","sources":["../src/unified-api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,YAAY,EAGjB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,eAAe,EAErB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,qBAAa,UAAU;IAUT,OAAO,CAAC,OAAO;IAT3B,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,UAAU,CAAiC;IACnD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,cAAc,CAIN;gBAEI,OAAO,GAAE,iBAAsB;IAInD;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAYjC;;OAEG;IACH,cAAc,IAAI;QAAE,S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
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Command execution utilities
3
+ */
4
+ import { type CommandResult } from './types.js';
5
+ export interface ExecOptions {
6
+ timeout?: number;
7
+ jsonOutput?: boolean;
8
+ cwd?: string;
9
+ env?: Record<string, string>;
10
+ }
11
+ /**
12
+ * Execute a command and return structured result
13
+ */
14
+ export declare function exec(command: string, args?: string[], options?: ExecOptions): Promise<CommandResult>;
15
+ /**
16
+ * Execute xcrun devicectl with JSON output
17
+ */
18
+ export declare function execDeviceCtl(subcommand: string[], options?: ExecOptions): Promise<CommandResult>;
19
+ /**
20
+ * Execute libimobiledevice tool
21
+ */
22
+ export declare function execILDevice(tool: string, args?: string[], options?: ExecOptions): Promise<CommandResult>;
23
+ /**
24
+ * Execute xcrun simctl
25
+ */
26
+ export declare function execSimCtl(subcommand: string[], options?: ExecOptions): Promise<CommandResult>;
27
+ /**
28
+ * Parse command string into args
29
+ */
30
+ export declare function parseCommand(command: string): string[];
31
+ /**
32
+ * Build device identifier argument
33
+ */
34
+ export declare function buildDeviceArg(identifier: string): string[];
35
+ /**
36
+ * Check if a command exists
37
+ */
38
+ export declare function commandExists(command: string): Promise<boolean>;
39
+ /**
40
+ * Check available tools
41
+ */
42
+ export declare function checkAvailableTools(): Promise<{
43
+ devicectl: boolean;
44
+ simctl: boolean;
45
+ libimobiledevice: boolean;
46
+ }>;
47
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAErE,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B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