From 27adffcae2b16e20a39f436a1ae49c4984e6d49d Mon Sep 17 00:00:00 2001 From: Gustavo Reis Bauer Date: Wed, 23 Oct 2024 12:22:50 -0300 Subject: [PATCH 01/11] regression: not allowed to install marketplace apps (#33695) --- apps/meteor/app/api/server/v1/misc.ts | 3 +- apps/meteor/app/apps/server/bridges/cloud.ts | 2 +- .../functions/getWorkspaceAccessToken.ts | 21 ++++++++++---- .../getWorkspaceAccessTokenWithScope.ts | 19 ++++++++++-- .../server/functions/saveRegistrationData.ts | 8 +---- .../ee/server/apps/communication/rest.ts | 4 +-- .../server/models/raw/WorkspaceCredentials.ts | 29 +++---------------- apps/meteor/server/startup/migrations/v316.ts | 15 ++-------- .../src/ee/IWorkspaceCredentials.ts | 2 +- .../src/models/IWorkspaceCredentialsModel.ts | 1 - 10 files changed, 45 insertions(+), 59 deletions(-) diff --git a/apps/meteor/app/api/server/v1/misc.ts b/apps/meteor/app/api/server/v1/misc.ts index 5cd522d20533..c026236231d8 100644 --- a/apps/meteor/app/api/server/v1/misc.ts +++ b/apps/meteor/app/api/server/v1/misc.ts @@ -664,7 +664,8 @@ API.v1.addRoute( const settingsIds: string[] = []; if (this.bodyParams.setDeploymentAs === 'new-workspace') { - await WorkspaceCredentials.unsetCredentialByScope(); + await WorkspaceCredentials.removeAllCredentials(); + settingsIds.push( 'Cloud_Service_Agree_PrivacyTerms', 'Cloud_Workspace_Id', diff --git a/apps/meteor/app/apps/server/bridges/cloud.ts b/apps/meteor/app/apps/server/bridges/cloud.ts index 30ca897240f8..0f908ccfe0a3 100644 --- a/apps/meteor/app/apps/server/bridges/cloud.ts +++ b/apps/meteor/app/apps/server/bridges/cloud.ts @@ -12,7 +12,7 @@ export class AppCloudBridge extends CloudWorkspaceBridge { public async getWorkspaceToken(scope: string, appId: string): Promise { this.orch.debugLog(`App ${appId} is getting the workspace's token`); - const token = await getWorkspaceAccessTokenWithScope(scope); + const token = await getWorkspaceAccessTokenWithScope({ scope }); return token; } diff --git a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts index 93cfa3266ecf..6595c8e90fc4 100644 --- a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts +++ b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts @@ -1,6 +1,8 @@ import type { IWorkspaceCredentials } from '@rocket.chat/core-typings'; import { WorkspaceCredentials } from '@rocket.chat/models'; +import { SystemLogger } from '../../../../server/lib/logger/system'; +import { workspaceScopes } from '../oauthScopes'; import { getWorkspaceAccessTokenWithScope } from './getWorkspaceAccessTokenWithScope'; import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; @@ -24,20 +26,27 @@ export async function getWorkspaceAccessToken(forceNew = false, scope = '', save return ''; } - const workspaceCredentials = await WorkspaceCredentials.getCredentialByScope(scope); - if (!workspaceCredentials) { - throw new CloudWorkspaceAccessTokenError(); + // Note: If no scope is given, it means we should assume the default scope, we store the default scopes + // in the global variable workspaceScopes. + if (scope === '') { + scope = workspaceScopes.join(' '); } - if (!hasWorkspaceAccessTokenExpired(workspaceCredentials) && !forceNew) { + const workspaceCredentials = await WorkspaceCredentials.getCredentialByScope(scope); + if (workspaceCredentials && !hasWorkspaceAccessTokenExpired(workspaceCredentials) && !forceNew) { + SystemLogger.debug( + `Workspace credentials cache hit using scope: ${scope}. Avoiding generating a new access token from cloud services.`, + ); return workspaceCredentials.accessToken; } - const accessToken = await getWorkspaceAccessTokenWithScope(scope, throwOnError); + SystemLogger.debug(`Workspace credentials cache miss using scope: ${scope}, fetching new access token from cloud services.`); + + const accessToken = await getWorkspaceAccessTokenWithScope({ scope, throwOnError }); if (save) { await WorkspaceCredentials.updateCredentialByScope({ - scope, + scope: accessToken.scope, accessToken: accessToken.token, expirationDate: accessToken.expiresAt, }); diff --git a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts index 3a04031ebb88..1137b899967a 100644 --- a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts +++ b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts @@ -8,10 +8,24 @@ import { CloudWorkspaceAccessTokenError } from './getWorkspaceAccessToken'; import { removeWorkspaceRegistrationInfo } from './removeWorkspaceRegistrationInfo'; import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -export async function getWorkspaceAccessTokenWithScope(scope = '', throwOnError = false) { +type WorkspaceAccessTokenWithScope = { + token: string; + expiresAt: Date; + scope: string; +}; + +type GetWorkspaceAccessTokenWithScopeParams = { + scope?: string; + throwOnError?: boolean; +}; + +export async function getWorkspaceAccessTokenWithScope({ + scope = '', + throwOnError = false, +}: GetWorkspaceAccessTokenWithScopeParams): Promise { const { workspaceRegistered } = await retrieveRegistrationStatus(); - const tokenResponse = { token: '', expiresAt: new Date() }; + const tokenResponse = { token: '', expiresAt: new Date(), scope: '' }; if (!workspaceRegistered) { return tokenResponse; @@ -62,6 +76,7 @@ export async function getWorkspaceAccessTokenWithScope(scope = '', throwOnError return { token: payload.access_token, expiresAt, + scope: payload.scope, }; } catch (err: any) { if (err instanceof CloudWorkspaceAccessTokenError) { diff --git a/apps/meteor/app/cloud/server/functions/saveRegistrationData.ts b/apps/meteor/app/cloud/server/functions/saveRegistrationData.ts index 746904687d67..63633c567845 100644 --- a/apps/meteor/app/cloud/server/functions/saveRegistrationData.ts +++ b/apps/meteor/app/cloud/server/functions/saveRegistrationData.ts @@ -1,5 +1,5 @@ import { applyLicense } from '@rocket.chat/license'; -import { Settings, WorkspaceCredentials } from '@rocket.chat/models'; +import { Settings } from '@rocket.chat/models'; import { notifyOnSettingChangedById } from '../../../lib/server/lib/notifyListener'; import { settings } from '../../../settings/server'; @@ -59,12 +59,6 @@ async function saveRegistrationDataBase({ { _id: 'Cloud_Workspace_Registration_Client_Uri', value: registration_client_uri }, ]; - await WorkspaceCredentials.updateCredentialByScope({ - scope: '', - accessToken: '', - expirationDate: new Date(0), - }); - const promises = [...settingsData.map(({ _id, value }) => Settings.updateValueById(_id, value))]; (await Promise.all(promises)).forEach((value, index) => { diff --git a/apps/meteor/ee/server/apps/communication/rest.ts b/apps/meteor/ee/server/apps/communication/rest.ts index fc597d00857c..0283f2eef783 100644 --- a/apps/meteor/ee/server/apps/communication/rest.ts +++ b/apps/meteor/ee/server/apps/communication/rest.ts @@ -189,7 +189,7 @@ export class AppsRestApi { return API.v1.failure({ error: 'Invalid purchase type' }); } - const response = await getWorkspaceAccessTokenWithScope('marketplace:purchase'); + const response = await getWorkspaceAccessTokenWithScope({ scope: 'marketplace:purchase' }); if (!response.token) { return API.v1.failure({ error: 'Unauthorized' }); } @@ -289,7 +289,7 @@ export class AppsRestApi { return API.v1.failure({ error: 'Invalid purchase type' }); } - const token = await getWorkspaceAccessTokenWithScope('marketplace:purchase'); + const token = await getWorkspaceAccessTokenWithScope({ scope: 'marketplace:purchase' }); if (!token) { return API.v1.failure({ error: 'Unauthorized' }); } diff --git a/apps/meteor/server/models/raw/WorkspaceCredentials.ts b/apps/meteor/server/models/raw/WorkspaceCredentials.ts index b989ace8c2a3..09706cdec4bb 100644 --- a/apps/meteor/server/models/raw/WorkspaceCredentials.ts +++ b/apps/meteor/server/models/raw/WorkspaceCredentials.ts @@ -10,31 +10,15 @@ export class WorkspaceCredentialsRaw extends BaseRaw impl } protected modelIndexes(): IndexDescription[] { - return [{ key: { scopes: 1, expirationDate: 1, accessToken: 1 }, unique: true }]; + return [{ key: { scope: 1, expirationDate: 1, accessToken: 1 }, unique: true }]; } getCredentialByScope(scope = ''): Promise { - const query: Filter = { - scopes: { - $all: [scope], - $size: 1, - }, - }; + const query: Filter = { scope }; return this.findOne(query); } - unsetCredentialByScope(scope = ''): Promise { - const query: Filter = { - scopes: { - $all: [scope], - $size: 1, - }, - }; - - return this.deleteOne(query); - } - updateCredentialByScope({ scope, accessToken, @@ -46,18 +30,13 @@ export class WorkspaceCredentialsRaw extends BaseRaw impl }): Promise { const record = { $set: { - scopes: [scope], + scope, accessToken, expirationDate, }, }; - const query: Filter = { - scopes: { - $all: [scope], - $size: 1, - }, - }; + const query: Filter = { scope }; return this.updateOne(query, record, { upsert: true }); } diff --git a/apps/meteor/server/startup/migrations/v316.ts b/apps/meteor/server/startup/migrations/v316.ts index c8641b896e77..210dafc4483f 100644 --- a/apps/meteor/server/startup/migrations/v316.ts +++ b/apps/meteor/server/startup/migrations/v316.ts @@ -1,16 +1,11 @@ -import { Settings, WorkspaceCredentials } from '@rocket.chat/models'; +import { Settings } from '@rocket.chat/models'; import { addMigration } from '../../lib/migrations'; addMigration({ version: 316, - name: 'Remove Cloud_Workspace_Access_Token and Cloud_Workspace_Access_Token_Expires_At from the settings collection and add to the WorkspaceCredentials collection', + name: 'Remove Cloud_Workspace_Access_Token and Cloud_Workspace_Access_Token_Expires_At from the settings collection', async up() { - const workspaceCredentials = await WorkspaceCredentials.getCredentialByScope(); - if (workspaceCredentials) { - return; - } - const accessToken = ((await Settings.getValueById('Cloud_Workspace_Access_Token')) as string) || ''; const expirationDate = ((await Settings.getValueById('Cloud_Workspace_Access_Token_Expires_At')) as Date) || new Date(0); @@ -21,11 +16,5 @@ addMigration({ if (expirationDate) { await Settings.removeById('Cloud_Workspace_Access_Token_Expires_At'); } - - await WorkspaceCredentials.updateCredentialByScope({ - scope: '', - accessToken, - expirationDate, - }); }, }); diff --git a/packages/core-typings/src/ee/IWorkspaceCredentials.ts b/packages/core-typings/src/ee/IWorkspaceCredentials.ts index 1acf4570f3cf..1fda00d0c8b3 100644 --- a/packages/core-typings/src/ee/IWorkspaceCredentials.ts +++ b/packages/core-typings/src/ee/IWorkspaceCredentials.ts @@ -2,7 +2,7 @@ import type { IRocketChatRecord } from '../IRocketChatRecord'; export interface IWorkspaceCredentials extends IRocketChatRecord { _id: string; - scopes: string[]; + scope: string; expirationDate: Date; accessToken: string; } diff --git a/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts b/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts index 58b9a8a5049d..fa13dfa82977 100644 --- a/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts +++ b/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts @@ -5,7 +5,6 @@ import type { IBaseModel } from './IBaseModel'; export interface IWorkspaceCredentialsModel extends IBaseModel { getCredentialByScope(scope?: string): Promise; - unsetCredentialByScope(scope?: string): Promise; updateCredentialByScope(credentials: { scope: string; accessToken: string; expirationDate: Date }): Promise; removeAllCredentials(): Promise; } From 696df97b2d25347a4825338a0932dedeaf861ecd Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Tue, 22 Oct 2024 13:22:51 -0300 Subject: [PATCH 02/11] regression: properly overwrite `Email.sendAsync` --- apps/meteor/packages/rocketchat-mongo-config/server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/packages/rocketchat-mongo-config/server/index.js b/apps/meteor/packages/rocketchat-mongo-config/server/index.js index 0cf40df6bbb4..63343ac64014 100644 --- a/apps/meteor/packages/rocketchat-mongo-config/server/index.js +++ b/apps/meteor/packages/rocketchat-mongo-config/server/index.js @@ -39,7 +39,7 @@ process.env.HTTP_FORWARDED_COUNT = process.env.HTTP_FORWARDED_COUNT || '1'; // Just print to logs if in TEST_MODE due to a bug in Meteor 2.5: TypeError: Cannot read property '_syncSendMail' of null if (process.env.TEST_MODE === 'true') { - Email.sendAsync = function _sendAsync(options) { + Email.sendAsync = async function _sendAsync(options) { console.log('Email.sendAsync', options); }; } else if (process.env.NODE_ENV !== 'development') { From 86713bbfac40712a010e10c565b03912066c4c70 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Wed, 23 Oct 2024 15:19:25 -0300 Subject: [PATCH 03/11] regression: init db tracing within tracing package (#33712) --- _templates/service/new/service.ejs.t | 5 ++++- apps/meteor/server/database/utils.ts | 3 --- apps/meteor/server/tracing.ts | 4 +++- ee/apps/account-service/src/service.ts | 6 +++--- ee/apps/authorization-service/src/service.ts | 6 +++--- ee/apps/ddp-streamer/src/service.ts | 6 +++--- ee/apps/omnichannel-transcript/src/service.ts | 6 +++--- ee/apps/presence-service/src/service.ts | 6 +++--- ee/apps/queue-worker/src/service.ts | 6 +++--- ee/apps/stream-hub-service/src/service.ts | 6 +++--- packages/core-services/src/lib/mongo.ts | 15 +++++++-------- packages/tracing/src/index.ts | 11 +++++++++-- packages/tracing/src/traceDatabaseCalls.ts | 11 ++--------- 13 files changed, 46 insertions(+), 45 deletions(-) diff --git a/_templates/service/new/service.ejs.t b/_templates/service/new/service.ejs.t index 699539365259..bdd160b43cdf 100644 --- a/_templates/service/new/service.ejs.t +++ b/_templates/service/new/service.ejs.t @@ -3,6 +3,7 @@ to: ee/apps/<%= name %>/src/service.ts --- import { api, getConnection, getTrashCollection } from '@rocket.chat/core-services'; import { broker } from '@rocket.chat/network-broker'; +import { startTracing } from '@rocket.chat/tracing'; import polka from 'polka'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; @@ -10,7 +11,9 @@ import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/reg const PORT = process.env.PORT || <%= h.random() %>; (async () => { - const db = await getConnection(); + const { db } = await getConnection(); + + startTracing({ service: '<%= name %>', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/apps/meteor/server/database/utils.ts b/apps/meteor/server/database/utils.ts index e07df1e9e737..ec3864586924 100644 --- a/apps/meteor/server/database/utils.ts +++ b/apps/meteor/server/database/utils.ts @@ -1,6 +1,3 @@ -import { initDatabaseTracing } from '@rocket.chat/tracing'; import { MongoInternals } from 'meteor/mongo'; export const { db, client } = MongoInternals.defaultRemoteCollectionDriver().mongo; - -initDatabaseTracing(client); diff --git a/apps/meteor/server/tracing.ts b/apps/meteor/server/tracing.ts index e08bfebb20ac..8496ce1c49e3 100644 --- a/apps/meteor/server/tracing.ts +++ b/apps/meteor/server/tracing.ts @@ -1,3 +1,5 @@ import { startTracing } from '@rocket.chat/tracing'; -startTracing({ service: 'core' }); +import { client } from './database/utils'; + +startTracing({ service: 'core', db: client }); diff --git a/ee/apps/account-service/src/service.ts b/ee/apps/account-service/src/service.ts index b5279998a52b..e9e8cd8bef83 100755 --- a/ee/apps/account-service/src/service.ts +++ b/ee/apps/account-service/src/service.ts @@ -5,12 +5,12 @@ import polka from 'polka'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; -startTracing({ service: 'account-service' }); - const PORT = process.env.PORT || 3033; (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'account-service', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/authorization-service/src/service.ts b/ee/apps/authorization-service/src/service.ts index 699de7aeb518..8b3350c5f754 100755 --- a/ee/apps/authorization-service/src/service.ts +++ b/ee/apps/authorization-service/src/service.ts @@ -7,10 +7,10 @@ import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/reg const PORT = process.env.PORT || 3034; -startTracing({ service: 'authorization-service' }); - (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'authorization-service', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/ddp-streamer/src/service.ts b/ee/apps/ddp-streamer/src/service.ts index 4b43e1baed96..66ad72be4050 100755 --- a/ee/apps/ddp-streamer/src/service.ts +++ b/ee/apps/ddp-streamer/src/service.ts @@ -4,10 +4,10 @@ import { startTracing } from '@rocket.chat/tracing'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; -startTracing({ service: 'ddp-streamer' }); - (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'ddp-streamer', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/omnichannel-transcript/src/service.ts b/ee/apps/omnichannel-transcript/src/service.ts index e313c0069e8d..e78d646bf9ea 100644 --- a/ee/apps/omnichannel-transcript/src/service.ts +++ b/ee/apps/omnichannel-transcript/src/service.ts @@ -6,12 +6,12 @@ import polka from 'polka'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; -startTracing({ service: 'omnichannel-transcript' }); - const PORT = process.env.PORT || 3036; (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'omnichannel-transcript', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/presence-service/src/service.ts b/ee/apps/presence-service/src/service.ts index 5114c712dae7..f1e86419fc69 100755 --- a/ee/apps/presence-service/src/service.ts +++ b/ee/apps/presence-service/src/service.ts @@ -5,12 +5,12 @@ import polka from 'polka'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; -startTracing({ service: 'presence-service' }); - const PORT = process.env.PORT || 3031; (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'presence-service', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/queue-worker/src/service.ts b/ee/apps/queue-worker/src/service.ts index a66d1a579bad..e936621e3389 100644 --- a/ee/apps/queue-worker/src/service.ts +++ b/ee/apps/queue-worker/src/service.ts @@ -6,12 +6,12 @@ import polka from 'polka'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; -startTracing({ service: 'queue-worker' }); - const PORT = process.env.PORT || 3038; (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'queue-worker', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/stream-hub-service/src/service.ts b/ee/apps/stream-hub-service/src/service.ts index 26cea9676a02..84567026733c 100755 --- a/ee/apps/stream-hub-service/src/service.ts +++ b/ee/apps/stream-hub-service/src/service.ts @@ -8,12 +8,12 @@ import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/reg import { DatabaseWatcher } from '../../../../apps/meteor/server/database/DatabaseWatcher'; import { StreamHub } from './StreamHub'; -startTracing({ service: 'stream-hub-service' }); - const PORT = process.env.PORT || 3035; (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'stream-hub-service', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/packages/core-services/src/lib/mongo.ts b/packages/core-services/src/lib/mongo.ts index b41d838cd4a7..d61eab602145 100644 --- a/packages/core-services/src/lib/mongo.ts +++ b/packages/core-services/src/lib/mongo.ts @@ -1,4 +1,4 @@ -import { initDatabaseTracing, isTracingEnabled } from '@rocket.chat/tracing'; +import { isTracingEnabled } from '@rocket.chat/tracing'; import { MongoClient } from 'mongodb'; import type { Db, Collection, MongoClientOptions, Document } from 'mongodb'; @@ -21,28 +21,27 @@ function connectDb(options?: MongoClientOptions): Promise { let db: Db; -export const getConnection = ((): ((options?: MongoClientOptions) => Promise) => { +export const getConnection = ((): ((options?: MongoClientOptions) => Promise<{ db: Db; client: MongoClient }>) => { let client: MongoClient; - return async (options): Promise => { + return async (options): Promise<{ db: Db; client: MongoClient }> => { if (db) { - return db; + return { db, client }; } if (client == null) { client = await connectDb(options); db = client.db(name); } - initDatabaseTracing(client); - // if getConnection was called multiple times before it was connected, wait for the connection - return client.db(name); + return { client, db: client.db(name) }; }; })(); export async function getTrashCollection(): Promise> { if (!db) { - db = await getConnection(); + const { db: clientDb } = await getConnection(); + db = clientDb; } return db.collection('rocketchat__trash'); } diff --git a/packages/tracing/src/index.ts b/packages/tracing/src/index.ts index 8e97dabc63c5..95e726fd4420 100644 --- a/packages/tracing/src/index.ts +++ b/packages/tracing/src/index.ts @@ -2,8 +2,9 @@ import { context, propagation, SpanStatusCode, trace } from '@opentelemetry/api' import type { Span, SpanOptions, Tracer } from '@opentelemetry/api'; import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; import { NodeSDK } from '@opentelemetry/sdk-node'; +import type { MongoClient } from 'mongodb'; -export { initDatabaseTracing } from './traceDatabaseCalls'; +import { initDatabaseTracing } from './traceDatabaseCalls'; let tracer: Tracer | undefined; @@ -11,7 +12,11 @@ export function isTracingEnabled() { return ['yes', 'true'].includes(String(process.env.TRACING_ENABLED).toLowerCase()); } -export const startTracing = ({ service }: { service: string }) => { +export const startTracing = ({ service, db }: { service: string; db: MongoClient }) => { + if (!isTracingEnabled()) { + return; + } + const exporter = new OTLPTraceExporter(); const sdk = new NodeSDK({ @@ -22,6 +27,8 @@ export const startTracing = ({ service }: { service: string }) => { sdk.start(); tracer = trace.getTracer(service); + + initDatabaseTracing(tracer, db); }; export function tracerSpan ReturnType>( diff --git a/packages/tracing/src/traceDatabaseCalls.ts b/packages/tracing/src/traceDatabaseCalls.ts index 6ddde0b39753..8f5f2ba4a7bd 100644 --- a/packages/tracing/src/traceDatabaseCalls.ts +++ b/packages/tracing/src/traceDatabaseCalls.ts @@ -1,15 +1,8 @@ +import type { Tracer } from '@opentelemetry/api'; import { trace, context, SpanStatusCode } from '@opentelemetry/api'; import type { MongoClient } from 'mongodb'; -import { isTracingEnabled } from '.'; - -const tracer = trace.getTracer('core'); - -export const initDatabaseTracing = (client: MongoClient) => { - if (!isTracingEnabled()) { - return; - } - +export const initDatabaseTracing = (tracer: Tracer, client: MongoClient) => { const DurationStart = new Map(); client.on('commandStarted', (event) => { From c683a417cd0b7e8e07b9d4f410d9915df2d5af61 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Wed, 23 Oct 2024 16:00:26 -0300 Subject: [PATCH 04/11] regression: properly overwrite `OAuth._retrievePendingCredential` --- apps/meteor/app/2fa/server/loginHandler.ts | 4 ++-- apps/meteor/definition/externals/meteor/oauth.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/meteor/app/2fa/server/loginHandler.ts b/apps/meteor/app/2fa/server/loginHandler.ts index 26c9869a132f..1555a7904ae2 100644 --- a/apps/meteor/app/2fa/server/loginHandler.ts +++ b/apps/meteor/app/2fa/server/loginHandler.ts @@ -71,11 +71,11 @@ const recreateError = (errorDoc: Error | Meteor.Error): Error | Meteor.Error => return copyTo(errorDoc, error); }; -OAuth._retrievePendingCredential = function (key, ...args): string | Error | void { +OAuth._retrievePendingCredential = async function (key, ...args): Promise { const credentialSecret = args.length > 0 && args[0] !== undefined ? args[0] : undefined; check(key, String); - const pendingCredential = OAuth._pendingCredentials.findOne({ + const pendingCredential = await OAuth._pendingCredentials.findOneAsync({ key, credentialSecret, }); diff --git a/apps/meteor/definition/externals/meteor/oauth.d.ts b/apps/meteor/definition/externals/meteor/oauth.d.ts index f07ede0b0b54..ff14ee1b8541 100644 --- a/apps/meteor/definition/externals/meteor/oauth.d.ts +++ b/apps/meteor/definition/externals/meteor/oauth.d.ts @@ -13,7 +13,7 @@ declare module 'meteor/oauth' { } namespace OAuth { - function _retrievePendingCredential(key: string, ...args: string[]): void; + function _retrievePendingCredential(key: string, ...args: string[]): Promise; function openSecret(secret: string): string; function retrieveCredential(credentialToken: string, credentialSecret: string); function _retrieveCredentialSecret(credentialToken: string): string | null; From 0649a67e1e9d5d017b962a043bba93dc8209e76e Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Wed, 23 Oct 2024 16:05:19 -0300 Subject: [PATCH 05/11] chore: npm install as rocketchat user (#33726) Co-authored-by: Diego Sampaio --- apps/meteor/.docker/Dockerfile.debian | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/apps/meteor/.docker/Dockerfile.debian b/apps/meteor/.docker/Dockerfile.debian index c8ede9db3cae..7bbca15a9142 100644 --- a/apps/meteor/.docker/Dockerfile.debian +++ b/apps/meteor/.docker/Dockerfile.debian @@ -30,21 +30,27 @@ ENV DEPLOY_METHOD=docker \ RUN aptMark="$(apt-mark showmanual)" \ && apt-get install -y --no-install-recommends g++ make python3 ca-certificates \ - && cd /app/bundle/programs/server \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $aptMark > /dev/null + +USER rocketchat + +RUN cd /app/bundle/programs/server \ && npm install \ && cd npm/node_modules/isolated-vm \ && npm install \ - && apt-mark auto '.*' > /dev/null \ - && apt-mark manual $aptMark > /dev/null \ - && find /usr/local -type f -executable -exec ldd '{}' ';' \ + && npm cache clear --force + +USER root + +RUN find /usr/local -type f -executable -exec ldd '{}' ';' \ | awk '/=>/ { print $(NF-1) }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ | sort -u \ | xargs -r apt-mark manual \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && npm cache clear --force + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false USER rocketchat From 09bb4ca90337a5053fb70eee23a949b532958fdf Mon Sep 17 00:00:00 2001 From: rocketchat-github-ci Date: Wed, 23 Oct 2024 20:58:56 +0000 Subject: [PATCH 06/11] Release 7.0.0-rc.3 [no ci] --- .changeset/bump-patch-1729717124346.md | 5 +++ .changeset/pre.json | 1 + apps/meteor/CHANGELOG.md | 35 +++++++++++++++++++ apps/meteor/app/utils/rocketchat.info | 2 +- apps/meteor/ee/server/services/CHANGELOG.md | 14 ++++++++ apps/meteor/ee/server/services/package.json | 2 +- apps/meteor/package.json | 2 +- apps/uikit-playground/CHANGELOG.md | 12 +++++++ apps/uikit-playground/package.json | 2 +- ee/apps/account-service/CHANGELOG.md | 14 ++++++++ ee/apps/account-service/package.json | 2 +- ee/apps/authorization-service/CHANGELOG.md | 14 ++++++++ ee/apps/authorization-service/package.json | 2 +- ee/apps/ddp-streamer/CHANGELOG.md | 15 ++++++++ ee/apps/ddp-streamer/package.json | 2 +- ee/apps/omnichannel-transcript/CHANGELOG.md | 15 ++++++++ ee/apps/omnichannel-transcript/package.json | 2 +- ee/apps/presence-service/CHANGELOG.md | 14 ++++++++ ee/apps/presence-service/package.json | 2 +- ee/apps/queue-worker/CHANGELOG.md | 14 ++++++++ ee/apps/queue-worker/package.json | 2 +- ee/apps/stream-hub-service/CHANGELOG.md | 13 +++++++ ee/apps/stream-hub-service/package.json | 2 +- ee/packages/license/CHANGELOG.md | 9 +++++ ee/packages/license/package.json | 2 +- ee/packages/network-broker/CHANGELOG.md | 9 +++++ ee/packages/network-broker/package.json | 2 +- ee/packages/omnichannel-services/CHANGELOG.md | 14 ++++++++ ee/packages/omnichannel-services/package.json | 2 +- ee/packages/pdf-worker/CHANGELOG.md | 9 +++++ ee/packages/pdf-worker/package.json | 2 +- ee/packages/presence/CHANGELOG.md | 11 ++++++ ee/packages/presence/package.json | 2 +- package.json | 2 +- packages/api-client/CHANGELOG.md | 10 ++++++ packages/api-client/package.json | 2 +- packages/apps/CHANGELOG.md | 10 ++++++ packages/apps/package.json | 2 +- packages/core-services/CHANGELOG.md | 11 ++++++ packages/core-services/package.json | 2 +- packages/core-typings/CHANGELOG.md | 2 ++ packages/core-typings/package.json | 2 +- packages/cron/CHANGELOG.md | 10 ++++++ packages/cron/package.json | 2 +- packages/ddp-client/CHANGELOG.md | 11 ++++++ packages/ddp-client/package.json | 2 +- packages/freeswitch/CHANGELOG.md | 9 +++++ packages/freeswitch/package.json | 2 +- packages/fuselage-ui-kit/CHANGELOG.md | 13 +++++++ packages/fuselage-ui-kit/package.json | 8 ++--- packages/gazzodown/CHANGELOG.md | 11 ++++++ packages/gazzodown/package.json | 6 ++-- packages/instance-status/CHANGELOG.md | 9 +++++ packages/instance-status/package.json | 2 +- packages/livechat/CHANGELOG.md | 9 +++++ packages/livechat/package.json | 2 +- packages/model-typings/CHANGELOG.md | 9 +++++ packages/model-typings/package.json | 2 +- packages/models/CHANGELOG.md | 9 +++++ packages/models/package.json | 2 +- packages/rest-typings/CHANGELOG.md | 9 +++++ packages/rest-typings/package.json | 2 +- packages/ui-avatar/CHANGELOG.md | 9 +++++ packages/ui-avatar/package.json | 4 +-- packages/ui-client/CHANGELOG.md | 10 ++++++ packages/ui-client/package.json | 6 ++-- packages/ui-contexts/CHANGELOG.md | 11 ++++++ packages/ui-contexts/package.json | 2 +- packages/ui-video-conf/CHANGELOG.md | 10 ++++++ packages/ui-video-conf/package.json | 6 ++-- packages/ui-voip/CHANGELOG.md | 11 ++++++ packages/ui-voip/package.json | 8 ++--- packages/web-ui-registration/CHANGELOG.md | 9 +++++ packages/web-ui-registration/package.json | 4 +-- yarn.lock | 28 +++++++-------- 75 files changed, 475 insertions(+), 65 deletions(-) create mode 100644 .changeset/bump-patch-1729717124346.md diff --git a/.changeset/bump-patch-1729717124346.md b/.changeset/bump-patch-1729717124346.md new file mode 100644 index 000000000000..e1eaa7980afb --- /dev/null +++ b/.changeset/bump-patch-1729717124346.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Bump @rocket.chat/meteor version. diff --git a/.changeset/pre.json b/.changeset/pre.json index 0d6531af024a..f28b23fe5d37 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -71,6 +71,7 @@ "brown-pants-press", "bump-patch-1729526930133", "bump-patch-1729648473274", + "bump-patch-1729717124346", "chilled-boats-sip", "chilled-files-relate", "chilly-flowers-brake", diff --git a/apps/meteor/CHANGELOG.md b/apps/meteor/CHANGELOG.md index 55bba48a1b49..bae262dff62f 100644 --- a/apps/meteor/CHANGELOG.md +++ b/apps/meteor/CHANGELOG.md @@ -1,5 +1,40 @@ # @rocket.chat/meteor +## 7.0.0-rc.3 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/license@1.0.0-rc.3 + - @rocket.chat/omnichannel-services@0.3.6-rc.3 + - @rocket.chat/pdf-worker@0.2.6-rc.3 + - @rocket.chat/presence@0.2.9-rc.3 + - @rocket.chat/api-client@0.2.9-rc.3 + - @rocket.chat/apps@0.2.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/cron@0.1.9-rc.3 + - @rocket.chat/freeswitch@1.0.0-rc.3 + - @rocket.chat/fuselage-ui-kit@12.0.0-rc.3 + - @rocket.chat/gazzodown@12.0.0-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 + - @rocket.chat/ui-theming@0.4.0-rc.0 + - @rocket.chat/ui-avatar@8.0.0-rc.3 + - @rocket.chat/ui-client@12.0.0-rc.3 + - @rocket.chat/ui-video-conf@12.0.0-rc.3 + - @rocket.chat/ui-voip@2.0.0-rc.3 + - @rocket.chat/web-ui-registration@12.0.0-rc.3 + - @rocket.chat/instance-status@0.1.9-rc.3 +
+ ## 7.0.0-rc.2 ### Patch Changes diff --git a/apps/meteor/app/utils/rocketchat.info b/apps/meteor/app/utils/rocketchat.info index f8048816181e..1411afa507bf 100644 --- a/apps/meteor/app/utils/rocketchat.info +++ b/apps/meteor/app/utils/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "7.0.0-rc.2" + "version": "7.0.0-rc.3" } diff --git a/apps/meteor/ee/server/services/CHANGELOG.md b/apps/meteor/ee/server/services/CHANGELOG.md index f7a48e9a27cc..1f90a13a1af1 100644 --- a/apps/meteor/ee/server/services/CHANGELOG.md +++ b/apps/meteor/ee/server/services/CHANGELOG.md @@ -1,5 +1,19 @@ # rocketchat-services +## 2.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 2.0.0-rc.2 ### Patch Changes diff --git a/apps/meteor/ee/server/services/package.json b/apps/meteor/ee/server/services/package.json index 6d635241a4f9..39ec14932fe8 100644 --- a/apps/meteor/ee/server/services/package.json +++ b/apps/meteor/ee/server/services/package.json @@ -1,7 +1,7 @@ { "name": "rocketchat-services", "private": true, - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.3", "description": "Rocket.Chat Authorization service", "main": "index.js", "scripts": { diff --git a/apps/meteor/package.json b/apps/meteor/package.json index b7ca00afaa94..e7e64332e63c 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/meteor", "description": "The Ultimate Open Source WebChat Platform", - "version": "7.0.0-rc.2", + "version": "7.0.0-rc.3", "private": true, "author": { "name": "Rocket.Chat", diff --git a/apps/uikit-playground/CHANGELOG.md b/apps/uikit-playground/CHANGELOG.md index 6e2bf8c8e980..225633b3ed1e 100644 --- a/apps/uikit-playground/CHANGELOG.md +++ b/apps/uikit-playground/CHANGELOG.md @@ -1,5 +1,17 @@ # @rocket.chat/uikit-playground +## 0.6.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/fuselage-ui-kit@12.0.0-rc.3 + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-avatar@8.0.0-rc.3 +
+ ## 0.6.0-rc.2 ### Patch Changes diff --git a/apps/uikit-playground/package.json b/apps/uikit-playground/package.json index a2bfd9d7de60..aa81d232aba6 100644 --- a/apps/uikit-playground/package.json +++ b/apps/uikit-playground/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/uikit-playground", "private": true, - "version": "0.6.0-rc.2", + "version": "0.6.0-rc.3", "type": "module", "scripts": { "dev": "vite", diff --git a/ee/apps/account-service/CHANGELOG.md b/ee/apps/account-service/CHANGELOG.md index b8b970166a83..6688e03f81c2 100644 --- a/ee/apps/account-service/CHANGELOG.md +++ b/ee/apps/account-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/account-service +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index 601a7236d3ad..d16650ab8d58 100644 --- a/ee/apps/account-service/package.json +++ b/ee/apps/account-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/account-service", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat Account service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/authorization-service/CHANGELOG.md b/ee/apps/authorization-service/CHANGELOG.md index b9305ec47bba..0ad246d9dc90 100644 --- a/ee/apps/authorization-service/CHANGELOG.md +++ b/ee/apps/authorization-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/authorization-service +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index 33bfdcbeff5b..597d3e409bb2 100644 --- a/ee/apps/authorization-service/package.json +++ b/ee/apps/authorization-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/authorization-service", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat Authorization service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/ddp-streamer/CHANGELOG.md b/ee/apps/ddp-streamer/CHANGELOG.md index 129d086b7bc9..1fd57b5ad9cd 100644 --- a/ee/apps/ddp-streamer/CHANGELOG.md +++ b/ee/apps/ddp-streamer/CHANGELOG.md @@ -1,5 +1,20 @@ # @rocket.chat/ddp-streamer +## 0.3.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 + - @rocket.chat/instance-status@0.1.9-rc.3 +
+ ## 0.3.9-rc.2 ### Patch Changes diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index b5e7e8c3c3d5..5d258120daa4 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/ddp-streamer", "private": true, - "version": "0.3.9-rc.2", + "version": "0.3.9-rc.3", "description": "Rocket.Chat DDP-Streamer service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/omnichannel-transcript/CHANGELOG.md b/ee/apps/omnichannel-transcript/CHANGELOG.md index 9cdbcfaf9369..3104ae81e3d2 100644 --- a/ee/apps/omnichannel-transcript/CHANGELOG.md +++ b/ee/apps/omnichannel-transcript/CHANGELOG.md @@ -1,5 +1,20 @@ # @rocket.chat/omnichannel-transcript +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/omnichannel-services@0.3.6-rc.3 + - @rocket.chat/pdf-worker@0.2.6-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index cd9c762a34f0..80e4b4e4df4f 100644 --- a/ee/apps/omnichannel-transcript/package.json +++ b/ee/apps/omnichannel-transcript/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/omnichannel-transcript", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/presence-service/CHANGELOG.md b/ee/apps/presence-service/CHANGELOG.md index 8678a5215b8f..297aa361b91b 100644 --- a/ee/apps/presence-service/CHANGELOG.md +++ b/ee/apps/presence-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/presence-service +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/presence@0.2.9-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index 208a74795886..f9ca853ca550 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/presence-service", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat Presence service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/queue-worker/CHANGELOG.md b/ee/apps/queue-worker/CHANGELOG.md index bba8d6c8e5a1..39c2d5a39b3d 100644 --- a/ee/apps/queue-worker/CHANGELOG.md +++ b/ee/apps/queue-worker/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/queue-worker +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/omnichannel-services@0.3.6-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index 8aa8902d41f1..fdde9ae58b45 100644 --- a/ee/apps/queue-worker/package.json +++ b/ee/apps/queue-worker/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/queue-worker", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/stream-hub-service/CHANGELOG.md b/ee/apps/stream-hub-service/CHANGELOG.md index a04b851bd289..8585e179eecd 100644 --- a/ee/apps/stream-hub-service/CHANGELOG.md +++ b/ee/apps/stream-hub-service/CHANGELOG.md @@ -1,5 +1,18 @@ # @rocket.chat/stream-hub-service +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/stream-hub-service/package.json b/ee/apps/stream-hub-service/package.json index 264d475b6798..69efc6df3f5d 100644 --- a/ee/apps/stream-hub-service/package.json +++ b/ee/apps/stream-hub-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/stream-hub-service", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat Stream Hub service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/packages/license/CHANGELOG.md b/ee/packages/license/CHANGELOG.md index f2ef08dda661..06bcacc17ccc 100644 --- a/ee/packages/license/CHANGELOG.md +++ b/ee/packages/license/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/license +## 1.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 +
+ ## 1.0.0-rc.2 ### Patch Changes diff --git a/ee/packages/license/package.json b/ee/packages/license/package.json index 5e9ad34fb587..1d9fc2733d7f 100644 --- a/ee/packages/license/package.json +++ b/ee/packages/license/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/license", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.3", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/ee/packages/network-broker/CHANGELOG.md b/ee/packages/network-broker/CHANGELOG.md index 693cc81d6134..84a7c6ee70c4 100644 --- a/ee/packages/network-broker/CHANGELOG.md +++ b/ee/packages/network-broker/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/network-broker +## 0.1.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.7.1-rc.3 +
+ ## 0.1.1-rc.2 ### Patch Changes diff --git a/ee/packages/network-broker/package.json b/ee/packages/network-broker/package.json index 7df734e94a0f..d1cc71733da2 100644 --- a/ee/packages/network-broker/package.json +++ b/ee/packages/network-broker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/network-broker", - "version": "0.1.1-rc.2", + "version": "0.1.1-rc.3", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/omnichannel-services/CHANGELOG.md b/ee/packages/omnichannel-services/CHANGELOG.md index eac24f84cd56..997a7b8401f2 100644 --- a/ee/packages/omnichannel-services/CHANGELOG.md +++ b/ee/packages/omnichannel-services/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/omnichannel-services +## 0.3.6-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/pdf-worker@0.2.6-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.3.6-rc.2 ### Patch Changes diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index 9046be3d9f55..5c135d03243e 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/omnichannel-services", - "version": "0.3.6-rc.2", + "version": "0.3.6-rc.3", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/pdf-worker/CHANGELOG.md b/ee/packages/pdf-worker/CHANGELOG.md index dcb8559ed494..6455f81bbbf4 100644 --- a/ee/packages/pdf-worker/CHANGELOG.md +++ b/ee/packages/pdf-worker/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/pdf-worker +## 0.2.6-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 +
+ ## 0.2.6-rc.2 ### Patch Changes diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index 9e5d97d2844c..a5fe9ef3d217 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/pdf-worker", - "version": "0.2.6-rc.2", + "version": "0.2.6-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/ee/packages/presence/CHANGELOG.md b/ee/packages/presence/CHANGELOG.md index dc38c9f1994c..e57b75ee05ef 100644 --- a/ee/packages/presence/CHANGELOG.md +++ b/ee/packages/presence/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/presence +## 0.2.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.2.9-rc.2 ### Patch Changes diff --git a/ee/packages/presence/package.json b/ee/packages/presence/package.json index 89dd73c65545..f6c909876ea6 100644 --- a/ee/packages/presence/package.json +++ b/ee/packages/presence/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/presence", - "version": "0.2.9-rc.2", + "version": "0.2.9-rc.3", "private": true, "devDependencies": { "@babel/core": "~7.25.8", diff --git a/package.json b/package.json index 3afaa7acf953..31385fc4dc0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rocket.chat", - "version": "7.0.0-rc.2", + "version": "7.0.0-rc.3", "description": "Rocket.Chat Monorepo", "main": "index.js", "private": true, diff --git a/packages/api-client/CHANGELOG.md b/packages/api-client/CHANGELOG.md index e56b16abb69d..cf72a20ae7fe 100644 --- a/packages/api-client/CHANGELOG.md +++ b/packages/api-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/api-client +## 0.2.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 +
+ ## 0.2.9-rc.2 ### Patch Changes diff --git a/packages/api-client/package.json b/packages/api-client/package.json index caa6c88b4d40..76d3d1f44d50 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/api-client", - "version": "0.2.9-rc.2", + "version": "0.2.9-rc.3", "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@types/jest": "~29.5.13", diff --git a/packages/apps/CHANGELOG.md b/packages/apps/CHANGELOG.md index 590ef352c7cd..2e6b840e2142 100644 --- a/packages/apps/CHANGELOG.md +++ b/packages/apps/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/apps +## 0.2.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 +
+ ## 0.2.0-rc.2 ### Patch Changes diff --git a/packages/apps/package.json b/packages/apps/package.json index 4d213c876799..26db8fbe241b 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/apps", - "version": "0.2.0-rc.2", + "version": "0.2.0-rc.3", "private": true, "devDependencies": { "eslint": "~8.45.0", diff --git a/packages/core-services/CHANGELOG.md b/packages/core-services/CHANGELOG.md index 37f39bffb5cf..4f969ddabddd 100644 --- a/packages/core-services/CHANGELOG.md +++ b/packages/core-services/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/core-services +## 0.7.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.7.1-rc.2 ### Patch Changes diff --git a/packages/core-services/package.json b/packages/core-services/package.json index 6461f4378c15..97a43a683fc6 100644 --- a/packages/core-services/package.json +++ b/packages/core-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/core-services", - "version": "0.7.1-rc.2", + "version": "0.7.1-rc.3", "private": true, "devDependencies": { "@babel/core": "~7.25.8", diff --git a/packages/core-typings/CHANGELOG.md b/packages/core-typings/CHANGELOG.md index 35ade27cad53..722b482bf227 100644 --- a/packages/core-typings/CHANGELOG.md +++ b/packages/core-typings/CHANGELOG.md @@ -1,5 +1,7 @@ # @rocket.chat/core-typings +## 7.0.0-rc.3 + ## 7.0.0-rc.2 ## 7.0.0-rc.1 diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index fbc844b9a992..250ac7cd4c2a 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -2,7 +2,7 @@ "$schema": "https://json.schemastore.org/package", "name": "@rocket.chat/core-typings", "private": true, - "version": "7.0.0-rc.2", + "version": "7.0.0-rc.3", "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/cron/CHANGELOG.md b/packages/cron/CHANGELOG.md index d940035b4a0a..4ca2dea1a48c 100644 --- a/packages/cron/CHANGELOG.md +++ b/packages/cron/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/cron +## 0.1.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.1.9-rc.2 ### Patch Changes diff --git a/packages/cron/package.json b/packages/cron/package.json index 1fced5836b56..833fc0638dfa 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/cron", - "version": "0.1.9-rc.2", + "version": "0.1.9-rc.3", "private": true, "devDependencies": { "eslint": "~8.45.0", diff --git a/packages/ddp-client/CHANGELOG.md b/packages/ddp-client/CHANGELOG.md index d3784ec7f943..d1f900a25efe 100644 --- a/packages/ddp-client/CHANGELOG.md +++ b/packages/ddp-client/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ddp-client +## 0.3.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/api-client@0.2.9-rc.3 +
+ ## 0.3.9-rc.2 ### Patch Changes diff --git a/packages/ddp-client/package.json b/packages/ddp-client/package.json index fa5acd8ee51f..904fc7b1b075 100644 --- a/packages/ddp-client/package.json +++ b/packages/ddp-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ddp-client", - "version": "0.3.9-rc.2", + "version": "0.3.9-rc.3", "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@types/jest": "~29.5.13", diff --git a/packages/freeswitch/CHANGELOG.md b/packages/freeswitch/CHANGELOG.md index c1905c5a5979..ed60ac56c645 100644 --- a/packages/freeswitch/CHANGELOG.md +++ b/packages/freeswitch/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/freeswitch +## 1.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 +
+ ## 1.0.0-rc.2 ### Patch Changes diff --git a/packages/freeswitch/package.json b/packages/freeswitch/package.json index 376108bab0ad..f4362426a0f6 100644 --- a/packages/freeswitch/package.json +++ b/packages/freeswitch/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/freeswitch", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.3", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/fuselage-ui-kit/CHANGELOG.md b/packages/fuselage-ui-kit/CHANGELOG.md index df0ce069ab33..078efc4715c3 100644 --- a/packages/fuselage-ui-kit/CHANGELOG.md +++ b/packages/fuselage-ui-kit/CHANGELOG.md @@ -1,5 +1,18 @@ # Change Log +## 12.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/gazzodown@12.0.0-rc.3 + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-avatar@8.0.0-rc.3 + - @rocket.chat/ui-video-conf@12.0.0-rc.3 +
+ ## 12.0.0-rc.2 ### Patch Changes diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index eb50d9e5a150..56fa8c324666 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/fuselage-ui-kit", - "version": "12.0.0-rc.2", + "version": "12.0.0-rc.3", "private": true, "description": "UiKit elements for Rocket.Chat Apps built under Fuselage design system", "homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/", @@ -101,10 +101,10 @@ "@rocket.chat/icons": "*", "@rocket.chat/prettier-config": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "8.0.0-rc.2", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-avatar": "8.0.0-rc.3", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "@rocket.chat/ui-kit": "0.37.0-rc.0", - "@rocket.chat/ui-video-conf": "12.0.0-rc.2", + "@rocket.chat/ui-video-conf": "12.0.0-rc.3", "@tanstack/react-query": "*", "react": "~17.0.2", "react-dom": "*" diff --git a/packages/gazzodown/CHANGELOG.md b/packages/gazzodown/CHANGELOG.md index da317aade28d..58f2357ec2de 100644 --- a/packages/gazzodown/CHANGELOG.md +++ b/packages/gazzodown/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/gazzodown +## 12.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-client@12.0.0-rc.3 +
+ ## 12.0.0-rc.2 ### Patch Changes diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index 7ac29d9b8387..3207e71b022c 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/gazzodown", - "version": "12.0.0-rc.2", + "version": "12.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -75,8 +75,8 @@ "@rocket.chat/fuselage-tokens": "*", "@rocket.chat/message-parser": "0.31.31", "@rocket.chat/styled": "*", - "@rocket.chat/ui-client": "12.0.0-rc.2", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-client": "12.0.0-rc.3", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "katex": "*", "react": "*" }, diff --git a/packages/instance-status/CHANGELOG.md b/packages/instance-status/CHANGELOG.md index df55f1a30e15..1dfec3d3d92f 100644 --- a/packages/instance-status/CHANGELOG.md +++ b/packages/instance-status/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/instance-status +## 0.1.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.1.9-rc.2 ### Patch Changes diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index 01a5cd758525..05a5d3899e9a 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/instance-status", - "version": "0.1.9-rc.2", + "version": "0.1.9-rc.3", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/livechat/CHANGELOG.md b/packages/livechat/CHANGELOG.md index 413396856655..c87095501486 100644 --- a/packages/livechat/CHANGELOG.md +++ b/packages/livechat/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/livechat Change Log +## 1.20.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/gazzodown@12.0.0-rc.3 +
+ ## 1.20.1-rc.2 ### Patch Changes diff --git a/packages/livechat/package.json b/packages/livechat/package.json index c5affb93aa2a..dab0fe2c0a90 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/livechat", - "version": "1.20.1-rc.2", + "version": "1.20.1-rc.3", "files": [ "/build" ], diff --git a/packages/model-typings/CHANGELOG.md b/packages/model-typings/CHANGELOG.md index 5b5bb17cc673..29bba8c7605c 100644 --- a/packages/model-typings/CHANGELOG.md +++ b/packages/model-typings/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/model-typings +## 1.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 +
+ ## 1.0.0-rc.2 ### Patch Changes diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 75cb376bba91..5d81916a6bb1 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/model-typings", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.3", "private": true, "devDependencies": { "@types/node-rsa": "^1.1.4", diff --git a/packages/models/CHANGELOG.md b/packages/models/CHANGELOG.md index 897dbca44163..9778f5366e8e 100644 --- a/packages/models/CHANGELOG.md +++ b/packages/models/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/models +## 1.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/model-typings@1.0.0-rc.3 +
+ ## 1.0.0-rc.2 ### Patch Changes diff --git a/packages/models/package.json b/packages/models/package.json index f138766a4dd3..58c96184b345 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/models", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.3", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/rest-typings/CHANGELOG.md b/packages/rest-typings/CHANGELOG.md index b10699809231..9c320da06e8b 100644 --- a/packages/rest-typings/CHANGELOG.md +++ b/packages/rest-typings/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/rest-typings +## 7.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 +
+ ## 7.0.0-rc.2 ### Patch Changes diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index 6cda18ade614..624c7c254c53 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/rest-typings", - "version": "7.0.0-rc.2", + "version": "7.0.0-rc.3", "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/eslint-config": "workspace:~", diff --git a/packages/ui-avatar/CHANGELOG.md b/packages/ui-avatar/CHANGELOG.md index 69b982da2b70..a8931e77564f 100644 --- a/packages/ui-avatar/CHANGELOG.md +++ b/packages/ui-avatar/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/ui-avatar +## 8.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@12.0.0-rc.3 +
+ ## 8.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index 4eeeb05e9956..188b5cba0e47 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-avatar", - "version": "8.0.0-rc.2", + "version": "8.0.0-rc.3", "private": true, "devDependencies": { "@babel/core": "~7.25.8", @@ -30,7 +30,7 @@ ], "peerDependencies": { "@rocket.chat/fuselage": "*", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "react": "~17.0.2" }, "volta": { diff --git a/packages/ui-client/CHANGELOG.md b/packages/ui-client/CHANGELOG.md index 2c467a91aff2..cee0baffbac0 100644 --- a/packages/ui-client/CHANGELOG.md +++ b/packages/ui-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ui-client +## 12.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-avatar@8.0.0-rc.3 +
+ ## 12.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index 4811cdbd44b5..94684b465d05 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-client", - "version": "12.0.0-rc.2", + "version": "12.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -60,8 +60,8 @@ "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", - "@rocket.chat/ui-avatar": "8.0.0-rc.2", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-avatar": "8.0.0-rc.3", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "react": "*", "react-i18next": "*" }, diff --git a/packages/ui-contexts/CHANGELOG.md b/packages/ui-contexts/CHANGELOG.md index cd3a2999445d..674ccf92fa78 100644 --- a/packages/ui-contexts/CHANGELOG.md +++ b/packages/ui-contexts/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ui-contexts +## 12.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/ddp-client@0.3.9-rc.3 +
+ ## 12.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 2be1327ded89..82d74e0e221e 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-contexts", - "version": "12.0.0-rc.2", + "version": "12.0.0-rc.3", "private": true, "devDependencies": { "@rocket.chat/core-typings": "workspace:^", diff --git a/packages/ui-video-conf/CHANGELOG.md b/packages/ui-video-conf/CHANGELOG.md index ea3fb9a440eb..78fb1ed355db 100644 --- a/packages/ui-video-conf/CHANGELOG.md +++ b/packages/ui-video-conf/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ui-video-conf +## 12.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-avatar@8.0.0-rc.3 +
+ ## 12.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index 4d15b5745c12..9b063ed2dd20 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-video-conf", - "version": "12.0.0-rc.2", + "version": "12.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -58,8 +58,8 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "8.0.0-rc.2", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-avatar": "8.0.0-rc.3", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "react": "~17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/ui-voip/CHANGELOG.md b/packages/ui-voip/CHANGELOG.md index 5bb5779af93e..08dcddb94073 100644 --- a/packages/ui-voip/CHANGELOG.md +++ b/packages/ui-voip/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ui-voip +## 2.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-avatar@8.0.0-rc.3 + - @rocket.chat/ui-client@12.0.0-rc.3 +
+ ## 2.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-voip/package.json b/packages/ui-voip/package.json index 3bf8cc37151a..a6b46d6e436c 100644 --- a/packages/ui-voip/package.json +++ b/packages/ui-voip/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-voip", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -65,9 +65,9 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "8.0.0-rc.2", - "@rocket.chat/ui-client": "12.0.0-rc.2", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-avatar": "8.0.0-rc.3", + "@rocket.chat/ui-client": "12.0.0-rc.3", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "react": "~17.0.2", "react-aria": "~3.23.1", "react-dom": "^17.0.2" diff --git a/packages/web-ui-registration/CHANGELOG.md b/packages/web-ui-registration/CHANGELOG.md index c19d639a683a..4b1b4e7adf1f 100644 --- a/packages/web-ui-registration/CHANGELOG.md +++ b/packages/web-ui-registration/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/web-ui-registration +## 12.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@12.0.0-rc.3 +
+ ## 12.0.0-rc.2 ### Patch Changes diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index 7c723b6c104f..1a67d0c9a0c8 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/web-ui-registration", - "version": "12.0.0-rc.2", + "version": "12.0.0-rc.3", "private": true, "homepage": "https://rocket.chat", "main": "./dist/index.js", @@ -49,7 +49,7 @@ "peerDependencies": { "@rocket.chat/layout": "*", "@rocket.chat/tools": "0.2.2", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "@tanstack/react-query": "*", "react": "*", "react-hook-form": "*", diff --git a/yarn.lock b/yarn.lock index faf10e19571a..a625b3a04498 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8518,10 +8518,10 @@ __metadata: "@rocket.chat/icons": "*" "@rocket.chat/prettier-config": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 8.0.0-rc.1 - "@rocket.chat/ui-contexts": 12.0.0-rc.1 + "@rocket.chat/ui-avatar": 8.0.0-rc.2 + "@rocket.chat/ui-contexts": 12.0.0-rc.2 "@rocket.chat/ui-kit": 0.37.0-rc.0 - "@rocket.chat/ui-video-conf": 12.0.0-rc.1 + "@rocket.chat/ui-video-conf": 12.0.0-rc.2 "@tanstack/react-query": "*" react: ~17.0.2 react-dom: "*" @@ -8607,8 +8607,8 @@ __metadata: "@rocket.chat/fuselage-tokens": "*" "@rocket.chat/message-parser": 0.31.31 "@rocket.chat/styled": "*" - "@rocket.chat/ui-client": 12.0.0-rc.1 - "@rocket.chat/ui-contexts": 12.0.0-rc.1 + "@rocket.chat/ui-client": 12.0.0-rc.2 + "@rocket.chat/ui-contexts": 12.0.0-rc.2 katex: "*" react: "*" languageName: unknown @@ -9860,7 +9860,7 @@ __metadata: typescript: "npm:~5.6.3" peerDependencies: "@rocket.chat/fuselage": "*" - "@rocket.chat/ui-contexts": 12.0.0-rc.1 + "@rocket.chat/ui-contexts": 12.0.0-rc.2 react: ~17.0.2 languageName: unknown linkType: soft @@ -9910,8 +9910,8 @@ __metadata: "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" - "@rocket.chat/ui-avatar": 8.0.0-rc.1 - "@rocket.chat/ui-contexts": 12.0.0-rc.1 + "@rocket.chat/ui-avatar": 8.0.0-rc.2 + "@rocket.chat/ui-contexts": 12.0.0-rc.2 react: "*" react-i18next: "*" languageName: unknown @@ -10081,8 +10081,8 @@ __metadata: "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 8.0.0-rc.1 - "@rocket.chat/ui-contexts": 12.0.0-rc.1 + "@rocket.chat/ui-avatar": 8.0.0-rc.2 + "@rocket.chat/ui-contexts": 12.0.0-rc.2 react: ~17.0.2 react-dom: ^17.0.2 languageName: unknown @@ -10136,9 +10136,9 @@ __metadata: "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 8.0.0-rc.1 - "@rocket.chat/ui-client": 12.0.0-rc.1 - "@rocket.chat/ui-contexts": 12.0.0-rc.1 + "@rocket.chat/ui-avatar": 8.0.0-rc.2 + "@rocket.chat/ui-client": 12.0.0-rc.2 + "@rocket.chat/ui-contexts": 12.0.0-rc.2 react: ~17.0.2 react-aria: ~3.23.1 react-dom: ^17.0.2 @@ -10227,7 +10227,7 @@ __metadata: peerDependencies: "@rocket.chat/layout": "*" "@rocket.chat/tools": 0.2.2 - "@rocket.chat/ui-contexts": 12.0.0-rc.1 + "@rocket.chat/ui-contexts": 12.0.0-rc.2 "@tanstack/react-query": "*" react: "*" react-hook-form: "*" From dd3ee235b7153a7203068711bb287b2166898aa3 Mon Sep 17 00:00:00 2001 From: Kevin Aleman Date: Thu, 24 Oct 2024 08:39:38 -0600 Subject: [PATCH 07/11] regression: Remove user from waiting queue when the key is set via `updateGroupKey` (#33696) --- .../app/e2e/server/methods/updateGroupKey.ts | 61 +++++++++++------- .../e2e/server/methods/updateGroupKey.spec.ts | 63 +++++++++++++++++++ 2 files changed, 102 insertions(+), 22 deletions(-) create mode 100644 apps/meteor/tests/unit/app/e2e/server/methods/updateGroupKey.spec.ts diff --git a/apps/meteor/app/e2e/server/methods/updateGroupKey.ts b/apps/meteor/app/e2e/server/methods/updateGroupKey.ts index 6974ba225d9f..5f7860107bd9 100644 --- a/apps/meteor/app/e2e/server/methods/updateGroupKey.ts +++ b/apps/meteor/app/e2e/server/methods/updateGroupKey.ts @@ -1,9 +1,13 @@ import type { ServerMethods } from '@rocket.chat/ddp-client'; -import { Subscriptions } from '@rocket.chat/models'; +import { Subscriptions, Rooms } from '@rocket.chat/models'; import { Meteor } from 'meteor/meteor'; import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; -import { notifyOnSubscriptionChangedById, notifyOnSubscriptionChanged } from '../../../lib/server/lib/notifyListener'; +import { + notifyOnSubscriptionChangedById, + notifyOnSubscriptionChanged, + notifyOnRoomChangedById, +} from '../../../lib/server/lib/notifyListener'; declare module '@rocket.chat/ddp-client' { // eslint-disable-next-line @typescript-eslint/naming-convention @@ -12,32 +16,45 @@ declare module '@rocket.chat/ddp-client' { } } +export async function updateGroupKey(rid: string, uid: string, key: string, callerUserId: string) { + // I have a subscription to this room + const mySub = await Subscriptions.findOneByRoomIdAndUserId(rid, callerUserId); + + if (mySub) { + // Setting the key to myself, can set directly to the final field + if (callerUserId === uid) { + const setGroupE2EKeyResponse = await Subscriptions.setGroupE2EKey(mySub._id, key); + // Case: I create an encrypted room before setting up my keys, and I reset the e2e keys + // Next login, I'll create the keys for the room, and set them here. + // However as I reset my keys, I'm on the `usersWaitingForKeys` queue + // So I need to remove myself from the queue and notify the time i reach here + // This way, I can provide the keys to other users + const { modifiedCount } = await Rooms.removeUsersFromE2EEQueueByRoomId(mySub.rid, [callerUserId]); + if (setGroupE2EKeyResponse.modifiedCount) { + void notifyOnSubscriptionChangedById(mySub._id); + } + if (modifiedCount) { + void notifyOnRoomChangedById(mySub.rid); + } + return; + } + + // uid also has subscription to this room + const { value } = await Subscriptions.setGroupE2ESuggestedKey(uid, rid, key); + if (value) { + void notifyOnSubscriptionChanged(value); + } + } +} + Meteor.methods({ async 'e2e.updateGroupKey'(rid, uid, key) { - methodDeprecationLogger.method('e2e.updateGroupKey', '8.0.0'); const userId = Meteor.userId(); if (!userId) { throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'e2e.acceptSuggestedGroupKey' }); } - // I have a subscription to this room - const mySub = await Subscriptions.findOneByRoomIdAndUserId(rid, userId); - - if (mySub) { - // Setting the key to myself, can set directly to the final field - if (userId === uid) { - const setGroupE2EKeyResponse = await Subscriptions.setGroupE2EKey(mySub._id, key); - if (setGroupE2EKeyResponse.modifiedCount) { - void notifyOnSubscriptionChangedById(mySub._id); - } - return; - } - - // uid also has subscription to this room - const { value } = await Subscriptions.setGroupE2ESuggestedKey(uid, rid, key); - if (value) { - void notifyOnSubscriptionChanged(value); - } - } + methodDeprecationLogger.method('e2e.updateGroupKey', '8.0.0'); + return updateGroupKey(rid, uid, key, userId); }, }); diff --git a/apps/meteor/tests/unit/app/e2e/server/methods/updateGroupKey.spec.ts b/apps/meteor/tests/unit/app/e2e/server/methods/updateGroupKey.spec.ts new file mode 100644 index 000000000000..9df3b2ab654d --- /dev/null +++ b/apps/meteor/tests/unit/app/e2e/server/methods/updateGroupKey.spec.ts @@ -0,0 +1,63 @@ +import { expect } from 'chai'; +import { beforeEach, describe, it } from 'mocha'; +import proxyquire from 'proxyquire'; +import sinon from 'sinon'; + +const models = { + Subscriptions: { + findOneByRoomIdAndUserId: sinon.stub(), + setGroupE2EKey: sinon.stub(), + setGroupE2ESuggestedKey: sinon.stub(), + }, + Rooms: { + removeUsersFromE2EEQueueByRoomId: sinon.stub(), + }, +}; + +const { updateGroupKey } = proxyquire.noCallThru().load('../../../../../../app/e2e/server/methods/updateGroupKey.ts', { + '../../../lib/server/lib/notifyListener': { + notifyOnSubscriptionChanged: sinon.stub(), + notifyOnRoomChangedById: sinon.stub(), + notifyOnSubscriptionChangedById: sinon.stub(), + }, + '../../../lib/server/lib/deprecationWarningLogger': { + methodDeprecationLogger: { + method: sinon.stub(), + }, + }, + '@rocket.chat/models': models, + 'meteor/meteor': { Meteor: { methods: sinon.stub() } }, +}); + +describe('updateGroupKey', () => { + beforeEach(() => { + models.Subscriptions.findOneByRoomIdAndUserId.reset(); + models.Subscriptions.setGroupE2EKey.reset(); + models.Subscriptions.setGroupE2ESuggestedKey.reset(); + }); + + it('should do nothing if user has no subscription', async () => { + models.Subscriptions.findOneByRoomIdAndUserId.resolves(null); + const res = await updateGroupKey('rid', 'uid', 'key', 'callerUserId'); + + expect(res).to.be.undefined; + }); + it('should suggest the key to the user when uid is different from callerUserId', async () => { + models.Subscriptions.findOneByRoomIdAndUserId.resolves({ _id: 'subscriptionId' }); + models.Subscriptions.setGroupE2ESuggestedKey.resolves({ value: {} }); + const res = await updateGroupKey('rid', 'uid', 'key', 'callerUserId'); + + expect(res).to.be.undefined; + expect(models.Subscriptions.setGroupE2ESuggestedKey.calledOnce).to.be.true; + }); + it('should set the group key when uid is the callerUserId', async () => { + models.Subscriptions.findOneByRoomIdAndUserId.resolves({ _id: 'subscriptionId' }); + models.Subscriptions.setGroupE2EKey.resolves({ modifiedCount: 1 }); + models.Rooms.removeUsersFromE2EEQueueByRoomId.resolves({ modifiedCount: 1 }); + const res = await updateGroupKey('rid', 'uid', 'key', 'uid'); + + expect(res).to.be.undefined; + expect(models.Subscriptions.setGroupE2EKey.calledOnce).to.be.true; + expect(models.Rooms.removeUsersFromE2EEQueueByRoomId.calledOnce).to.be.true; + }); +}); From c884d3b489796905da8d9863ead037fc3a105bba Mon Sep 17 00:00:00 2001 From: Hugo Costa Date: Thu, 24 Oct 2024 11:47:30 -0300 Subject: [PATCH 08/11] regression: Fix meteor dynamic storage for E2EE client (#33711) --- apps/meteor/client/views/account/security/EndToEnd.tsx | 5 +++-- apps/meteor/client/views/room/E2EESetup/RoomE2EESetup.tsx | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/meteor/client/views/account/security/EndToEnd.tsx b/apps/meteor/client/views/account/security/EndToEnd.tsx index 5546cbd00a88..d2c3865d891b 100644 --- a/apps/meteor/client/views/account/security/EndToEnd.tsx +++ b/apps/meteor/client/views/account/security/EndToEnd.tsx @@ -1,6 +1,7 @@ import { Box, PasswordInput, Field, FieldGroup, FieldLabel, FieldRow, FieldError, FieldHint, Button, Divider } from '@rocket.chat/fuselage'; import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import { useToastMessageDispatch, useMethod, useTranslation, useLogout } from '@rocket.chat/ui-contexts'; +import { Accounts } from 'meteor/accounts-base'; import type { ComponentProps, ReactElement } from 'react'; import React, { useCallback, useEffect } from 'react'; import { Controller, useForm } from 'react-hook-form'; @@ -12,8 +13,8 @@ const EndToEnd = (props: ComponentProps): ReactElement => { const dispatchToastMessage = useToastMessageDispatch(); const logout = useLogout(); - const publicKey = localStorage.getItem('public_key'); - const privateKey = localStorage.getItem('private_key'); + const publicKey = Accounts.storageLocation.getItem('public_key'); + const privateKey = Accounts.storageLocation.getItem('private_key'); const resetE2eKey = useMethod('e2e.resetOwnE2EKey'); diff --git a/apps/meteor/client/views/room/E2EESetup/RoomE2EESetup.tsx b/apps/meteor/client/views/room/E2EESetup/RoomE2EESetup.tsx index c3319ac32c4b..7a9ca6772472 100644 --- a/apps/meteor/client/views/room/E2EESetup/RoomE2EESetup.tsx +++ b/apps/meteor/client/views/room/E2EESetup/RoomE2EESetup.tsx @@ -1,4 +1,5 @@ import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; +import { Accounts } from 'meteor/accounts-base'; import React, { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; @@ -19,7 +20,7 @@ const RoomE2EESetup = () => { const e2eRoomState = useE2EERoomState(room._id); const { t } = useTranslation(); - const randomPassword = window.localStorage.getItem('e2e.randomPassword'); + const randomPassword = Accounts.storageLocation.getItem('e2e.randomPassword'); const onSavePassword = useCallback(() => { if (!randomPassword) { From ccaa3151e634dd7e979512029e12b47d13a34871 Mon Sep 17 00:00:00 2001 From: Aleksander Nicacio da Silva Date: Thu, 24 Oct 2024 12:06:17 -0300 Subject: [PATCH 09/11] regression: voip action button using default instead of secondary variant (#33729) --- .../VoipActionButton/VoipActionButton.tsx | 2 +- .../VoipActionButton.spec.tsx.snap | 2 +- .../__snapshots__/VoipActions.spec.tsx.snap | 22 +++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx b/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx index a10084934cd4..249582107b5f 100644 --- a/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx +++ b/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx @@ -11,9 +11,9 @@ type ActionButtonProps = Pick, 'clas const VoipActionButton = ({ disabled, label, pressed, icon, danger, success, className, onClick }: ActionButtonProps) => ( } title={label} diff --git a/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap b/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap index 2f4b29aa9de8..516c82d68465 100644 --- a/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap +++ b/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap @@ -25,7 +25,7 @@ exports[`renders NeutralButton without crashing 1`] = `