mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-11 12:12:55 +00:00
fix: rebase cleanup
fix: rebase cleanup fix: rebase cleanup
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
# [0.6.0](https://gitlab.com/openstapps/es-mapping-generator/compare/v0.5.0...v0.6.0) (2023-04-28)
|
||||
|
||||
|
||||
|
||||
# [0.5.0](https://gitlab.com/openstapps/es-mapping-generator/compare/v0.4.0...v0.5.0) (2023-04-27)
|
||||
|
||||
|
||||
|
||||
# [0.4.0](https://gitlab.com/openstapps/es-mapping-generator/compare/v0.3.0...v0.4.0) (2023-01-12)
|
||||
|
||||
# [0.3.0](https://gitlab.com/openstapps/es-mapping-generator/compare/v0.2.0...v0.3.0) (2022-08-17)
|
||||
|
||||
0
packages/es-mapping-generator/app.js
Normal file → Executable file
0
packages/es-mapping-generator/app.js
Normal file → Executable file
@@ -10,7 +10,6 @@
|
||||
"bin": {
|
||||
"openstapps-es-mapping-generator": "app.js"
|
||||
},
|
||||
"author": "Thea Schöbl <dev@theaninova.de>",
|
||||
"scripts": {
|
||||
"build": "rimraf lib && tsc",
|
||||
"format": "prettier . --ignore-path ../../.gitignore",
|
||||
@@ -41,7 +40,7 @@
|
||||
"c8": "7.13.0",
|
||||
"nock": "13.3.0",
|
||||
"rimraf": "5.0.0",
|
||||
"ts-node": "10.9.1",
|
||||
"ts-node": "10.9.1"
|
||||
},
|
||||
"prettier": "@openstapps/prettier-config"
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ commander
|
||||
}
|
||||
if (typeof options.errorPath !== 'undefined') {
|
||||
const errorPath = path.resolve(options.errorPath);
|
||||
mkdirSync(path.dirname(errPath), {recursive: true});
|
||||
mkdirSync(path.dirname(errorPath), {recursive: true});
|
||||
// tslint:disable-next-line:no-magic-numbers
|
||||
writeFileSync(errorPath, JSON.stringify(result.errors, null, 2));
|
||||
console.log(`Mapping errors written to ${errorPath}.`);
|
||||
|
||||
@@ -17,7 +17,6 @@ import {
|
||||
MappingObjectProperty,
|
||||
MappingProperty,
|
||||
} from '@elastic/elasticsearch/lib/api/types';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import merge from 'deepmerge';
|
||||
import {stringify} from 'flatted';
|
||||
import {DeclarationReflection, ProjectReflection, SignatureReflection} from 'typedoc';
|
||||
@@ -38,8 +37,7 @@ import {premaps} from './config/premap';
|
||||
import {settings} from './config/settings';
|
||||
import {dynamicTypes, isTagType, MISSING_PREMAP, PARSE_ERROR, TYPE_CONFLICT, typemap} from './config/typemap';
|
||||
import {AggregationSchema, ESNestedAggregation} from './types/aggregation';
|
||||
import {ElasticsearchTemplateCollection,
|
||||
MappingGenTemplate} from './types/mapping';
|
||||
import {ElasticsearchTemplateCollection, MappingGenTemplate} from './types/mapping';
|
||||
import * as console from 'console';
|
||||
|
||||
let dynamicTemplates: Record<string, MappingDynamicTemplate>[] = [];
|
||||
@@ -260,11 +258,7 @@ function handleDeclarationReflection(
|
||||
// check if we have an object referencing a generic
|
||||
if (generics.has(decl.name)) {
|
||||
// if the object name is the same as the generic name
|
||||
return readFieldTags(
|
||||
generics.get(decl.name)!,
|
||||
path,
|
||||
topTypeName, decl.comment?.tags ?? [],
|
||||
);
|
||||
return readFieldTags(generics.get(decl.name)!, path, topTypeName, decl.comment?.tags ?? []);
|
||||
// use the value defined by the generic
|
||||
}
|
||||
|
||||
@@ -687,12 +681,7 @@ function readFieldTags(
|
||||
* @param topTypeName the name of the SCThingType
|
||||
* @param tags tags attached to the value
|
||||
*/
|
||||
function readTypeTags(
|
||||
type: string,
|
||||
path: string,
|
||||
topTypeName: string,
|
||||
tags: CommentTag[],
|
||||
): MappingProperty {
|
||||
function readTypeTags(type: string, path: string, topTypeName: string, tags: CommentTag[]): MappingProperty {
|
||||
let out: MappingProperty = {type: PARSE_ERROR};
|
||||
|
||||
if (typeof typemap[type] !== 'undefined') {
|
||||
|
||||
Reference in New Issue
Block a user