diff options
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/backend/package.json | 3 | ||||
| -rw-r--r-- | packages/backend/src/postgres.ts | 11 |
2 files changed, 3 insertions, 11 deletions
diff --git a/packages/backend/package.json b/packages/backend/package.json index af2ab9487a..bf3b6bc2c9 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -110,7 +110,6 @@ "chalk": "5.6.2", "chalk-template": "1.1.2", "chokidar": "4.0.3", - "cli-highlight": "2.1.11", "color-convert": "2.0.1", "content-disposition": "0.5.4", "date-fns": "2.30.0", @@ -171,8 +170,8 @@ "rxjs": "7.8.2", "sanitize-html": "2.17.0", "secure-json-parse": "3.0.2", - "sharp": "0.33.5", "semver": "7.7.3", + "sharp": "0.33.5", "slacc": "0.0.10", "strict-event-emitter-types": "2.0.0", "stringz": "2.1.0", diff --git a/packages/backend/src/postgres.ts b/packages/backend/src/postgres.ts index a3e659c110..3dcd3f0965 100644 --- a/packages/backend/src/postgres.ts +++ b/packages/backend/src/postgres.ts @@ -6,7 +6,6 @@ // https://github.com/typeorm/typeorm/issues/2400 import pg from 'pg'; import { DataSource, Logger, type QueryRunner } from 'typeorm'; -import * as highlight from 'cli-highlight'; import { entities as charts } from '@/core/chart/entities.js'; import { Config } from '@/config.js'; import MisskeyLogger from '@/logger.js'; @@ -25,7 +24,7 @@ import { MiAuthSession } from '@/models/AuthSession.js'; import { MiBlocking } from '@/models/Blocking.js'; import { MiChannelFollowing } from '@/models/ChannelFollowing.js'; import { MiChannelFavorite } from '@/models/ChannelFavorite.js'; -import { MiChannelMuting } from "@/models/ChannelMuting.js"; +import { MiChannelMuting } from '@/models/ChannelMuting.js'; import { MiClip } from '@/models/Clip.js'; import { MiClipNote } from '@/models/ClipNote.js'; import { MiClipFavorite } from '@/models/ClipFavorite.js'; @@ -101,12 +100,6 @@ export type LoggerProps = { printReplicationMode?: boolean, }; -function highlightSql(sql: string) { - return highlight.highlight(sql, { - language: 'sql', ignoreIllegals: true, - }); -} - function truncateSql(sql: string) { return sql.length > 100 ? `${sql.substring(0, 100)}...` : sql; } @@ -132,7 +125,7 @@ class MyCustomLogger implements Logger { modded = truncateSql(modded); } - return highlightSql(modded); + return modded; } @bindThis |