@corellium/corellium-cli 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
package/README.md
CHANGED
@@ -19,3 +19,10 @@ npm install -g @corellium/corellium-cli
|
|
19
19
|
3. Link with `npm link`
|
20
20
|
|
21
21
|
*Note*: if you are running it locally create `.env` file and put the following line there `NODE_TLS_REJECT_UNAUTHORIZED=0`
|
22
|
+
|
23
|
+
## Publishing
|
24
|
+
To publish Corellium CLI to the official Corellium npm registry, create a tag with the format
|
25
|
+
```
|
26
|
+
v#.#.#
|
27
|
+
```
|
28
|
+
This creates a GitLab pipeline which runs npm publish with the appropriate permissions
|
@@ -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="1712174416629" 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-04-03T20:00:16.636Z
|
90
90
|
</div>
|
91
91
|
<script src="prettify.js"></script>
|
92
92
|
<script>
|
package/package.json
CHANGED
package/src/clients/Client.js
CHANGED
@@ -87,6 +87,9 @@ class Client {
|
|
87
87
|
case 'DELETE':
|
88
88
|
response = await axios.delete(`${this._profile.endpoint}/api/${path}`, { headers })
|
89
89
|
break
|
90
|
+
case 'HEAD':
|
91
|
+
response = await axios.head(`${this._profile.endpoint}/api/${path}`, { headers })
|
92
|
+
break
|
90
93
|
}
|
91
94
|
if (response.status >= 400) { throw new Error(response.statusText) }
|
92
95
|
return response.data || {}
|
@@ -24,6 +24,13 @@ async function builder (yargs) {
|
|
24
24
|
describe: 'virtual device id',
|
25
25
|
default: process.env.INSTANCE
|
26
26
|
})
|
27
|
+
.option('format', {
|
28
|
+
alias: 'f',
|
29
|
+
type: 'string',
|
30
|
+
describe: 'The desired format of the report.',
|
31
|
+
choices: ['html', 'json', 'csv'],
|
32
|
+
default: 'html'
|
33
|
+
})
|
27
34
|
.option('verbose', {
|
28
35
|
alias: 'v',
|
29
36
|
type: 'boolean',
|
@@ -33,10 +40,10 @@ async function builder (yargs) {
|
|
33
40
|
}
|
34
41
|
|
35
42
|
async function handler (argv) {
|
36
|
-
const { assessment, instance, verbose } = argv
|
43
|
+
const { assessment, instance, format, verbose } = argv
|
37
44
|
const client = new Client(argv)
|
38
45
|
try {
|
39
|
-
const res = await client._fetch('GET', `${MAST_API_BASE_PATH}/${instance}/assessments/${assessment}/download`)
|
46
|
+
const res = await client._fetch('GET', `${MAST_API_BASE_PATH}/${instance}/assessments/${assessment}/download?format=${format}`)
|
40
47
|
console.log(res)
|
41
48
|
} catch (error) {
|
42
49
|
handleError(error, 'download-report failed', verbose)
|