docs for storage envs

This commit is contained in:
2021-11-28 17:48:50 +01:00
parent 4daf9db207
commit 5c669bcce9
4 changed files with 73 additions and 17 deletions

View File

@@ -0,0 +1,20 @@
import { config, StorageType } from '../dist/src/config.js'
const schema = config._def
function stringAsMarkdownCode(string) {
return '`' + string + '`'
}
for (const storage of Object.values(StorageType)) {
const storageType = schema[storage]
let table = `
| Config | Environment | Default | Description |
| ---------------- | ------------------ | ------- | ------------------------ |
`
for (const [key, value] of Object.entries(storageType)) {
table += `| \`${storage}.${key}\` | \`${value.env}\` | ${value.default} | ${value.doc} |\n`
}
console.log(table)
}