@devicecloud.dev/dcd 3.6.6 → 3.6.8

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.
@@ -56,6 +56,8 @@ export default class Cloud extends Command {
56
56
  'ios-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
57
57
  'x86-arch': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
58
58
  'maestro-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
59
+ mitmHost: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
60
+ mitmPath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
59
61
  name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
60
62
  orientation: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
61
63
  quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -93,11 +93,13 @@ class Cloud extends core_1.Command {
93
93
  let output = null;
94
94
  // Store debug flag outside try/catch to access it in catch block
95
95
  let debugFlag = false;
96
+ let jsonFile = false;
96
97
  try {
97
98
  const { args, flags, raw } = await this.parse(Cloud);
98
- let { 'additional-app-binary-ids': nonFlatAdditionalAppBinaryIds, 'additional-app-files': nonFlatAdditionalAppFiles, 'android-api-level': androidApiLevel, 'android-device': androidDevice, apiKey: apiKeyFlag, apiUrl, 'app-binary-id': appBinaryId, 'app-file': appFile, 'artifacts-path': artifactsPath, async, config: configFile, debug, 'device-locale': deviceLocale, 'download-artifacts': downloadArtifacts, env, 'exclude-flows': excludeFlows, 'exclude-tags': excludeTags, flows, 'google-play': googlePlay, 'include-tags': includeTags, 'ignore-sha-check': ignoreShaCheck, 'ios-device': iOSDevice, 'ios-version': iOSVersion, 'maestro-version': maestroVersion, name, orientation, quiet, retry, report, 'runner-type': runnerType, 'x86-arch': x86Arch, json, ...rest } = flags;
99
+ let { 'additional-app-binary-ids': nonFlatAdditionalAppBinaryIds, 'additional-app-files': nonFlatAdditionalAppFiles, 'android-api-level': androidApiLevel, 'android-device': androidDevice, apiKey: apiKeyFlag, apiUrl, 'app-binary-id': appBinaryId, 'app-file': appFile, 'artifacts-path': artifactsPath, async, config: configFile, debug, 'device-locale': deviceLocale, 'download-artifacts': downloadArtifacts, env, 'exclude-flows': excludeFlows, 'exclude-tags': excludeTags, flows, 'google-play': googlePlay, 'include-tags': includeTags, 'ignore-sha-check': ignoreShaCheck, 'ios-device': iOSDevice, 'ios-version': iOSVersion, 'maestro-version': maestroVersion, name, orientation, quiet, retry, report, 'runner-type': runnerType, 'x86-arch': x86Arch, json, mitmHost, mitmPath, ...rest } = flags;
99
100
  // Store debug flag for use in catch block
100
101
  debugFlag = debug === true;
102
+ jsonFile = flags['json-file'] === true;
101
103
  if (debug) {
102
104
  this.log('DEBUG: Starting command execution with debug logging enabled');
103
105
  this.log(`DEBUG: CLI Version: ${this.config.version}`);
@@ -374,6 +376,8 @@ class Cloud extends core_1.Command {
374
376
  uploadedBinaryIds,
375
377
  version: this.config.version,
376
378
  skipChromeOnboarding: flags['skip-chrome-onboarding'],
379
+ mitmHost,
380
+ mitmPath,
377
381
  };
378
382
  if (finalAdditionalBinaryIds?.length > 0) {
379
383
  config.additionalAppBinaryIds = finalAdditionalBinaryIds;
@@ -601,6 +605,10 @@ class Cloud extends core_1.Command {
601
605
  this.log(`DEBUG: Error stack: ${error.stack}`);
602
606
  }
603
607
  if (error instanceof Error && error.message === 'RUN_FAILED') {
608
+ if (jsonFile) {
609
+ // mimic oclif's json functionality
610
+ this.exit(0);
611
+ }
604
612
  this.exit(2);
605
613
  }
606
614
  else {
@@ -26,6 +26,8 @@ export declare const flags: {
26
26
  'ios-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
27
27
  'x86-arch': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
28
28
  'maestro-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
29
+ mitmHost: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
30
+ mitmPath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
29
31
  name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
30
32
  orientation: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
31
33
  quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
package/dist/constants.js CHANGED
@@ -161,6 +161,13 @@ exports.flags = {
161
161
  '1.39.7',
162
162
  ],
163
163
  }),
164
+ mitmHost: core_1.Flags.string({
165
+ description: 'used for mitmproxy support, enterprise only, contact support if interested',
166
+ }),
167
+ mitmPath: core_1.Flags.string({
168
+ description: 'used for mitmproxy support, enterprise only, contact support if interested',
169
+ dependsOn: ['mitmHost'],
170
+ }),
164
171
  name: core_1.Flags.string({
165
172
  description: 'A custom name for your upload (useful for tagging commits etc)',
166
173
  }),
@@ -190,7 +197,7 @@ exports.flags = {
190
197
  description: 'Output results in JSON format - note: will always provide exit code 0',
191
198
  }),
192
199
  'json-file': core_1.Flags.boolean({
193
- description: 'Write JSON output to a file with name <run_name>_dcd.json or <upload_id>_dcd.json if no name is provided',
200
+ description: 'Write JSON output to a file with name <run_name>_dcd.json or <upload_id>_dcd.json if no name is provided - note: will always provide exit code 0',
194
201
  required: false,
195
202
  }),
196
203
  };
@@ -294,6 +294,23 @@
294
294
  ],
295
295
  "type": "option"
296
296
  },
297
+ "mitmHost": {
298
+ "description": "used for mitmproxy support, enterprise only, contact support if interested",
299
+ "name": "mitmHost",
300
+ "hasDynamicHelp": false,
301
+ "multiple": false,
302
+ "type": "option"
303
+ },
304
+ "mitmPath": {
305
+ "dependsOn": [
306
+ "mitmHost"
307
+ ],
308
+ "description": "used for mitmproxy support, enterprise only, contact support if interested",
309
+ "name": "mitmPath",
310
+ "hasDynamicHelp": false,
311
+ "multiple": false,
312
+ "type": "option"
313
+ },
297
314
  "name": {
298
315
  "description": "A custom name for your upload (useful for tagging commits etc)",
299
316
  "name": "name",
@@ -356,7 +373,7 @@
356
373
  "type": "option"
357
374
  },
358
375
  "json-file": {
359
- "description": "Write JSON output to a file with name <run_name>_dcd.json or <upload_id>_dcd.json if no name is provided",
376
+ "description": "Write JSON output to a file with name <run_name>_dcd.json or <upload_id>_dcd.json if no name is provided - note: will always provide exit code 0",
360
377
  "name": "json-file",
361
378
  "required": false,
362
379
  "allowNo": false,
@@ -520,5 +537,5 @@
520
537
  ]
521
538
  }
522
539
  },
523
- "version": "3.6.6"
540
+ "version": "3.6.8"
524
541
  }
package/package.json CHANGED
@@ -79,7 +79,7 @@
79
79
  "prepare": "yarn build",
80
80
  "version": "oclif readme && git add README.md"
81
81
  },
82
- "version": "3.6.6",
82
+ "version": "3.6.8",
83
83
  "bugs": {
84
84
  "url": "https://discord.gg/gm3mJwcNw8"
85
85
  },