Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
1741cab
test: migrate Mocha test to Jest
tassoevan Jan 26, 2026
14617f0
refactor: convert legacy markdown lib to TypeScript
tassoevan Jan 27, 2026
c47dbda
refactor: convert `apps/meteor/app/authentication/server/startup/inde…
tassoevan Jan 27, 2026
3fc4b0f
refactor: convert `apps/meteor/app/2fa/server/MethodInvocationOverrid…
tassoevan Jan 27, 2026
2ee66f7
refactor: convert `apps/meteor/app/apps/server/bridges/bridges.js` to…
tassoevan Jan 28, 2026
14dcb40
refactor: convert `apps/meteor/app/apps/server/converters/departments…
tassoevan Jan 28, 2026
9b4c2b9
refactor: convert `apps/meteor/app/apps/server/converters/messages.js…
tassoevan Jan 28, 2026
3c8ebd2
refactor: convert `apps/meteor/app/apps/server/converters/rooms.js` t…
tassoevan Jan 28, 2026
64e1d5f
refactor: convert `apps/meteor/app/apps/server/converters/settings.js…
tassoevan Jan 28, 2026
22c688c
refactor: convert `apps/meteor/app/apps/server/converters/uploads.js`…
tassoevan Jan 28, 2026
29960c2
refactor: convert `apps/meteor/app/apps/server/converters/users.js` t…
tassoevan Jan 28, 2026
97eedd2
refactor: convert `apps/meteor/app/apps/server/converters/visitors.js…
tassoevan Jan 28, 2026
da6c3b9
refactor: convert `apps/meteor/app/custom-oauth/server/transform_help…
tassoevan Jan 28, 2026
4d48f75
refactor: convert `apps/meteor/app/custom-oauth/server/custom_oauth_s…
tassoevan Jan 28, 2026
587729a
refactor: convert `apps/meteor/app/custom-sounds/server/startup/custo…
tassoevan Jan 28, 2026
d3cbbf0
refactor: convert `apps/meteor/app/emoji-custom/server/startup/emoji-…
tassoevan Jan 28, 2026
e18747a
refactor: convert `apps/meteor/app/google-oauth/server/index.js` to T…
tassoevan Jan 28, 2026
98ca8eb
refactor: convert `apps/meteor/app/importer/server/startup/setImports…
tassoevan Jan 28, 2026
108c6e7
refactor: convert `apps/meteor/app/importer/server/startup/store.js` …
tassoevan Jan 28, 2026
b876a01
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan Jan 28, 2026
ef72275
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan Jan 29, 2026
7233354
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan Jan 29, 2026
4457cf1
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan Jan 29, 2026
7cbe4f0
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan Jan 29, 2026
b261674
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan Jan 29, 2026
0edeb9f
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan Jan 29, 2026
682cd33
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan Jan 29, 2026
aa2f0f0
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan Jan 29, 2026
cca2dac
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan Jan 29, 2026
6f90ba0
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan Jan 29, 2026
23ebbee
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan Jan 29, 2026
71ba3d9
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan Jan 29, 2026
5a30ef9
refactor: convert `apps/meteor/app/irc/server/irc-bridge/index.js` to…
tassoevan Jan 29, 2026
d18a25b
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/codes.j…
tassoevan Jan 29, 2026
1ee9341
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/peerCom…
tassoevan Jan 29, 2026
81c65a4
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/localCo…
tassoevan Jan 29, 2026
8e0f21e
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/parseMe…
tassoevan Jan 29, 2026
0075c64
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/index.j…
tassoevan Jan 29, 2026
9d7b382
refactor: normalize types on `apps/meteor/app/irc/server/servers/RFC2…
tassoevan Jan 29, 2026
0f0282e
refactor: convert `apps/meteor/app/lib/server/startup/rateLimiter.js`…
tassoevan Jan 29, 2026
f6e47eb
refactor: convert `apps/meteor/app/lib/server/startup/robots.js` to T…
tassoevan Jan 29, 2026
7e72cb9
refactor: convert `apps/meteor/app/lib/server/lib/validateEmailDomain…
tassoevan Jan 29, 2026
dd212ef
refactor: convert `apps/meteor/app/lib/server/lib/debug.js` to TypeSc…
tassoevan Jan 29, 2026
e5bbf5a
refactor: convert `apps/meteor/app/lib/server/lib/interceptDirectRepl…
tassoevan Jan 29, 2026
8548153
refactor: convert `apps/meteor/app/lib/server/lib/RateLimiter.js` to …
tassoevan Jan 29, 2026
c54b744
refactor: convert `apps/meteor/app/lib/server/functions/validateCusto…
tassoevan Jan 29, 2026
a46a8f6
refactor: convert `apps/meteor/app/metrics/server/lib/statsTracker.js…
tassoevan Jan 29, 2026
ccbdf3f
refactor: convert `apps/meteor/app/statistics/server/lib/UAParserCust…
tassoevan Jan 29, 2026
cc2950b
refactor: convert `apps/meteor/app/token-login/server/login_token_ser…
tassoevan Jan 29, 2026
a73dd41
refactor: convert `apps/meteor/app/lib/server/functions/notifications…
tassoevan Jan 29, 2026
d0125f7
refactor: convert `apps/meteor/app/lib/server/functions/notifications…
tassoevan Jan 29, 2026
bf271f3
refactor: convert `apps/meteor/app/lib/server/oauth/proxy.js` to Type…
tassoevan Jan 29, 2026
a46d0b7
refactor: convert `apps/meteor/app/lib/server/oauth/oauth.js` to Type…
tassoevan Jan 29, 2026
03c460d
refactor: convert `apps/meteor/app/lib/server/oauth/{facebook,google,…
tassoevan Jan 29, 2026
8c25a38
refactor: convert `apps/meteor/ee/app/api-enterprise/server/lib/canne…
tassoevan Jan 30, 2026
9b3d36b
refactor: convert `apps/meteor/ee/server/apps/orchestrator.js` to Typ…
tassoevan Jan 30, 2026
2108b9d
refactor: convert `apps/meteor/ee/lib/misc/determineFileType.js` to T…
tassoevan Jan 30, 2026
fb250a3
refactor: convert `apps/meteor/server/configuration/accounts_meld.js`…
tassoevan Jan 30, 2026
34f4122
refactor: convert `apps/meteor/server/lib/spotlight.js` to TypeScript
tassoevan Jan 30, 2026
8ebea35
refactor: migrate unit test `apps/meteor/tests/unit/app/statistics/se…
tassoevan Jan 30, 2026
99da65a
refactor: convert `apps/meteor/app/statistics/server/functions/sendUs…
tassoevan Jan 31, 2026
de36dc8
refactor: migrate unit test `apps/meteor/tests/unit/app/custom-oauth/…
tassoevan Jan 31, 2026
962e2e7
refactor: migrate unit test `apps/meteor/tests/unit/app/highlight-wor…
tassoevan Jan 31, 2026
5a0957b
refactor: migrate unit test `apps/meteor/tests/unit/app/mentions/serv…
tassoevan Jan 31, 2026
b1e461b
refactor: migrate unit test `apps/meteor/tests/unit/app/mentions/clie…
tassoevan Jan 31, 2026
fb02e6e
refactor: migrate unit test `apps/meteor/tests/unit/app/utils/lib/get…
tassoevan Jan 31, 2026
10669dd
refactor: migrate some mock modules to TypeScript
tassoevan Feb 1, 2026
b60ab8f
refactor: migrate unit test `apps/meteor/tests/unit/app/apps/server/m…
tassoevan Feb 1, 2026
8e702c1
refactor: migrate unit test `apps/meteor/tests/unit/app/apps/server/r…
tassoevan Feb 1, 2026
2132361
refactor: delete useless unit test
tassoevan Feb 1, 2026
4541f5e
refactor: migrate `apps/meteor/.storybook/mocks/meteor.js` to TypeScript
tassoevan Feb 1, 2026
f31c648
refactor: review over `apps/meteor/app/apps/server/converters/visitor…
tassoevan Feb 2, 2026
fa4d2e5
refactor: review over `apps/meteor/app/lib/server/oauth/facebook.ts`
tassoevan Feb 2, 2026
7dcc50c
refactor: review over `apps/meteor/app/apps/server/converters/departm…
tassoevan Feb 2, 2026
5a27e0f
refactor: review over `apps/meteor/app/lib/server/functions/validateC…
tassoevan Feb 2, 2026
21fc7d1
refactor: review over `apps/meteor/app/lib/server/oauth/google.ts`
tassoevan Feb 2, 2026
05e5b5a
refactor: review over `apps/meteor/app/custom-oauth/server/transform_…
tassoevan Feb 2, 2026
16ed652
refactor: review over `apps/meteor/ee/lib/misc/determineFileType.ts`
tassoevan Feb 2, 2026
998bcd9
refactor: review over `apps/meteor/server/configuration/accounts_meld…
tassoevan Feb 2, 2026
90bade6
refactor: review over `apps/meteor/app/lib/server/oauth/google.ts`
tassoevan Feb 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions apps/meteor/.mocharc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module.exports = {
'ee/tests/**/*.tests.ts',
'ee/tests/**/*.spec.ts',
'tests/unit/app/**/*.spec.ts',
'tests/unit/app/**/*.tests.js',
'tests/unit/app/**/*.tests.ts',
'tests/unit/lib/**/*.tests.ts',
'server/routes/avatar/**/*.spec.ts',
Expand All @@ -28,7 +27,6 @@ module.exports = {
'tests/unit/server/**/*.spec.ts',
'app/api/server/lib/**/*.spec.ts',
'app/file-upload/server/**/*.spec.ts',
'app/statistics/server/**/*.spec.ts',
'app/livechat/server/lib/**/*.spec.ts',
],
};
4 changes: 2 additions & 2 deletions apps/meteor/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { StorybookConfig } from '@storybook/react-webpack5';
import webpack from 'webpack';

