@corellium/corellium-cli 1.3.3 → 1.3.4
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.
@@ -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="
|
3
|
+
<coverage lines-valid="0" lines-covered="0" line-rate="NaN" branches-valid="0" branches-covered="0" branch-rate="NaN" timestamp="1717515551139" 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-
|
89
|
+
at 2024-06-04T15:39:11.147Z
|
90
90
|
</div>
|
91
91
|
<script src="prettify.js"></script>
|
92
92
|
<script>
|
package/package.json
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
const { handleError } = require('../../error')
|
2
|
+
const { displayTable } = require('../../table')
|
2
3
|
const { getApi } = require('../../utils')
|
3
4
|
|
4
5
|
async function builder (yargs) {
|
@@ -9,6 +10,13 @@ async function builder (yargs) {
|
|
9
10
|
demandOption: true,
|
10
11
|
describe: 'virtual device id'
|
11
12
|
})
|
13
|
+
.option('format', {
|
14
|
+
type: 'input',
|
15
|
+
describe: 'Output format (default is json) e.g. table',
|
16
|
+
string: true,
|
17
|
+
choices: ['table', 'json', 'csv'],
|
18
|
+
default: 'json'
|
19
|
+
})
|
12
20
|
.option('verbose', {
|
13
21
|
alias: 'v',
|
14
22
|
type: 'boolean',
|
@@ -24,13 +32,9 @@ async function handler (argv) {
|
|
24
32
|
if (!instance) {
|
25
33
|
throw new Error(`Instance ${argv.instance} not found`)
|
26
34
|
}
|
27
|
-
|
28
|
-
id
|
29
|
-
|
30
|
-
type: instance.type,
|
31
|
-
state: instance.state,
|
32
|
-
os: instance.os
|
33
|
-
}))
|
35
|
+
await displayTable(argv.format, argv.format === 'json' ? instance : [instance], [
|
36
|
+
'id', 'flavor', 'type', 'state', 'os'
|
37
|
+
], [{ column: 3, width: 5 }, { column: 2, width: 4 }, { column: 1, width: 6 }])
|
34
38
|
} catch (err) {
|
35
39
|
handleError(err, 'Get instance failed', argv.verbose)
|
36
40
|
}
|