Skip to content

Commit

Permalink
fix: include new columns in generated model.csv file (#511)
Browse files Browse the repository at this point in the history
Fixes #510
  • Loading branch information
chrispcampbell authored Aug 19, 2024
1 parent c33b635 commit d7bb0ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/create/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,14 @@ export async function main(): Promise<void> {

// Prompt the user to select a code generation format
const genFormat = await chooseCodeFormat()
console.log()

// Update the `sde.config.js` file to use the chosen mdl file and
// generate a sample `.check.yaml` file
if (!args.dryRun) {
await updateSdeConfig(projDir, mdlPath, genFormat)
await generateCheckYaml(projDir, mdlPath)
console.log()
}
console.log()

// If the user chose the default template, offer to set up CSV files
if (templateName === 'template-default' && !args.dryRun) {
Expand Down
7 changes: 6 additions & 1 deletion packages/create/src/step-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,13 @@ export async function chooseGenConfig(projDir: string, mdlPath: string): Promise
const origModelCsvContent = await readFile(modelCsvFile, 'utf8')
const modelCsvHeader = origModelCsvContent.split('\n')[0]

// Disable bundled listing and customization features by default
const bundleListing = 'false'
const customLookups = 'false'
const customOutputs = 'false'

// Add line and write out updated `model.csv`
const modelCsvLine = `${initialTime},${finalTime},${datPart}`
const modelCsvLine = `${initialTime},${finalTime},${datPart},${bundleListing},${customLookups},${customOutputs}`
const newModelCsvContent = `${modelCsvHeader}\n${modelCsvLine}\n`
await writeFile(modelCsvFile, newModelCsvContent)

Expand Down

0 comments on commit d7bb0ad

Please sign in to comment.