@corellium/corellium-cli 1.3.7 → 1.3.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" ?>
2
2
  <!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
3
- <coverage lines-valid="0" lines-covered="0" line-rate="NaN" branches-valid="0" branches-covered="0" branch-rate="NaN" timestamp="1720469828523" complexity="0" version="0.1">
3
+ <coverage lines-valid="0" lines-covered="0" line-rate="NaN" branches-valid="0" branches-covered="0" branch-rate="NaN" timestamp="1729701253977" complexity="0" version="0.1">
4
4
  <sources>
5
5
  <source>/builds/middleware/corellium-cli</source>
6
6
  </sources>
@@ -86,7 +86,7 @@
86
86
  <div class='footer quiet pad2 space-top1 center small'>
87
87
  Code coverage generated by
88
88
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
89
- at 2024-07-08T20:17:08.530Z
89
+ at 2024-10-23T16:34:13.985Z
90
90
  </div>
91
91
  <script src="prettify.js"></script>
92
92
  <script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corellium/corellium-cli",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "Corellium CLI Tool",
5
5
  "scripts": {
6
6
  "corellium": "node index.js",
@@ -4,27 +4,29 @@ const { displayTable } = require('../../table')
4
4
  const { getApi } = require('../../utils')
5
5
 
6
6
  async function builder (yargs) {
7
- yargs.option('project', {
8
- type: 'input',
9
- describe: 'Project UUID',
10
- string: true
11
- })
7
+ yargs
8
+ .option('project', {
9
+ type: 'input',
10
+ describe: 'Project UUID',
11
+ string: true
12
+ })
13
+ .option('instance', {
14
+ type: 'input',
15
+ describe: 'Instance UUID',
16
+ string: true
17
+ })
12
18
  .option('format', {
13
19
  type: 'input',
14
- describe: 'Output format (default is json) e.g. table',
20
+ describe: 'Output format (default is json)',
15
21
  string: true,
16
- choices: ['table', 'json', 'csv']
22
+ choices: ['table', 'json', 'csv'],
23
+ default: 'json'
17
24
  })
18
25
  .option('verbose', {
19
26
  alias: 'v',
20
27
  type: 'boolean',
21
28
  describe: 'Console will receive verbose error output'
22
29
  })
23
- .option('instance', {
24
- type: 'input',
25
- describe: 'Instance UUID',
26
- string: true
27
- })
28
30
  .positional('imageName', {
29
31
  type: 'string',
30
32
  describe: 'Image name',
@@ -45,6 +47,12 @@ async function builder (yargs) {
45
47
  describe: 'Path to image file',
46
48
  demandOption: true
47
49
  })
50
+ .check((argv) => {
51
+ if (!argv.project && !argv.instance) {
52
+ throw new Error('You must specify either the project or instance UUID')
53
+ }
54
+ return true
55
+ })
48
56
  }
49
57
 
50
58
  async function handler (argv) {
@@ -74,6 +82,6 @@ async function handler (argv) {
74
82
  module.exports = {
75
83
  builder,
76
84
  handler,
77
- command: 'create [project] [instance] <imageName> <imageType> <encoding> <file>',
85
+ command: 'create <imageName> <imageType> <encoding> <file>',
78
86
  describe: 'Create image and associate it with a project or instance (you must specify either the project or instance UUID)'
79
87
  }