🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@667/ghost-storage-github

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@667/ghost-storage-github - npm Package Compare versions

Comparing version

to
1.1.6

6

index.js

@@ -98,9 +98,9 @@ const https = require('https')

const { fileTypeFromBuffer } = await import('file-type')
const { mime } = await fileTypeFromBuffer(buffer)
const filetype = await fileTypeFromBuffer(buffer)
if (!/image/.test(mime)) {
if (!filetype?.mime || !/image/.test(filetype.mime)) {
// return non image files as-is
return { buffer: buffer.toString('base64') }
}
if (/image/.test(mime) && mime.match(/image\/(.*)/)[1] !== this.imageFormat) {
if (/image/.test(filetype.mime) && filetype.mime.match(/image\/(.*)/)[1] !== this.imageFormat) {
const originalExt = file.ext

@@ -107,0 +107,0 @@ const newExt = `.${this.imageFormat}`

{
"name": "@667/ghost-storage-github",
"version": "1.1.5",
"version": "1.1.6",
"description": "Save Ghost Blog Content to Github",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet