@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,128 @@
1
+ /**
2
+ * DeviceCtl - Wrapper for xcrun devicectl (iOS 17+)
3
+ * Primary interface for modern iOS device control
4
+ */
5
+ import { type IOSDevice, type DeviceDetails, type ProcessInfo, type InstalledApp, type FileInfo, type DisplayInfo, type CommandResult, type ProcessSignal } from './types.js';
6
+ export interface DeviceCtlOptions {
7
+ timeout?: number;
8
+ }
9
+ export declare class DeviceCtl {
10
+ private options;
11
+ constructor(options?: DeviceCtlOptions);
12
+ private execOpts;
13
+ /**
14
+ * List all connected devices
15
+ */
16
+ listDevices(): Promise<IOSDevice[]>;
17
+ private parseDeviceFromJson;
18
+ private parseDevicesFromText;
19
+ private detectPlatform;
20
+ private detectConnectionType;
21
+ /**
22
+ * Get detailed device information
23
+ */
24
+ getDeviceInfo(deviceId: string): Promise<DeviceDetails | null>;
25
+ private parseDeviceDetailsFromText;
26
+ /**
27
+ * Get device lock state
28
+ */
29
+ getLockState(deviceId: string): Promise<'locked' | 'unlocked'>;
30
+ /**
31
+ * Get display information
32
+ */
33
+ getDisplays(deviceId: string): Promise<DisplayInfo[]>;
34
+ /**
35
+ * Pair with a device
36
+ */
37
+ pair(deviceId: string): Promise<CommandResult>;
38
+ /**
39
+ * Unpair from a device
40
+ */
41
+ unpair(deviceId: string): Promise<CommandResult>;
42
+ /**
43
+ * Reboot a device
44
+ */
45
+ reboot(deviceId: string): Promise<CommandResult>;
46
+ /**
47
+ * Set device orientation
48
+ */
49
+ setOrientation(deviceId: string, orientation: 'portrait' | 'landscape' | 'portrait-upside-down' | 'landscape-left' | 'landscape-right'): Promise<CommandResult>;
50
+ /**
51
+ * List running processes
52
+ */
53
+ listProcesses(deviceId: string): Promise<ProcessInfo[]>;
54
+ private parseProcessesFromText;
55
+ /**
56
+ * Launch an app
57
+ */
58
+ launchApp(deviceId: string, bundleId: string, options?: {
59
+ arguments?: string[];
60
+ environment?: Record<string, string>;
61
+ }): Promise<CommandResult>;
62
+ /**
63
+ * Terminate a process
64
+ */
65
+ terminateProcess(deviceId: string, processNameOrPid: string | number): Promise<CommandResult>;
66
+ /**
67
+ * Send signal to a process
68
+ */
69
+ signalProcess(deviceId: string, pid: number, signal: ProcessSignal): Promise<CommandResult>;
70
+ /**
71
+ * Suspend a process
72
+ */
73
+ suspendProcess(deviceId: string, pid: number): Promise<CommandResult>;
74
+ /**
75
+ * Resume a process
76
+ */
77
+ resumeProcess(deviceId: string, pid: number): Promise<CommandResult>;
78
+ /**
79
+ * Send memory warning to a process
80
+ */
81
+ sendMemoryWarning(deviceId: string, pid: number): Promise<CommandResult>;
82
+ /**
83
+ * Respring the device (restart SpringBoard)
84
+ */
85
+ respring(deviceId: string): Promise<CommandResult>;
86
+ /**
87
+ * List installed apps
88
+ */
89
+ listApps(deviceId: string): Promise<InstalledApp[]>;
90
+ private parseAppsFromText;
91
+ /**
92
+ * Install an app
93
+ */
94
+ installApp(deviceId: string, appPath: string): Promise<CommandResult>;
95
+ /**
96
+ * Uninstall an app
97
+ */
98
+ uninstallApp(deviceId: string, bundleId: string): Promise<CommandResult>;
99
+ /**
100
+ * Get app icon
101
+ */
102
+ getAppIcon(deviceId: string, bundleId: string, outputPath?: string): Promise<CommandResult>;
103
+ /**
104
+ * List files in a directory
105
+ */
106
+ listFiles(deviceId: string, path: string): Promise<FileInfo[]>;
107
+ private parseFilesFromText;
108
+ /**
109
+ * Copy file to device
110
+ */
111
+ copyToDevice(deviceId: string, source: string, destination: string): Promise<CommandResult>;
112
+ /**
113
+ * Copy file from device
114
+ */
115
+ copyFromDevice(deviceId: string, source: string, destination: string): Promise<CommandResult>;
116
+ /**
117
+ * Post a Darwin notification
118
+ */
119
+ postNotification(deviceId: string, name: string, userInfo?: Record<string, unknown>): Promise<CommandResult>;
120
+ /**
121
+ * Collect diagnostics
122
+ */
123
+ collectDiagnostics(options?: {
124
+ devices?: string;
125
+ archiveDestination?: string;
126
+ }): Promise<CommandResult>;
127
+ }
128
+ //# sourceMappingURL=device-ctl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-ctl.d.ts","sourceRoot":"","sources":["../src/device-ctl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EAEnB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,OAAO,CAAmB;gBAEtB,OAAO,GAAE,gBAAqB;IAI1C,OAAO,CAAC,QAAQ;IAQhB;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAWzC,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,oBAAoB;IA4B5B,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,oBAAoB;IAO5B;;OAEG;IACG,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IA4BpE,OAAO,CAAC,0BAA0B;IAwBlC;;OAEG;IACG,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,UAAU,CAAC;IAUpE;;OAEG;IACG,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IA0B3D;;OAEG;IACG,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIpD;;OAEG;IACG,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAQtD;;OAEG;IACG,MAAM,CAAC,QAAQ,E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apping xcrun devicectl, libimobiledevice, and simctl
4
+ */
5
+ export { IOSDevices, DeviceCtl, LibIMobileDevice, SimCtl, checkAvailableTools } from './unified-api.js';
6
+ export * from './types.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAExG,cAAc,YAAY,CAAC"}