summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/boot/master.ts10
-rw-r--r--src/config/load.ts2
2 files changed, 10 insertions, 2 deletions
diff --git a/src/boot/master.ts b/src/boot/master.ts
index 03a28c339b..d9cc7c16be 100644
--- a/src/boot/master.ts
+++ b/src/boot/master.ts
@@ -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);
diff --git a/src/config/load.ts b/src/config/load.ts
index 6a1cf60a41..c7965e6c41 100644
--- a/src/config/load.ts
+++ b/src/config/load.ts
@@ -7,7 +7,6 @@ import { fileURLToPath } from 'url';
import { dirname } from 'path';
import * as yaml from 'js-yaml';
import { Source, Mixin } from './types';
-import * as meta from '../meta.json';
//const _filename = fileURLToPath(import.meta.url);
const _filename = __filename;
@@ -26,6 +25,7 @@ const path = process.env.NODE_ENV === 'test'
: `${dir}/default.yml`;
export default function load() {
+ const meta = JSON.parse(fs.readFileSync(`${_dirname}/../meta.json`, 'utf-8'));
const config = yaml.load(fs.readFileSync(path, 'utf-8')) as Source;
const mixin = {} as Mixin;