mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-10-16 22:42:08 +00:00
refactor: split api into api, api-cli & api-plugin
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user