refactor: Use ESM (#8358)

* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
This commit is contained in:
syuilo 2022-02-27 11:07:39 +09:00 committed by GitHub
parent 0a882471f3
commit d071d18dd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
737 changed files with 4135 additions and 3678 deletions

View file

@ -1,8 +1,9 @@
import * as cluster from 'cluster';
import * as chalk from 'chalk';
import cluster from 'node:cluster';
import chalk from 'chalk';
import { default as convertColor } from 'color-convert';
import { format as dateFormat } from 'date-fns';
import { envOption } from '../env';
import config from '@/config/index';
import { envOption } from '../env.js';
import config from '@/config/index.js';
import * as SyslogPro from 'syslog-pro';
@ -66,7 +67,7 @@ export default class Logger {
level === 'debug' ? chalk.gray('VERB') :
level === 'info' ? chalk.blue('INFO') :
null;
const domains = [this.domain].concat(subDomains).map(d => d.color ? chalk.keyword(d.color)(d.name) : chalk.white(d.name));
const domains = [this.domain].concat(subDomains).map(d => d.color ? chalk.rgb(...convertColor.keyword.rgb(d.color))(d.name) : chalk.white(d.name));
const m =
level === 'error' ? chalk.red(message) :
level === 'warning' ? chalk.yellow(message) :