refactor: split api into api, api-cli & api-plugin

This commit is contained in:
2023-06-02 16:41:25 +02:00
parent 495a63977c
commit b21833de40
205 changed files with 1981 additions and 1492 deletions

View File

@@ -39,7 +39,7 @@ export class MapAggTest {
testInterfaceAgainstPath(options: MapAggTestOptions) {
const template = generateTemplate(this.reflection, options.ignoredTags ?? [], false, [options.name]);
if (typeof options.err === 'undefined') {
if (options.err === undefined) {
expect(template.errors).to.be.deep.equal([], 'Unexpected Error!');
} else {
for (const error of template.errors) {
@@ -47,7 +47,7 @@ export class MapAggTest {
}
}
if (typeof options.agg !== 'undefined') {
if (options.agg !== undefined) {
const expectedAggSchema = MapAggTest.buildAggregation(
options.name,
options.agg.fields,
@@ -56,7 +56,7 @@ export class MapAggTest {
expect(template.aggregations).to.be.deep.equal(expectedAggSchema, 'Aggregation schema not equal!');
}
if (typeof options.map !== 'undefined') {
if (options.map !== undefined) {
const expectedMappingSchema = MapAggTest.buildMapping(options.name, options.map);
expect(template.mappings).to.be.deep.equal(expectedMappingSchema, 'Mapping schema not equal!');
}
@@ -81,7 +81,7 @@ export class MapAggTest {
};
}
if (typeof fields === 'undefined' || fields.length === 0) {
if (fields === undefined || fields.length === 0) {
return out;
}