electron-dl-manager
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -11,3 +11,3 @@ "use strict"; | ||
const path_1 = __importDefault(require("path")); | ||
const unused_filename_1 = require("unused-filename"); | ||
const unused_filename_1 = __importDefault(require("unused-filename")); | ||
function truncateUrl(url) { | ||
@@ -54,3 +54,3 @@ if (url.length > 50) { | ||
const name = path_1.default.extname(filename) ? filename : getFilenameFromMime(filename, item.getMimeType()); | ||
filePath = overwrite ? path_1.default.join(directory, name) : (0, unused_filename_1.unusedFilenameSync)(path_1.default.join(directory, name)); | ||
filePath = overwrite ? path_1.default.join(directory, name) : unused_filename_1.default.sync(path_1.default.join(directory, name)); | ||
} | ||
@@ -57,0 +57,0 @@ return filePath; |
@@ -5,3 +5,3 @@ import crypto from 'crypto'; | ||
import path from 'path'; | ||
import { unusedFilenameSync } from 'unused-filename'; | ||
import UnusedFilename from 'unused-filename'; | ||
export function truncateUrl(url) { | ||
@@ -45,3 +45,3 @@ if (url.length > 50) { | ||
const name = path.extname(filename) ? filename : getFilenameFromMime(filename, item.getMimeType()); | ||
filePath = overwrite ? path.join(directory, name) : unusedFilenameSync(path.join(directory, name)); | ||
filePath = overwrite ? path.join(directory, name) : UnusedFilename.sync(path.join(directory, name)); | ||
} | ||
@@ -48,0 +48,0 @@ return filePath; |
/*! | ||
* mime-db | ||
* Copyright(c) 2014 Jonathan Ong | ||
* Copyright(c) 2015-2022 Douglas Christopher Wilson | ||
* MIT Licensed | ||
*/ |
{ | ||
"name": "electron-dl-manager", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "A library for implementing file downloads in Electron with 'save as' dialog and id support.", | ||
@@ -11,3 +11,3 @@ "main": "dist/cjs/index.js", | ||
"_postinstall": "husky install", | ||
"prepublishOnly": "pinst --disable", | ||
"prepublishOnly": "pinst --disable && npm run clean && npm run test && npm run build", | ||
"postpublish": "pinst --enable", | ||
@@ -14,0 +14,0 @@ "build": "npm run build:cjs && npm run build:esm && npm run build:umd && npm run build:types", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
276386