chore: Update server dependencies

This commit is contained in:
Maksim Eltyshev
2026-02-04 12:53:15 +01:00
parent 8df5a111bf
commit 450bd875c1
12 changed files with 1677 additions and 1656 deletions
+1
View File
@@ -9,6 +9,7 @@ const _ = require('lodash');
dotenv.config({
path: path.resolve(__dirname, '../.env'),
quiet: true,
});
function buildSSLConfig() {
@@ -3,7 +3,7 @@
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
*/
const mime = require('mime');
const mime = require('mime-types');
exports.up = async (knex) => {
await knex.schema.createTable('storage_usage', (table) => {
@@ -87,7 +87,7 @@ exports.up = async (knex) => {
id: avatar.uploadedFileId,
type: 'userAvatar',
referencesTotal: 1,
mimeType: mime.getType(avatar.extension),
mimeType: mime.lookup(avatar.extension) || null,
size: avatar.size,
})),
);
@@ -100,7 +100,7 @@ exports.up = async (knex) => {
id: backgroundImage.uploaded_file_id,
type: 'backgroundImage',
referencesTotal: 1,
mimeType: mime.getType(backgroundImage.extension),
mimeType: mime.lookup(backgroundImage.extension) || null,
size: backgroundImage.size,
createdAt: backgroundImage.created_at,
})),
+4 -4
View File
@@ -9,7 +9,7 @@
/* eslint-disable no-restricted-syntax */
const { getEncoding } = require('istextorbinary');
const mime = require('mime');
const mime = require('mime-types');
const uuid = require('uuid');
const sharp = require('sharp');
const initKnex = require('knex');
@@ -458,7 +458,7 @@ const upgradeDatabase = async () => {
data: {
fileReferenceId: attachment.dirname,
filename: attachment.filename,
mimeType: mime.getType(attachment.filename),
mimeType: mime.lookup(attachment.filename) || null,
sizeInBytes: 0,
encoding: null,
image: attachment.image,
@@ -675,7 +675,7 @@ const upgradeUserAvatars = async () => {
await fileManager.save(
`${dirPathSegment}/cover-180.${avatar.extension}`,
cover180Buffer,
mime.getType(avatar.extension),
mime.lookup(avatar.extension) || null,
);
}
};
@@ -758,7 +758,7 @@ const upgradeBackgroundImages = async () => {
await fileManager.save(
`${dirPathSegment}/outside-360.${backgroundImage.extension}`,
outside360Buffer,
mime.getType(backgroundImage.extension),
mime.lookup(backgroundImage.extension) || null,
);
}
};