1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

esModuleInterop to true

This commit is contained in:
Chocobozzz 2021-08-27 14:32:44 +02:00
parent 40e7ed0714
commit 41fb13c330
No known key found for this signature in database
GPG key ID: 583A612D890159BE
208 changed files with 444 additions and 425 deletions

View file

@ -1,5 +1,5 @@
import { copy, readFile, remove, rename } from 'fs-extra'
import * as Jimp from 'jimp'
import Jimp, { read } from 'jimp'
import { getLowercaseExtension } from './core-utils'
import { convertWebPToJPG, processGIF } from './ffmpeg-utils'
import { logger } from './logger'
@ -47,7 +47,7 @@ async function jimpProcessor (path: string, destination: string, newSize: { widt
const inputBuffer = await readFile(path)
try {
jimpInstance = await Jimp.read(inputBuffer)
jimpInstance = await read(inputBuffer)
} catch (err) {
logger.debug('Cannot read %s with jimp. Try to convert the image using ffmpeg first.', path, { err })
@ -55,7 +55,7 @@ async function jimpProcessor (path: string, destination: string, newSize: { widt
await convertWebPToJPG(path, newName)
await rename(newName, path)
jimpInstance = await Jimp.read(path)
jimpInstance = await read(path)
}
await remove(destination)