Socket
Socket
Sign inDemoInstall

nodejs-file-downloader

Package Overview
Dependencies
10
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.12.1 to 4.12.2

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## 4.12.2 29/05/2024
### Fixed
- Fixed vulnerabilities
- Fixed file path handling
### Added
- Added export to TS types
## 4.12.0 23/05/2023

@@ -2,0 +11,0 @@

5

Download.js

@@ -18,2 +18,3 @@ const fs = require('fs');

const { bufferToReadableStream, createWriteStream, createBufferFromResponseStream, pipeStreams, getStringFromStream } = require('./utils/stream');
const path = require('path')

@@ -132,3 +133,3 @@

if (this.config.fileName && this.config.skipExistingFileName) {
if (await exists(this.config.directory + '/' + this.config.fileName)) {
if (await exists(path.join(this.config.directory , this.config.fileName))) {
return true

@@ -227,3 +228,3 @@ }

async _shouldSkipSaving(originalFileName) {
if (this.config.skipExistingFileName && await exists(this.config.directory + '/' + originalFileName)) {
if (this.config.skipExistingFileName && await exists(path.join(this.config.directory , originalFileName))) {
return true;

@@ -230,0 +231,0 @@ }

4

Downloader.td.ts

@@ -5,3 +5,3 @@ import http from 'http';

interface DownloaderConfig{
export interface DownloaderConfig{
url:string

@@ -27,3 +27,3 @@ directory?:string

interface DownloaderReport{
export interface DownloaderReport{
downloadStatus:"COMPLETE"|"ABORTED"

@@ -30,0 +30,0 @@ filePath:string|null

{
"name": "nodejs-file-downloader",
"version": "4.12.1",
"version": "4.12.2",
"description": "A file downloader for NodeJs",

@@ -26,3 +26,3 @@ "main": "Downloader.js",

"dependencies": {
"follow-redirects": "^1.15.1",
"follow-redirects": "^1.15.6",
"https-proxy-agent": "^5.0.0",

@@ -48,5 +48,5 @@ "mime-types": "^2.1.27",

"type": "git",
"url": "https://github.com/ibrod83/nodejs-file-downloader.git"
"url": "git+https://github.com/ibrod83/nodejs-file-downloader.git"
},
"typings": "Downloader.td.ts"
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc