lim 0.19.2 → 0.19.3

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
@@ -243,7 +243,9 @@ lim ios open-url myapp://settings
243
243
  lim ios simctl -- listapps booted
244
244
  lim ios xcrun -- --sdk iphonesimulator --show-sdk-version
245
245
  lim ios xcodebuild -- -version
246
- lim ios cp payload.json ./fixtures/payload.json
246
+ lim ios push-file ./fixtures/payload.json payload.json
247
+ lim ios pull-file documents/photo.jpeg ./photo.jpeg --bundle-id com.example.app --container-type data
248
+ lim ios delete-file documents/photo.jpeg --bundle-id com.example.app --container-type data
247
249
  lim ios lsof
248
250
  ```
249
251
 
@@ -1,14 +1,15 @@
1
1
  import { BaseCommand } from '../../base-command';
2
- export default class IosCp extends BaseCommand {
2
+ export default class IosDeleteFile extends BaseCommand {
3
3
  static summary: string;
4
4
  static description: string;
5
5
  static examples: string[];
6
6
  static args: {
7
7
  name: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
- path: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
9
8
  };
10
9
  static flags: {
11
10
  id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ 'bundle-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ 'container-type': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
13
  'api-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
14
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
15
  quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -17,4 +18,4 @@ export default class IosCp extends BaseCommand {
17
18
  };
18
19
  run(): Promise<void>;
19
20
  }
20
- //# sourceMappingURL=cp.d.ts.map
21
+ //# sourceMappingURL=delete-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-file.d.ts","sourceRoot":"","sources":["../../../src/commands/ios/delete-file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IACpD,MAAM,CAAC,OAAO,SAAkD;IAChE,MAAM,CAAC,WAAW,SAE0E;IAC5F,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,IAAI;;MAMT;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAaV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyB3B"}
@@ -0,0 +1,57 @@
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 IosDeleteFile extends base_command_1.BaseCommand {
7
+ async run() {
8
+ const { args, flags } = await this.parse(IosDeleteFile);
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.deleteFile(args.name, flags['bundle-id'] ?
15
+ { bundleId: flags['bundle-id'], containerType: flags['container-type'] }
16
+ : undefined);
17
+ if (flags.json) {
18
+ this.outputJson({ deleted: args.name });
19
+ }
20
+ else {
21
+ this.output(`Deleted ${args.name}`);
22
+ }
23
+ }
24
+ finally {
25
+ disconnect();
26
+ }
27
+ });
28
+ }
29
+ }
30
+ IosDeleteFile.summary = 'Delete a file or folder on the iOS simulator';
31
+ IosDeleteFile.description = 'Delete a file (or folder, recursively) from the simulator sandbox. ' +
32
+ 'With --bundle-id, the remote path is a relative path inside that app container instead.';
33
+ IosDeleteFile.examples = [
34
+ '<%= config.bin %> ios delete-file test.txt',
35
+ '<%= config.bin %> ios delete-file documents/photo.jpeg --bundle-id com.example.app --container-type data',
36
+ ];
37
+ IosDeleteFile.args = {
38
+ name: core_1.Args.string({
39
+ description: 'Remote filename in the simulator sandbox, or a relative path inside the app container when --bundle-id is provided.',
40
+ required: true,
41
+ }),
42
+ };
43
+ IosDeleteFile.flags = {
44
+ ...base_command_1.BaseCommand.baseFlags,
45
+ id: core_1.Flags.string({
46
+ description: 'iOS instance ID to target. Defaults to the last created iOS instance.',
47
+ }),
48
+ 'bundle-id': core_1.Flags.string({
49
+ description: 'Bundle ID of the installed app whose container should be modified.',
50
+ }),
51
+ 'container-type': core_1.Flags.string({
52
+ description: "Container to target when --bundle-id is provided: 'app', 'data', or a specific App Group identifier. Defaults to 'app'.",
53
+ dependsOn: ['bundle-id'],
54
+ }),
55
+ };
56
+ exports.default = IosDeleteFile;
57
+ //# sourceMappingURL=delete-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-file.js","sourceRoot":"","sources":["../../../src/commands/ios/delete-file.ts"],"names":[],"mappings":";;AAAA,sCAA0C;AAC1C,qDAAiD;AACjD,+EAAyE;AAEzE,MAAqB,aAAc,SAAQ,0BAAW;IAiCpD,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;YAE3D,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,8CAAoB,EAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YACzF,IAAI,CAAC;gBACH,MAAM,MAAM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
2
+ export default class IosPullFile extends BaseCommand {
3
+ static summary: string;
4
+ static description: string;
5
+ static examples: string[];
6
+ static args: {
7
+ name: 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
+ 'bundle-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ 'container-type': 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
+ create: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ };
20
+ run(): Promise<void>;
21
+ }
22
+ //# sourceMappingURL=pull-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pull-file.d.ts","sourceRoot":"","sources":["../../../src/commands/ios/pull-file.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IAClD,MAAM,CAAC,OAAO,SAAwC;IACtD,MAAM,CAAC,WAAW,SAE0E;IAC5F,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,IAAI;;;MAWT;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAaV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA4B3B"}
@@ -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 IosPullFile extends base_command_1.BaseCommand {
12
+ async run() {
13
+ const { args, flags } = await this.parse(IosPullFile);
14
+ this.setParsedFlags(flags);
15
+ await this.withAuth(async () => {
16
+ const resolvedInstance = this.resolveIosInstance(flags.id);
17
+ const localPath = path_1.default.resolve(args.path ?? path_1.default.basename(args.name));
18
+ const { client, disconnect } = await (0, instance_client_factory_1.getIosInstanceClient)(this.client, resolvedInstance);
19
+ try {
20
+ const content = await client.pullFile(args.name, flags['bundle-id'] ?
21
+ { bundleId: flags['bundle-id'], containerType: flags['container-type'] }
22
+ : undefined);
23
+ fs_1.default.writeFileSync(localPath, content);
24
+ if (flags.json) {
25
+ this.outputJson({ localPath, bytes: content.length });
26
+ }
27
+ else {
28
+ this.output(localPath);
29
+ }
30
+ }
31
+ finally {
32
+ disconnect();
33
+ }
34
+ });
35
+ }
36
+ }
37
+ IosPullFile.summary = 'Pull a file from the iOS simulator';
38
+ IosPullFile.description = 'Download a file from the simulator sandbox and save it locally. ' +
39
+ 'With --bundle-id, the remote path is a relative path inside that app container instead.';
40
+ IosPullFile.examples = [
41
+ '<%= config.bin %> ios pull-file test.txt',
42
+ '<%= config.bin %> ios pull-file documents/photo.jpeg ./photo.jpeg --bundle-id com.example.app --container-type data',
43
+ '<%= config.bin %> ios pull-file test.txt ./downloaded.txt --json',
44
+ ];
45
+ IosPullFile.args = {
46
+ name: core_1.Args.string({
47
+ description: 'Remote filename in the simulator sandbox, or a relative path inside the app container when --bundle-id is provided.',
48
+ required: true,
49
+ }),
50
+ path: core_1.Args.string({
51
+ description: 'Local path to save the file to. Defaults to the remote filename in the current directory.',
52
+ required: false,
53
+ }),
54
+ };
55
+ IosPullFile.flags = {
56
+ ...base_command_1.BaseCommand.baseFlags,
57
+ id: core_1.Flags.string({
58
+ description: 'iOS instance ID to target. Defaults to the last created iOS instance.',
59
+ }),
60
+ 'bundle-id': core_1.Flags.string({
61
+ description: 'Bundle ID of the installed app whose container should be read.',
62
+ }),
63
+ 'container-type': core_1.Flags.string({
64
+ description: "Container to target when --bundle-id is provided: 'app', 'data', or a specific App Group identifier. Defaults to 'app'.",
65
+ dependsOn: ['bundle-id'],
66
+ }),
67
+ };
68
+ exports.default = IosPullFile;
69
+ //# sourceMappingURL=pull-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pull-file.js","sourceRoot":"","sources":["../../../src/commands/ios/pull-file.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,sCAA0C;AAC1C,qDAAiD;AACjD,+EAAyE;AAEzE,MAAqB,WAAY,SAAQ,0BAAW;IAuClD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACtD,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,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,cAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAEtE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,8CAAoB,EAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YACzF,IAAI,CAAC;gBACH,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CAAC;IACF,gBAAgB,EAAE,YAAK,CAAC,MAAM,CAAC;QAC7B,WAAW,EACT,yHAAyH;QAC3H,SAAS,EAAE,CAAC,WAAW,CAAC;KACzB,CAAC;CACH,CAAC;kBArCiB,WAAW"}
@@ -0,0 +1,22 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ export default class IosPushFile 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
+ destination: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
9
+ };
10
+ static flags: {
11
+ id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ 'bundle-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ 'container-type': 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
+ create: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ };
20
+ run(): Promise<void>;
21
+ }
22
+ //# sourceMappingURL=push-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push-file.d.ts","sourceRoot":"","sources":["../../../src/commands/ios/push-file.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IAClD,MAAM,CAAC,OAAO,SAA4C;IAC1D,MAAM,CAAC,WAAW,SAE2H;IAC7I,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,IAAI;;;MAUT;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAaV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA+B3B"}
@@ -0,0 +1,71 @@
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 IosPushFile extends base_command_1.BaseCommand {
12
+ async run() {
13
+ const { args, flags } = await this.parse(IosPushFile);
14
+ this.setParsedFlags(flags);
15
+ await this.withAuth(async () => {
16
+ const resolvedInstance = this.resolveIosInstance(flags.id);
17
+ const localPath = path_1.default.resolve(args.path);
18
+ if (!fs_1.default.existsSync(localPath)) {
19
+ this.error(`File not found: ${localPath}`);
20
+ }
21
+ const { client, disconnect } = await (0, instance_client_factory_1.getIosInstanceClient)(this.client, resolvedInstance);
22
+ try {
23
+ const remotePath = await client.pushFile(localPath, args.destination, flags['bundle-id'] ?
24
+ { bundleId: flags['bundle-id'], containerType: flags['container-type'] }
25
+ : undefined);
26
+ if (flags.json) {
27
+ this.outputJson({ remotePath });
28
+ }
29
+ else {
30
+ this.output(remotePath);
31
+ }
32
+ }
33
+ finally {
34
+ disconnect();
35
+ }
36
+ });
37
+ }
38
+ }
39
+ IosPushFile.summary = 'Push a local file to the iOS simulator';
40
+ IosPushFile.description = 'Upload a local file into the simulator sandbox and return the remote path that can be used by follow-up commands such as `ios simctl`. ' +
41
+ 'With --bundle-id, the destination is a relative path inside that app container instead (intermediate directories are created as needed).';
42
+ IosPushFile.examples = [
43
+ '<%= config.bin %> ios push-file ./fixtures/test.txt test.txt',
44
+ '<%= config.bin %> ios push-file ./photo.jpeg documents/photo.jpeg --bundle-id com.example.app --container-type data',
45
+ '<%= config.bin %> ios push-file ./payloads/input.json input.json --json',
46
+ ];
47
+ IosPushFile.args = {
48
+ path: core_1.Args.string({
49
+ description: 'Local file path to upload to the simulator.',
50
+ required: true,
51
+ }),
52
+ destination: core_1.Args.string({
53
+ description: 'Destination filename in the simulator sandbox, or a relative path inside the app container when --bundle-id is provided.',
54
+ required: true,
55
+ }),
56
+ };
57
+ IosPushFile.flags = {
58
+ ...base_command_1.BaseCommand.baseFlags,
59
+ id: core_1.Flags.string({
60
+ description: 'iOS instance ID to target. Defaults to the last created iOS instance.',
61
+ }),
62
+ 'bundle-id': core_1.Flags.string({
63
+ description: 'Bundle ID of the installed app whose container should receive the file.',
64
+ }),
65
+ 'container-type': core_1.Flags.string({
66
+ description: "Container to target when --bundle-id is provided: 'app', 'data', or a specific App Group identifier. Defaults to 'app'.",
67
+ dependsOn: ['bundle-id'],
68
+ }),
69
+ };
70
+ exports.default = IosPushFile;
71
+ //# sourceMappingURL=push-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push-file.js","sourceRoot":"","sources":["../../../src/commands/ios/push-file.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,sCAA0C;AAC1C,qDAAiD;AACjD,+EAAyE;AAEzE,MAAqB,WAAY,SAAQ,0BAAW;IAsClD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACtD,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,SAAS,GAAG,cAAI,CA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AC5H,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC;AAEK,iBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,EAAE,EAAE,YAAK,CAAC,MAAM,CAAC;QACf,WAAW,EAAE,uEAAuE;KACrF,CAAC;IACF,WAAW,EAAE,YAAK,CAAC,MAAM,CAAC;QACxB,WAAW,EAAE,yEAAyE;KACvF,CAAC;IACF,gBAAgB,EAAE,YAAK,CAAC,MAAM,CAAC;QAC7B,WAAW,EACT,yHAAyH;QAC3H,SAAS,EAAE,CAAC,WAAW,CAAC;KACzB,CAAC;CACH,CAAC;kBApCiB,WAAW"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lim",
3
- "version": "0.19.2",
3
+ "version": "0.19.3",
4
4
  "description": "Use remote XCode, 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.40.1",
28
+ "@limrun/api": "0.41.1",
29
29
  "@oclif/core": "^4",
30
30
  "cli-progress": "^3.12.0",
31
31
  "cli-table3": "^0.6.5",
@@ -1 +0,0 @@
1
- {"version":3,"file":"cp.d.ts","sourceRoot":"","sources":["../../../src/commands/ios/cp.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW;IAC5C,MAAM,CAAC,OAAO,SAA4C;IAC1D,MAAM,CAAC,WAAW,SACyH;IAC3I,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,IAAI;;;MAST;IAEF,MAAM,CAAC,KAAK;;;;;;;MAKV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA6B3B"}
@@ -1,64 +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 IosCp extends base_command_1.BaseCommand {
12
- async run() {
13
- const { args, flags } = await this.parse(IosCp);
14
- this.setParsedFlags(flags);
15
- await this.withAuth(async () => {
16
- const resolvedInstance = this.resolveIosInstance(flags.id);
17
- const id = resolvedInstance.id;
18
- if (false) {
19
- this.error('ios cp only supports iOS instances');
20
- }
21
- const localPath = path_1.default.resolve(args.path);
22
- if (!fs_1.default.existsSync(localPath)) {
23
- this.error(`File not found: ${localPath}`);
24
- }
25
- const { client, disconnect } = await (0, instance_client_factory_1.getIosInstanceClient)(this.client, resolvedInstance);
26
- try {
27
- const sandboxPath = await client.cp(args.name, localPath);
28
- if (flags.json) {
29
- this.outputJson({ sandboxPath });
30
- }
31
- else {
32
- this.output(sandboxPath);
33
- }
34
- }
35
- finally {
36
- disconnect();
37
- }
38
- });
39
- }
40
- }
41
- IosCp.summary = 'Copy a local file into the iOS sandbox';
42
- IosCp.description = 'Upload a local file into the simulator sandbox and return the remote path that can be used by follow-up commands such as `ios simctl`.';
43
- IosCp.examples = [
44
- '<%= config.bin %> ios cp test.txt ./fixtures/test.txt',
45
- '<%= config.bin %> ios cp input.json ./payloads/input.json --json',
46
- ];
47
- IosCp.args = {
48
- name: core_1.Args.string({
49
- description: 'Filename to use inside the simulator sandbox.',
50
- required: true,
51
- }),
52
- path: core_1.Args.string({
53
- description: 'Local file path to upload into the simulator sandbox.',
54
- required: true,
55
- }),
56
- };
57
- IosCp.flags = {
58
- ...base_command_1.BaseCommand.baseFlags,
59
- id: core_1.Flags.string({
60
- description: 'iOS instance ID to target. Defaults to the last created iOS instance.',
61
- }),
62
- };
63
- exports.default = Ios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