📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Remove chalk
Blue Mouse7b0058c039c3
diff --git a/backend/meta/clickhouse/generate-dummy-data.js b/backend/meta/clickhouse/generate-dummy-data.jsindex a779e3a8b..1b5f9b8fa 100644--- a/backend/meta/clickhouse/generate-dummy-data.js+++ b/backend/meta/clickhouse/generate-dummy-data.js@@ -1,7 +1,5 @@-/* eslint-disable */const { faker } = require('@faker-js/faker')const _ = require('lodash')-const chalk = require('chalk')const { clickhouse, dbName } = require('../../migrations/clickhouse/setup')@@ -111,6 +109,12 @@ const CITIES = ['Kobe', // Japan]+const chalk = {+ green: text => `\x1b[32m${text}\x1b[0m`,+ red: text => `\x1b[31m${text}\x1b[0m`,+ cyan: text => `\x1b[36m${text}\x1b[0m`,+}+const insertData = async (pid, rowCount, processedRecords, table) => {try {await clickhouse.insert({@@ -411,7 +415,7 @@ const main = () => {),)- const arguments = [+ const fnArgs = [pid,rowCount,// Date.parse(`${_.join(_.split(beginDate, '@'), 'T')}.000Z`),@@ -421,19 +425,19 @@ const main = () => {]if (mode === 'analytics') {- generateAnalyticsData(...arguments)+ generateAnalyticsData(...fnArgs)}if (mode === 'custom_events') {- generateCustomEventsData(...arguments)+ generateCustomEventsData(...fnArgs)}if (mode === 'performance') {- generatePerformanceData(...arguments)+ generatePerformanceData(...fnArgs)}if (mode === 'captcha') {- generateCaptchaData(...arguments)+ generateCaptchaData(...fnArgs)}}diff --git a/backend/migrations/clickhouse/setup.js b/backend/migrations/clickhouse/setup.jsindex fc7fc94eb..79f1e869d 100644--- a/backend/migrations/clickhouse/setup.js+++ b/backend/migrations/clickhouse/setup.js@@ -1,9 +1,11 @@-/* eslint-disable @typescript-eslint/no-var-requires */-const { createClient } = require('@clickhouse/client')-const chalk = require('chalk')require('dotenv').config()+const chalk = {+ green: text => `\x1b[32m${text}\x1b[0m`,+ red: text => `\x1b[31m${text}\x1b[0m`,+}+const clickhouse = createClient({url: `${process.env.CLICKHOUSE_HOST}:${process.env.CLICKHOUSE_PORT}`,username: process.env.CLICKHOUSE_USER,@@ -48,7 +50,6 @@ const databaselessQueriesRunner = async queries => {if (query) {try {- // eslint-disable-next-line no-await-in-loopawait clickhouseNoDatabase.command({query,})@@ -80,7 +81,6 @@ const queriesRunner = async (queries, log = true, params = {}) => {if (query) {try {- // eslint-disable-next-line no-await-in-loopawait clickhouse.command({...params,query,diff --git a/backend/package-lock.json b/backend/package-lock.jsonindex 7897ef2bc..2856d21a5 100644--- a/backend/package-lock.json+++ b/backend/package-lock.json@@ -31,7 +31,6 @@"axios": "^1.8.4","bcrypt": "^5.1.1","body-parser": "^2.2.0",- "chalk": "^4.1.2","class-transformer": "^0.5.1","class-validator": "^0.14.1","cookie-parser": "^1.4.7",@@ -4375,6 +4374,21 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/boxen/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },"node_modules/boxen/node_modules/type-fest": {"version": "0.20.2","resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",@@ -4628,22 +4642,6 @@],"license": "CC-BY-4.0"},- "node_modules/chalk": {- "version": "4.1.2",- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",- "license": "MIT",- "dependencies": {- "ansi-styles": "^4.1.0",- "supports-color": "^7.1.0"- },- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/chalk/chalk?sponsor=1"- }- },"node_modules/character-parser": {"version": "2.2.0","resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz",@@ -6015,6 +6013,22 @@"concat-map": "0.0.1"}},+ "node_modules/eslint/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },"node_modules/eslint/node_modules/eslint-visitor-keys": {"version": "4.2.0","resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz",@@ -6755,6 +6769,22 @@"concat-map": "0.0.1"}},+ "node_modules/fork-ts-checker-webpack-plugin/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },"node_modules/fork-ts-checker-webpack-plugin/node_modules/minimatch": {"version": "3.1.2","resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",@@ -7940,6 +7970,22 @@"concat-map": "0.0.1"}},+ "node_modules/jake/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "optional": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },"node_modules/jake/node_modules/minimatch": {"version": "3.1.2","resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",@@ -8526,6 +8572,22 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/log-symbols/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },"node_modules/long": {"version": "5.3.1","resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz",@@ -10069,6 +10131,22 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/ora/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },"node_modules/os-tmpdir": {"version": "1.0.2","resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",@@ -12575,6 +12653,22 @@"webpack": "^5.0.0"}},+ "node_modules/ts-loader/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },"node_modules/ts-morph": {"version": "13.0.3","resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-13.0.3.tgz",@@ -12662,6 +12756,22 @@"node": ">=10.13.0"}},+ "node_modules/tsconfig-paths-webpack-plugin/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },"node_modules/tslib": {"version": "2.8.1","resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",diff --git a/backend/package.json b/backend/package.jsonindex 878484905..434f52086 100644--- a/backend/package.json+++ b/backend/package.json@@ -50,7 +50,6 @@"axios": "^1.8.4","bcrypt": "^5.1.1","body-parser": "^2.2.0",- "chalk": "^4.1.2","class-transformer": "^0.5.1","class-validator": "^0.14.1","cookie-parser": "^1.4.7",