refactor: split api into api, api-cli & api-plugin

This commit is contained in:
2023-06-29 15:56:25 +02:00
parent 495a63977c
commit b21833de40
205 changed files with 1981 additions and 1492 deletions
+3 -3
View File
@@ -61,21 +61,21 @@ commander
}
// write documentation to file
if (typeof options.aggPath !== 'undefined') {
if (options.aggPath !== undefined) {
const aggPath = path.resolve(options.aggPath);
mkdirSync(path.dirname(aggPath), {recursive: true});
// tslint:disable-next-line:no-magic-numbers
writeFileSync(aggPath, JSON.stringify(result.aggregations, null, 2));
console.log(`Elasticsearch aggregations written to ${aggPath}.`);
}
if (typeof options.mappingPath !== 'undefined') {
if (options.mappingPath !== undefined) {
const mappingPath = path.resolve(options.mappingPath);
mkdirSync(path.dirname(mappingPath), {recursive: true});
// tslint:disable-next-line:no-magic-numbers
writeFileSync(mappingPath, JSON.stringify(result.mappings, null, 2));
console.log(`Elasticsearch mappings written to ${mappingPath}.`);
}
if (typeof options.errorPath !== 'undefined') {
if (options.errorPath !== undefined) {
const errorPath = path.resolve(options.errorPath);
mkdirSync(path.dirname(errorPath), {recursive: true});
// tslint:disable-next-line:no-magic-numbers