実行時にpackage.jsonを参照しないように (#5418)
* 実行時にpackage.jsonを参照しないように * nodeinfo * move meta.json * add dummy * lowercase
This commit is contained in:
parent
5b0dfa6130
commit
92af4401e2
10 changed files with 43 additions and 62 deletions
|
@ -5,7 +5,7 @@
|
|||
import * as fs from 'fs';
|
||||
import * as yaml from 'js-yaml';
|
||||
import { Source, Mixin } from './types';
|
||||
import * as pkg from '../../package.json';
|
||||
import * as meta from '../meta.json';
|
||||
|
||||
/**
|
||||
* Path of configuration directory
|
||||
|
@ -30,6 +30,7 @@ export default function load() {
|
|||
|
||||
config.port = config.port || parseInt(process.env.PORT || '', 10);
|
||||
|
||||
mixin.version = meta.version;
|
||||
mixin.host = url.host;
|
||||
mixin.hostname = url.hostname;
|
||||
mixin.scheme = url.protocol.replace(/:$/, '');
|
||||
|
@ -38,7 +39,7 @@ export default function load() {
|
|||
mixin.apiUrl = `${mixin.scheme}://${mixin.host}/api`;
|
||||
mixin.authUrl = `${mixin.scheme}://${mixin.host}/auth`;
|
||||
mixin.driveUrl = `${mixin.scheme}://${mixin.host}/files`;
|
||||
mixin.userAgent = `Misskey/${pkg.version} (${config.url})`;
|
||||
mixin.userAgent = `Misskey/${meta.version} (${config.url})`;
|
||||
|
||||
if (config.autoAdmin == null) config.autoAdmin = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue