lim 0.25.1 → 0.26.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.
- package/dist/commands/ios/camera.d.ts +21 -0
- package/dist/commands/ios/camera.d.ts.map +1 -0
- package/dist/commands/ios/camera.js +83 -0
- package/dist/commands/ios/camera.js.map +1 -0
- package/dist/commands/ios/play-on-microphone.d.ts +20 -0
- package/dist/commands/ios/play-on-microphone.d.ts.map +1 -0
- package/dist/commands/ios/play-on-microphone.js +69 -0
- package/dist/commands/ios/play-on-microphone.js.map +1 -0
- package/dist/commands/ios/stop-microphone-playback.d.ts +16 -0
- package/dist/commands/ios/stop-microphone-playback.d.ts.map +1 -0
- package/dist/commands/ios/stop-microphone-playback.js +41 -0
- package/dist/commands/ios/stop-microphone-playback.js.map +1 -0
- package/dist/commands/version.d.ts +8 -0
- package/dist/commands/version.d.ts.map +1 -0
- package/dist/commands/version.js +13 -0
- package/dist/commands/version.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class IosCamera 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
|
+
path: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
9
|
+
};
|
|
10
|
+
static flags: {
|
|
11
|
+
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
loop: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
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
|
+
create: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=camera.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../../../src/commands/ios/camera.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW;IAChD,MAAM,CAAC,OAAO,SAA4D;IAC1E,MAAM,CAAC,WAAW,SAI+C;IACjE,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,IAAI;;;MAWT;IAEF,MAAM,CAAC,KAAK;;;;;;;;MAUV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAsC3B"}
|
|
@@ -0,0 +1,83 @@
|
|
|
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 IosCamera extends base_command_1.BaseCommand {
|
|
12
|
+
async run() {
|
|
13
|
+
const { args, flags } = await this.parse(IosCamera);
|
|
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 === 'clear') {
|
|
20
|
+
await client.clearCameraVideo();
|
|
21
|
+
if (flags.json) {
|
|
22
|
+
this.outputJson({ ok: true });
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.output('Camera restored to the default source.');
|
|
26
|
+
}
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (!args.path) {
|
|
30
|
+
this.error('The `play` action requires a video 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
|
+
await client.setCameraVideo(localPath, { loop: flags.loop });
|
|
37
|
+
if (flags.json) {
|
|
38
|
+
this.outputJson({ ok: true, loop: flags.loop });
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.output(`Playing ${localPath} as the camera${flags.loop ? ' on loop' : ' once'}.`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
disconnect();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
IosCamera.summary = 'Control the simulated camera of a running iOS instance';
|
|
51
|
+
IosCamera.description = 'Upload a local video file and play it as the camera feed of a running iOS instance, replacing the live browser camera. ' +
|
|
52
|
+
'Apps see the video through their regular AVCaptureSession pipeline. ' +
|
|
53
|
+
'By default the video loops; with --no-loop it plays once and the feed freezes on the last frame. ' +
|
|
54
|
+
'Use the `clear` action to restore the default camera source.';
|
|
55
|
+
IosCamera.examples = [
|
|
56
|
+
'<%= config.bin %> ios camera play ./fixtures/qr-scan.mp4',
|
|
57
|
+
'<%= config.bin %> ios camera play ./clip.mp4 --no-loop --id <instance-ID>',
|
|
58
|
+
'<%= config.bin %> ios camera clear',
|
|
59
|
+
];
|
|
60
|
+
IosCamera.args = {
|
|
61
|
+
action: core_1.Args.string({
|
|
62
|
+
description: 'Camera action: `play` plays a video file as the camera and `clear` restores the default camera',
|
|
63
|
+
required: true,
|
|
64
|
+
options: ['play', 'clear'],
|
|
65
|
+
}),
|
|
66
|
+
path: core_1.Args.string({
|
|
67
|
+
description: 'Local video file to play as the camera (required for the `play` action).',
|
|
68
|
+
required: false,
|
|
69
|
+
}),
|
|
70
|
+
};
|
|
71
|
+
IosCamera.flags = {
|
|
72
|
+
...base_command_1.BaseCommand.baseFlags,
|
|
73
|
+
id: core_1.Flags.string({
|
|
74
|
+
description: 'iOS instance ID to target. Defaults to the last created iOS instance.',
|
|
75
|
+
}),
|
|
76
|
+
loop: core_1.Flags.boolean({
|
|
77
|
+
description: 'Restart the video when it ends. Use --no-loop to play once and freeze on the last frame.',
|
|
78
|
+
default: true,
|
|
79
|
+
allowNo: true,
|
|
80
|
+
}),
|
|
81
|
+
};
|
|
82
|
+
exports.default = IosCamera;
|
|
83
|
+
//# sourceMappingURL=camera.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera.js","sourceRoot":"","sources":["../../../src/commands/ios/camera.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,sCAA0C;AAC1C,qDAAiD;AACjD,+EAAyE;AAEzE,MAAqB,SAAU,SAAQ,0BAAW;IAsChD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpD,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;YAE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C;YACH,CAAC;oBAAS,CAAC;gBACT,UAAU,EAAE,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AA1EM,iBAAO,GAAG,wDAAwD,CAAC;AACnE,qBAAW,GAChB,yHAAyH;IACzH,sEAAsE;IACtE,mGAAmG;IACnG,8DAA8D,CAAC;AAC1D,kBAAQ,GAAG;IAChB,0DAA0D;IAC1D,2EAA2E;IAC3E,oCAAoC;CACrC,CAAC;AAEK,cAAI,GAAG;IACZ,MAAM,EAAE,WAAI,CAAC,MAAM,CAAC;QAClB,WAAW,EACT,gGAAgG;QAClG,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;KAC3B,CAAC;IACF,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,0EAA0E;QACvF,QAAQ,EAAE,KAAK;KAChB,CAAC;CACH,CAAC;AAEK,eAAK,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,0FAA0F;QACvG,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;KACd,CAAC;CACH,CAAC;kBApCiB,SAAS"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class IosPlayOnMicrophone extends BaseCommand {
|
|
3
|
+
static summary: string;
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static args: {
|
|
7
|
+
path: 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
|
+
once: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
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
|
+
create: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=play-on-microphone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,69 @@
|
|
|
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-microphone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"play-on-microphone.js","sourceRoot":"","sources":["../../../src/commands/ios/play-on-microphone.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,sCAA0C;AAC1C,qDAAiD;AACjD,+EAAyE;AAEzE,MAAqB,mBAAoB,SAAQ,0BAAW;IA8B1D,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC9D,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAE3B,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1C,IAAI,CAAC,YAAE,CAAC,UAAU,C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W,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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class IosStopMicrophonePlayback extends BaseCommand {
|
|
3
|
+
static summary: string;
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
'api-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
create: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=stop-microphone-playback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop-microphone-playback.js","sourceRoot":"","sources":["../../../src/commands/ios/stop-microphone-playback.ts"],"names":[],"mappings":";;AAAA,sCAAoC;AACpC,qDAAiD;AACjD,+EAAyE;AAEzE,MAAqB,yBAA0B,SAAQ,0BAAW;IAiBhE,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC9D,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,MAAM,MAAM,CAAC,sBAAsB,EAAE,CAAC;gBACtC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;oBACf,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;gBACrC,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,MAAM,CAAC,6BAA6B,CAAC,CAAC;gBAC7C,CAAC;YACH,CAAC;oBAAS,CAAC;gBACT,UAAU,EAAE,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AAlCM,iCAAO,GAAG,2DAA2D,CAAC;AACtE,qCAAW,GAChB,yFAAyF,CAAC;AAErF,kCAAQ,GAAG;IAChB,gDAAgD;IAChD,mEAAmE;CACpE,CAAC;AAEK,+BAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,EAAE,EAAE,YAAK,CAAC,MAAM,CAAC;QACf,WAAW,EAAE,uEAAuE;KACrF,CAAC;CACH,CAAC;kBAfiB,yBAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/commands/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,OAAO;IAC1C,MAAM,CAAC,OAAO,SAA0B;IACxC,MAAM,CAAC,WAAW,SAAiE;IACnF,MAAM,CAAC,QAAQ,WAAiC;IAE1C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAG3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
class Version extends core_1.Command {
|
|
5
|
+
async run() {
|
|
6
|
+
this.log(this.config.userAgent);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
Version.summary = 'Show the CLI version';
|
|
10
|
+
Version.description = 'Display the same version information as the --version flag.';
|
|
11
|
+
Version.examples = ['<%= config.bin %> version'];
|
|
12
|
+
exports.default = Version;
|
|
13
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/commands/version.ts"],"names":[],"mappings":";;AAAA,sCAAsC;AAEtC,MAAqB,OAAQ,SAAQ,cAAO;IAK1C,KAAK,CAAC,GAAG;QACP,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;;AANM,eAAO,GAAG,sBAAsB,CAAC;AACjC,mBAAW,GAAG,6DAA6D,CAAC;AAC5E,gBAAQ,GAAG,CAAC,2BAA2B,CAAC,CAAC;kBAH7B,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lim",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.1",
|
|
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"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test": "jest"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@limrun/api": "0.46.
|
|
28
|
+
"@limrun/api": "0.46.6",
|
|
29
29
|
"@oclif/core": "^4",
|
|
30
30
|
"cli-progress": "^3.12.0",
|
|
31
31
|
"cli-table3": "^0.6.5",
|