lim 0.28.5 → 0.28.6

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/README.md CHANGED
@@ -137,6 +137,7 @@ lim ios create # Create a new iOS instance
137
137
  lim ios list # List all ready iOS instances
138
138
  lim ios get <ID> # Get details of a specific instance
139
139
  lim ios delete <ID> # Delete an instance
140
+ lim ios attach-xcode # Attach an Xcode target to the simulator
140
141
  lim ios info # Get device info from a running instance
141
142
  ```
142
143
 
@@ -255,6 +256,20 @@ lim ios delete-file Documents/photo.jpeg --bundle-id com.example.app --container
255
256
  lim ios lsof
256
257
  ```
257
258
 
259
+ #### Xcode Attachment
260
+
261
+ Attach an existing Xcode target so future simulator builds are installed automatically:
262
+
263
+ ```bash
264
+ # Attach the last used Xcode target to the last used iOS simulator
265
+ lim ios attach-xcode
266
+
267
+ # Select the Xcode target and simulator explicitly
268
+ lim ios attach-xcode sandbox_def456 --id ios_abc123
269
+ ```
270
+
271
+ This is the iOS-oriented equivalent of `lim xcode attach-simulator ios_abc123 --id sandbox_def456`.
272
+
258
273
  #### App Management (iOS only)
259
274
 
260
275
  ```bash
@@ -1,17 +1,20 @@
1
1
  import { BaseCommand } from '../../base-command';
2
- export default class IosStopMicrophonePlayback extends BaseCommand {
2
+ export default class IosAttachXcode extends BaseCommand {
3
3
  static summary: string;
4
4
  static description: string;
5
5
  static examples: string[];
6
+ static args: {
7
+ xcodeId: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
8
+ };
6
9
  static flags: {
10
+ create: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
11
  id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
12
  'api-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
13
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
14
  quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
- create: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
15
  workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
16
  daemon: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
17
  };
15
18
  run(): Promise<void>;
16
19
  }
17
- //# sourceMappingURL=stop-microphone-playback.d.ts.map
20
+ //# sourceMappingURL=attach-xcode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attach-xcode.d.ts","sourceRoot":"","sources":["../../../src/commands/ios/attach-xcode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,MAAM,CAAC,OAAO,SAAkD;IAChE,MAAM,CAAC,WAAW,SAG0F;IAE5G,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,KAAK;;;;;;;;MAUV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA+B3B"}
@@ -0,0 +1,66 @@
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 config_1 = require("../../lib/config");
6
+ const simulator_attach_1 = require("../../lib/simulator-attach");
7
+ class IosAttachXcode extends base_command_1.BaseCommand {
8
+ async run() {
9
+ const { args, flags } = await this.parse(IosAttachXcode);
10
+ this.setParsedFlags(flags);
11
+ await this.withAuth(async () => {
12
+ const simulator = this.resolveIosInstance(flags.id);
13
+ const xcodeTarget = await this.resolveXcodeTarget(args.xcodeId);
14
+ const xcodeInstanceId = xcodeTarget.id;
15
+ const xcodeClient = await this.resolveXcodeClient(xcodeTarget);
16
+ let attachInput;
17
+ if (simulator.apiUrl && simulator.token) {
18
+ attachInput = { apiUrl: simulator.apiUrl, token: simulator.token };
19
+ }
20
+ else {
21
+ const instance = await this.client.iosInstances.get(simulator.id);
22
+ (0, config_1.registerCreatedInstance)(instance);
23
+ attachInput = instance;
24
+ }
25
+ this.info(`Attaching Xcode target ${xcodeInstanceId} to simulator ${simulator.id}...`);
26
+ const result = await xcodeClient.attachSimulator(attachInput);
27
+ if (flags.json) {
28
+ this.outputJson((0, simulator_attach_1.simulatorAttachJson)(simulator.id, xcodeInstanceId, result));
29
+ }
30
+ else if (this.isQuietEnabled()) {
31
+ this.output(xcodeInstanceId);
32
+ }
33
+ else {
34
+ this.output((0, simulator_attach_1.formatSimulatorAttachResult)(simulator.id, xcodeInstanceId, result));
35
+ }
36
+ });
37
+ }
38
+ }
39
+ IosAttachXcode.summary = 'Attach an Xcode instance to an iOS simulator';
40
+ IosAttachXcode.description = 'Attach an Xcode sandbox to an existing iOS simulator so future builds can auto-install on that simulator. ' +
41
+ 'When the Xcode target is omitted, the LIM_XCODE_INSTANCE_URL/LIM_XCODE_INSTANCE_TOKEN pair or the last used ' +
42
+ 'Xcode-capable target is attached; if the simulator credentials are known locally, no API key is needed.';
43
+ IosAttachXcode.examples = [
44
+ '<%= config.bin %> ios attach-xcode',
45
+ '<%= config.bin %> ios attach-xcode <xcode-instance-ID>',
46
+ '<%= config.bin %> ios attach-xcode <xcode-instance-ID> --id <ios-instance-ID>',
47
+ ];
48
+ IosAttachXcode.args = {
49
+ xcodeId: core_1.Args.string({
50
+ description: 'Xcode target to attach. Defaults to the environment-pinned or last used Xcode target.',
51
+ required: false,
52
+ }),
53
+ };
54
+ IosAttachXcode.flags = {
55
+ ...base_command_1.BaseCommand.baseFlags,
56
+ create: core_1.Flags.boolean({
57
+ hidden: true,
58
+ default: false,
59
+ allowNo: true,
60
+ }),
61
+ id: core_1.Flags.string({
62
+ description: 'iOS simulator instance ID to attach. Defaults to the last used iOS simulator.',
63
+ }),
64
+ };
65
+ exports.default = IosAttachXcode;
66
+ //# sourceMappingURL=attach-xcode.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F,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;YAE9D,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;gBACf,IAAI,CAAC,UAAU,CAAC,IAAA,sCAAmB,EAAC,SAAS,CAAC,EAAE,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;YAC9E,CAAC;iBAAM,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;gBACjC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YAC/B,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,MAAM,CAAC,IAAA,8CAA2B,EAAC,SAAS,CAAC,EAAE,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;YAClF,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AA7DM,sBAAO,GAAG,8CAA8C,CAAC;AACzD,0BAAW,GAChB,4GAA4G;IAC5G,8GAA8G;IAC9G,yGAAyG,CAAC;AAErG,uBAAQ,GAAG;IAChB,oCAAoC;IACpC,wDAAwD;IACxD,+EAA+E;CAChF,CAAC;AAEK,mBAAI,GAAG;IACZ,OAAO,EAAE,WAAI,CAAC,MAAM,CAAC;QACnB,WAAW,EAAE,uFAAuF;QACpG,QAAQ,EAAE,KAAK;KAChB,CAAC;CACH,CAAC;AAEK,oBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,MAAM,EAAE,YAAK,CAAC,OAAO,CAAC;QACpB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,IAAI;KACd,CAAC;IACF,EAAE,EAAE,YAAK,CAAC,MAAM,CAAC;QACf,WAAW,EAAE,+EAA+E;KAC7F,CAAC;CACH,CAAC;kBA9BiB,cAAc"}
@@ -1,10 +1,11 @@
1
1
  import { BaseCommand } from '../../base-command';
2
- export default class IosPlayOnMicrophone extends BaseCommand {
2
+ export default class IosMicrophone extends BaseCommand {
3
3
  static summary: string;
4
4
  static description: string;
5
5
  static examples: string[];
6
6
  static args: {
7
- path: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
7
+ action: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
+ path: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
8
9
  };
9
10
  static flags: {
10
11
  id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -18,4 +19,4 @@ export default class IosPlayOnMicrophone extends BaseCommand {
18
19
  };
19
20
  run(): Promise<void>;
20
21
  }
21
- //# sourceMappingURL=play-on-microphone.d.ts.map
22
+ //# sourceMappingURL=microphone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"microphone.d.ts","sourceRoot":"","sources":["../../../src/commands/ios/microphone.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IACpD,MAAM,CAAC,OAAO,SAAgE;IAC9E,MAAM,CAAC,WAAW,SAG6C;IAE/D,MAAM,CAAC,QAAQ,WAKb;IAEF,MAAM,CAAC,IAAI;;;MAUT;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MASV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA+C3B"}
@@ -0,0 +1,89 @@
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 IosMicrophone extends base_command_1.BaseCommand {
12
+ async run() {
13
+ const { args, flags } = await this.parse(IosMicrophone);
14
+ this.setParsedFlags(flags);
15
+ await this.withAuth(async () => {
16
+ const resolvedInstance = this.resolveIosInstance(flags.id);
17
+ const { client, disconnect } = await (0, instance_client_factory_1.getIosInstanceClient)(this.client, resolvedInstance);
18
+ try {
19
+ if (args.action === 'stop') {
20
+ await client.stopMicrophonePlayback();
21
+ if (flags.json) {
22
+ this.outputJson({ stopped: true });
23
+ }
24
+ else {
25
+ this.output('Stopped microphone playback');
26
+ }
27
+ return;
28
+ }
29
+ if (!args.path) {
30
+ this.error('The `play` action requires an audio file path.');
31
+ }
32
+ const localPath = path_1.default.resolve(args.path);
33
+ if (!fs_1.default.existsSync(localPath)) {
34
+ this.error(`File not found: ${localPath}`);
35
+ }
36
+ const stat = fs_1.default.statSync(localPath);
37
+ if (!stat.isFile()) {
38
+ this.error(`Path is not a file: ${localPath}`);
39
+ }
40
+ const remoteName = path_1.default.basename(localPath);
41
+ this.info(`Uploading ${remoteName}...`);
42
+ await client.pushFile(localPath, remoteName);
43
+ const result = await client.playOnMicrophone(remoteName, { once: flags.once });
44
+ if (flags.json) {
45
+ this.outputJson(result);
46
+ }
47
+ else {
48
+ this.output(`Playing ${remoteName} on microphone (duration=${result.duration}us, once=${result.once})`);
49
+ }
50
+ }
51
+ finally {
52
+ disconnect();
53
+ }
54
+ });
55
+ }
56
+ }
57
+ IosMicrophone.summary = 'Control the simulated microphone of a running iOS instance';
58
+ IosMicrophone.description = 'Upload a local audio file (WAV/MP3/M4A/AAC) and play it as mocked microphone input on a running iOS instance. ' +
59
+ 'Playback loops until stopped by default; use --once to play a single pass. ' +
60
+ 'Use the `stop` action to return the microphone to silence.';
61
+ IosMicrophone.examples = [
62
+ '<%= config.bin %> ios microphone play ./sample.wav',
63
+ '<%= config.bin %> ios microphone play ./sample.mp3 --once',
64
+ '<%= config.bin %> ios microphone play ./sample.wav --id <instance-ID>',
65
+ '<%= config.bin %> ios microphone stop',
66
+ ];
67
+ IosMicrophone.args = {
68
+ action: core_1.Args.string({
69
+ description: 'Microphone action: `play` plays an audio file and `stop` stops mocked input',
70
+ required: true,
71
+ options: ['play', 'stop'],
72
+ }),
73
+ path: core_1.Args.string({
74
+ description: 'Local audio file to play as microphone input (required for the `play` action)',
75
+ required: false,
76
+ }),
77
+ };
78
+ IosMicrophone.flags = {
79
+ ...base_command_1.BaseCommand.baseFlags,
80
+ id: core_1.Flags.string({
81
+ description: 'iOS instance ID to target. Defaults to the last created iOS instance.',
82
+ }),
83
+ once: core_1.Flags.boolean({
84
+ description: 'Play the audio file once instead of looping it',
85
+ default: false,
86
+ }),
87
+ };
88
+ exports.default = IosMicrophone;
89
+ //# sourceMappingURL=microphone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"microphone.js","sourceRoot":"","sources":["../../../src/commands/ios/microphone.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,sCAA0C;AAC1C,qDAAiD;AACjD,+EAAyE;AAEzE,MAAqB,aAAc,SAAQ,0BAAW;IAqCpD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACxD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAE3B,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,gBAAgB,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC3D,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,8CAAoB,EAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YACzF,IAAI,CAAC;gBACH,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;oBAC3B,MAAM,MAAM,CAAC,sBAAsB,EAAE,CAAC;oBACtC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;wBACf,IAAI,CAAC,UAAU,CAAC,EAA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AG,CAC3F,CAAC;gBACJ,CAAC;YACH,CAAC;oBAAS,CAAC;gBACT,UAAU,EAAE,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AAlFM,qBAAO,GAAG,4DAA4D,CAAC;AACvE,yBAAW,GAChB,gHAAgH;IAChH,6EAA6E;IAC7E,4DAA4D,CAAC;AAExD,sBAAQ,GAAG;IAChB,oDAAoD;IACpD,2DAA2D;IAC3D,uEAAuE;IACvE,uCAAuC;CACxC,CAAC;AAEK,kBAAI,GAAG;IACZ,MAAM,EAAE,WAAI,CAAC,MAAM,CAAC;QAClB,WAAW,EAAE,6EAA6E;QAC1F,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,+EAA+E;QAC5F,QAAQ,EAAE,KAAK;KAChB,CAAC;CACH,CAAC;AAEK,mBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,EAAE,EAAE,YAAK,CAAC,MAAM,CAAC;QACf,WAAW,EAAE,uEAAuE;KACrF,CAAC;IACF,IAAI,EAAE,YAAK,CAAC,OAAO,CAAC;QAClB,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,KAAK;KACf,CAAC;CACH,CAAC;kBAnCiB,aAAa"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lim",
3
- "version": "0.28.5",
3
+ "version": "0.28.6",
4
4
  "description": "Use remote XCode, Gradle, iOS Simulator, Android Emulator and more to build and test apps from Linux, Windows or macOS.",
5
5
  "bin": {
6
6
  "lim": "./bin/run.js"
@@ -66,7 +66,7 @@
66
66
  "description": "Build Android projects on cloud gradle sandboxes"
67
67
  },
68
68
  "ios": {
69
- "description": "Execute any task on remote iOS Simulators: create, list, get, delete, info, list-apps, launch-app, terminate-app, app-log, syslog, sync, screenshot, tap, tap-element, element-tree, type, press-key, toggle-keyboard, scroll, open-url, install-app, keychain, record, perform, ls, push-file, pull-file, delete-file, simctl, cp, xcrun, xcodebuild, lsof, reverse"
69
+ "description": "Execute any task on remote iOS Simulators: create, list, get, delete, attach-xcode, info, list-apps, launch-app, terminate-app, app-log, syslog, sync, screenshot, tap, tap-element, element-tree, type, press-key, toggle-keyboard, scroll, open-url, install-app, keychain, record, camera, microphone, perform, ls, push-file, pull-file, delete-file, simctl, cp, xcrun, xcodebuild, lsof, reverse"
70
70
  },
71
71
  "session": {
72
72
  "description": "Manage persistent background sessions for device interaction: start, status, stop. Sessions are used to execute commands on remote devices without the need to reconnect to the device after each command."
@@ -1 +0,0 @@
1
- {"version":3,"file":"play-on-microphone.d.ts","sourceRoot":"","sources":["../../../src/commands/ios/play-on-microphone.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,MAAM,CAAC,OAAO,SAA2E;IACzF,MAAM,CAAC,WAAW,SAEgG;IAElH,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MASV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkC3B"}
@@ -1,69 +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 IosPlayOnMicrophone extends base_command_1.BaseCommand {
12
- async run() {
13
- const { args, flags } = await this.parse(IosPlayOnMicrophone);
14
- this.setParsedFlags(flags);
15
- await this.withAuth(async () => {
16
- const localPath = path_1.default.resolve(args.path);
17
- if (!fs_1.default.existsSync(localPath)) {
18
- this.error(`File not found: ${localPath}`);
19
- }
20
- const stat = fs_1.default.statSync(localPath);
21
- if (!stat.isFile()) {
22
- this.error(`Path is not a file: ${localPath}`);
23
- }
24
- const resolvedInstance = this.resolveIosInstance(flags.id);
25
- const { client, disconnect } = await (0, instance_client_factory_1.getIosInstanceClient)(this.client, resolvedInstance);
26
- try {
27
- const remoteName = path_1.default.basename(localPath);
28
- this.info(`Uploading ${remoteName}...`);
29
- await client.pushFile(localPath, remoteName);
30
- const result = await client.playOnMicrophone(remoteName, { once: flags.once });
31
- if (flags.json) {
32
- this.outputJson(result);
33
- }
34
- else {
35
- this.output(`Playing ${remoteName} on microphone (duration=${result.duration}us, once=${result.once})`);
36
- }
37
- }
38
- finally {
39
- disconnect();
40
- }
41
- });
42
- }
43
- }
44
- IosPlayOnMicrophone.summary = 'Play a local audio file as microphone input on a running iOS instance';
45
- IosPlayOnMicrophone.description = 'Upload a local audio file (WAV/MP3/M4A/AAC) to the simulator, then play it as mocked microphone input. ' +
46
- 'Loops until stopped by default; use --once to play a single pass. Use `ios stop-microphone-playback` to stop.';
47
- IosPlayOnMicrophone.examples = [
48
- '<%= config.bin %> ios play-on-microphone ./sample.wav',
49
- '<%= config.bin %> ios play-on-microphone ./sample.mp3 --once',
50
- '<%= config.bin %> ios play-on-microphone ./sample.wav --id <instance-ID>',
51
- ];
52
- IosPlayOnMicrophone.args = {
53
- path: core_1.Args.string({
54
- description: 'Local audio file path to upload and play as microphone input',
55
- required: true,
56
- }),
57
- };
58
- IosPlayOnMicrophone.flags = {
59
- ...base_command_1.BaseCommand.baseFlags,
60
- id: core_1.Flags.string({
61
- description: 'iOS instance ID to target. Defaults to the last created iOS instance.',
62
- }),
63
- once: core_1.Flags.boolean({
64
- description: 'Play the audio file once instead of looping it',
65
- default: false,
66
- }),
67
- };
68
- exports.default = IosPlayOnMicrophone;
69
- //# sourceMappingURL=play-on-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C,MAAM,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;gBAC7C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;gBAE/E,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;oBACf,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;gBAC1B,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,MAAM,CACT,WAAW,UAAU,4BAA4B,MAAM,CAAC,QAAQ,YAAY,MAAM,CAAC,IAAI,GAAG,CAC3F,CAAC;gBACJ,CAAC;YACH,CAAC;oBAAS,CAAC;gBACT,UAAU,EAAE,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AA9DM,2BAAO,GAAG,uEAAuE,CAAC;AAClF,+BAAW,GAChB,yGAAyG;IACzG,+GAA+G,CAAC;AAE3G,4BAAQ,GAAG;IAChB,uDAAuD;IACvD,8DAA8D;IAC9D,0EAA0E;CAC3E,CAAC;AAEK,wBAAI,GAAG;IACZ,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,8DAA8D;QAC3E,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC;AAEK,yBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,EAAE,EAAE,YAAK,CAAC,MAAM,CAAC;QACf,WAAW,EAAE,uEAAuE;KACrF,CAAC;IACF,IAAI,EAAE,YAAK,CAAC,OAAO,CAAC;QAClB,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,KAAK;KACf,CAAC;CACH,CAAC;kBA5BiB,mBAAmB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stop-microphone-playback.d.ts","sourceRoot":"","sources":["../../../src/commands/ios/stop-microphone-playback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,WAAW;IAChE,MAAM,CAAC,OAAO,SAA+D;IAC7E,MAAM,CAAC,WAAW,SAC0E;IAE5F,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MAKV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAmB3B"}
@@ -1,41 +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 IosStopMicrophonePlayback extends base_command_1.BaseCommand {
7
- async run() {
8
- const { flags } = await this.parse(IosStopMicrophonePlayback);
9
- this.setParsedFlags(flags);
10
- await this.withAuth(async () => {
11
- const resolvedInstance = this.resolveIosInstance(flags.id);
12
- const { client, disconnect } = await (0, instance_client_factory_1.getIosInstanceClient)(this.client, resolvedInstance);
13
- try {
14
- await client.stopMicrophonePlayback();
15
- if (flags.json) {
16
- this.outputJson({ stopped: true });
17
- }
18
- else {
19
- this.output('Stopped microphone playback');
20
- }
21
- }
22
- finally {
23
- disconnect();
24
- }
25
- });
26
- }
27
- }
28
- IosStopMicrophonePlayback.summary = 'Stop mocked microphone playback on a running iOS instance';
29
- IosStopMicrophonePlayback.description = 'Stops audio started with `ios play-on-microphone`; the microphone goes back to silence.';
30
- IosStopMicrophonePlayback.examples = [
31
- '<%= config.bin %> ios stop-microphone-playback',
32
- '<%= config.bin %> ios stop-microphone-playback --id <instance-ID>',
33
- ];
34
- IosStopMicrophonePlayback.flags = {
35
- ...base_command_1.BaseCommand.baseFlags,
36
- id: core_1.Flags.string({
37
- description: 'iOS instance ID to target. Defaults to the last created iOS instance.',
38
- }),
39
- };
40
- exports.default = IosStopMicrophonePlayback;
41
- //# sourceMappingURL=stop-microphone-playback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stop-micro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