mirror of
https://github.com/cupcakearmy/morphus.git
synced 2025-09-06 00:00:40 +00:00
docs for storage envs
This commit is contained in:
20
scripts/generate_markdown_tables.mjs
Normal file
20
scripts/generate_markdown_tables.mjs
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user