diff --git a/.gitignore b/.gitignore index 03e74631957b..8ca2d018f92e 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,5 @@ storybook-static data/ registration.yaml + +storybook-static diff --git a/apps/meteor/app/error-handler/server/lib/RocketChat.ErrorHandler.ts b/apps/meteor/app/error-handler/server/lib/RocketChat.ErrorHandler.ts index 264443a1378b..984561fe13cd 100644 --- a/apps/meteor/app/error-handler/server/lib/RocketChat.ErrorHandler.ts +++ b/apps/meteor/app/error-handler/server/lib/RocketChat.ErrorHandler.ts @@ -3,14 +3,13 @@ import { Meteor } from 'meteor/meteor'; import { throttledCounter } from '../../../../lib/utils/throttledCounter'; import { sendMessage } from '../../../lib/server/functions/sendMessage'; -import { notifyOnSettingChanged } from '../../../lib/server/lib/notifyListener'; import { settings } from '../../../settings/server'; const incException = throttledCounter((counter) => { Settings.incrementValueById('Uncaught_Exceptions_Count', counter, { returnDocument: 'after' }) .then(({ value }) => { if (value) { - void notifyOnSettingChanged(value); + settings.set(value); } }) .catch(console.error); @@ -118,5 +117,12 @@ process.on('unhandledRejection', (error) => { process.on('uncaughtException', async (error) => { incException(); + + console.error('=== UnCaughtException ==='); + console.error(error); + console.error('-------------------------'); + console.error('Errors like this can cause oplog processing errors.'); + console.error('==========================='); + void errorHandler.trackError(error.message, error.stack); }); diff --git a/packages/gazzodown/.storybook/main.js b/packages/gazzodown/.storybook/main.js index de5a951bbded..f12b58cf856f 100644 --- a/packages/gazzodown/.storybook/main.js +++ b/packages/gazzodown/.storybook/main.js @@ -15,6 +15,14 @@ module.exports = { include: /node_modules/, loader: 'babel-loader', }); + config.module.rules.push({ + test: /\.m?js$/, + include: /node_modules/, + type: 'javascript/auto', + use: { + loader: require.resolve('babel-loader'), + }, + }); return config; }, }; diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index cf4a9209d649..ca64df5ec913 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -10,6 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.build.json", "build-storybook": "build-storybook", + "build-preview": "build-storybook --quiet", + ".:build-preview-move": "mkdir -p ../../.preview && cp -r ./storybook-static ../../.preview/gazzodown", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint --ext .js,.jsx,.ts,.tsx .", "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix",