mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-21 22:35:11 +00:00
enhance(server): 環境変数MISSKEY_CONFIG_YMLでdefault.ymlを任意のymlに変更可能に (#10712)
* enhance(server): MISSKEY_CONFIG_YMLでconfigを設定可能に * update changelog
This commit is contained in:
parent
f3206d094d
commit
b9b9cd0c78
2 changed files with 7 additions and 5 deletions
|
@ -38,6 +38,7 @@
|
|||
- 新しい実績を追加
|
||||
|
||||
### Server
|
||||
- 環境変数MISSKEY_CONFIG_YMLで設定ファイルをdefault.ymlから変更可能に
|
||||
- Fix: エクスポートデータの拡張子がunknownになる問題を修正
|
||||
- Fix: Content-Dispositionのパースでエラーが発生した場合にダウンロードが完了しない問題を修正
|
||||
- Fix: API: i/update avatarIdとbannerIdにnullを渡した時、画像がリセットされない問題を修正
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import * as fs from 'node:fs';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname } from 'node:path';
|
||||
import { dirname, resolve } from 'node:path';
|
||||
import * as yaml from 'js-yaml';
|
||||
|
||||
/**
|
||||
|
@ -132,10 +132,11 @@ const dir = `${_dirname}/../../../.config`;
|
|||
/**
|
||||
* Path of configuration file
|
||||
*/
|
||||
const path = process.env.NODE_ENV === 'test'
|
||||
? `${dir}/test.yml`
|
||||
: `${dir}/default.yml`;
|
||||
|
||||
const path = process.env.MISSKEY_CONFIG_YML
|
||||
? resolve(dir, process.env.MISSKEY_CONFIG_YML)
|
||||
: process.env.NODE_ENV === 'test'
|
||||
? resolve(dir, 'test.yml')
|
||||
: resolve(dir, 'config.yml');
|
||||
export function loadConfig() {
|
||||
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../built/meta.json`, 'utf-8'));
|
||||
const clientManifestExists = fs.existsSync(_dirname + '/../../../built/_vite_/manifest.json');
|
||||
|
|
Loading…
Reference in a new issue