diff --git a/.github/workflows/ci-test-e2e.yml b/.github/workflows/ci-test-e2e.yml index b46c124d149be..d687fa8a2162a 100644 --- a/.github/workflows/ci-test-e2e.yml +++ b/.github/workflows/ci-test-e2e.yml @@ -122,7 +122,7 @@ jobs: # if we are testing a PR from a fork, we need to build the docker image at this point - uses: ./.github/actions/build-docker - if: github.event.pull_request.head.repo.full_name != github.repository + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository with: CR_USER: ${{ secrets.CR_USER }} CR_PAT: ${{ secrets.CR_PAT }} diff --git a/apps/meteor/CHANGELOG.md b/apps/meteor/CHANGELOG.md index f17422bbb318e..f07e04bcd3b3d 100644 --- a/apps/meteor/CHANGELOG.md +++ b/apps/meteor/CHANGELOG.md @@ -1,5 +1,314 @@ # @rocket.chat/meteor +## 6.10.10 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +- Bump @rocket.chat/meteor version. + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/omnichannel-services@0.2.10 + - @rocket.chat/web-ui-registration@8.0.10 + - @rocket.chat/fuselage-ui-kit@8.0.10 + - @rocket.chat/instance-status@0.1.10 + - @rocket.chat/message-parser@0.31.32 + - @rocket.chat/api-client@0.2.10 + - @rocket.chat/pdf-worker@0.1.10 + - @rocket.chat/core-services@0.4.10 + - @rocket.chat/model-typings@0.5.10 + - @rocket.chat/ui-video-conf@8.0.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/rest-typings@6.10.10 + - @rocket.chat/presence@0.2.10 + - @rocket.chat/ui-contexts@8.0.10 + - @rocket.chat/license@0.2.10 + - @rocket.chat/gazzodown@8.0.10 + - @rocket.chat/ui-avatar@4.0.10 + - @rocket.chat/ui-client@8.0.10 + - @rocket.chat/models@0.1.10 + - @rocket.chat/apps@0.1.10 + - @rocket.chat/cron@0.1.10 + - @rocket.chat/ui-theming@0.2.0 + - @rocket.chat/server-cloud-communication@0.0.2 +
+ +## 6.10.9 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +- Bump @rocket.chat/meteor version. + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/rest-typings@6.10.9 + - @rocket.chat/api-client@0.2.9 + - @rocket.chat/license@0.2.9 + - @rocket.chat/omnichannel-services@0.2.9 + - @rocket.chat/pdf-worker@0.1.9 + - @rocket.chat/presence@0.2.9 + - @rocket.chat/apps@0.1.9 + - @rocket.chat/core-services@0.4.9 + - @rocket.chat/cron@0.1.9 + - @rocket.chat/fuselage-ui-kit@8.0.9 + - @rocket.chat/gazzodown@8.0.9 + - @rocket.chat/model-typings@0.5.9 + - @rocket.chat/ui-contexts@8.0.9 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/models@0.1.9 + - @rocket.chat/ui-theming@0.2.0 + - @rocket.chat/ui-avatar@4.0.9 + - @rocket.chat/ui-client@8.0.9 + - @rocket.chat/ui-video-conf@8.0.9 + - @rocket.chat/web-ui-registration@8.0.9 + - @rocket.chat/instance-status@0.1.9 +
+ +## 6.10.8 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +- ([#34129](https://github.com/RocketChat/Rocket.Chat/pull/34129)) Prevent apps' subprocesses from crashing on unhandled rejections or uncaught exceptions + +- ([#34129](https://github.com/RocketChat/Rocket.Chat/pull/34129)) Add support to configure apps runtime timeout via the APPS_ENGINE_RUNTIME_TIMEOUT environment variable + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/rest-typings@6.10.8 + - @rocket.chat/api-client@0.2.8 + - @rocket.chat/license@0.2.8 + - @rocket.chat/omnichannel-services@0.2.8 + - @rocket.chat/pdf-worker@0.1.8 + - @rocket.chat/presence@0.2.8 + - @rocket.chat/apps@0.1.8 + - @rocket.chat/core-services@0.4.8 + - @rocket.chat/cron@0.1.8 + - @rocket.chat/fuselage-ui-kit@8.0.8 + - @rocket.chat/gazzodown@8.0.8 + - @rocket.chat/model-typings@0.5.8 + - @rocket.chat/ui-contexts@8.0.8 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/models@0.1.8 + - @rocket.chat/ui-theming@0.2.0 + - @rocket.chat/ui-avatar@4.0.8 + - @rocket.chat/ui-client@8.0.8 + - @rocket.chat/ui-video-conf@8.0.8 + - @rocket.chat/web-ui-registration@8.0.8 + - @rocket.chat/instance-status@0.1.8 +
+ +## 6.10.7 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +- Bump @rocket.chat/meteor version. + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/omnichannel-services@0.2.7 + - @rocket.chat/web-ui-registration@8.0.7 + - @rocket.chat/fuselage-ui-kit@8.0.7 + - @rocket.chat/instance-status@0.1.7 + - @rocket.chat/message-parser@0.31.31 + - @rocket.chat/api-client@0.2.7 + - @rocket.chat/pdf-worker@0.1.7 + - @rocket.chat/core-services@0.4.7 + - @rocket.chat/model-typings@0.5.7 + - @rocket.chat/ui-video-conf@8.0.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/rest-typings@6.10.7 + - @rocket.chat/presence@0.2.7 + - @rocket.chat/ui-contexts@8.0.7 + - @rocket.chat/license@0.2.7 + - @rocket.chat/gazzodown@8.0.7 + - @rocket.chat/ui-avatar@4.0.7 + - @rocket.chat/ui-client@8.0.7 + - @rocket.chat/models@0.1.7 + - @rocket.chat/apps@0.1.7 + - @rocket.chat/cron@0.1.7 + - @rocket.chat/ui-theming@0.2.0 + - @rocket.chat/server-cloud-communication@0.0.2 +
+ +## 6.10.6 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +- Bump @rocket.chat/meteor version. + +- ([#33270](https://github.com/RocketChat/Rocket.Chat/pull/33270) by [@dionisio-bot](https://github.com/dionisio-bot)) Security Hotfix (https://docs.rocket.chat/docs/security-fixes-and-updates) + +- ([#33267](https://github.com/RocketChat/Rocket.Chat/pull/33267) by [@dionisio-bot](https://github.com/dionisio-bot)) fixed retention policy max age settings not being respected after upgrade + +-
Updated dependencies [a45b88cdf2]: + + - @rocket.chat/message-parser@0.31.30 + - @rocket.chat/core-services@0.4.6 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/gazzodown@8.0.6 + - @rocket.chat/rest-typings@6.10.6 + - @rocket.chat/omnichannel-services@0.2.6 + - @rocket.chat/presence@0.2.6 + - @rocket.chat/api-client@0.2.6 + - @rocket.chat/license@0.2.6 + - @rocket.chat/pdf-worker@0.1.6 + - @rocket.chat/apps@0.1.6 + - @rocket.chat/cron@0.1.6 + - @rocket.chat/fuselage-ui-kit@8.0.6 + - @rocket.chat/model-typings@0.5.6 + - @rocket.chat/ui-contexts@8.0.6 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/models@0.1.6 + - @rocket.chat/ui-theming@0.2.0 + - @rocket.chat/ui-avatar@4.0.6 + - @rocket.chat/ui-client@8.0.6 + - @rocket.chat/ui-video-conf@8.0.6 + - @rocket.chat/web-ui-registration@8.0.6 + - @rocket.chat/instance-status@0.1.6 +
+ +## 6.10.5 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +- Bump @rocket.chat/meteor version. + +- ([#33085](https://github.com/RocketChat/Rocket.Chat/pull/33085) by [@dionisio-bot](https://github.com/dionisio-bot)) Prevent `processRoomAbandonment` callback from erroring out when a room was inactive during a day Business Hours was not configured for. + +- ([#33142](https://github.com/RocketChat/Rocket.Chat/pull/33142) by [@dionisio-bot](https://github.com/dionisio-bot)) Security Hotfix (https://docs.rocket.chat/docs/security-fixes-and-updates) + +- ([#33130](https://github.com/RocketChat/Rocket.Chat/pull/33130) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixed an issue related to setting Accounts_ForgetUserSessionOnWindowClose, this setting was not working as expected. + + The new meteor 2.16 release introduced a new option to configure the Accounts package and choose between the local storage or session storage. They also changed how Meteor.\_localstorage works internally. Due to these changes in Meteor, our setting to use session storage wasn't working as expected. This PR fixes this issue and configures the Accounts package according to the workspace settings. + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/rest-typings@6.10.5 + - @rocket.chat/api-client@0.2.5 + - @rocket.chat/license@0.2.5 + - @rocket.chat/omnichannel-services@0.2.5 + - @rocket.chat/pdf-worker@0.1.5 + - @rocket.chat/presence@0.2.5 + - @rocket.chat/apps@0.1.5 + - @rocket.chat/core-services@0.4.5 + - @rocket.chat/cron@0.1.5 + - @rocket.chat/fuselage-ui-kit@8.0.5 + - @rocket.chat/gazzodown@8.0.5 + - @rocket.chat/model-typings@0.5.5 + - @rocket.chat/ui-contexts@8.0.5 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/models@0.1.5 + - @rocket.chat/ui-theming@0.2.0 + - @rocket.chat/ui-avatar@4.0.5 + - @rocket.chat/ui-client@8.0.5 + - @rocket.chat/ui-video-conf@8.0.5 + - @rocket.chat/web-ui-registration@8.0.5 + - @rocket.chat/instance-status@0.1.5 +
+ +## 6.10.4 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/rest-typings@6.10.4 + - @rocket.chat/api-client@0.2.4 + - @rocket.chat/license@0.2.4 + - @rocket.chat/omnichannel-services@0.2.4 + - @rocket.chat/pdf-worker@0.1.4 + - @rocket.chat/presence@0.2.4 + - @rocket.chat/apps@0.1.4 + - @rocket.chat/core-services@0.4.4 + - @rocket.chat/cron@0.1.4 + - @rocket.chat/fuselage-ui-kit@8.0.4 + - @rocket.chat/gazzodown@8.0.4 + - @rocket.chat/model-typings@0.5.4 + - @rocket.chat/ui-contexts@8.0.4 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/models@0.1.4 + - @rocket.chat/ui-theming@0.2.0 + - @rocket.chat/ui-avatar@4.0.4 + - @rocket.chat/ui-client@8.0.4 + - @rocket.chat/ui-video-conf@8.0.4 + - @rocket.chat/web-ui-registration@8.0.4 + - @rocket.chat/instance-status@0.1.4 +
+ +## 6.10.3 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +- Bump @rocket.chat/meteor version. + +- ([#33069](https://github.com/RocketChat/Rocket.Chat/pull/33069) by [@dionisio-bot](https://github.com/dionisio-bot)) Security Hotfix (https://docs.rocket.chat/docs/security-fixes-and-updates) + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/rest-typings@6.10.3 + - @rocket.chat/api-client@0.2.3 + - @rocket.chat/license@0.2.3 + - @rocket.chat/omnichannel-services@0.2.3 + - @rocket.chat/pdf-worker@0.1.3 + - @rocket.chat/presence@0.2.3 + - @rocket.chat/apps@0.1.3 + - @rocket.chat/core-services@0.4.3 + - @rocket.chat/cron@0.1.3 + - @rocket.chat/fuselage-ui-kit@8.0.3 + - @rocket.chat/gazzodown@8.0.3 + - @rocket.chat/model-typings@0.5.3 + - @rocket.chat/ui-contexts@8.0.3 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/models@0.1.3 + - @rocket.chat/ui-theming@0.2.0 + - @rocket.chat/ui-avatar@4.0.3 + - @rocket.chat/ui-client@8.0.3 + - @rocket.chat/ui-video-conf@8.0.3 + - @rocket.chat/web-ui-registration@8.0.3 + - @rocket.chat/instance-status@0.1.3 +
+ ## 6.10.2 ### Patch Changes diff --git a/apps/meteor/app/api/server/v1/rooms.ts b/apps/meteor/app/api/server/v1/rooms.ts index e3296b98ef178..ee76dcdd9fe3a 100644 --- a/apps/meteor/app/api/server/v1/rooms.ts +++ b/apps/meteor/app/api/server/v1/rooms.ts @@ -2,7 +2,13 @@ import { Media } from '@rocket.chat/core-services'; import type { IRoom, IUpload } from '@rocket.chat/core-typings'; import { Messages, Rooms, Users, Uploads } from '@rocket.chat/models'; import type { Notifications } from '@rocket.chat/rest-typings'; -import { isGETRoomsNameExists, isRoomsImagesProps, isRoomsMuteUnmuteUserProps, isRoomsExportProps } from '@rocket.chat/rest-typings'; +import { + isGETRoomsNameExists, + isRoomsCleanHistoryProps, + isRoomsImagesProps, + isRoomsMuteUnmuteUserProps, + isRoomsExportProps, +} from '@rocket.chat/rest-typings'; import { Meteor } from 'meteor/meteor'; import { isTruthy } from '../../../../lib/isTruthy'; @@ -355,7 +361,7 @@ API.v1.addRoute( API.v1.addRoute( 'rooms.cleanHistory', - { authRequired: true }, + { authRequired: true, validateParams: isRoomsCleanHistoryProps }, { async post() { const { _id } = await findRoomByIdOrName({ params: this.bodyParams }); diff --git a/apps/meteor/app/api/server/v1/users.ts b/apps/meteor/app/api/server/v1/users.ts index 410a65fe7edab..b683e3a1fd08d 100644 --- a/apps/meteor/app/api/server/v1/users.ts +++ b/apps/meteor/app/api/server/v1/users.ts @@ -749,6 +749,12 @@ API.v1.addRoute( { authRequired: false }, { async post() { + const isPasswordResetEnabled = settings.get('Accounts_PasswordReset'); + + if (!isPasswordResetEnabled) { + return API.v1.failure('Password reset is not enabled'); + } + const { email } = this.bodyParams; if (!email) { return API.v1.failure("The 'email' param is required"); diff --git a/apps/meteor/app/authorization/server/functions/canDeleteMessage.ts b/apps/meteor/app/authorization/server/functions/canDeleteMessage.ts index 7cd953a52bb2a..fea37fd1c2a58 100644 --- a/apps/meteor/app/authorization/server/functions/canDeleteMessage.ts +++ b/apps/meteor/app/authorization/server/functions/canDeleteMessage.ts @@ -1,7 +1,8 @@ -import type { IUser } from '@rocket.chat/core-typings'; +import type { IUser, IRoom } from '@rocket.chat/core-typings'; import { Rooms } from '@rocket.chat/models'; import { getValue } from '../../../settings/server/raw'; +import { canAccessRoomAsync } from './canAccessRoom'; import { hasPermissionAsync } from './hasPermission'; const elapsedTime = (ts: Date): number => { @@ -13,6 +14,25 @@ export const canDeleteMessageAsync = async ( uid: string, { u, rid, ts }: { u: Pick; rid: string; ts: Date }, ): Promise => { + const room = await Rooms.findOneById>(rid, { + projection: { + _id: 1, + ro: 1, + unmuted: 1, + t: 1, + teamId: 1, + prid: 1, + }, + }); + + if (!room) { + return false; + } + + if (!(await canAccessRoomAsync(room, { _id: uid }))) { + return false; + } + const forceDelete = await hasPermissionAsync(uid, 'force-delete-message', rid); if (forceDelete) { @@ -45,12 +65,6 @@ export const canDeleteMessageAsync = async ( } } - const room = await Rooms.findOneById(rid, { projection: { ro: 1, unmuted: 1 } }); - - if (!room) { - return false; - } - if (room.ro === true && !(await hasPermissionAsync(uid, 'post-readonly', rid))) { // Unless the user was manually unmuted if (u.username && !(room.unmuted || []).includes(u.username)) { diff --git a/apps/meteor/app/lib/server/functions/getModifiedHttpHeaders.ts b/apps/meteor/app/lib/server/functions/getModifiedHttpHeaders.ts new file mode 100644 index 0000000000000..e62727814de38 --- /dev/null +++ b/apps/meteor/app/lib/server/functions/getModifiedHttpHeaders.ts @@ -0,0 +1,20 @@ +export const getModifiedHttpHeaders = (httpHeaders: Record) => { + const modifiedHttpHeaders = { ...httpHeaders }; + + if ('x-auth-token' in modifiedHttpHeaders) { + modifiedHttpHeaders['x-auth-token'] = '[redacted]'; + } + + if (modifiedHttpHeaders.cookie) { + const cookies = modifiedHttpHeaders.cookie.split('; '); + const modifiedCookies = cookies.map((cookie: string) => { + if (cookie.startsWith('rc_token=')) { + return 'rc_token=[redacted]'; + } + return cookie; + }); + modifiedHttpHeaders.cookie = modifiedCookies.join('; '); + } + + return modifiedHttpHeaders; +}; diff --git a/apps/meteor/app/lib/server/lib/debug.js b/apps/meteor/app/lib/server/lib/debug.js index aaa492e80337a..cbf38528579f8 100644 --- a/apps/meteor/app/lib/server/lib/debug.js +++ b/apps/meteor/app/lib/server/lib/debug.js @@ -7,6 +7,7 @@ import _ from 'underscore'; import { getMethodArgs } from '../../../../server/lib/logger/logPayloads'; import { metrics } from '../../../metrics/server'; import { settings } from '../../../settings/server'; +import { getModifiedHttpHeaders } from '../functions/getModifiedHttpHeaders'; const logger = new Logger('Meteor'); @@ -41,7 +42,7 @@ const traceConnection = (enable, filter, prefix, name, connection, userId) => { console.log(name, { id: connection.id, clientAddress: connection.clientAddress, - httpHeaders: connection.httpHeaders, + httpHeaders: getModifiedHttpHeaders(connection.httpHeaders), userId, }); } else { diff --git a/apps/meteor/app/livechat/imports/server/rest/sms.ts b/apps/meteor/app/livechat/imports/server/rest/sms.ts index f6502b70f68a9..2a5a0643477c9 100644 --- a/apps/meteor/app/livechat/imports/server/rest/sms.ts +++ b/apps/meteor/app/livechat/imports/server/rest/sms.ts @@ -92,12 +92,18 @@ const normalizeLocationSharing = (payload: ServiceData) => { // @ts-expect-error - this is an special endpoint that requires the return to not be wrapped as regular returns API.v1.addRoute('livechat/sms-incoming/:service', { async post() { - if (!(await OmnichannelIntegration.isConfiguredSmsService(this.urlParams.service))) { + const { service } = this.urlParams; + if (!(await OmnichannelIntegration.isConfiguredSmsService(service))) { return API.v1.failure('Invalid service'); } const smsDepartment = settings.get('SMS_Default_Omnichannel_Department'); - const SMSService = await OmnichannelIntegration.getSmsService(this.urlParams.service); + const SMSService = await OmnichannelIntegration.getSmsService(service); + + if (!SMSService.validateRequest(this.request)) { + return API.v1.failure('Invalid request'); + } + const sms = SMSService.parse(this.bodyParams); const { department } = this.queryParams; let targetDepartment = await defineDepartment(department || smsDepartment); @@ -122,7 +128,7 @@ API.v1.addRoute('livechat/sms-incoming/:service', { }, source: { type: OmnichannelSourceType.SMS, - alias: this.urlParams.service, + alias: service, }, }; diff --git a/apps/meteor/app/livechat/server/api/v1/room.ts b/apps/meteor/app/livechat/server/api/v1/room.ts index d2a76e53926f7..09b998c9351e2 100644 --- a/apps/meteor/app/livechat/server/api/v1/room.ts +++ b/apps/meteor/app/livechat/server/api/v1/room.ts @@ -32,61 +32,70 @@ import { findVisitorInfo } from '../lib/visitors'; const isAgentWithInfo = (agentObj: ILivechatAgent | { hiddenInfo: boolean }): agentObj is ILivechatAgent => !('hiddenInfo' in agentObj); -API.v1.addRoute('livechat/room', { - async get() { - // I'll temporary use check for validation, as validateParams doesnt support what's being done here - const extraCheckParams = await onCheckRoomParams({ - token: String, - rid: Match.Maybe(String), - agentId: Match.Maybe(String), - }); - - check(this.queryParams, extraCheckParams as any); - - const { token, rid: roomId, agentId, ...extraParams } = this.queryParams; - - const guest = token && (await findGuest(token)); - if (!guest) { - throw new Error('invalid-token'); - } - - let room: IOmnichannelRoom | null; - if (!roomId) { - room = await LivechatRooms.findOneOpenByVisitorToken(token, {}); - if (room) { - return API.v1.success({ room, newRoom: false }); - } - - let agent: SelectedAgent | undefined; - const agentObj = agentId && (await findAgent(agentId)); - if (agentObj) { - if (isAgentWithInfo(agentObj)) { - const { username = undefined } = agentObj; - agent = { agentId, username }; - } else { - agent = { agentId }; - } +API.v1.addRoute( + 'livechat/room', + { + rateLimiterOptions: { + numRequestsAllowed: 5, + intervalTimeInMS: 60000, + }, + }, + { + async get() { + // I'll temporary use check for validation, as validateParams doesnt support what's being done here + const extraCheckParams = await onCheckRoomParams({ + token: String, + rid: Match.Maybe(String), + agentId: Match.Maybe(String), + }); + + check(this.queryParams, extraCheckParams as any); + + const { token, rid: roomId, agentId, ...extraParams } = this.queryParams; + + const guest = token && (await findGuest(token)); + if (!guest) { + throw new Error('invalid-token'); } - const rid = Random.id(); - const roomInfo = { - source: { - type: isWidget(this.request.headers) ? OmnichannelSourceType.WIDGET : OmnichannelSourceType.API, - }, - }; + let room: IOmnichannelRoom | null; + if (!roomId) { + room = await LivechatRooms.findOneOpenByVisitorToken(token, {}); + if (room) { + return API.v1.success({ room, newRoom: false }); + } - const newRoom = await getRoom({ guest, rid, agent, roomInfo, extraParams }); - return API.v1.success(newRoom); - } + let agent: SelectedAgent | undefined; + const agentObj = agentId && (await findAgent(agentId)); + if (agentObj) { + if (isAgentWithInfo(agentObj)) { + const { username = undefined } = agentObj; + agent = { agentId, username }; + } else { + agent = { agentId }; + } + } + + const rid = Random.id(); + const roomInfo = { + source: { + type: isWidget(this.request.headers) ? OmnichannelSourceType.WIDGET : OmnichannelSourceType.API, + }, + }; - const froom = await LivechatRooms.findOneOpenByRoomIdAndVisitorToken(roomId, token, {}); - if (!froom) { - throw new Error('invalid-room'); - } + const newRoom = await getRoom({ guest, rid, agent, roomInfo, extraParams }); + return API.v1.success(newRoom); + } - return API.v1.success({ room: froom, newRoom: false }); + const froom = await LivechatRooms.findOneOpenByRoomIdAndVisitorToken(roomId, token, {}); + if (!froom) { + throw new Error('invalid-room'); + } + + return API.v1.success({ room: froom, newRoom: false }); + }, }, -}); +); // Note: use this route if a visitor is closing a room // If a RC user(like eg agent) is closing a room, use the `livechat/room.closeByUser` route diff --git a/apps/meteor/app/livechat/server/api/v1/visitor.ts b/apps/meteor/app/livechat/server/api/v1/visitor.ts index 9c19f5bbdec82..f4a8e57b93cfb 100644 --- a/apps/meteor/app/livechat/server/api/v1/visitor.ts +++ b/apps/meteor/app/livechat/server/api/v1/visitor.ts @@ -9,117 +9,126 @@ import { settings } from '../../../../settings/server'; import { Livechat as LivechatTyped } from '../../lib/LivechatTyped'; import { findGuest, normalizeHttpHeaderData } from '../lib/livechat'; -API.v1.addRoute('livechat/visitor', { - async post() { - check(this.bodyParams, { - visitor: Match.ObjectIncluding({ - token: String, - name: Match.Maybe(String), - email: Match.Maybe(String), - department: Match.Maybe(String), - phone: Match.Maybe(String), - username: Match.Maybe(String), - customFields: Match.Maybe([ - Match.ObjectIncluding({ - key: String, - value: String, - overwrite: Boolean, - }), - ]), - }), - }); +API.v1.addRoute( + 'livechat/visitor', + { + rateLimiterOptions: { + numRequestsAllowed: 5, + intervalTimeInMS: 60000, + }, + }, + { + async post() { + check(this.bodyParams, { + visitor: Match.ObjectIncluding({ + token: String, + name: Match.Maybe(String), + email: Match.Maybe(String), + department: Match.Maybe(String), + phone: Match.Maybe(String), + username: Match.Maybe(String), + customFields: Match.Maybe([ + Match.ObjectIncluding({ + key: String, + value: String, + overwrite: Boolean, + }), + ]), + }), + }); - const { customFields, id, token, name, email, department, phone, username, connectionData } = this.bodyParams.visitor; + const { customFields, id, token, name, email, department, phone, username, connectionData } = this.bodyParams.visitor; - if (!token?.trim()) { - throw new Meteor.Error('error-invalid-token', 'Token cannot be empty', { method: 'livechat/visitor' }); - } + if (!token?.trim()) { + throw new Meteor.Error('error-invalid-token', 'Token cannot be empty', { method: 'livechat/visitor' }); + } - const guest = { - token, - ...(id && { id }), - ...(name && { name }), - ...(email && { email }), - ...(department && { department }), - ...(username && { username }), - ...(connectionData && { connectionData }), - ...(phone && typeof phone === 'string' && { phone: { number: phone as string } }), - connectionData: normalizeHttpHeaderData(this.request.headers), - }; - - const visitorId = await LivechatTyped.registerGuest(guest); - - let visitor: ILivechatVisitor | null = await VisitorsRaw.findOneEnabledById(visitorId, {}); - if (visitor) { - const extraQuery = await callbacks.run('livechat.applyRoomRestrictions', {}); - // If it's updating an existing visitor, it must also update the roomInfo - const rooms = await LivechatRooms.findOpenByVisitorToken(visitor?.token, {}, extraQuery).toArray(); - await Promise.all( - rooms.map( - (room: IRoom) => - visitor && - LivechatTyped.saveRoomInfo(room, { - _id: visitor._id, - name: visitor.name, - phone: visitor.phone?.[0]?.phoneNumber, - livechatData: visitor.livechatData as { [k: string]: string }, - }), - ), - ); - } + const guest = { + token, + ...(id && { id }), + ...(name && { name }), + ...(email && { email }), + ...(department && { department }), + ...(username && { username }), + ...(connectionData && { connectionData }), + ...(phone && typeof phone === 'string' && { phone: { number: phone as string } }), + connectionData: normalizeHttpHeaderData(this.request.headers), + }; + + const visitorId = await LivechatTyped.registerGuest(guest); + + let visitor: ILivechatVisitor | null = await VisitorsRaw.findOneEnabledById(visitorId, {}); + if (visitor) { + const extraQuery = await callbacks.run('livechat.applyRoomRestrictions', {}); + // If it's updating an existing visitor, it must also update the roomInfo + const rooms = await LivechatRooms.findOpenByVisitorToken(visitor?.token, {}, extraQuery).toArray(); + await Promise.all( + rooms.map( + (room: IRoom) => + visitor && + LivechatTyped.saveRoomInfo(room, { + _id: visitor._id, + name: visitor.name, + phone: visitor.phone?.[0]?.phoneNumber, + livechatData: visitor.livechatData as { [k: string]: string }, + }), + ), + ); + } + + if (customFields && Array.isArray(customFields) && customFields.length > 0) { + const keys = customFields.map((field) => field.key); + const errors: string[] = []; - if (customFields && Array.isArray(customFields) && customFields.length > 0) { - const keys = customFields.map((field) => field.key); - const errors: string[] = []; - - const processedKeys = await Promise.all( - await LivechatCustomField.findByIdsAndScope>(keys, 'visitor', { - projection: { _id: 1 }, - }) - .map(async (field) => { - const customField = customFields.find((f) => f.key === field._id); - if (!customField) { - return; - } - - const { key, value, overwrite } = customField; - // TODO: Change this to Bulk update - if (!(await VisitorsRaw.updateLivechatDataByToken(token, key, value, overwrite))) { - errors.push(key); - } - - return key; + const processedKeys = await Promise.all( + await LivechatCustomField.findByIdsAndScope>(keys, 'visitor', { + projection: { _id: 1 }, }) - .toArray(), - ); - - if (processedKeys.length !== keys.length) { - LivechatTyped.logger.warn({ - msg: 'Some custom fields were not processed', - visitorId, - missingKeys: keys.filter((key) => !processedKeys.includes(key)), - }); + .map(async (field) => { + const customField = customFields.find((f) => f.key === field._id); + if (!customField) { + return; + } + + const { key, value, overwrite } = customField; + // TODO: Change this to Bulk update + if (!(await VisitorsRaw.updateLivechatDataByToken(token, key, value, overwrite))) { + errors.push(key); + } + + return key; + }) + .toArray(), + ); + + if (processedKeys.length !== keys.length) { + LivechatTyped.logger.warn({ + msg: 'Some custom fields were not processed', + visitorId, + missingKeys: keys.filter((key) => !processedKeys.includes(key)), + }); + } + + if (errors.length > 0) { + LivechatTyped.logger.error({ + msg: 'Error updating custom fields', + visitorId, + errors, + }); + throw new Error('error-updating-custom-fields'); + } + + visitor = await VisitorsRaw.findOneEnabledById(visitorId, {}); } - if (errors.length > 0) { - LivechatTyped.logger.error({ - msg: 'Error updating custom fields', - visitorId, - errors, - }); - throw new Error('error-updating-custom-fields'); + if (!visitor) { + throw new Meteor.Error('error-saving-visitor', 'An error ocurred while saving visitor'); } - visitor = await VisitorsRaw.findOneEnabledById(visitorId, {}); - } - - if (!visitor) { - throw new Meteor.Error('error-saving-visitor', 'An error ocurred while saving visitor'); - } - - return API.v1.success({ visitor }); + return API.v1.success({ visitor }); + }, }, -}); +); API.v1.addRoute('livechat/visitor/:token', { async get() { diff --git a/apps/meteor/app/livechat/server/hooks/processRoomAbandonment.ts b/apps/meteor/app/livechat/server/hooks/processRoomAbandonment.ts index 8a5a4c2806706..8eb53fbb8fa7f 100644 --- a/apps/meteor/app/livechat/server/hooks/processRoomAbandonment.ts +++ b/apps/meteor/app/livechat/server/hooks/processRoomAbandonment.ts @@ -43,7 +43,8 @@ const getSecondsSinceLastAgentResponse = async (room: IOmnichannelRoom, agentLas officeDays = (await businessHourManager.getBusinessHour())?.workHours.reduce(parseDays, {}); } - if (!officeDays) { + // Empty object we assume invalid config + if (!officeDays || !Object.keys(officeDays).length) { return getSecondsWhenOfficeHoursIsDisabled(room, agentLastMessage); } @@ -55,6 +56,11 @@ const getSecondsSinceLastAgentResponse = async (room: IOmnichannelRoom, agentLas for (let index = 0; index <= daysOfInactivity; index++) { const today = inactivityDay.clone().format('dddd'); const officeDay = officeDays[today]; + // Config doesnt have data for this day, we skip day + if (!officeDay) { + inactivityDay.add(1, 'days'); + continue; + } const startTodaysOfficeHour = moment(`${officeDay.start.day}:${officeDay.start.time}`, 'dddd:HH:mm').add(index, 'days'); const endTodaysOfficeHour = moment(`${officeDay.finish.day}:${officeDay.finish.time}`, 'dddd:HH:mm').add(index, 'days'); if (officeDays[today].open) { diff --git a/apps/meteor/app/otr/server/methods/updateOTRAck.ts b/apps/meteor/app/otr/server/methods/updateOTRAck.ts index a5a502ddf1a2d..cff7c35f82697 100644 --- a/apps/meteor/app/otr/server/methods/updateOTRAck.ts +++ b/apps/meteor/app/otr/server/methods/updateOTRAck.ts @@ -1,8 +1,12 @@ import { api } from '@rocket.chat/core-services'; import type { IOTRMessage } from '@rocket.chat/core-typings'; +import { Rooms } from '@rocket.chat/models'; import type { ServerMethods } from '@rocket.chat/ui-contexts'; +import { check } from 'meteor/check'; import { Meteor } from 'meteor/meteor'; +import { canAccessRoomAsync } from '../../../authorization/server/functions/canAccessRoom'; + declare module '@rocket.chat/ui-contexts' { // eslint-disable-next-line @typescript-eslint/naming-convention interface ServerMethods { @@ -11,10 +15,40 @@ declare module '@rocket.chat/ui-contexts' { } Meteor.methods({ - updateOTRAck({ message, ack }) { - if (!Meteor.userId()) { + async updateOTRAck({ message, ack }) { + const uid = Meteor.userId(); + if (!uid) { throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'updateOTRAck' }); } + + check(ack, String); + check(message, { + _id: String, + rid: String, + msg: String, + t: String, + ts: Date, + u: { + _id: String, + username: String, + name: String, + }, + }); + + if (message?.t !== 'otr') { + throw new Meteor.Error('error-invalid-message', 'Invalid message type', { method: 'updateOTRAck' }); + } + + const room = await Rooms.findOneByIdAndType(message.rid, 'd', { projection: { t: 1, _id: 1, uids: 1 } }); + + if (!room) { + throw new Meteor.Error('error-invalid-room', 'Invalid room', { method: 'updateOTRAck' }); + } + + if (!(await canAccessRoomAsync(room, { _id: uid })) || (room.uids && (!message.u._id || !room.uids.includes(message.u._id)))) { + throw new Meteor.Error('error-invalid-user', 'Invalid user, not in room', { method: 'updateOTRAck' }); + } + const acknowledgeMessage: IOTRMessage = { ...message, otrAck: ack }; void api.broadcast('otrAckUpdate', { roomId: message.rid, acknowledgeMessage }); }, diff --git a/apps/meteor/app/retention-policy/server/cronPruneMessages.ts b/apps/meteor/app/retention-policy/server/cronPruneMessages.ts index 337691bfbe57a..640aa517a6799 100644 --- a/apps/meteor/app/retention-policy/server/cronPruneMessages.ts +++ b/apps/meteor/app/retention-policy/server/cronPruneMessages.ts @@ -6,13 +6,20 @@ import { getCronAdvancedTimerFromPrecisionSetting } from '../../../lib/getCronAd import { cleanRoomHistory } from '../../lib/server/functions/cleanRoomHistory'; import { settings } from '../../settings/server'; -const maxTimes = { - c: 0, - p: 0, - d: 0, +type RetentionRoomTypes = 'c' | 'p' | 'd'; + +const getMaxAgeSettingIdByRoomType = (type: RetentionRoomTypes) => { + switch (type) { + case 'c': + return settings.get('RetentionPolicy_TTL_Channels'); + case 'p': + return settings.get('RetentionPolicy_TTL_Groups'); + case 'd': + return settings.get('RetentionPolicy_TTL_DMs'); + } }; -let types: (keyof typeof maxTimes)[] = []; +let types: RetentionRoomTypes[] = []; const oldest = new Date('0001-01-01T00:00:00Z'); @@ -29,7 +36,7 @@ async function job(): Promise { // get all rooms with default values for await (const type of types) { - const maxAge = maxTimes[type] || 0; + const maxAge = getMaxAgeSettingIdByRoomType(type) || 0; const latest = new Date(now.getTime() - maxAge); const rooms = await Rooms.find( @@ -95,9 +102,6 @@ settings.watchMultiple( 'RetentionPolicy_AppliesToChannels', 'RetentionPolicy_AppliesToGroups', 'RetentionPolicy_AppliesToDMs', - 'RetentionPolicy_TTL_Channels', - 'RetentionPolicy_TTL_Groups', - 'RetentionPolicy_TTL_DMs', 'RetentionPolicy_Advanced_Precision', 'RetentionPolicy_Advanced_Precision_Cron', 'RetentionPolicy_Precision', @@ -120,10 +124,6 @@ settings.watchMultiple( types.push('d'); } - maxTimes.c = settings.get('RetentionPolicy_TTL_Channels'); - maxTimes.p = settings.get('RetentionPolicy_TTL_Groups'); - maxTimes.d = settings.get('RetentionPolicy_TTL_DMs'); - const precision = (settings.get('RetentionPolicy_Advanced_Precision') && settings.get('RetentionPolicy_Advanced_Precision_Cron')) || getCronAdvancedTimerFromPrecisionSetting(settings.get('RetentionPolicy_Precision')); diff --git a/apps/meteor/app/utils/rocketchat.info b/apps/meteor/app/utils/rocketchat.info index 3cb06b1e99abe..582ec594eb2af 100644 --- a/apps/meteor/app/utils/rocketchat.info +++ b/apps/meteor/app/utils/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "6.10.2" + "version": "6.10.10" } diff --git a/apps/meteor/client/startup/accounts.ts b/apps/meteor/client/startup/accounts.ts index 3be110bc0a09a..88008a606656b 100644 --- a/apps/meteor/client/startup/accounts.ts +++ b/apps/meteor/client/startup/accounts.ts @@ -2,6 +2,7 @@ import { Accounts } from 'meteor/accounts-base'; import { Meteor } from 'meteor/meteor'; import { Tracker } from 'meteor/tracker'; +import { settings } from '../../app/settings/client'; import { mainReady } from '../../app/ui-utils/client'; import { sdk } from '../../app/utils/client/lib/SDKClient'; import { t } from '../../app/utils/lib/i18n'; @@ -24,3 +25,17 @@ Accounts.onEmailVerificationLink((token: string) => { }); }); }); + +Meteor.startup(() => { + Tracker.autorun((computation) => { + const forgetUserSessionOnWindowClose = settings.get('Accounts_ForgetUserSessionOnWindowClose'); + + if (forgetUserSessionOnWindowClose === undefined) { + return; + } + + computation.stop(); + + Accounts.config({ clientStorage: forgetUserSessionOnWindowClose ? 'session' : 'local' }); + }); +}); diff --git a/apps/meteor/client/views/admin/oauthApps/EditOauthApp.tsx b/apps/meteor/client/views/admin/oauthApps/EditOauthApp.tsx index 19bef201492f2..79d2fbe111403 100644 --- a/apps/meteor/client/views/admin/oauthApps/EditOauthApp.tsx +++ b/apps/meteor/client/views/admin/oauthApps/EditOauthApp.tsx @@ -8,6 +8,7 @@ import { FieldRow, FieldError, FieldHint, + PasswordInput, TextAreaInput, ToggleSwitch, FieldGroup, @@ -136,7 +137,7 @@ const EditOauthApp = ({ onChange, data, ...props }: EditOauthAppProps): ReactEle {t('Client_Secret')} - + diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppDetails/AppDetails.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppDetails/AppDetails.tsx index 8d17f669db834..5f3e427b83917 100644 --- a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppDetails/AppDetails.tsx +++ b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppDetails/AppDetails.tsx @@ -2,10 +2,12 @@ import { Box, Callout, Chip, Margins } from '@rocket.chat/fuselage'; import { ExternalLink } from '@rocket.chat/ui-client'; import type { TranslationKey } from '@rocket.chat/ui-contexts'; import { useTranslation } from '@rocket.chat/ui-contexts'; +import DOMPurify from 'dompurify'; import React from 'react'; import ScreenshotCarouselAnchor from '../../../components/ScreenshotCarouselAnchor'; import type { AppInfo } from '../../../definitions/AppInfo'; +import { purifyOptions } from '../../../lib/purifyOptions'; import AppDetailsAPIs from './AppDetailsAPIs'; import { normalizeUrl } from './normalizeUrl'; @@ -61,7 +63,14 @@ const AppDetails = ({ app }: AppDetailsProps) => { {t('Description')} - + diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx index bc27053ea1d2d..974b6d148e611 100644 --- a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx +++ b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx @@ -1,9 +1,11 @@ import { Accordion, Box } from '@rocket.chat/fuselage'; import { useTranslation } from '@rocket.chat/ui-contexts'; +import DOMPurify from 'dompurify'; import type { ReactElement } from 'react'; import React from 'react'; import { useTimeAgo } from '../../../../../hooks/useTimeAgo'; +import { purifyOptions } from '../../../lib/purifyOptions'; type IRelease = { version: string; @@ -36,7 +38,7 @@ const AppReleasesItem = ({ release, ...props }: ReleaseItemProps): ReactElement return ( {release.detailedChangelog?.rendered ? ( - + ) : ( {t('No_release_information_provided')} )} diff --git a/apps/meteor/client/views/marketplace/lib/purifyOptions.ts b/apps/meteor/client/views/marketplace/lib/purifyOptions.ts new file mode 100644 index 0000000000000..cef1a2c8c7076 --- /dev/null +++ b/apps/meteor/client/views/marketplace/lib/purifyOptions.ts @@ -0,0 +1,50 @@ +export const purifyOptions = { + ALLOWED_TAGS: [ + 'b', + 'i', + 'em', + 'strong', + 'br', + 'p', + 'ul', + 'ol', + 'li', + 'article', + 'aside', + 'figure', + 'section', + 'summary', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'hgroup', + 'div', + 'hr', + 'span', + 'wbr', + 'abbr', + 'acronym', + 'cite', + 'code', + 'dfn', + 'figcaption', + 'mark', + 's', + 'samp', + 'sub', + 'sup', + 'var', + 'time', + 'q', + 'del', + 'ins', + 'rp', + 'rt', + 'ruby', + 'bdi', + 'bdo', + ], +}; diff --git a/apps/meteor/client/views/omnichannel/realTimeMonitoring/RealTimeMonitoringPage.js b/apps/meteor/client/views/omnichannel/realTimeMonitoring/RealTimeMonitoringPage.js index 5b4d837d211cd..b6e29530b5e72 100644 --- a/apps/meteor/client/views/omnichannel/realTimeMonitoring/RealTimeMonitoringPage.js +++ b/apps/meteor/client/views/omnichannel/realTimeMonitoring/RealTimeMonitoringPage.js @@ -18,11 +18,19 @@ import ChatsOverview from './overviews/ChatsOverview'; import ConversationOverview from './overviews/ConversationOverview'; import ProductivityOverview from './overviews/ProductivityOverview'; +const randomizeKeys = (keys) => { + keys.current = keys.current.map((_key, i) => { + return `${i}_${new Date().getTime()}`; + }); +}; + const dateRange = getDateRange(); const RealTimeMonitoringPage = () => { const t = useTranslation(); + const keys = useRef([...Array(10).keys()]); + const [reloadFrequency, setReloadFrequency] = useState(5); const [departmentId, setDepartment] = useState(''); @@ -43,6 +51,10 @@ const RealTimeMonitoringPage = () => { [departmentParams], ); + useEffect(() => { + randomizeKeys(keys); + }, [allParams]); + const reloadCharts = useMutableCallback(() => { Object.values(reloadRef.current).forEach((reload) => { reload(); @@ -53,6 +65,7 @@ const RealTimeMonitoringPage = () => { const interval = setInterval(reloadCharts, reloadFrequency * 1000); return () => { clearInterval(interval); + randomizeKeys(keys); }; }, [reloadCharts, reloadFrequency]); @@ -90,30 +103,54 @@ const RealTimeMonitoringPage = () => { - + - - + + - + - - + + - + - + - + - + diff --git a/apps/meteor/definition/externals/meteor/accounts-base.d.ts b/apps/meteor/definition/externals/meteor/accounts-base.d.ts index 3f0b148120e71..31b70f7b7154d 100644 --- a/apps/meteor/definition/externals/meteor/accounts-base.d.ts +++ b/apps/meteor/definition/externals/meteor/accounts-base.d.ts @@ -42,6 +42,8 @@ declare module 'meteor/accounts-base' { function _clearAllLoginTokens(userId: string | null): void; + function config(options: { clientStorage: 'session' | 'local' }): void; + class ConfigError extends Error {} class LoginCancelledError extends Error { diff --git a/apps/meteor/ee/server/lib/audit/methods.ts b/apps/meteor/ee/server/lib/audit/methods.ts index add64414c6e8b..b221f4a2f1e14 100644 --- a/apps/meteor/ee/server/lib/audit/methods.ts +++ b/apps/meteor/ee/server/lib/audit/methods.ts @@ -88,11 +88,18 @@ Meteor.methods({ check(startDate, Date); check(endDate, Date); - const user = await Meteor.userAsync(); + const user = (await Meteor.userAsync()) as IUser; if (!user || !(await hasPermissionAsync(user._id, 'can-audit'))) { throw new Meteor.Error('Not allowed'); } + const userFields = { + _id: user._id, + username: user.username, + ...(user.name && { name: user.name }), + ...(user.avatarETag && { avatarETag: user.avatarETag }), + }; + const rooms: IRoom[] = await LivechatRooms.findByVisitorIdAndAgentId(visitor, agent, { projection: { _id: 1 }, }).toArray(); @@ -118,7 +125,7 @@ Meteor.methods({ await AuditLog.insertOne({ ts: new Date(), results: messages.length, - u: user, + u: userFields, fields: { msg, users: usernames, rids, room: name, startDate, endDate, type, visitor, agent }, }); @@ -128,11 +135,18 @@ Meteor.methods({ check(startDate, Date); check(endDate, Date); - const user = await Meteor.userAsync(); + const user = (await Meteor.userAsync()) as IUser; if (!user || !(await hasPermissionAsync(user._id, 'can-audit'))) { throw new Meteor.Error('Not allowed'); } + const userFields = { + _id: user._id, + username: user.username, + ...(user.name && { name: user.name }), + ...(user.avatarETag && { avatarETag: user.avatarETag }), + }; + let rids; let name; @@ -169,9 +183,10 @@ Meteor.methods({ await AuditLog.insertOne({ ts: new Date(), results: messages.length, - u: user, + u: userFields, fields: { msg, users: usernames, rids, room: name, startDate, endDate, type, visitor, agent }, }); + updateCounter({ settingsId: 'Message_Auditing_Panel_Load_Count' }); return messages; @@ -183,13 +198,24 @@ Meteor.methods({ if (!uid || !(await hasPermissionAsync(uid, 'can-audit-log'))) { throw new Meteor.Error('Not allowed'); } - return AuditLog.find({ - // 'u._id': userId, - ts: { - $gt: startDate, - $lt: endDate, + return AuditLog.find( + { + // 'u._id': userId, + ts: { + $gt: startDate, + $lt: endDate, + }, }, - }).toArray(); + { + projection: { + 'u.services': 0, + 'u.roles': 0, + 'u.lastLogin': 0, + 'u.statusConnection': 0, + 'u.emails': 0, + }, + }, + ).toArray(); }, }); diff --git a/apps/meteor/ee/server/services/CHANGELOG.md b/apps/meteor/ee/server/services/CHANGELOG.md index 5da1c7dee35c0..21fd7289d0b16 100644 --- a/apps/meteor/ee/server/services/CHANGELOG.md +++ b/apps/meteor/ee/server/services/CHANGELOG.md @@ -1,5 +1,132 @@ # rocketchat-services +## 1.2.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/message-parser@0.31.32 + - @rocket.chat/core-services@0.4.10 + - @rocket.chat/model-typings@0.5.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/rest-typings@6.10.10 + - @rocket.chat/models@0.1.10 +
+ +## 1.2.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/rest-typings@6.10.9 + - @rocket.chat/core-services@0.4.9 + - @rocket.chat/model-typings@0.5.9 + - @rocket.chat/models@0.1.9 +
+ +## 1.2.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/rest-typings@6.10.8 + - @rocket.chat/core-services@0.4.8 + - @rocket.chat/model-typings@0.5.8 + - @rocket.chat/models@0.1.8 +
+ +## 1.2.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/message-parser@0.31.31 + - @rocket.chat/core-services@0.4.7 + - @rocket.chat/model-typings@0.5.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/rest-typings@6.10.7 + - @rocket.chat/models@0.1.7 +
+ +## 1.2.6 + +### Patch Changes + +-
Updated dependencies [a45b88cdf2]: + + - @rocket.chat/message-parser@0.31.30 + - @rocket.chat/core-services@0.4.6 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/rest-typings@6.10.6 + - @rocket.chat/model-typings@0.5.6 + - @rocket.chat/models@0.1.6 +
+ +## 1.2.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/rest-typings@6.10.5 + - @rocket.chat/core-services@0.4.5 + - @rocket.chat/model-typings@0.5.5 + - @rocket.chat/models@0.1.5 +
+ +## 1.2.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/rest-typings@6.10.4 + - @rocket.chat/core-services@0.4.4 + - @rocket.chat/model-typings@0.5.4 + - @rocket.chat/models@0.1.4 +
+ +## 1.2.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/rest-typings@6.10.3 + - @rocket.chat/core-services@0.4.3 + - @rocket.chat/model-typings@0.5.3 + - @rocket.chat/models@0.1.3 +
+ ## 1.2.2 ### Patch Changes diff --git a/apps/meteor/ee/server/services/package.json b/apps/meteor/ee/server/services/package.json index 1c62f81ff2409..638773cc73aa5 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": "1.2.2", + "version": "1.2.10", "description": "Rocket.Chat Authorization service", "main": "index.js", "scripts": { @@ -18,7 +18,7 @@ "author": "Rocket.Chat", "license": "MIT", "dependencies": { - "@rocket.chat/apps-engine": "1.43.1", + "@rocket.chat/apps-engine": "1.43.5", "@rocket.chat/core-services": "workspace:^", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/emitter": "~0.31.25", diff --git a/apps/meteor/package.json b/apps/meteor/package.json index a7c7afa96f2c2..ed001bf7e63ea 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": "6.10.2", + "version": "6.10.10", "private": true, "author": { "name": "Rocket.Chat", @@ -231,7 +231,7 @@ "@rocket.chat/agenda": "workspace:^", "@rocket.chat/api-client": "workspace:^", "@rocket.chat/apps": "workspace:^", - "@rocket.chat/apps-engine": "1.43.1", + "@rocket.chat/apps-engine": "1.43.5", "@rocket.chat/base64": "workspace:^", "@rocket.chat/cas-validate": "workspace:^", "@rocket.chat/core-services": "workspace:^", diff --git a/apps/meteor/server/lib/ldap/Manager.ts b/apps/meteor/server/lib/ldap/Manager.ts index 4a5cdf2df8d6e..7dd4fba9bf9bb 100644 --- a/apps/meteor/server/lib/ldap/Manager.ts +++ b/apps/meteor/server/lib/ldap/Manager.ts @@ -163,7 +163,7 @@ export class LDAPManager { const { attribute: idAttribute, value: id } = uniqueId; const username = this.slugifyUsername(ldapUser, usedUsername || id || '') || undefined; - const emails = this.getLdapEmails(ldapUser, username); + const emails = this.getLdapEmails(ldapUser, username).map((email) => email.trim()); const name = this.getLdapName(ldapUser) || undefined; const userData: IImportUser = { diff --git a/apps/meteor/server/methods/reportMessage.ts b/apps/meteor/server/methods/reportMessage.ts index 05ac5aaf7e7bb..14ef69189b337 100644 --- a/apps/meteor/server/methods/reportMessage.ts +++ b/apps/meteor/server/methods/reportMessage.ts @@ -3,6 +3,7 @@ import type { IMessage } from '@rocket.chat/core-typings'; import { ModerationReports, Rooms, Users, Messages } from '@rocket.chat/models'; import type { ServerMethods } from '@rocket.chat/ui-contexts'; import { check } from 'meteor/check'; +import { DDPRateLimiter } from 'meteor/ddp-rate-limiter'; import { Meteor } from 'meteor/meteor'; import { canAccessRoomAsync } from '../../app/authorization/server/functions/canAccessRoom'; @@ -82,3 +83,15 @@ Meteor.methods({ return true; }, }); + +DDPRateLimiter.addRule( + { + type: 'method', + name: 'reportMessage', + userId() { + return true; + }, + }, + 5, + 60000, +); diff --git a/apps/meteor/server/methods/sendConfirmationEmail.ts b/apps/meteor/server/methods/sendConfirmationEmail.ts index 8c7d056532d39..9ed7e0b99da28 100644 --- a/apps/meteor/server/methods/sendConfirmationEmail.ts +++ b/apps/meteor/server/methods/sendConfirmationEmail.ts @@ -2,6 +2,7 @@ import { Users } from '@rocket.chat/models'; import type { ServerMethods } from '@rocket.chat/ui-contexts'; import { Accounts } from 'meteor/accounts-base'; import { check } from 'meteor/check'; +import { DDPRateLimiter } from 'meteor/ddp-rate-limiter'; import { Meteor } from 'meteor/meteor'; import { methodDeprecationLogger } from '../../app/lib/server/lib/deprecationWarningLogger'; @@ -31,3 +32,15 @@ Meteor.methods({ } }, }); + +DDPRateLimiter.addRule( + { + type: 'method', + name: 'sendConfirmationEmail', + userId() { + return true; + }, + }, + 5, + 60000, +); diff --git a/apps/meteor/server/models/raw/Rooms.ts b/apps/meteor/server/models/raw/Rooms.ts index 1859f6c18b356..1214d54613162 100644 --- a/apps/meteor/server/models/raw/Rooms.ts +++ b/apps/meteor/server/models/raw/Rooms.ts @@ -910,6 +910,10 @@ export class RoomsRaw extends BaseRaw implements IRoomsModel { return this.findOne(query, options); } + findOneByIdAndType(roomId: IRoom['_id'], type: IRoom['t'], options: FindOptions = {}): Promise { + return this.findOne({ _id: roomId, t: type }, options); + } + setCallStatus(_id: IRoom['_id'], status: IRoom['callStatus']): Promise { const query: Filter = { _id, diff --git a/apps/meteor/server/services/omnichannel-integrations/providers/mobex.ts b/apps/meteor/server/services/omnichannel-integrations/providers/mobex.ts index 19284b8e1e6b3..d036345663cd4 100644 --- a/apps/meteor/server/services/omnichannel-integrations/providers/mobex.ts +++ b/apps/meteor/server/services/omnichannel-integrations/providers/mobex.ts @@ -1,6 +1,7 @@ import { Base64 } from '@rocket.chat/base64'; import type { ISMSProvider, ServiceData, SMSProviderResult, SMSProviderResponse } from '@rocket.chat/core-typings'; import { serverFetch as fetch } from '@rocket.chat/server-fetch'; +import type { Request } from 'express'; import { settings } from '../../../../app/settings/server'; import { SystemLogger } from '../../../lib/logger/system'; @@ -196,6 +197,10 @@ export class Mobex implements ISMSProvider { }; } + validateRequest(_request: Request): boolean { + return true; + } + error(error: Error & { reason?: string }): SMSProviderResponse { let message = ''; if (error.reason) { diff --git a/apps/meteor/server/services/omnichannel-integrations/providers/twilio.ts b/apps/meteor/server/services/omnichannel-integrations/providers/twilio.ts index 3aff869a95a0c..4a1c8d9d0ebf5 100644 --- a/apps/meteor/server/services/omnichannel-integrations/providers/twilio.ts +++ b/apps/meteor/server/services/omnichannel-integrations/providers/twilio.ts @@ -1,6 +1,7 @@ import { api } from '@rocket.chat/core-services'; import type { ISMSProvider, ServiceData, SMSProviderResponse, SMSProviderResult } from '@rocket.chat/core-typings'; import { Users } from '@rocket.chat/models'; +import type { Request } from 'express'; import filesize from 'filesize'; import twilio from 'twilio'; @@ -244,6 +245,31 @@ export class Twilio implements ISMSProvider { }; } + isRequestFromTwilio(signature: string, requestBody: object): boolean { + const authToken = settings.get('SMS_Twilio_authToken'); + const siteUrl = settings.get('Site_Url'); + + if (!authToken || !siteUrl) { + SystemLogger.error(`(Twilio) -> URL or Twilio token not configured.`); + return false; + } + + const twilioUrl = siteUrl.endsWith('/') + ? `${siteUrl}api/v1/livechat/sms-incoming/twilio` + : `${siteUrl}/api/v1/livechat/sms-incoming/twilio`; + return twilio.validateRequest(authToken, signature, twilioUrl, requestBody); + } + + validateRequest(request: Request): boolean { + // We're not getting original twilio requests on CI :p + if (process.env.TEST_MODE === 'true') { + return true; + } + const twilioHeader = request.headers['x-twilio-signature'] || ''; + const twilioSignature = Array.isArray(twilioHeader) ? twilioHeader[0] : twilioHeader; + return this.isRequestFromTwilio(twilioSignature, request.body); + } + error(error: Error & { reason?: string }): SMSProviderResponse { let message = ''; if (error.reason) { diff --git a/apps/meteor/server/services/omnichannel-integrations/providers/voxtelesys.ts b/apps/meteor/server/services/omnichannel-integrations/providers/voxtelesys.ts index 3e78907bbf754..aa42bacad6243 100644 --- a/apps/meteor/server/services/omnichannel-integrations/providers/voxtelesys.ts +++ b/apps/meteor/server/services/omnichannel-integrations/providers/voxtelesys.ts @@ -2,6 +2,7 @@ import { api } from '@rocket.chat/core-services'; import type { ISMSProvider, ServiceData, SMSProviderResponse } from '@rocket.chat/core-typings'; import { Users } from '@rocket.chat/models'; import { serverFetch as fetch } from '@rocket.chat/server-fetch'; +import type { Request } from 'express'; import filesize from 'filesize'; import { settings } from '../../../../app/settings/server'; @@ -162,6 +163,10 @@ export class Voxtelesys implements ISMSProvider { }; } + validateRequest(_request: Request): boolean { + return true; + } + error(error: Error & { reason?: string }): SMSProviderResponse { let message = ''; if (error.reason) { diff --git a/apps/meteor/server/settings/message.ts b/apps/meteor/server/settings/message.ts index 6ec6e33556559..520af87d2333a 100644 --- a/apps/meteor/server/settings/message.ts +++ b/apps/meteor/server/settings/message.ts @@ -32,7 +32,7 @@ export const createMessageSettings = () => ], }); - await this.add('Message_Attachments_Strip_Exif', false, { + await this.add('Message_Attachments_Strip_Exif', true, { type: 'boolean', public: true, i18nDescription: 'Message_Attachments_Strip_ExifDescription', diff --git a/apps/meteor/server/startup/migrations/xrun.ts b/apps/meteor/server/startup/migrations/xrun.ts index 7f6c8a68ad557..0344649f99935 100644 --- a/apps/meteor/server/startup/migrations/xrun.ts +++ b/apps/meteor/server/startup/migrations/xrun.ts @@ -2,6 +2,7 @@ import { Settings } from '@rocket.chat/models'; import type { UpdateResult } from 'mongodb'; import { upsertPermissions } from '../../../app/authorization/server/functions/upsertPermissions'; +import { settings } from '../../../app/settings/server'; import { migrateDatabase, onServerVersionChange } from '../../lib/migrations'; import { ensureCloudWorkspaceRegistered } from '../cloudRegistration'; @@ -23,10 +24,13 @@ const moveRetentionSetting = async () => { { _id: { $in: Array.from(maxAgeSettingMap.keys()) }, value: { $ne: -1 } }, { projection: { _id: 1, value: 1 } }, ).forEach(({ _id, value }) => { - if (!maxAgeSettingMap.has(_id)) { + const newSettingId = maxAgeSettingMap.get(_id); + if (!newSettingId) { throw new Error(`moveRetentionSetting - Setting ${_id} equivalent does not exist`); } + const newValue = convertDaysToMs(Number(value)); + promises.push( Settings.updateOne( { @@ -34,11 +38,17 @@ const moveRetentionSetting = async () => { }, { $set: { - value: convertDaysToMs(Number(value)), + value: newValue, }, }, ), ); + + const currentCache = settings.getSetting(newSettingId); + if (!currentCache) { + return; + } + settings.set({ ...currentCache, value: newValue }); }); await Promise.all(promises); diff --git a/apps/meteor/tests/e2e/account-forgetSessionOnWindowClose.spec.ts b/apps/meteor/tests/e2e/account-forgetSessionOnWindowClose.spec.ts new file mode 100644 index 0000000000000..a19b0e9866da4 --- /dev/null +++ b/apps/meteor/tests/e2e/account-forgetSessionOnWindowClose.spec.ts @@ -0,0 +1,55 @@ +import { DEFAULT_USER_CREDENTIALS } from './config/constants'; +import { Registration } from './page-objects'; +import { test, expect } from './utils/test'; + +test.describe.serial('Forget session on window close setting', () => { + let poRegistration: Registration; + + test.beforeEach(async ({ page }) => { + poRegistration = new Registration(page); + + await page.goto('/home'); + }); + + test.describe('Setting off', async () => { + test.beforeAll(async ({ api }) => { + await api.post('/settings/Accounts_ForgetUserSessionOnWindowClose', { value: false }); + }); + + test('Login using credentials and reload to stay logged in', async ({ page, context }) => { + await poRegistration.username.type('user1'); + await poRegistration.inputPassword.type(DEFAULT_USER_CREDENTIALS.password); + await poRegistration.btnLogin.click(); + + await expect(page.locator('role=heading[name="Welcome to Rocket.Chat"]')).toBeVisible(); + + const newPage = await context.newPage(); + await newPage.goto('/home'); + + await expect(newPage.locator('role=heading[name="Welcome to Rocket.Chat"]')).toBeVisible(); + }); + }); + + test.describe('Setting on', async () => { + test.beforeAll(async ({ api }) => { + await api.post('/settings/Accounts_ForgetUserSessionOnWindowClose', { value: true }); + }); + + test.afterAll(async ({ api }) => { + await api.post('/settings/Accounts_ForgetUserSessionOnWindowClose', { value: false }); + }); + + test('Login using credentials and reload to get logged out', async ({ page, context }) => { + await poRegistration.username.type('user1'); + await poRegistration.inputPassword.type(DEFAULT_USER_CREDENTIALS.password); + await poRegistration.btnLogin.click(); + + await expect(page.locator('role=heading[name="Welcome to Rocket.Chat"]')).toBeVisible(); + + const newPage = await context.newPage(); + await newPage.goto('/home'); + + await expect(newPage.locator('role=button[name="Login"]')).toBeVisible(); + }); + }); +}); diff --git a/apps/meteor/tests/end-to-end/api/00-miscellaneous.js b/apps/meteor/tests/end-to-end/api/00-miscellaneous.js index 1fe04b9b380a6..4defa22fe84ee 100644 --- a/apps/meteor/tests/end-to-end/api/00-miscellaneous.js +++ b/apps/meteor/tests/end-to-end/api/00-miscellaneous.js @@ -2,7 +2,8 @@ import { TEAM_TYPE } from '@rocket.chat/core-typings'; import { expect } from 'chai'; import { after, before, describe, it } from 'mocha'; -import { getCredentials, api, request, credentials } from '../../data/api-data.js'; +import { getCredentials, api, request, credentials, methodCall } from '../../data/api-data'; +import { sleep } from '../../data/livechat/utils'; import { updatePermission, updateSetting } from '../../data/permissions.helper'; import { createRoom, deleteRoom } from '../../data/rooms.helper'; import { createTeam, deleteTeam } from '../../data/teams.helper'; @@ -694,4 +695,155 @@ describe('miscellaneous', function () { .end(done); }); }); + + describe('[/stdout.queue]', () => { + let testUser; + let testUsername; + let testUserPassword; + before(async () => { + testUser = await createUser(); + testUsername = testUser.username; + testUserPassword = password; + await updateSetting('Log_Trace_Methods', true); + await updateSetting('Log_Level', '2'); + await sleep(4000); + + // populate the logs by sending method calls + const populateLogsPromises = []; + populateLogsPromises.push( + request + .post(methodCall('getRoomRoles')) + .set(credentials) + .set('Cookie', `rc_token=${credentials['X-Auth-Token']}`) + .send({ + message: JSON.stringify({ + method: 'getRoomRoles', + params: ['GENERAL'], + id: 'id', + msg: 'method', + }), + }), + ); + + populateLogsPromises.push( + request + .post(methodCall('getRoomRoles')) + .set(credentials) + .set('Cookie', `rc_token=${credentials['X-Auth-Token']}`) + .send({ + message: JSON.stringify({ + method: 'getRoomRoles', + params: ['GENERAL'], + id: 'id', + msg: 'method', + }), + }), + ); + + populateLogsPromises.push( + request + .post(methodCall('private-settings:get')) + .set(credentials) + .send({ + message: JSON.stringify({ + method: 'private-settings/get', + params: [ + { + $date: new Date().getTime(), + }, + ], + id: 'id', + msg: 'method', + }), + }), + ); + + populateLogsPromises.push( + request.post(api('login')).send({ + user: { + username: testUsername, + }, + password: testUserPassword, + }), + ); + + await Promise.all(populateLogsPromises); + }); + + after(async () => { + await Promise.all([updateSetting('Log_Trace_Methods', false), updateSetting('Log_Level', '0'), deleteUser(testUser)]); + }); + + it('if log trace enabled, x-auth-token should be redacted', async () => { + await request + .get(api('stdout.queue')) + .set(credentials) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.property('success', true); + expect(res.body).to.have.property('queue').that.is.an('array'); + + const { queue } = res.body; + let foundRedactedToken = false; + + for (const log of queue) { + if (log.string.includes("'x-auth-token': '[redacted]'")) { + foundRedactedToken = true; + break; + } + } + + expect(foundRedactedToken).to.be.true; + }); + }); + + it('if log trace enabled, rc_token should be redacted', async () => { + await request + .get(api('stdout.queue')) + .set(credentials) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.property('success', true); + expect(res.body).to.have.property('queue').that.is.an('array'); + + const { queue } = res.body; + let foundRedactedCookie = false; + + for (const log of queue) { + if (log.string.includes('rc_token=[redacted]')) { + foundRedactedCookie = true; + break; + } + } + + expect(foundRedactedCookie).to.be.true; + }); + }); + + it('should not return user token anywhere in the log stream', async () => { + await request + .get(api('stdout.queue')) + .set(credentials) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.property('success', true); + expect(res.body).to.have.property('queue').that.is.an('array'); + + const { queue } = res.body; + let foundTokenValue = false; + + for (const log of queue) { + if (log.string.includes(credentials['X-Auth-Token'])) { + foundTokenValue = true; + break; + } + } + + expect(foundTokenValue).to.be.false; + }); + }); + }); }); diff --git a/apps/meteor/tests/end-to-end/api/01-users.js b/apps/meteor/tests/end-to-end/api/01-users.js index 535e989dce95b..a9f59a44d2688 100644 --- a/apps/meteor/tests/end-to-end/api/01-users.js +++ b/apps/meteor/tests/end-to-end/api/01-users.js @@ -2470,18 +2470,37 @@ describe('[Users]', function () { }); describe('[/users.forgotPassword]', () => { + it('should return an error when "Accounts_PasswordReset" is disabled', (done) => { + void updateSetting('Accounts_PasswordReset', false).then(() => { + void request + .post(api('users.forgotPassword')) + .send({ + email: adminEmail, + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('error', 'Password reset is not enabled'); + }) + .end(done); + }); + }); + it('should send email to user (return success), when is a valid email', (done) => { - request - .post(api('users.forgotPassword')) - .send({ - email: adminEmail, - }) - .expect('Content-Type', 'application/json') - .expect(200) - .expect((res) => { - expect(res.body).to.have.property('success', true); - }) - .end(done); + void updateSetting('Accounts_PasswordReset', true).then(() => { + void request + .post(api('users.forgotPassword')) + .send({ + email: adminEmail, + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.property('success', true); + }) + .end(done); + }); }); it('should not send email to user(return error), when is a invalid email', (done) => { diff --git a/apps/meteor/tests/end-to-end/api/09-rooms.js b/apps/meteor/tests/end-to-end/api/09-rooms.js index de4668e86f485..829ec347c3c2a 100644 --- a/apps/meteor/tests/end-to-end/api/09-rooms.js +++ b/apps/meteor/tests/end-to-end/api/09-rooms.js @@ -1027,7 +1027,6 @@ describe('[Rooms]', function () { .end(done); }); }); - describe('[/rooms.info]', () => { let testChannel; let testGroup; diff --git a/apps/meteor/tests/end-to-end/api/24-methods.js b/apps/meteor/tests/end-to-end/api/24-methods.js index aabd24e041194..e19501bf6b728 100644 --- a/apps/meteor/tests/end-to-end/api/24-methods.js +++ b/apps/meteor/tests/end-to-end/api/24-methods.js @@ -2029,6 +2029,13 @@ describe('Meteor.methods', function () { let messageWithMarkdownId; let channelName = false; const siteUrl = process.env.SITE_URL || process.env.TEST_API_URL || 'http://localhost:3000'; + let testUser; + let testUserCredentials; + + before(async () => { + testUser = await createUser(); + testUserCredentials = await login(testUser.username, password); + }); before('create room', (done) => { channelName = `methods-test-channel-${Date.now()}`; @@ -2124,13 +2131,14 @@ describe('Meteor.methods', function () { after(() => Promise.all([ deleteRoom({ type: 'p', roomId: rid }), + deleteUser(testUser), updatePermission('bypass-time-limit-edit-and-delete', ['bot', 'app']), updateSetting('Message_AllowEditing_BlockEditInMinutes', 0), ]), ); - it('should update a message with a URL', (done) => { - request + it('should update a message with a URL', async () => { + await request .post(methodCall('updateMessage')) .set(credentials) .send({ @@ -2148,8 +2156,53 @@ describe('Meteor.methods', function () { expect(res.body).to.have.a.property('message').that.is.a('string'); const data = JSON.parse(res.body.message); expect(data).to.have.a.property('msg').that.is.an('string'); + }); + }); + + it('should fail if user does not have permissions to update a message with the same content', async () => { + await request + .post(methodCall('updateMessage')) + .set(testUserCredentials) + .send({ + message: JSON.stringify({ + method: 'updateMessage', + params: [{ _id: messageId, rid, msg: 'test message with https://github.com' }], + id: 'id', + msg: 'method', + }), }) - .end(done); + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('success', true); + expect(res.body).to.have.a.property('message').that.is.a('string'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('msg').that.is.an('string'); + expect(data.error).to.have.a.property('error', 'error-action-not-allowed'); + }); + }); + + it('should fail if user does not have permissions to update a message with different content', async () => { + await request + .post(methodCall('updateMessage')) + .set(testUserCredentials) + .send({ + message: JSON.stringify({ + method: 'updateMessage', + params: [{ _id: messageId, rid, msg: 'updating test message with https://github.com' }], + id: 'id', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('success', true); + expect(res.body).to.have.a.property('message').that.is.a('string'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('msg').that.is.an('string'); + expect(data.error).to.have.a.property('error', 'error-action-not-allowed'); + }); }); it('should add a quote attachment to a message', async () => { @@ -2542,6 +2595,158 @@ describe('Meteor.methods', function () { updateSetting('Message_AllowEditing_BlockEditInMinutes', 0), ]); }); + + describe('message deletion when user is not part of the room', () => { + let ridTestRoom; + let messageIdTestRoom; + let testUser; + let testUserCredentials; + + before('create room, add new owner, and leave room', async () => { + testUser = await createUser(); + testUserCredentials = await login(testUser.username, password); + const channelName = `methods-test-channel-${Date.now()}`; + + await request + .post(api('groups.create')) + .set(testUserCredentials) + .send({ + name: channelName, + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.property('success', true); + expect(res.body).to.have.nested.property('group._id'); + expect(res.body).to.have.nested.property('group.name', channelName); + expect(res.body).to.have.nested.property('group.t', 'p'); + expect(res.body).to.have.nested.property('group.msgs', 0); + ridTestRoom = res.body.group._id; + }); + + await request + .post(methodCall('sendMessage')) + .set(testUserCredentials) + .send({ + message: JSON.stringify({ + method: 'sendMessage', + params: [ + { + _id: `${Date.now() + Math.random()}`, + rid: ridTestRoom, + msg: 'just a random test message', + }, + ], + id: 'id', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('success', true); + expect(res.body).to.have.a.property('message').that.is.a('string'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('result').that.is.an('object'); + messageIdTestRoom = data.result._id; + }); + + await request + .post(methodCall('addUsersToRoom')) + .set(testUserCredentials) + .send({ + message: JSON.stringify({ + method: 'addUsersToRoom', + params: [ + { + rid: ridTestRoom, + users: ['rocket.cat'], + }, + ], + id: 'id', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('success', true); + expect(res.body).to.have.a.property('message').that.is.a('string'); + }); + + await request + .post(api('groups.addOwner')) + .set(testUserCredentials) + .send({ + roomId: ridTestRoom, + userId: 'rocket.cat', + }) + .expect((res) => { + expect(res.body).to.have.a.property('success', true); + }); + + await request + .post(api('groups.leave')) + .set(testUserCredentials) + .send({ + roomId: ridTestRoom, + }) + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('success', true); + }); + }); + + it('should not delete a message if the user is no longer member of the room', async () => { + await request + .post(methodCall('deleteMessage')) + .set(testUserCredentials) + .send({ + message: JSON.stringify({ + method: 'deleteMessage', + params: [{ _id: messageIdTestRoom, rid: ridTestRoom }], + id: 'id', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('success', true); + expect(res.body).to.have.a.property('message').that.is.a('string'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('msg', 'result'); + expect(data).to.have.a.property('id', 'id'); + expect(data.error).to.have.a.property('error', 'error-action-not-allowed'); + }); + }); + + it('should not delete a message if the user was never part of the room', async () => { + await request + .post(methodCall('deleteMessage')) + .set(credentials) + .send({ + message: JSON.stringify({ + method: 'deleteMessage', + params: [{ _id: messageIdTestRoom, rid: ridTestRoom }], + id: 'id', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('success', true); + expect(res.body).to.have.a.property('message').that.is.a('string'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('msg', 'result'); + expect(data).to.have.a.property('id', 'id'); + expect(data.error).to.have.a.property('error', 'error-action-not-allowed'); + }); + }); + + after(() => Promise.all([deleteRoom({ type: 'p', roomId: ridTestRoom }), deleteUser(testUser)])); + }); }); describe('[@setUserActiveStatus]', () => { @@ -3288,4 +3493,409 @@ describe('Meteor.methods', function () { .end(done); }); }); + + (IS_EE ? describe : describe.skip)('[@auditGetAuditions] EE', () => { + let testUser; + let testUserCredentials; + + const now = new Date(); + const startDate = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0, 0).getTime(); + const endDate = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999).getTime(); + + before('create test user', async () => { + testUser = await createUser(); + testUserCredentials = await login(testUser.username, password); + }); + + before('generate audits data', async () => { + await request + .post(methodCall('auditGetMessages')) + .set(credentials) + .send({ + message: JSON.stringify({ + method: 'auditGetMessages', + params: [ + { + type: '', + msg: 'test1234', + startDate: { $date: startDate }, + endDate: { $date: endDate }, + rid: 'GENERAL', + users: [], + }, + ], + id: '14', + msg: 'method', + }), + }); + }); + + after(() => Promise.all([deleteUser(testUser)])); + + it('should fail if the user does not have permissions to get auditions', async () => { + await request + .post(methodCall('auditGetAuditions')) + .set(testUserCredentials) + .send({ + message: JSON.stringify({ + method: 'auditGetAuditions', + params: [ + { + startDate: { $date: startDate }, + endDate: { $date: endDate }, + }, + ], + id: '18', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('message'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('error'); + expect(data.error).to.have.a.property('error', 'Not allowed'); + }); + }); + + it('should not return more user data than necessary - e.g. passwords, hashes, tokens', async () => { + await request + .post(methodCall('auditGetAuditions')) + .set(credentials) + .send({ + message: JSON.stringify({ + method: 'auditGetAuditions', + params: [ + { + startDate: { $date: startDate }, + endDate: { $date: endDate }, + }, + ], + id: '18', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('success', true); + expect(res.body).to.have.a.property('message').that.is.a('string'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('result').that.is.an('array'); + expect(data.result.length).to.be.greaterThan(0); + expect(data).to.have.a.property('msg', 'result'); + expect(data).to.have.a.property('id', '18'); + data.result.forEach((item) => { + expect(item).to.have.all.keys('_id', 'ts', 'results', 'u', 'fields', '_updatedAt'); + expect(item.u).to.not.have.property('services'); + expect(item.u).to.not.have.property('roles'); + expect(item.u).to.not.have.property('lastLogin'); + expect(item.u).to.not.have.property('statusConnection'); + expect(item.u).to.not.have.property('emails'); + }); + }); + }); + }); + + describe('UpdateOTRAck', () => { + let testUser; + let testUser2; + let testUserCredentials; + let dmTestId; + + before(async () => { + testUser = await createUser(); + testUser2 = await createUser(); + testUserCredentials = await login(testUser.username, password); + }); + + before('create direct conversation between both users', (done) => { + void request + .post(methodCall('createDirectMessage')) + .set(testUserCredentials) + .send({ + message: JSON.stringify({ + method: 'createDirectMessage', + params: [testUser2.username], + id: 'id', + msg: 'method', + }), + }) + .end((_err, res) => { + const result = JSON.parse(res.body.message); + expect(result.result).to.be.an('object'); + expect(result.result).to.have.property('rid').that.is.an('string'); + + dmTestId = result.result.rid; + done(); + }); + }); + + after(() => Promise.all([deleteRoom({ type: 'd', roomId: dmTestId }), deleteUser(testUser), deleteUser(testUser2)])); + + it('should fail if required parameters are not present', async () => { + await request + .post(methodCall('updateOTRAck')) + .set(credentials) + .send({ + message: JSON.stringify({ + method: 'updateOTRAck', + params: [ + { + message: { + _id: 'czjFdkFab7H5bWxYq', + // rid: 'test', + msg: 'test', + t: 'otr', + ts: { $date: 1725447664093 }, + u: { + _id: 'test', + username: 'test', + name: 'test', + }, + }, + ack: 'test', + }, + ], + id: '18', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('message'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('error'); + expect(data.error).to.have.a.property('message', "Match error: Missing key 'rid'"); + }); + }); + + it('should fail if required parameters have a different type', async () => { + await request + .post(methodCall('updateOTRAck')) + .set(credentials) + .send({ + message: JSON.stringify({ + method: 'updateOTRAck', + params: [ + { + message: { + _id: 'czjFdkFab7H5bWxYq', + rid: { $ne: 'test' }, + msg: 'test', + t: 'otr', + ts: { $date: 1725447664093 }, + u: { + _id: 'test', + username: 'test', + name: 'test', + }, + }, + ack: 'test', + }, + ], + id: '18', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('message'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('error'); + expect(data.error).to.have.a.property('message', 'Match error: Expected string, got object in field rid'); + }); + }); + + it('should fail if "t" is not "otr"', async () => { + await request + .post(methodCall('updateOTRAck')) + .set(credentials) + .send({ + message: JSON.stringify({ + method: 'updateOTRAck', + params: [ + { + message: { + _id: 'czjFdkFab7H5bWxYq', + rid: 'test', + msg: 'test', + t: 'notOTR', + ts: { $date: 1725447664093 }, + u: { + _id: 'test', + username: 'test', + name: 'test', + }, + }, + ack: 'test', + }, + ], + id: '18', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('message'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('error'); + expect(data.error).to.have.a.property('message', 'Invalid message type [error-invalid-message]'); + }); + }); + + it('should fail if room does not exist', async () => { + await request + .post(methodCall('updateOTRAck')) + .set(credentials) + .send({ + message: JSON.stringify({ + method: 'updateOTRAck', + params: [ + { + message: { + _id: 'czjFdkFab7H5bWxYq', + rid: 'test', + msg: 'test', + t: 'otr', + ts: { $date: 1725447664093 }, + u: { + _id: 'test', + username: 'test', + name: 'test', + }, + }, + ack: 'test', + }, + ], + id: '18', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('message'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('error'); + expect(data.error).to.have.a.property('message', 'Invalid room [error-invalid-room]'); + }); + }); + + it('should fail if room is not a DM', async () => { + await request + .post(methodCall('updateOTRAck')) + .set(credentials) + .send({ + message: JSON.stringify({ + method: 'updateOTRAck', + params: [ + { + message: { + _id: 'czjFdkFab7H5bWxYq', + rid: 'GENERAL', + msg: 'test', + t: 'otr', + ts: { $date: 1725447664093 }, + u: { + _id: 'test', + username: 'test', + name: 'test', + }, + }, + ack: 'test', + }, + ], + id: '18', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('message'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('error'); + expect(data.error).to.have.a.property('message', 'Invalid room [error-invalid-room]'); + }); + }); + + it('should fail if user is not part of DM room', async () => { + await request + .post(methodCall('updateOTRAck')) + .set(credentials) + .send({ + message: JSON.stringify({ + method: 'updateOTRAck', + params: [ + { + message: { + _id: 'czjFdkFab7H5bWxYq', + rid: dmTestId, + msg: 'test', + t: 'otr', + ts: { $date: 1725447664093 }, + u: { + _id: testUser._id, + username: testUser.username, + name: 'test', + }, + }, + ack: 'test', + }, + ], + id: '18', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('message'); + const data = JSON.parse(res.body.message); + expect(data).to.have.a.property('error'); + expect(data.error).to.have.a.property('message', 'Invalid user, not in room [error-invalid-user]'); + }); + }); + + it('should pass if all parameters are present and user is part of DM room', async () => { + await request + .post(methodCall('updateOTRAck')) + .set(testUserCredentials) + .send({ + message: JSON.stringify({ + method: 'updateOTRAck', + params: [ + { + message: { + _id: 'czjFdkFab7H5bWxYq', + rid: dmTestId, + msg: 'test', + t: 'otr', + ts: { $date: 1725447664093 }, + u: { + _id: testUser._id, + username: testUser.username, + name: 'test', + }, + }, + ack: 'test', + }, + ], + id: '18', + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.a.property('message'); + expect(res.body).to.have.a.property('success', true); + }); + }); + }); }); diff --git a/apps/meteor/tests/unit/app/lib/server/functions/getModifiedHttpHeaders.tests.ts b/apps/meteor/tests/unit/app/lib/server/functions/getModifiedHttpHeaders.tests.ts new file mode 100644 index 0000000000000..5130bbe59a99f --- /dev/null +++ b/apps/meteor/tests/unit/app/lib/server/functions/getModifiedHttpHeaders.tests.ts @@ -0,0 +1,59 @@ +import { expect } from 'chai'; + +import { getModifiedHttpHeaders } from '../../../../../../app/lib/server/functions/getModifiedHttpHeaders'; + +describe('getModifiedHttpHeaders', () => { + it('should redact x-auth-token if present', () => { + const inputHeaders = { + 'x-auth-token': '12345', + 'some-other-header': 'value', + }; + const result = getModifiedHttpHeaders(inputHeaders); + expect(result['x-auth-token']).to.equal('[redacted]'); + expect(result['some-other-header']).to.equal('value'); + }); + + it('should not modify headers if x-auth-token is not present', () => { + const inputHeaders = { + 'some-other-header': 'value', + }; + const result = getModifiedHttpHeaders(inputHeaders); + expect(result).to.deep.equal(inputHeaders); + }); + + it('should redact rc_token in cookies if present', () => { + const inputHeaders = { + cookie: 'session_id=abc123; rc_token=98765; other_cookie=value', + }; + const expectedCookies = 'session_id=abc123; rc_token=[redacted]; other_cookie=value'; + const result = getModifiedHttpHeaders(inputHeaders); + expect(result.cookie).to.equal(expectedCookies); + }); + + it('should not modify cookies if rc_token is not present', () => { + const inputHeaders = { + cookie: 'session_id=abc123; other_cookie=value', + }; + const result = getModifiedHttpHeaders(inputHeaders); + expect(result.cookie).to.equal(inputHeaders.cookie); + }); + + it('should return headers unchanged if neither x-auth-token nor cookie are present', () => { + const inputHeaders = { + 'some-other-header': 'value', + }; + const result = getModifiedHttpHeaders(inputHeaders); + expect(result).to.deep.equal(inputHeaders); + }); + + it('should handle cases with both x-auth-token and rc_token in cookie', () => { + const inputHeaders = { + 'x-auth-token': '12345', + 'cookie': 'session_id=abc123; rc_token=98765; other_cookie=value', + }; + const expectedCookies = 'session_id=abc123; rc_token=[redacted]; other_cookie=value'; + const result = getModifiedHttpHeaders(inputHeaders); + expect(result['x-auth-token']).to.equal('[redacted]'); + expect(result.cookie).to.equal(expectedCookies); + }); +}); diff --git a/apps/meteor/tests/unit/server/services/omnichannel-integrations/providers/twilio.spec.ts b/apps/meteor/tests/unit/server/services/omnichannel-integrations/providers/twilio.spec.ts new file mode 100644 index 0000000000000..f3c5d281aefbc --- /dev/null +++ b/apps/meteor/tests/unit/server/services/omnichannel-integrations/providers/twilio.spec.ts @@ -0,0 +1,211 @@ +import crypto from 'crypto'; + +import { expect } from 'chai'; +import proxyquire from 'proxyquire'; +import sinon from 'sinon'; + +const settingsStub = { + get: sinon.stub(), +}; + +const twilioStub = { + validateRequest: sinon.stub(), + isRequestFromTwilio: sinon.stub(), +}; + +const { Twilio } = proxyquire.noCallThru().load('../../../../../../server/services/omnichannel-integrations/providers/twilio.ts', { + '../../../../app/settings/server': { settings: settingsStub }, + '../../../../app/utils/server/restrictions': { fileUploadIsValidContentType: sinon.stub() }, + '../../../lib/i18n': { i18n: sinon.stub() }, + '../../../lib/logger/system': { SystemLogger: { error: sinon.stub() } }, +}); + +/** + * Get a valid Twilio signature for a request + * + * @param {String} authToken your Twilio AuthToken + * @param {String} url your webhook URL + * @param {Object} params the included request parameters + */ +function getSignature(authToken: string, url: string, params: Record): string { + // get all request parameters + const data = Object.keys(params) + // sort them + .sort() + // concatenate them to a string + + .reduce((acc, key) => acc + key + params[key], url); + + return ( + crypto + // sign the string with sha1 using your AuthToken + .createHmac('sha1', authToken) + .update(Buffer.from(data, 'utf-8')) + // base64 encode it + .digest('base64') + ); +} + +describe('Twilio Request Validation', () => { + beforeEach(() => { + settingsStub.get.reset(); + twilioStub.validateRequest.reset(); + twilioStub.isRequestFromTwilio.reset(); + }); + + it('should not validate a request when process.env.TEST_MODE is true', () => { + process.env.TEST_MODE = 'true'; + + const twilio = new Twilio(); + const request = { + headers: { + 'x-twilio-signature': 'test', + }, + }; + + expect(twilio.validateRequest(request)).to.be.true; + }); + + it('should not validate a request when process.env.TEST_MODE is true', () => { + process.env.TEST_MODE = 'true'; + + const twilio = new Twilio(); + const request = { + headers: { + 'x-twilio-signature': 'test', + }, + }; + + expect(twilio.validateRequest(request)).to.be.true; + }); + + it('should validate a request when process.env.TEST_MODE is false', () => { + process.env.TEST_MODE = 'false'; + + settingsStub.get.withArgs('SMS_Twilio_authToken').returns('test'); + settingsStub.get.withArgs('Site_Url').returns('https://example.com'); + + const twilio = new Twilio(); + const requestBody = { + To: 'test', + From: 'test', + Body: 'test', + }; + + const request = { + headers: { + 'x-twilio-signature': getSignature('test', 'https://example.com/api/v1/livechat/sms-incoming/twilio', requestBody), + }, + body: requestBody, + }; + + expect(twilio.validateRequest(request)).to.be.true; + }); + + it('should reject a request where signature doesnt match', () => { + settingsStub.get.withArgs('SMS_Twilio_authToken').returns('test'); + settingsStub.get.withArgs('Site_Url').returns('https://example.com'); + + const twilio = new Twilio(); + const requestBody = { + To: 'test', + From: 'test', + Body: 'test', + }; + + const request = { + headers: { + 'x-twilio-signature': getSignature('anotherAuthToken', 'https://example.com/api/v1/livechat/sms-incoming/twilio', requestBody), + }, + body: requestBody, + }; + + expect(twilio.validateRequest(request)).to.be.false; + }); + + it('should reject a request where signature is missing', () => { + settingsStub.get.withArgs('SMS_Twilio_authToken').returns('test'); + settingsStub.get.withArgs('Site_Url').returns('https://example.com'); + + const twilio = new Twilio(); + const requestBody = { + To: 'test', + From: 'test', + Body: 'test', + }; + + const request = { + headers: {}, + body: requestBody, + }; + + expect(twilio.validateRequest(request)).to.be.false; + }); + + it('should reject a request where the signature doesnt correspond body', () => { + settingsStub.get.withArgs('SMS_Twilio_authToken').returns('test'); + settingsStub.get.withArgs('Site_Url').returns('https://example.com'); + + const twilio = new Twilio(); + const requestBody = { + To: 'test', + From: 'test', + Body: 'test', + }; + + const request = { + headers: { + 'x-twilio-signature': getSignature('test', 'https://example.com/api/v1/livechat/sms-incoming/twilio', {}), + }, + body: requestBody, + }; + + expect(twilio.validateRequest(request)).to.be.false; + }); + + it('should return false if URL is not provided', () => { + process.env.TEST_MODE = 'false'; + + settingsStub.get.withArgs('SMS_Twilio_authToken').returns('test'); + settingsStub.get.withArgs('Site_Url').returns(''); + + const twilio = new Twilio(); + const requestBody = { + To: 'test', + From: 'test', + Body: 'test', + }; + + const request = { + headers: { + 'x-twilio-signature': getSignature('test', 'https://example.com/api/v1/livechat/sms-incoming/twilio', requestBody), + }, + body: requestBody, + }; + + expect(twilio.validateRequest(request)).to.be.false; + }); + + it('should return false if authToken is not provided', () => { + process.env.TEST_MODE = 'false'; + + settingsStub.get.withArgs('SMS_Twilio_authToken').returns(''); + settingsStub.get.withArgs('Site_Url').returns('https://example.com'); + + const twilio = new Twilio(); + const requestBody = { + To: 'test', + From: 'test', + Body: 'test', + }; + + const request = { + headers: { + 'x-twilio-signature': getSignature('test', 'https://example.com/api/v1/livechat/sms-incoming/twilio', requestBody), + }, + body: requestBody, + }; + + expect(twilio.validateRequest(request)).to.be.false; + }); +}); diff --git a/ee/apps/account-service/CHANGELOG.md b/ee/apps/account-service/CHANGELOG.md index 83638e76874f7..413ad66583380 100644 --- a/ee/apps/account-service/CHANGELOG.md +++ b/ee/apps/account-service/CHANGELOG.md @@ -1,5 +1,129 @@ # @rocket.chat/account-service +## 0.4.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/core-services@0.4.10 + - @rocket.chat/model-typings@0.5.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/rest-typings@6.10.10 + - @rocket.chat/models@0.1.10 +
+ +## 0.4.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/rest-typings@6.10.9 + - @rocket.chat/core-services@0.4.9 + - @rocket.chat/model-typings@0.5.9 + - @rocket.chat/models@0.1.9 +
+ +## 0.4.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/rest-typings@6.10.8 + - @rocket.chat/core-services@0.4.8 + - @rocket.chat/model-typings@0.5.8 + - @rocket.chat/models@0.1.8 +
+ +## 0.4.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/core-services@0.4.7 + - @rocket.chat/model-typings@0.5.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/rest-typings@6.10.7 + - @rocket.chat/models@0.1.7 +
+ +## 0.4.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.4.6 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/rest-typings@6.10.6 + - @rocket.chat/model-typings@0.5.6 + - @rocket.chat/models@0.1.6 +
+ +## 0.4.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/rest-typings@6.10.5 + - @rocket.chat/core-services@0.4.5 + - @rocket.chat/model-typings@0.5.5 + - @rocket.chat/models@0.1.5 +
+ +## 0.4.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/rest-typings@6.10.4 + - @rocket.chat/core-services@0.4.4 + - @rocket.chat/model-typings@0.5.4 + - @rocket.chat/models@0.1.4 +
+ +## 0.4.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/rest-typings@6.10.3 + - @rocket.chat/core-services@0.4.3 + - @rocket.chat/model-typings@0.5.3 + - @rocket.chat/models@0.1.3 +
+ ## 0.4.2 ### Patch Changes diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index b28e0da610625..a2898c5fbd146 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.2", + "version": "0.4.10", "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 a6416aa95efe2..022e443c6f3a8 100644 --- a/ee/apps/authorization-service/CHANGELOG.md +++ b/ee/apps/authorization-service/CHANGELOG.md @@ -1,5 +1,129 @@ # @rocket.chat/authorization-service +## 0.4.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/core-services@0.4.10 + - @rocket.chat/model-typings@0.5.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/rest-typings@6.10.10 + - @rocket.chat/models@0.1.10 +
+ +## 0.4.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/rest-typings@6.10.9 + - @rocket.chat/core-services@0.4.9 + - @rocket.chat/model-typings@0.5.9 + - @rocket.chat/models@0.1.9 +
+ +## 0.4.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/rest-typings@6.10.8 + - @rocket.chat/core-services@0.4.8 + - @rocket.chat/model-typings@0.5.8 + - @rocket.chat/models@0.1.8 +
+ +## 0.4.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/core-services@0.4.7 + - @rocket.chat/model-typings@0.5.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/rest-typings@6.10.7 + - @rocket.chat/models@0.1.7 +
+ +## 0.4.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.4.6 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/rest-typings@6.10.6 + - @rocket.chat/model-typings@0.5.6 + - @rocket.chat/models@0.1.6 +
+ +## 0.4.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/rest-typings@6.10.5 + - @rocket.chat/core-services@0.4.5 + - @rocket.chat/model-typings@0.5.5 + - @rocket.chat/models@0.1.5 +
+ +## 0.4.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/rest-typings@6.10.4 + - @rocket.chat/core-services@0.4.4 + - @rocket.chat/model-typings@0.5.4 + - @rocket.chat/models@0.1.4 +
+ +## 0.4.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/rest-typings@6.10.3 + - @rocket.chat/core-services@0.4.3 + - @rocket.chat/model-typings@0.5.3 + - @rocket.chat/models@0.1.3 +
+ ## 0.4.2 ### Patch Changes diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index 87ade6ff57116..a3d7f9744dade 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.2", + "version": "0.4.10", "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 642759edb2594..40347c34c0ded 100644 --- a/ee/apps/ddp-streamer/CHANGELOG.md +++ b/ee/apps/ddp-streamer/CHANGELOG.md @@ -1,5 +1,145 @@ # @rocket.chat/ddp-streamer +## 0.3.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/instance-status@0.1.10 + - @rocket.chat/core-services@0.4.10 + - @rocket.chat/model-typings@0.5.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/rest-typings@6.10.10 + - @rocket.chat/ui-contexts@8.0.10 + - @rocket.chat/models@0.1.10 +
+ +## 0.3.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/rest-typings@6.10.9 + - @rocket.chat/core-services@0.4.9 + - @rocket.chat/model-typings@0.5.9 + - @rocket.chat/ui-contexts@8.0.9 + - @rocket.chat/models@0.1.9 + - @rocket.chat/instance-status@0.1.9 +
+ +## 0.3.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/rest-typings@6.10.8 + - @rocket.chat/core-services@0.4.8 + - @rocket.chat/model-typings@0.5.8 + - @rocket.chat/ui-contexts@8.0.8 + - @rocket.chat/models@0.1.8 + - @rocket.chat/instance-status@0.1.8 +
+ +## 0.3.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/instance-status@0.1.7 + - @rocket.chat/core-services@0.4.7 + - @rocket.chat/model-typings@0.5.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/rest-typings@6.10.7 + - @rocket.chat/ui-contexts@8.0.7 + - @rocket.chat/models@0.1.7 +
+ +## 0.3.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.4.6 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/rest-typings@6.10.6 + - @rocket.chat/model-typings@0.5.6 + - @rocket.chat/ui-contexts@8.0.6 + - @rocket.chat/models@0.1.6 + - @rocket.chat/instance-status@0.1.6 +
+ +## 0.3.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/rest-typings@6.10.5 + - @rocket.chat/core-services@0.4.5 + - @rocket.chat/model-typings@0.5.5 + - @rocket.chat/ui-contexts@8.0.5 + - @rocket.chat/models@0.1.5 + - @rocket.chat/instance-status@0.1.5 +
+ +## 0.3.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/rest-typings@6.10.4 + - @rocket.chat/core-services@0.4.4 + - @rocket.chat/model-typings@0.5.4 + - @rocket.chat/ui-contexts@8.0.4 + - @rocket.chat/models@0.1.4 + - @rocket.chat/instance-status@0.1.4 +
+ +## 0.3.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/rest-typings@6.10.3 + - @rocket.chat/core-services@0.4.3 + - @rocket.chat/model-typings@0.5.3 + - @rocket.chat/ui-contexts@8.0.3 + - @rocket.chat/models@0.1.3 + - @rocket.chat/instance-status@0.1.3 +
+ ## 0.3.2 ### Patch Changes diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index b402bd2074770..b8198a89d56b5 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.2", + "version": "0.3.10", "description": "Rocket.Chat DDP-Streamer service", "scripts": { "build": "tsc -p tsconfig.json", @@ -15,7 +15,7 @@ ], "author": "Rocket.Chat", "dependencies": { - "@rocket.chat/apps-engine": "1.43.1", + "@rocket.chat/apps-engine": "1.43.5", "@rocket.chat/core-services": "workspace:^", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/emitter": "~0.31.25", diff --git a/ee/apps/omnichannel-transcript/CHANGELOG.md b/ee/apps/omnichannel-transcript/CHANGELOG.md index 71ff0a6389190..95ef29ec80159 100644 --- a/ee/apps/omnichannel-transcript/CHANGELOG.md +++ b/ee/apps/omnichannel-transcript/CHANGELOG.md @@ -1,5 +1,137 @@ # @rocket.chat/omnichannel-transcript +## 0.4.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/omnichannel-services@0.2.10 + - @rocket.chat/pdf-worker@0.1.10 + - @rocket.chat/core-services@0.4.10 + - @rocket.chat/model-typings@0.5.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/models@0.1.10 +
+ +## 0.4.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/omnichannel-services@0.2.9 + - @rocket.chat/pdf-worker@0.1.9 + - @rocket.chat/core-services@0.4.9 + - @rocket.chat/model-typings@0.5.9 + - @rocket.chat/models@0.1.9 +
+ +## 0.4.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/omnichannel-services@0.2.8 + - @rocket.chat/pdf-worker@0.1.8 + - @rocket.chat/core-services@0.4.8 + - @rocket.chat/model-typings@0.5.8 + - @rocket.chat/models@0.1.8 +
+ +## 0.4.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/omnichannel-services@0.2.7 + - @rocket.chat/pdf-worker@0.1.7 + - @rocket.chat/core-services@0.4.7 + - @rocket.chat/model-typings@0.5.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/models@0.1.7 +
+ +## 0.4.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.4.6 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/omnichannel-services@0.2.6 + - @rocket.chat/pdf-worker@0.1.6 + - @rocket.chat/model-typings@0.5.6 + - @rocket.chat/models@0.1.6 +
+ +## 0.4.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/omnichannel-services@0.2.5 + - @rocket.chat/pdf-worker@0.1.5 + - @rocket.chat/core-services@0.4.5 + - @rocket.chat/model-typings@0.5.5 + - @rocket.chat/models@0.1.5 +
+ +## 0.4.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/omnichannel-services@0.2.4 + - @rocket.chat/pdf-worker@0.1.4 + - @rocket.chat/core-services@0.4.4 + - @rocket.chat/model-typings@0.5.4 + - @rocket.chat/models@0.1.4 +
+ +## 0.4.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/omnichannel-services@0.2.3 + - @rocket.chat/pdf-worker@0.1.3 + - @rocket.chat/core-services@0.4.3 + - @rocket.chat/model-typings@0.5.3 + - @rocket.chat/models@0.1.3 +
+ ## 0.4.2 ### Patch Changes diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index 8ba613e177657..c817a49c275f5 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.2", + "version": "0.4.10", "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 a5cd36d996092..427df9c178d8e 100644 --- a/ee/apps/presence-service/CHANGELOG.md +++ b/ee/apps/presence-service/CHANGELOG.md @@ -1,5 +1,129 @@ # @rocket.chat/presence-service +## 0.4.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/core-services@0.4.10 + - @rocket.chat/model-typings@0.5.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/presence@0.2.10 + - @rocket.chat/models@0.1.10 +
+ +## 0.4.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/presence@0.2.9 + - @rocket.chat/core-services@0.4.9 + - @rocket.chat/model-typings@0.5.9 + - @rocket.chat/models@0.1.9 +
+ +## 0.4.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/presence@0.2.8 + - @rocket.chat/core-services@0.4.8 + - @rocket.chat/model-typings@0.5.8 + - @rocket.chat/models@0.1.8 +
+ +## 0.4.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/core-services@0.4.7 + - @rocket.chat/model-typings@0.5.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/presence@0.2.7 + - @rocket.chat/models@0.1.7 +
+ +## 0.4.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.4.6 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/presence@0.2.6 + - @rocket.chat/model-typings@0.5.6 + - @rocket.chat/models@0.1.6 +
+ +## 0.4.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/presence@0.2.5 + - @rocket.chat/core-services@0.4.5 + - @rocket.chat/model-typings@0.5.5 + - @rocket.chat/models@0.1.5 +
+ +## 0.4.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/presence@0.2.4 + - @rocket.chat/core-services@0.4.4 + - @rocket.chat/model-typings@0.5.4 + - @rocket.chat/models@0.1.4 +
+ +## 0.4.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/presence@0.2.3 + - @rocket.chat/core-services@0.4.3 + - @rocket.chat/model-typings@0.5.3 + - @rocket.chat/models@0.1.3 +
+ ## 0.4.2 ### Patch Changes diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index f54bf8b5ab32d..db39601b26d97 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.2", + "version": "0.4.10", "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 c6af1c23a1cd2..a62d7e697a9e6 100644 --- a/ee/apps/queue-worker/CHANGELOG.md +++ b/ee/apps/queue-worker/CHANGELOG.md @@ -1,5 +1,129 @@ # @rocket.chat/queue-worker +## 0.4.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/omnichannel-services@0.2.10 + - @rocket.chat/core-services@0.4.10 + - @rocket.chat/model-typings@0.5.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/models@0.1.10 +
+ +## 0.4.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/omnichannel-services@0.2.9 + - @rocket.chat/core-services@0.4.9 + - @rocket.chat/model-typings@0.5.9 + - @rocket.chat/models@0.1.9 +
+ +## 0.4.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/omnichannel-services@0.2.8 + - @rocket.chat/core-services@0.4.8 + - @rocket.chat/model-typings@0.5.8 + - @rocket.chat/models@0.1.8 +
+ +## 0.4.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/omnichannel-services@0.2.7 + - @rocket.chat/core-services@0.4.7 + - @rocket.chat/model-typings@0.5.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/models@0.1.7 +
+ +## 0.4.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.4.6 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/omnichannel-services@0.2.6 + - @rocket.chat/model-typings@0.5.6 + - @rocket.chat/models@0.1.6 +
+ +## 0.4.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/omnichannel-services@0.2.5 + - @rocket.chat/core-services@0.4.5 + - @rocket.chat/model-typings@0.5.5 + - @rocket.chat/models@0.1.5 +
+ +## 0.4.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/omnichannel-services@0.2.4 + - @rocket.chat/core-services@0.4.4 + - @rocket.chat/model-typings@0.5.4 + - @rocket.chat/models@0.1.4 +
+ +## 0.4.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/omnichannel-services@0.2.3 + - @rocket.chat/core-services@0.4.3 + - @rocket.chat/model-typings@0.5.3 + - @rocket.chat/models@0.1.3 +
+ ## 0.4.2 ### Patch Changes diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index 875d8a365fd99..7385841bbffa6 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.2", + "version": "0.4.10", "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 354e8128a405b..5e1b1dbf42de8 100644 --- a/ee/apps/stream-hub-service/CHANGELOG.md +++ b/ee/apps/stream-hub-service/CHANGELOG.md @@ -1,5 +1,121 @@ # @rocket.chat/stream-hub-service +## 0.4.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/core-services@0.4.10 + - @rocket.chat/model-typings@0.5.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/models@0.1.10 +
+ +## 0.4.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/core-services@0.4.9 + - @rocket.chat/model-typings@0.5.9 + - @rocket.chat/models@0.1.9 +
+ +## 0.4.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/core-services@0.4.8 + - @rocket.chat/model-typings@0.5.8 + - @rocket.chat/models@0.1.8 +
+ +## 0.4.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/core-services@0.4.7 + - @rocket.chat/model-typings@0.5.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/models@0.1.7 +
+ +## 0.4.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.4.6 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/model-typings@0.5.6 + - @rocket.chat/models@0.1.6 +
+ +## 0.4.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/core-services@0.4.5 + - @rocket.chat/model-typings@0.5.5 + - @rocket.chat/models@0.1.5 +
+ +## 0.4.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/core-services@0.4.4 + - @rocket.chat/model-typings@0.5.4 + - @rocket.chat/models@0.1.4 +
+ +## 0.4.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/core-services@0.4.3 + - @rocket.chat/model-typings@0.5.3 + - @rocket.chat/models@0.1.3 +
+ ## 0.4.2 ### Patch Changes diff --git a/ee/apps/stream-hub-service/package.json b/ee/apps/stream-hub-service/package.json index bedf1a8b966b2..900d5e2340238 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.2", + "version": "0.4.10", "description": "Rocket.Chat Stream Hub service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/packages/api-client/CHANGELOG.md b/ee/packages/api-client/CHANGELOG.md index 5b58fe71a9419..9306fa170d456 100644 --- a/ee/packages/api-client/CHANGELOG.md +++ b/ee/packages/api-client/CHANGELOG.md @@ -1,5 +1,105 @@ # @rocket.chat/api-client +## 0.2.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/rest-typings@6.10.10 +
+ +## 0.2.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/rest-typings@6.10.9 +
+ +## 0.2.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/rest-typings@6.10.8 +
+ +## 0.2.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/rest-typings@6.10.7 +
+ +## 0.2.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/rest-typings@6.10.6 +
+ +## 0.2.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/rest-typings@6.10.5 +
+ +## 0.2.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/rest-typings@6.10.4 +
+ +## 0.2.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/rest-typings@6.10.3 +
+ ## 0.2.2 ### Patch Changes diff --git a/ee/packages/api-client/package.json b/ee/packages/api-client/package.json index 606c7cc980e09..954d4f2f12ceb 100644 --- a/ee/packages/api-client/package.json +++ b/ee/packages/api-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/api-client", - "version": "0.2.2", + "version": "0.2.10", "devDependencies": { "@swc/core": "^1.3.95", "@swc/jest": "^0.2.29", diff --git a/ee/packages/ddp-client/CHANGELOG.md b/ee/packages/ddp-client/CHANGELOG.md index 46e946c6f000a..ae72bbd2ba3d3 100644 --- a/ee/packages/ddp-client/CHANGELOG.md +++ b/ee/packages/ddp-client/CHANGELOG.md @@ -1,5 +1,105 @@ # @rocket.chat/ddp-client +## 0.3.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/api-client@0.2.10 + - @rocket.chat/rest-typings@6.10.10 +
+ +## 0.3.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/rest-typings@6.10.9 + - @rocket.chat/api-client@0.2.9 +
+ +## 0.3.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/rest-typings@6.10.8 + - @rocket.chat/api-client@0.2.8 +
+ +## 0.3.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/api-client@0.2.7 + - @rocket.chat/rest-typings@6.10.7 +
+ +## 0.3.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/rest-typings@6.10.6 + - @rocket.chat/api-client@0.2.6 +
+ +## 0.3.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/rest-typings@6.10.5 + - @rocket.chat/api-client@0.2.5 +
+ +## 0.3.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/rest-typings@6.10.4 + - @rocket.chat/api-client@0.2.4 +
+ +## 0.3.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/rest-typings@6.10.3 + - @rocket.chat/api-client@0.2.3 +
+ ## 0.3.2 ### Patch Changes diff --git a/ee/packages/ddp-client/package.json b/ee/packages/ddp-client/package.json index 84cd515e685fd..cf1f95922585c 100644 --- a/ee/packages/ddp-client/package.json +++ b/ee/packages/ddp-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ddp-client", - "version": "0.3.2", + "version": "0.3.10", "devDependencies": { "@swc/core": "^1.3.95", "@swc/jest": "^0.2.29", diff --git a/ee/packages/license/CHANGELOG.md b/ee/packages/license/CHANGELOG.md index b40c1af7fdfae..1533d435ebf11 100644 --- a/ee/packages/license/CHANGELOG.md +++ b/ee/packages/license/CHANGELOG.md @@ -1,5 +1,97 @@ # @rocket.chat/license +## 0.2.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/core-typings@6.10.10 +
+ +## 0.2.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 +
+ +## 0.2.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 +
+ +## 0.2.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/core-typings@6.10.7 +
+ +## 0.2.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.6 +
+ +## 0.2.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 +
+ +## 0.2.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 +
+ +## 0.2.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 +
+ ## 0.2.2 ### Patch Changes diff --git a/ee/packages/license/package.json b/ee/packages/license/package.json index 4dbb871c4641f..64b7808d9d127 100644 --- a/ee/packages/license/package.json +++ b/ee/packages/license/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/license", - "version": "0.2.2", + "version": "0.2.10", "private": true, "devDependencies": { "@swc/core": "^1.3.95", diff --git a/ee/packages/omnichannel-services/CHANGELOG.md b/ee/packages/omnichannel-services/CHANGELOG.md index 65c926bae8450..301780f555a52 100644 --- a/ee/packages/omnichannel-services/CHANGELOG.md +++ b/ee/packages/omnichannel-services/CHANGELOG.md @@ -1,5 +1,137 @@ # @rocket.chat/omnichannel-services +## 0.2.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/pdf-worker@0.1.10 + - @rocket.chat/core-services@0.4.10 + - @rocket.chat/model-typings@0.5.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/rest-typings@6.10.10 + - @rocket.chat/models@0.1.10 +
+ +## 0.2.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/rest-typings@6.10.9 + - @rocket.chat/pdf-worker@0.1.9 + - @rocket.chat/core-services@0.4.9 + - @rocket.chat/model-typings@0.5.9 + - @rocket.chat/models@0.1.9 +
+ +## 0.2.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/rest-typings@6.10.8 + - @rocket.chat/pdf-worker@0.1.8 + - @rocket.chat/core-services@0.4.8 + - @rocket.chat/model-typings@0.5.8 + - @rocket.chat/models@0.1.8 +
+ +## 0.2.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/pdf-worker@0.1.7 + - @rocket.chat/core-services@0.4.7 + - @rocket.chat/model-typings@0.5.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/rest-typings@6.10.7 + - @rocket.chat/models@0.1.7 +
+ +## 0.2.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.4.6 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/rest-typings@6.10.6 + - @rocket.chat/pdf-worker@0.1.6 + - @rocket.chat/model-typings@0.5.6 + - @rocket.chat/models@0.1.6 +
+ +## 0.2.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/rest-typings@6.10.5 + - @rocket.chat/pdf-worker@0.1.5 + - @rocket.chat/core-services@0.4.5 + - @rocket.chat/model-typings@0.5.5 + - @rocket.chat/models@0.1.5 +
+ +## 0.2.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/rest-typings@6.10.4 + - @rocket.chat/pdf-worker@0.1.4 + - @rocket.chat/core-services@0.4.4 + - @rocket.chat/model-typings@0.5.4 + - @rocket.chat/models@0.1.4 +
+ +## 0.2.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/rest-typings@6.10.3 + - @rocket.chat/pdf-worker@0.1.3 + - @rocket.chat/core-services@0.4.3 + - @rocket.chat/model-typings@0.5.3 + - @rocket.chat/models@0.1.3 +
+ ## 0.2.2 ### Patch Changes diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index a3d1b155f10f4..6cb5e37030eb2 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.2.2", + "version": "0.2.10", "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 147ba55902fc3..1ec7fdfbf638d 100644 --- a/ee/packages/pdf-worker/CHANGELOG.md +++ b/ee/packages/pdf-worker/CHANGELOG.md @@ -1,5 +1,97 @@ # @rocket.chat/pdf-worker +## 0.1.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/core-typings@6.10.10 +
+ +## 0.1.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 +
+ +## 0.1.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 +
+ +## 0.1.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/core-typings@6.10.7 +
+ +## 0.1.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.6 +
+ +## 0.1.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 +
+ +## 0.1.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 +
+ +## 0.1.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 +
+ ## 0.1.2 ### Patch Changes diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index 9049e0a8d2b56..b1b0b96496009 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.1.2", + "version": "0.1.10", "private": true, "devDependencies": { "@storybook/addon-essentials": "~6.5.16", diff --git a/ee/packages/presence/CHANGELOG.md b/ee/packages/presence/CHANGELOG.md index 7d7838a0943cc..74f227588803c 100644 --- a/ee/packages/presence/CHANGELOG.md +++ b/ee/packages/presence/CHANGELOG.md @@ -1,5 +1,113 @@ # @rocket.chat/presence +## 0.2.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/core-services@0.4.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/models@0.1.10 +
+ +## 0.2.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/core-services@0.4.9 + - @rocket.chat/models@0.1.9 +
+ +## 0.2.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/core-services@0.4.8 + - @rocket.chat/models@0.1.8 +
+ +## 0.2.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/core-services@0.4.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/models@0.1.7 +
+ +## 0.2.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.4.6 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/models@0.1.6 +
+ +## 0.2.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/core-services@0.4.5 + - @rocket.chat/models@0.1.5 +
+ +## 0.2.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/core-services@0.4.4 + - @rocket.chat/models@0.1.4 +
+ +## 0.2.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/core-services@0.4.3 + - @rocket.chat/models@0.1.3 +
+ ## 0.2.2 ### Patch Changes diff --git a/ee/packages/presence/package.json b/ee/packages/presence/package.json index 5a9def3a72a36..5f2a7d444d298 100644 --- a/ee/packages/presence/package.json +++ b/ee/packages/presence/package.json @@ -1,12 +1,12 @@ { "name": "@rocket.chat/presence", - "version": "0.2.2", + "version": "0.2.10", "private": true, "devDependencies": { "@babel/core": "~7.22.20", "@babel/preset-env": "~7.22.20", "@babel/preset-typescript": "~7.22.15", - "@rocket.chat/apps-engine": "1.43.1", + "@rocket.chat/apps-engine": "1.43.5", "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/rest-typings": "workspace:^", "@types/node": "^14.18.63", diff --git a/package.json b/package.json index 2968b7380c148..e30be2357ea6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rocket.chat", - "version": "6.10.2", + "version": "6.10.10", "description": "Rocket.Chat Monorepo", "main": "index.js", "private": true, diff --git a/packages/apps/CHANGELOG.md b/packages/apps/CHANGELOG.md index c776efa71f6e4..ae0fea9fe4dd1 100644 --- a/packages/apps/CHANGELOG.md +++ b/packages/apps/CHANGELOG.md @@ -1,5 +1,105 @@ # @rocket.chat/apps +## 0.1.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/model-typings@0.5.10 + - @rocket.chat/core-typings@6.10.10 +
+ +## 0.1.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/model-typings@0.5.9 +
+ +## 0.1.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/model-typings@0.5.8 +
+ +## 0.1.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/model-typings@0.5.7 + - @rocket.chat/core-typings@6.10.7 +
+ +## 0.1.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/model-typings@0.5.6 +
+ +## 0.1.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/model-typings@0.5.5 +
+ +## 0.1.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/model-typings@0.5.4 +
+ +## 0.1.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/model-typings@0.5.3 +
+ ## 0.1.2 ### Patch Changes diff --git a/packages/apps/package.json b/packages/apps/package.json index f3f39ddf10835..f5577d07d64c2 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/apps", - "version": "0.1.2", + "version": "0.1.10", "private": true, "devDependencies": { "@types/jest": "~29.5.7", @@ -22,7 +22,7 @@ "/dist" ], "dependencies": { - "@rocket.chat/apps-engine": "1.43.1", + "@rocket.chat/apps-engine": "1.43.5", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/model-typings": "workspace:^" } diff --git a/packages/core-services/CHANGELOG.md b/packages/core-services/CHANGELOG.md index f12811c17f20f..6dc894ae7884b 100644 --- a/packages/core-services/CHANGELOG.md +++ b/packages/core-services/CHANGELOG.md @@ -1,5 +1,116 @@ # @rocket.chat/core-services +## 0.4.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/message-parser@0.31.32 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/rest-typings@6.10.10 + - @rocket.chat/models@0.1.10 +
+ +## 0.4.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/rest-typings@6.10.9 + - @rocket.chat/models@0.1.9 +
+ +## 0.4.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/rest-typings@6.10.8 + - @rocket.chat/models@0.1.8 +
+ +## 0.4.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/message-parser@0.31.31 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/rest-typings@6.10.7 + - @rocket.chat/models@0.1.7 +
+ +## 0.4.6 + +### Patch Changes + +-
Updated dependencies [a45b88cdf2]: + + - @rocket.chat/message-parser@0.31.30 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/rest-typings@6.10.6 + - @rocket.chat/models@0.1.6 +
+ +## 0.4.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/rest-typings@6.10.5 + - @rocket.chat/models@0.1.5 +
+ +## 0.4.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/rest-typings@6.10.4 + - @rocket.chat/models@0.1.4 +
+ +## 0.4.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/rest-typings@6.10.3 + - @rocket.chat/models@0.1.3 +
+ ## 0.4.2 ### Patch Changes diff --git a/packages/core-services/package.json b/packages/core-services/package.json index fa420df6a1769..b0ac9b63cbab9 100644 --- a/packages/core-services/package.json +++ b/packages/core-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/core-services", - "version": "0.4.2", + "version": "0.4.10", "private": true, "devDependencies": { "@babel/core": "~7.22.20", @@ -34,7 +34,7 @@ "extends": "../../package.json" }, "dependencies": { - "@rocket.chat/apps-engine": "1.43.1", + "@rocket.chat/apps-engine": "1.43.5", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/icons": "^0.36.0", "@rocket.chat/message-parser": "workspace:^", diff --git a/packages/core-typings/CHANGELOG.md b/packages/core-typings/CHANGELOG.md index b6f96319bf007..4380e99c77092 100644 --- a/packages/core-typings/CHANGELOG.md +++ b/packages/core-typings/CHANGELOG.md @@ -1,5 +1,62 @@ # @rocket.chat/core-typings +## 6.10.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/message-parser@0.31.32 +
+ +## 6.10.9 + +## 6.10.8 + +## 6.10.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/message-parser@0.31.31 +
+ +## 6.10.6 + +### Patch Changes + +-
Updated dependencies [a45b88cdf2]: + + - @rocket.chat/message-parser@0.31.30 +
+ +## 6.10.5 + +## 6.10.4 + +## 6.10.3 + ## 6.10.2 ### Patch Changes diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index 47e76033d71ca..c0aa14981ac99 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package", "name": "@rocket.chat/core-typings", - "version": "6.10.2", + "version": "6.10.10", "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", "eslint": "~8.45.0", @@ -22,10 +22,11 @@ "/dist" ], "dependencies": { - "@rocket.chat/apps-engine": "1.43.1", + "@rocket.chat/apps-engine": "1.43.5", "@rocket.chat/icons": "^0.36.0", "@rocket.chat/message-parser": "workspace:^", - "@rocket.chat/ui-kit": "workspace:~" + "@rocket.chat/ui-kit": "workspace:~", + "@types/express": "^4.17.21" }, "volta": { "extends": "../../package.json" diff --git a/packages/core-typings/src/omnichannel/sms.ts b/packages/core-typings/src/omnichannel/sms.ts index 7ff7a4768a134..49364da2b8c36 100644 --- a/packages/core-typings/src/omnichannel/sms.ts +++ b/packages/core-typings/src/omnichannel/sms.ts @@ -1,3 +1,5 @@ +import type { Request } from 'express'; + type ServiceMedia = { url: string; contentType: string; @@ -27,6 +29,7 @@ export interface ISMSProviderConstructor { export interface ISMSProvider { parse(data: unknown): ServiceData; + validateRequest(request: Request): boolean; sendBatch?(from: string, to: string[], message: string): Promise; response(): SMSProviderResponse; diff --git a/packages/cron/CHANGELOG.md b/packages/cron/CHANGELOG.md index 3d2c51d66f233..e1a3161a60ef5 100644 --- a/packages/cron/CHANGELOG.md +++ b/packages/cron/CHANGELOG.md @@ -1,5 +1,105 @@ # @rocket.chat/cron +## 0.1.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/models@0.1.10 +
+ +## 0.1.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/models@0.1.9 +
+ +## 0.1.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/models@0.1.8 +
+ +## 0.1.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/models@0.1.7 +
+ +## 0.1.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/models@0.1.6 +
+ +## 0.1.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/models@0.1.5 +
+ +## 0.1.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/models@0.1.4 +
+ +## 0.1.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/models@0.1.3 +
+ ## 0.1.2 ### Patch Changes diff --git a/packages/cron/package.json b/packages/cron/package.json index 15769222cf15e..cb0e608d275ea 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/cron", - "version": "0.1.2", + "version": "0.1.10", "private": true, "devDependencies": { "@types/jest": "~29.5.7", diff --git a/packages/fuselage-ui-kit/CHANGELOG.md b/packages/fuselage-ui-kit/CHANGELOG.md index c131ad9b4b86e..2f8de940304c3 100644 --- a/packages/fuselage-ui-kit/CHANGELOG.md +++ b/packages/fuselage-ui-kit/CHANGELOG.md @@ -1,5 +1,129 @@ # Change Log +## 8.0.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/ui-video-conf@8.0.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/ui-contexts@8.0.10 + - @rocket.chat/gazzodown@8.0.10 + - @rocket.chat/ui-avatar@4.0.10 +
+ +## 8.0.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/gazzodown@8.0.9 + - @rocket.chat/ui-contexts@8.0.9 + - @rocket.chat/ui-avatar@4.0.9 + - @rocket.chat/ui-video-conf@8.0.9 +
+ +## 8.0.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/gazzodown@8.0.8 + - @rocket.chat/ui-contexts@8.0.8 + - @rocket.chat/ui-avatar@4.0.8 + - @rocket.chat/ui-video-conf@8.0.8 +
+ +## 8.0.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/ui-video-conf@8.0.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/ui-contexts@8.0.7 + - @rocket.chat/gazzodown@8.0.7 + - @rocket.chat/ui-avatar@4.0.7 +
+ +## 8.0.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/gazzodown@8.0.6 + - @rocket.chat/ui-contexts@8.0.6 + - @rocket.chat/ui-avatar@4.0.6 + - @rocket.chat/ui-video-conf@8.0.6 +
+ +## 8.0.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/gazzodown@8.0.5 + - @rocket.chat/ui-contexts@8.0.5 + - @rocket.chat/ui-avatar@4.0.5 + - @rocket.chat/ui-video-conf@8.0.5 +
+ +## 8.0.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/gazzodown@8.0.4 + - @rocket.chat/ui-contexts@8.0.4 + - @rocket.chat/ui-avatar@4.0.4 + - @rocket.chat/ui-video-conf@8.0.4 +
+ +## 8.0.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/gazzodown@8.0.3 + - @rocket.chat/ui-contexts@8.0.3 + - @rocket.chat/ui-avatar@4.0.3 + - @rocket.chat/ui-video-conf@8.0.3 +
+ ## 8.0.2 ### Patch Changes diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index 5697e9052d504..d3b7376d52018 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/fuselage-ui-kit", "private": true, - "version": "8.0.2", + "version": "8.0.10", "description": "UiKit elements for Rocket.Chat Apps built under Fuselage design system", "homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/", "author": { @@ -50,10 +50,10 @@ "@rocket.chat/icons": "*", "@rocket.chat/prettier-config": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "4.0.2", - "@rocket.chat/ui-contexts": "8.0.2", + "@rocket.chat/ui-avatar": "4.0.10", + "@rocket.chat/ui-contexts": "8.0.10", "@rocket.chat/ui-kit": "0.35.0", - "@rocket.chat/ui-video-conf": "8.0.2", + "@rocket.chat/ui-video-conf": "8.0.10", "@tanstack/react-query": "*", "react": "*", "react-dom": "*" @@ -63,7 +63,7 @@ "@babel/preset-env": "~7.22.20", "@babel/preset-react": "~7.22.15", "@babel/preset-typescript": "~7.22.15", - "@rocket.chat/apps-engine": "1.43.1", + "@rocket.chat/apps-engine": "1.43.5", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/fuselage": "^0.54.3", diff --git a/packages/gazzodown/CHANGELOG.md b/packages/gazzodown/CHANGELOG.md index e053a9352f207..9e168a04780b8 100644 --- a/packages/gazzodown/CHANGELOG.md +++ b/packages/gazzodown/CHANGELOG.md @@ -1,5 +1,116 @@ # @rocket.chat/gazzodown +## 8.0.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/message-parser@0.31.32 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/ui-contexts@8.0.10 + - @rocket.chat/ui-client@8.0.10 +
+ +## 8.0.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/ui-contexts@8.0.9 + - @rocket.chat/ui-client@8.0.9 +
+ +## 8.0.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/ui-contexts@8.0.8 + - @rocket.chat/ui-client@8.0.8 +
+ +## 8.0.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/message-parser@0.31.31 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/ui-contexts@8.0.7 + - @rocket.chat/ui-client@8.0.7 +
+ +## 8.0.6 + +### Patch Changes + +-
Updated dependencies [a45b88cdf2]: + + - @rocket.chat/message-parser@0.31.30 + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/ui-contexts@8.0.6 + - @rocket.chat/ui-client@8.0.6 +
+ +## 8.0.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/ui-contexts@8.0.5 + - @rocket.chat/ui-client@8.0.5 +
+ +## 8.0.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/ui-contexts@8.0.4 + - @rocket.chat/ui-client@8.0.4 +
+ +## 8.0.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/ui-contexts@8.0.3 + - @rocket.chat/ui-client@8.0.3 +
+ ## 8.0.2 ### Patch Changes diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index 448b82909013b..97d4f72adcfb1 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/gazzodown", - "version": "8.0.2", + "version": "8.0.10", "private": true, "devDependencies": { "@babel/core": "~7.22.20", @@ -69,15 +69,17 @@ "@rocket.chat/css-in-js": "*", "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-tokens": "*", - "@rocket.chat/message-parser": "0.31.29", + "@rocket.chat/message-parser": "0.31.32", "@rocket.chat/styled": "*", - "@rocket.chat/ui-client": "8.0.2", - "@rocket.chat/ui-contexts": "8.0.2", + "@rocket.chat/ui-client": "8.0.10", + "@rocket.chat/ui-contexts": "8.0.10", "katex": "*", "react": "*" }, "dependencies": { + "@types/dompurify": "^3.0.5", "date-fns": "^3.3.1", + "dompurify": "^3.1.6", "highlight.js": "^11.5.1", "react-error-boundary": "^3.1.4" }, diff --git a/packages/gazzodown/src/emoji/EmojiRenderer.tsx b/packages/gazzodown/src/emoji/EmojiRenderer.tsx index 7a4ca53249307..84116361157c9 100644 --- a/packages/gazzodown/src/emoji/EmojiRenderer.tsx +++ b/packages/gazzodown/src/emoji/EmojiRenderer.tsx @@ -1,5 +1,6 @@ import { MessageEmoji, ThreadMessageEmoji } from '@rocket.chat/fuselage'; import type * as MessageParser from '@rocket.chat/message-parser'; +import DOMPurify from 'dompurify'; import { ReactElement, useMemo, useContext, memo } from 'react'; import { MarkupInteractionContext } from '../MarkupInteractionContext'; @@ -14,10 +15,12 @@ const EmojiRenderer = ({ big = false, preview = false, ...emoji }: EmojiProps): const fallback = useMemo(() => ('unicode' in emoji ? emoji.unicode : `:${emoji.shortCode ?? emoji.value.value}:`), [emoji]); + const sanitizedFallback = DOMPurify.sanitize(fallback); + const descriptors = useMemo(() => { - const detected = detectEmoji?.(fallback); + const detected = detectEmoji?.(sanitizedFallback); return detected?.length !== 0 ? detected : undefined; - }, [detectEmoji, fallback]); + }, [detectEmoji, sanitizedFallback]); return ( <> @@ -34,8 +37,8 @@ const EmojiRenderer = ({ big = false, preview = false, ...emoji }: EmojiProps): )} )) ?? ( - - {fallback} + + {sanitizedFallback} )} diff --git a/packages/gazzodown/src/katex/KatexBlock.tsx b/packages/gazzodown/src/katex/KatexBlock.tsx index 5913185d39691..267b310b38975 100644 --- a/packages/gazzodown/src/katex/KatexBlock.tsx +++ b/packages/gazzodown/src/katex/KatexBlock.tsx @@ -15,6 +15,7 @@ const KatexBlock = ({ code }: KatexBlockProps): ReactElement => { macros: { '\\href': '\\@secondoftwo', }, + maxSize: 100, }), [code], ); diff --git a/packages/gazzodown/src/katex/KatexElement.tsx b/packages/gazzodown/src/katex/KatexElement.tsx index 3595f698f7ae5..099c2f82cf8c0 100644 --- a/packages/gazzodown/src/katex/KatexElement.tsx +++ b/packages/gazzodown/src/katex/KatexElement.tsx @@ -15,6 +15,7 @@ const KatexElement = ({ code }: KatexElementProps): ReactElement => { macros: { '\\href': '\\@secondoftwo', }, + maxSize: 100, }), [code], ); diff --git a/packages/i18n/src/locales/en.i18n.json b/packages/i18n/src/locales/en.i18n.json index e4d1c611aef66..2b71ba950d7e5 100644 --- a/packages/i18n/src/locales/en.i18n.json +++ b/packages/i18n/src/locales/en.i18n.json @@ -1928,7 +1928,7 @@ "Extra_CSP_Domains": "Extra CSP Domains", "Extra_CSP_Domains_Description": "Extra domains to add to the Content-Security-Policy", "Enable_Desktop_Notifications": "Enable Desktop Notifications", - "Enable_encryption" : "Enable encryption", + "Enable_encryption": "Enable encryption", "Enable_inquiry_fetch_by_stream": "Enable inquiry data fetch from server using a stream", "Enable_omnichannel_auto_close_abandoned_rooms": "Enable automatic closing of rooms abandoned by the visitor", "Enable_Password_History": "Enable Password History", @@ -6476,5 +6476,15 @@ "Previous_image": "Previous image", "Image_gallery": "Image gallery", "You_cant_take_chats_unavailable": "You cannot take new conversations because you're unavailable", - "You_cant_take_chats_offline": "You cannot take new conversations because you're offline" -} + "You_cant_take_chats_offline": "You cannot take new conversations because you're offline", + "TeamChats": { + "title": "Team Chats", + "createRoom": "Create New Room", + "sendMessage": "Send Message", + "searchMembers": "Search Members", + "addParticipant": "Add Participant", + "removeParticipant": "Remove Participant", + "noMessages": "No messages yet", + "typeMessage": "Type a message..." + } +} \ No newline at end of file diff --git a/packages/i18n/src/locales/es.i18n.json b/packages/i18n/src/locales/es.i18n.json index 313ee11766bf9..ac02dd31a9627 100644 --- a/packages/i18n/src/locales/es.i18n.json +++ b/packages/i18n/src/locales/es.i18n.json @@ -5082,5 +5082,15 @@ "Unlock_premium_capabilities": "Desbloquea características premium", "Unlimited_seats": "Puestos ilimitados", "Unlimited_MACs": "Contactos Activos por Mes (MAC) ilimitados", - "Unlimited_seats_MACs": "Puestos y Contactos Activos por Mes (MAC) ilimitados" -} + "Unlimited_seats_MACs": "Puestos y Contactos Activos por Mes (MAC) ilimitados", + "TeamChats": { + "title": "Chats de Equipo", + "createRoom": "Crear Nueva Sala", + "sendMessage": "Enviar Mensaje", + "searchMembers": "Buscar Miembros", + "addParticipant": "Agregar Participante", + "removeParticipant": "Eliminar Participante", + "noMessages": "Aún no hay mensajes", + "typeMessage": "Escribe un mensaje..." + } +} \ No newline at end of file diff --git a/packages/i18n/src/locales/hi.i18n.json b/packages/i18n/src/locales/hi.i18n.json index 30d5e3e246d82..7b771378f1e53 100644 --- a/packages/i18n/src/locales/hi.i18n.json +++ b/packages/i18n/src/locales/hi.i18n.json @@ -213,5 +213,15 @@ "User_left": "उपयोगकर्ता छोड़ दिया", "We_are_offline_Sorry_for_the_inconvenience": "हम ऑफ़लाइन हैं। असुविधा के लिए खेद है।", "Yes": "हाँ", - "You": "आप" + "You": "आप", + "TeamChats": { + "title": "टीम चैट", + "createRoom": "नई रूम बनाएँ", + "sendMessage": "संदेश भेजें", + "searchMembers": "सदस्यों को खोजें", + "addParticipant": "प्रतिभागी जोड़ें", + "removeParticipant": "प्रतिभागी हटाएँ", + "noMessages": "अभी तक कोई संदेश नहीं", + "typeMessage": "संदेश टाइप करें..." + } } \ No newline at end of file diff --git a/packages/instance-status/CHANGELOG.md b/packages/instance-status/CHANGELOG.md index c123558a4ea7f..1589aed8dc781 100644 --- a/packages/instance-status/CHANGELOG.md +++ b/packages/instance-status/CHANGELOG.md @@ -1,5 +1,97 @@ # @rocket.chat/instance-status +## 0.1.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/models@0.1.10 +
+ +## 0.1.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/models@0.1.9 +
+ +## 0.1.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/models@0.1.8 +
+ +## 0.1.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/models@0.1.7 +
+ +## 0.1.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/models@0.1.6 +
+ +## 0.1.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/models@0.1.5 +
+ +## 0.1.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/models@0.1.4 +
+ +## 0.1.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/models@0.1.3 +
+ ## 0.1.2 ### Patch Changes diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index 9a6e738b79b32..01d0017ea4190 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.2", + "version": "0.1.10", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/livechat/CHANGELOG.md b/packages/livechat/CHANGELOG.md index 3e5253b4636c1..46baebbf2ff49 100644 --- a/packages/livechat/CHANGELOG.md +++ b/packages/livechat/CHANGELOG.md @@ -1,5 +1,100 @@ # @rocket.chat/livechat Change Log +## 1.18.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/message-parser@0.31.32 + - @rocket.chat/gazzodown@8.0.10 +
+ +## 1.18.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/gazzodown@8.0.9 +
+ +## 1.18.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/gazzodown@8.0.8 +
+ +## 1.18.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/message-parser@0.31.31 + - @rocket.chat/gazzodown@8.0.7 +
+ +## 1.18.6 + +### Patch Changes + +-
Updated dependencies [a45b88cdf2]: + + - @rocket.chat/message-parser@0.31.30 + - @rocket.chat/gazzodown@8.0.6 +
+ +## 1.18.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/gazzodown@8.0.5 +
+ +## 1.18.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/gazzodown@8.0.4 +
+ +## 1.18.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/gazzodown@8.0.3 +
+ ## 1.18.2 ### Patch Changes diff --git a/packages/livechat/package.json b/packages/livechat/package.json index ab11f48e40ae8..030ffb887d9ae 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/livechat", - "version": "1.18.2", + "version": "1.18.10", "files": [ "/build" ], diff --git a/packages/message-parser/CHANGELOG.md b/packages/message-parser/CHANGELOG.md index 39c82e350b588..aeafafed3bc7f 100644 --- a/packages/message-parser/CHANGELOG.md +++ b/packages/message-parser/CHANGELOG.md @@ -1,5 +1,39 @@ # Change Log +## 0.31.32 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +## 0.31.31 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +## 0.31.30 + +### Patch Changes + +- ([#33256](https://github.com/RocketChat/Rocket.Chat/pull/33256) by [@dionisio-bot](https://github.com/dionisio-bot)) Improved the performance of the message parser + ## 0.31.29 ### Patch Changes diff --git a/packages/message-parser/package.json b/packages/message-parser/package.json index cfdb0ebe73d5e..6cfaaff72c8f3 100644 --- a/packages/message-parser/package.json +++ b/packages/message-parser/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/message-parser", "description": "Rocket.Chat parser for messages", - "version": "0.31.29", + "version": "0.31.32", "author": { "name": "Rocket.Chat", "url": "https://rocket.chat/" diff --git a/packages/message-parser/src/grammar.pegjs b/packages/message-parser/src/grammar.pegjs index 182653a9c6640..a6cae97facbfa 100644 --- a/packages/message-parser/src/grammar.pegjs +++ b/packages/message-parser/src/grammar.pegjs @@ -10,6 +10,7 @@ emoji, emojiUnicode, emoticon, + extractFirstResult, heading, image, inlineCode, @@ -33,6 +34,11 @@ unorderedList, timestamp, } = require('./utils'); + +let skipBold = false; +let skipItalic = false; +let skipStrikethrough = false; +let skipReferences = false; }} Start @@ -212,7 +218,7 @@ Inline = value:(InlineItem / Any)+ EndOfLine? { return reducePlainTexts(value); InlineItem = Whitespace / Timestamp - / References + / MaybeReferences / AutolinkedPhone / AutolinkedEmail / AutolinkedURL @@ -240,7 +246,7 @@ References = "[" title:LinkTitle* "](" href:LinkRef ")" { return title.length ? link(href, reducePlainTexts(title)) : link(href); } / "<" href:LinkRef "|" title:LinkTitle2 ">" { return link(href, [plain(title)]); } -LinkTitle = (Whitespace / EmphasisForReferences) / anyTitle:$(!("](" .) .) { return plain(anyTitle) } +LinkTitle = (Whitespace / Emphasis) / anyTitle:$(!("](" .) .) { return plain(anyTitle) } LinkTitle2 = $([\x20-\x3B\x3D\x3F-\x60\x61-\x7B\x7D-\xFF] / NonASCII)+ @@ -349,14 +355,7 @@ AutoLinkURLBody = !(Extra* (Whitespace / EndOfLine)) . * Emphasis * */ -Emphasis = Bold / Italic / Strikethrough - -/** - * - * Emphasis for References - * -*/ -EmphasisForReferences = BoldForReferences / ItalicForReferences / StrikethroughForReferences +Emphasis = MaybeBold / MaybeItalic / MaybeStrikethrough /** * @@ -365,6 +364,63 @@ EmphasisForReferences = BoldForReferences / ItalicForReferences / StrikethroughF * */ +// This rule is used inside expressions that have a JS code ensuring they always fail, +// Without any pattern to match, peggy will think the rule may end up succedding without consuming any input, which could cause infinite loops +// So this unreachable rule is added to them to satisfy peggy's requirement. +BlockedByJavascript = 'unreachable' + +MaybeBold + = result:( + & { + if (skipBold) { return false; } + skipBold = true; + return true; + } + ( + (text:Bold { skipBold = false; return text; }) + / (& { skipBold = false; return false; } BlockedByJavascript) + ) + ) { return extractFirstResult(result); } + +MaybeStrikethrough + = result:( + & { + if (skipStrikethrough) { return false; } + skipStrikethrough = true; + return true; + } + ( + (text:Strikethrough { skipStrikethrough = false; return text; }) + / (& { skipStrikethrough = false; return false; } BlockedByJavascript) + ) + ) { return extractFirstResult(result); } + +MaybeItalic + = result:( + & { + if (skipItalic) { return false; } + skipItalic = true; + return true; + } + ( + (text:Italic { skipItalic = false; return text; }) + / (& { skipItalic = false; return false; } BlockedByJavascript) + ) + ) { return extractFirstResult(result); } + +MaybeReferences + = result:( + & { + if (skipReferences) { return false; } + skipReferences = true; + return true; + } + ( + (text:References { skipReferences = false; return text; }) + / (& { skipReferences = false; return false; } BlockedByJavascript) + ) + ) { return extractFirstResult(result); } + /* Italic */ Italic = value:$([a-zA-Z0-9]+ [\x5F] [\x5F]?) { return plain(value); } @@ -384,11 +440,11 @@ ItalicContentItems = text:ItalicContentItem+ { return reducePlainTexts(text); } ItalicContentItem = Whitespace / InlineCode - / References + / MaybeReferences / UserMention / ChannelMention - / Bold - / Strikethrough + / MaybeBold + / MaybeStrikethrough / Emoji / Emoticon / AnyItalic @@ -399,52 +455,12 @@ Bold = [\x2A] [\x2A] @BoldContent [\x2A] [\x2A] / [\x2A] @BoldContent [\x2A] BoldContent = text:BoldContentItem+ { return bold(reducePlainTexts(text)); } -BoldContentItem = Whitespace / InlineCode / References / UserMention / ChannelMention / Italic / Strikethrough / Emoji / Emoticon / AnyBold / Line +BoldContentItem = Whitespace / InlineCode / MaybeReferences / UserMention / ChannelMention / MaybeItalic / MaybeStrikethrough / Emoji / Emoticon / AnyBold / Line /* Strike */ Strikethrough = [\x7E] [\x7E] @StrikethroughContent [\x7E] [\x7E] / [\x7E] @StrikethroughContent [\x7E] -StrikethroughContent = text:(Timestamp / InlineCode / Whitespace / References / UserMention / ChannelMention / Italic / Bold / Emoji / Emoticon / AnyStrike / Line)+ { - return strike(reducePlainTexts(text)); - } - -/* Italic for References */ -ItalicForReferences - = value:$([a-zA-Z0-9]+ [\x5F] [\x5F]?) { return plain(value); } - / [\x5F] [\x5F] i:ItalicContentItemsForReferences [\x5F] [\x5F] t:$[a-zA-Z0-9]+ { - return reducePlainTexts([plain('__'), ...i, plain('__'), plain(t)])[0]; - } - / [\x5F] i:ItalicContentItemsForReferences [\x5F] t:$[a-zA-Z]+ { - return reducePlainTexts([plain('_'), ...i, plain('_'), plain(t)])[0]; - } - / [\x5F] [\x5F] @ItalicContentForReferences [\x5F] [\x5F] - / [\x5F] @ItalicContentForReferences [\x5F] - -ItalicContentForReferences = text:ItalicContentItemsForReferences { return italic(text); } - -ItalicContentItemsForReferences = text:ItalicContentItemForReferences+ { return reducePlainTexts(text); } - -ItalicContentItemForReferences - = Whitespace - / UserMention - / ChannelMention - / BoldForReferences - / StrikethroughForReferences - / Emoji - / Emoticon - / AnyItalic - / Line - / InlineCode - -/* Bold for References */ -BoldForReferences = [\x2A] [\x2A] @BoldContentForReferences [\x2A] [\x2A] / [\x2A] @BoldContentForReferences [\x2A] - -BoldContentForReferences = text:(Whitespace / UserMention / ChannelMention / ItalicForReferences / StrikethroughForReferences / Emoji / Emoticon / AnyBold / Line / InlineCode)+ { return bold(reducePlainTexts(text)); } - -/* Strike for References */ -StrikethroughForReferences = [\x7E] [\x7E] @StrikethroughContentForReferences [\x7E] [\x7E] / [\x7E] @StrikethroughContentForReferences [\x7E] - -StrikethroughContentForReferences = text:(Whitespace / UserMention / ChannelMention / ItalicForReferences / BoldForReferences / Emoji / Emoticon / AnyStrike / Line / InlineCode)+ { +StrikethroughContent = text:(Timestamp / Whitespace / InlineCode / MaybeReferences / UserMention / ChannelMention / MaybeItalic / MaybeBold / Emoji / Emoticon / AnyStrike / Line)+ { return strike(reducePlainTexts(text)); } diff --git a/packages/message-parser/src/utils.ts b/packages/message-parser/src/utils.ts index 1f684b56d6ed9..6c5d605c5c7ac 100644 --- a/packages/message-parser/src/utils.ts +++ b/packages/message-parser/src/utils.ts @@ -198,21 +198,19 @@ const joinEmoji = ( export const reducePlainTexts = ( values: Paragraph['value'] ): Paragraph['value'] => - values - .flatMap((item) => item) - .reduce((result, item, index, values) => { - const next = values[index + 1]; - const current = joinEmoji(item, values[index - 1], next); - const previous: Inlines = result[result.length - 1]; - - if (previous) { - if (current.type === 'PLAIN_TEXT' && current.type === previous.type) { - previous.value += current.value; - return result; - } + values.flat().reduce((result, item, index, values) => { + const next = values[index + 1]; + const current = joinEmoji(item, values[index - 1], next); + const previous: Inlines = result[result.length - 1]; + + if (previous) { + if (current.type === 'PLAIN_TEXT' && current.type === previous.type) { + previous.value += current.value; + return result; } - return [...result, current]; - }, [] as Paragraph['value']); + } + return [...result, current]; + }, [] as Paragraph['value']); export const lineBreak = (): LineBreak => ({ type: 'LINE_BREAK', value: undefined, @@ -249,3 +247,13 @@ export const timestamp = ( fallback: plain(``), }; }; + +export const extractFirstResult = ( + value: Types[keyof Types]['value'] +): Types[keyof Types]['value'] => { + if (typeof value !== 'object' || !Array.isArray(value)) { + return value; + } + + return value.filter((item) => item).shift() as Types[keyof Types]['value']; +}; diff --git a/packages/message-parser/tests/abuse.test.ts b/packages/message-parser/tests/abuse.test.ts new file mode 100644 index 0000000000000..c280ee75b4a03 --- /dev/null +++ b/packages/message-parser/tests/abuse.test.ts @@ -0,0 +1,268 @@ +import { parse } from '../src'; +import { paragraph, plain, bold, italic, strike } from '../src/utils'; + +test.each([ + [ + `This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()_+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok~, from now on we repeat some. , REPEATx2 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()_+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok~, from now on we repeat some. REPEAT x3 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()_+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok~, from now on we repeat some. REPEAT x4 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()_+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok~, from now on we repeat some. REPEATx 5 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()_+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok~, from now on we repeat some. , REPEAT x6 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()_+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok~, from now on we repeat some. this can go long for some time, repeat x7 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()_+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok~, from now on we repeat some. ,repeat x8 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()_+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok~, from now on we repeat some.`, + [ + paragraph([ + plain( + 'This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&' + ), + bold([ + plain('()'), + italic([ + plain( + `+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok` + ), + strike([ + plain( + `, from now on we repeat some. , REPEATx2 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()_+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok` + ), + ]), + plain( + ', from now on we repeat some. REPEAT x3 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()' + ), + ]), + plain( + `+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok` + ), + strike([ + plain( + ', from now on we repeat some. REPEAT x4 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()' + ), + italic([ + plain( + `+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok~, from now on we repeat some. REPEATx 5 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()` + ), + ]), + plain( + `+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok` + ), + ]), + plain( + `, from now on we repeat some. , REPEAT x6 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&` + ), + ]), + plain( + `()_+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok` + ), + strike([ + plain( + `, from now on we repeat some. this can go long for some time, repeat x7 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()` + ), + italic([ + plain( + `+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok~, from now on we repeat some. ,repeat x8 This a message designed to stress test the message parser, trying to force several rules to stack at the same time !!@#$%^&*()` + ), + ]), + plain( + `+, overloading the symbols {}:"|<>?, some more text ,./;'\\[], numbers too 1234567890-= let it call s o s ok` + ), + ]), + plain(', from now on we repeat some.'), + ]), + ], + ], + [ + '**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__**_**__', + [ + paragraph([ + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + italic([bold([plain('_')])]), + bold([italic([plain('**')]), italic([plain('**')])]), + plain('__'), + ]), + ], + ], +])('parses %p', (input, output) => { + expect(parse(input)).toMatchObject(output); +}); diff --git a/packages/message-parser/tests/emphasis.test.ts b/packages/message-parser/tests/emphasis.test.ts index e8e72a5882f1a..b035999204ce5 100644 --- a/packages/message-parser/tests/emphasis.test.ts +++ b/packages/message-parser/tests/emphasis.test.ts @@ -185,6 +185,68 @@ test.each([ ]), ], ], + [ + '**bold ~~and strike~~** **not bold ~~but strike** ~~ not strike~~', + [ + paragraph([ + bold([plain('bold '), strike([plain('and strike')])]), + plain(' **not bold '), + strike([plain('but strike** ')]), + plain(' not strike~~'), + ]), + ], + ], + [ + '**bold** **another bold** ~~strike~~ ~~another strike~~ **bold ~~and strike~~** **not bold ~~but strike** ~~ not strike~~', + [ + paragraph([ + bold([plain('bold')]), + plain(' '), + bold([plain('another bold')]), + plain(' '), + strike([plain('strike')]), + plain(' '), + strike([plain('another strike')]), + plain(' '), + bold([plain('bold '), strike([plain('and strike')])]), + plain(' **not bold '), + strike([plain('but strike** ')]), + plain(' not strike~~'), + ]), + ], + ], + [ + 'some_snake_case_text and even_more', + [paragraph([plain('some_snake_case_text and even_more')])], + ], + [ + 'some_snake_case_text and some __italic__ text', + [ + paragraph([ + plain('some_snake_case_text and some '), + italic([plain('italic')]), + plain(' text'), + ]), + ], + ], + [ + 'some__double__snake__case__text and even_more', + [paragraph([plain('some__double__snake__case__text and even_more')])], + ], + [ + 'some__double__snake__case__text and some __italic__ text', + [ + paragraph([ + plain('some__double__snake__case__text and some '), + italic([plain('italic')]), + plain(' text'), + ]), + ], + ], + [ + 'something__ __and italic__', + [paragraph([plain('something__ '), italic([plain('and italic')])])], + ], ])('parses %p', (input, output) => { expect(parse(input)).toMatchObject(output); }); diff --git a/packages/message-parser/tests/link.test.ts b/packages/message-parser/tests/link.test.ts index 1e083fde5d70d..fcf371474bf21 100644 --- a/packages/message-parser/tests/link.test.ts +++ b/packages/message-parser/tests/link.test.ts @@ -584,6 +584,30 @@ Text after line break`, ]), ], ], + [ + '[test **bold** and __italic__](https://rocket.chat)', + [ + paragraph([ + link('https://rocket.chat', [ + plain('test '), + bold([plain('bold')]), + plain(' and '), + italic([plain('italic')]), + ]), + ]), + ], + ], + [ + '[test **bold with __italic__**](https://rocket.chat)', + [ + paragraph([ + link('https://rocket.chat', [ + plain('test '), + bold([plain('bold with '), italic([plain('italic')])]), + ]), + ]), + ], + ], ])('parses %p', (input, output) => { expect(parse(input)).toMatchObject(output); }); diff --git a/packages/model-typings/CHANGELOG.md b/packages/model-typings/CHANGELOG.md index 9ef27c21b1bde..7049c705f9920 100644 --- a/packages/model-typings/CHANGELOG.md +++ b/packages/model-typings/CHANGELOG.md @@ -1,5 +1,97 @@ # @rocket.chat/model-typings +## 0.5.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/core-typings@6.10.10 +
+ +## 0.5.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 +
+ +## 0.5.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 +
+ +## 0.5.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/core-typings@6.10.7 +
+ +## 0.5.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.6 +
+ +## 0.5.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 +
+ +## 0.5.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 +
+ +## 0.5.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 +
+ ## 0.5.2 ### Patch Changes diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index f6de32bcf7a36..dbfd0654f4558 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/model-typings", - "version": "0.5.2", + "version": "0.5.10", "private": true, "devDependencies": { "@types/jest": "~29.5.7", diff --git a/packages/model-typings/src/models/IRoomsModel.ts b/packages/model-typings/src/models/IRoomsModel.ts index 887f51987ae68..1a771892bcde6 100644 --- a/packages/model-typings/src/models/IRoomsModel.ts +++ b/packages/model-typings/src/models/IRoomsModel.ts @@ -198,6 +198,7 @@ export interface IRoomsModel extends IBaseModel { setE2eKeyId(roomId: string, e2eKeyId: string, options?: FindOptions): Promise; findOneByImportId(importId: string, options?: FindOptions): Promise; findOneByNameAndNotId(name: string, rid: string): Promise; + findOneByIdAndType(roomId: IRoom['_id'], type: IRoom['t'], options?: FindOptions): Promise; findOneByDisplayName(displayName: string, options?: FindOptions): Promise; findOneByNameAndType( name: string, diff --git a/packages/models/CHANGELOG.md b/packages/models/CHANGELOG.md index 0386f5c00eaf9..c32531c05b814 100644 --- a/packages/models/CHANGELOG.md +++ b/packages/models/CHANGELOG.md @@ -1,5 +1,97 @@ # @rocket.chat/models +## 0.1.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/model-typings@0.5.10 +
+ +## 0.1.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/model-typings@0.5.9 +
+ +## 0.1.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/model-typings@0.5.8 +
+ +## 0.1.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/model-typings@0.5.7 +
+ +## 0.1.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/model-typings@0.5.6 +
+ +## 0.1.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/model-typings@0.5.5 +
+ +## 0.1.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/model-typings@0.5.4 +
+ +## 0.1.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/model-typings@0.5.3 +
+ ## 0.1.2 ### Patch Changes diff --git a/packages/models/package.json b/packages/models/package.json index 231998e6dd266..d9c2b7ef357c9 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/models", - "version": "0.1.2", + "version": "0.1.10", "private": true, "devDependencies": { "@swc/core": "^1.3.95", diff --git a/packages/peggy-loader/CHANGELOG.md b/packages/peggy-loader/CHANGELOG.md index 0c1ace99d7d4a..b6e1c764692d4 100644 --- a/packages/peggy-loader/CHANGELOG.md +++ b/packages/peggy-loader/CHANGELOG.md @@ -1,5 +1,39 @@ # Change Log +## 0.31.28 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +## 0.31.27 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +## 0.31.26 + +### Patch Changes + +- ([#33256](https://github.com/RocketChat/Rocket.Chat/pull/33256) by [@dionisio-bot](https://github.com/dionisio-bot)) Improved the performance of the message parser + All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/packages/peggy-loader/package.json b/packages/peggy-loader/package.json index 2b1983bfa62a9..9d16417fd72de 100644 --- a/packages/peggy-loader/package.json +++ b/packages/peggy-loader/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/peggy-loader", - "version": "0.31.25", + "version": "0.31.28", "description": "Peggy loader for webpack", "keywords": [ "peggy", diff --git a/packages/rest-typings/CHANGELOG.md b/packages/rest-typings/CHANGELOG.md index af021dc481fe5..a2103a2ec7427 100644 --- a/packages/rest-typings/CHANGELOG.md +++ b/packages/rest-typings/CHANGELOG.md @@ -1,5 +1,100 @@ # @rocket.chat/rest-typings +## 6.10.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/message-parser@0.31.32 + - @rocket.chat/core-typings@6.10.10 +
+ +## 6.10.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 +
+ +## 6.10.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 +
+ +## 6.10.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/message-parser@0.31.31 + - @rocket.chat/core-typings@6.10.7 +
+ +## 6.10.6 + +### Patch Changes + +-
Updated dependencies [a45b88cdf2]: + + - @rocket.chat/message-parser@0.31.30 + - @rocket.chat/core-typings@6.10.6 +
+ +## 6.10.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 +
+ +## 6.10.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 +
+ +## 6.10.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 +
+ ## 6.10.2 ### Patch Changes diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index 93b82ee414334..1c025ab6279d3 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/rest-typings", - "version": "6.10.2", + "version": "6.10.10", "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", "@types/jest": "~29.5.7", @@ -24,7 +24,7 @@ "/dist" ], "dependencies": { - "@rocket.chat/apps-engine": "1.43.1", + "@rocket.chat/apps-engine": "1.43.5", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/message-parser": "workspace:^", "@rocket.chat/ui-kit": "workspace:~", diff --git a/packages/rest-typings/src/v1/rooms.ts b/packages/rest-typings/src/v1/rooms.ts index ee05f10f2c14b..b4dc3c52267e0 100644 --- a/packages/rest-typings/src/v1/rooms.ts +++ b/packages/rest-typings/src/v1/rooms.ts @@ -527,6 +527,62 @@ const roomsImagesPropsSchema = { export const isRoomsImagesProps = ajv.compile(roomsImagesPropsSchema); +export type RoomsCleanHistoryProps = { + roomId: IRoom['_id']; + latest: string; + oldest: string; + inclusive?: boolean; + excludePinned?: boolean; + filesOnly?: boolean; + users?: IUser['username'][]; + limit?: number; + ignoreDiscussion?: boolean; + ignoreThreads?: boolean; +}; + +const roomsCleanHistorySchema = { + type: 'object', + properties: { + roomId: { + type: 'string', + }, + latest: { + type: 'string', + }, + oldest: { + type: 'string', + }, + inclusive: { + type: 'boolean', + }, + excludePinned: { + type: 'boolean', + }, + filesOnly: { + type: 'boolean', + }, + users: { + type: 'array', + items: { + type: 'string', + }, + }, + limit: { + type: 'number', + }, + ignoreDiscussion: { + type: 'boolean', + }, + ignoreThreads: { + type: 'boolean', + }, + }, + required: ['roomId', 'latest', 'oldest'], + additionalProperties: false, +}; + +export const isRoomsCleanHistoryProps = ajv.compile(roomsCleanHistorySchema); + export type RoomsEndpoints = { '/v1/rooms.autocomplete.channelAndPrivate': { GET: (params: RoomsAutoCompleteChannelAndPrivateProps) => { @@ -559,18 +615,7 @@ export type RoomsEndpoints = { }; '/v1/rooms.cleanHistory': { - POST: (params: { - roomId: IRoom['_id']; - latest: string; - oldest: string; - inclusive?: boolean; - excludePinned?: boolean; - filesOnly?: boolean; - users?: IUser['username'][]; - limit?: number; - ignoreDiscussion?: boolean; - ignoreThreads?: boolean; - }) => { _id: IRoom['_id']; count: number; success: boolean }; + POST: (params: RoomsCleanHistoryProps) => { _id: IRoom['_id']; count: number; success: boolean }; }; '/v1/rooms.createDiscussion': { diff --git a/packages/ui-avatar/CHANGELOG.md b/packages/ui-avatar/CHANGELOG.md index b67445ff3d389..6581d9dda9294 100644 --- a/packages/ui-avatar/CHANGELOG.md +++ b/packages/ui-avatar/CHANGELOG.md @@ -1,5 +1,97 @@ # @rocket.chat/ui-avatar +## 4.0.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/ui-contexts@8.0.10 +
+ +## 4.0.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.9 +
+ +## 4.0.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.8 +
+ +## 4.0.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/ui-contexts@8.0.7 +
+ +## 4.0.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.6 +
+ +## 4.0.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.5 +
+ +## 4.0.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.4 +
+ +## 4.0.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.3 +
+ ## 4.0.2 ### Patch Changes diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index 22272a617ea83..94fb2b0cd7614 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-avatar", - "version": "4.0.2", + "version": "4.0.10", "private": true, "devDependencies": { "@babel/core": "~7.22.20", @@ -31,7 +31,7 @@ ], "peerDependencies": { "@rocket.chat/fuselage": "*", - "@rocket.chat/ui-contexts": "8.0.2", + "@rocket.chat/ui-contexts": "8.0.10", "react": "~17.0.2" }, "volta": { diff --git a/packages/ui-client/CHANGELOG.md b/packages/ui-client/CHANGELOG.md index fed23a48167b9..f285b59dfce88 100644 --- a/packages/ui-client/CHANGELOG.md +++ b/packages/ui-client/CHANGELOG.md @@ -1,5 +1,97 @@ # @rocket.chat/ui-client +## 8.0.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/ui-contexts@8.0.10 +
+ +## 8.0.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.9 +
+ +## 8.0.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.8 +
+ +## 8.0.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/ui-contexts@8.0.7 +
+ +## 8.0.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.6 +
+ +## 8.0.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.5 +
+ +## 8.0.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.4 +
+ +## 8.0.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.3 +
+ ## 8.0.2 ### Patch Changes diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index 651c8982df631..ab7a36f57cd35 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-client", - "version": "8.0.2", + "version": "8.0.10", "private": true, "devDependencies": { "@babel/core": "~7.22.20", @@ -63,7 +63,7 @@ "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", - "@rocket.chat/ui-contexts": "8.0.2", + "@rocket.chat/ui-contexts": "8.0.10", "react": "~17.0.2" }, "volta": { diff --git a/packages/ui-contexts/CHANGELOG.md b/packages/ui-contexts/CHANGELOG.md index 621d8f788590a..58b8e6caa9e46 100644 --- a/packages/ui-contexts/CHANGELOG.md +++ b/packages/ui-contexts/CHANGELOG.md @@ -1,5 +1,113 @@ # @rocket.chat/ui-contexts +## 8.0.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/ddp-client@0.3.10 + - @rocket.chat/core-typings@6.10.10 + - @rocket.chat/rest-typings@6.10.10 +
+ +## 8.0.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.9 + - @rocket.chat/rest-typings@6.10.9 + - @rocket.chat/ddp-client@0.3.9 +
+ +## 8.0.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.8 + - @rocket.chat/rest-typings@6.10.8 + - @rocket.chat/ddp-client@0.3.8 +
+ +## 8.0.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/ddp-client@0.3.7 + - @rocket.chat/core-typings@6.10.7 + - @rocket.chat/rest-typings@6.10.7 +
+ +## 8.0.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.6 + - @rocket.chat/rest-typings@6.10.6 + - @rocket.chat/ddp-client@0.3.6 +
+ +## 8.0.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.5 + - @rocket.chat/rest-typings@6.10.5 + - @rocket.chat/ddp-client@0.3.5 +
+ +## 8.0.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.4 + - @rocket.chat/rest-typings@6.10.4 + - @rocket.chat/ddp-client@0.3.4 +
+ +## 8.0.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.10.3 + - @rocket.chat/rest-typings@6.10.3 + - @rocket.chat/ddp-client@0.3.3 +
+ ## 8.0.2 ### Patch Changes diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 514fe3d0c2c8d..1d0abefbb8afc 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-contexts", - "version": "8.0.2", + "version": "8.0.10", "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 138ba8d56a685..4e5802f5e1c73 100644 --- a/packages/ui-video-conf/CHANGELOG.md +++ b/packages/ui-video-conf/CHANGELOG.md @@ -1,5 +1,105 @@ # @rocket.chat/ui-video-conf +## 8.0.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/ui-contexts@8.0.10 + - @rocket.chat/ui-avatar@4.0.10 +
+ +## 8.0.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.9 + - @rocket.chat/ui-avatar@4.0.9 +
+ +## 8.0.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.8 + - @rocket.chat/ui-avatar@4.0.8 +
+ +## 8.0.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/ui-contexts@8.0.7 + - @rocket.chat/ui-avatar@4.0.7 +
+ +## 8.0.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.6 + - @rocket.chat/ui-avatar@4.0.6 +
+ +## 8.0.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.5 + - @rocket.chat/ui-avatar@4.0.5 +
+ +## 8.0.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.4 + - @rocket.chat/ui-avatar@4.0.4 +
+ +## 8.0.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.3 + - @rocket.chat/ui-avatar@4.0.3 +
+ ## 8.0.2 ### Patch Changes diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index ea753a706c142..4757cabb016de 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": "8.0.2", + "version": "8.0.10", "private": true, "devDependencies": { "@babel/core": "~7.22.20", @@ -36,8 +36,8 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "4.0.2", - "@rocket.chat/ui-contexts": "8.0.2", + "@rocket.chat/ui-avatar": "4.0.10", + "@rocket.chat/ui-contexts": "8.0.10", "react": "^17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/uikit-playground/CHANGELOG.md b/packages/uikit-playground/CHANGELOG.md index 5fa595be65706..7671c4b31586b 100644 --- a/packages/uikit-playground/CHANGELOG.md +++ b/packages/uikit-playground/CHANGELOG.md @@ -1,5 +1,113 @@ # @rocket.chat/uikit-playground +## 0.3.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/fuselage-ui-kit@8.0.10 + - @rocket.chat/ui-contexts@8.0.10 + - @rocket.chat/ui-avatar@4.0.10 +
+ +## 0.3.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/fuselage-ui-kit@8.0.9 + - @rocket.chat/ui-contexts@8.0.9 + - @rocket.chat/ui-avatar@4.0.9 +
+ +## 0.3.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/fuselage-ui-kit@8.0.8 + - @rocket.chat/ui-contexts@8.0.8 + - @rocket.chat/ui-avatar@4.0.8 +
+ +## 0.3.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/fuselage-ui-kit@8.0.7 + - @rocket.chat/ui-contexts@8.0.7 + - @rocket.chat/ui-avatar@4.0.7 +
+ +## 0.3.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/fuselage-ui-kit@8.0.6 + - @rocket.chat/ui-contexts@8.0.6 + - @rocket.chat/ui-avatar@4.0.6 +
+ +## 0.3.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/fuselage-ui-kit@8.0.5 + - @rocket.chat/ui-contexts@8.0.5 + - @rocket.chat/ui-avatar@4.0.5 +
+ +## 0.3.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/fuselage-ui-kit@8.0.4 + - @rocket.chat/ui-contexts@8.0.4 + - @rocket.chat/ui-avatar@4.0.4 +
+ +## 0.3.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/fuselage-ui-kit@8.0.3 + - @rocket.chat/ui-contexts@8.0.3 + - @rocket.chat/ui-avatar@4.0.3 +
+ ## 0.3.2 ### Patch Changes diff --git a/packages/uikit-playground/package.json b/packages/uikit-playground/package.json index fb730f37ccfbe..4325154e926d7 100644 --- a/packages/uikit-playground/package.json +++ b/packages/uikit-playground/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/uikit-playground", "private": true, - "version": "0.3.2", + "version": "0.3.10", "type": "module", "scripts": { "dev": "vite", diff --git a/packages/web-ui-registration/CHANGELOG.md b/packages/web-ui-registration/CHANGELOG.md index 0a2316ba4dc44..9f1b988f0b8ae 100644 --- a/packages/web-ui-registration/CHANGELOG.md +++ b/packages/web-ui-registration/CHANGELOG.md @@ -1,5 +1,97 @@ # @rocket.chat/web-ui-registration +## 8.0.10 + +### Patch Changes + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Adds simple app subprocess metrics report + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Attempts to restart an app subprocess if the spawn command fails + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue while collecting the error message from a failed restart attempt of an app subprocess + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Prevents app:getStatus requests from timing out in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes error propagation when trying to get the status of apps in some cases + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes wrong data being reported to total failed apps metrics and statistics + +- ([#34906](https://github.com/RocketChat/Rocket.Chat/pull/34906)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases + +-
Updated dependencies [50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102, 50837dd102]: + + - @rocket.chat/ui-contexts@8.0.10 +
+ +## 8.0.9 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.9 +
+ +## 8.0.8 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.8 +
+ +## 8.0.7 + +### Patch Changes + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33929](https://github.com/RocketChat/Rocket.Chat/pull/33929)) Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly + +-
Updated dependencies [6fd8fd0bf6, 6fd8fd0bf6]: + + - @rocket.chat/ui-contexts@8.0.7 +
+ +## 8.0.6 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.6 +
+ +## 8.0.5 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.5 +
+ +## 8.0.4 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.4 +
+ +## 8.0.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@8.0.3 +
+ ## 8.0.2 ### Patch Changes diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index cccb7bebeac76..936cbf1f5ef01 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": "8.0.2", + "version": "8.0.10", "private": true, "homepage": "https://rocket.chat", "main": "./dist/index.js", @@ -51,7 +51,7 @@ "peerDependencies": { "@rocket.chat/layout": "*", "@rocket.chat/tools": "0.2.1", - "@rocket.chat/ui-contexts": "8.0.2", + "@rocket.chat/ui-contexts": "8.0.10", "@tanstack/react-query": "*", "react": "*", "react-hook-form": "*", diff --git a/yarn.lock b/yarn.lock index cb488238f2de0..8f96e8f405ed9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8508,9 +8508,9 @@ __metadata: languageName: unknown linkType: soft -"@rocket.chat/apps-engine@npm:1.43.1": - version: 1.43.1 - resolution: "@rocket.chat/apps-engine@npm:1.43.1" +"@rocket.chat/apps-engine@npm:1.43.5": + version: 1.43.5 + resolution: "@rocket.chat/apps-engine@npm:1.43.5" dependencies: "@msgpack/msgpack": 3.0.0-beta2 adm-zip: ^0.5.9 @@ -8526,7 +8526,7 @@ __metadata: uuid: ~8.3.2 peerDependencies: "@rocket.chat/ui-kit": "*" - checksum: 46dc87b92acbfe49ef4669920707cdf3a577e49ce04d3c139bb12e3666a6a1d4a536e7ab9ecf5b64c27dd73bd85fd0ccbb954eb97b55f6926600cf31b2fcb6fe + checksum: 55d8dcbe526a1e0d62badfdab0119caad921743a8e118bbc27b438e84a52220d12d20eacc978c61c6b633fd9814ebffa2caea252534ec68de2c1d2bda5dd213c languageName: node linkType: hard @@ -8534,7 +8534,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/apps@workspace:packages/apps" dependencies: - "@rocket.chat/apps-engine": 1.43.1 + "@rocket.chat/apps-engine": 1.43.5 "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/model-typings": "workspace:^" "@types/jest": ~29.5.7 @@ -8613,7 +8613,7 @@ __metadata: "@babel/core": ~7.22.20 "@babel/preset-env": ~7.22.20 "@babel/preset-typescript": ~7.22.15 - "@rocket.chat/apps-engine": 1.43.1 + "@rocket.chat/apps-engine": 1.43.5 "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/icons": ^0.36.0 @@ -8639,11 +8639,12 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/core-typings@workspace:packages/core-typings" dependencies: - "@rocket.chat/apps-engine": 1.43.1 + "@rocket.chat/apps-engine": 1.43.5 "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/icons": ^0.36.0 "@rocket.chat/message-parser": "workspace:^" "@rocket.chat/ui-kit": "workspace:~" + "@types/express": ^4.17.21 eslint: ~8.45.0 mongodb: ^4.17.2 prettier: ~2.8.8 @@ -8716,7 +8717,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/ddp-streamer@workspace:ee/apps/ddp-streamer" dependencies: - "@rocket.chat/apps-engine": 1.43.1 + "@rocket.chat/apps-engine": 1.43.5 "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/emitter": ~0.31.25 @@ -8912,7 +8913,7 @@ __metadata: "@babel/preset-env": ~7.22.20 "@babel/preset-react": ~7.22.15 "@babel/preset-typescript": ~7.22.15 - "@rocket.chat/apps-engine": 1.43.1 + "@rocket.chat/apps-engine": 1.43.5 "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/fuselage": ^0.54.3 @@ -8967,10 +8968,10 @@ __metadata: "@rocket.chat/icons": "*" "@rocket.chat/prettier-config": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 4.0.1 - "@rocket.chat/ui-contexts": 8.0.1 + "@rocket.chat/ui-avatar": 4.0.9 + "@rocket.chat/ui-contexts": 8.0.9 "@rocket.chat/ui-kit": 0.35.0 - "@rocket.chat/ui-video-conf": 8.0.1 + "@rocket.chat/ui-video-conf": 8.0.9 "@tanstack/react-query": "*" react: "*" react-dom: "*" @@ -9027,6 +9028,7 @@ __metadata: "@swc/jest": ^0.2.29 "@testing-library/jest-dom": ^5.16.5 "@testing-library/react": ~12.1.5 + "@types/dompurify": ^3.0.5 "@types/jest": ~29.5.7 "@types/katex": ~0.16.5 "@types/react": ~17.0.69 @@ -9036,6 +9038,7 @@ __metadata: "@typescript-eslint/parser": ~5.60.1 babel-loader: ^8.3.0 date-fns: ^3.3.1 + dompurify: ^3.1.6 eslint: ~8.45.0 eslint-plugin-anti-trojan-source: ~1.1.1 eslint-plugin-react: ~7.32.2 @@ -9057,10 +9060,10 @@ __metadata: "@rocket.chat/css-in-js": "*" "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-tokens": "*" - "@rocket.chat/message-parser": 0.31.29 + "@rocket.chat/message-parser": 0.31.31 "@rocket.chat/styled": "*" - "@rocket.chat/ui-client": 8.0.1 - "@rocket.chat/ui-contexts": 8.0.1 + "@rocket.chat/ui-client": 8.0.9 + "@rocket.chat/ui-contexts": 8.0.9 katex: "*" react: "*" languageName: unknown @@ -9356,7 +9359,7 @@ __metadata: "@rocket.chat/agenda": "workspace:^" "@rocket.chat/api-client": "workspace:^" "@rocket.chat/apps": "workspace:^" - "@rocket.chat/apps-engine": 1.43.1 + "@rocket.chat/apps-engine": 1.43.5 "@rocket.chat/base64": "workspace:^" "@rocket.chat/cas-validate": "workspace:^" "@rocket.chat/core-services": "workspace:^" @@ -9994,7 +9997,7 @@ __metadata: "@babel/core": ~7.22.20 "@babel/preset-env": ~7.22.20 "@babel/preset-typescript": ~7.22.15 - "@rocket.chat/apps-engine": 1.43.1 + "@rocket.chat/apps-engine": 1.43.5 "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/eslint-config": "workspace:^" @@ -10109,7 +10112,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/rest-typings@workspace:packages/rest-typings" dependencies: - "@rocket.chat/apps-engine": 1.43.1 + "@rocket.chat/apps-engine": 1.43.5 "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/message-parser": "workspace:^" @@ -10278,7 +10281,7 @@ __metadata: typescript: ~5.3.3 peerDependencies: "@rocket.chat/fuselage": "*" - "@rocket.chat/ui-contexts": 8.0.1 + "@rocket.chat/ui-contexts": 8.0.9 react: ~17.0.2 languageName: unknown linkType: soft @@ -10331,7 +10334,7 @@ __metadata: "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" - "@rocket.chat/ui-contexts": 8.0.1 + "@rocket.chat/ui-contexts": 8.0.9 react: ~17.0.2 languageName: unknown linkType: soft @@ -10507,8 +10510,8 @@ __metadata: "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 4.0.1 - "@rocket.chat/ui-contexts": 8.0.1 + "@rocket.chat/ui-avatar": 4.0.9 + "@rocket.chat/ui-contexts": 8.0.9 react: ^17.0.2 react-dom: ^17.0.2 languageName: unknown @@ -10598,7 +10601,7 @@ __metadata: peerDependencies: "@rocket.chat/layout": "*" "@rocket.chat/tools": 0.2.1 - "@rocket.chat/ui-contexts": 8.0.1 + "@rocket.chat/ui-contexts": 8.0.9 "@tanstack/react-query": "*" react: "*" react-hook-form: "*" @@ -13464,6 +13467,15 @@ __metadata: languageName: node linkType: hard +"@types/dompurify@npm:^3.0.5": + version: 3.0.5 + resolution: "@types/dompurify@npm:3.0.5" + dependencies: + "@types/trusted-types": "*" + checksum: ffc34eca6a4536e1c8c16a47cce2623c5a118a9785492e71230052d92933ff096d14326ff449031e8dfaac509413222372d8f2b28786a13159de6241df716185 + languageName: node + linkType: hard + "@types/ejson@npm:^2.2.1": version: 2.2.1 resolution: "@types/ejson@npm:2.2.1" @@ -13545,6 +13557,18 @@ __metadata: languageName: node linkType: hard +"@types/express@npm:^4.17.21": + version: 4.17.21 + resolution: "@types/express@npm:4.17.21" + dependencies: + "@types/body-parser": "*" + "@types/express-serve-static-core": ^4.17.33 + "@types/qs": "*" + "@types/serve-static": "*" + checksum: fb238298630370a7392c7abdc80f495ae6c716723e114705d7e3fb67e3850b3859bbfd29391463a3fb8c0b32051847935933d99e719c0478710f8098ee7091c5 + languageName: node + linkType: hard + "@types/fibers@npm:^3.1.3": version: 3.1.3 resolution: "@types/fibers@npm:3.1.3" @@ -21496,6 +21520,13 @@ __metadata: languageName: node linkType: hard +"dompurify@npm:^3.1.6": + version: 3.1.6 + resolution: "dompurify@npm:3.1.6" + checksum: cc4fc4ccd9261fbceb2a1627a985c70af231274a26ddd3f643fd0616a0a44099bd9e4480940ce3655612063be4a1fe9f5e9309967526f8c0a99f931602323866 + languageName: node + linkType: hard + "domutils@npm:^1.7.0": version: 1.7.0 resolution: "domutils@npm:1.7.0" @@ -37135,7 +37166,7 @@ __metadata: version: 0.0.0-use.local resolution: "rocketchat-services@workspace:apps/meteor/ee/server/services" dependencies: - "@rocket.chat/apps-engine": 1.43.1 + "@rocket.chat/apps-engine": 1.43.5 "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/emitter": ~0.31.25