chore: build

This commit is contained in:
xiaojunnuo
2023-06-28 09:44:35 +08:00
parent 7e8c3fbab7
commit aede78a0ec
7 changed files with 23 additions and 20 deletions
@@ -1,5 +1,6 @@
import path from 'path';
import _ from 'lodash';
const yaml = require('js-yaml');
const fs = require('fs');
@@ -24,3 +25,12 @@ export function load(env = '') {
_.merge(doc, parseEnv());
return doc;
}
export function mergeConfig(config: any, envType: string) {
_.merge(config, load(envType));
const keys = _.get(config, 'auth.jwt.secret');
if (keys) {
config.keys = keys;
}
return config;
}