import { injectable } from 'inversify' ; import yargs , { Arguments , Argv } from 'yargs' ; import { ScanMetadata } from './types/scan-metadata' ; @ injectable ( ) export class ScanMetadataConfig { constructor ( private readonly argvObj = yargs ) { argvObj . options ( { deepScan : { type : 'boolean' , alias : 'deepscan' , } , } ) ; } public getConfig ( ) { this . argvObj . env ( ) . demandOption ( [ 'id' , 'url' ] ) ; return this . argvObj . argv as Arguments < ScanMetadata > ; } }