Replace nanocolors with picocolors

This commit is contained in:
The Arcane Brony 2021-12-25 11:09:48 +00:00
parent a9a92ff2cb
commit e042db33b6
10 changed files with 14 additions and 11 deletions

View File

@ -86,9 +86,9 @@
"missing-native-js-functions": "^1.2.18", "missing-native-js-functions": "^1.2.18",
"morgan": "^1.10.0", "morgan": "^1.10.0",
"multer": "^1.4.2", "multer": "^1.4.2",
"nanocolors": "^0.2.13",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"patch-package": "^6.4.7", "patch-package": "^6.4.7",
"picocolors": "^1.0.0",
"proxy-agent": "^5.0.0", "proxy-agent": "^5.0.0",
"supertest": "^6.1.6", "supertest": "^6.1.6",
"typeorm": "^0.2.37" "typeorm": "^0.2.37"

View File

@ -12,7 +12,7 @@ import { initTranslation } from "./middlewares/Translation";
import morgan from "morgan"; import morgan from "morgan";
import { initInstance } from "./util/Instance"; import { initInstance } from "./util/Instance";
import { registerRoutes } from "@fosscord/util"; import { registerRoutes } from "@fosscord/util";
import { red } from "nanocolors" import { red } from "picocolors"
export interface FosscordServerOptions extends ServerOptions {} export interface FosscordServerOptions extends ServerOptions {}

View File

@ -92,11 +92,11 @@
"missing-native-js-functions": "^1.2.18", "missing-native-js-functions": "^1.2.18",
"morgan": "^1.10.0", "morgan": "^1.10.0",
"multer": "^1.4.2", "multer": "^1.4.2",
"nanocolors": "^0.2.12",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"node-os-utils": "^1.3.5", "node-os-utils": "^1.3.5",
"patch-package": "^6.4.7", "patch-package": "^6.4.7",
"pg": "^8.7.1", "pg": "^8.7.1",
"picocolors": "^1.0.0",
"proxy-agent": "^5.0.0", "proxy-agent": "^5.0.0",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"sqlite3": "^5.0.2", "sqlite3": "^5.0.2",

View File

@ -6,7 +6,7 @@ import * as Api from "@fosscord/api";
import * as Gateway from "@fosscord/gateway"; import * as Gateway from "@fosscord/gateway";
import { CDNServer } from "@fosscord/cdn"; import { CDNServer } from "@fosscord/cdn";
import express from "express"; import express from "express";
import { green, bold } from "nanocolors"; import { green, bold, yellow } from "picocolors";
import { Config, initDatabase } from "@fosscord/util"; import { Config, initDatabase } from "@fosscord/util";
import * as Sentry from "@sentry/node"; import * as Sentry from "@sentry/node";
import * as Tracing from "@sentry/tracing"; import * as Tracing from "@sentry/tracing";
@ -61,7 +61,7 @@ async function main() {
//Sentry //Sentry
if (Config.get().sentry.enabled) { if (Config.get().sentry.enabled) {
console.log( 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({ Sentry.init({
dsn: Config.get().sentry.endpoint, dsn: Config.get().sentry.endpoint,

View File

@ -2,7 +2,7 @@
import "reflect-metadata"; import "reflect-metadata";
import cluster, { Worker } from "cluster"; import cluster, { Worker } from "cluster";
import os from "os"; import os from "os";
import { red, bold, yellow, cyan } from "nanocolors"; import { red, bold, yellow, cyan } from "picocolors";
import { initStats } from "./stats"; import { initStats } from "./stats";
import { config } from "dotenv"; import { config } from "dotenv";
config(); config();

View File

@ -1,6 +1,6 @@
import os from "os"; import os from "os";
import osu from "node-os-utils"; import osu from "node-os-utils";
import { red } from "nanocolors"; import { red } from "picocolors";
export function initStats() { export function initStats() {
console.log(`[Path] running in ${__dirname}`); console.log(`[Path] running in ${__dirname}`);

View File

@ -53,7 +53,7 @@
"lambert-server": "^1.2.12", "lambert-server": "^1.2.12",
"missing-native-js-functions": "^1.2.17", "missing-native-js-functions": "^1.2.17",
"multer": "^1.4.2", "multer": "^1.4.2",
"nanocolors": "^0.2.12", "picocolors": "^1.0.0",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"supertest": "^6.1.6", "supertest": "^6.1.6",
"typescript": "^4.1.2" "typescript": "^4.1.2"

View File

@ -1,7 +1,7 @@
import { FileStorage } from "./FileStorage"; import { FileStorage } from "./FileStorage";
import path from "path"; import path from "path";
import fse from "fs-extra"; import fse from "fs-extra";
import { bgCyan, black } from "nanocolors"; import { bgCyan, black } from "picocolors";
import { S3 } from "@aws-sdk/client-s3"; import { S3 } from "@aws-sdk/client-s3";
import { S3Storage } from "./S3Storage"; import { S3Storage } from "./S3Storage";
process.cwd(); process.cwd();

View File

@ -44,10 +44,10 @@
"lambert-server": "^1.2.12", "lambert-server": "^1.2.12",
"missing-native-js-functions": "^1.2.18", "missing-native-js-functions": "^1.2.18",
"multer": "^1.4.3", "multer": "^1.4.3",
"nanocolors": "^0.2.12",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"patch-package": "^6.4.7", "patch-package": "^6.4.7",
"pg": "^8.7.1", "pg": "^8.7.1",
"picocolors": "^1.0.0",
"proxy-agent": "^5.0.0", "proxy-agent": "^5.0.0",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"typeorm": "^0.2.38", "typeorm": "^0.2.38",

View File

@ -3,7 +3,7 @@ import "reflect-metadata";
import { Connection, createConnection } from "typeorm"; import { Connection, createConnection } from "typeorm";
import * as Models from "../entities"; import * as Models from "../entities";
import { Migration } from "../entities/Migration"; import { Migration } from "../entities/Migration";
import { yellow, green } from "nanocolors"; import { yellow, green, red } from "picocolors";
// UUID extension option is only supported with postgres // 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 // 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"); const isSqlite = type.includes("sqlite");
console.log(`[Database] ${yellow(`connecting to ${type} db`)}`); 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 // @ts-ignore
promise = createConnection({ promise = createConnection({
type, type,