fix: rebase cleanup

fix: rebase cleanup

fix: rebase cleanup
This commit is contained in:
2023-05-24 14:53:10 +02:00
parent 0a76427ba8
commit d6d4f6e5c4
40 changed files with 4964 additions and 4493 deletions

View File

@@ -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') {