@@ -13,7 +13,11 @@ import * as scanner from "@nodesecure/scanner";
1313// Import Internal Dependencies
1414import kleur from "../utils/styleText.js" ;
1515import * as http from "./http.js" ;
16- import { logScannerStat , logScannerError , formatMs } from "./loggers/logger.js" ;
16+ import {
17+ logScannerStat ,
18+ logScannerError ,
19+ formatMs
20+ } from "./loggers/logger.js" ;
1721import { parseContacts } from "./parsers/contacts.js" ;
1822
1923export async function auto ( spec , options ) {
@@ -73,8 +77,15 @@ export async function cwd(options) {
7377 const payload = await scanner . workingDir (
7478 process . cwd ( ) ,
7579 {
76- maxDepth, usePackageLock : ! nolock , fullLockMode : full , vulnerabilityStrategy, highlight :
77- { contacts : parseContacts ( contacts ) } , isVerbose : verbose
80+ maxDepth,
81+ usePackageLock : ! nolock ,
82+ fullLockMode : full ,
83+ vulnerabilityStrategy,
84+ highlight : {
85+ contacts : parseContacts ( contacts )
86+ } ,
87+ isVerbose : verbose ,
88+ workers : true
7889 } ,
7990 initLogger ( void 0 , ! silent )
8091 ) ;
@@ -83,7 +94,14 @@ export async function cwd(options) {
8394}
8495
8596export async function from ( spec , options ) {
86- const { depth : maxDepth = Infinity , output, silent, contacts, vulnerabilityStrategy, verbose } = options ;
97+ const {
98+ depth : maxDepth = Infinity ,
99+ output,
100+ silent,
101+ contacts,
102+ vulnerabilityStrategy,
103+ verbose
104+ } = options ;
87105
88106 const payload = await scanner . from (
89107 spec ,
@@ -93,7 +111,8 @@ export async function from(spec, options) {
93111 highlight : {
94112 contacts : parseContacts ( contacts )
95113 } ,
96- isVerbose : verbose
114+ isVerbose : verbose ,
115+ workers : true
97116 } ,
98117 initLogger ( spec , ! silent )
99118 ) ;
@@ -258,7 +277,9 @@ async function logAndWrite(
258277 fs . writeFileSync ( filePath , ret ) ;
259278
260279 console . log ( "" ) ;
261- console . log ( kleur . white ( ) . bold ( i18n . getTokenSync ( "cli.successfully_written_json" , kleur . green ( ) . bold ( filePath ) ) ) ) ;
280+ console . log (
281+ kleur . white ( ) . bold ( i18n . getTokenSync ( "cli.successfully_written_json" , kleur . green ( ) . bold ( filePath ) ) )
282+ ) ;
262283 console . log ( "" ) ;
263284
264285 return filePath ;
0 commit comments