1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +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,14 +1,14 @@
import { registerTSPaths } from '../server/helpers/register-ts-paths'
registerTSPaths()
import * as prompt from 'prompt'
import { start, get } from 'prompt'
import { join, basename } from 'path'
import { CONFIG } from '../server/initializers/config'
import { VideoModel } from '../server/models/video/video'
import { initDatabaseModels } from '../server/initializers/database'
import { readdir, remove, stat } from 'fs-extra'
import { VideoRedundancyModel } from '../server/models/redundancy/video-redundancy'
import * as Bluebird from 'bluebird'
import { map } from 'bluebird'
import { getUUIDFromFilename } from '../server/helpers/utils'
import { ThumbnailModel } from '../server/models/video/thumbnail'
import { ActorImageModel } from '../server/models/actor/actor-image'
@ -78,7 +78,7 @@ async function pruneDirectory (directory: string, existFun: ExistFun) {
const files = await readdir(directory)
const toDelete: string[] = []
await Bluebird.map(files, async file => {
await map(files, async file => {
const filePath = join(directory, file)
if (await existFun(filePath) !== true) {
@ -141,7 +141,7 @@ async function doesRedundancyExist (filePath: string) {
async function askConfirmation () {
return new Promise((res, rej) => {
prompt.start()
start()
const schema = {
properties: {
confirm: {
@ -154,7 +154,7 @@ async function askConfirmation () {
}
}
}
prompt.get(schema, function (err, result) {
get(schema, function (err, result) {
if (err) return rej(err)
return res(result.confirm?.match(/y/) !== null)