feat: tests

This commit is contained in:
2023-04-21 12:08:35 +02:00
parent 8cb9285462
commit d8c79256c9
140 changed files with 2100 additions and 2693 deletions

View File

@@ -17,9 +17,9 @@ import {mkdirSync, readFileSync, writeFileSync} from 'fs';
import got from 'got';
import path from 'path';
import {exit} from 'process';
import {generateTemplate} from './mapping.js';
import {getProjectReflection} from './project-reflection.js';
import {ElasticsearchTemplateCollection} from './types/mapping.js';
import {generateTemplate} from './mapping';
import {getProjectReflection} from './project-reflection';
import {ElasticsearchTemplateCollection} from './types/mapping';
// handle unhandled promise rejections
process.on('unhandledRejection', async (reason: unknown) => {

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {MappingFloatNumberProperty} from '@elastic/elasticsearch/lib/api/types';
import {ElasticsearchTypemap} from '../types/mapping.js';
import {ElasticsearchTypemap} from '../types/mapping';
export const PARSE_ERROR = 'PARSE_ERROR' as MappingFloatNumberProperty['type'];
export const MISSING_PREMAP = 'MISSING_PREMAP' as MappingFloatNumberProperty['type'];

View File

@@ -1,6 +1,10 @@
export * from './mapping'
export * from './project-reflection'
export * from './config/premap'
export * from './config/fieldmap'
export * from './config/settings'
export * from './config/typemap'
export * from './mapping';
export * from './project-reflection';
export * from './config/premap';
export * from './config/fieldmap';
export * from './config/settings';
export * from './config/typemap';
export * from './types/mapping';
export * from './types/aggregation';

View File

@@ -33,13 +33,13 @@ import {
TypeParameterType,
UnionType,
} from 'typedoc/dist/lib/models';
import {fieldmap, filterableMap, filterableTagName} from './config/fieldmap.js';
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 {fieldmap, filterableMap, filterableTagName} from './config/fieldmap';
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.js';
MappingGenTemplate} from './types/mapping';
import * as console from 'console';
let dynamicTemplates: Record<string, MappingDynamicTemplate>[] = [];