Skip to content

Commit af185f4

Browse files
authored
chore(deps-dev): bump typescript to 5.9.2 (RocketChat#36645)
1 parent afe794c commit af185f4

78 files changed

Lines changed: 232 additions & 231 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/meteor/app/e2e/client/helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export async function encryptRSA(key: any, data: any) {
4545
return crypto.subtle.encrypt({ name: 'RSA-OAEP' }, key, data);
4646
}
4747

48-
export async function encryptAES(vector: Uint8Array<ArrayBuffer>, key: CryptoKey, data: Uint8Array<ArrayBufferLike>) {
48+
export async function encryptAES(vector: Uint8Array<ArrayBuffer>, key: CryptoKey, data: Uint8Array<ArrayBuffer>) {
4949
return crypto.subtle.encrypt({ name: 'AES-CBC', iv: vector }, key, data);
5050
}
5151

@@ -57,7 +57,7 @@ export async function decryptRSA(key: CryptoKey, data: Uint8Array<ArrayBuffer>)
5757
return crypto.subtle.decrypt({ name: 'RSA-OAEP' }, key, data);
5858
}
5959

60-
export async function decryptAES(vector: Uint8Array<ArrayBufferLike>, key: CryptoKey, data: Uint8Array<ArrayBufferLike>) {
60+
export async function decryptAES(vector: Uint8Array<ArrayBuffer>, key: CryptoKey, data: Uint8Array<ArrayBuffer>) {
6161
return crypto.subtle.decrypt({ name: 'AES-CBC', iv: vector }, key, data);
6262
}
6363

apps/meteor/app/e2e/client/rocketchat.e2e.room.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ export class E2ERoom extends Emitter {
603603
}
604604

605605
// Encrypts messages
606-
async encryptText(data: Uint8Array<ArrayBufferLike>) {
606+
async encryptText(data: Uint8Array<ArrayBuffer>) {
607607
const vector = crypto.getRandomValues(new Uint8Array(16));
608608

609609
try {
@@ -701,7 +701,7 @@ export class E2ERoom extends Emitter {
701701
};
702702
}
703703

704-
async doDecrypt(vector: Uint8Array<ArrayBufferLike>, key: CryptoKey, cipherText: Uint8Array<ArrayBufferLike>) {
704+
async doDecrypt(vector: Uint8Array<ArrayBuffer>, key: CryptoKey, cipherText: Uint8Array<ArrayBuffer>) {
705705
const result = await decryptAES(vector, key, cipherText);
706706
return EJSON.parse(new TextDecoder('UTF-8').decode(new Uint8Array(result)));
707707
}

apps/meteor/app/otr/client/OTRRoom.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,11 @@ export class OTRRoom implements IOTRRoom {
263263
}
264264
}
265265

266-
async encryptText(data: string | Uint8Array): Promise<string> {
266+
async encryptText(data: string | Uint8Array<ArrayBuffer>): Promise<string> {
267267
if (typeof data === 'string') {
268-
data = new TextEncoder().encode(EJSON.stringify({ text: data, ack: Random.id((Random.fraction() + 1) * 20) }));
268+
data = new TextEncoder().encode(
269+
EJSON.stringify({ text: data, ack: Random.id((Random.fraction() + 1) * 20) }),
270+
) as Uint8Array<ArrayBuffer>;
269271
}
270272
try {
271273
if (!this._sessionKey) throw new Error('Session Key not available');
@@ -292,7 +294,7 @@ export class OTRRoom implements IOTRRoom {
292294
ack: Random.id((Random.fraction() + 1) * 20),
293295
ts: new Date(),
294296
}),
295-
);
297+
) as Uint8Array<ArrayBuffer>;
296298
const enc = await this.encryptText(data);
297299
return enc;
298300
} catch (e) {
@@ -304,7 +306,7 @@ export class OTRRoom implements IOTRRoom {
304306
try {
305307
if (!this._sessionKey) throw new Error('Session Key not available.');
306308

307-
const cipherText: Uint8Array = EJSON.parse(message);
309+
const cipherText: Uint8Array<ArrayBuffer> = EJSON.parse(message);
308310
const data = await decryptAES(cipherText, this._sessionKey);
309311
const msgDecoded: IOTRDecrypt = EJSON.parse(new TextDecoder('UTF-8').decode(new Uint8Array(data)));
310312
if (msgDecoded && typeof msgDecoded === 'object') {

apps/meteor/app/otr/lib/IOTR.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface IOnUserStreamData {
1111
}
1212

1313
export interface IOTRDecrypt {
14-
ack: string | Uint8Array;
14+
ack: string | Uint8Array<ArrayBuffer>;
1515
text: string;
1616
ts: Date;
1717
userId: IUser['_id'];

apps/meteor/app/otr/lib/functions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export const encryptAES = async ({
1414
_sessionKey,
1515
data,
1616
}: {
17-
iv: Uint8Array;
17+
iv: Uint8Array<ArrayBuffer>;
1818
_sessionKey: CryptoKey;
19-
data: Uint8Array;
19+
data: Uint8Array<ArrayBuffer>;
2020
}): Promise<ArrayBuffer> =>
2121
subtle.encrypt(
2222
{
@@ -52,7 +52,7 @@ export const importKey = async (publicKeyObject: JsonWebKey): Promise<CryptoKey>
5252
false,
5353
[],
5454
);
55-
export const importKeyRaw = async (sessionKeyData: Uint8Array): Promise<CryptoKey> =>
55+
export const importKeyRaw = async (sessionKeyData: Uint8Array<ArrayBuffer>): Promise<CryptoKey> =>
5656
subtle.importKey(
5757
'raw',
5858
sessionKeyData,
@@ -72,7 +72,7 @@ export const generateKeyPair = async (): Promise<CryptoKeyPair> =>
7272
false,
7373
['deriveKey', 'deriveBits'],
7474
);
75-
export const decryptAES = async (cipherText: Uint8Array, _sessionKey: CryptoKey): Promise<ArrayBuffer> => {
75+
export const decryptAES = async (cipherText: Uint8Array<ArrayBuffer>, _sessionKey: CryptoKey): Promise<ArrayBuffer> => {
7676
const iv = cipherText.slice(0, 12);
7777
cipherText = cipherText.slice(12);
7878
const data = await subtle.decrypt(

apps/meteor/app/webdav/server/methods/getFileFromWebdav.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { WebdavClientAdapter } from '../lib/webdavClientAdapter';
1010
declare module '@rocket.chat/ddp-client' {
1111
// eslint-disable-next-line @typescript-eslint/naming-convention
1212
interface ServerMethods {
13-
getFileFromWebdav(accountId: IWebdavAccount['_id'], file: IWebdavNode): Promise<{ success: boolean; data: Uint8Array }>;
13+
getFileFromWebdav(accountId: IWebdavAccount['_id'], file: IWebdavNode): Promise<{ success: boolean; data: Uint8Array<ArrayBuffer> }>;
1414
}
1515
}
1616

apps/meteor/ee/server/services/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"npm-run-all": "^4.1.5",
6060
"pino-pretty": "^7.6.1",
6161
"ts-node": "^10.9.2",
62-
"typescript": "~5.8.3"
62+
"typescript": "~5.9.2"
6363
},
6464
"volta": {
6565
"extends": "../../../../../package.json"

apps/meteor/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
"supports-color": "~7.2.0",
218218
"template-file": "^6.0.1",
219219
"ts-node": "^10.9.2",
220-
"typescript": "~5.8.3",
220+
"typescript": "~5.9.2",
221221
"webpack": "~5.99.9"
222222
},
223223
"dependencies": {
@@ -445,7 +445,7 @@
445445
"tinykeys": "^1.4.0",
446446
"twilio": "^5.4.2",
447447
"twit": "^2.2.11",
448-
"typia": "~9.3.1",
448+
"typia": "~9.7.0",
449449
"ua-parser-js": "^1.0.40",
450450
"underscore": "^1.13.7",
451451
"universal-perf-hooks": "^1.0.1",

apps/uikit-playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"eslint": "~8.45.0",
5656
"eslint-plugin-react-hooks": "^5.0.0",
5757
"eslint-plugin-react-refresh": "^0.4.20",
58-
"typescript": "~5.8.3",
58+
"typescript": "~5.9.2",
5959
"vite": "^6.2.4"
6060
},
6161
"volta": {

ee/apps/account-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@types/prometheus-gc-stats": "^0.6.4",
4949
"eslint": "~8.45.0",
5050
"ts-node": "^10.9.2",
51-
"typescript": "~5.8.3"
51+
"typescript": "~5.9.2"
5252
},
5353
"main": "./dist/ee/apps/account-service/src/service.js",
5454
"files": [

0 commit comments

Comments
 (0)