Move in progress apps temporarily
This commit is contained in:
parent
ba04aa108c
commit
6eaaf8e9be
360 changed files with 6171 additions and 55 deletions
|
|
@ -1,41 +0,0 @@
|
|||
import chalk from "chalk";
|
||||
import convict from "convict";
|
||||
|
||||
const visitLeaf = (path: any, key: any, leaf: any) => {
|
||||
if (leaf.skipGenerate) {
|
||||
return;
|
||||
}
|
||||
|
||||
let name = `${path}.${key}`;
|
||||
if (path.length === 0) name = key;
|
||||
console.log(chalk.green(name));
|
||||
console.log(leaf.doc);
|
||||
if (leaf.default === undefined) {
|
||||
console.log(chalk.red("\t required"));
|
||||
} else {
|
||||
console.log(`\tdefault: ${JSON.stringify(leaf.default)}`);
|
||||
}
|
||||
|
||||
console.log(`\tformat: ${leaf.format}`);
|
||||
console.log(`\tenv: ${leaf.env}`);
|
||||
};
|
||||
|
||||
const visitNode = (path: any, node: any, key = "") => {
|
||||
if (node._cvtProperties) {
|
||||
const keys = Object.keys(node._cvtProperties);
|
||||
const subpath = key === "" ? path : `${key}`;
|
||||
|
||||
keys.forEach((key) => {
|
||||
visitNode(subpath, node._cvtProperties[key], key);
|
||||
});
|
||||
console.log();
|
||||
} else {
|
||||
visitLeaf(path, key, node);
|
||||
}
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export const printConfigOptions = (conf: convict.Config<any>): void => {
|
||||
const schema = conf.getSchema();
|
||||
visitNode("", schema);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue