From aad9354a5027acb634ada020e6ddace153cfd832 Mon Sep 17 00:00:00 2001 From: Mirko Mollik Date: Fri, 19 Jan 2024 13:19:45 +0100 Subject: [PATCH] [proposal] make path output from generate schema dynamic Fixes #1317 Signed-off-by: Mirko Mollik --- packages/cli/src/dev.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/dev.ts b/packages/cli/src/dev.ts index 3e11c1f6a..27a6b2974 100644 --- a/packages/cli/src/dev.ts +++ b/packages/cli/src/dev.ts @@ -95,9 +95,11 @@ dev 'package.json file containing a Veramo plugin interface config', './package.json', ) + .option('-o, --output ', '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, { @@ -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