export default {
stories: ['../client/**/*.stories.{js,tsx}', '../app/**/*.stories.{js,tsx}', '../ee/app/**/*.stories.{js,tsx}'],
stories: ['../client/**/*.stories.{js,tsx}'],

addons: [
getAbsolutePath('@storybook/addon-essentials'),
Expand Down Expand Up @@ -44,7 +44,7 @@ export default {
});

config.plugins?.push(
new webpack.NormalModuleReplacementPlugin(/^meteor/, require.resolve('./mocks/meteor.js')),
new webpack.NormalModuleReplacementPlugin(/^meteor/, require.resolve('./mocks/meteor.ts')),
new webpack.NormalModuleReplacementPlugin(/(app)\/*.*\/(server)\/*/, require.resolve('./mocks/empty.ts')),
);

Expand Down
95 changes: 0 additions & 95 deletions apps/meteor/.storybook/mocks/meteor.js

This file was deleted.

95 changes: 95 additions & 0 deletions apps/meteor/.storybook/mocks/meteor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
export const Meteor = {
Device: {
isDesktop: () => false,
},
isClient: true,
isServer: false,
_localStorage: window.localStorage,
absoluteUrl: Object.assign(() => undefined, {
defaultOptions: {},
}),
userId: () => undefined,
Streamer: () => ({
on: () => undefined,
removeListener: () => undefined,
}),
StreamerCentral: {
on: () => undefined,
removeListener: () => undefined,
},
startup: () => undefined,
methods: () => undefined,
call: () => undefined,
connection: {
_stream: {
on: () => undefined,
},
},
users: {},
};

export const Tracker = {
autorun: () => ({
stop: () => undefined,
}),
nonreactive: (fn: () => void) => fn(),
Dependency: () => undefined,
};

export const Accounts = {
onLogin: () => undefined,
onLogout: () => undefined,
};

export const Mongo = {
Collection: () => ({
find: () => ({
observe: () => undefined,
fetch: () => [],
}),
}),
};

export const ReactiveVar = <T>(val: T) => {
let currentVal = val;
return {
get: () => currentVal,
set: (val: T) => {
currentVal = val;
},
};
};

export const ReactiveDict = () => ({
get: () => undefined,
set: () => undefined,
all: () => undefined,
});

export const Template = Object.assign(
() => ({
onCreated: () => undefined,
onRendered: () => undefined,
onDestroyed: () => undefined,
helpers: () => undefined,
events: () => undefined,
}),
{
registerHelper: () => undefined,
__checkName: () => undefined,
},
);

export const check = () => undefined;

export const FlowRouter = {
route: () => undefined,
group: () => ({
route: () => undefined,
}),
};

export const Session = {
get: () => undefined,
set: () => undefined,
};
17 changes: 0 additions & 17 deletions apps/meteor/app/2fa/server/MethodInvocationOverride.js

This file was deleted.

26 changes: 26 additions & 0 deletions apps/meteor/app/2fa/server/MethodInvocationOverride.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { DDP } from 'meteor/ddp';
import { DDPCommon } from 'meteor/ddp-common';

class MethodInvocation extends DDPCommon.MethodInvocation {
twoFactorChecked?: boolean;

constructor(options: {
connection: {
id: string;
close: () => void;
clientAddress: string;
httpHeaders: Record<string, any>;
};
isSimulation?: boolean;
userId?: string;
}) {
super(options);
const currentInvocation = DDP._CurrentInvocation.get();

if (currentInvocation) {
this.twoFactorChecked = (currentInvocation as MethodInvocation).twoFactorChecked;
}
}
}

DDPCommon.MethodInvocation = MethodInvocation;
1 change: 1 addition & 0 deletions apps/meteor/app/2fa/server/code/PasswordCheckFallback.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { IUser } from '@rocket.chat/core-typings';
import { Accounts } from 'meteor/accounts-base';
import type { Meteor } from 'meteor/meteor';

import type { ICodeCheck, IProcessInvalidCodeResult } from './ICodeCheck';
import { settings } from '../../../settings/server';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/api/server/ApiClass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ export class APIClass<TBasePath extends string = '', TOperations extends Record<
});

try {
const auth = await DDP._CurrentInvocation.withValue(invocation as any, async () => Meteor.callAsync('login', args));
const auth = await DDP._CurrentInvocation.withValue(invocation, async () => Meteor.callAsync('login', args));
this.user = await Users.findOne(
{
_id: auth.id,
Expand Down
Loading
Loading