mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
refactor: build system
This commit is contained in:
@@ -38,8 +38,9 @@ import {premaps} from './config/premap.js';
|
||||
import {settings} from './config/settings.js';
|
||||
import {dynamicTypes, isTagType, MISSING_PREMAP, PARSE_ERROR, TYPE_CONFLICT, typemap} from './config/typemap.js';
|
||||
import {AggregationSchema, ESNestedAggregation} from './types/aggregation.js';
|
||||
import {ElasticsearchTemplateCollection, MappingGenTemplate} from './types/mapping.js';
|
||||
import * as console from "console";
|
||||
import {ElasticsearchTemplateCollection,
|
||||
MappingGenTemplate} from './types/mapping.js';
|
||||
import * as console from 'console';
|
||||
|
||||
let dynamicTemplates: Record<string, MappingDynamicTemplate>[] = [];
|
||||
let errors: string[] = [];
|
||||
@@ -259,7 +260,11 @@ 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
|
||||
}
|
||||
|
||||
@@ -682,7 +687,12 @@ 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