mobbdev 0.0.193 → 1.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "0.0.193",
3
+ "version": "1.0.1",
4
4
  "description": "Automated secure code remediation tool",
5
5
  "repository": "git+https://github.com/mobb-dev/bugsy.git",
6
6
  "main": "dist/index.js",
@@ -43,8 +43,8 @@ export async function install({ binaryName, url }) {
43
43
  mkdirSync(installDirectory, { recursive: true })
44
44
  console.log(`Downloading release from ${url}`)
45
45
  archiveType === 'zip'
46
- ? installZip({ binaryName, url, installDirectory })
47
- : installTar({ binaryName, url, installDirectory })
46
+ ? await installZip({ binaryName, url, installDirectory })
47
+ : await installTar({ binaryName, url, installDirectory })
48
48
 
49
49
  console.log(`${binaryName} has been installed!`)
50
50
  }
@@ -31,27 +31,21 @@ const supportedPlatforms = [
31
31
  },
32
32
  ]
33
33
 
34
- function installBinary() {
35
- try {
36
- const supportedPlatform = getPlatformMetadata()
37
- if (!supportedPlatform) {
38
- console.warn(cxOperatingSystemSupportMessage)
39
- console.warn(
40
- 'The rest of Bugsy features and scanners will be available for use'
41
- )
42
- return
43
- }
44
- const { target } = supportedPlatform
45
-
46
- const url = `https://github.com/Checkmarx/ast-cli/releases/download/2.0.55/ast-cli_${target}`
47
- const binaryName = supportedPlatform.type === 'Windows_NT' ? 'cx.exe' : 'cx'
48
-
49
- install({ binaryName, url })
50
- } catch (err) {
34
+ async function installBinary() {
35
+ const supportedPlatform = getPlatformMetadata()
36
+ if (!supportedPlatform) {
37
+ console.warn(cxOperatingSystemSupportMessage)
51
38
  console.warn(
52
- "Optional Checkmarx dependency was not installed. If you don't require this functionality, you can safely ignore this message."
39
+ 'The checkmarx scanner is not available on your platform. The rest of Bugsy features and scanners will be available for use.'
53
40
  )
41
+ return
54
42
  }
43
+ const { target } = supportedPlatform
44
+
45
+ const url = `https://github.com/Checkmarx/ast-cli/releases/download/2.0.55/ast-cli_${target}`
46
+ const binaryName = supportedPlatform.type === 'Windows_NT' ? 'cx.exe' : 'cx'
47
+
48
+ await install({ binaryName, url })
55
49
  }
56
50
 
57
51
  export function getPlatformMetadata() {
@@ -70,4 +64,9 @@ export function getPlatformMetadata() {
70
64
  return null
71
65
  }
72
66
 
73
- installBinary()
67
+ installBinary().catch((err) => {
68
+ console.debug(err)
69
+ console.warn(
70
+ "Optional Checkmarx dependency was not installed. If you don't require this functionality, you can safely ignore this message."
71
+ )
72
+ })