summary refs log tree commit diff
diff options
context:
space:
mode:
authorThe Arcane Brony <myrainbowdash949@gmail.com>2021-12-25 11:09:48 +0000
committerThe Arcane Brony <myrainbowdash949@gmail.com>2021-12-25 12:09:48 +0100
commit9909e5a174cdbb79224b64ccbee8111ad1ee440e (patch)
tree79312cc6427cce6510076113de0b686a5351f7f7
parentAdd Sentry, fix compile errors (diff)
downloadserver-9909e5a174cdbb79224b64ccbee8111ad1ee440e.tar.xz
Replace nanocolors with picocolors
-rw-r--r--api/package.json2
-rw-r--r--api/src/Server.ts2
-rw-r--r--bundle/package.json2
-rw-r--r--bundle/src/Server.ts4
-rw-r--r--bundle/src/start.ts2
-rw-r--r--bundle/src/stats.ts2
-rw-r--r--cdn/package.json2
-rw-r--r--cdn/src/util/Storage.ts2
-rw-r--r--util/package.json2
-rw-r--r--util/src/util/Database.ts5
10 files changed, 14 insertions, 11 deletions
diff --git a/api/package.json b/api/package.json
index ab41b675..303d5871 100644
--- a/api/package.json
+++ b/api/package.json
@@ -86,9 +86,9 @@
 		"missing-native-js-functions": "^1.2.18",
 		"morgan": "^1.10.0",
 		"multer": "^1.4.2",
-		"nanocolors": "^0.2.13",
 		"node-fetch": "^2.6.1",
 		"patch-package": "^6.4.7",
+		"picocolors": "^1.0.0",
 		"proxy-agent": "^5.0.0",
 		"supertest": "^6.1.6",
 		"typeorm": "^0.2.37"
diff --git a/api/src/Server.ts b/api/src/Server.ts
index 259c2a6b..b0683dfc 100644
--- a/api/src/Server.ts
+++ b/api/src/Server.ts
@@ -12,7 +12,7 @@ import { initTranslation } from "./middlewares/Translation";
 import morgan from "morgan";
 import { initInstance } from "./util/Instance";
 import { registerRoutes } from "@fosscord/util";
-import { red } from "nanocolors"
+import { red } from "picocolors"
 
 export interface FosscordServerOptions extends ServerOptions {}
 
diff --git a/bundle/package.json b/bundle/package.json
index 97066bd8..2961e8a3 100644
--- a/bundle/package.json
+++ b/bundle/package.json
@@ -92,11 +92,11 @@
 		"missing-native-js-functions": "^1.2.18",
 		"morgan": "^1.10.0",
 		"multer": "^1.4.2",
-		"nanocolors": "^0.2.12",
 		"node-fetch": "^2.6.1",
 		"node-os-utils": "^1.3.5",
 		"patch-package": "^6.4.7",
 		"pg": "^8.7.1",
+		"picocolors": "^1.0.0",
 		"proxy-agent": "^5.0.0",
 		"reflect-metadata": "^0.1.13",
 		"sqlite3": "^5.0.2",
diff --git a/bundle/src/Server.ts b/bundle/src/Server.ts
index d07a6ce0..0d5e3d1f 100644
--- a/bundle/src/Server.ts
+++ b/bundle/src/Server.ts
@@ -6,7 +6,7 @@ import * as Api from "@fosscord/api";
 import * as Gateway from "@fosscord/gateway";
 import { CDNServer } from "@fosscord/cdn";
 import express from "express";
-import { green, bold } from "nanocolors";
+import { green, bold, yellow } from "picocolors";
 import { Config, initDatabase } from "@fosscord/util";
 import * as Sentry from "@sentry/node";
 import * as Tracing from "@sentry/tracing";
