@mablhq/mabl-cli 2.34.5 → 2.34.10

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.
@@ -5,6 +5,7 @@ const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
5
5
  const exportRequestProvider_1 = require("../../../providers/exportRequestProvider");
6
6
  const util_1 = require("../../commandUtil/util");
7
7
  const mablApi_1 = require("../../../mablApi");
8
+ const typesAllFlag = 'all';
8
9
  exports.command = `export <id> [options]`;
9
10
  exports.describe = 'Export test run images';
10
11
  exports.builder = (yargs) => {
@@ -25,15 +26,26 @@ exports.builder = (yargs) => {
25
26
  type: 'array',
26
27
  default: [mablApi_1.ExportRequest.TargetContentEnum.Screenshots.toString()],
27
28
  choices: [
29
+ typesAllFlag,
28
30
  mablApi_1.ExportRequest.TargetContentEnum.Screenshots,
29
31
  mablApi_1.ExportRequest.TargetContentEnum.ConsoleLogs,
30
32
  mablApi_1.ExportRequest.TargetContentEnum.Doms,
31
33
  mablApi_1.ExportRequest.TargetContentEnum.Hars,
32
34
  mablApi_1.ExportRequest.TargetContentEnum.Traces,
33
35
  ],
36
+ coerce: (arg) => arg.includes(typesAllFlag)
37
+ ? [
38
+ mablApi_1.ExportRequest.TargetContentEnum.ConsoleLogs,
39
+ mablApi_1.ExportRequest.TargetContentEnum.Screenshots,
40
+ mablApi_1.ExportRequest.TargetContentEnum.Doms,
41
+ mablApi_1.ExportRequest.TargetContentEnum.Traces,
42
+ mablApi_1.ExportRequest.TargetContentEnum.Hars,
43
+ ]
44
+ : arg,
34
45
  })
35
46
  .example('$0 test-runs export <id>', 'export test run screenshots to file')
36
- .example('$0 test-runs export <id> --type screenshots doms', 'export test run screenshots and doms to file')
47
+ .example('$0 test-runs export <id> --types screenshots doms', 'export test run screenshots and doms to file')
48
+ .example('$0 test-runs export <id> --types all', 'export test run all types to file')
37
49
  .check((argv) => {
38
50
  (0, util_1.validateArrayInputs)(argv[constants_1.CommandArgContentTypes], 'export types must be SPACE delimited, e.g. "--types=screenshots doms"');
39
51
  return true;