This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -30,17 +30,23 @@ export function hasFrontmatterKey(data: string) {
3030 * key2: value2
3131 * @param databaseConfig
3232 */
33+ // TODO refactor to be more generic
3334 export function convertDatabaseYamlToParsedString ( databaseConfig : DatabaseYaml ) :string [ ] {
3435 const yamlIndent = " " ;
3536 const databaseConfigString :string [ ] = [ ] ;
37+ // Database info
3638 databaseConfigString . push ( `name: ${ databaseConfig . name } ` ) ;
3739 databaseConfigString . push ( `description: ${ databaseConfig . description } ` ) ;
40+ // Table Columns
3841 databaseConfigString . push ( `columns:` ) ;
3942 for ( const columnName in databaseConfig . columns ) {
4043 databaseConfigString . push ( `${ yamlIndent . repeat ( 1 ) } ${ columnName } :` ) ;
4144 for ( const columnKey in databaseConfig . columns [ columnName ] ) {
4245 databaseConfigString . push ( `${ yamlIndent . repeat ( 2 ) } ${ columnKey } : ${ databaseConfig . columns [ columnName ] [ columnKey ] } ` ) ;
4346 }
4447 }
48+ // Database config
49+ databaseConfigString . push ( `config:` ) ;
50+ databaseConfigString . push ( `${ yamlIndent . repeat ( 1 ) } enable_show_state: ${ databaseConfig . config . enable_show_state } ` ) ;
4551 return databaseConfigString ;
4652 }
You can’t perform that action at this time.
0 commit comments