metamigo-config: build, fmt, lint
This commit is contained in:
parent
75fb3f84c4
commit
d692b3e7ff
2 changed files with 4 additions and 5 deletions
|
|
@ -41,6 +41,7 @@ module.exports = {
|
||||||
"unicorn/no-array-reduce": "off",
|
"unicorn/no-array-reduce": "off",
|
||||||
"unicorn/no-array-for-each": "off",
|
"unicorn/no-array-for-each": "off",
|
||||||
"unicorn/prefer-ternary": "off",
|
"unicorn/prefer-ternary": "off",
|
||||||
|
"unicorn/text-encoding-identifier-case": "off",
|
||||||
"function-call-argument-newline": "off",
|
"function-call-argument-newline": "off",
|
||||||
"promise/param-names": "error",
|
"promise/param-names": "error",
|
||||||
"promise/no-return-wrap": [
|
"promise/no-return-wrap": [
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,6 @@ export interface IAppConfig extends Metamigo.IMetamigoConfig {
|
||||||
export type IAppConvict = Metamigo.ExtendedConvict<IAppConfig>;
|
export type IAppConvict = Metamigo.ExtendedConvict<IAppConfig>;
|
||||||
|
|
||||||
// Merge the Metamigo base schema with your app's schmea
|
// Merge the Metamigo base schema with your app's schmea
|
||||||
// @ts-ignore
|
|
||||||
export const schema: convict.Schema<IAppConfig> = {
|
export const schema: convict.Schema<IAppConfig> = {
|
||||||
...Metamigo.configBaseSchema,
|
...Metamigo.configBaseSchema,
|
||||||
...configSchema,
|
...configSchema,
|
||||||
|
|
@ -362,12 +361,11 @@ export const loadConfig = async (): Promise<IAppConfig> => {
|
||||||
if (!config.nextAuth.audience || config.nextAuth.audience === "")
|
if (!config.nextAuth.audience || config.nextAuth.audience === "")
|
||||||
config.nextAuth.audience = config.frontend.url;
|
config.nextAuth.audience = config.frontend.url;
|
||||||
|
|
||||||
return config as any;
|
return config as IAppConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const loadConfigRaw = async (): Promise<IAppConvict> => {
|
export const loadConfigRaw = async (): Promise<IAppConvict> =>
|
||||||
return Metamigo.loadConfigurationRaw(schema);
|
Metamigo.loadConfigurationRaw(schema);
|
||||||
};
|
|
||||||
|
|
||||||
const config = defState("config", {
|
const config = defState("config", {
|
||||||
start: loadConfig,
|
start: loadConfig,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue