@stackaid/stackaid-json-generator
Advanced tools
+24
-5
@@ -28,3 +28,14 @@ "use strict"; | ||
| const listDirectDeps = (dir, sourceDir) => { | ||
| let output = (0, child_process_1.execSync)(`go list -f '{{if not .Indirect}}{{.}}{{end}}' -m all`, { cwd: path_1.default.resolve(sourceDir, dir), maxBuffer: 1024 * 1024 * 10 }).toString(); | ||
| let output = ''; | ||
| try { | ||
| output = (0, child_process_1.execSync)(`go list -f '{{if not .Indirect}}{{.}}{{end}}' -m all`, { | ||
| cwd: path_1.default.resolve(sourceDir, dir), | ||
| maxBuffer: 1024 * 1024 * 10, | ||
| }).toString(); | ||
| } | ||
| catch (e) { | ||
| // Mostly likely the path does not exist | ||
| console.log('Unable to run go list at path: ', dir); | ||
| console.error(e); | ||
| } | ||
| return output | ||
@@ -40,6 +51,14 @@ .split('\n') | ||
| const getModuleGraph = (dir, sourceDir) => { | ||
| const output = (0, child_process_1.execSync)(`go mod graph`, { | ||
| cwd: path_1.default.resolve(sourceDir, dir), | ||
| maxBuffer: 1024 * 1024 * 10, | ||
| }).toString(); | ||
| let output = ''; | ||
| try { | ||
| output = (0, child_process_1.execSync)(`go mod graph`, { | ||
| cwd: path_1.default.resolve(sourceDir, dir), | ||
| maxBuffer: 1024 * 1024 * 10, | ||
| }).toString(); | ||
| } | ||
| catch (e) { | ||
| // Mostly likely the path does not exist | ||
| console.log('Unable to run go mod graph at path: ', dir); | ||
| console.error(e); | ||
| } | ||
| const graph = {}; | ||
@@ -46,0 +65,0 @@ output.split('\n').forEach((line) => { |
+24
-5
@@ -22,3 +22,14 @@ import lodash from 'lodash'; | ||
| export const listDirectDeps = (dir, sourceDir) => { | ||
| let output = execSync(`go list -f '{{if not .Indirect}}{{.}}{{end}}' -m all`, { cwd: path.resolve(sourceDir, dir), maxBuffer: 1024 * 1024 * 10 }).toString(); | ||
| let output = ''; | ||
| try { | ||
| output = execSync(`go list -f '{{if not .Indirect}}{{.}}{{end}}' -m all`, { | ||
| cwd: path.resolve(sourceDir, dir), | ||
| maxBuffer: 1024 * 1024 * 10, | ||
| }).toString(); | ||
| } | ||
| catch (e) { | ||
| // Mostly likely the path does not exist | ||
| console.log('Unable to run go list at path: ', dir); | ||
| console.error(e); | ||
| } | ||
| return output | ||
@@ -33,6 +44,14 @@ .split('\n') | ||
| export const getModuleGraph = (dir, sourceDir) => { | ||
| const output = execSync(`go mod graph`, { | ||
| cwd: path.resolve(sourceDir, dir), | ||
| maxBuffer: 1024 * 1024 * 10, | ||
| }).toString(); | ||
| let output = ''; | ||
| try { | ||
| output = execSync(`go mod graph`, { | ||
| cwd: path.resolve(sourceDir, dir), | ||
| maxBuffer: 1024 * 1024 * 10, | ||
| }).toString(); | ||
| } | ||
| catch (e) { | ||
| // Mostly likely the path does not exist | ||
| console.log('Unable to run go mod graph at path: ', dir); | ||
| console.error(e); | ||
| } | ||
| const graph = {}; | ||
@@ -39,0 +58,0 @@ output.split('\n').forEach((line) => { |
+1
-1
| { | ||
| "name": "@stackaid/stackaid-json-generator", | ||
| "version": "1.9.3", | ||
| "version": "1.9.4", | ||
| "private": false, | ||
@@ -5,0 +5,0 @@ "description": "Generate a stackaid.json file based on your repository's dependency graph", |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2431130
0.04%52282
0.07%