Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ipull

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipull - npm Package Compare versions

Comparing version 3.7.4 to 3.8.0

14

dist/download/download-engine/engine/download-engine-nodejs.d.ts

@@ -40,6 +40,18 @@ import { DownloadFile } from "../types.js";

/**
* Abort the download & delete the file (if it exists)
* Abort the download & delete the file (**even if** the download is finished)
* @deprecated use `close` with flag `deleteFile` instead
*
* TODO: remove in the next major version
*/
closeAndDeleteFile(): Promise<void>;
/**
* Close the download engine
* @param deleteTempFile {boolean} - delete the temp file (when the download is **not finished**).
* @param deleteFile {boolean} - delete the **temp** or **final file** (clean everything up).
*/
close({ deleteTempFile, deleteFile }?: {
deleteTempFile?: boolean;
deleteFile?: boolean;
}): Promise<void>;
/**
* Download/copy a file

@@ -46,0 +58,0 @@ *

24

dist/download/download-engine/engine/download-engine-nodejs.js

@@ -10,2 +10,3 @@ import path from "path";

import filenamify from "filenamify";
import { DownloadStatus } from "../download-file/progress-status-file.js";
export const PROGRESS_FILE_EXTENSION = ".ipull";

@@ -68,10 +69,23 @@ /**

/**
* Abort the download & delete the file (if it exists)
* Abort the download & delete the file (**even if** the download is finished)
* @deprecated use `close` with flag `deleteFile` instead
*
* TODO: remove in the next major version
*/
async closeAndDeleteFile() {
await this.close();
try {
await fs.unlink(this.fileAbsolutePath);
await this.close({ deleteFile: true });
}
/**
* Close the download engine
* @param deleteTempFile {boolean} - delete the temp file (when the download is **not finished**).
* @param deleteFile {boolean} - delete the **temp** or **final file** (clean everything up).
*/
async close({ deleteTempFile, deleteFile } = {}) {
await super.close();
if (deleteFile || deleteTempFile && this.status.downloadStatus != DownloadStatus.Finished) {
try {
await fs.unlink(this.fileAbsolutePath);
}
catch { }
}
catch { }
}

@@ -78,0 +92,0 @@ /**

{
"name": "ipull",
"version": "3.7.4",
"version": "3.8.0",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc