devlens-mcp 0.3.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.
- package/.claude/settings.json +12 -0
- package/.claude/settings.local.json +17 -0
- package/INSTALLATION_GUIDE.md +354 -0
- package/QUICK_START.md +153 -0
- package/README.md +354 -0
- package/bin/cli.ts +22 -0
- package/bin/register.ts +96 -0
- package/dist/bin/cli.d.ts +3 -0
- package/dist/bin/cli.d.ts.map +1 -0
- package/dist/bin/cli.js +20 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/bin/register.d.ts +10 -0
- package/dist/bin/register.d.ts.map +1 -0
- package/dist/bin/register.js +92 -0
- package/dist/bin/register.js.map +1 -0
- package/dist/src/config/devlens-config.d.ts +92 -0
- package/dist/src/config/devlens-config.d.ts.map +1 -0
- package/dist/src/config/devlens-config.js +70 -0
- package/dist/src/config/devlens-config.js.map +1 -0
- package/dist/src/index.d.ts +35 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +8 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/metro/cdp-client.d.ts +48 -0
- package/dist/src/metro/cdp-client.d.ts.map +1 -0
- package/dist/src/metro/cdp-client.js +127 -0
- package/dist/src/metro/cdp-client.js.map +1 -0
- package/dist/src/metro/log-collector.d.ts +30 -0
- package/dist/src/metro/log-collector.d.ts.map +1 -0
- package/dist/src/metro/log-collector.js +114 -0
- package/dist/src/metro/log-collector.js.map +1 -0
- package/dist/src/metro/metro-bridge.d.ts +56 -0
- package/dist/src/metro/metro-bridge.d.ts.map +1 -0
- package/dist/src/metro/metro-bridge.js +255 -0
- package/dist/src/metro/metro-bridge.js.map +1 -0
- package/dist/src/metro/network-inspector.d.ts +34 -0
- package/dist/src/metro/network-inspector.d.ts.map +1 -0
- package/dist/src/metro/network-inspector.js +100 -0
- package/dist/src/metro/network-inspector.js.map +1 -0
- package/dist/src/platform/android/adb.d.ts +50 -0
- package/dist/src/platform/android/adb.d.ts.map +1 -0
- package/dist/src/platform/android/adb.js +137 -0
- package/dist/src/platform/android/adb.js.map +1 -0
- package/dist/src/platform/android/android-device.d.ts +21 -0
- package/dist/src/platform/android/android-device.d.ts.map +1 -0
- package/dist/src/platform/android/android-device.js +94 -0
- package/dist/src/platform/android/android-device.js.map +1 -0
- package/dist/src/platform/android/ui-automator.d.ts +17 -0
- package/dist/src/platform/android/ui-automator.d.ts.map +1 -0
- package/dist/src/platform/android/ui-automator.js +126 -0
- package/dist/src/platform/android/ui-automator.js.map +1 -0
- package/dist/src/platform/device-manager.d.ts +28 -0
- package/dist/src/platform/device-manager.d.ts.map +1 -0
- package/dist/src/platform/device-manager.js +185 -0
- package/dist/src/platform/device-manager.js.map +1 -0
- package/dist/src/platform/device.d.ts +86 -0
- package/dist/src/platform/device.d.ts.map +1 -0
- package/dist/src/platform/device.js +7 -0
- package/dist/src/platform/device.js.map +1 -0
- package/dist/src/platform/ios/accessibility.d.ts +17 -0
- package/dist/src/platform/ios/accessibility.d.ts.map +1 -0
- package/dist/src/platform/ios/accessibility.js +159 -0
- package/dist/src/platform/ios/accessibility.js.map +1 -0
- package/dist/src/platform/ios/ios-device.d.ts +22 -0
- package/dist/src/platform/ios/ios-device.d.ts.map +1 -0
- package/dist/src/platform/ios/ios-device.js +97 -0
- package/dist/src/platform/ios/ios-device.js.map +1 -0
- package/dist/src/platform/ios/simctl.d.ts +54 -0
- package/dist/src/platform/ios/simctl.d.ts.map +1 -0
- package/dist/src/platform/ios/simctl.js +192 -0
- package/dist/src/platform/ios/simctl.js.map +1 -0
- package/dist/src/server.d.ts +3 -0
- package/dist/src/server.d.ts.map +1 -0
- package/dist/src/server.js +176 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/snapshot/formatter.d.ts +18 -0
- package/dist/src/snapshot/formatter.d.ts.map +1 -0
- package/dist/src/snapshot/formatter.js +86 -0
- package/dist/src/snapshot/formatter.js.map +1 -0
- package/dist/src/snapshot/ref-registry.d.ts +67 -0
- package/dist/src/snapshot/ref-registry.d.ts.map +1 -0
- package/dist/src/snapshot/ref-registry.js +169 -0
- package/dist/src/snapshot/ref-registry.js.map +1 -0
- package/dist/src/snapshot/snapshot-differ.d.ts +57 -0
- package/dist/src/snapshot/snapshot-differ.d.ts.map +1 -0
- package/dist/src/snapshot/snapshot-differ.js +153 -0
- package/dist/src/snapshot/snapshot-differ.js.map +1 -0
- package/dist/src/tools/app-tools.d.ts +71 -0
- package/dist/src/tools/app-tools.d.ts.map +1 -0
- package/dist/src/tools/app-tools.js +97 -0
- package/dist/src/tools/app-tools.js.map +1 -0
- package/dist/src/tools/device-tools.d.ts +53 -0
- package/dist/src/tools/device-tools.d.ts.map +1 -0
- package/dist/src/tools/device-tools.js +86 -0
- package/dist/src/tools/device-tools.js.map +1 -0
- package/dist/src/tools/ds-tools.d.ts +65 -0
- package/dist/src/tools/ds-tools.d.ts.map +1 -0
- package/dist/src/tools/ds-tools.js +314 -0
- package/dist/src/tools/ds-tools.js.map +1 -0
- package/dist/src/tools/interaction-tools.d.ts +248 -0
- package/dist/src/tools/interaction-tools.d.ts.map +1 -0
- package/dist/src/tools/interaction-tools.js +391 -0
- package/dist/src/tools/interaction-tools.js.map +1 -0
- package/dist/src/tools/metro-tools.d.ts +115 -0
- package/dist/src/tools/metro-tools.d.ts.map +1 -0
- package/dist/src/tools/metro-tools.js +270 -0
- package/dist/src/tools/metro-tools.js.map +1 -0
- package/dist/src/tools/navigation-tools.d.ts +36 -0
- package/dist/src/tools/navigation-tools.d.ts.map +1 -0
- package/dist/src/tools/navigation-tools.js +60 -0
- package/dist/src/tools/navigation-tools.js.map +1 -0
- package/dist/src/tools/screenshot-tools.d.ts +298 -0
- package/dist/src/tools/screenshot-tools.d.ts.map +1 -0
- package/dist/src/tools/screenshot-tools.js +565 -0
- package/dist/src/tools/screenshot-tools.js.map +1 -0
- package/dist/src/tools/snapshot-tools.d.ts +161 -0
- package/dist/src/tools/snapshot-tools.d.ts.map +1 -0
- package/dist/src/tools/snapshot-tools.js +479 -0
- package/dist/src/tools/snapshot-tools.js.map +1 -0
- package/dist/src/utils/image-preprocess.d.ts +49 -0
- package/dist/src/utils/image-preprocess.d.ts.map +1 -0
- package/dist/src/utils/image-preprocess.js +322 -0
- package/dist/src/utils/image-preprocess.js.map +1 -0
- package/dist/src/utils/retry.d.ts +21 -0
- package/dist/src/utils/retry.d.ts.map +1 -0
- package/dist/src/utils/retry.js +33 -0
- package/dist/src/utils/retry.js.map +1 -0
- package/dist/src/visual/comparator.d.ts +51 -0
- package/dist/src/visual/comparator.d.ts.map +1 -0
- package/dist/src/visual/comparator.js +119 -0
- package/dist/src/visual/comparator.js.map +1 -0
- package/dist/src/visual/layout-analyzer.d.ts +64 -0
- package/dist/src/visual/layout-analyzer.d.ts.map +1 -0
- package/dist/src/visual/layout-analyzer.js +198 -0
- package/dist/src/visual/layout-analyzer.js.map +1 -0
- package/dist/src/visual/screenshot.d.ts +17 -0
- package/dist/src/visual/screenshot.d.ts.map +1 -0
- package/dist/src/visual/screenshot.js +39 -0
- package/dist/src/visual/screenshot.js.map +1 -0
- package/docs/figma-workflow.md +289 -0
- package/docs/setup-guide.md +360 -0
- package/docs/tool-reference.md +622 -0
- package/package.json +57 -0
- package/src/config/devlens-config.ts +76 -0
- package/src/index.ts +5 -0
- package/src/metro/cdp-client.ts +160 -0
- package/src/metro/log-collector.ts +137 -0
- package/src/metro/metro-bridge.ts +307 -0
- package/src/metro/network-inspector.ts +134 -0
- package/src/platform/android/adb.ts +200 -0
- package/src/platform/android/android-device.ts +116 -0
- package/src/platform/android/ui-automator.ts +141 -0
- package/src/platform/device-manager.ts +229 -0
- package/src/platform/device.ts +110 -0
- package/src/platform/ios/accessibility.ts +189 -0
- package/src/platform/ios/ios-device.ts +116 -0
- package/src/platform/ios/simctl.ts +244 -0
- package/src/server.ts +228 -0
- package/src/snapshot/formatter.ts +102 -0
- package/src/snapshot/ref-registry.ts +230 -0
- package/src/snapshot/snapshot-differ.ts +220 -0
- package/src/tools/app-tools.ts +111 -0
- package/src/tools/device-tools.ts +96 -0
- package/src/tools/ds-tools.ts +395 -0
- package/src/tools/interaction-tools.ts +467 -0
- package/src/tools/metro-tools.ts +320 -0
- package/src/tools/navigation-tools.ts +71 -0
- package/src/tools/screenshot-tools.ts +698 -0
- package/src/tools/snapshot-tools.ts +585 -0
- package/src/utils/image-preprocess.ts +430 -0
- package/src/utils/retry.ts +51 -0
- package/src/visual/comparator.ts +191 -0
- package/src/visual/layout-analyzer.ts +283 -0
- package/src/visual/screenshot.ts +49 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseIosAccessibilityOutput = parseIosAccessibilityOutput;
|
|
4
|
+
/**
|
|
5
|
+
* Parses iOS accessibility output from `simctl ui` into SnapshotNode tree.
|
|
6
|
+
*
|
|
7
|
+
* The simctl accessibility output varies by iOS/Xcode version. This parser
|
|
8
|
+
* handles the common formats:
|
|
9
|
+
*
|
|
10
|
+
* Format 1 (structured):
|
|
11
|
+
* Element: UIButton, Label: "Submit", Traits: Button, Frame: {{20, 100}, {340, 44}}
|
|
12
|
+
*
|
|
13
|
+
* Format 2 (XML-like from accessibility inspector):
|
|
14
|
+
* <AXElement type="UIButton" label="Submit" frame="20 100 340 44" ...>
|
|
15
|
+
*
|
|
16
|
+
* When neither format is available, we fall back to a basic tree.
|
|
17
|
+
*/
|
|
18
|
+
function parseIosAccessibilityOutput(output) {
|
|
19
|
+
// Try XML-like format first
|
|
20
|
+
if (output.includes("<AX") || output.includes("AXElement")) {
|
|
21
|
+
return parseAxFormat(output);
|
|
22
|
+
}
|
|
23
|
+
// Try structured text format
|
|
24
|
+
if (output.includes("Element:") || output.includes("Label:")) {
|
|
25
|
+
return parseStructuredFormat(output);
|
|
26
|
+
}
|
|
27
|
+
// Try simctl describe format (indented tree)
|
|
28
|
+
return parseDescribeFormat(output);
|
|
29
|
+
}
|
|
30
|
+
function parseAxFormat(output) {
|
|
31
|
+
const root = createContainerNode("Screen");
|
|
32
|
+
const lines = output.split("\n");
|
|
33
|
+
for (const line of lines) {
|
|
34
|
+
const trimmed = line.trim();
|
|
35
|
+
if (!trimmed)
|
|
36
|
+
continue;
|
|
37
|
+
const typeMatch = trimmed.match(/type[=:]\s*"?(\w+)"?/i);
|
|
38
|
+
const labelMatch = trimmed.match(/label[=:]\s*"([^"]*)"/i);
|
|
39
|
+
const frameMatch = trimmed.match(/frame[=:]\s*"?(\d+)\s+(\d+)\s+(\d+)\s+(\d+)"?/i);
|
|
40
|
+
const traitsMatch = trimmed.match(/traits?[=:]\s*"?([^">\n]+)"?/i);
|
|
41
|
+
if (typeMatch) {
|
|
42
|
+
const node = {
|
|
43
|
+
type: simplifyIosType(typeMatch[1]),
|
|
44
|
+
text: labelMatch ? labelMatch[1] : undefined,
|
|
45
|
+
label: labelMatch ? labelMatch[1] : undefined,
|
|
46
|
+
description: undefined,
|
|
47
|
+
bounds: frameMatch
|
|
48
|
+
? {
|
|
49
|
+
x: parseInt(frameMatch[1]),
|
|
50
|
+
y: parseInt(frameMatch[2]),
|
|
51
|
+
width: parseInt(frameMatch[3]),
|
|
52
|
+
height: parseInt(frameMatch[4]),
|
|
53
|
+
}
|
|
54
|
+
: { x: 0, y: 0, width: 0, height: 0 },
|
|
55
|
+
interactive: isInteractiveTrait(traitsMatch?.[1] || ""),
|
|
56
|
+
children: [],
|
|
57
|
+
};
|
|
58
|
+
root.children.push(node);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return root;
|
|
62
|
+
}
|
|
63
|
+
function parseStructuredFormat(output) {
|
|
64
|
+
const root = createContainerNode("Screen");
|
|
65
|
+
const blocks = output.split(/\n(?=Element:)/);
|
|
66
|
+
for (const block of blocks) {
|
|
67
|
+
const typeMatch = block.match(/Element:\s*(\w+)/);
|
|
68
|
+
const labelMatch = block.match(/Label:\s*"([^"]*)"/);
|
|
69
|
+
const frameMatch = block.match(/Frame:\s*\{\{(\d+),\s*(\d+)\},\s*\{(\d+),\s*(\d+)\}\}/);
|
|
70
|
+
const traitsMatch = block.match(/Traits?:\s*(.+)/);
|
|
71
|
+
if (typeMatch) {
|
|
72
|
+
const node = {
|
|
73
|
+
type: simplifyIosType(typeMatch[1]),
|
|
74
|
+
text: labelMatch ? labelMatch[1] : undefined,
|
|
75
|
+
label: labelMatch ? labelMatch[1] : undefined,
|
|
76
|
+
description: undefined,
|
|
77
|
+
bounds: frameMatch
|
|
78
|
+
? {
|
|
79
|
+
x: parseInt(frameMatch[1]),
|
|
80
|
+
y: parseInt(frameMatch[2]),
|
|
81
|
+
width: parseInt(frameMatch[3]),
|
|
82
|
+
height: parseInt(frameMatch[4]),
|
|
83
|
+
}
|
|
84
|
+
: { x: 0, y: 0, width: 0, height: 0 },
|
|
85
|
+
interactive: isInteractiveTrait(traitsMatch?.[1] || ""),
|
|
86
|
+
children: [],
|
|
87
|
+
};
|
|
88
|
+
root.children.push(node);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return root;
|
|
92
|
+
}
|
|
93
|
+
function parseDescribeFormat(output) {
|
|
94
|
+
const root = createContainerNode("Screen");
|
|
95
|
+
const lines = output.split("\n");
|
|
96
|
+
const stack = [
|
|
97
|
+
{ node: root, indent: -1 },
|
|
98
|
+
];
|
|
99
|
+
for (const line of lines) {
|
|
100
|
+
if (!line.trim())
|
|
101
|
+
continue;
|
|
102
|
+
const indent = line.search(/\S/);
|
|
103
|
+
const trimmed = line.trim();
|
|
104
|
+
// Parse "Type: Label" or just "Type"
|
|
105
|
+
const parts = trimmed.split(/:\s*/);
|
|
106
|
+
const type = parts[0] || "View";
|
|
107
|
+
const label = parts.length > 1 ? parts.slice(1).join(": ") : undefined;
|
|
108
|
+
const node = {
|
|
109
|
+
type: simplifyIosType(type),
|
|
110
|
+
text: label,
|
|
111
|
+
label,
|
|
112
|
+
description: undefined,
|
|
113
|
+
bounds: { x: 0, y: 0, width: 0, height: 0 },
|
|
114
|
+
interactive: isInteractiveType(type),
|
|
115
|
+
children: [],
|
|
116
|
+
};
|
|
117
|
+
// Find parent based on indentation
|
|
118
|
+
while (stack.length > 1 && stack[stack.length - 1].indent >= indent) {
|
|
119
|
+
stack.pop();
|
|
120
|
+
}
|
|
121
|
+
stack[stack.length - 1].node.children.push(node);
|
|
122
|
+
stack.push({ node, indent });
|
|
123
|
+
}
|
|
124
|
+
return root;
|
|
125
|
+
}
|
|
126
|
+
function createContainerNode(name) {
|
|
127
|
+
return {
|
|
128
|
+
type: name,
|
|
129
|
+
bounds: { x: 0, y: 0, width: 0, height: 0 },
|
|
130
|
+
interactive: false,
|
|
131
|
+
children: [],
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function simplifyIosType(type) {
|
|
135
|
+
return type
|
|
136
|
+
.replace(/^UI/, "")
|
|
137
|
+
.replace(/^AX/, "")
|
|
138
|
+
.replace(/^_/, "");
|
|
139
|
+
}
|
|
140
|
+
function isInteractiveTrait(traits) {
|
|
141
|
+
const lower = traits.toLowerCase();
|
|
142
|
+
return (lower.includes("button") ||
|
|
143
|
+
lower.includes("link") ||
|
|
144
|
+
lower.includes("textfield") ||
|
|
145
|
+
lower.includes("searchfield") ||
|
|
146
|
+
lower.includes("adjustable") ||
|
|
147
|
+
lower.includes("toggle"));
|
|
148
|
+
}
|
|
149
|
+
function isInteractiveType(type) {
|
|
150
|
+
const lower = type.toLowerCase();
|
|
151
|
+
return (lower.includes("button") ||
|
|
152
|
+
lower.includes("textfield") ||
|
|
153
|
+
lower.includes("textview") ||
|
|
154
|
+
lower.includes("switch") ||
|
|
155
|
+
lower.includes("slider") ||
|
|
156
|
+
lower.includes("picker") ||
|
|
157
|
+
lower.includes("link"));
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=accessibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessibility.js","sourceRoot":"","sources":["../../../../src/platform/ios/accessibility.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AAC,UAAU,CAAC;QAC1B,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACxB,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACxB,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACxB,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CACvB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Device, DeviceInfo, AppInfo, SnapshotNode } from "../device.js";
|
|
2
|
+
export declare class IosDevice implements Device {
|
|
3
|
+
private deviceId;
|
|
4
|
+
private simctl;
|
|
5
|
+
constructor(deviceId: string);
|
|
6
|
+
getInfo(): Promise<DeviceInfo>;
|
|
7
|
+
getSnapshot(): Promise<SnapshotNode>;
|
|
8
|
+
takeScreenshot(): Promise<Buffer>;
|
|
9
|
+
tap(x: number, y: number): Promise<void>;
|
|
10
|
+
doubleTap(x: number, y: number): Promise<void>;
|
|
11
|
+
longPress(x: number, y: number, _durationMs?: number): Promise<void>;
|
|
12
|
+
typeText(text: string): Promise<void>;
|
|
13
|
+
swipe(startX: number, startY: number, endX: number, endY: number, _durationMs?: number): Promise<void>;
|
|
14
|
+
pressButton(button: "home" | "back" | "enter"): Promise<void>;
|
|
15
|
+
setOrientation(orientation: "portrait" | "landscape"): Promise<void>;
|
|
16
|
+
launchApp(appId: string): Promise<void>;
|
|
17
|
+
terminateApp(appId: string): Promise<void>;
|
|
18
|
+
installApp(path: string): Promise<void>;
|
|
19
|
+
listApps(): Promise<AppInfo[]>;
|
|
20
|
+
openUrl(url: string): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=ios-device.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-device.d.ts","sourceRoot":"","sources":["../../../../src/platform/ios/ios-device.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,c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M,GAAG,OAAO,CAAC,IAAI,CAAC;CAG1C"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IosDevice = void 0;
|
|
4
|
+
const simctl_js_1 = require("./simctl.js");
|
|
5
|
+
const accessibility_js_1 = require("./accessibility.js");
|
|
6
|
+
class IosDevice {
|
|
7
|
+
deviceId;
|
|
8
|
+
simctl;
|
|
9
|
+
constructor(deviceId) {
|
|
10
|
+
this.deviceId = deviceId;
|
|
11
|
+
this.simctl = new simctl_js_1.Simctl(deviceId);
|
|
12
|
+
}
|
|
13
|
+
async getInfo() {
|
|
14
|
+
const [deviceInfo, screenSize] = await Promise.all([
|
|
15
|
+
this.simctl.getDeviceInfo(),
|
|
16
|
+
this.simctl.getScreenSize(),
|
|
17
|
+
]);
|
|
18
|
+
return {
|
|
19
|
+
id: this.deviceId,
|
|
20
|
+
name: deviceInfo.name,
|
|
21
|
+
platform: "ios",
|
|
22
|
+
osVersion: deviceInfo.runtime,
|
|
23
|
+
screenWidth: screenSize.width,
|
|
24
|
+
screenHeight: screenSize.height,
|
|
25
|
+
orientation: "portrait", // Default; would need to query actual orientation
|
|
26
|
+
isBooted: deviceInfo.state === "Booted",
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
async getSnapshot() {
|
|
30
|
+
const output = await this.simctl.getAccessibilityTree();
|
|
31
|
+
return (0, accessibility_js_1.parseIosAccessibilityOutput)(output);
|
|
32
|
+
}
|
|
33
|
+
async takeScreenshot() {
|
|
34
|
+
return this.simctl.screenshot();
|
|
35
|
+
}
|
|
36
|
+
async tap(x, y) {
|
|
37
|
+
await this.simctl.tap(x, y);
|
|
38
|
+
}
|
|
39
|
+
async doubleTap(x, y) {
|
|
40
|
+
await this.simctl.tap(x, y);
|
|
41
|
+
await sleep(100);
|
|
42
|
+
await this.simctl.tap(x, y);
|
|
43
|
+
}
|
|
44
|
+
async longPress(x, y, _durationMs = 1000) {
|
|
45
|
+
// simctl doesn't have a native long-press; we hold via swipe-in-place
|
|
46
|
+
await this.simctl.swipe(x, y, x, y);
|
|
47
|
+
}
|
|
48
|
+
async typeText(text) {
|
|
49
|
+
await this.simctl.typeText(text);
|
|
50
|
+
}
|
|
51
|
+
async swipe(startX, startY, endX, endY, _durationMs = 300) {
|
|
52
|
+
await this.simctl.swipe(startX, startY, endX, endY);
|
|
53
|
+
}
|
|
54
|
+
async pressButton(button) {
|
|
55
|
+
switch (button) {
|
|
56
|
+
case "home":
|
|
57
|
+
await this.simctl.pressKey("home");
|
|
58
|
+
break;
|
|
59
|
+
case "back":
|
|
60
|
+
// iOS doesn't have a hardware back button; swipe from left edge
|
|
61
|
+
const screenSize = await this.simctl.getScreenSize();
|
|
62
|
+
await this.simctl.swipe(0, screenSize.height / 2, screenSize.width / 2, screenSize.height / 2);
|
|
63
|
+
break;
|
|
64
|
+
case "enter":
|
|
65
|
+
await this.simctl.pressKey("return");
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async setOrientation(orientation) {
|
|
70
|
+
await this.simctl.setOrientation(orientation);
|
|
71
|
+
}
|
|
72
|
+
async launchApp(appId) {
|
|
73
|
+
await this.simctl.launchApp(appId);
|
|
74
|
+
}
|
|
75
|
+
async terminateApp(appId) {
|
|
76
|
+
await this.simctl.terminateApp(appId);
|
|
77
|
+
}
|
|
78
|
+
async installApp(path) {
|
|
79
|
+
await this.simctl.installApp(path);
|
|
80
|
+
}
|
|
81
|
+
async listApps() {
|
|
82
|
+
const apps = await this.simctl.listApps();
|
|
83
|
+
return apps.map((app) => ({
|
|
84
|
+
appId: app.bundleId,
|
|
85
|
+
name: app.name,
|
|
86
|
+
isRunning: false,
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
async openUrl(url) {
|
|
90
|
+
await this.simctl.openUrl(url);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.IosDevice = IosDevice;
|
|
94
|
+
function sleep(ms) {
|
|
95
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=ios-device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-device.js","sourceRoot":"","sources":["../../../../src/platform/ios/ios-device.ts"],"names":[],"mappings":";;;AACA,2CAAqC;AACrC,yDAAiE;AAEjE,MAAa,SAAS;IAGA;IAFZ,MAAM,CAAS;IAEvB,YAAoB,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,kBAAM,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACjD,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;YAC3B,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;SAC5B,CAAC,CAAC;QAEH,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,QAAQ;YACjB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,QAAQ,EAAE,KAAK;YACf,SAAS,EAAE,UAAU,CAAC,OAAO;YAC7B,WAAW,EAAE,UAAU,CAAC,KAAK;YAC7B,YAAY,EAAE,UAAU,CAAC,MAAM;YAC/B,WAAW,EAAE,UAAU,EAAE,kDAAkD;YAC3E,QAAQ,EAAE,UAAU,CAAC,KAAK,KAAK,QAAQ;SACxC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE,CAAC;QACxD,OAAO,IAAA,8CAA2B,EAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;IAED,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E,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapper around `xcrun simctl` for iOS Simulator interaction.
|
|
3
|
+
*/
|
|
4
|
+
export declare class Simctl {
|
|
5
|
+
private deviceId;
|
|
6
|
+
constructor(deviceId: string);
|
|
7
|
+
/** Execute a simctl command */
|
|
8
|
+
exec(...args: string[]): Promise<string>;
|
|
9
|
+
/** Take a screenshot and return PNG buffer */
|
|
10
|
+
screenshot(): Promise<Buffer>;
|
|
11
|
+
/** Get the accessibility tree using simctl's accessibility audit */
|
|
12
|
+
getAccessibilityTree(): Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Fallback: Get view hierarchy by running a small XCTest snippet.
|
|
15
|
+
* This uses `simctl launch` with a debugger approach, but the simplest
|
|
16
|
+
* method is to use the accessibility description from the simulator.
|
|
17
|
+
*/
|
|
18
|
+
private getViewHierarchyViaXctest;
|
|
19
|
+
/** Get device info from simctl */
|
|
20
|
+
getDeviceInfo(): Promise<{
|
|
21
|
+
name: string;
|
|
22
|
+
runtime: string;
|
|
23
|
+
state: string;
|
|
24
|
+
}>;
|
|
25
|
+
/** Get screen size of the simulator */
|
|
26
|
+
getScreenSize(): Promise<{
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
}>;
|
|
30
|
+
/** Tap at coordinates using simctl */
|
|
31
|
+
tap(x: number, y: number): Promise<void>;
|
|
32
|
+
/** Swipe on the simulator */
|
|
33
|
+
swipe(startX: number, startY: number, endX: number, endY: number): Promise<void>;
|
|
34
|
+
/** Type text using simctl keyboard input */
|
|
35
|
+
typeText(text: string): Promise<void>;
|
|
36
|
+
/** Press a key using simctl */
|
|
37
|
+
pressKey(key: string): Promise<void>;
|
|
38
|
+
/** Launch an app */
|
|
39
|
+
launchApp(bundleId: string): Promise<void>;
|
|
40
|
+
/** Terminate an app */
|
|
41
|
+
terminateApp(bundleId: string): Promise<void>;
|
|
42
|
+
/** Install an app (.app bundle or .ipa) */
|
|
43
|
+
installApp(path: string): Promise<void>;
|
|
44
|
+
/** List installed apps */
|
|
45
|
+
listApps(): Promise<Array<{
|
|
46
|
+
bundleId: string;
|
|
47
|
+
name: string;
|
|
48
|
+
}>>;
|
|
49
|
+
/** Open a URL */
|
|
50
|
+
openUrl(url: string): Promise<void>;
|
|
51
|
+
/** Set device orientation */
|
|
52
|
+
setOrientation(orientation: "portrait" | "landscape"): Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=simctl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simctl.d.ts","sourceRoot":"","sources":["../../../../src/platform/ios/simctl.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,MAAM;IAEpC,+BAA+B;IACzB,IAAI,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAS9C,8CAA8C;IACxC,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAUnC,oEAAoE;IAC9D,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC;IAe7C;;;;OAIG;YACW,yBAAyB;IAcvC,kCAAkC;IAC5B,aAAa,IAAI,OAAO,CAAC;QAC7B,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IA2BF,uCAAuC;IACjC,aAAa,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAqBjE,sCAAsC;IAChC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwB9C,6BAA6B;IACvB,KAAK,CACT,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC;IAgBhB,4CAA4C;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,+BAA+B;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1C,oBAAoB;IACd,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD,uBAAuB;IACjB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD,2CAA2C;IACrC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C,0BAA0B;IACpB,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IA6BpE,iBAAiB;IACX,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzC,6BAA6B;IACvB,cAAc,CAAC,WAAW,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAc3E"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Simctl = void 0;
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
const util_1 = require("util");
|
|
6
|
+
const execFileAsync = (0, util_1.promisify)(child_process_1.execFile);
|
|
7
|
+
/**
|
|
8
|
+
* Wrapper around `xcrun simctl` for iOS Simulator interaction.
|
|
9
|
+
*/
|
|
10
|
+
class Simctl {
|
|
11
|
+
deviceId;
|
|
12
|
+
constructor(deviceId) {
|
|
13
|
+
this.deviceId = deviceId;
|
|
14
|
+
}
|
|
15
|
+
/** Execute a simctl command */
|
|
16
|
+
async exec(...args) {
|
|
17
|
+
const { stdout } = await execFileAsync("xcrun", ["simctl", ...args], { maxBuffer: 10 * 1024 * 1024, timeout: 30000 });
|
|
18
|
+
return stdout;
|
|
19
|
+
}
|
|
20
|
+
/** Take a screenshot and return PNG buffer */
|
|
21
|
+
async screenshot() {
|
|
22
|
+
const tmpPath = `/tmp/devlens-screenshot-${Date.now()}.png`;
|
|
23
|
+
await this.exec("io", this.deviceId, "screenshot", tmpPath);
|
|
24
|
+
const { readFile, unlink } = await import("fs/promises");
|
|
25
|
+
const buffer = await readFile(tmpPath);
|
|
26
|
+
unlink(tmpPath).catch(() => { });
|
|
27
|
+
return buffer;
|
|
28
|
+
}
|
|
29
|
+
/** Get the accessibility tree using simctl's accessibility audit */
|
|
30
|
+
async getAccessibilityTree() {
|
|
31
|
+
// Use simctl ui to get the accessibility hierarchy
|
|
32
|
+
try {
|
|
33
|
+
const output = await this.exec("ui", this.deviceId, "accessibility");
|
|
34
|
+
return output;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
// Fallback: use the description command for view hierarchy
|
|
38
|
+
return this.getViewHierarchyViaXctest();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Fallback: Get view hierarchy by running a small XCTest snippet.
|
|
43
|
+
* This uses `simctl launch` with a debugger approach, but the simplest
|
|
44
|
+
* method is to use the accessibility description from the simulator.
|
|
45
|
+
*/
|
|
46
|
+
async getViewHierarchyViaXctest() {
|
|
47
|
+
// Use the simctl subprocess to query the UI
|
|
48
|
+
// We'll use `simctl ui <device> describe` to get the UI hierarchy
|
|
49
|
+
try {
|
|
50
|
+
const output = await this.exec("ui", this.deviceId, "describe");
|
|
51
|
+
return output;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
throw new Error("Could not extract accessibility tree from iOS Simulator. " +
|
|
55
|
+
"Ensure the simulator is booted and has an app running.");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** Get device info from simctl */
|
|
59
|
+
async getDeviceInfo() {
|
|
60
|
+
const { stdout } = await execFileAsync("xcrun", [
|
|
61
|
+
"simctl",
|
|
62
|
+
"list",
|
|
63
|
+
"devices",
|
|
64
|
+
"--json",
|
|
65
|
+
]);
|
|
66
|
+
const data = JSON.parse(stdout);
|
|
67
|
+
for (const [runtime, devices] of Object.entries(data.devices)) {
|
|
68
|
+
for (const device of devices) {
|
|
69
|
+
if (device.udid === this.deviceId) {
|
|
70
|
+
return {
|
|
71
|
+
name: device.name,
|
|
72
|
+
runtime: runtime
|
|
73
|
+
.replace(/^com\.apple\.CoreSimulator\.SimRuntime\./, "")
|
|
74
|
+
.replace(/-/g, "."),
|
|
75
|
+
state: device.state,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
throw new Error(`Device ${this.deviceId} not found in simctl list`);
|
|
81
|
+
}
|
|
82
|
+
/** Get screen size of the simulator */
|
|
83
|
+
async getScreenSize() {
|
|
84
|
+
// Take a tiny screenshot and check its dimensions via sharp
|
|
85
|
+
const tmpPath = `/tmp/devlens-size-check-${Date.now()}.png`;
|
|
86
|
+
await this.exec("io", this.deviceId, "screenshot", tmpPath);
|
|
87
|
+
try {
|
|
88
|
+
const sharp = (await import("sharp")).default;
|
|
89
|
+
const metadata = await sharp(tmpPath).metadata();
|
|
90
|
+
const { unlink } = await import("fs/promises");
|
|
91
|
+
unlink(tmpPath).catch(() => { });
|
|
92
|
+
return {
|
|
93
|
+
width: metadata.width || 390,
|
|
94
|
+
height: metadata.height || 844,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
// Fallback defaults (iPhone 14)
|
|
99
|
+
return { width: 390, height: 844 };
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/** Tap at coordinates using simctl */
|
|
103
|
+
async tap(x, y) {
|
|
104
|
+
// simctl doesn't have a direct tap command, so we use the io command
|
|
105
|
+
// with the AppleScript approach or the simctl interact command
|
|
106
|
+
try {
|
|
107
|
+
await this.exec("io", this.deviceId, "tap", String(Math.round(x)), String(Math.round(y)));
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
// Fallback: use AppleScript to tap on the simulator
|
|
111
|
+
await execFileAsync("osascript", [
|
|
112
|
+
"-e",
|
|
113
|
+
`tell application "Simulator" to activate`,
|
|
114
|
+
]);
|
|
115
|
+
// Use cliclick or similar for coordinate-based tapping
|
|
116
|
+
throw new Error("Direct tap not supported on this simctl version. Consider using a newer Xcode.");
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/** Swipe on the simulator */
|
|
120
|
+
async swipe(startX, startY, endX, endY) {
|
|
121
|
+
try {
|
|
122
|
+
await this.exec("io", this.deviceId, "swipe", String(Math.round(startX)), String(Math.round(startY)), String(Math.round(endX)), String(Math.round(endY)));
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
throw new Error("Swipe not supported on this simctl version.");
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/** Type text using simctl keyboard input */
|
|
129
|
+
async typeText(text) {
|
|
130
|
+
await this.exec("io", this.deviceId, "keyboard", "type", text);
|
|
131
|
+
}
|
|
132
|
+
/** Press a key using simctl */
|
|
133
|
+
async pressKey(key) {
|
|
134
|
+
await this.exec("io", this.deviceId, "keyboard", "key", key);
|
|
135
|
+
}
|
|
136
|
+
/** Launch an app */
|
|
137
|
+
async launchApp(bundleId) {
|
|
138
|
+
await this.exec("launch", this.deviceId, bundleId);
|
|
139
|
+
}
|
|
140
|
+
/** Terminate an app */
|
|
141
|
+
async terminateApp(bundleId) {
|
|
142
|
+
await this.exec("terminate", this.deviceId, bundleId);
|
|
143
|
+
}
|
|
144
|
+
/** Install an app (.app bundle or .ipa) */
|
|
145
|
+
async installApp(path) {
|
|
146
|
+
await this.exec("install", this.deviceId, path);
|
|
147
|
+
}
|
|
148
|
+
/** List installed apps */
|
|
149
|
+
async listApps() {
|
|
150
|
+
try {
|
|
151
|
+
const output = await this.exec("listapps", this.deviceId);
|
|
152
|
+
// Parse the plist/json output
|
|
153
|
+
const apps = [];
|
|
154
|
+
const bundleIdMatches = output.matchAll(/"CFBundleIdentifier"\s*=\s*"([^"]+)"/g);
|
|
155
|
+
const nameMatches = output.matchAll(/"CFBundleDisplayName"\s*=\s*"([^"]+)"/g);
|
|
156
|
+
const bundleIds = [...bundleIdMatches].map((m) => m[1]);
|
|
157
|
+
const names = [...nameMatches].map((m) => m[1]);
|
|
158
|
+
for (let i = 0; i < bundleIds.length; i++) {
|
|
159
|
+
apps.push({
|
|
160
|
+
bundleId: bundleIds[i],
|
|
161
|
+
name: names[i] || bundleIds[i],
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
return apps;
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
return [];
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/** Open a URL */
|
|
171
|
+
async openUrl(url) {
|
|
172
|
+
await this.exec("openurl", this.deviceId, url);
|
|
173
|
+
}
|
|
174
|
+
/** Set device orientation */
|
|
175
|
+
async setOrientation(orientation) {
|
|
176
|
+
// simctl doesn't have a direct orientation command
|
|
177
|
+
// Use the Simulator menu via AppleScript
|
|
178
|
+
const rotation = orientation === "portrait" ? "0" : "90";
|
|
179
|
+
try {
|
|
180
|
+
await execFileAsync("osascript", [
|
|
181
|
+
"-e",
|
|
182
|
+
`tell application "System Events" to tell process "Simulator" to ` +
|
|
183
|
+
`click menu item "Rotate ${orientation === "landscape" ? "Right" : "Left"}" of menu "Device" of menu bar 1`,
|
|
184
|
+
]);
|
|
185
|
+
}
|
|
186
|
+
catch {
|
|
187
|
+
// Orientation setting may not be available in all environments
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
exports.Simctl = Simctl;
|
|
192
|
+
//# sourceMappingURL=simctl.js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