@@ -61,7 +61,7 @@ async function main() {
 	//Sentry
 	if (Config.get().sentry.enabled) {
 		console.log(
-			"[Bundle] You are using Sentry! This may slightly impact performance on large loads!"
+			`[Bundle] ${yellow("You are using Sentry! This may slightly impact performance on large loads!")}`
 		);
 		Sentry.init({
 			dsn: Config.get().sentry.endpoint,
diff --git a/bundle/src/start.ts b/bundle/src/start.ts
index d2707f4d..7660b296 100644
--- a/bundle/src/start.ts
+++ b/bundle/src/start.ts
@@ -2,7 +2,7 @@
 import "reflect-metadata";
 import cluster, { Worker } from "cluster";
 import os from "os";
-import { red, bold, yellow, cyan } from "nanocolors";
+import { red, bold, yellow, cyan } from "picocolors";
 import { initStats } from "./stats";
 import { config } from "dotenv";
 config();
diff --git a/bundle/src/stats.ts b/bundle/src/stats.ts
index 8d87f9d9..3c5163c3 100644
--- a/bundle/src/stats.ts
+++ b/bundle/src/stats.ts
@@ -1,6 +1,6 @@
 import os from "os";
 import osu from "node-os-utils";
-import { red } from "nanocolors";
+import { red } from "picocolors";
 
 export function initStats() {
 	console.log(`[Path] running in ${__dirname}`);
diff --git a/cdn/package.json b/cdn/package.json
index fec43785..c029ffbf 100644
--- a/cdn/package.json
+++ b/cdn/package.json
@@ -53,7 +53,7 @@
 		"lambert-server": "^1.2.12",
 		"missing-native-js-functions": "^1.2.17",
 		"multer": "^1.4.2",
-		"nanocolors": "^0.2.12",
+		"picocolors": "^1.0.0",
 		"node-fetch": "^2.6.1",
 		"supertest": "^6.1.6",
 		"typescript": "^4.1.2"
diff --git a/cdn/src/util/Storage.ts b/cdn/src/util/Storage.ts
index f45fe44a..89dd5634 100644
--- a/cdn/src/util/Storage.ts
+++ b/cdn/src/util/Storage.ts
@@ -1,7 +1,7 @@
 import { FileStorage } from "./FileStorage";
 import path from "path";
 import fse from "fs-extra";
-import { bgCyan, black } from "nanocolors";
+import { bgCyan, black } from "picocolors";
 import { S3 } from "@aws-sdk/client-s3";
 import { S3Storage } from "./S3Storage";
 process.cwd();
diff --git a/util/package.json b/util/package.json
index e93eeab4..aef5dcfc 100644
--- a/util/package.json
+++ b/util/package.json
@@ -44,10 +44,10 @@
 		"lambert-server": "^1.2.12",
 		"missing-native-js-functions": "^1.2.18",
 		"multer": "^1.4.3",
-		"nanocolors": "^0.2.12",
 		"node-fetch": "^2.6.1",
 		"patch-package": "^6.4.7",
 		"pg": "^8.7.1",
+		"picocolors": "^1.0.0",
 		"proxy-agent": "^5.0.0",
 		"reflect-metadata": "^0.1.13",
 		"typeorm": "^0.2.38",
diff --git a/util/src/util/Database.ts b/util/src/util/Database.ts
index 6124ffab..e8177093 100644
--- a/util/src/util/Database.ts
+++ b/util/src/util/Database.ts
@@ -3,7 +3,7 @@ import "reflect-metadata";
 import { Connection, createConnection } from "typeorm";
 import * as Models from "../entities";
 import { Migration } from "../entities/Migration";
-import { yellow, green } from "nanocolors";
+import { yellow, green, red } from "picocolors";
 
 // UUID extension option is only supported with postgres
 // We want to generate all id's with Snowflakes that's why we have our own BaseEntity class
@@ -19,6 +19,9 @@ export function initDatabase(): Promise<Connection> {
 	const isSqlite = type.includes("sqlite");
 
 	console.log(`[Database] ${yellow(`connecting to ${type} db`)}`);
+	if(isSqlite) {
+		console.log(`[Database] ${red(`You are running sqlite! Please keep in mind that we recommend setting up a dedicated database!`)}`);
+	}
 	// @ts-ignore
 	promise = createConnection({
 		type,