Skip to content

Commit

Permalink
Add analytics metadata to 'new' command
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-rr committed Mar 5, 2024
1 parent 4452b44 commit 0d1059c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/commands/new/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Command from '../../base';
import * as inquirer from 'inquirer';
import { start as startStudio, DEFAULT_PORT } from '../../models/Studio';
import { resolve } from 'path';
import { load } from '../../models/SpecificationFile';

const { writeFile, readFile } = fPromises;
const DEFAULT_ASYNCAPI_FILE_NAME = 'asyncapi.yaml';
Expand Down Expand Up @@ -167,5 +168,7 @@ export default class NewFile extends Command {
}
await writeFile(fileNameToWriteToDisk, asyncApiFile, { encoding: 'utf8' });
console.log(`Created file ${fileNameToWriteToDisk}...`);
this.specFile = await load(fileNameToWriteToDisk);
this.metricsMetadata.selected_template = selectedTemplate;
}
}

0 comments on commit 0d1059c

Please sign in to comment.