Skip to content

Commit

Permalink
[proposal] make path output from generate schema dynamic (#1318)
Browse files Browse the repository at this point in the history
fixes #1317
  • Loading branch information
cre8 authored Jan 19, 2024
1 parent c050588 commit ade95c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cli/src/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ dev
'package.json file containing a Veramo plugin interface config',
'./package.json',
)
.option('-o, --output <string>', 'Output file of the schema', './src/plugin.schema.json')

.action(async (options) => {
const apiExtractorJsonPath: string = resolve(options.extractorConfig)
const outPutPath: string = resolve(options.output)
const extractorConfig: ExtractorConfig = ExtractorConfig.loadFileAndPrepare(apiExtractorJsonPath)

const extractorResult: ExtractorResult = Extractor.invoke(extractorConfig, {
Expand Down Expand Up @@ -184,7 +186,7 @@ dev
interfaces[pluginInterfaceName] = api
}

writeFileSync(resolve('./src/plugin.schema.json'), JSON.stringify(interfaces, null, 2))
writeFileSync(resolve(outPutPath), JSON.stringify(interfaces, null, 2))
})

dev
Expand Down

0 comments on commit ade95c7

Please sign in to comment.