Comparing version 3.0.5 to 3.0.6
@@ -16,2 +16,3 @@ import UpdateManager from "stdout-update"; | ||
stop(): void; | ||
private _processExit; | ||
} |
@@ -12,3 +12,3 @@ import UpdateManager from "stdout-update"; | ||
this.options = options; | ||
this.stop = this.stop.bind(this); | ||
this._processExit = this._processExit.bind(this); | ||
} | ||
@@ -19,3 +19,3 @@ _render() { | ||
start() { | ||
process.on("exit", this.stop); | ||
process.on("SIGINT", this._processExit); | ||
this.stdoutManager.hook(); | ||
@@ -30,6 +30,10 @@ this._intervalId = setInterval(this._render.bind(this), this.options.updateIntervalMs ?? DEFAULT_UPDATE_INTERVAL_MS); | ||
this._intervalId = undefined; | ||
process.off("exit", this.stop); | ||
process.off("SIGINT", this._processExit); | ||
} | ||
} | ||
_processExit() { | ||
this.stop(); | ||
process.exit(0); | ||
} | ||
} | ||
//# sourceMappingURL=base-loading-animation.js.map |
@@ -30,4 +30,5 @@ import UpdateManager from "stdout-update"; | ||
stop(): void; | ||
private _processExit; | ||
updateStatues(statues: FormattedStatus[]): void; | ||
protected _logUpdate(text: string): void; | ||
} |
@@ -34,12 +34,16 @@ import UpdateManager from "stdout-update"; | ||
}); | ||
this.stop = this.stop.bind(this); | ||
this._processExit = this._processExit.bind(this); | ||
} | ||
start() { | ||
this.stdoutManager.hook(); | ||
process.on("exit", this.stop); | ||
process.on("SIGINT", this._processExit); | ||
} | ||
stop() { | ||
this.stdoutManager.unhook(false); | ||
process.off("exit", this.stop); | ||
process.off("SIGINT", this._processExit); | ||
} | ||
_processExit() { | ||
this.stop(); | ||
process.exit(0); | ||
} | ||
updateStatues(statues) { | ||
@@ -46,0 +50,0 @@ if (this.myCLILevel !== TransferCli.activeCLILevel) { |
{ | ||
"name": "ipull", | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"description": "The only file downloader you'll ever need. For node.js and the browser, CLI and library for fast and reliable file downloads.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
223641
2961
2