@limrun/cli 0.4.0 → 0.4.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 (53) hide show
  1. package/dist/commands/xcode/build.js +4 -4
  2. package/dist/commands/xcode/build.js.map +1 -1
  3. package/dist/lib/config.js +1 -1
  4. package/dist/lib/config.js.map +1 -1
  5. package/package.json +1 -1
  6. package/dist/commands/exec/element-tree.d.ts +0 -15
  7. package/dist/commands/exec/element-tree.d.ts.map +0 -1
  8. package/dist/commands/exec/element-tree.js +0 -61
  9. package/dist/commands/exec/element-tree.js.map +0 -1
  10. package/dist/commands/exec/install-app.d.ts +0 -17
  11. package/dist/commands/exec/install-app.d.ts.map +0 -1
  12. package/dist/commands/exec/install-app.js +0 -84
  13. package/dist/commands/exec/install-app.js.map +0 -1
  14. package/dist/commands/exec/open-url.d.ts +0 -17
  15. package/dist/commands/exec/open-url.d.ts.map +0 -1
  16. package/dist/commands/exec/open-url.js +0 -48
  17. package/dist/commands/exec/open-url.js.map +0 -1
  18. package/dist/commands/exec/perform.d.ts +0 -17
  19. package/dist/commands/exec/perform.d.ts.map +0 -1
  20. package/dist/commands/exec/perform.js +0 -232
  21. package/dist/commands/exec/perform.js.map +0 -1
  22. package/dist/commands/exec/press-key.d.ts +0 -18
  23. package/dist/commands/exec/press-key.d.ts.map +0 -1
  24. package/dist/commands/exec/press-key.js +0 -49
  25. package/dist/commands/exec/press-key.js.map +0 -1
  26. package/dist/commands/exec/record.d.ts +0 -21
  27. package/dist/commands/exec/record.d.ts.map +0 -1
  28. package/dist/commands/exec/record.js +0 -101
  29. package/dist/commands/exec/record.js.map +0 -1
  30. package/dist/commands/exec/screenshot.d.ts +0 -16
  31. package/dist/commands/exec/screenshot.d.ts.map +0 -1
  32. package/dist/commands/exec/screenshot.js +0 -72
  33. package/dist/commands/exec/screenshot.js.map +0 -1
  34. package/dist/commands/exec/scroll.d.ts +0 -18
  35. package/dist/commands/exec/scroll.d.ts.map +0 -1
  36. package/dist/commands/exec/scroll.js +0 -58
  37. package/dist/commands/exec/scroll.js.map +0 -1
  38. package/dist/commands/exec/tap-element.d.ts +0 -19
  39. package/dist/commands/exec/tap-element.d.ts.map +0 -1
  40. package/dist/commands/exec/tap-element.js +0 -102
  41. package/dist/commands/exec/tap-element.js.map +0 -1
  42. package/dist/commands/exec/tap.d.ts +0 -24
  43. package/dist/commands/exec/tap.d.ts.map +0 -1
  44. package/dist/commands/exec/tap.js +0 -57
  45. package/dist/commands/exec/tap.js.map +0 -1
  46. package/dist/commands/exec/type.d.ts +0 -18
  47. package/dist/commands/exec/type.d.ts.map +0 -1
  48. package/dist/commands/exec/type.js +0 -54
  49. package/dist/commands/exec/type.js.map +0 -1
  50. package/dist/commands/ios/log.d.ts +0 -20
  51. package/dist/commands/ios/log.d.ts.map +0 -1
  52. package/dist/commands/ios/log.js +0 -105
  53. package/dist/commands/ios/log.js.map +0 -1
