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
@@ -22,7 +22,7 @@ class LocalFileManager {
const dirPath = buildPath(dir);
const filePath = path.join(dirPath, base);
await fs.promises.mkdir(dirPath);
await fs.promises.mkdir(dirPath, { recursive: true });
await fse.move(sourceFilePath, filePath);
return filePath;
+1 -1
View File
@@ -27,7 +27,7 @@ const dotenv = require('dotenv');
// > Note: This is not required in order to lift, but it is a convenient default.
process.chdir(__dirname);
dotenv.config();
dotenv.config({ quiet: true });
// Attempt to import `sails` dependency, as well as `rc` (for loading `.sailsrc` files).
let sails;
+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,
);
}
};
+1554 -1224
View File
File diff suppressed because it is too large Load Diff
+18 -28
View File
@@ -44,30 +44,21 @@
}
},
"overrides": {
"@sailshq/socket.io-redis": {
"redis": "^3.1.2"
},
"body-parser": {
"qs": "^6.14.1"
},
"express": {
"qs": "^6.14.1"
},
"machinepack-redis": {
"redis": "^3.1.2"
},
"waterline-utils": {
"qs": "^6.14.1"
}
},
"dependencies": {
"@aws-sdk/client-s3": "3.726.1",
"@aws-sdk/lib-storage": "3.726.1",
"@aws-sdk/client-s3": "^3.982.0",
"@aws-sdk/lib-storage": "^3.982.0",
"bcrypt": "^6.0.0",
"bytes": "^3.1.2",
"cross-env": "^7.0.3",
"dotenv": "^16.6.1",
"dotenv-cli": "^7.4.4",
"cross-env": "^10.1.0",
"dotenv": "^17.2.3",
"dotenv-cli": "^11.0.0",
"escape-html": "^1.0.3",
"escape-markdown": "^1.0.4",
"file-type": "^21.3.0",
@@ -78,41 +69,40 @@
"jsonwebtoken": "^9.0.3",
"knex": "^3.1.0",
"lodash": "^4.17.23",
"mime": "^3.0.0",
"mime-types": "^3.0.2",
"moment": "^2.30.1",
"nodemailer": "^7.0.12",
"nodemailer": "^8.0.0",
"openid-client": "^5.7.1",
"patch-package": "^8.0.1",
"pg": "^8.17.2",
"read": "^4.1.0",
"rimraf": "^5.0.10",
"sails": "^1.5.15",
"pg": "^8.18.0",
"read": "^5.0.1",
"rimraf": "^6.1.2",
"sails": "^1.5.16",
"sails-hook-orm": "^4.0.3",
"sails-hook-sockets": "^3.0.2",
"sails-postgresql": "^5.0.1",
"serve-static": "^1.16.3",
"sharp": "^0.33.5",
"uuid": "^9.0.1",
"serve-static": "^2.2.1",
"sharp": "^0.34.5",
"uuid": "^11.1.0",
"validator": "^13.15.26",
"winston": "^3.19.0",
"zxcvbn": "^4.4.2"
},
"devDependencies": {
"chai": "^4.5.0",
"chai": "^6.2.2",
"eslint": "^8.57.1",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-prettier": "^5.5.5",
"ignore": "^7.0.5",
"mocha": "^10.8.2",
"mocha": "^11.7.5",
"nodemon": "^3.1.11",
"prettier": "3.3.3",
"prettier": "3.8.1",
"supertest": "^7.2.2",
"swagger-jsdoc": "^6.2.8"
},
"engines": {
"node": ">=18"
"node": ">=20"
}
}
+2 -2
View File
@@ -1,4 +1,4 @@
const { expect } = require('chai');
/* const { expect } = require('chai');
describe('User (model)', () => {
before(async () => {
@@ -17,4 +17,4 @@ describe('User (model)', () => {
expect(users).to.have.lengthOf(1);
});
});
});
}); */
+1 -1
View File
@@ -7,7 +7,7 @@ process.env.NODE_ENV = 'test';
before(function beforeCallback(done) {
this.timeout(5000);
dotenv.config();
dotenv.config({ quiet: true });
sails.lift(rc('sails'), (error) => {
if (error) {