mirror of
https://github.com/RocketChat/Rocket.Chat.git
synced 2025-12-28 06:47:25 +00:00
chore: bump node types to 22 (#35697)
This commit is contained in:
parent
f545617c2a
commit
d8a74f4bcf
@ -41,7 +41,9 @@ export class Session {
|
||||
const sodium = await this.sodium();
|
||||
const nonce = await sodium.randombytes_buf(24);
|
||||
|
||||
const ciphertext = await sodium.crypto_secretbox(Buffer.from(plaintext).toString(this.stringFormatRawData), nonce, this.encryptKey);
|
||||
const buffer = Buffer.isBuffer(plaintext) ? plaintext : Buffer.from(plaintext);
|
||||
|
||||
const ciphertext = await sodium.crypto_secretbox(Buffer.from(buffer).toString(this.stringFormatRawData), nonce, this.encryptKey);
|
||||
|
||||
return Buffer.concat([nonce, ciphertext]);
|
||||
}
|
||||
|
||||
@ -183,8 +183,11 @@ class FileSystem implements IRocketChatFileStore {
|
||||
}
|
||||
return new Promise<IFile>((resolve) => {
|
||||
const data: Buffer[] = [];
|
||||
file.readStream.on('data', (chunk: Buffer) => {
|
||||
return data.push(chunk);
|
||||
file.readStream.on('data', (chunk) => {
|
||||
if (Buffer.isBuffer(chunk)) {
|
||||
return data.push(chunk);
|
||||
}
|
||||
return data.push(Buffer.from(chunk));
|
||||
});
|
||||
file.readStream.on('end', () => {
|
||||
resolve({
|
||||
@ -210,7 +213,7 @@ export const RocketChatFile = {
|
||||
},
|
||||
|
||||
dataURIParse(dataURI: string | Buffer) {
|
||||
const imageData = Buffer.from(dataURI).toString().split(';base64,');
|
||||
const imageData = (Buffer.isBuffer(dataURI) ? dataURI : Buffer.from(dataURI)).toString().split(';base64,');
|
||||
return {
|
||||
image: imageData[1],
|
||||
contentType: imageData[0].replace('data:', ''),
|
||||
|
||||
@ -11,7 +11,7 @@ export const uploadFileToWebdav = async (accountId: IWebdavAccount['_id'], fileD
|
||||
}
|
||||
|
||||
const uploadFolder = 'Rocket.Chat Uploads/';
|
||||
const buffer = Buffer.from(fileData);
|
||||
const buffer = Buffer.isBuffer(fileData) ? fileData : Buffer.from(fileData);
|
||||
|
||||
const cred = getWebdavCredentials(account);
|
||||
const client = new WebdavClientAdapter(account.serverURL, cred);
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
"@types/ejson": "^2.2.2",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/fibers": "^3.1.4",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"@types/ws": "^8.5.13",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"pino-pretty": "^7.6.1",
|
||||
|
||||
@ -129,7 +129,7 @@
|
||||
"@types/meteor-collection-hooks": "^0.8.9",
|
||||
"@types/mkdirp": "^1.0.2",
|
||||
"@types/mocha": "github:whitecolor/mocha-types",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"@types/node-rsa": "^1.1.4",
|
||||
"@types/nodemailer": "^6.4.16",
|
||||
"@types/oauth2-server": "^3.0.18",
|
||||
|
||||
@ -71,7 +71,7 @@ const generateUserFile = async (exportOperation: IExportOperation, userData?: IU
|
||||
return;
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
const stream = createWriteStream(fileName, { encoding: 'utf8' });
|
||||
|
||||
stream.on('finish', resolve);
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
"@rocket.chat/string-helpers": "~0.31.25",
|
||||
"@rocket.chat/tools": "workspace:^",
|
||||
"@rocket.chat/tracing": "workspace:^",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"bcrypt": "^5.1.1",
|
||||
"ejson": "^2.2.3",
|
||||
"event-loop-stats": "^1.4.1",
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
"@rocket.chat/rest-typings": "workspace:^",
|
||||
"@rocket.chat/string-helpers": "~0.31.25",
|
||||
"@rocket.chat/tracing": "workspace:^",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"ejson": "^2.2.3",
|
||||
"event-loop-stats": "^1.4.1",
|
||||
"eventemitter3": "^5.0.1",
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
"@rocket.chat/eslint-config": "workspace:^",
|
||||
"@types/ejson": "^2.2.2",
|
||||
"@types/gc-stats": "^1.4.3",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"@types/polka": "^0.5.7",
|
||||
"@types/underscore": "^1.13.0",
|
||||
"@types/uuid": "^10.0.0",
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
"@rocket.chat/pdf-worker": "workspace:^",
|
||||
"@rocket.chat/tools": "workspace:^",
|
||||
"@rocket.chat/tracing": "workspace:^",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"ejson": "^2.2.3",
|
||||
"emoji-toolkit": "^7.0.1",
|
||||
"event-loop-stats": "^1.4.1",
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
"@rocket.chat/presence": "workspace:^",
|
||||
"@rocket.chat/string-helpers": "~0.31.25",
|
||||
"@rocket.chat/tracing": "workspace:^",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"ejson": "^2.2.3",
|
||||
"event-loop-stats": "^1.4.1",
|
||||
"eventemitter3": "^5.0.1",
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
"@rocket.chat/network-broker": "workspace:^",
|
||||
"@rocket.chat/omnichannel-services": "workspace:^",
|
||||
"@rocket.chat/tracing": "workspace:^",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"ejson": "^2.2.3",
|
||||
"emoji-toolkit": "^7.0.1",
|
||||
"event-loop-stats": "^1.4.1",
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
"@rocket.chat/network-broker": "workspace:^",
|
||||
"@rocket.chat/string-helpers": "~0.31.25",
|
||||
"@rocket.chat/tracing": "workspace:^",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"ejson": "^2.2.3",
|
||||
"event-loop-stats": "^1.4.1",
|
||||
"eventemitter3": "^5.0.1",
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
"@rocket.chat/eslint-config": "workspace:^",
|
||||
"@types/chai": "~4.3.20",
|
||||
"@types/ejson": "^2.2.2",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"@types/sinon": "^10.0.20",
|
||||
"chai": "^4.5.0",
|
||||
"eslint": "~8.45.0",
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
"@rocket.chat/rest-typings": "workspace:^",
|
||||
"@rocket.chat/string-helpers": "~0.31.25",
|
||||
"@rocket.chat/tools": "workspace:^",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"date-fns": "^2.30.0",
|
||||
"ejson": "^2.2.3",
|
||||
"emoji-toolkit": "^7.0.1",
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"@rocket.chat/apps-engine": "workspace:^",
|
||||
"@rocket.chat/eslint-config": "workspace:^",
|
||||
"@rocket.chat/rest-typings": "workspace:^",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"babel-jest": "^29.7.0",
|
||||
"eslint": "~8.45.0",
|
||||
"jest": "~29.7.0",
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
"@types/debug": "^4.1.12",
|
||||
"@types/lodash.clonedeep": "^4.5.9",
|
||||
"@types/nedb": "^1.8.16",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/stack-trace": "0.0.33",
|
||||
"@types/uuid": "~10.0.0",
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
"@rocket.chat/peggy-loader": "workspace:~",
|
||||
"@rocket.chat/prettier-config": "~0.31.25",
|
||||
"@types/jest": "~29.5.14",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"@typescript-eslint/parser": "~5.58.0",
|
||||
"babel-loader": "~9.2.1",
|
||||
"eslint": "~8.45.0",
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
"devDependencies": {
|
||||
"@rocket.chat/eslint-config": "workspace:~",
|
||||
"@rocket.chat/prettier-config": "~0.31.25",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"eslint": "~8.45.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"peggy": "4.1.1",
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
"main": "dist/index.js",
|
||||
"packageManager": "yarn@3.5.1",
|
||||
"devDependencies": {
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"typescript": "~5.7.2"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
"devDependencies": {
|
||||
"@changesets/types": "^6.0.0",
|
||||
"@rocket.chat/eslint-config": "workspace:^",
|
||||
"@types/node": "~20.17.8",
|
||||
"@types/node": "~22.14.0",
|
||||
"eslint": "~8.45.0",
|
||||
"typescript": "~5.7.2"
|
||||
},
|
||||
|
||||
51
yarn.lock
51
yarn.lock
@ -7744,7 +7744,7 @@ __metadata:
|
||||
"@rocket.chat/tracing": "workspace:^"
|
||||
"@types/bcrypt": "npm:^5.0.2"
|
||||
"@types/gc-stats": "npm:^1.4.3"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@types/polka": "npm:^0.5.7"
|
||||
bcrypt: "npm:^5.1.1"
|
||||
ejson: "npm:^2.2.3"
|
||||
@ -7820,7 +7820,7 @@ __metadata:
|
||||
"@types/debug": "npm:^4.1.12"
|
||||
"@types/lodash.clonedeep": "npm:^4.5.9"
|
||||
"@types/nedb": "npm:^1.8.16"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@types/semver": "npm:^7.5.8"
|
||||
"@types/stack-trace": "npm:0.0.33"
|
||||
"@types/uuid": "npm:~10.0.0"
|
||||
@ -7878,7 +7878,7 @@ __metadata:
|
||||
"@rocket.chat/string-helpers": "npm:~0.31.25"
|
||||
"@rocket.chat/tracing": "workspace:^"
|
||||
"@types/gc-stats": "npm:^1.4.3"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@types/polka": "npm:^0.5.7"
|
||||
ejson: "npm:^2.2.3"
|
||||
eslint: "npm:~8.45.0"
|
||||
@ -8043,7 +8043,7 @@ __metadata:
|
||||
"@rocket.chat/tracing": "workspace:^"
|
||||
"@types/ejson": "npm:^2.2.2"
|
||||
"@types/gc-stats": "npm:^1.4.3"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@types/polka": "npm:^0.5.7"
|
||||
"@types/underscore": "npm:^1.13.0"
|
||||
"@types/uuid": "npm:^10.0.0"
|
||||
@ -8580,7 +8580,7 @@ __metadata:
|
||||
"@rocket.chat/peggy-loader": "workspace:~"
|
||||
"@rocket.chat/prettier-config": "npm:~0.31.25"
|
||||
"@types/jest": "npm:~29.5.14"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@typescript-eslint/parser": "npm:~5.58.0"
|
||||
babel-loader: "npm:~9.2.1"
|
||||
eslint: "npm:~8.45.0"
|
||||
@ -8749,7 +8749,7 @@ __metadata:
|
||||
"@types/meteor-collection-hooks": "npm:^0.8.9"
|
||||
"@types/mkdirp": "npm:^1.0.2"
|
||||
"@types/mocha": "github:whitecolor/mocha-types"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@types/node-rsa": "npm:^1.1.4"
|
||||
"@types/nodemailer": "npm:^6.4.16"
|
||||
"@types/oauth2-server": "npm:^3.0.18"
|
||||
@ -9072,7 +9072,7 @@ __metadata:
|
||||
"@rocket.chat/eslint-config": "workspace:^"
|
||||
"@types/chai": "npm:~4.3.20"
|
||||
"@types/ejson": "npm:^2.2.2"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@types/sinon": "npm:^10.0.20"
|
||||
chai: "npm:^4.5.0"
|
||||
ejson: "npm:^2.2.3"
|
||||
@ -9102,7 +9102,7 @@ __metadata:
|
||||
"@rocket.chat/string-helpers": "npm:~0.31.25"
|
||||
"@rocket.chat/tools": "workspace:^"
|
||||
"@types/jest": "npm:~29.5.14"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
date-fns: "npm:^2.30.0"
|
||||
ejson: "npm:^2.2.3"
|
||||
emoji-toolkit: "npm:^7.0.1"
|
||||
@ -9136,7 +9136,7 @@ __metadata:
|
||||
"@rocket.chat/tools": "workspace:^"
|
||||
"@rocket.chat/tracing": "workspace:^"
|
||||
"@types/gc-stats": "npm:^1.4.3"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@types/polka": "npm:^0.5.7"
|
||||
ejson: "npm:^2.2.3"
|
||||
emoji-toolkit: "npm:^7.0.1"
|
||||
@ -9239,7 +9239,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@rocket.chat/eslint-config": "workspace:~"
|
||||
"@rocket.chat/prettier-config": "npm:~0.31.25"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
eslint: "npm:~8.45.0"
|
||||
npm-run-all: "npm:^4.1.5"
|
||||
peggy: "npm:4.1.1"
|
||||
@ -9278,7 +9278,7 @@ __metadata:
|
||||
"@rocket.chat/string-helpers": "npm:~0.31.25"
|
||||
"@rocket.chat/tracing": "workspace:^"
|
||||
"@types/gc-stats": "npm:^1.4.3"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@types/polka": "npm:^0.5.7"
|
||||
ejson: "npm:^2.2.3"
|
||||
eslint: "npm:~8.45.0"
|
||||
@ -9309,7 +9309,7 @@ __metadata:
|
||||
"@rocket.chat/eslint-config": "workspace:^"
|
||||
"@rocket.chat/models": "workspace:^"
|
||||
"@rocket.chat/rest-typings": "workspace:^"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
babel-jest: "npm:^29.7.0"
|
||||
eslint: "npm:~8.45.0"
|
||||
jest: "npm:~29.7.0"
|
||||
@ -9342,7 +9342,7 @@ __metadata:
|
||||
"@rocket.chat/omnichannel-services": "workspace:^"
|
||||
"@rocket.chat/tracing": "workspace:^"
|
||||
"@types/gc-stats": "npm:^1.4.3"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@types/polka": "npm:^0.5.7"
|
||||
ejson: "npm:^2.2.3"
|
||||
emoji-toolkit: "npm:^7.0.1"
|
||||
@ -9388,7 +9388,7 @@ __metadata:
|
||||
"@actions/github": "npm:^6.0.0"
|
||||
"@octokit/plugin-throttling": "npm:^6.1.0"
|
||||
"@rocket.chat/eslint-config": "workspace:^"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
eslint: "npm:~8.45.0"
|
||||
mdast-util-to-string: "npm:2.0.0"
|
||||
remark-parse: "npm:9.0.0"
|
||||
@ -9405,7 +9405,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@changesets/types": "npm:^6.0.0"
|
||||
"@rocket.chat/eslint-config": "workspace:^"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
dataloader: "npm:^2.2.2"
|
||||
eslint: "npm:~8.45.0"
|
||||
node-fetch: "npm:^2.7.0"
|
||||
@ -9490,7 +9490,7 @@ __metadata:
|
||||
"@rocket.chat/tracing": "workspace:^"
|
||||
"@types/bcrypt": "npm:^5.0.2"
|
||||
"@types/gc-stats": "npm:^1.4.3"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@types/polka": "npm:^0.5.7"
|
||||
ejson: "npm:^2.2.3"
|
||||
eslint: "npm:~8.45.0"
|
||||
@ -12587,12 +12587,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:~20.17.8":
|
||||
version: 20.17.8
|
||||
resolution: "@types/node@npm:20.17.8"
|
||||
"@types/node@npm:~22.14.0":
|
||||
version: 22.14.0
|
||||
resolution: "@types/node@npm:22.14.0"
|
||||
dependencies:
|
||||
undici-types: "npm:~6.19.2"
|
||||
checksum: 10/e3e968b327abc70fd437a223f8950dd4436047e954aa7db09abde5df1f58a5c49f33d6f14524e256d09719e1960d22bf072d62e4bda7375f7895a092c7eb2f9d
|
||||
undici-types: "npm:~6.21.0"
|
||||
checksum: 10/d0669a8a37a18532c886ccfa51eb3fe1e46088deb4d3d27ebcd5d7d68bd6343ad1c7a3fcb85164780a57629359c33a6c917ecff748ea232bceac7692acc96537
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -32452,7 +32452,7 @@ __metadata:
|
||||
"@types/ejson": "npm:^2.2.2"
|
||||
"@types/express": "npm:^4.17.21"
|
||||
"@types/fibers": "npm:^3.1.4"
|
||||
"@types/node": "npm:~20.17.8"
|
||||
"@types/node": "npm:~22.14.0"
|
||||
"@types/ws": "npm:^8.5.13"
|
||||
ajv: "npm:^8.17.1"
|
||||
bcrypt: "npm:^5.1.1"
|
||||
@ -36166,6 +36166,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"undici-types@npm:~6.21.0":
|
||||
version: 6.21.0
|
||||
resolution: "undici-types@npm:6.21.0"
|
||||
checksum: 10/ec8f41aa4359d50f9b59fa61fe3efce3477cc681908c8f84354d8567bb3701fafdddf36ef6bff307024d3feb42c837cf6f670314ba37fc8145e219560e473d14
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"undici@npm:^5.25.4":
|
||||
version: 5.28.4
|
||||
resolution: "undici@npm:5.28.4"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user