fix: meta.jsonをimportしないように

Fix #7671
This commit is contained in:
syuilo 2021-08-20 21:34:56 +09:00
parent 1ffee15b83
commit 3cb5ed167a
3 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,6 @@
import * as fs from 'fs';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import * as os from 'os';
import * as cluster from 'cluster';
import * as chalk from 'chalk';
@ -11,7 +14,12 @@ import { lessThan } from '@/prelude/array';
import { program } from '../argv';
import { showMachineInfo } from '@/misc/show-machine-info';
import { initDb } from '../db/postgre';
import * as meta from '../meta.json';
//const _filename = fileURLToPath(import.meta.url);
const _filename = __filename;
const _dirname = dirname(_filename);
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../meta.json`, 'utf-8'));
const logger = new Logger('core', 'cyan');
const bootLogger = logger.createSubLogger('boot', 'magenta', false);