Skip to content

Commit

Permalink
replace @slimio/async-cli-spinner with @topcli/spinner (#169)
Browse files Browse the repository at this point in the history
* replace @slimio/async-cli-spinner with @topcli/spinner

* fix start

---------

Co-authored-by: Yazid <contact@yaziddaoudi.com>
  • Loading branch information
Yaziidev and Yazid authored Jan 16, 2025
1 parent 71dcf3f commit 0d41d20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"@nodesecure/scanner": "^6.1.0",
"@nodesecure/vulnera": "^2.0.1",
"@openally/result": "^1.3.0",
"@slimio/async-cli-spinner": "^0.5.2",
"@topcli/spinner": "^2.1.2",
"ajv": "^8.12.0",
"kleur": "^4.1.5",
"lodash.set": "^4.3.2",
Expand Down
8 changes: 3 additions & 5 deletions src/reporting/reporters/internal/scanner.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Import Third-party Dependencies
import { Logger, type Payload, ScannerLoggerEvents } from "@nodesecure/scanner";
import Spinner from "@slimio/async-cli-spinner";
import { Spinner } from "@topcli/spinner";
import pluralize from "pluralize";
import ms from "pretty-ms";

Expand Down Expand Up @@ -31,9 +31,7 @@ export function reportScannerLoggerEvents(logger: Logger): void {
*/
let spinner: Spinner;
if (process.stdout.isTTY) {
spinner = new Spinner({
text: startMessage.message
});
spinner = new Spinner();
}

logger.once("start", () => {
Expand All @@ -43,7 +41,7 @@ export function reportScannerLoggerEvents(logger: Logger): void {

return;
}
spinner.start();
spinner.start(startMessage.message);
});

logger.once(ScannerLoggerEvents.done, () => {
Expand Down

0 comments on commit 0d41d20

Please sign in to comment.