Skip to content

Commit d832f91

Browse files
authored
chore: Recolocate Meteor-related client-side modules under client/meteor (RocketChat#36895)
1 parent a45420b commit d832f91

28 files changed

Lines changed: 37 additions & 38 deletions

apps/meteor/app/authorization/client/hasPermission.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Meteor } from 'meteor/meteor';
33

44
import { hasRole } from './hasRole';
55
import { PermissionsCachedStore } from '../../../client/cachedStores';
6-
import { watch } from '../../../client/lib/cachedStores';
6+
import { watch } from '../../../client/meteor/watch';
77
import { Permissions, Users } from '../../../client/stores';
88
import { AuthorizationUtils } from '../lib/AuthorizationUtils';
99

apps/meteor/app/authorization/client/hasRole.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { IUser, IRole, IRoom } from '@rocket.chat/core-typings';
22

3-
import { watch } from '../../../client/lib/cachedStores';
3+
import { watch } from '../../../client/meteor/watch';
44
import { Roles, Subscriptions, Users } from '../../../client/stores';
55

66
export const hasRole = (userId: IUser['_id'], roleId: IRole['_id'], scope?: IRoom['_id']): boolean => {

apps/meteor/client/lib/cachedStores/CachedStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import { baseURI } from '../baseURI';
1010
import { onLoggedIn } from '../loggedIn';
1111
import { CachedStoresManager } from './CachedStoresManager';
1212
import type { IDocumentMapStore } from './DocumentMapStore';
13-
import { watch } from './watch';
1413
import { sdk } from '../../../app/utils/client/lib/SDKClient';
1514
import { isTruthy } from '../../../lib/isTruthy';
1615
import { withDebouncing } from '../../../lib/utils/highOrderFunctions';
16+
import { watch } from '../../meteor/watch';
1717
import { getConfig } from '../utils/getConfig';
1818

1919
type Name = 'rooms' | 'subscriptions' | 'permissions' | 'public-settings' | 'private-settings';

apps/meteor/client/lib/cachedStores/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ export { pipe } from './pipe';
33
export { applyQueryOptions } from './utils';
44
export { createDocumentMapStore, type IDocumentMapStore } from './DocumentMapStore';
55
export { MinimongoCollection } from './MinimongoCollection';
6-
export { watch } from './watch';
76
export { PublicCachedStore, PrivateCachedStore } from './CachedStore';
87
export { createGlobalStore } from './createGlobalStore';

apps/meteor/client/lib/customOAuth/CustomOAuth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { OAuth } from 'meteor/oauth';
77

88
import { isURL } from '../../../lib/utils/isURL';
99
import type { IOAuthProvider } from '../../definitions/IOAuthProvider';
10-
import { createOAuthTotpLoginMethod } from '../../meteorOverrides/login/oauth';
10+
import { createOAuthTotpLoginMethod } from '../../meteor/overrides/login/oauth';
1111
import { overrideLoginMethod, type LoginCallback } from '../2fa/overrideLoginMethod';
1212
import { loginServices } from '../loginServices';
1313
import { CustomOAuthError } from './CustomOAuthError';

apps/meteor/client/lib/settings/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { SettingValue } from '@rocket.chat/core-typings';
22

3+
import { watch } from '../../meteor/watch';
34
import { PublicSettings } from '../../stores';
4-
import { watch } from '../cachedStores';
55

66
type SettingCallback = (key: string, value: SettingValue) => void;
77

apps/meteor/client/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import './startup/accounts';
33
import './startup/fakeUserPresence';
44

55
import('@rocket.chat/fuselage-polyfills')
6-
.then(() => import('./meteorOverrides'))
6+
.then(() => import('./meteor/overrides'))
77
.then(() => import('./ecdh'))
88
.then(() => import('./importPackages'))
99
.then(() => import('./startup'))

apps/meteor/client/meteorOverrides/ddpOverREST.ts renamed to apps/meteor/client/meteor/overrides/ddpOverREST.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { DDPCommon } from 'meteor/ddp-common';
22
import { Meteor } from 'meteor/meteor';
33
import { Tracker } from 'meteor/tracker';
44

5-
import { sdk } from '../../app/utils/client/lib/SDKClient';
5+
import { sdk } from '../../../app/utils/client/lib/SDKClient';
66

77
const bypassMethods: string[] = ['setUserStatus', 'logout'];
88

File renamed without changes.

apps/meteor/client/meteorOverrides/login/cas.ts renamed to apps/meteor/client/meteor/overrides/login/cas.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Random } from '@rocket.chat/random';
22
import { Meteor } from 'meteor/meteor';
33

4-
import { callLoginMethod } from '../../lib/2fa/overrideLoginMethod';
4+
import { callLoginMethod } from '../../../lib/2fa/overrideLoginMethod';
55

66
declare module 'meteor/meteor' {
77
// eslint-disable-next-line @typescript-eslint/no-namespace
@@ -12,7 +12,7 @@ declare module 'meteor/meteor' {
1212

1313
Meteor.loginWithCas = (_, callback) => {
1414
const credentialToken = Random.id();
15-
import('../../lib/openCASLoginPopup')
15+
import('../../../lib/openCASLoginPopup')
1616
.then(({ openCASLoginPopup }) => openCASLoginPopup(credentialToken))
1717
.then(() => callLoginMethod({ methodArguments: [{ cas: { credentialToken } }] }))
1818
.then(() => callback?.())

0 commit comments

Comments
 (0)