mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Move safe-chain package to packages/safe-chain
This commit is contained in:
parent
fc9a9ca129
commit
7673d32912
68 changed files with 85 additions and 52 deletions
18
packages/safe-chain/src/main.js
Normal file
18
packages/safe-chain/src/main.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
import { scanCommand, shouldScanCommand } from "./scanning/index.js";
|
||||
import { ui } from "./environment/userInteraction.js";
|
||||
import { getPackageManager } from "./packagemanager/currentPackageManager.js";
|
||||
|
||||
export async function main(args) {
|
||||
try {
|
||||
if (shouldScanCommand(args)) {
|
||||
await scanCommand(args);
|
||||
}
|
||||
} catch (error) {
|
||||
ui.writeError("Failed to check for malicious packages:", error.message);
|
||||
}
|
||||
|
||||
var result = getPackageManager().runCommand(args);
|
||||
process.exit(result.status);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue