@mobilewright/cli 0.0.1

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 (70) hide show
  1. package/dist/cli.d.ts +3 -0
  2. package/dist/cli.d.ts.map +1 -0
  3. package/dist/cli.js +422 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/codegen.d.ts +11 -0
  6. package/dist/codegen.d.ts.map +1 -0
  7. package/dist/codegen.js +90 -0
  8. package/dist/codegen.js.map +1 -0
  9. package/dist/codegen.test.d.ts +2 -0
  10. package/dist/codegen.test.d.ts.map +1 -0
  11. package/dist/codegen.test.js +31 -0
  12. package/dist/codegen.test.js.map +1 -0
  13. package/dist/connect.d.ts +17 -0
  14. package/dist/connect.d.ts.map +1 -0
  15. package/dist/connect.js +68 -0
  16. package/dist/connect.js.map +1 -0
  17. package/dist/find-options.d.ts +19 -0
  18. package/dist/find-options.d.ts.map +1 -0
  19. package/dist/find-options.js +57 -0
  20. package/dist/find-options.js.map +1 -0
  21. package/dist/find-options.test.d.ts +2 -0
  22. package/dist/find-options.test.d.ts.map +1 -0
  23. package/dist/find-options.test.js +34 -0
  24. package/dist/find-options.test.js.map +1 -0
  25. package/dist/index.d.ts +6 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +6 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/install.d.ts +14 -0
  30. package/dist/install.d.ts.map +1 -0
  31. package/dist/install.js +47 -0
  32. package/dist/install.js.map +1 -0
  33. package/dist/install.test.d.ts +2 -0
  34. package/dist/install.test.d.ts.map +1 -0
  35. package/dist/install.test.js +35 -0
  36. package/dist/install.test.js.map +1 -0
  37. package/dist/report.d.ts +18 -0
  38. package/dist/report.d.ts.map +1 -0
  39. package/dist/report.js +38 -0
  40. package/dist/report.js.map +1 -0
  41. package/dist/report.test.d.ts +2 -0
  42. package/dist/report.test.d.ts.map +1 -0
  43. package/dist/report.test.js +32 -0
  44. package/dist/report.test.js.map +1 -0
  45. package/dist/session.d.ts +22 -0
  46. package/dist/session.d.ts.map +1 -0
  47. package/dist/session.js +28 -0
  48. package/dist/session.js.map +1 -0
  49. package/dist/session.test.d.ts +2 -0
  50. package/dist/session.test.d.ts.map +1 -0
  51. package/dist/session.test.js +44 -0
  52. package/dist/session.test.js.map +1 -0
  53. package/dist/snapshot.d.ts +27 -0
  54. package/dist/snapshot.d.ts.map +1 -0
  55. package/dist/snapshot.js +88 -0
  56. package/dist/snapshot.js.map +1 -0
  57. package/dist/snapshot.test.d.ts +2 -0
  58. package/dist/snapshot.test.d.ts.map +1 -0
  59. package/dist/snapshot.test.js +45 -0
  60. package/dist/snapshot.test.js.map +1 -0
  61. package/dist/target.d.ts +17 -0
  62. package/dist/target.d.ts.map +1 -0
  63. package/dist/target.js +29 -0
  64. package/dist/target.js.map +1 -0
  65. package/dist/target.test.d.ts +2 -0
  66. package/dist/target.test.d.ts.map +1 -0
  67. package/dist/target.test.js +16 -0
  68. package/dist/target.test.js.map +1 -0
  69. package/package.json +41 -0
  70. package/skills/mobilewright-cli/SKILL.md +157 -0
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,422 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from 'commander';
3
+ import { spawn, spawnSync } from 'node:child_process';
4
+ import { existsSync, mkdirSync, openSync } from 'node:fs';
5
+ import { dirname, join, resolve } from 'node:path';
6
+ import { fileURLToPath } from 'node:url';
7
+ import { setTimeout as sleep } from 'node:timers/promises';
8
+ import { createRequire } from 'node:module';
9
+ import { Locator, expect, queryAll } from '@mobilewright/core';
10
+ import { resolveMobilecliBinary } from '@mobilewright/driver-mobilecli';
11
+ import { connect, listDevices } from './connect.js';
12
+ import { buildStrategy } from './find-options.js';
13
+ import { formatSnapshot, lineFor, renderSnapshot } from './snapshot.js';
14
+ import { loadSession, saveSession } from './session.js';
15
+ import { centerOfTarget, parseTarget, resolveRef } from './target.js';
16
+ import { locatorForStrategy, quote } from './codegen.js';
17
+ import { formatReport, videoPath, writeSnapshotFile, WORKSPACE_DIR } from './report.js';
18
+ import { install, parseSkillTarget, SKILL_TARGETS } from './install.js';
19
+ const _require = createRequire(import.meta.url);
20
+ const _pkg = _require('../package.json');
21
+ const SKILL_PATH = resolve(dirname(fileURLToPath(import.meta.url)), '..', 'skills', 'mobilewright-cli', 'SKILL.md');
22
+ const BUTTONS = ['HOME', 'BACK', 'POWER', 'VOLUME_UP', 'VOLUME_DOWN', 'ENTER', 'DPAD_UP', 'DPAD_DOWN', 'DPAD_LEFT', 'DPAD_RIGHT', 'DPAD_CENTER', 'APP_SWITCH', 'LOCK'];
23
+ const SWIPE_DIRECTIONS = ['up', 'down', 'left', 'right'];
24
+ const MATCHERS = ['visible', 'hidden', 'enabled', 'disabled', 'checked', 'selected', 'focused', 'text', 'contain-text', 'value', 'count'];
25
+ const DEFAULT_LOG_LIMIT = '100';
26
+ const VIDEO_STOP_TIMEOUT_MS = 10_000;
27
+ const VIDEO_STOP_POLL_MS = 200;
28
+ const program = new Command();
29
+ program
30
+ .name('mobilewright-cli')
31
+ .version(_pkg.version)
32
+ .option('-s, --session <name>', 'session name, keeps device choice and refs between commands', 'default')
33
+ .option('-d, --device <id>', 'device ID (run "mobilewright-cli devices" to list)')
34
+ .option('--json', 'machine-readable output')
35
+ .addHelpText('before', `Agent skill: ${SKILL_PATH}\n`);
36
+ function globals() {
37
+ return program.opts();
38
+ }
39
+ function emit(report, json) {
40
+ console.log(globals().json ? JSON.stringify(json, null, 2) : formatReport(report));
41
+ }
42
+ function fail(err) {
43
+ const message = err instanceof Error ? err.message : String(err);
44
+ if (globals().json) {
45
+ console.log(JSON.stringify({ error: message }));
46
+ }
47
+ else {
48
+ console.error(`error: ${message}`);
49
+ }
50
+ process.exit(1);
51
+ }
52
+ /** Run an action on the session device, then report code, foreground app and a fresh snapshot. */
53
+ async function withDevice(fn) {
54
+ const g = globals();
55
+ let connected;
56
+ try {
57
+ connected = await connect(g.session, g.device);
58
+ const action = (await fn(connected)) ?? {};
59
+ const app = await foregroundApp(connected);
60
+ let snapshotPath = action.snapshotPath ?? undefined;
61
+ if (action.snapshotPath === undefined) {
62
+ const snapshot = renderSnapshot(await connected.device.screen.viewTree());
63
+ saveSession(g.session, { ...loadSession(g.session), refs: snapshot.refs });
64
+ snapshotPath = writeSnapshotFile(formatSnapshot(snapshot.lines));
65
+ }
66
+ emit({ code: action.code, result: action.result, deviceId: connected.session.deviceId, app, snapshotPath, snapshotText: action.snapshotText }, { ok: true, code: action.code, result: action.json ?? action.result, device: connected.session.deviceId, app, snapshot: action.snapshotText ?? snapshotPath });
67
+ }
68
+ catch (err) {
69
+ // Close before exiting: process.exit() inside catch would skip finally and
70
+ // leave the auto-started mobilecli server orphaned for the next command.
71
+ await connected?.close().catch(() => { });
72
+ fail(err);
73
+ }
74
+ await connected.close().catch(() => { });
75
+ }
76
+ /** Foreground app is metadata only; some Android devices cannot report it. */
77
+ async function foregroundApp(c) {
78
+ try {
79
+ const app = await c.device.getForegroundApp();
80
+ return app.bundleId || undefined;
81
+ }
82
+ catch {
83
+ return undefined;
84
+ }
85
+ }
86
+ /** Parse a CLI number: finite and non-negative, optionally an integer. */
87
+ function parseNonNegative(value, flag, integer = false) {
88
+ const n = Number(value);
89
+ const valid = Number.isFinite(n) && n >= 0 && (!integer || Number.isInteger(n));
90
+ if (!valid) {
91
+ throw new Error(`${flag} must be a non-negative ${integer ? 'integer' : 'number'}, got: ${value}`);
92
+ }
93
+ return n;
94
+ }
95
+ function addFindOptions(cmd) {
96
+ return cmd
97
+ .option('--text <text>', 'match by visible text (use /regex/ for a pattern)')
98
+ .option('--role <role>', 'match by semantic role, e.g. button, textfield')
99
+ .option('--name <name>', 'with --role: accessible name (use /regex/ for a pattern)')
100
+ .option('--test-id <id>', 'match by test ID (accessibility id / resource-id)')
101
+ .option('--label <label>', 'match by accessibility label')
102
+ .option('--placeholder <text>', 'match by placeholder text')
103
+ .option('--type <type>', 'match by raw native type, e.g. XCUIElementTypeCell')
104
+ .option('--exact', 'require an exact text/label/placeholder match')
105
+ .option('--has-text <text>', 'keep only elements whose subtree contains this text')
106
+ .option('--has-not-text <text>', 'drop elements whose subtree contains this text')
107
+ .option('--nth <index>', 'pick the n-th match (0-based, negative from the end)')
108
+ .option('--first', 'pick the first match')
109
+ .option('--last', 'pick the last match');
110
+ }
111
+ /** Code for an action on a target: locator chain for refs, screen coordinates otherwise. */
112
+ function targetCode(target, c, method, pointMethod, args = '') {
113
+ const info = resolveRef(target, c.session.refs);
114
+ if (info) {
115
+ return `await ${info.locator}.${method}(${args});`;
116
+ }
117
+ const { x, y } = centerOfTarget(target, c.session.refs);
118
+ return `await screen.${pointMethod}(${x}, ${y});`;
119
+ }
120
+ // ── setup ──────────────────────────────────────────────────────────────
121
+ program
122
+ .command('install')
123
+ .description('initialize the workspace and install the mobilewright-cli agent skill')
124
+ .option('--skills <target>', `where to install the skill: ${SKILL_TARGETS.join(' (default), ')}`, 'claude')
125
+ .option('-g, --global', 'install the skill into the home directory instead of the workspace')
126
+ .action((opts) => {
127
+ try {
128
+ const lines = install({ skills: parseSkillTarget(opts.skills), global: !!opts.global }, SKILL_PATH);
129
+ console.log(globals().json ? JSON.stringify({ ok: true, lines }, null, 2) : lines.join('\n'));
130
+ }
131
+ catch (err) {
132
+ fail(err);
133
+ }
134
+ });
135
+ program
136
+ .command('devices')
137
+ .description('list connected devices, simulators and emulators')
138
+ .action(async () => {
139
+ try {
140
+ const devices = await listDevices();
141
+ const result = devices.length === 0
142
+ ? 'no devices found, run "mobilewright doctor"'
143
+ : devices.map((d) => `${d.id} ${d.platform} ${d.type} ${d.state} ${d.name}`).join('\n');
144
+ emit({ result }, devices);
145
+ }
146
+ catch (err) {
147
+ fail(err);
148
+ }
149
+ });
150
+ // ── apps ───────────────────────────────────────────────────────────────
151
+ program
152
+ .command('apps')
153
+ .description('list installed apps')
154
+ .action(() => withDevice(async ({ device }) => {
155
+ const apps = await device.listApps();
156
+ return {
157
+ code: 'await device.listApps();',
158
+ result: apps.map((a) => [a.bundleId, a.name, a.version].filter(Boolean).join(' ')).join('\n'),
159
+ json: apps,
160
+ snapshotPath: null,
161
+ };
162
+ }));
163
+ program
164
+ .command('app-install <path>')
165
+ .description('install an app from a .apk (Android) or .ipa/.zip/.app (iOS)')
166
+ .action((path) => withDevice(async ({ device }) => {
167
+ const full = resolve(process.cwd(), path);
168
+ await device.installApp(full);
169
+ return { code: `await device.installApp(${quote(path)});`, snapshotPath: null };
170
+ }));
171
+ program
172
+ .command('launch <bundleId>')
173
+ .description('launch an app and wait for it to reach the foreground')
174
+ .action((bundleId) => withDevice(async ({ device }) => {
175
+ await device.launchApp(bundleId);
176
+ return { code: `await device.launchApp(${quote(bundleId)});` };
177
+ }));
178
+ program
179
+ .command('terminate <bundleId>')
180
+ .description('terminate a running app')
181
+ .action((bundleId) => withDevice(async ({ device }) => {
182
+ await device.terminateApp(bundleId);
183
+ return { code: `await device.terminateApp(${quote(bundleId)});` };
184
+ }));
185
+ program
186
+ .command('url <url>')
187
+ .description('open a URL or deep link on the device')
188
+ .action((url) => withDevice(async ({ device }) => {
189
+ await device.openUrl(url);
190
+ return { code: `await device.openUrl(${quote(url)});` };
191
+ }));
192
+ // ── snapshot / find ────────────────────────────────────────────────────
193
+ program
194
+ .command('snapshot')
195
+ .description('print the screen as a compact tree with element refs (e1, e2, ...)')
196
+ .action(() => withDevice(async ({ device }) => {
197
+ const snapshot = renderSnapshot(await device.screen.viewTree());
198
+ saveSession(globals().session, { ...loadSession(globals().session), refs: snapshot.refs });
199
+ return { snapshotPath: null, snapshotText: formatSnapshot(snapshot.lines) };
200
+ }));
201
+ addFindOptions(program.command('find'))
202
+ .description('find elements by locator and print their refs')
203
+ .action((opts) => withDevice(async ({ device }) => {
204
+ const strategy = buildStrategy(opts);
205
+ const tree = await device.screen.viewTree();
206
+ const snapshot = renderSnapshot(tree);
207
+ saveSession(globals().session, { ...loadSession(globals().session), refs: snapshot.refs });
208
+ const lines = queryAll(tree, strategy).map((node) => lineFor(node, snapshot.nodes.get(node)));
209
+ return {
210
+ code: `${locatorForStrategy(strategy)};`,
211
+ result: lines.length === 0 ? 'no matches' : formatSnapshot(lines),
212
+ json: lines,
213
+ snapshotPath: writeSnapshotFile(formatSnapshot(snapshot.lines)),
214
+ };
215
+ }));
216
+ // ── pointer actions ────────────────────────────────────────────────────
217
+ function pointerCommand(name, description, method, pointMethod, act) {
218
+ program
219
+ .command(`${name} <target>`)
220
+ .description(`${description} — target is a ref (e12) or coordinates (x,y)`)
221
+ .action((arg) => withDevice(async (c) => {
222
+ const target = parseTarget(arg);
223
+ const { x, y } = centerOfTarget(target, c.session.refs);
224
+ await act(c, x, y);
225
+ return { code: targetCode(target, c, method, pointMethod) };
226
+ }));
227
+ }
228
+ pointerCommand('tap', 'tap an element', 'tap', 'tap', ({ device }, x, y) => device.screen.tap(x, y));
229
+ pointerCommand('doubletap', 'double-tap an element', 'doubleTap', 'doubleTap', ({ device }, x, y) => device.screen.doubleTap(x, y));
230
+ pointerCommand('longpress', 'long-press an element', 'longPress', 'longPress', ({ device }, x, y) => device.screen.longPress(x, y));
231
+ program
232
+ .command('fill <target> <text>')
233
+ .description('tap a text field, clear it and type text — target is a ref (e12) or coordinates (x,y)')
234
+ .action((arg, text) => withDevice(async (c) => {
235
+ const target = parseTarget(arg);
236
+ const { x, y } = centerOfTarget(target, c.session.refs);
237
+ await c.device.screen.tap(x, y);
238
+ await c.driver.clearText();
239
+ await c.driver.typeText(text);
240
+ return { code: targetCode(target, c, 'fill', 'tap', quote(text)) };
241
+ }));
242
+ // ── keyboard / hardware ────────────────────────────────────────────────
243
+ program
244
+ .command('type <text>')
245
+ .description('type text into the focused element, without tapping or clearing first')
246
+ .action((text) => withDevice(async ({ driver }) => {
247
+ await driver.typeText(text);
248
+ return { code: `// typed ${quote(text)} into the focused element; in a test use locator.fill()` };
249
+ }));
250
+ program
251
+ .command('press <keys...>')
252
+ .description('press keyboard keys, e.g. Enter, backspace, cmd+a')
253
+ .action((keys) => withDevice(async ({ driver }) => {
254
+ await driver.pressKeys(keys);
255
+ return { code: `// pressed keys: ${keys.join(' ')}` };
256
+ }));
257
+ program
258
+ .command('button <name>')
259
+ .description(`press a hardware button: ${BUTTONS.join(', ')}`)
260
+ .action((name) => withDevice(async ({ device }) => {
261
+ const button = name.toUpperCase();
262
+ if (!BUTTONS.includes(button)) {
263
+ throw new Error(`unknown button "${name}", expected one of: ${BUTTONS.join(', ')}`);
264
+ }
265
+ await device.screen.pressButton(button);
266
+ return { code: `await screen.pressButton(${quote(button)});` };
267
+ }));
268
+ program
269
+ .command('swipe <direction>')
270
+ .description('swipe from the screen center: up, down, left, right')
271
+ .action((direction) => withDevice(async ({ device }) => {
272
+ if (!SWIPE_DIRECTIONS.includes(direction)) {
273
+ throw new Error(`unknown direction "${direction}", expected one of: ${SWIPE_DIRECTIONS.join(', ')}`);
274
+ }
275
+ await device.screen.swipe(direction);
276
+ return { code: `await screen.swipe(${quote(direction)});` };
277
+ }));
278
+ // ── screenshot / video / logs ──────────────────────────────────────────
279
+ program
280
+ .command('screenshot [target]')
281
+ .description('save a screenshot of the screen, or of one element when a ref is given')
282
+ .option('-o, --output <file>', 'output file path', 'screenshot.png')
283
+ .action((arg, opts) => withDevice(async (c) => {
284
+ const path = resolve(process.cwd(), opts.output);
285
+ const info = arg === undefined ? undefined : resolveRef(parseTarget(arg), c.session.refs);
286
+ if (info) {
287
+ await c.device.screen.screenshot({ path, clip: info.bounds });
288
+ return { code: `await ${info.locator}.screenshot();`, result: `saved ${path}`, snapshotPath: null };
289
+ }
290
+ await c.device.screen.screenshot({ path });
291
+ return { code: `await screen.screenshot({ path: ${quote(opts.output)} });`, result: `saved ${path}`, snapshotPath: null };
292
+ }));
293
+ program
294
+ .command('video-start [filename]')
295
+ .description(`start recording the screen to an MP4 (default: ${WORKSPACE_DIR}/video-<timestamp>.mp4)`)
296
+ .action((filename) => withDevice(async ({ session }) => {
297
+ if (session.video) {
298
+ throw new Error(`already recording to ${session.video.output}, run "video-stop" first`);
299
+ }
300
+ const output = resolve(process.cwd(), filename ?? videoPath());
301
+ mkdirSync(dirname(output), { recursive: true });
302
+ // ponytail: recording lives in a detached mobilecli process because this
303
+ // command's own server is torn down on exit; a daemon would make this an RPC.
304
+ const child = spawn(resolveMobilecliBinary(), ['screenrecord', '--device', session.deviceId, '-o', output, '--silent'], {
305
+ detached: true,
306
+ stdio: ['ignore', openSync(join(dirname(output), '.screenrecord.log'), 'a'), openSync(join(dirname(output), '.screenrecord.log'), 'a')],
307
+ });
308
+ // spawn failures (ENOENT, EACCES, EMFILE) leave pid undefined and report via 'error'
309
+ child.on('error', () => { });
310
+ if (child.pid === undefined) {
311
+ throw new Error(`could not start the screen recorder, see ${join(dirname(output), '.screenrecord.log')}`);
312
+ }
313
+ child.unref();
314
+ saveSession(globals().session, { ...loadSession(globals().session), video: { pid: child.pid, output } });
315
+ return { code: `await device.startRecording({ output: ${quote(filename ?? output)} });`, result: `recording to ${output}`, snapshotPath: null };
316
+ }));
317
+ function isRunning(pid) {
318
+ try {
319
+ process.kill(pid, 0);
320
+ return true;
321
+ }
322
+ catch {
323
+ return false;
324
+ }
325
+ }
326
+ program
327
+ .command('video-stop')
328
+ .description('stop the screen recording and print the MP4 path')
329
+ .action(async () => {
330
+ const name = globals().session;
331
+ const session = loadSession(name);
332
+ if (!session.video) {
333
+ fail('not recording, run "video-start" first');
334
+ }
335
+ const { pid, output } = session.video;
336
+ if (isRunning(pid)) {
337
+ process.kill(pid, 'SIGINT');
338
+ }
339
+ const deadline = Date.now() + VIDEO_STOP_TIMEOUT_MS;
340
+ while (isRunning(pid) && Date.now() < deadline) {
341
+ await sleep(VIDEO_STOP_POLL_MS);
342
+ }
343
+ if (isRunning(pid)) {
344
+ fail(`recorder (pid ${pid}) did not stop within ${VIDEO_STOP_TIMEOUT_MS / 1000}s, run "video-stop" again`);
345
+ }
346
+ saveSession(name, { ...session, video: undefined });
347
+ if (!existsSync(output)) {
348
+ fail(`recorder exited but ${output} was not written, see ${join(dirname(output), '.screenrecord.log')}`);
349
+ }
350
+ emit({ code: 'await device.stopRecording();', result: `saved ${output}` }, { ok: true, video: output });
351
+ });
352
+ program
353
+ .command('logs')
354
+ .description('print recent device logs')
355
+ .option('--filter <key=value...>', 'include (key=value) or exclude (key!=value); keys: pid, process, tag, level, subsystem, category, message')
356
+ .option('--limit <n>', 'stop after this many entries', DEFAULT_LOG_LIMIT)
357
+ .action(async (opts) => {
358
+ try {
359
+ const { session } = await connect(globals().session, globals().device).then(async (c) => { await c.close(); return c; });
360
+ const args = ['device', 'logs', '--device', session.deviceId, '--limit', opts.limit];
361
+ for (const f of opts.filter ?? []) {
362
+ args.push('--filter', f);
363
+ }
364
+ const run = spawnSync(resolveMobilecliBinary(), args, { stdio: 'inherit' });
365
+ process.exitCode = run.status ?? 1;
366
+ }
367
+ catch (err) {
368
+ fail(err);
369
+ }
370
+ });
371
+ // ── expect ─────────────────────────────────────────────────────────────
372
+ addFindOptions(program.command('expect <matcher> [value]'))
373
+ .description(`assert on a located element with auto-wait; matcher is one of ${MATCHERS.join(', ')}`)
374
+ .option('--timeout <ms>', 'how long to wait for the assertion to hold', '5000')
375
+ .action((matcher, value, opts) => withDevice(async ({ driver }) => {
376
+ if (!MATCHERS.includes(matcher)) {
377
+ throw new Error(`unknown matcher "${matcher}", expected one of: ${MATCHERS.join(', ')}`);
378
+ }
379
+ const strategy = buildStrategy(opts);
380
+ const locator = new Locator(driver, strategy);
381
+ const timeout = parseNonNegative(opts.timeout, '--timeout');
382
+ await runMatcher(locator, matcher, value, timeout);
383
+ return {
384
+ code: `await expect(${locatorForStrategy(strategy)}).${matcherCode(matcher, value)};`,
385
+ result: `ok: ${matcher}${value === undefined ? '' : ` ${JSON.stringify(value)}`}`,
386
+ };
387
+ }));
388
+ function requireValue(matcher, value) {
389
+ if (value === undefined) {
390
+ throw new Error(`matcher "${matcher}" needs a value`);
391
+ }
392
+ return value;
393
+ }
394
+ const MATCHER_METHODS = {
395
+ 'visible': 'toBeVisible', 'hidden': 'toBeHidden', 'enabled': 'toBeEnabled', 'disabled': 'toBeDisabled',
396
+ 'checked': 'toBeChecked', 'selected': 'toBeSelected', 'focused': 'toBeFocused',
397
+ 'text': 'toHaveText', 'contain-text': 'toContainText', 'value': 'toHaveValue', 'count': 'toHaveCount',
398
+ };
399
+ function matcherCode(matcher, value) {
400
+ if (value === undefined) {
401
+ return `${MATCHER_METHODS[matcher]}()`;
402
+ }
403
+ return `${MATCHER_METHODS[matcher]}(${matcher === 'count' ? Number(value) : quote(value)})`;
404
+ }
405
+ async function runMatcher(locator, matcher, value, timeout) {
406
+ const assertion = expect(locator);
407
+ switch (matcher) {
408
+ case 'visible': return assertion.toBeVisible({ timeout });
409
+ case 'hidden': return assertion.toBeHidden({ timeout });
410
+ case 'enabled': return assertion.toBeEnabled({ timeout });
411
+ case 'disabled': return assertion.toBeDisabled({ timeout });
412
+ case 'checked': return assertion.toBeChecked({ timeout });
413
+ case 'selected': return assertion.toBeSelected({ timeout });
414
+ case 'focused': return assertion.toBeFocused({ timeout });
415
+ case 'text': return assertion.toHaveText(requireValue(matcher, value), { timeout });
416
+ case 'contain-text': return assertion.toContainText(requireValue(matcher, value), { timeout });
417
+ case 'value': return assertion.toHaveValue(requireValue(matcher, value), { timeout });
418
+ case 'count': return assertion.toHaveCount(parseNonNegative(requireValue(matcher, value), 'count', true), { timeout });
419
+ }
420
+ }
421
+ program.parseAsync(process.argv).catch(fail);
422
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,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@mobilewright/protocol';
2
+ import type { LocatorStrategy } from '@mobilewright/core';
3
+ /**
4
+ * The locator a test would use for this node, most specific first.
5
+ * ponytail: uniqueness is not checked; the agent sees the snapshot and can refine.
6
+ */
7
+ export declare function locatorForNode(node: ViewNode): string;
8
+ /** Render a LocatorStrategy (from find/expect flags) as chained test code. */
9
+ export declare function locatorForStrategy(strategy: LocatorStrategy): string;
10
+ export declare function quote(value: string): string;
11
+ //# sourceMappingURL=codegen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../src/codegen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA4B1D;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAQrD;AAMD,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CA2BpE;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3C"}
@@ -0,0 +1,90 @@
1
+ import { ROLE_TYPE_MAP, bareTypeName } from '@mobilewright/core';
2
+ const ROLES_WITH_NAME = new Set(['button', 'textfield', 'switch', 'checkbox', 'radio', 'slider', 'tab', 'link']);
3
+ function q(value) {
4
+ if (value instanceof RegExp) {
5
+ return value.toString();
6
+ }
7
+ const escaped = value
8
+ .replace(/\\/g, '\\\\')
9
+ .replace(/'/g, '\\\'')
10
+ .replace(/\n/g, '\\n')
11
+ .replace(/\r/g, '\\r')
12
+ .replace(/[\u0000-\u001f\u2028\u2029]/g, (c) => `\\u${c.charCodeAt(0).toString(16).padStart(4, '0')}`);
13
+ return `'${escaped}'`;
14
+ }
15
+ function roleOf(node) {
16
+ const bare = bareTypeName(node.type);
17
+ for (const [role, types] of Object.entries(ROLE_TYPE_MAP)) {
18
+ if (types.includes(bare)) {
19
+ return role;
20
+ }
21
+ }
22
+ return undefined;
23
+ }
24
+ /**
25
+ * The locator a test would use for this node, most specific first.
26
+ * ponytail: uniqueness is not checked; the agent sees the snapshot and can refine.
27
+ */
28
+ export function locatorForNode(node) {
29
+ if (node.identifier) {
30
+ return `screen.getByTestId(${q(node.identifier)})`;
31
+ }
32
+ const role = roleOf(node);
33
+ if (role && ROLES_WITH_NAME.has(role) && node.label) {
34
+ return `screen.getByRole(${q(role)}, { name: ${q(node.label)} })`;
35
+ }
36
+ if (node.label) {
37
+ return `screen.getByLabel(${q(node.label)})`;
38
+ }
39
+ if (node.text) {
40
+ return `screen.getByText(${q(node.text)})`;
41
+ }
42
+ if (node.placeholder) {
43
+ return `screen.getByPlaceholder(${q(node.placeholder)})`;
44
+ }
45
+ return `screen.getByType(${q(node.type)})`;
46
+ }
47
+ function exactArg(exact) {
48
+ return exact ? ', { exact: true }' : '';
49
+ }
50
+ /** Render a LocatorStrategy (from find/expect flags) as chained test code. */
51
+ export function locatorForStrategy(strategy) {
52
+ switch (strategy.kind) {
53
+ case 'root': return 'screen';
54
+ case 'text': return `screen.getByText(${q(strategy.value)}${exactArg(strategy.exact)})`;
55
+ case 'label': return `screen.getByLabel(${q(strategy.value)}${exactArg(strategy.exact)})`;
56
+ case 'placeholder': return `screen.getByPlaceholder(${q(strategy.value)}${exactArg(strategy.exact)})`;
57
+ case 'testId': return `screen.getByTestId(${q(strategy.value)})`;
58
+ case 'type': return `screen.getByType(${q(strategy.value)})`;
59
+ case 'role': return strategy.name === undefined
60
+ ? `screen.getByRole(${q(strategy.value)})`
61
+ : `screen.getByRole(${q(strategy.value)}, { name: ${q(strategy.name)} })`;
62
+ case 'and': return `${locatorForStrategy(strategy.left)}.and(${locatorForStrategy(strategy.right)})`;
63
+ case 'or': return `${locatorForStrategy(strategy.left)}.or(${locatorForStrategy(strategy.right)})`;
64
+ case 'nth': {
65
+ const parent = locatorForStrategy(strategy.parent);
66
+ if (strategy.index === 0) {
67
+ return `${parent}.first()`;
68
+ }
69
+ if (strategy.index === -1) {
70
+ return `${parent}.last()`;
71
+ }
72
+ return `${parent}.nth(${strategy.index})`;
73
+ }
74
+ case 'filter': {
75
+ const parts = [];
76
+ if (strategy.hasText !== undefined) {
77
+ parts.push(`hasText: ${q(strategy.hasText)}`);
78
+ }
79
+ if (strategy.hasNotText !== undefined) {
80
+ parts.push(`hasNotText: ${q(strategy.hasNotText)}`);
81
+ }
82
+ return `${locatorForStrategy(strategy.parent)}.filter({ ${parts.join(', ')} })`;
83
+ }
84
+ default: return 'screen';
85
+ }
86
+ }
87
+ export function quote(value) {
88
+ return q(value);
89
+ }
90
+ //# sourceMappingURL=codegen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codegen.js","sourceRoot":"","sources":["../src/codegen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAEjH,SAAS,CAAC,CAAC,KAAsB;IAC/B,IAAI,KAAK,YAAY,MAAM,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;IACD,MAAM,OAAO,GAAG,KAAK;SAClB,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,8BAA8B,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ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AAC;IAC3B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=codegen.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codegen.test.d.ts","sourceRoot":"","sources":["../src/codegen.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ import { test, expect } from '@playwright/test';
2
+ import { locatorForNode, locatorForStrategy } from './codegen.js';
3
+ import { buildStrategy } from './find-options.js';
4
+ function node(partial) {
5
+ return { isVisible: true, isEnabled: true, bounds: { x: 0, y: 0, width: 1, height: 1 }, children: [], ...partial };
6
+ }
7
+ test('a test id wins over everything else', () => {
8
+ expect(locatorForNode(node({ type: 'XCUIElementTypeButton', identifier: 'login', label: 'Log in' }))).toBe('screen.getByTestId(\'login\')');
9
+ });
10
+ test('an interactive role with a label becomes getByRole with a name', () => {
11
+ expect(locatorForNode(node({ type: 'android.widget.Button', label: 'Log in' }))).toBe('screen.getByRole(\'button\', { name: \'Log in\' })');
12
+ });
13
+ test('static text falls back to label, then text, then placeholder, then raw type', () => {
14
+ expect(locatorForNode(node({ type: 'XCUIElementTypeStaticText', label: 'Hi' }))).toBe('screen.getByLabel(\'Hi\')');
15
+ expect(locatorForNode(node({ type: 'android.widget.TextView', text: 'Hi' }))).toBe('screen.getByText(\'Hi\')');
16
+ expect(locatorForNode(node({ type: 'XCUIElementTypeTextField', placeholder: 'Email' }))).toBe('screen.getByPlaceholder(\'Email\')');
17
+ expect(locatorForNode(node({ type: 'XCUIElementTypeCell' }))).toBe('screen.getByType(\'XCUIElementTypeCell\')');
18
+ });
19
+ test('quotes inside names are escaped', () => {
20
+ expect(locatorForNode(node({ type: 'XCUIElementTypeStaticText', text: 'Don\'t' }))).toBe('screen.getByText(\'Don\\\'t\')');
21
+ });
22
+ test('line breaks and control characters inside names are escaped', () => {
23
+ expect(locatorForNode(node({ type: 'android.widget.TextView', text: 'Line 1\nLine 2\r\tend' }))).toBe('screen.getByText(\'Line 1\\nLine 2\\r\\u0009end\')');
24
+ });
25
+ test('find flags render as the same chained locator a test would write', () => {
26
+ expect(locatorForStrategy(buildStrategy({ role: 'button', name: 'Go' }))).toBe('screen.getByRole(\'button\', { name: \'Go\' })');
27
+ expect(locatorForStrategy(buildStrategy({ text: '/sign in/i', exact: true }))).toBe('screen.getByText(/sign in/i, { exact: true })');
28
+ expect(locatorForStrategy(buildStrategy({ role: 'listitem', hasText: 'Milk', last: true }))).toBe('screen.getByRole(\'listitem\').filter({ hasText: \'Milk\' }).last()');
29
+ expect(locatorForStrategy(buildStrategy({ role: 'button', text: 'Go', nth: '2' }))).toBe('screen.getByText(\'Go\').and(screen.getByRole(\'button\')).nth(2)');
30
+ });
31
+ //# sourceMappingURL=codegen.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codegen.test.js","sourceRoot":"","sources":["../src/codegen.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,SAAS,IAAI,CAAC,OAA6C;IACzD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC;AACrH,CAAC;AAED,IAAI,CAAC,qCAAqC,EAAE,GAAG,EAAE;IAC/C,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,UAAU,EAA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