lim 0.25.1 → 0.25.2

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.
@@ -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;;;MAUT;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;IAqChD,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;YAE3D,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,8CAAoB,EAAC,IAAI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,CAAC;IACL,CAAC;;AAzEM,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,EAAE,gGAAgG;QAC7G,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;kBAnCiB,SAAS"}
@@ -0,0 +1,8 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class Version extends Command {
3
+ static summary: string;
4
+ static description: string;
5
+ static examples: string[];
6
+ run(): Promise<void>;
7
+ }
8
+ //# sourceMappingURL=version.d.ts.map
@@ -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.25.1",
3
+ "version": "0.25.2",
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.3",
28
+ "@limrun/api": "0.46.5",
29
29
  "@oclif/core": "^4",
30
30
  "cli-progress": "^3.12.0",
31
31
  "cli-table3": "^0.6.5",