@devicecloud.dev/dcd 3.6.6 → 3.6.7
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/cloud.js +6 -0
- package/dist/constants.js +1 -1
- package/oclif.manifest.json +2 -2
- package/package.json +1 -1
package/dist/commands/cloud.js
CHANGED
|
@@ -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
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, ...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}`);
|
|
@@ -601,6 +603,10 @@ class Cloud extends core_1.Command {
|
|
|
601
603
|
this.log(`DEBUG: Error stack: ${error.stack}`);
|
|
602
604
|
}
|
|
603
605
|
if (error instanceof Error && error.message === 'RUN_FAILED') {
|
|
606
|
+
if (jsonFile) {
|
|
607
|
+
// mimic oclif's json functionality
|
|
608
|
+
this.exit(0);
|
|
609
|
+
}
|
|
604
610
|
this.exit(2);
|
|
605
611
|
}
|
|
606
612
|
else {
|
package/dist/constants.js
CHANGED
|
@@ -190,7 +190,7 @@ exports.flags = {
|
|
|
190
190
|
description: 'Output results in JSON format - note: will always provide exit code 0',
|
|
191
191
|
}),
|
|
192
192
|
'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',
|
|
193
|
+
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
194
|
required: false,
|
|
195
195
|
}),
|
|
196
196
|
};
|
package/oclif.manifest.json
CHANGED
|
@@ -356,7 +356,7 @@
|
|
|
356
356
|
"type": "option"
|
|
357
357
|
},
|
|
358
358
|
"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",
|
|
359
|
+
"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
360
|
"name": "json-file",
|
|
361
361
|
"required": false,
|
|
362
362
|
"allowNo": false,
|
|
@@ -520,5 +520,5 @@
|
|
|
520
520
|
]
|
|
521
521
|
}
|
|
522
522
|
},
|
|
523
|
-
"version": "3.6.
|
|
523
|
+
"version": "3.6.7"
|
|
524
524
|
}
|