@@ -1,18 +0,0 @@
1
- import { BaseCommand } from '../../base-command';
2
- export default class ExecPressKey extends BaseCommand {
3
- static summary: string;
4
- static description: string;
5
- static examples: string[];
6
- static args: {
7
- key: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
- };
9
- static flags: {
10
- id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
- modifier: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
- 'api-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
- json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
- quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
- };
16
- run(): Promise<void>;
17
- }
18
- //# sourceMappingURL=press-key.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"press-key.d.ts","sourceRoot":"","sources":["../../../src/commands/exec/press-key.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW;IACnD,MAAM,CAAC,OAAO,SAAuC;IACrD,MAAM,CAAC,WAAW,SAC+J;IACjL,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,IAAI;;MAET;IAEF,MAAM,CAAC,KAAK;;;;;;MAUV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAmB3B"}
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../base-command");
5
- const instance_client_factory_1 = require("../../lib/instance-client-factory");
6
- class ExecPressKey extends base_command_1.BaseCommand {
7
- async run() {
8
- const { args, flags } = await this.parse(ExecPressKey);
9
- this.setParsedFlags(flags);
10
- await this.withAuth(async () => {
11
- const id = this.resolveId(flags.id);
12
- if ((0, instance_client_factory_1.hasActiveSession)(id)) {
13
- await (0, instance_client_factory_1.sendSessionCommand)(id, 'press-key', [args.key, flags.modifier]);
14
- }
15
- else {
16
- const { client, disconnect } = await (0, instance_client_factory_1.getInstanceClient)(this.client, id);
17
- try {
18
- await client.pressKey(args.key, flags.modifier);
19
- }
20
- finally {
21
- disconnect();
22
- }
23
- }
24
- this.log(`Pressed key: ${args.key}`);
25
- });
26
- }
27
- }
28
- ExecPressKey.summary = 'Press a key on a running instance';
29
- ExecPressKey.description = 'Send a keyboard key press to the focused app or text field on a running iOS or Android instance. You can repeat `--modifier` to combine keys such as Command, Shift, or Alt.';
30
- ExecPressKey.examples = [
31
- '<%= config.bin %> ios press-key enter',
32
- '<%= config.bin %> ios press-key a --modifier shift --id <instance-ID>',
33
- '<%= config.bin %> android press-key tab',
34
- ];
35
- ExecPressKey.args = {
36
- key: core_1.Args.string({ description: 'Key to press (e.g. enter, backspace, a, f1)', required: true }),
37
- };
38
- ExecPressKey.flags = {
39
- ...base_command_1.BaseCommand.baseFlags,
40
- id: core_1.Flags.string({
41
- description: 'Instance ID to target. Defaults to the last created instance of the command alias type.',
42
- }),
43
- modifier: core_1.Flags.string({
44
- description: 'Modifier key to hold during the press, such as shift, command, control, or alt. Repeat for multiple modifiers.',
45
- multiple: true,
46
- }),
47
- };
48
- exports.default = ExecPressKey;
49
- //# sourceMappingURL=press-key.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"press-key.js","sourceRoot":"","sources":["../../../src/commands/exec/press-key.ts"],"names":[],"mappings":";;AAAA,sCAA0C;AAC1C,qDAAiD;AACjD,+EAA4G;AAE5G,MAAqB,YAAa,SAAQ,0BAAW;IA0BnD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACvD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAE3B,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpC,IAAI,IAAA,0CAAgB,EAAC,EAAE,CAAC,EAAE,CAAC;gBACzB,MAAM,IAAA,4CAAkB,EAAC,EAAE,EAAE,WAAW,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;YACxE,CAAC;iBAAM,CAAC;gBACN,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,2CAAiB,EAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;gBACxE,IAAI,CAAC;oBACH,MAAO,MAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;gBAC3D,CAAC;wBAAS,CAAC;oBACT,UAAU,EAAE,CAAC;gBACf,CAAC;YACH,CAAC;YACD,IAAI,CAAC,GAAG,CAAC,gBAAgB,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC;;AA3CM,oBAAO,GAAG,mCAAmC,CAAC;AAC9C,wBAAW,GAChB,8KAA8K,CAAC;AAC1K,qBAAQ,GAAG;IAChB,uCAAuC;IACvC,uEAAuE;IACvE,yCAAyC;CAC1C,CAAC;AAEK,iBAAI,GAAG;IACZ,GAAG,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,6CAA6C,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CACjG,CAAC;AAEK,kBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,EAAE,EAAE,YAAK,CAAC,MAAM,CAAC;QACf,WAAW,EAAE,yFAAyF;KACvG,CAAC;IACF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC;QACrB,WAAW,EACT,gHAAgH;QAClH,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC;kBAxBiB,YAAY"}
@@ -1,21 +0,0 @@
1
- import { BaseCommand } from '../../base-command';
2
- export default class ExecRecord extends BaseCommand {
3
- static summary: string;
4
- static description: string;
5
- static examples: string[];
6
- static args: {
7
- action: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
- };
9
- static flags: {
10
- id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
- quality: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
12
- output: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
- 'presigned-url': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
- 'api-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
- json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
- quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
- };
18
- run(): Promise<void>;
19
- private defaultRecordingPath;
20
- }
21
- //# sourceMappingURL=record.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../src/commands/exec/record.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IACjD,MAAM,CAAC,OAAO,SAAyD;IACvE,MAAM,CAAC,WAAW,SACuK;IACzL,MAAM,CAAC,QAAQ,WAQb;IAEF,MAAM,CAAC,IAAI;;MAOT;IAEF,MAAM,CAAC,KAAK;;;;;;;;MAmBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA+C1B,OAAO,CAAC,oBAAoB;CAI7B"}
@@ -1,101 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const path_1 = __importDefault(require("path"));
7
- const core_1 = require("@oclif/core");
8
- const base_command_1 = require("../../base-command");
9
- const instance_client_factory_1 = require("../../lib/instance-client-factory");
10
- class ExecRecord extends base_command_1.BaseCommand {
11
- async run() {
12
- const { args, flags } = await this.parse(ExecRecord);
13
- this.setParsedFlags(flags);
14
- await this.withAuth(async () => {
15
- const id = this.resolveId(flags.id);
16
- if (args.action === 'start') {
17
- if ((0, instance_client_factory_1.hasActiveSession)(id)) {
18
- await (0, instance_client_factory_1.sendSessionCommand)(id, 'start-recording', [flags.quality]);
19
- }
20
- else {
21
- const { client, disconnect } = await (0, instance_client_factory_1.getInstanceClient)(this.client, id);
22
- try {
23
- await client.startRecording({ quality: flags.quality });
24
- }
25
- finally {
26
- disconnect();
27
- }
28
- }
29
- this.log('Recording started');
30
- }
31
- else {
32
- const outputPath = flags.output ? path_1.default.resolve(flags.output) : this.defaultRecordingPath();
33
- const saveTo = {
34
- localPath: outputPath,
35
- presignedUrl: flags['presigned-url'],
36
- };
37
- if ((0, instance_client_factory_1.hasActiveSession)(id)) {
38
- await (0, instance_client_factory_1.sendSessionCommand)(id, 'stop-recording', [saveTo]);
39
- this.log(`Recording saved to ${outputPath}`);
40
- if (flags['presigned-url']) {
41
- this.log('Recording uploaded using the provided presigned URL');
42
- }
43
- }
44
- else {
45
- const { client, disconnect } = await (0, instance_client_factory_1.getInstanceClient)(this.client, id);
46
- try {
47
- await client.stopRecording(saveTo);
48
- this.log(`Recording saved to ${outputPath}`);
49
- if (flags['presigned-url']) {
50
- this.log('Recording uploaded using the provided presigned URL');
51
- }
52
- }
53
- finally {
54
- disconnect();
55
- }
56
- }
57
- }
58
- });
59
- }
60
- defaultRecordingPath() {
61
- const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
62
- return path_1.default.join(process.cwd(), `video_${timestamp}.mp4`);
63
- }
64
- }
65
- ExecRecord.summary = 'Start or stop video recording on a running instance';
66
- ExecRecord.description = 'Control screen recording on a running iOS or Android instance. Start recording first, then stop recording to download the file locally or upload it directly with `--presigned-url`.';
67
- ExecRecord.examples = [
68
- '<%= config.bin %> ios record start',
69
- '<%= config.bin %> ios record stop',
70
- '<%= config.bin %> ios record stop -o recording.mp4 --id <instance-ID>',
71
- '<%= config.bin %> ios record stop --presigned-url https://example.com/upload --id <instance-ID>',
72
- '<%= config.bin %> ios record start --quality 8',
73
- '<%= config.bin %> android record stop --id <instance-ID>',
74
- '<%= config.bin %> android record stop --presigned-url https://example.com/upload --id <instance-ID>',
75
- ];
76
- ExecRecord.args = {
77
- action: core_1.Args.string({
78
- description: 'Recording action to perform: `start` begins capturing and `stop` finalizes the video file',
79
- required: true,
80
- options: ['start', 'stop'],
81
- }),
82
- };
83
- ExecRecord.flags = {
84
- ...base_command_1.BaseCommand.baseFlags,
85
- id: core_1.Flags.string({
86
- description: 'Instance ID to record. Defaults to the last created instance of the command alias type.',
87
- }),
88
- quality: core_1.Flags.integer({
89
- description: 'Recording quality from 5 to 10. Higher values increase quality and file size when starting a recording.',
90
- default: 5,
91
- }),
92
- output: core_1.Flags.string({
93
- char: 'o',
94
- description: 'Local file path for the finished recording when using the `stop` action. Defaults to a timestamped mp4 in the current directory.',
95
- }),
96
- 'presigned-url': core_1.Flags.string({
97
- description: 'Presigned upload URL to receive the recording when using the `stop` action. Use this if you will upload the recording to a bucket.',
98
- }),
99
- };
100
- exports.default = ExecRecord;
101
- //# sourceMappingURL=record.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"record.js","sourceRoot":"","sources":["../../../src/commands/exec/record.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,sCAA0C;AAC1C,qDAAiD;AACjD,+EAA4G;AAE5G,MAAqB,UAAW,SAAQ,0BAAW;IA4CjD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACrD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAE3B,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpC,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;gBAC5B,IAAI,IAAA,0CAAgB,EAAC,EAAE,CAAC,EAAE,CAAC;oBACzB,MAAM,IAAA,4CAAkB,EAAC,EAAE,EAAE,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBACnE,CAAC;qBAAM,CAAC;oBACN,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,2CAAiB,EAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;oBACxE,IAA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2
- export default class ExecScreenshot extends BaseCommand {
3
- static summary: string;
4
- static description: string;
5
- static examples: string[];
6
- static args: {};
7
- static flags: {
8
- id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
- output: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
- 'api-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
- json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
- quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
- };
14
- run(): Promise<void>;
15
- }
16
- //# sourceMappingURL=screenshot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../../src/commands/exec/screenshot.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,MAAM,CAAC,OAAO,SAAkD;IAChE,MAAM,CAAC,WAAW,SAC8I;IAChK,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,KAAK;;;;;;MASV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAsC3B"}
@@ -1,72 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const fs_1 = __importDefault(require("fs"));
7
- const path_1 = __importDefault(require("path"));
8
- const core_1 = require("@oclif/core");
9
- const base_command_1 = require("../../base-command");
10
- const instance_client_factory_1 = require("../../lib/instance-client-factory");
11
- class ExecScreenshot extends base_command_1.BaseCommand {
12
- async run() {
13
- const { flags } = await this.parse(ExecScreenshot);
14
- this.setParsedFlags(flags);
15
- await this.withAuth(async () => {
16
- const id = this.resolveId(flags.id);
17
- let screenshot;
18
- let type;
19
- if ((0, instance_client_factory_1.hasActiveSession)(id)) {
20
- screenshot = await (0, instance_client_factory_1.sendSessionCommand)(id, 'screenshot');
21
- type = id.split('_')[0];
22
- }
23
- else {
24
- const resolved = await (0, instance_client_factory_1.getInstanceClient)(this.client, id);
25
- type = resolved.type;
26
- try {
27
- screenshot = await resolved.client.screenshot();
28
- }
29
- finally {
30
- resolved.disconnect();
31
- }
32
- }
33
- if (flags.output) {
34
- const outPath = path_1.default.resolve(flags.output);
35
- if (type === 'ios') {
36
- fs_1.default.writeFileSync(outPath, Buffer.from(screenshot.base64, 'base64'));
37
- }
38
- else {
39
- const base64 = screenshot.dataUri.replace(/^data:image\/\w+;base64,/, '');
40
- fs_1.default.writeFileSync(outPath, Buffer.from(base64, 'base64'));
41
- }
42
- this.log(`Screenshot saved to ${outPath}`);
43
- }
44
- else if (flags.json) {
45
- this.outputJson(screenshot);
46
- }
47
- else {
48
- this.log(type === 'ios' ? screenshot.base64 : screenshot.dataUri);
49
- }
50
- });
51
- }
52
- }
53
- ExecScreenshot.summary = 'Capture a screenshot from a running instance';
54
- ExecScreenshot.description = 'Capture the current screen from a running iOS or Android instance. Save the image to a file with `-o`, or use `--json` to inspect the raw response payload.';
55
- ExecScreenshot.examples = [
56
- '<%= config.bin %> ios screenshot -o screenshot.png',
57
- '<%= config.bin %> android screenshot --id <instance-ID>',
58
- '<%= config.bin %> ios screenshot --json',
59
- ];
60
- ExecScreenshot.args = {};
61
- ExecScreenshot.flags = {
62
- ...base_command_1.BaseCommand.baseFlags,
63
- id: core_1.Flags.string({
64
- description: 'Instance ID to capture. Defaults to the last created instance of the command alias type.',
65
- }),
66
- output: core_1.Flags.string({
67
- char: 'o',
68
- description: 'File path where the screenshot should be written instead of printing the raw image data',
69
- }),
70
- };
71
- exports.default = ExecScreenshot;
72
- //# sourceMappingURL=screenshot.js.map
@@ -1 +0,0 @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
- export default class ExecScroll extends BaseCommand {
3
- static summary: string;
4
- static description: string;
5
- static examples: string[];
6
- static args: {
7
- direction: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
- };
9
- static flags: {
10
- id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
- amount: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
12
- 'api-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
- json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
- quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
- };
16
- run(): Promise<void>;
17
- }
18
- //# sourceMappingURL=scroll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../../src/commands/exec/scroll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IACjD,MAAM,CAAC,OAAO,SAAkC;IAChD,MAAM,CAAC,WAAW,SACgI;IAClJ,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,IAAI;;MAMT;IAEF,MAAM,CAAC,KAAK;;;;;;MASV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAuB3B"}
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../base-command");
5
- const instance_client_factory_1 = require("../../lib/instance-client-factory");
6
- class ExecScroll extends base_command_1.BaseCommand {
7
- async run() {
8
- const { args, flags } = await this.parse(ExecScroll);
9
- this.setParsedFlags(flags);
10
- await this.withAuth(async () => {
11
- const id = this.resolveId(flags.id);
12
- if ((0, instance_client_factory_1.hasActiveSession)(id)) {
13
- await (0, instance_client_factory_1.sendSessionCommand)(id, 'scroll', [args.direction, flags.amount]);
14
- }
15
- else {
16
- const { type, client, disconnect } = await (0, instance_client_factory_1.getInstanceClient)(this.client, id);
17
- try {
18
- if (type === 'ios') {
19
- await client.scroll(args.direction, flags.amount);
20
- }
21
- else {
22
- await client.scrollScreen(args.direction, flags.amount);
23
- }
24
- }
25
- finally {
26
- disconnect();
27
- }
28
- }
29
- this.log(`Scrolled ${args.direction}`);
30
- });
31
- }
32
- }
33
- ExecScroll.summary = 'Scroll on a running instance';
34
- ExecScroll.description = 'Scroll the current screen on a running iOS or Android instance. The amount uses pixels on iOS and the Android client scroll units on Android.';
35
- ExecScroll.examples = [
36
- '<%= config.bin %> ios scroll down --amount 500',
37
- '<%= config.bin %> ios scroll down --amount 500 --id <instance-ID>',
38
- '<%= config.bin %> android scroll up --amount 300',
39
- ];
40
- ExecScroll.args = {
41
- direction: core_1.Args.string({
42
- description: 'Scroll direction to apply',
43
- required: true,
44
- options: ['up', 'down', 'left', 'right'],
45
- }),
46
- };
47
- ExecScroll.flags = {
48
- ...base_command_1.BaseCommand.baseFlags,
49
- id: core_1.Flags.string({
50
- description: 'Instance ID to target. Defaults to the last created instance of the command alias type.',
51
- }),
52
- amount: core_1.Flags.integer({
53
- description: 'Scroll amount. Uses pixels on iOS and Android scroll units on Android.',
54
- default: 300,
55
- }),
56
- };
57
- exports.default = ExecScroll;
58
- //# sourceMappingURL=scroll.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scroll.js","sourceRoot":"","sources":["../../../src/commands/exec/scroll.ts"],"names":[],"mappings":";;AAAA,sCAA0C;AAC1C,qDAAiD;AACjD,+EAA4G;AAE5G,MAAqB,UAAW,SAAQ,0BAAW;IA6BjD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACrD,IAAI,CAAC,cAAc,CAAC,KAA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AAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;KACzC,CAAC;CACH,CAAC;AAEK,gBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,EAAE,EAAE,YAAK,CAAC,MAAM,CAAC;QACf,WAAW,EAAE,yFAAyF;KACvG,CAAC;IACF,MAAM,EAAE,YAAK,CAAC,OAAO,CAAC;QACpB,WAAW,EAAE,wEAAwE;QACrF,OAAO,EAAE,GAAG;KACb,CAAC;CACH,CAAC;kBA3BiB,UAAU"}
@@ -1,19 +0,0 @@
1
- import { BaseCommand } from '../../base-command';
2
- export default class ExecTapElement extends BaseCommand {
3
- static summary: string;
4
- static description: string;
5
- static examples: string[];
6
- static args: {};
7
- static flags: {
8
- id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
- label: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
- 'accessibility-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
- 'resource-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
- text: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
- 'api-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
- json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
- quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
- };
17
- run(): Promise<void>;
18
- }
19
- //# sourceMappingURL=tap-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tap-element.d.ts","sourceRoot":"","sources":["../../../src/commands/exec/tap-element.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,MAAM,CAAC,OAAO,SAA8C;IAC5D,MAAM,CAAC,WAAW,SAC2K;IAC7L,MAAM,CAAC,QAAQ,WAKb;IAEF,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,KAAK;;;;;;;;;MAiBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAgD3B"}
@@ -1,102 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../base-command");
5
- const instance_client_factory_1 = require("../../lib/instance-client-factory");
6
- class ExecTapElement extends base_command_1.BaseCommand {
7
- async run() {
8
- const { flags } = await this.parse(ExecTapElement);
9
- this.setParsedFlags(flags);
10
- await this.withAuth(async () => {
11
- const id = this.resolveId(flags.id);
12
- const type = id.split('_')[0];
13
- if ((0, instance_client_factory_1.hasActiveSession)(id)) {
14
- const selector = {};
15
- if (type === 'ios') {
16
- if (flags.label)
17
- selector.label = flags.label;
18
- if (flags['accessibility-id'])
19
- selector.accessibilityId = flags['accessibility-id'];
20
- }
21
- else {
22
- if (flags.label)
23
- selector.contentDesc = flags.label;
24
- if (flags['resource-id'])
25
- selector.resourceId = flags['resource-id'];
26
- if (flags.text)
27
- selector.text = flags.text;
28
- if (flags['accessibility-id'])
29
- selector.resourceId = flags['accessibility-id'];
30
- }
31
- const result = await (0, instance_client_factory_1.sendSessionCommand)(id, 'tap-element', [selector]);
32
- if (flags.json)
33
- this.outputJson(result);
34
- else
35
- this.log('Element tapped');
36
- }
37
- else {
38
- const { type, client, disconnect } = await (0, instance_client_factory_1.getInstanceClient)(this.client, id);
39
- try {
40
- if (type === 'ios') {
41
- const selector = {};
42
- if (flags.label)
43
- selector.label = flags.label;
44
- if (flags['accessibility-id'])
45
- selector.accessibilityId = flags['accessibility-id'];
46
- const result = await client.tapElement(selector);
47
- if (flags.json)
48
- this.outputJson(result);
49
- else
50
- this.log('Element tapped');
51
- }
52
- else {
53
- const selector = {};
54
- if (flags.label)
55
- selector.contentDesc = flags.label;
56
- if (flags['resource-id'])
57
- selector.resourceId = flags['resource-id'];
58
- if (flags.text)
59
- selector.text = flags.text;
60
- if (flags['accessibility-id'])
61
- selector.resourceId = flags['accessibility-id'];
62
- const result = await client.tap({ selector });
63
- if (flags.json)
64
- this.outputJson(result);
65
- else
66
- this.log('Element tapped');
67
- }
68
- }
69
- finally {
70
- disconnect();
71
- }
72
- }
73
- });
74
- }
75
- }
76
- ExecTapElement.summary = 'Tap an element by accessibility selector';
77
- ExecTapElement.description = 'Find an element on the current screen and tap it using accessibility metadata. The selector fields differ slightly by platform, so choose the flags that match the target instance type.';
78
- ExecTapElement.examples = [
79
- '<%= config.bin %> ios tap-element --label "Submit"',
80
- '<%= config.bin %> ios tap-element --accessibility-id login_button --id <instance-ID>',
81
- '<%= config.bin %> android tap-element --accessibility-id btn_ok --id <instance-ID>',
82
- '<%= config.bin %> android tap-element --resource-id com.example:id/submit',
83
- ];
84
- ExecTapElement.args = {};
85
- ExecTapElement.flags = {
86
- ...base_command_1.BaseCommand.baseFlags,
87
- id: core_1.Flags.string({
88
- description: 'Instance ID to target. Defaults to the last created instance of the command alias type.',
89
- }),
90
- label: core_1.Flags.string({
91
- description: 'Visible accessibility label to match. Works as AXLabel on iOS and content description on Android.',
92
- }),
93
- 'accessibility-id': core_1.Flags.string({
94
- description: 'Accessibility identifier to match. Maps to accessibilityId on iOS and resource ID matching on Android.',
95
- }),
96
- 'resource-id': core_1.Flags.string({
97
- description: 'Android resource ID to match, such as com.example:id/submit',
98
- }),
99
- text: core_1.Flags.string({ description: 'Android visible text to match exactly' }),
100
- };
101
- exports.default = ExecTapElement;
102
- //# sourceMappingURL=tap-element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tap-element.js","sourceRoot":"","sources":["../../../src/commands/exec/tap-element.ts"],"names":[],"mappings":";;AAAA,sCAAoC;AACpC,qDAAiD;AACjD,+EA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AAQ,CAAC,UAAU,GAAG,KAAK,CAAC,kBAAkB,CAAC,CAAC;wBAC/E,MAAM,MAAM,GAAG,MAAO,MAAc,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;wBACvD,IAAI,KAAK,CAAC,IAAI;4BAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;;4BACnC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;oBAClC,CAAC;gBACH,CAAC;wBAAS,CAAC;oBACT,UAAU,EAAE,CAAC;gBACf,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AA9EM,sBAAO,GAAG,0CAA0C,CAAC;AACrD,0BAAW,GAChB,0LAA0L,CAAC;AACtL,uBAAQ,GAAG;IAChB,oDAAoD;IACpD,sFAAsF;IACtF,oFAAoF;IACpF,2EAA2E;CAC5E,CAAC;AAEK,mBAAI,GAAG,EAAE,CAAC;AAEV,oBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,EAAE,EAAE,YAAK,CAAC,MAAM,CAAC;QACf,WAAW,EAAE,yFAAyF;KACvG,CAAC;IACF,KAAK,EAAE,YAAK,CAAC,MAAM,CAAC;QAClB,WAAW,EACT,mGAAmG;KACtG,CAAC;IACF,kBAAkB,EAAE,YAAK,CAAC,MAAM,CAAC;QAC/B,WAAW,EACT,wGAAwG;KAC3G,CAAC;IACF,aAAa,EAAE,YAAK,CAAC,MAAM,CAAC;QAC1B,WAAW,EAAE,6DAA6D;KAC3E,CAAC;IACF,IAAI,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;CAC7E,CAAC;kBA9BiB,cAAc"}
@@ -1,24 +0,0 @@
1
- import { BaseCommand } from '../../base-command';
2
- export default class ExecTap extends BaseCommand {
3
- static summary: string;
4
- static description: string;
5
- static examples: string[];
6
- static args: {
7
- x: import("@oclif/core/lib/interfaces").Arg<number, {
8
- max?: number;
9
- min?: number;
10
- }>;
11
- y: import("@oclif/core/lib/interfaces").Arg<number, {
12
- max?: number;
13
- min?: number;
14
- }>;
15
- };
16
- static flags: {
17
- id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
18
- 'api-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
- json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
20
- quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
21
- };
22
- run(): Promise<void>;
23
- }
24
- //# sourceMappingURL=tap.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tap.d.ts","sourceRoot":"","sources":["../../../src/commands/exec/tap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,WAAW;IAC9C,MAAM,CAAC,OAAO,SAA8C;IAC5D,MAAM,CAAC,WAAW,SAC6J;IAC/K,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,IAAI;;;;;;;;;MAST;IAEF,MAAM,CAAC,KAAK;;;;;MAKV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAuB3B"}
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../base-command");
5
- const instance_client_factory_1 = require("../../lib/instance-client-factory");
6
- class ExecTap extends base_command_1.BaseCommand {
7
- async run() {
8
- const { args, flags } = await this.parse(ExecTap);
9
- this.setParsedFlags(flags);
10
- await this.withAuth(async () => {
11
- const id = this.resolveId(flags.id);
12
- if ((0, instance_client_factory_1.hasActiveSession)(id)) {
13
- await (0, instance_client_factory_1.sendSessionCommand)(id, 'tap', [args.x, args.y]);
14
- }
15
- else {
16
- const { type, client, disconnect } = await (0, instance_client_factory_1.getInstanceClient)(this.client, id);
17
- try {
18
- if (type === 'ios') {
19
- await client.tap(args.x, args.y);
20
- }
21
- else {
22
- await client.tap({ x: args.x, y: args.y });
23
- }
24
- }
25
- finally {
26
- disconnect();
27
- }
28
- }
29
- this.log(`Tapped at (${args.x}, ${args.y})`);
30
- });
31
- }
32
- }
33
- ExecTap.summary = 'Tap at coordinates on a running instance';
34
- ExecTap.description = 'Tap a specific coordinate on the current screen of a running iOS or Android instance. Use this when element selectors are unavailable or when automating canvas-style UIs.';
35
- ExecTap.examples = [
36
- '<%= config.bin %> ios tap 100 200',
37
- '<%= config.bin %> ios tap 100 200 --id <instance-ID>',
38
- '<%= config.bin %> android tap 540 1200',
39
- ];
40
- ExecTap.args = {
41
- x: core_1.Args.integer({
42
- description: 'X coordinate in screen points or pixels for the current device view',
43
- required: true,
44
- }),
45
- y: core_1.Args.integer({
46
- description: 'Y coordinate in screen points or pixels for the current device view',
47
- required: true,
48
- }),
49
- };
50
- ExecTap.flags = {
51
- ...base_command_1.BaseCommand.baseFlags,
52
- id: core_1.Flags.string({
53
- description: 'Instance ID to target. Defaults to the last created instance of the command alias type.',
54
- }),
55
- };
56
- exports.default = ExecTap;
57
- //# sourceMappingURL=tap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../src/commands/exec/tap.ts"],"names":[],"mappings":";;AAAA,sCAA0C;AAC1C,qDAAiD;AACjD,+EAA4G;AAE5G,MAAqB,OAAQ,SAAQ,0BAAW;IA4B9C,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAE3B,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE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