diff --git a/src/Commands/PollingScanStatus.ts b/src/Commands/PollingScanStatus.ts index d8ddd72d..486c5b8a 100644 --- a/src/Commands/PollingScanStatus.ts +++ b/src/Commands/PollingScanStatus.ts @@ -9,7 +9,7 @@ import { Arguments, Argv, CommandModule } from 'yargs'; import { container } from 'tsyringe'; export class PollingScanStatus implements CommandModule { - public readonly command = 'scan:polling [options] '; + public readonly command = 'scan:polling [options] '; public readonly describe = 'Allows to configure a polling of scan status.'; public builder(argv: Argv): Argv { @@ -42,7 +42,7 @@ export class PollingScanStatus implements CommandModule { requiresArg: true, default: BreakpointType.ANY }) - .positional('scan', { + .positional('scanId', { describe: 'ID of an existing scan which you want to check.', type: 'string', demandOption: true @@ -64,7 +64,7 @@ export class PollingScanStatus implements CommandModule { try { const pollingFactory = container.resolve(PollingFactory); const polling = pollingFactory.create({ - scanId: args.scan as string, + scanId: args.scanId as string, timeout: args.timeout as number, interval: args.interval as number, breakpoint: args.breakpoint as BreakpointType diff --git a/src/Commands/RetestScan.ts b/src/Commands/RetestScan.ts index c759a7e4..fc88492f 100644 --- a/src/Commands/RetestScan.ts +++ b/src/Commands/RetestScan.ts @@ -4,7 +4,7 @@ import { Arguments, Argv, CommandModule } from 'yargs'; import { container } from 'tsyringe'; export class RetestScan implements CommandModule { - public readonly command = 'scan:retest [options] '; + public readonly command = 'scan:retest [options] '; public readonly describe = 'Request to start a new scan using the same configuration as an existing scan, by scan ID.'; @@ -16,7 +16,7 @@ export class RetestScan implements CommandModule { requiresArg: true, demandOption: true }) - .positional('scan', { + .positional('scanId', { describe: 'ID of an existing scan which you want to re-run.', type: 'string', demandOption: true @@ -37,7 +37,7 @@ export class RetestScan implements CommandModule { public async handler(args: Arguments): Promise { try { const scanManager: Scans = container.resolve(Scans); - const scanId: string = await scanManager.retest(args.scan as string); + const scanId: string = await scanManager.retest(args.scanId as string); // eslint-disable-next-line no-console console.log(scanId); diff --git a/src/Commands/StopScan.ts b/src/Commands/StopScan.ts index 16cee97b..63d4da4b 100644 --- a/src/Commands/StopScan.ts +++ b/src/Commands/StopScan.ts @@ -4,7 +4,7 @@ import { Arguments, Argv, CommandModule } from 'yargs'; import { container } from 'tsyringe'; export class StopScan implements CommandModule { - public readonly command = 'scan:stop [options] '; + public readonly command = 'scan:stop [options] '; public readonly describe = 'Stop scan by id.'; public builder(argv: Argv): Argv { @@ -15,7 +15,7 @@ export class StopScan implements CommandModule { requiresArg: true, demandOption: true }) - .positional('scan', { + .positional('scanId', { describe: 'ID of an existing scan which you want to stop.', requiresArg: true, demandOption: true, @@ -38,7 +38,7 @@ export class StopScan implements CommandModule { try { const scanManager: Scans = container.resolve(Scans); - await scanManager.stop(args.scan as string); + await scanManager.stop(args.scanId as string); process.exit(0); } catch (error) {